Day 12




Setting Up Graphics


	Today, we will setup graphics and draw a pixel!

BIOS Screen Services

INT 10h is the BIOS Screen or Video Services.

Setting the Graphics mode

Will will use mode 13h, it is a paletted 320x240 sized 256 color mode. Here's the code to set it up: mov al,13h ; the mode mov ah,0 ; function number 0 int 10h ; call BIOS Screen Service

Drawing a Pixel

BIOS Screen Service Function Number 0ch is draw a pixel, it expects the color number in AL, X in CX,and Y in DX. The code: (Red pixel at 50,100): mov ah,0ch mov al,4 ; 4 is red with default palette mov cx,50 ; x = 50 mov dx,100 ; y = 100 int 10h ; call BIOS Service

This Day In Review

Simple, isn't it! With what you currently know, you can write a program to display all 256 colors. Have fun!, - GbaGuy
Intro - Day 13

Patater GBAGuy Mirror
Contact