|
Question: If you wanted to offset 0-255 bytes from a label, could you add the offset without worrying about overflowing or rolling over? Example pseudocode:
samplebyte = mylabel location + myoffset
mylabel: .byte "9 3 8 7 2 8 1 9"
If your offset was 5, would variable samplebyte be guaranteed to contain the value "2" after you ran the code? If so, could someone convert the 1st line into assembly for me? I had too many whiskey cokes last night...
I'm hoping its something like:
lda #low(mylabel) sta $20 lda #high(mylabel) sta $21
ldy myoffset lda [$20],y sta samplebyte
Seems to make sense to me... any good?
-Pulper
|