Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!seismo!hao!hplabs!sri-unix!jim@rand-unix From: jim@rand-unix@sri-unix.UUCP Newsgroups: net.micro.pc Subject: Cursor Positioning from Lattice C Message-ID: <4846@sri-arpa.UUCP> Date: Fri, 2-Sep-83 13:10:00 EDT Article-I.D.: sri-arpa.4846 Posted: Fri Sep 2 13:10:00 1983 Date-Received: Mon, 5-Sep-83 22:20:25 EDT Lines: 39 Here's a more explicit answer to the question of how to position the cursor on a PC (assuming you don't have DOS 2.00, which has been covered already). You need to assemble a routine like this, then link it with your program. I use Lattice C; if you don't, check your manual for the subroutine linkage conventions. ; curpos: move the cursor to specified location (depends on mode) ; J. J. Gillogly ; PGROUP GROUP PROG PROG SEGMENT BYTE PUBLIC 'PROG' PUBLIC CURPOS ASSUME CS:PGROUP ; ; name curpos -- set cursor location ; ; synopsis curpos(x, y) ; int x,y; x and y coordinates of destination ; ; description use video interrupt to go to (x,y) on screen ; CURPOS PROC NEAR PUSH BP ; LATTICE return conventions ; MOV AH,2 ; BIOS FUNCTION: SET CURSOR POSITION MOV BH,0 ; DISPLAY PAGE, 0 FOR GRAPHICS MODE MOV BP,SP ; LOOK FOR ARGS MOV DL,[BP+4] ; FIRST ARG INTO DL, NEW ROW (Y) MOV DH,[BP+6] ; 2ND ARG INTO DH, NEW COLUMN (X) INT INT 10H ; EXECUTE THE VIDEO INTERRUPT ; POP BP ; RESTORE LATTICE INFO RET CURPOS ENDP ; PROG ENDS END [CURPOS.ASM has been added to the Info-IBMPC library. -Ed.]