Update the XTEMM and XTUMBS drivers to map their ranges.
This commit is contained in:
parent
04d03f4571
commit
04af8dd21a
@ -3027,18 +3027,25 @@ instmsg PROC NEAR
|
||||
RET
|
||||
instmsg ENDP
|
||||
;--------------------------------------------------------------------
|
||||
; Check EMS i/o port.
|
||||
; Initialize EMS window and check EMS i/o port.
|
||||
; output
|
||||
; for lo-tech EMS board, we cannot read from the page registers
|
||||
; hence we just return OK anyway.
|
||||
; cf = 0 : OK
|
||||
; cf = 1 : NG
|
||||
;--------------------------------------------------------------------
|
||||
ckemsio PROC NEAR
|
||||
MOV DX,CS:EMSIO
|
||||
; JJP IN AL,DX
|
||||
; JJP CMP AL,255 ;check TRS flag
|
||||
; JJP JE ckems3
|
||||
ADD DX,10 ; EMS segment register
|
||||
MOV AX,CS:PAGE_FRAME_SEG
|
||||
OUT DX,AX
|
||||
ADD DX,3 ; debug base register
|
||||
OUT DX,AX
|
||||
DEC DX ; EMS pages count register
|
||||
MOV AL,PHYS_PAGES
|
||||
OUT DX,AL
|
||||
ADD DX,3 ; debug register
|
||||
IN AL,DX
|
||||
CMP AL,2 ; Region::EmsWindow
|
||||
JNE ckems3
|
||||
ckems4:
|
||||
CLC ;reset CF
|
||||
RET
|
||||
@ -3520,9 +3527,9 @@ info:
|
||||
; EMM driver initial routine work data area
|
||||
;--------------------------------------------------------------------
|
||||
start_msg db CR,LF
|
||||
DB 'XTEMM: EMM Driver for XTMax r02',CR,LF
|
||||
DB 'XTEMM: EMM Driver for XTMax r03',CR,LF
|
||||
db ' Based on Lo-tech EMM Driver for the Lo-tech 2MB EMS board.',CR,LF
|
||||
db ' Based on modifications by Michael Karcher.',CR,LF
|
||||
db ' Based on modifications by Michael Karcher.',CR,LF
|
||||
db ' Based on original works Copyright (c) 1988, Alex Tsourikov.',CR,LF
|
||||
db ' All rights reserved.',CR,LF
|
||||
db 'Using EMS '
|
||||
|
||||
@ -29,7 +29,6 @@ Syntax: DEVICE=LTEMM.EXE [/switches]
|
||||
/i:nnn - EMS i/o port base address (260)
|
||||
/h:nnn - Maximal number of handles (64)
|
||||
/d:nn - Depth of contest saves (5)
|
||||
/f:nnn - First page number (0)
|
||||
/n - Bypass memory test
|
||||
/x - Perform long memory test
|
||||
/3 - Use only EMS 3.2 functions
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
; Krister Nordvall
|
||||
;
|
||||
|
||||
[cpu 8086]
|
||||
|
||||
;--------------------------------------------------------------------
|
||||
; Skips the immediately following 2 byte instruction by using it
|
||||
@ -295,7 +296,7 @@ Install:
|
||||
.SearchForWhiteSpace:
|
||||
lodsb
|
||||
cmp al, CR
|
||||
je SHORT .EndOfLineEncountered
|
||||
je .EndOfLineEncountered
|
||||
cmp al, SPACE
|
||||
je SHORT .SearchForParameter
|
||||
cmp al, TAB
|
||||
@ -338,6 +339,27 @@ Install:
|
||||
jc SHORT .FirstWordOfParameter
|
||||
sub dx, [cs:bx-2] ; Convert end of range to length
|
||||
jbe SHORT .ParameterError ; End of range below or equal to start of range
|
||||
|
||||
; Program the range
|
||||
push ax
|
||||
push bx
|
||||
push cx
|
||||
mov ax, [cs:bx-2]
|
||||
mov bx, dx
|
||||
mov dx, 26dh ; UMB base register
|
||||
out dx, ax
|
||||
mov dx, 26fh ; UMB pages count register
|
||||
mov ax, bx
|
||||
mov cl, 7
|
||||
shr ax, cl ; bytes to 2K pages
|
||||
out dx, al
|
||||
shl ax, cl ; 2K pages (back) to bytes
|
||||
mov dx, ax
|
||||
pop cx
|
||||
pop bx
|
||||
pop ax
|
||||
test dx, dx
|
||||
jz SHORT .ParameterError ; Range was smaller than 2KB
|
||||
.FirstWordOfParameter:
|
||||
mov [cs:bx], dx
|
||||
inc bx
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user