diff --git a/Readme.md b/Readme.md index 38a0c48..fc7d35a 100644 --- a/Readme.md +++ b/Readme.md @@ -21,7 +21,7 @@ in the repository. Build and run, it will automatically start bochs/vmware/virtualbox with the included FreeDOS image. It will create a CD-ROM as D: and you can run it from d:\entry.exe, by default it is automatically run (autoexec.bat) -## 3rd Part Apps included +## 3rd Party Apps included 1. DOS32A - http://dos32a.narechk.net/index_en.html 2. 386SWAT - http://www.sudleyplace.com/swat/ 3. UDIS86 - http://udis86.sourceforge.net/ , including an open watcom C project that is used by VDEBUG and MDEBUG diff --git a/asm.vcxproj b/asm.vcxproj index f6d1a18..c75b901 100644 --- a/asm.vcxproj +++ b/asm.vcxproj @@ -172,6 +172,7 @@ + diff --git a/asm.vcxproj.filters b/asm.vcxproj.filters index ce3f212..49d0a5a 100644 --- a/asm.vcxproj.filters +++ b/asm.vcxproj.filters @@ -210,10 +210,13 @@ Configuration + + DPMI Client + - - VDebug - + + 16 bit code + \ No newline at end of file diff --git a/build.bat b/build.bat index da18269..abef250 100644 --- a/build.bat +++ b/build.bat @@ -1,5 +1,6 @@ del d.iso fasm entry.asm +fasm dpmic.asm fasm dmmic.asm fasm vdebug.asm fasm mdebug.asm @@ -12,6 +13,7 @@ copy /y mdebug.exe .\CD\mdebug.exe copy /y debuggee.exe .\CD\debuggee.exe copy /y entry.exe .\CD\entry.exe copy /y dmmic.exe .\CD\dmmic.exe +copy /y dpmic.exe .\CD\dpmic.exe copy /y le.exe .\CD\le.exe copy /y runx.bat .\CD\runx.bat powershell -ExecutionPolicy RemoteSigned -File "iso.ps1" diff --git a/config.asm b/config.asm index 5dd6233..0b33e1b 100644 --- a/config.asm +++ b/config.asm @@ -8,6 +8,6 @@ TEST_VMX = 1 RESIDENT = 1 -VDEBUG = 0 +VDEBUG = 1 MDEBUG = 0 diff --git a/dpmic.asm b/dpmic.asm new file mode 100644 index 0000000..5b8e608 --- /dev/null +++ b/dpmic.asm @@ -0,0 +1,53 @@ +FORMAT MZ +HEAP 0 + + +segment DATA16 +USE16 + + +; main +segment CODE16 +USE16 + +error: + +mov ax,0x4C00 +int 0x21 + + modesw dd 0 + +start16: + + ; A raw (not DOS32A) DPMI client + xchg bx,bx + + mov ax,1687h ; get address of DPMI host's + int 2fh + or ax,ax ; exit if no DPMI host + jnz error + mov word [modesw],di + mov word [modesw+2],es + or si,si ; check private data area size + jz .l1 ; jump if no private data area + + mov bx,si ; allocate DPMI private area + mov ah,48h ; allocate memory + int 21h ; transfer to DOS + jc error ; jump, allocation failed + mov es,ax ; let ES=segment of data area + +.l1: + mov ax,0 ; bit 0=0 indicates 16-bit app + call [modesw] ; switch to protected mode + jc error ; jump if mode switch failed + ; else we're in prot. mode now + nop + + mov ax,0x4C00 + int 0x21 + +SEGMENT ENDS +entry CODE16:start16 + + diff --git a/dpmic.exe b/dpmic.exe new file mode 100644 index 0000000..a647b91 Binary files /dev/null and b/dpmic.exe differ diff --git a/runx.bat b/runx.bat index fceeeac..0d907aa 100644 --- a/runx.bat +++ b/runx.bat @@ -12,9 +12,7 @@ rem dpmione pro=dpmione.pro cd .. vdebug debuggee.exe -REM dism - -mdebug debuggee.exe +rem mdebug debuggee.exe a: diff --git a/vdebug.exe b/vdebug.exe index 4f240f6..10b0cca 100644 Binary files a/vdebug.exe and b/vdebug.exe differ diff --git a/vdisplay.asm b/vdisplay.asm index a862a5c..af41841 100644 --- a/vdisplay.asm +++ b/vdisplay.asm @@ -611,7 +611,7 @@ WaitForInput: .CmdGo: ; Clear Trap - vmw32 0x4004,0x40 ; trap exception 0x06 + vmw32 0x4004,0x0 ; trap exception 0x06 vmr rax,0x6820 btr rax,8 vmw64 0x6820,rax @@ -619,7 +619,7 @@ WaitForInput: .CmdTrace: ; Set Trap - vmw32 0x4004,0x42 ; trap exception 0x06 and 0x01 + vmw32 0x4004,0x2 ; trap exception 0x06 and 0x01 vmr rax,0x6820 bts rax,8 vmw64 0x6820,rax