Re: VGA (mode 18) Questions
- Posted by "Cuny, David" <ATB.DCUNY at HW1.CAHWNET.GOV> Mar 18, 1997
- 1033 views
Thanks for the code, Mike. But I can't seem to get it to work in graphic mode 18. It works fine if I set it to mode 1 and used #B8000, the start of color VGA memory. -- CODE STARTS HERE include graphics.e procedure text_write(integer bk_colour, integer fore_colour, integer char,integer pos) -- pos is (screen_width * y + x) * 2 -- this is assuming 0,0 is the top left corner, not 1,1 poke(#A8000 + pos,{char, 16 * bk_colour + fore_colour}) end procedure integer result result = graphics_mode( 18 ) text_write( RED, GREEN, 'A', 0 ) -- CODE ENDS HERE btw, There is one error (at least) in my example code I posted. Where I had written: inReg[REG_BX] = bColor -- video page/color and inReg[REG_BX] = fColor -- video page/color I should have put: inReg[REG_BX] = #F0 + bColor -- video page/color and inReg[REG_BX] = #F0 + fColor -- video page/color One of those high bits (I forget which, so I set them all) tells the BIOS to OR the pixels. Sorry. Thanks. -- David Cuny