You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very specific issue I have encountered when using this format:
lda #<NUM
Where NUM can be any number between 0 and 65535. With these positives numbers it works fine. It also seems to work fine with negative numbers... with the exception of numbers between -128 and -255 (inclusive).
For instance, these works:
lda #<-127
lda #<-256
But these doesn't:
lda #<-128
lda #<-200
lda #<-255
For any numbers between these two, assembly stops on this error:
Mode not supporter for "lda" in selected CPU.
The text was updated successfully, but these errors were encountered:
Turns out there a few more issues with negative numbers (incl most significant byte not getting the $ff for negative numbers). So in case others have this issue and it doesn't get fixed in 6502.net, here is my work around, two functions that I'll now use instead of the < and > operators:
LEAST .function val
.if val < 0
.return 255 & (256 - ((-val) % 256))
.else
.return <val
.endif
.endfunction
MOST .function val
.return val >> 8
.endfunction
This is a very specific issue I have encountered when using this format:
lda #<NUM
Where NUM can be any number between 0 and 65535. With these positives numbers it works fine. It also seems to work fine with negative numbers... with the exception of numbers between -128 and -255 (inclusive).
For instance, these works:
But these doesn't:
For any numbers between these two, assembly stops on this error:
Mode not supporter for "lda" in selected CPU.
The text was updated successfully, but these errors were encountered: