Re: A86: Re: self-modifying code


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

Re: A86: Re: self-modifying code




The asm program is located somewhere between Ram Page 2 and Ram Page 7. When
an asm program is ran the original program is copied to $D748 on Ram Page 0.
That is why self modifing code doesnt work, the changes are not saved. You
must look up the variable in the VAT to determine where the actual asm
program is located, and modified from there.

HL points to the start of the HiScore label address

Later,
    Matt

>> 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?