Well I was just playin around a bit with the Video Modes and suddenly noticed that the program didnt quit Mode13h, as soon as the program drew a couple of pixels. Can anybody tell me why?
Heres the source code:
Heres the source code:
.MODEL SMALL
.DATA
Count dw 10
.STACK 128
.CODE
VGA: mov ah,0
mov al,19
int 10h ;Interrupt 10h - Mode 13h
mov cx,23
mov dx,23
Pixel: mov ah,0Ch
mov al,9
int 10h ;Pixel Plotting
inc cx ;change x-coordinate
inc dx ;change y-coordinate
dec count
cmp count,0
je Delay
jne Pixel
;Hold: xor ah,ah ;waits for keyboard input, wrote this so i had time to
; mov ah,1 ;look at the pixels
; int 21
Delay: mov cx,5
loop Delay
Exit: xor ah,ah
mov ah,4Ch
int 21
END VGA
It doesnt just change itself back to mode 3. You have to actually do it.
My memories of DOS are intentionally getting dim but Chimpface is right, the video mode will stay at what you set until it is changed back again by either yours or another program.
Just another int10h call.
Regards,
hutch@movsd.com
Just another int10h call.
Regards,
hutch@movsd.com