SpinAsm IDE issue with decimal numbers

Software questions and issues with the FV-1

Moderator: frank

Post Reply
jrrossi
Posts: 2
Joined: Mon Feb 17, 2025 2:26 pm

SpinAsm IDE issue with decimal numbers

Post 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.
frank
Posts: 1281
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: SpinAsm IDE issue with decimal numbers

Post 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
Frank Thomson
Experimental Noize
jrrossi
Posts: 2
Joined: Mon Feb 17, 2025 2:26 pm

Re: SpinAsm IDE issue with decimal numbers

Post 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!
frank
Posts: 1281
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: SpinAsm IDE issue with decimal numbers

Post 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.
Frank Thomson
Experimental Noize
jrrossi
Posts: 2
Joined: Mon Feb 17, 2025 2:26 pm

Re: SpinAsm IDE issue with decimal numbers

Post 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.
Last edited by jrrossi on Mon Feb 17, 2025 11:15 pm, edited 1 time in total.
Post Reply