[A83] Re: Flash Apping + Menu ROutine


[Prev][Next][Index][Thread]

[A83] Re: Flash Apping + Menu ROutine




> Could you explain to me what exactly is selfmodifying 
code?
> 
Code that changes itself while running. Like:

 ld a,10
 ld (LABEL+1),a
 ...

LABEL:
 ld b,20    ; this will be modified to "ld b,10" by the
            ; load above

Of course the instructions themselves can also be replaced,
not only just numerical data. If, for instance, I had 
written "ld a,$76 \ ld (LABEL),a" then the original "ld 
b,20" would be interpreted as "halt \ inc d" when the 
program counter arrives there.

PG





References: