      ORG 0E108H
      LOAD 8008H
ORGX: EQU 0FB9AH
ORGY: EQU 0FB9CH
AUXREG:EQU 20H
ZPOUT: EQU 9FH
ZPNTXY:EQU 0C7H
;
;
GDUMP: IN A,(AUXREG)
       AND 1CH
       CP 10H
       RET NZ
;
;
       LD HL,(ORGX)
       PUSH HL
       LD HL,(ORGY)
       PUSH HL
;
;
       LD HL,191
       LD (ORGY),HL
       LD HL,0
       LD (ORGX),HL
;
;
       PUSH HL
       POP IX
       PUSH HL
       POP IY
;
;
GDMP0: PUSH IX
       LD B,8
       LD HL,PARAMS
GDMP1: LD A,(HL)
       RST 8
       DB ZPOUT
       INC HL
       DJNZ GDMP1
;
;
GDMP4: PUSH IY
       LD C,1
;
;
GDMP2: PUSH BC
       RST 8
       DB ZPNTXY
       POP BC
       JR Z,GDMP3
       SCF
;
;
GDMP3: RL C
       DEC IY
       JR NC,GDMP2
;
;
       LD A,C
       RST 8
       DB ZPOUT
       POP IY
       INC IX
       PUSH IX
       POP AF
       OR A
       JR Z,GDMP4
       POP IX
       LD BC,0FFF8H
       ADD IY,BC
       LD A,0AH
       RST 8
       DB ZPOUT
       PUSH IY
       POP HL
       LD BC,191
       ADD HL,BC
       JR C,GDMP0
       LD A,1BH
       RST 8
       DB ZPOUT
       LD A,'@'
       RST 8
       DB ZPOUT
;
;
       POP HL
       LD (ORGY),HL
       POP HL
       LD (ORGX),HL
       RET
PARAMS:DB 0DH,1BH,41H,08H;
       DB 1BH,4BH,0,1
END

       LD (ORGY),HL
       POP HL
       LD (ORGX),HL
       RET
PARA