TITLE "VLAT - Vlib 4.1" NAME ('VLAT') ;================================================================ ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;---------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from VLAT.Z80 Ver 1.1 by Richard Conn ; Date : 12 Jan 89 ; Version : 1.2 ; Module : VLAT ; Abstract: This module contains the routine AT which positions ; the cursor to a specified location on the current CON: ; device. It also contains the routine @GOXY which is a ; section of common code used by another module. ; Usage: ; CALL AT ; DB ROW,COL ;location ; ... ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC AT, @GOXY ; ..from VLIB Get.. EXT GOTOXY .Z80 CSEG ;================================================================ ; AT - Position cursor to location specified by addr on stack ; Entry: (STACK) - contains the ROW and COL values to set cursor ; Exit : - Nothing returned, execution resumed at byte following ; the row,col bytes. ; Uses : - None ; Special Requirements: None ;================================================================ AT: EX (SP),HL ; Pt to address CALL @GOXY ; ..and do the actual positioning EX (SP),HL ; Restore stack ptr RET ;================================================================ ; @GOXY - Position Cursor to XY coords whose addr is in HL ; Entry: HL = Addr of Row,Col byte sequence ; Exit : HL = Addr of byte after Row,Col sequence (Entry HL + 2) ; Uses : HL ; Special Requirements: None ;================================================================ @GOXY: PUSH DE ; Save DE LD D,(HL) ; Get row INC HL LD E,(HL) INC HL ; HL pts to return byte EX DE,HL ; DE --> Return Byte, HL = Screen Loc'n PUSH AF ; Preserve AF as well CALL GOTOXY ; Position cursor POP AF ; Restore regs EX DE,HL ; HL pts to return byte POP DE ; Restore registers RET END