daver2
10k Member
>>> Of course the statement I made about putting my memory check program into ROM was very silly.
I didn't want to say anything at the time !
Think of self modifying code as self modifying hardware !
Yes, copying from ROM to RAM would be the answer in this case. Or you do what BASIC does with the 'wedge' and copies a small amount of code (in your case the self modifying subroutine) into RAM and then you call that. The bulk of the code can still be executed out of ROM in this case. This would save RAM...
Dave
I didn't want to say anything at the time !
Think of self modifying code as self modifying hardware !
Yes, copying from ROM to RAM would be the answer in this case. Or you do what BASIC does with the 'wedge' and copies a small amount of code (in your case the self modifying subroutine) into RAM and then you call that. The bulk of the code can still be executed out of ROM in this case. This would save RAM...
Dave