|  | Routines | 
| Prev: 8F9F | Up: Map | Next: 90A3 | 
| 
Used by the routine at 8F31.
 | ||||
| 
The routine is called at 9052 for the left side, and 9058 for the right side
 | ||||
| 9052 | LD IY,$C622 | Point to the left hand buffer and jump forward. | ||
| 9056 | JR $905C | |||
| 9058 | LD IY,$C626 | Point to the right hand buffer. | ||
| 
This entry point is used by the routine at 8F31.
 | ||||
| 905C | LD A,(IY+$00) | Are the x and y co-ordinates both zero? | ||
| 905F | OR (IY+$01) | |||
| 9062 | RET Z | If so, there are no moving platforms here, so return. | ||
| 9063 | LD H,$00 | Put the y co-ordinate in HL. | ||
| 9065 | LD L,(IY+$01) | |||
| 9068 | ADD HL,HL | Double it to get a word entry in the screen offset buffer. | ||
| 9069 | LD DE,$EA60 | Add the base pointer to the screen offsets (EA60). | ||
| 906C | ADD HL,DE | |||
| 906D | LD A,(HL) | Put the screen address in HL. | ||
| 906E | INC HL | |||
| 906F | LD H,(HL) | |||
| 9070 | LD L,A | |||
| 9071 | LD A,(IY+$00) | Get the x co-ordinate. | ||
| 9074 | AND $F8 | Extract the top 5 bits as a value. | ||
| 9076 | RRCA | |||
| 9077 | RRCA | |||
| 9078 | RRCA | |||
| 9079 | LD E,A | Put this in DE. | ||
| 907A | LD D,$00 | |||
| 907C | ADD HL,DE | Add to get the actual screen address in HL. | ||
| 907D | PUSH HL | Remember this. | ||
| 907E | LD A,(IY+$00) | Get the bottom 3 bits of the x co-ordinate | ||
| 9081 | AND $07 | |||
| 9083 | CALL $909B | Shift it and store the result in C. | ||
| 9086 | LD C,A | |||
| 9087 | LD B,$03 | 3 rows to draw. | ||
| 9089 | POP DE | Restore screen address. | ||
| 908A | LD HL,$9260 | Add the offset to get a position in the screen buffer at D260. | ||
| 908D | ADD HL,DE | |||
| 908E | CALL $90A3 | Update a byte in the screen buffer. | ||
| 9091 | EX DE,HL | Swap HL to the actual screen address. | ||
| 9092 | CALL $90A3 | Update again; this ensures both the screen and the copy are in sync. | ||
| 9095 | EX DE,HL | Put HL and DE the right way round again. | ||
| 9096 | INC H | Move to the next row on screen. | ||
| 9097 | INC D | |||
| 9098 | DJNZ $908E | Loop round until all the rows are drawn. | ||
| 909A | RET | |||
| Prev: 8F9F | Up: Map | Next: 90A3 |