Prev: 37434 Up: Map Next: 37604
37461: 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
264 1 8
1032 4 8
6664 26 8
7432 29 8
Yin_Yang_Copy 37461 PUSH DE Stash yin-yang UDG and screen coordinates on the stack.
37462 PUSH HL
37463 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
37466 POP HL Restore yin-yang UDG and screen coordinates from the stack.
37467 POP DE
37468 PUSH HL Keep a reference to HL on the stack as we'll need to refer to it again later.
37469 INC H Increase the LSB of HL by one.
37470 LD BC,8 Add 0008 to DE and stash it on the stack.
37473 EX DE,HL
37474 ADD HL,BC
37475 EX DE,HL
37476 PUSH DE
37477 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
37480 POP DE
37481 POP HL
37482 PUSH HL
37483 LD A,L
37484 ADD A,8
37486 LD L,A
37487 LD BC,8 Add 0008 to DE and stash it on the stack.
37490 EX DE,HL
37491 ADD HL,BC
37492 EX DE,HL
37493 PUSH DE
37494 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
37497 POP DE
37498 POP HL
37499 INC H
37500 LD A,L
37501 ADD A,8
37503 LD L,A
37504 LD BC,8 Add 0008 to DE.
37507 EX DE,HL
37508 ADD HL,BC
37509 EX DE,HL
37510 CALL Yin_Yang_Copy_Line Call Yin_Yang_Copy_Line.
37513 RET Return.
Full yin-yang UDG.
Yin_Yang_UDG_Full 37514 DEFB 7,24,32,70,70,128,128,128 full-yin-yang
37522 DEFB 240,60,30,30,31,31,63,127
37530 DEFB 129,131,135,71,71,35,27,7
37538 DEFB 255,255,207,206,254,252,248,224
Half yin-yang UDG.
Yin_Yang_UDG_Half 37546 DEFB 7,24,32,70,70,128,128,128 half-yin-yang
37554 DEFB 192,32,16,16,16,16,32,192
37562 DEFB 129,130,132,68,68,34,26,7
37570 DEFB 0,0,0,0,0,0,0,128
fff
Yin_Yang_Copy_Line 37578 PUSH DE Stash DE and HL on the stack.
37579 PUSH HL
37580 LD A,L
37581 CALL Screen_Calc Call Screen_Calc.
37584 POP DE Restore DE from the stack.
37585 LD E,D
37586 LD D,0
37588 ADD HL,DE
37589 POP DE
37590 EX DE,HL
37591 LD B,8 Set a counter of 8.
Yin_Yang_Copy_Loop 37593 LD A,(HL) Copy a byte from HL to DE.
37594 LD (DE),A
37595 INC HL Increase HL by one.
37596 EX DE,HL Call 37417.
37597 CALL 37417
37600 EX DE,HL
37601 DJNZ Yin_Yang_Copy_Loop Decrease counter by one and loop back to Yin_Yang_Copy_Loop until counter is zero.
37603 RET Return.
Prev: 37434 Up: Map Next: 37604