ô OS call routine constants OSWRCH=&40EE OSWORD=&40F1 (: 2Þ GetOrigin 90 <ã pass%=0 ¸ 1 FP%=GetOrigin P[ ZOPT pass%*2 d; !n; Check there are 2 arguments xLD A,(IX+0) : CP 2 : RET NZ ‚; "Œ; Check they are both integers –LD A,(IX+1) : CP 4 : RET NZ  LD A,(IX+4) : CP 4 : RET NZ ª; -´; ì to the origin by invoking ï 25,5,0;0; ¾LD A,25 : Ö OSWRCH ÈLD A,5 : Ö OSWRCH 'Ò; Output 4 zeroes to move to (0,0). ÜLD B,4 "æ.lp XOR A : Ö OSWRCH : DJNZ lp ð; 9ú; Invoke OSWORD &0D to read last two cursor positions LD HL,PrevX LD A,&0D : Ö OSWORD ; 2"; Now we know the origin we need to output it. ,LD L,(IX+2) : LD H,(IX+3) !6LD DE,(CurrX) : Ö OutputCoord @LD L,(IX+5) : LD H,(IX+6) !JLD DE,(CurrY) : Ö OutputCoord TRET ^; -h; 8 bytes of storage for cursor positions !r.PrevX : ÝW 0 : .PrevY : ÝW 0 !|.CurrX : ÝW 0 : .CurrY : ÝW 0 †; 6; Outputs 16-bit value DE to 32-bit variable at HL š.OutputCoord ¤LD (HL),E : INC HL ®LD (HL),D : INC HL ¸SLA D ÂSBC A,A ÌLD (HL),A : INC HL ÖLD (HL),A : RET à] êí pass% ÿÿ