Prev: 923A Up: Map Next: 92E4
9255: Print Yin-Yang To Screen
Used by the routine at Yin_Yang_1UP.
On entry DE points to a yin-yang UDG and HL to screen coordinates;
DE Yin-yang UDG
$92AA Half
$928A Full
HL Screen Position
0108 1 8
0408 4 8
1A08 26 8
1D08 29 8
Yin_Yang_Copy 9255 PUSH DE Stash yin-yang UDG and screen coordinates on the stack.
9256 PUSH HL
9257 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
925A POP HL Restore yin-yang UDG and screen coordinates from the stack.
925B POP DE
925C PUSH HL Keep a reference to HL on the stack as we'll need to refer to it again later.
925D INC H Increase the LSB of HL by one.
925E LD BC,$0008 Add 0008 to DE and stash it on the stack.
9261 EX DE,HL
9262 ADD HL,BC
9263 EX DE,HL
9264 PUSH DE
9265 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
9268 POP DE
9269 POP HL
926A PUSH HL
926B LD A,L
926C ADD A,$08
926E LD L,A
926F LD BC,$0008 Add 0008 to DE and stash it on the stack.
9272 EX DE,HL
9273 ADD HL,BC
9274 EX DE,HL
9275 PUSH DE
9276 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
9279 POP DE
927A POP HL
927B INC H
927C LD A,L
927D ADD A,$08
927F LD L,A
9280 LD BC,$0008 Add 0008 to DE.
9283 EX DE,HL
9284 ADD HL,BC
9285 EX DE,HL
9286 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
9289 RET Return.
Full yin-yang UDG.
Yin_Yang_UDG_Full 928A DEFB $07,$18,$20,$46,$46,$80,$80,$80 full-yin-yang
9292 DEFB $F0,$3C,$1E,$1E,$1F,$1F,$3F,$7F
929A DEFB $81,$83,$87,$47,$47,$23,$1B,$07
92A2 DEFB $FF,$FF,$CF,$CE,$FE,$FC,$F8,$E0
Half yin-yang UDG.
Yin_Yang_UDG_Half 92AA DEFB $07,$18,$20,$46,$46,$80,$80,$80 half-yin-yang
92B2 DEFB $C0,$20,$10,$10,$10,$10,$20,$C0
92BA DEFB $81,$82,$84,$44,$44,$22,$1A,$07
92C2 DEFB $00,$00,$00,$00,$00,$00,$00,$80
fff
Yin_Yang_Copy_Line 92CA PUSH DE Stash DE and HL on the stack.
92CB PUSH HL
92CC LD A,L
92CD CALL Screen_Calc Call Screen_Calc.
92D0 POP DE Restore DE from the stack.
92D1 LD E,D
92D2 LD D,$00
92D4 ADD HL,DE
92D5 POP DE
92D6 EX DE,HL
92D7 LD B,$08 Set a counter of 08.
Yin_Yang_Copy_Loop 92D9 LD A,(HL) Copy a byte from HL to DE.
92DA LD (DE),A
92DB INC HL Increase HL by one.
92DC EX DE,HL Call ScreenPos1PixelBelow.
92DD CALL ScreenPos1PixelBelow
92E0 EX DE,HL
92E1 DJNZ Yin_Yang_Copy_Loop Decrease counter by one and loop back to Yin_Yang_Copy_Loop until counter is zero.
92E3 RET Return.
Prev: 923A Up: Map Next: 92E4