Prev: D409 Up: Map Next: D50C
D4E8: Routine at D4E8
Used by the routine at WriteSceneToShadowBuffer.
D4E8 EX AF,AF' Exchange the AF register with the shadow AF register.
D4E9 ADD A,H A+=H.
D4EA LD H,A H=A.
D4EB LD A,B A=B.
D4EC ADD A,$83 A+=83.
D4EE LD D,A D=A.
D4EF LD E,C E=C.
D4F0 LD A,($D220) A=*D220.
D4F3 AND A
D4F4 LD A,(HL) A=*HL.
D4F5 JR Z,$D509 Jump to D509 if *D220 is zero.
D4F7 LD A,C A=C.
D4F8 AND %00011111 Keep only bits 0-4.
D4FA EXX Switch to the shadow registers.
D4FB LD C,A C=A.
D4FC LD B,$00 B=00.
D4FE LD HL,$D31F HL=D31F.
D501 ADD HL,BC HL+=BC.
D502 LD A,($D220) C=*D220.
D505 LD C,A
D506 ADD HL,BC HL+=BC.
D507 LD A,(HL) A=*HL.
D508 EXX Switch back to the normal registers.
D509 LD (DE),A Write A to *DE.
D50A INC HL Increment HL by one.
D50B RET Return.
Prev: D409 Up: Map Next: D50C