* Support specifying the serial port I/O address explicitly.
* Make DOS installer hopefully behave more nicely when used on
recent Windows versions.
+ * Fix returning to text mode when a font has been specified.
Changes in 1.63:
* Make the ppmtolss16 program handle color conversion more
; use_font:
; This routine activates whatever font happens to be in the
; vgafontbuf, and updates the adjust_screen data.
+; Must be called with CS = DS = ES
;
use_font:
test [UserFont], byte 1 ; Are we using a user-specified font?
;
; vgasetmode:
; Enable VGA graphics, if possible; return ZF=1 on success
-; DS must be set to the base segment.
+; DS must be set to the base segment; ES is set to DS.
;
vgasetmode:
push ds
;
; vgaclearmode:
-; Disable VGA graphics. It is not safe to assume any value for DS.
+; Disable VGA graphics. It is not safe to assume any value
+; for DS or ES.
;
vgaclearmode:
push ds
- push cs
- pop ds ; DS <- CS
+ push es
pushad
+ mov ax,cs
+ mov ds,ax
+ mov es,ax
cmp [UsingVGA], byte 1
jne .done
mov ax,0003h ; Return to normal video mode
mov byte [ScrollAttribute], 07h
.done:
popad
+ pop es
pop ds
ret
; use_font:
; This routine activates whatever font happens to be in the
; vgafontbuf, and updates the adjust_screen data.
+; Must be called with CS = DS = ES
;
use_font:
test [UserFont], byte 1 ; Are we using a user-specified font?
;
; vgasetmode:
; Enable VGA graphics, if possible; return ZF=1 on success
-; DS must be set to the base segment.
+; DS must be set to the base segment; ES is set to DS.
;
vgasetmode:
push ds
;
; vgaclearmode:
-; Disable VGA graphics. It is not safe to assume any value for DS.
+; Disable VGA graphics. It is not safe to assume any value
+; for DS or ES.
;
vgaclearmode:
push ds
- push cs
- pop ds ; DS <- CS
+ push es
pushad
+ mov ax,cs
+ mov ds,ax
+ mov es,ax
cmp [UsingVGA], byte 1
jne .done
mov ax,0003h ; Return to normal video mode
mov byte [ScrollAttribute], 07h
.done:
popad
+ pop es
pop ds
ret
; use_font:
; This routine activates whatever font happens to be in the
; vgafontbuf, and updates the adjust_screen data.
+; Must be called with CS = DS = ES
;
use_font:
test [UserFont], byte 1 ; Are we using a user-specified font?
;
; vgasetmode:
; Enable VGA graphics, if possible; return ZF=1 on success
-; DS must be set to the base segment.
+; DS must be set to the base segment; ES is set to DS.
;
vgasetmode:
push ds
;
; vgaclearmode:
-; Disable VGA graphics. It is not safe to assume any value for DS.
+; Disable VGA graphics. It is not safe to assume any value
+; for DS or ES.
;
vgaclearmode:
push ds
- push cs
- pop ds ; DS <- CS
+ push es
+ pushad
+ mov ax,cs
+ mov ds,ax
+ mov es,ax
cmp [UsingVGA], byte 1
jne .done
- pushad
mov ax,0003h ; Return to normal video mode
int 10h
; mov dx,TextColorReg ; Restore color registers
call use_font ; Restore text font/data
mov byte [ScrollAttribute], 07h
- popad
.done:
-
+ popad
+ pop es
pop ds
ret