Hello, one of my friends has an ASM program that displays a picture for a certain time and then it changes to another picture.

The problem here is that my friend hasn't found pure Assembler code to read a bitmap and display it on the screen, so he has declared his pictures in pure code (DB 1, 1, 1, 1,..., 0)

He asked me to make a VB program to scan a picture and create the ASM code for that picture. So far I scan the picture and I get the colors in this fashion:

DB 12345, 12345, 12345, ..., 12345
DB 12345, 12345, 12345, ..., 12345
DB 12345, 12345, 12345, ..., 12345
DB 12345, 12345, 12345, ..., 12345
DB 12345, 12345, 12345, ..., 12345

My problem is... How can I translate the numbers given to me (Using the getPixel API) to the numbers ASM uses as its colors? (He uses the 256 color mode)

So far I have a Select case with the basic 16 colors, but I would like to be able to have the 256 colors... Could anyone please help me?

Thanks in advance.