Prev: 64794 Up: Map Next: 64927
64859: GOSUB routine
GOSUB_ROUTINE 64859 LD A,(IY+10) A=gosub depth
64862 CP 10 Is it 10?
64864 JR NZ,GOSUB_ROUTINE_0 If not, apply gosub
64866 LD A,0
64868 LD (IY+10),A If so, reset gosub depth to 0
64871 LD (64226),A Reset scale to 0
64874 LD L,3
64876 JP 85 Clear the stack and return
GOSUB_ROUTINE_0 64879 CP 0 Is gosub depth 0?
64881 JR NZ,GOSUB_ROUTINE_1
64883 LD (64222),IX Store pointer to current graphics instruction
GOSUB_ROUTINE_1 64887 INC (IY+10) Increase gosub depth by 1
64890 PUSH IX Store current graphics instruction on stack
64892 LD A,(64226) A=current scale
64895 PUSH AF Store current scale on stack
64896 LD A,(IX+0) A=current graphics instruction
64899 RRCA
64900 RRCA
64901 RRCA Shift 3 bits to the right to put current scale into bottom 3 bits
64902 AND 7 Remove all other bits, leaving just the scale
64904 LD (64226),A Store the new scale
64907 LD L,(IX+1)
64910 LD H,0
64912 ADD HL,HL
64913 LD DE,(64184)
64917 ADD HL,DE
64918 LD E,(HL)
64919 INC HL
64920 LD D,(HL)
64921 PUSH DE
64922 POP IX
64924 JP PROCESS_GRAPHIC_INSTRUCTION Process next drawing instruction
Prev: 64794 Up: Map Next: 64927