> Can you explain me how we manipulate graphics (displaying a bmp image on the screen, moving it around) in the assembly c

Can you explain me how we manipulate graphics (displaying a bmp image on the screen, moving it around) in the assembly c

Posted at: 2014-12-18 
It would be nice if I could get a code sample with explanation for each line of code

Writing all the assembly code with explanations on how to move an image around the screen is a daunting task. Plus you have failed to mention the processor, the graphics display, memory allocation, etc to even begin to create the code necessary. Personally, it sounds more like I would be doing your entire school programming project for you.

The simplest explanation is that you have memory allocated for the screen in question. You must read the BMP file to determine the number of bits of color then read the file table to determine the reference color for each pixel represented.

You must put the appropriate color pixel in the appropriate memory location as well as restoring the appropriate background pixel to the previous BMP image pixel location. Once completed, you load the image onto the screen.

There are other methods by which you draw a completely new image in a separate page of video memory and once complete, you simply change which video memory page is displayed to the screen.

There are single pixel manipulation routines, image restoration routines, image on image routines, and much more to improve the image display response time.

To get you started, I linked wikipedia information on BMP file format. Good luck.

It would be nice if I could get a code sample with explanation for each line of code