![]()  | 
Routines | 
| Prev: BAC3 | Up: Map | Next: BB2F | 
| 
 
Used by the routine at Print_RoomImage.
 
  | 
||||||||
| Print_RoomGraphic | BAE1 | CALL SwitchNormalScreenOutput | Call SwitchNormalScreenOutput. | |||||
| BAE4 | LD BC,$1821 | BC=1821. | ||||||
| BAE7 | CALL $0DD9 | Call CL_SET. | ||||||
| 
 
Reset graphic display area.
 
 | 
||||||||
| BAEA | LD HL,$5C8F | Point HL at ATTR-T which holds the current attribute value. | ||||||
| BAED | LD A,(HL) | Fetch the attribute byte. | ||||||
| BAEE | AND %00111000 | Keep only the PAPER bits 3-5. | ||||||
| BAF0 | RRA | Move the PAPER bits into the INK bits. | ||||||
| BAF1 | RRA | |||||||
| BAF2 | RRA | |||||||
| BAF3 | LD B,A | Store the result in B. | ||||||
| BAF4 | LD A,(HL) | Fetch the attribute byte again. | ||||||
| BAF5 | AND %11111000 | Keep everything except the INK bits. | ||||||
| BAF7 | OR B | Combine the two values. | ||||||
| BAF8 | LD (HL),A | Write the result back to *ATTR-T. | ||||||
| BAF9 | LD BC,$0200 | Set a byte counter in BC of 0200. | ||||||
| Print_RoomGraphic_Loop | BAFC | PUSH BC | Stash the byte counter on the stack. | |||||
| BAFD | LD HL,$BD75 | HL=BD75. | ||||||
| BB00 | LD B,$08 | B=08. | ||||||
| BB02 | LD C,(IX+$00) | C=*IX+00. | ||||||
| BB05 | INC IX | Increment IX by one. | ||||||
| BB07 | JR Print_RoomGraphic_1 | Jump to Print_RoomGraphic_1. | ||||||
| Print_RoomGraphic_0 | BB09 | INC HL | Increment HL by one. | |||||
| Print_RoomGraphic_1 | BB0A | SRL C | Shift C right. | |||||
| BB0C | JR NC,Print_RoomGraphic_2 | Jump to Print_RoomGraphic_2 if HL is greater than or equal to B. | ||||||
| BB0E | LD A,(IX+$00) | A=*IX+00. | ||||||
| BB11 | INC IX | Increment IX by one. | ||||||
| BB13 | JR Print_RoomGraphic_3 | Jump to Print_RoomGraphic_3. | ||||||
| Print_RoomGraphic_2 | BB15 | XOR A | A=00. | |||||
| Print_RoomGraphic_3 | BB16 | LD (HL),A | Write A to *HL. | |||||
| BB17 | DJNZ Print_RoomGraphic_0 | Decrease counter by one and loop back to Print_RoomGraphic_0 until counter is zero. | ||||||
| BB19 | LD DE,$BD75 | DE=BD75. | ||||||
| BB1C | CALL $0B03 | Call PO_FETCH. | ||||||
| BB1F | CALL $0B7F | Call PR_ALL. | ||||||
| BB22 | CALL $0ADC | Call PO_STORE. | ||||||
| BB25 | POP BC | Restore the byte counter from the stack. | ||||||
| BB26 | DEC BC | Decrease the byte counter by one. | ||||||
| BB27 | LD A,C | Jump back to Print_RoomGraphic_Loop until the byte counter is zero. | ||||||
| BB28 | OR B | |||||||
| BB29 | JR NZ,Print_RoomGraphic_Loop | |||||||
| BB2B | CALL $0D4D | Call TEMPS. | ||||||
| BB2E | RET | Return. | ||||||
| Prev: BAC3 | Up: Map | Next: BB2F |