;---------------------------------------------------------------------------- ; ; A sample replacement for the cursor positioning routine in Z8E. ; (Must be less than 129 bytes long.) ; ; Use this routine instead of the one at xycp: if you have an ANSI ; terminal. Since I do not have an ANSI terminal I have not tested ; this code but it is rather simple and should work without too many ; modifications. ; ; Jon Saxton - 27 May 87 ; ; Tested and corrected 29 Dec 88 - Jon Saxton ; ;---------------------------------------------------------------------------- xycp: push de push hl inc b ;Add 1 to row and column inc c push bc ld a,1Bh ;Send ESC call ttyo ld a,'[' ;Send [ call ttyo pop bc ;Send row (Y) coordinate push bc ld a,b call xycp00 ld a,';' ;Send ; call ttyo pop bc ;Send column (X) coordinate push bc ld a,c call xycp00 ld a,'H' ;Send H call ttyo pop bc pop hl pop de ret xycp00: ex af,af' xor a ex af,af' xycp10: ex af,af' inc a ex af,af' sub 10 jr nc,xycp10 ex af,af' dec a jr z,xycp20 add a,'0' call ttyo xycp20: ex af,af' add a,'0'+10 call ttyo ret