Re: A86: Re: self-modifying code


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

Re: A86: Re: self-modifying code




That's not what's meant by "self-modifying code".  It means code that changes
its own code, not data...
Here's an example:

command:
bit 0,(hl)
;blah blah blah
;A now contains the bit # to check for
ld hl,command+2   ;i.e. hl->the byte in the opcode that tells which bit to check

ld (hl),a    ;you just modified the code


ComAsYuAre wrote:

> In a message dated 5/21/98 20:48:19, you wrote:
>
> >
> >
> > ld hl,prog_name
> >
> > rst 20h
> >
> > rst 10h
> >
> > ld de,hiscore-$d748
> >
> > add hl,de            ;this wont work if its spread over more than one page
> >
> >
> >
> >now load the code from hiscore into the program
>
> what's $d748 for?  a ram address to store the variable?



--
Stephen Hicks
mailto:shicks@mindspring.com
ICQ:5453914
IRC/AIM:Kupopo
Hopemage:http://www.mindspring.com/~shicks/



References: