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:

Count dw 10

.STACK 128

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

Posted on 2002-01-18 17:50:24 by PredeX
It doesnt just change itself back to mode 3. You have to actually do it.
Posted on 2002-01-18 18:05:56 by ChimpFace9000
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.


Posted on 2002-01-19 02:56:50 by hutch--