Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!



AX-BXAX-BX Member Posts: 2
Hello ,
I am tring to write an 8086 program that display a bmp image and then do some manipulation like rotating ,encrypting and dycrepting. The problem is I don't know how or where to start. I tried to find some tutorials but no use. Please if anyone can help with small portion of code just how to display the image or at least a good refrence . The rest of stuff are easy I already have a random number generator and other necessary procs.
Thanx in advance


  • ASHLEY4ASHLEY4 Member Posts: 254
    First things first, what os are you programming on ?, what size bmp do you what to display ?.
    For instance it is easy to display 24bpp , than say 8bpp .

    Say you want to display a 640x480 24 bpp , than the size of the bmp should be 640x480 x 3 = 921,600 byte's + 54 byte = 921,654 .
    Lets break it down,
    640x480 this is the number of pixels in the bmp.
    x 3 this is because 24bit per pixel, so we need 3 bytes for each pixel.
    + 54 this is because there is a 54 byte header at the beginning of the bmp.

    The header has info about the bmp file, for a full discretion go here:

    The second thing to remember is that 24 bit bmp are read into memory from bottom up.
    So by starting at the bottom left hand corner reading 3x640 byte's into memory and moving up a row starting at the left hand side and again reading 3x640 byte in memory, when you have done it 480 times your bmp in memory.

    I have some code, but it is for vesa and a os i am making, so will not work in windows etc.

  • AX-BXAX-BX Member Posts: 2
    Now I am able to open a file (image) then read it , i think i am at least the assembler is not giving any errors. The problem is how can i display it . I don't even what is the function I should use. I hope that i can find some procedure to do that.
    thanx again
Sign In or Register to comment.