Routines |
Prev: E320 | Up: Map | Next: E396 |
|
||||
E352 | LD A,R | Set the low byte in L to the contents of the Memory Refresh Register. | ||
E354 | LD L,A | |||
E355 | LD H,$C8 | Set the high byte in H to C8. | ||
E357 | LD B,$32 | Set a loop counter in B to 32. | ||
E359 | LD D,$05 | Set a delay counter in D of 05. | ||
E35B | LD A,(HL) | A=*HL. | ||
E35C | AND %00011000 | Keep only bits 3-4. | ||
E35E | OR %00000101 | Set bits 0, 2. | ||
E360 | OUT ($FE),A | Set border to the colour held by A. | ||
E362 | INC HL | Increment HL by one. | ||
E363 | PUSH BC | Stash the loop counter on the stack. | ||
E364 | LD B,D | Set the delay loop counter. | ||
Delay_Loop_01 | E365 | DJNZ Delay_Loop_01 | Decrease the delay counter by one and loop back to Delay_Loop_01 until the delay counter is zero. | |
E367 | POP BC | Restore the loop counter from the stack. | ||
E368 | DJNZ $E35B | Decrease the loop counter by one and loop back to E35B until the loop counter is zero. | ||
E36A | HALT | Halt operation (suspend CPU until the next interrupt) twice. | ||
E36B | HALT | |||
E36C | CALL Handler_PlayerInput | Call Handler_PlayerInput. | ||
E36F | CP $01 | Return if the player has pressed any direction key. | ||
E371 | RET Z | |||
E372 | CP $02 | |||
E374 | RET Z | |||
E375 | CP $04 | |||
E377 | RET Z | |||
E378 | CP $08 | |||
E37A | RET Z | |||
E37B | HALT | Halt operation (suspend CPU until the next interrupt) twice. | ||
E37C | HALT | |||
E37D | LD A,R | Set the low byte in L to the contents of the Memory Refresh Register. | ||
E37F | LD L,A | |||
E380 | LD H,$0A | Set the high byte in H to 0A. | ||
E382 | LD B,$23 | Set a loop counter in B to 23. | ||
E384 | LD C,$64 | Set a delay counter in C this time of 64. | ||
E386 | LD A,(HL) | A=*HL. | ||
E387 | AND %00011000 | Keep only bits 3-4. | ||
E389 | OR %00000101 | Set bits 0, 2. | ||
E38B | OUT ($FE),A | Set border to the colour held by A. | ||
E38D | INC HL | Increment HL by one. | ||
E38E | PUSH BC | Stash the loop counter on the stack. | ||
E38F | LD B,C | Set the delay loop counter. | ||
Delay_Loop_02 | E390 | DJNZ Delay_Loop_02 | Decrease the delay counter by one and loop back to Delay_Loop_02 until the delay counter is zero. | |
E392 | POP BC | Restore the loop counter from the stack. | ||
E393 | DJNZ $E386 | Decrease the loop counter by one and loop back to E386 until the loop counter is zero. | ||
E395 | RET | Return. |
Prev: E320 | Up: Map | Next: E396 |