| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Xms |
Hello Phil,
Phil Quinton wrote to All :
PQ> I get the Driver Location by
PQ> Mov Ax, 4310h Int 21h
PQ> Which returns Es:Bx => 5 bytes jump code to driver. so I
PQ> Mov [Driver], Bx
PQ> Mov [Driver+2], Es
PQ> And call XMS Functions with
PQ> Call [Driver]
PQ> and it hangs my machine even when I use Ah=00h to get version number.
PQ> I know HIMEM.SYS is there, and I get the address but it screws up
PQ> constantly.
PQ> Advice?
Maybe?, you have put *driver* in the .data-field, so, the *call* *driver*
jumps to the wrong place because it expects that *driver* is in the
.code-field????
Below an extract of mine XMSBOX.ASM routine that I use.
/* (XMSBOX.ASM)
.model small
.data
PUBLIC emm_aantal_l
PUBLIC emm_aantal_h
PUBLIC emm_S_handle
PUBLIC emm_S_offset
PUBLIC emm_S_segment
PUBLIC emm_D_handle
PUBLIC emm_D_offset
PUBLIC emm_d_segment
emm_aantal_l dw 0000h
emm_aantal_h dw 0000h
emm_S_handle dw 0000h
emm_S_offset dw 0000h
emm_S_segment dw 0000h
emm_D_handle dw 0000h
emm_D_offset dw 0000h
emm_d_segment dw 0000h
.code
PUBLIC Chk_Xms
PUBLIC Open_Xms
PUBLIC CLOSE_XMS
PUBLIC MOVE_XMS
PUBLIC XMS_DRV
XMS LABEL DWORD
XMS_ofs dw 0
XMS_seg dw 0
Chk_Xms proc
PUSH bx
PUSH es
mov ax,4310h
int 2fh
mov xms_ofs,bx ; Onthouden van XMS-driver-addres ...
mov xms_seg,es
POP es
POP bx
ret
Chk_Xms endp
XMS_DRV proc
call xms ; XMS-driver aanroepen ...
ret
XMS_DRV endp
Open_Xms proc
push ax
push bx
mov di,0 ; geen fout
mov ah,9h
call xms
cmp ax,0
jne Ook
call OCfout
Ook:
pop bx
pop ax
ret
Open_Xms endp
Close_xms proc
push ax
push bx
mov di,0
mov ah,0ah
call xms
cmp ax,0
jne cok
call OCfout
cok:
pop bx
pop ax
ret
Close_xms endp
MOVE_XMS proc
push ax
push bx
mov di,0
mov si,offset emm_aantal_l
mov ah,0bh
call xms
cmp ax,0
jne mok
call OCfout
mok:
pop bx
pop ax
ret
move_XMS endp
OCfout proc
xor bh,bh ; BX = BL
mov di,bx ; Zet fout-code in DI ....
ret
OCfout endp
end
*/
PQ> -=> Phil <=-
Bye. - Jan Wagemakers -
o_o COITUS INTERRUPTUS : a mission impossible (Fad
Gadget)
--- Terminate 5.00/Pro (*Linux-DosEmu-OpenDOS*)
(2:292/8133.23)
---------------
* Origin: - Belgi‰/Belgium - Internet : JanW@mail.dma.be |
|
| SOURCE: echomail via exec-pc | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.