Page 1 of 1

SpinAsm IDE issue with decimal numbers

Posted: Mon Feb 17, 2025 2:45 pm
by jrrossi
Hi! I'm having a very weird issue with SpinAsm IDE, where decimal numbers are not parsed properly.
Here's an example:

Code: Select all

equ coeff 1.5
rdax adcl,coeff
wrax dacl,1.0
wrax dacr,0.0
When I compile it, this is the output:

Code: Select all

0000		40000284	:rdax adcl,coeff
0001		400002C6	:wrax dacl,1.0
0002		000002E6	:wrax dacr,0.0
The first line should be 60000284, so it's like the fractional part of the number gets ignored.
This happens also for negative numbers.
Currently the only way I can get fractional numbers is by using rational notation, which is quite inconvenient.

I'm running version SpinAsm v1.1.31.0 on Windows 11.
I have tried running with Windows XP SP3 and Windows 7 compatibility mode, but no success.
Tried using UTF-8 encoding for the source files, but also no success.

Re: SpinAsm IDE issue with decimal numbers

Posted: Mon Feb 17, 2025 3:12 pm
by frank
I did a copy/paste of the code from your post to my SpinASM and it is correct, I get:

Code: Select all

0000		60000284	:rdax adcl,coeff
0001		400002C6	:wrax dacl,1.0
0002		000002E6	:wrax dacr,0.0
Running 1.1.31.0 on Win 10, US English

No one else has ever reported this and we cannot reproduce in house so no idea what to suggest. It does appear that the assembler is seeing the "." as a terminal character for some reason.

Are you running US or UK English or a different language selection? If a different language try:

Code: Select all

equ coeff 1,5
rdax adcl,coeff
wrax dacl,1.0
wrax dacr,0.0

Re: SpinAsm IDE issue with decimal numbers

Posted: Mon Feb 17, 2025 3:47 pm
by jrrossi
Okay, I had to change the region formatting to English (United States)
It is a mild inconvenience, but at least it works now.
Just for the record, before my region format settings were set for Finland.

Thanks a lot for taking the time to check!
Cheers!

Re: SpinAsm IDE issue with decimal numbers

Posted: Mon Feb 17, 2025 3:59 pm
by frank
Did you try a comma instead of a period? I do not have a Finnish machine to try it on but it may allow you to work natively then and not have to switch languages.

Re: SpinAsm IDE issue with decimal numbers

Posted: Mon Feb 17, 2025 11:10 pm
by jrrossi
Yes, I have tried using the comma, sorry I forgot to mention it.
The assembler issued an error message about the number being out of range.