Being new with GCBasic I've depended a bit on the helpfile and in the chapter about setting variables there's an example that looks like this:
Temp = LargeVar / 5 [WORD] 'Note the use of [WORD] to ensure that the calculation is performed correctly
Well... wanting to be absolutely sure I wiped my word variable I wrote this in my code:
Dim Myvar as word Myvar = 0x0000 [WORD]
That should do it, right? Well... Guess what Mr.Assembler says... movlw 123 movwf MYVAR_H movlw 214 movwf MYVAR
Just doing Myvar = 0 works much better...
Is it supposed to do this?
That isn't what GCBASIC is supposed to do! It's fixed in http://gcbasic.sourceforge.net/newfiles/update.zip, as is the other bug you posted.
Excellent! I've tested it and now works as expected.
Thanks!
Log in to post a comment.
Being new with GCBasic I've depended a bit on the helpfile and in the chapter about setting variables there's an example that looks like this:
Temp = LargeVar / 5 [WORD] 'Note the use of [WORD] to ensure that the calculation is performed correctly
Well... wanting to be absolutely sure I wiped my word variable I wrote this in my code:
Dim Myvar as word
Myvar = 0x0000 [WORD]
That should do it, right? Well... Guess what Mr.Assembler says...
movlw 123
movwf MYVAR_H
movlw 214
movwf MYVAR
Just doing Myvar = 0 works much better...
Is it supposed to do this?
That isn't what GCBASIC is supposed to do! It's fixed in http://gcbasic.sourceforge.net/newfiles/update.zip, as is the other bug you posted.
Excellent! I've tested it and now works as expected.
Thanks!