Message board for the users of flat assembler.
> DOS > DPMI program under Win32&DOS
Need to code program, works under WIN 9X/NT & DOS
Optimal way - dos DPMI.
1) DosExtender for FASM - may use "dos32"
2) Example of allocation memory under dpmi - allocate 2 MB, read and write something. I already have PM examples from Forum, and mass other.
Sorry for terrible english. My native language is Russian
|01 Mar 2004, 07:15||
Did anybody have experience on DPMI programing? I have read many references, but no one of them does not complete: they only about RAW PM - working on DOS without HIMEM.SYS or EMM386. But i want to code in win32 AND dos - programs that work on ALL platforms. Coding with DosExtender - is best way (i think), but i need some examples of DPMI programing. Best code i get from Internet - from Dieter Pawelczak's PASS32 assembler - with bult-in Extender
3.27 Function 0501h - Allocate Memory Block
Allocates a block of extended memory.
Function call: INT 31h
AX = 0501h
BX:CX = memory size to allocate in bytes
carry flag clear
BX:CX = linear address of allocated memory block (*)
SI:DI = memory handle
carry flag set
AX = error code
(*) You can easily allocate an descriptor for the linear address, see example
mov ax,0 ;Funktion 0
mov cx,1 ;Allocate 1 Descriptor
mov ax,0501h ;Allocate Memory
mov bx,1 ;010000h Bytes of Memory
int 31h ;DPMI CALL
mov AX,0007h ;Function 7:Set Basis Address
mov dx,cx ;Low Part of Linear Address
mov cx,bx ;upper Part of Linear Address
int 31h ;DPMI CALL
mov ax,0008h ;Function 8:Set Limit of descriptor
int 31h ;set Limit
mov fs,BX ; FS selector to 64K XMS Memory Location!
But when i try to read or write on this selector - program fail. GP - is wery bad thing. May be problem in wrong rivelegies levels? I seat on this code for 6 month. Dont give to dead. Please HEELP!
Sorry for my english.
|04 Mar 2004, 06:01||
Win interrupt functions, INT 71h ? has a LFN Long File Name checking interrupt.
I made a simple .COM file that returns an errorlevel to a batch file according to which OS is running, (Win or DOS) and
the batch file loads the DPMI if DOS 7.x is running,
Win doesn't need a DPMI loaded to use Fasm DOS if Win98 is running.
If you want the LFN checker (maybe even source code included in this version?)
Stuff I made is free to use in any way you want...
|08 Mar 2004, 09:37||
You might want to have a look at WDOSX:
It's pretty old by now, but it worked very well for me back in the dos extending days. It works under both dos and windows (iirc it supports raw, himem.sys, emm386 and such), handles a couple of fileformats (including PE), and even has limited win32 API emulation.
If you want a more "raw" dos extender, see if you can find Tran's PMODE somewhere.
There are probably better extenders available by now, I saw something used in the dos version of the kaspersky antivirus scanner, I think the dos extender used is publicly available (and was written by a russian - I could be wrong, though).
|08 Mar 2004, 15:16||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.