Routines |
Prev: 9A27 | Up: Map | Next: 9AB3 |
9A4C | LD A,($A042) | Return if HUD flash is not active | ||
9A4F | CP $FF | |||
9A51 | RET Z | |||
9A52 | LD E,A | Set HL to the address into commands table for HUD flash based on flash index value | ||
9A53 | LD D,$00 | |||
9A55 | LD HL,$9AB3 | |||
9A58 | ADD HL,DE | |||
9A59 | LD A,(HL) | Set A to the value of the commands table for HUD flash | ||
9A5A | CP $FF | Jump forward if command value is not equal to $FF | ||
9A5C | JP NZ,$9A65 | |||
9A5F | LD A,$FF | inactive HUD flash | ||
9A61 | LD ($A042),A | |||
9A64 | RET | |||
9A65 | LD ($A093),A | Save into A093 the value of the command | ||
9A68 | LD HL,$5800 | Set HL the base address of the attribute file | ||
9A6B | LD DE,$E4FF | Set DE the base address of the attribute buffer | ||
9A6E | LD B,$40 | Set B the number of bytes to flash | ||
9A70 | LD A,($A093) | Set A to the value of the command | ||
9A73 | CP $01 | command 1? | ||
9A75 | JP Z,$9A9A | Jump to handle flash command 1 | ||
9A78 | OR A | command 0? | ||
9A79 | JP Z,$9AA7 | Jump to handle flash command 0 | ||
9A7C | CP $02 | command 2? | ||
9A7E | JP Z,$9A8D | Jump to handle flash command 2 | ||
handle the next byte
|
||||
9A81 | INC HL | Increase address into attribute file | ||
9A82 | INC DE | Increase address into attribute buffer | ||
9A83 | DJNZ $9A70 | Jump to process the next byte | ||
9A85 | LD A,($A042) | Increment flash index into commands table | ||
9A88 | INC A | |||
9A89 | LD ($A042),A | |||
9A8C | RET | |||
handle flash command #2
|
||||
9A8D | LD A,(DE) | Set A the color attribute from attribute buffer | ||
9A8E | CP (HL) | Compare with attribute file | ||
9A8F | JP Z,$9A81 | Jump to the next byte if equal | ||
9A92 | LD A,(HL) | Increment attribute color in attribute file | ||
9A93 | INC A | |||
9A94 | AND $07 | |||
9A96 | LD (HL),A | |||
9A97 | JP $9A81 | Jump to process next byte | ||
handle flash command #1
|
||||
9A9A | LD A,(HL) | Set A the color attribute | ||
9A9B | INC A | Increase color attribute | ||
9A9C | CP $07 | Jump to the next byte if color attribute is $07 | ||
9A9E | JP Z,$9A81 | |||
9AA1 | AND $07 | Set the new color attribute | ||
9AA3 | LD (HL),A | |||
9AA4 | JP $9A81 | Jump to the next byte | ||
handle flash command #0
|
||||
9AA7 | LD A,(HL) | Set A the color attribute | ||
9AA8 | DEC A | Decrease color attribute | ||
9AA9 | OR A | Jump to the next byte if color attribute is $00 | ||
9AAA | JP Z,$9A81 | |||
9AAD | AND $07 | Set the new color attribute | ||
9AAF | LD (HL),A | |||
9AB0 | JP $9A81 | Jump to the next byte |
Prev: 9A27 | Up: Map | Next: 9AB3 |