Re: A86: Variables...


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

Re: A86: Variables...




> When I quit the program and run it again, the initials are changed
> back to GFX...   I know i didn't reset them each time it is run.  
> 
> Does anyone know why this would happen?

Guys, make sure you understand what you're saying before you
post an answer to someone's question.  When you run an
assembly program, it is copied to _asm_exec_ram, a portion of
memory dedicated to running assembly programs, and run there.
All of the .db's and such are copied with the program.  When you
change the values in those .db's, it changes them in the current
program, which is the copy in _asm_exec_ram, not the actual
program.  When the program finishes, it is NOT copied back,
meaning any changes made to the copy in _asm_exec_ram
are lost.  To have working high scores, you have to write a
routine that changes the .db's in the actual program instead
of the copy in _asm_exec_ram.  This is harder to do and does
use a bit more code.