mlemmert11
Member
- Joined
- Oct 28, 2015
- Messages
- 40
I am doing some boot tracing on an Apple IIe and in boot1 I’ve encountered an indirect jump to ($003E) at $836 which I’m struggling to understand. I’m a beginner at assembly language so I think I may be missing something fundamental that may be obvious to a more experienced assembly programmer.
I’ve read a walkthrough of the Apple II boot process and it says that $836 is where sectors are read in and that $84A is the jump out to boot2.
Two screen shots are attached with the exact boot1 code I’m looking at.
Here is what is puzzling to me:
1) $84A jump doesn’t behave as expected
After copying boot0 to $9600, and boot1 to $9800, I put jump to the monitor at $984A and ran boot0 and boot1, which resulted in the disk in the drive booting up completely (i.e. I see the intro screen. The disk I’m using is Multi-Disk Catalog), which makes me think that the information I read about the $84A jump out to boot2 either isn’t accurate for the Apple IIe or I misunderstood something in that write-up.
2) $836 JMP ($003E) indirect jump doesn’t behave as expected
I started putting in breaks before $984A, then running boot1, until I found the location at which the disk in the drive doesn’t fully boot up and returns control to the monitor. That location is $836.
I put a break in directly before, at $835, and then looked at the values in $003E and $003F, and those values are 3E and 00 respectively, which made me think that the indirect jump is actually jumping to $003E.
However, I looked at the code around $003E and it has a break immediately at $0040. If there is a break I’m stumped at how the disk in the drive is booting up completely if the execution really does jump to $003E.
If I jump to $003E from any other location (for example I tried a one-line test Jump to $003E at $9500) then $003E runs as expected and breaks at $0040.
This leads me to think that the boot1 code prior to $836 somehow alters something in the system so that $836 JMP ($003E) somehow jumps to somewhere other than the address stored in $003E and $003F, but I’m totally stumped as to what the system is doing to cause it.
Does anyone have any ideas on the behavior I described on the $84A jump to boot2 and the $836 indirect jump?
I really appreciate any insights anyone has!
I’ve read a walkthrough of the Apple II boot process and it says that $836 is where sectors are read in and that $84A is the jump out to boot2.
Two screen shots are attached with the exact boot1 code I’m looking at.
Here is what is puzzling to me:
1) $84A jump doesn’t behave as expected
After copying boot0 to $9600, and boot1 to $9800, I put jump to the monitor at $984A and ran boot0 and boot1, which resulted in the disk in the drive booting up completely (i.e. I see the intro screen. The disk I’m using is Multi-Disk Catalog), which makes me think that the information I read about the $84A jump out to boot2 either isn’t accurate for the Apple IIe or I misunderstood something in that write-up.
2) $836 JMP ($003E) indirect jump doesn’t behave as expected
I started putting in breaks before $984A, then running boot1, until I found the location at which the disk in the drive doesn’t fully boot up and returns control to the monitor. That location is $836.
I put a break in directly before, at $835, and then looked at the values in $003E and $003F, and those values are 3E and 00 respectively, which made me think that the indirect jump is actually jumping to $003E.
However, I looked at the code around $003E and it has a break immediately at $0040. If there is a break I’m stumped at how the disk in the drive is booting up completely if the execution really does jump to $003E.
If I jump to $003E from any other location (for example I tried a one-line test Jump to $003E at $9500) then $003E runs as expected and breaks at $0040.
This leads me to think that the boot1 code prior to $836 somehow alters something in the system so that $836 JMP ($003E) somehow jumps to somewhere other than the address stored in $003E and $003F, but I’m totally stumped as to what the system is doing to cause it.
Does anyone have any ideas on the behavior I described on the $84A jump to boot2 and the $836 indirect jump?
I really appreciate any insights anyone has!