AOZ sometimes scrambles code order.
AOZ Studio Team
Example: Given the following code:
End //----------------------------| // Initialize Apple 2 Emulator | //------------------------------| A2M_Init: Print "Loading ROM!!!" Gosub Load_ROM ' Load ROM image from file. Print "Loading Memory" Gosub Load_Memory ' Eventually, will load RAM image from file. Right now, just allocates the memory. Print "Relocating ROM<<<" Gosub Relocate_ROM ' later on won't want to do this, since extended memory 16K memory card will be bank-switched ' with ROM. We'll want to re-code for this eventuality. Print "Resetting registers." Gosub Reset_Registers ' Initialize 6502 registers Print "Setting Reset Vector" PC = $FA62 ' Reset Vector address. Return
The following instruction is executed:
The result is very weird:
Relocating ROM<<< Loading ROM!!! Resetting Registers. $E8D4A51000
What we should see:
(...because there was an End in Load_ROM) Even if we ignore this, we should then see the following:
Setting Reset Vector
...but they're all scrambled. First of all, the code inside Load_ROM is being ignored. It's also apparent that the statements are being executed out of order... seemingly at random. I put the symbols <<< and !!! at the end of the statements to ensure that was the actual code being called. The last item (a hexidecimal number) isn't even in this block of code!!!
Updated by Brian Flanagan over 2 years ago
- Assignee set to AOZ Studio Team
- Priority changed from Normal to Low
- Estimated time set to 4:00 h
Did partial test in Beta RC2. Unable to duplicate error at this time. Need to find original source that produced this error. Reset to Low priority until it can be verified. (Perhaps it was already fixed?)