1) AH=00H - Set video mode
Description : This functions clears the screen and changes the video mode to the one that stored in AL
Example :
MOV AH, 00H MOV AL, 01H ;01H : 40x25 Text, 8 Pages, 16 Colors ;03H : 80x25 Text, 8 Pages, 16 Colors (The default mode) ;13H : 320x200 Graphics , 1 Page, 256 Colors INT 10H
2) AH=01H - Cursor appearance
Description : Set the cursor size by setting its starting and ending lines
Example :
MOV AH, 01H MOV CH, ;Start line (from 0 to 7) use ADD CH, 20h to hide the cursor MOV CL, ;End line INT 10H
3) AH=02H - Set cursor position
Description : Change the cursor position to a specific position. Works only with text mode, Set BH=00h for graphics mode
Example :
MOV AH, 02H MOV BH, ;The current display page MOV DH, ;ROW. 00H is the topmost MOV DL, ;COLUMN. 00H is the leftmost INT 10H
Note : The video hardware sets a custom cursor for each display page, and the cursor will move if the current BH value = the current display page.
If you set DH or DL to a value out of the screen, the cursor will disappear.
4) AH=0CH - Write pixels
Description : This function used to write a specified color to a specified pixel. You can use a loop to draw any desired shape
Example :
MOV AH, 0DH MOV BH, ;Display page MOV DX, ;Row MOV CX, ;Column MOV AL, ;Color code in binary INT 10H
5) AH=0DH - Read pixels
Description : Returns the color of a specified pixel, valid for all graphic modes
Example :
MOV AH, 0DH MOV BH, ;Display page MOV DX, ;Row MOV CX, ;Column INT 10H ;AL = Color code
TO BE CONTINUED
No comments:
Post a Comment