Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TSwitch

Printing Text directly to VGA?

This topic is 5875 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yeah this isn''t 1987 anymore (bah i was only 4 at the time ) but i''ve stfi until my brains are melted and i cant find where id go about printing ascii text directly to video memory under mode 3 (80x25, the startup mode) I know what i''m trying to do is possible- i was able to do it once, but i''ve since lost that code, so if anyone knows off the top of their head where i can find something on this topic, i''d be grateful.

Share this post


Link to post
Share on other sites
Advertisement
You could use the BIOS functions to print text (they work in most modes), or you could write directly to the screen, located at B800:0000. There you''ll find an array going from top-left to bottom-right of character records. Each record is two bytes. The first byte is the ascii character to appear there, the second byte is color information. IIRC the lowest 4 bits of the color byte are for foreground (16 colors), the next 3 are for background (8 colors) and the last bit controls blink.

Share this post


Link to post
Share on other sites
Thanks a pile, Michalson. I was primarily looking for the offset, I knew (or could figure out) how the colors were situated.

-TSwitch

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!