rich@uofm-cv.UUCP (Richard M. Jungclas) (06/26/84)
Can anyone tell me first if it is possible to get alphanumeric characters onto a "standard" IBM PC graphics MODE display, and how to do it if it is possible! Please note that I'm not talking about using characters in the alphanumeric mode on the color/graphics display, but that I want alphanumeric characters in a graphics mode display (specifically 320x200). I'm guessing that there is some way to do this, but haven't had any luck with my attempts.
gary@mit-eddie.UUCP (Gary Samad) (06/30/84)
<> If you simply use the BIOS calls (or high level language output routines) characters will appear on the graphics screen. At the lowest level they are actually coppied from a bit map that matches the bit map ROM for alpha mode. This bit map is somewhere in the ROM BIOS (look in the Tech Ref) and consists of the Characters from 01 to 7F. IBm graciously claims that you may provide your own bit map of the second half of the character set if you wish. G~
geller@rlgvax.UUCP (David Geller) (07/03/84)
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 <dos.h> 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