Re: VGA (mode 18) Questions

new topic     » goto parent     » topic index » view thread      » older message » newer message

> QUESTION #1
>  -----------
> I finally figured out a way to write colored text on colored backgrounds in
> mode 18, but if anyone's got a better suggestion, could someone let me know?
> I ended up doing an interrupt, and ORing the text to the screen. The first
> write puts the text down in the background color. This gives a mask of black
> letters against the background (color OR color = 0 = BLACK). Then I write
> the string out again, and the result is the text in the color I want (color
> OR color = color).

i believe you can write text directly to video memory via:

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

obviously you can simplify this


 .  .  o o  O O  Mike Burrell  O  O o o  .  .
. o O http://www.geocities.com/SoHo/9036 O o .
 .  o  o  O  mikpos at gaianet.net  O  o  o  .

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu