Prev: DA1F Up: Map Next: DA85
DA3C: Routine at DA3C
Used by the routines at DA8F and DAB1.
Input
B Pixel y-coordinate
C Pixel x-coordinate
DA3C CALL $22AA Call PIXEL_ADD.
DA3F LD E,A E=A.
DA40 LD D,$08 D=08.
DA42 AND A Jump to DA60 if A is zero.
DA43 JP Z,$DA60
DA46 LD B,E B=E.
DA47 LD A,(IX+$00) A=*IX+00.
DA4A LD C,$00 C=00.
DA4C SRL A Shift A right.
DA4E RR C Rotate C right.
DA50 DJNZ $DA4C Decrease counter by one and loop back to DA4C until counter is zero.
DA52 LD (HL),A Write A to *HL.
DA53 INC HL Increment HL by one.
DA54 LD A,C A=C.
DA55 LD (HL),A Write A to *HL.
DA56 DEC HL Decrease HL by one.
DA57 INC IX Increment IX by one.
DA59 CALL $DA6D Call DA6D.
DA5C DEC D Decrease D by one.
DA5D JR NZ,$DA46 Jump to DA46 if D is not zero.
DA5F RET Return.
DA60 LD B,D B=D.
DA61 LD A,(IX+$00) A=*IX+00.
DA64 LD (HL),A Write A to *HL.
DA65 CALL $DA6D Call DA6D.
DA68 INC IX Increment IX by one.
DA6A DJNZ $DA61 Decrease counter by one and loop back to DA61 until counter is zero.
DA6C RET Return.
DA6D INC H Increment H by one.
DA6E LD A,H A=H.
DA6F AND %00000111 Keep only bits 0-2.
DA71 RET NZ Return if H is not zero.
DA72 LD A,H A=H.
DA73 SUB $08 A-=08.
DA75 LD H,A H=A.
DA76 LD A,L A=L.
DA77 ADD A,$20 A+=20.
DA79 LD L,A L=A.
DA7A RET NC Return if H is higher.
DA7B LD A,H A=H.
DA7C ADD A,$08 A+=08.
DA7E LD H,A H=A.
DA7F XOR %01011000 Flip bits 3-4, 6.
DA81 RET NZ Return if H is not zero.
DA82 LD H,$40 H=40.
DA84 RET Return.
Prev: DA1F Up: Map Next: DA85