Routines |
Prev: E16A | Up: Map | Next: E1D9 |
Used by the routine at E1D9.
|
||||
E1A1 | CALL CalculateScreenAddress | Call CalculateScreenAddress. | ||
E1A4 | PUSH DE | Stash DE on the stack. | ||
E1A5 | LD A,D | A=D. | ||
E1A6 | RRCA | RRCA. | ||
E1A7 | RRCA | |||
E1A8 | RRCA | |||
E1A9 | AND %00000011 | Keep only bits 0-1. | ||
E1AB | OR %01011000 | Set bits 3-4, 6. | ||
E1AD | LD D,A | D=A. | ||
E1AE | LD BC,($E19E) | BC=*E19E. | ||
E1B2 | LD A,(DE) | A=*DE. | ||
E1B3 | XOR C | Flip the bits according to C. | ||
E1B4 | AND B | Merge the bits from B. | ||
E1B5 | XOR C | Flip the bits according to C. | ||
E1B6 | LD (DE),A | Write A to *DE. | ||
E1B7 | POP DE | Restore DE from the stack. | ||
E1B8 | LD A,H | A=H. | ||
E1B9 | AND %00000111 | Keep only bits 0-2. | ||
E1BB | LD B,A | B=A. | ||
E1BC | INC B | Increment B by one. | ||
E1BD | LD A,$FE | A=FE. | ||
E1BF | RRCA | RRCA. | ||
E1C0 | DJNZ $E1BF | Decrease counter by one and loop back to E1BF until counter is zero. | ||
E1C2 | LD B,A | B=A. | ||
E1C3 | LD A,($E1A0) | C=*E1A0. | ||
E1C6 | LD C,A | |||
E1C7 | LD A,(DE) | A=*DE. | ||
E1C8 | BIT 1,C | Jump to E1CD if bit 1 of C is set. | ||
E1CA | JR NZ,$E1CD | |||
E1CC | AND B | Merge the bits from B. | ||
E1CD | BIT 3,C | Jump to E1D3 if bit 3 of C is set. | ||
E1CF | JR NZ,$E1D3 | |||
E1D1 | XOR B | Flip the bits according to B. | ||
E1D2 | CPL | Invert the bits in A. | ||
E1D3 | LD (DE),A | Write A to *DE. | ||
E1D4 | RET | Return. | ||
E1D5 | DEFW $0001 | |||
E1D7 | DEFW $0001 |
Prev: E16A | Up: Map | Next: E1D9 |