Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

displaying a bitmap

displaying a bitmap

displaying a bitmap

anyone know of a good example or information on displaying a bitmap (under dos) in assembly?

RE: displaying a bitmap

Hello, if you want to display a bitmap, you need to know
the file format, go to an search engine and search for
"file formats bmp".
You must read the header, then load the bitmap of that file.
The bitmap is flipped, you must turn it.
If it is a 320x200 you can load it to address A000h:0000h
directly, but note that the image is flipped:)
Please note that my example is for bitmaps not compressed.
There are bitmaps compressed in RLE for example.
You need to know how to decompresse it:)
The first time is more difficult, but then it is very simple:)
Keep coding in assembly:)

RE: displaying a bitmap

Bitmaps come in many shapes and sizes.  The version that Microsoft invented for Windows a LONG time ago (and which is still used today, they are the .BMP files) is totally different from the way bitmaps are actually done by the video system (so now you know why Windows is so %!@$^@ slow).

Basically, the Windows Bitmap file is in a Packed Display format (unlike the old Video Systems which were Planar Display) and they are from left to right, down to up (unlike the video systems which are still left to right, up to down).  Of course, the Windows Bitmap file can have from 4 to 16777216 colors, so there's also that problem of putting such a large potential number of colors to a display which probably has 16, 256, 65536, or 16777216.

'course now video systems use the Packed Display format instead of Planar, but still you need to do color matching in case your display has more or less colors than the bitmap file indicates.  AND rearrange the data to the proper up-to-down orientation.

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close