Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,435,106
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-19-24 08:14 AM
Guest: Register | Login

0 users currently in ROM Hacking | 1 guest

Main - ROM Hacking - Another ASM Question New thread | New reply


RetroRain
Posted on 12-19-08 03:19 AM Link | Quote | ID: 97127


Fuzz Ball
Level: 66

Posts: 351/994
EXP: 2436756
Next: 25095

Since: 09-30-07

Last post: 1928 days
Last view: 950 days
I never fully understood this zero-page stuff. How do I change that $855C to point to something else, like $855E?

I don't really understand the first line of code here:


$DDC4:B1 02 LDA ($02),Y @ $855C = #$96
$DDC6:9D 01 02 STA $0201,X @ $0202 = #$00


____________________
My YouTube Channel

smkdan
Posted on 12-19-08 03:52 AM Link | Quote | ID: 97128


Ninji
Level: 36

Posts: 175/238
EXP: 288483
Next: 19627

Since: 05-26-07

Last post: 4055 days
Last view: 4004 days
first line takes the 16bit address stored in $02-$03, then adds Y to it, then reads from that address. assuming Y = 0, then the stored address would be 855C.

LDA #$5E
STA $02
LDA #$85
STA $03

LDY #$00
LDA ($02),y ;this would read 855E

INY
LDA ($02),y ;this would read 855F

RetroRain
Posted on 12-19-08 04:52 AM Link | Quote | ID: 97135


Fuzz Ball
Level: 66

Posts: 352/994
EXP: 2436756
Next: 25095

Since: 09-30-07

Last post: 1928 days
Last view: 950 days
Thank you, that makes it more understandable.

____________________
My YouTube Channel

Main - ROM Hacking - Another ASM Question New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.051 seconds. (341KB of memory used)
MySQL - queries: 47, rows: 69/70, time: 0.043 seconds.