jhg@npoiv.UUCP (J Gryck) (08/24/83)
Does anyone know how to position the cursor on an IBM PC using the C language. Any help would be greatly appreciated. Thanks. Jan Gryck npoiv!jhg AT&T Information Systems Neptune, N. J.
jcw@cvl.UUCP (Jay C. Weber) (08/25/83)
The C language does not have any i/o features built into the language; i/o is totally handled by the library routines. I have seen at least one compiler advertized that comes with screen manipulation routines, but I know that many don't. I depends on your C compiler. However, if you are using DOS 2.0 and include the loading of the ANSI screen device driver in your CONFIG.SYS file, simple "prints" (printf, puts, etc.) to the console can be used to position the cursor. See section 13 of the DOS 2.0 manual. If you need to write a library routine from scratch, it will need to perform INT 10 (video i/o in BIOS) with ah=3 to read the current cursor position and then with ah=2 to set it to the new position. See pg A-43 in technical reference manual for more. -Jay Weber {..!seismo!rlgvax!cvl!jcw}
jph@whuxlb.UUCP (08/27/83)
#R:npoiv:-327800:whuxlb:6400012:000:198 whuxlb!jph Aug 27 09:24:00 1983 The easiest thing is just write some interface routines in assembly language for C. If you cann't do this, then load the ANSI package that comes with DOS 2.0 and use the appropriate output strings.