-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
So Given
word CurrentNumMovesLeft
CurrentNumMovesLeft = 148 << 6
You then get
LDA #0
STA CurrentNumMovesLeft
LDA #0
STA CurrentNumMovesLeft + 1
Which is wrong. You have to do
; CurrentNumMovesLeft = word(148) << 6
Which then gets you
LDA #0
STA CurrentNumMovesLeft
LDA #$25
STA CurrentNumMovesLeft + 1
It should detect that the destination is a word and limit the value to the size of the destination without having everything cast. It should also perform all maths at the highest needed and then only truncate at the end.