I tried the following code to plot a pixel on the screen using asm but it shows me that shi*ty blue screen, and just terminates:
PHP Code:#include <iostream.h>
int main()
{
__asm{
mov ax,13h ;mode = 13h
int 10h ;call bios service
mov ah,0Ch ;function 0Ch
mov al,4 ;color 4 - red
mov cx,160 ;x position = 160
mov dx,100 ;y position = 100
int 10h ;call BIOS service
xor ax,ax ;function 00h - get a key
int 16h ;call BIOS service
mov ax,3 ;mode = 3
int 10h ;call BIOS service
mov ax,4C00h ;exit to DOS
int 21h
}
return 0;
}




Reply With Quote