Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP Path: utzoo!linus!vaxine!wjh12!harvard!seismo!rlgvax!geller From: geller@rlgvax.UUCP (David Geller) Newsgroups: net.micro.pc Subject: Re: Alphanumeric character in graphics mode display Message-ID: <2068@rlgvax.UUCP> Date: Tue, 3-Jul-84 14:06:23 EDT Article-I.D.: rlgvax.2068 Posted: Tue Jul 3 14:06:23 1984 Date-Received: Tue, 10-Jul-84 04:37:14 EDT References: <569@uofm-cv.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 57 IBM ROM-BIOS interupt 10H will do this for you very nicely and very easily. In Lattice "C": /* set up CRT controller for graphics mode 320x200 color */ #include union REGS inregs,outregs; /* 8088 registers - from dos.h */ set_mode_320C() { inregs.h.ah = 0; /* INT 10H function 0 - set mode */ inregs.h.al = 4; /* set mode to 320x200 color */ int86 (0x10,&inregs,&outregs); /* lattice interupt function */ } put_c(c,x,y) /* put character at position x,y */ char *c; int x,y; /* normal screen size - <80|40, etc. */ { /* move cursor to x,y */ inregs.h.ah = 2; /* set cursor position */ inregs.h.dl = (char) x; /* pass column */ inregs.h.dh = (char) y; /* pass row */ inregs.h.bh = 0; /* page zero */ int86 (0x10,&inregs,&outregs); /* write character */ inregs.h.ah = 10; /* write char */ inregs.h.cx = 1; /* write only 1 character - no repeat */ inregs.h.al = c; /* assign passed character to al */ int86(0x10,&inregs,&outregs); } I hope that this example hasn't been too nebulous. I did it this way to illustrate what needs to go where without showing 8088 code. I suspect that after setting the mode any printf or cprintf will do what you want. Also - I recommed using the ANSI.SYS driver included with MS/PC/TELE-DOS, etc. I'll post a "C" interface to ANSI.SYS real soon. PLEASE KEEP IN MIND that these functions are dependent UPON IBM's ROM-BIOS. Hopefully most of the compatible systems have the same hooks! Refer to page A-48 in the DOS TECHNICAL REFERENCE MANUAL for more information concerning this topic. Also note that in graphics mode (any of them) only the first 127 characters of the IBM PC character set may be displayed. Another 127 may be defined, though (yes - the graphic symbols can't be displayed out of character modes - who knows why?). See the DOS manual for information regarding the ANSI.SYS driver. David P. Geller Computer Consoles, Inc. {seismo}!rlgvax!geller Office Systems Group 11490 Commerce Park Drive Reston, VA 22091