![]() |
Routines |
Prev: A037 | Up: Map | Next: A0D8 |
Used by the routines at Alias_GameEntryPoint and A0E7.
|
||||
GameEntryPoint | A040 | XOR A | Write 00 to | |
A041 | LD ($D6B8),A | |||
A044 | LD ($A01B),A | |||
A047 | DI | Disable interrupts. | ||
A048 | CALL DrawDecorativeLine | Call DrawDecorativeLine. | ||
A04B | LD SP,$5D80 | SP=5D80. | ||
A04E | CALL WaitForKeypress_Loop | Call WaitForKeypress_Loop. | ||
A051 | CP $6E | Jump to NoMeansNo if the keypress is ASCII code 6E ("n"). | ||
A053 | JR Z,NoMeansNo | |||
A055 | CP $4E | Compare the keypress with ASCII code 4E ("N"). | ||
A057 | LD A,$01 | A=01. | ||
A059 | JR NZ,GameEntryPoint_0 | Jump to GameEntryPoint_0 if the keypress was not ASCII code 4E ("N"). | ||
The player pressed either "N" or "n".
|
||||
NoMeansNo | A05B | XOR A | A=00. | |
GameEntryPoint_0 | A05C | LD ($A011),A | Write A to *A011. | |
A05F | LD A,R | Write the contents of the Memory Refresh Register to *A037. | ||
A061 | LD ($A037),A | |||
This entry point is used by the routine at A0E7.
|
||||
GameEntryPoint_1 | A064 | XOR A | Write 00 to *A0DA. | |
A065 | LD ($A0DA),A | |||
GameEntryPoint_2 | A068 | LD A,($A0DA) | Jump to A0E7 if *A0DA is not zero. | |
A06B | AND A | |||
A06C | JR NZ,$A0E7 | |||
A06E | CALL Handler_GameClock | Call Handler_GameClock. | ||
A071 | CALL Handler_DateBar | Call Handler_DateBar. | ||
A074 | LD IY,$9860 | IY=9860. | ||
A078 | LD A,(IY+$03) | A=*IY+03. | ||
A07B | CP $32 | Jump to GameEntryPoint_3 if A is not equal to 32. | ||
A07D | JR NZ,GameEntryPoint_3 | |||
A07F | CALL GetKeypress | Call GetKeypress. | ||
A082 | BIT 7,A | Jump to GameEntryPoint_3 if bit 7 of A is not set. | ||
A084 | JR Z,GameEntryPoint_3 | |||
A086 | CP $8D | Jump to GameEntryPoint_3 if A is not equal to 8D. | ||
A088 | JR NZ,GameEntryPoint_3 | |||
A08A | LD HL,($9FDD) | HL=*CurrentTime_Ticker. | ||
A08D | LD (IY+$06),L | Write L to *IY+06. | ||
A090 | LD (IY+$07),H | Write H to *IY+07. | ||
GameEntryPoint_3 | A093 | LD IY,$9860 | IY=9860. | |
Game_Loop | A097 | LD A,(IY+$00) | A=*IY+00. | |
A09A | INC A | Increment A by one. | ||
A09B | JR Z,GameEntryPoint_2 | Jump to GameEntryPoint_2 if A is equal to 8D. | ||
A09D | LD HL,($9FDD) | HL=*CurrentTime_Ticker. | ||
A0A0 | CALL $A0DB | Call A0DB. | ||
A0A3 | JR C,GameEntryPoint_5 | Jump to GameEntryPoint_5 if A is less than 8D. | ||
A0A5 | LD A,(IY+$00) | A=*IY+00. | ||
A0A8 | PUSH IY | Stash IY and AF on the stack. | ||
A0AA | PUSH AF | |||
A0AB | CALL $CC37 | Call CC37. | ||
GameEntryPoint_4 | A0AE | POP AF | Restore AF from the stack. | |
A0AF | PUSH AF | Stash AF on the stack. | ||
A0B0 | CALL ScriptInterpreter | Call ScriptInterpreter. | ||
A0B3 | LD HL,($A01F) | HL=*A01F. | ||
A0B6 | LD A,L | Jump back to GameEntryPoint_4 until HL is zero. | ||
A0B7 | OR H | |||
A0B8 | JR Z,GameEntryPoint_4 | |||
A0BA | POP AF | Restore AF and IY from the stack. | ||
A0BB | POP IY | |||
A0BD | LD E,(IY+$06) | E=*IY+06. | ||
A0C0 | LD D,(IY+$07) | D=*IY+07. | ||
A0C3 | ADD HL,DE | HL+=DE. | ||
A0C4 | LD (IY+$06),L | Write L to *IY+06. | ||
A0C7 | LD (IY+$07),H | Write H to *IY+07. | ||
A0CA | PUSH IY | Stash IY on the stack. | ||
A0CC | CALL $9C77 | Call 9C77. | ||
A0CF | POP IY | Restore IY from the stack. | ||
GameEntryPoint_5 | A0D1 | LD DE,$0008 | DE=0008. | |
A0D4 | ADD IY,DE | IY+=DE. | ||
A0D6 | JR Game_Loop | Jump to Game_Loop. |
Prev: A037 | Up: Map | Next: A0D8 |