In Inside the Dragon i found this:
With my HexViewer i saw the value $7f36, think this is right.21:22 - Stack base address
In the XRoar trace output i see this following for the System Stack:
* 03d7 - comes from b39b| 10ce03d7 LDS #$03d7
* 03d5 - because of a subroutine jump: b3c3| bdba77 JSR $ba77
* 03d7 - return: ba85| 39 RTS
* 7f36 - set initial value with:
Code: Select all
b3e3| 9f21 STX <$21
b3e5| 1f14 TFR X,S
OK, but what is the initial address for the user stack?
From XRoar trace:
The first value is 008f set with bb8b| ce008f LDU #$008f
The address would be increase step-by-step with STA ,U+ to 009c
Then it set to 0148 with bb92| ce0148 LDU #$0148
then U+=1 until 0151
b3ed| ce009d LDU #$009d
U+=1 until 00ab
b3f5| ce010c LDU #$010c
U+=1 until 012a - this value stays a few ops...
than set to 8b8d
b41d| ce8b8d LDU #$8b8d
this stays a while then set to b4b3 with 8c83| de62 LDU <$62
stays a while then set to 82ec with 8c83| de62 LDU <$62
and 82ec seems to be the "final" value...
$62 is documented in Inside the Dragon with:
and on http://dragon32.info/info/memmap.html with:62-67 - Miscellaneous use
So 62 is a temporary storage?$0062 Sign comparison
$0062-0067 Misc use
Anyone knows how the user stack address is calculated?