Reputation: 1180
I wrote a program with assembly language in DOS and after running it the font of DOS gets more larger, any idea how to solve this?
Upvotes: 1
Views: 1212
Reputation: 25318
If you're using int 10h
service to change the screen mode (function AH=00h
), you should save the old mode at the start of your program and restore it before exiting. You can query the current mode with int 10h AH=0Fh
(mode is returned in AL
).
Here's a random example from Google:
;; read current video mode and save
mov ah,0fh
int 10h
mov vmode,al
mov vpage,bh
;; set video mode
mov ah,0
mov al,VIDMOD
int 10h
[....]
;; restore old video mode
mov bh,vpage
mov al,vmode
mov ah,0
int 10h
mov ax, 4c00h ;exit
int 21h
Upvotes: 4