![]() |
Routines |
Prev: 9945 | Up: Map | Next: 99D1 |
Used by the routine at 9470.
|
||||
996A | LD A,($A1DB) | Return if HUD flash is not active | ||
996D | CP $FF | |||
996F | RET Z | |||
9970 | LD E,A | Set HL to the address into commands table for HUD flash based on flash index value | ||
9971 | LD D,$00 | |||
9973 | LD HL,$99D1 | |||
9976 | ADD HL,DE | |||
9977 | LD A,(HL) | Set A to the value of the commands table for HUD flash | ||
9978 | CP $FF | Jump forward if command value is not equal to $FF | ||
997A | JP NZ,$9983 | |||
997D | LD A,$FF | inactive HUD flash | ||
997F | LD ($A1DB),A | |||
9982 | RET | |||
9983 | LD ($A22C),A | Save into A093 the value of the command | ||
9986 | LD HL,$5800 | Set HL the base address of the attribute file | ||
9989 | LD DE,$E4FF | Set DE the base address of the attribute buffer | ||
998C | LD B,$40 | Set B the number of bytes to flash | ||
998E | LD A,($A22C) | Set A to the value of the command | ||
9991 | CP $01 | command 1? | ||
9993 | JP Z,$99B8 | Jump to handle flash command 1 | ||
9996 | OR A | command 0? | ||
9997 | JP Z,$99C5 | Jump to handle flash command 0 | ||
999A | CP $02 | command 2? | ||
999C | JP Z,$99AB | Jump to handle flash command 2 | ||
handle the next byte
|
||||
999F | INC HL | Increase address into attribute file | ||
99A0 | INC DE | Increase address into attribute buffer | ||
99A1 | DJNZ $998E | Jump to process the next byte | ||
99A3 | LD A,($A1DB) | Increment flash index into commands table | ||
99A6 | INC A | |||
99A7 | LD ($A1DB),A | |||
99AA | RET | |||
handle flash command #2
|
||||
99AB | LD A,(DE) | Set A the color attribute from attribute buffer | ||
99AC | CP (HL) | Compare with attribute file | ||
99AD | JP Z,$999F | Jump to the next byte if equal | ||
99B0 | LD A,(HL) | Increment attribute color in attribute file | ||
99B1 | INC A | |||
99B2 | AND $07 | |||
99B4 | LD (HL),A | |||
99B5 | JP $999F | Jump to process next byte | ||
handle flash command #1
|
||||
99B8 | LD A,(HL) | Set A the color attribute | ||
99B9 | INC A | Increase color attribute | ||
99BA | CP $07 | Jump to the next byte if color attribute is $07 | ||
99BC | JP Z,$999F | |||
99BF | AND $07 | Set the new color attribute | ||
99C1 | LD (HL),A | |||
99C2 | JP $999F | Jump to the next byte | ||
handle flash command #0
|
||||
99C5 | LD A,(HL) | Set A the color attribute | ||
99C6 | DEC A | Decrease color attribute | ||
99C7 | OR A | Jump to the next byte if color attribute is $00 | ||
99C8 | JP Z,$999F | |||
99CB | AND $07 | Set the new color attribute | ||
99CD | LD (HL),A | |||
99CE | JP $999F | Jump to the next byte |
Prev: 9945 | Up: Map | Next: 99D1 |