├── BIN ├── ERRORS.ENG ├── ERRORS.RUS ├── PPRO.CFG ├── PPRO.EXE ├── PPRO.SRC └── PPROC.EXE ├── DOC ├── BP7.TXT ├── CRT.TXT ├── DOS.TXT ├── FEATURES.ENG ├── FEATURES.RUS ├── HISTORY.ENG ├── HISTORY.RUS ├── README.ENG └── README.RUS ├── LICENSE ├── OBJ ├── CRT.OBD ├── CRT.OBJ ├── DOS.OBD ├── DOS.OBJ ├── OBJECTS.OBD ├── OBJECTS.OBJ ├── STRINGS.OBD ├── STRINGS.OBJ ├── SYSTEM.OBD └── SYSTEM.OBJ ├── README.TXT ├── RTL ├── DOS32 │ ├── CRT │ │ ├── CRT.PAS │ │ └── MAKEFILE │ ├── DOS │ │ ├── DOS.PAS │ │ └── MAKEFILE │ ├── MAKEFILE │ ├── OBJECTS │ │ └── OBJECTS.PAS │ ├── STRINGS │ │ └── STRINGS.PAS │ └── SYSTEM │ │ ├── DIR.INC │ │ ├── DIRH.INC │ │ ├── FILE.INC │ │ ├── FILEH.INC │ │ ├── HEAP.INC │ │ ├── HEAPH.INC │ │ ├── MAKEFILE │ │ ├── MATH.INC │ │ ├── MATHH.INC │ │ ├── SET.INC │ │ ├── SETH.INC │ │ ├── STRING.INC │ │ ├── STRINGH.INC │ │ ├── SYSTEM.PAS │ │ ├── TEXT.INC │ │ ├── TEXTH.INC │ │ ├── VAL.INC │ │ └── VALH.INC └── WDOSX │ ├── CRT │ ├── CRT.PAS │ └── MAKEFILE │ ├── DOS │ ├── DOS.PAS │ └── MAKEFILE │ ├── DPMI32 │ └── DPMI32.PAS │ ├── MAKEFILE │ ├── OBJECTS │ └── OBJECTS.PAS │ ├── STRINGS │ └── STRINGS.PAS │ └── SYSTEM │ ├── DIR.INC │ ├── DIRH.INC │ ├── FILE.INC │ ├── FILEH.INC │ ├── HEAP.INC │ ├── HEAPH.INC │ ├── MAKEFILE │ ├── MATH.INC │ ├── MATHH.INC │ ├── SET.INC │ ├── SETH.INC │ ├── STRING.INC │ ├── STRINGH.INC │ ├── SYSTEM.PAS │ ├── TEXT.INC │ ├── TEXTH.INC │ ├── VAL.INC │ └── VALH.INC ├── SOURCE ├── ASMCODE.PAS ├── ASMOPT.PAS ├── BASMCOMP.PAS ├── BPMAKE.BAT ├── CG_FLAT.PAS ├── CODE.PAS ├── CODEOPT.PAS ├── COMPILER.PAS ├── CONFIG.PAS ├── ERRORS.ENG ├── ERRORS.PAS ├── ERRORS.RUS ├── FILECOLL.PAS ├── IASM386.PAS ├── MAKEFILE ├── MAKEFILE.BP ├── PASCOMP.PAS ├── PPDEBUG.BAT ├── PPRO.CFG ├── PPRO.PAS ├── PPRO.SRC ├── PPROC.PAS ├── PROFILE.PAS ├── SCANNER.PAS ├── STDLIB.PAS ├── SYMBOLS.PAS ├── TOOLS.PAS └── UNITSTRM.PAS ├── UNITS ├── CRT.PU ├── CRT.PUD ├── DOS.PU ├── DOS.PUD ├── OBJECTS.PU ├── OBJECTS.PUD ├── STRINGS.PU ├── STRINGS.PUD ├── SYSTEM.PU └── SYSTEM.PUD └── WDOSX96B ├── BIN ├── ADVAPI32.WDL ├── KERNEL32.WDL ├── OLEAUT32.WDL ├── STUBIT.EXE ├── USER32.WDL ├── WADD.EXE ├── WDIR.EXE ├── WDMEM.EXE └── WUDEBUG.EXE ├── DOC └── README.TXT ├── LICENSE.TXT └── SRC ├── BUILD.ME └── MAKEFILE ├── C ├── BORLANDC │ └── DPMI32 │ │ ├── BDOS.ASM │ │ ├── BDOSPTR.ASM │ │ ├── BIOSCOM.ASM │ │ ├── BIOSEQU.ASM │ │ ├── BIOSKEY.ASM │ │ ├── BIOSPRIN.ASM │ │ ├── BIOS_COM.ASM │ │ ├── BIOS_EQU.ASM │ │ ├── BIOS_KEY.ASM │ │ ├── BIOS_PRN.ASM │ │ ├── CALLSTR.ASM │ │ ├── CORELEFT.ASM │ │ ├── COUNTRY.ASM │ │ ├── CTRLBRK.ASM │ │ ├── DELAY.ASM │ │ ├── DOSCMMIT.ASM │ │ ├── DOSEXT.ASM │ │ ├── DPMI32.INC │ │ ├── DPMI32.LIB │ │ ├── GENINT.ASM │ │ ├── GETCBRK.ASM │ │ ├── GETDTA.ASM │ │ ├── GETFAT.ASM │ │ ├── GETPSP.ASM │ │ ├── GETVERF.ASM │ │ ├── INPORT.ASM │ │ ├── INT386.ASM │ │ ├── IOCTL.ASM │ │ ├── MOVEDATA.ASM │ │ ├── NOWIN32.ASM │ │ ├── OUTPORT.ASM │ │ ├── PARSFNM.ASM │ │ ├── PEEK.ASM │ │ ├── POKE.ASM │ │ ├── README.TXT │ │ ├── SEGREAD.ASM │ │ ├── SETDTA.ASM │ │ └── SOUND.ASM └── COMMON │ ├── IRQ │ ├── PMIRQ.ASM │ ├── PMIRQ.C │ ├── PMIRQ.H │ ├── PMIRQ.LIB │ └── PMIRQ.WDL │ └── VBE │ ├── DPMI32.ASM │ ├── DPMI32.H │ ├── DPMI32.INC │ └── VBE.C ├── COFF ├── MAKEFILE └── STUBCF.ASM ├── DEB ├── DEBUG.INC ├── DISASM.OB ├── FLAGS.INC ├── HELP.INC ├── HELPSCR.INC ├── IFIELD.INC ├── INBOX.INC ├── INSNSD.OB ├── KEYBOARD.ASM ├── KEYS.INC ├── KEYTAB.INC ├── LOADER.ASM ├── MAIN.ASM ├── MAKEFILE ├── MEMWIN.INC ├── NFIELDS.INC ├── REGWIN.INC ├── SCREEN.ASM ├── SDEBUG.ASM ├── SEGDEF.INC ├── SLIB.ASM ├── STACKWIN.INC ├── SYNC.OB └── UPDATE.INC ├── DELPHI ├── MISC │ ├── DPMI.PAS │ ├── KEYBOARD.PAS │ ├── README.TXT │ ├── TEST.PAS │ └── VBE │ │ ├── FBUFFERS.PAS │ │ ├── GRAPHICS.PAS │ │ ├── MAKE.BAT │ │ ├── OODPMI.PAS │ │ ├── PALETTES.PAS │ │ ├── TESTVBE.DPR │ │ └── VBE.PAS └── RTL │ ├── CRT.PAS │ └── DOS.PAS ├── DOS32 ├── DOS32.ASM └── MAKEFILE ├── HACKS ├── SH.EXE ├── TOH.EXE ├── TOINC.EXE ├── WDCOMP.EXE └── WPACK.DLL ├── IDLIST.LST ├── KERNEL ├── LEHEADER.INC ├── LOADLE.ASM ├── MAKEFILE ├── WDOSX.ASM └── WDXINFO.INC ├── LEGACY ├── ADVAPI32.ASI ├── CONHELP.INC ├── CONSOLE.ASI ├── EXCEPT.INC ├── FATTRIB.INC ├── IMPORTS.INC ├── LFUNS.ASI ├── LOADPE.ASM ├── MAKEFILE ├── MEMSTAT.INC ├── RESRC.INC ├── SEH.INC ├── TIME.INC ├── UTIL.INC ├── VARIANT.INC ├── W32STRUC.INC ├── WIDECHR.INC ├── WIN32API.INC └── WINNLS.INC ├── PE ├── LOADPE.ASM └── MAKEFILE ├── RDOFF ├── MAKEFILE └── RDOFF.ASM ├── README.TXT ├── TOOLS ├── ADC.ASM ├── DUALMODE.INC ├── GENERAL.INC ├── MAKEFILE ├── WADD.ASM ├── WDIR.ASM ├── WDMEM.ASM └── WDXINFO.INC ├── TOOLSRC ├── SH.C ├── TOH.C └── TOINC.C ├── UTIL ├── ADDFILE.ASM ├── DUALMODE.INC ├── GENERAL.INC ├── IMPORT.ASM ├── MAKEFILE ├── STUBIT.C ├── W32STRUC.INC ├── WDXINFO.H └── WDXINFO.INC ├── WIN32 ├── 1258.ASM ├── 437.ASM ├── 720.ASM ├── 737.ASM ├── 775.ASM ├── 847.ASM ├── 850.ASM ├── 852.ASM ├── 855.ASM ├── 857.ASM ├── 862.ASM ├── 866.ASM ├── 932.ASM ├── ADVAPI32.ASM ├── CONSOLE.ASM ├── K32FILE.ASM ├── K32HEAP.ASM ├── K32LFUNS.ASM ├── K32LOAD.ASM ├── K32MEM.ASM ├── K32MISC.ASM ├── K32NLS.ASM ├── K32SPAWN.ASM ├── K32VMEM.ASM ├── KERNEL32.ASM ├── MAKEFILE ├── OLEAUT32.ASM ├── U32NLS.ASM ├── USER32.ASM ├── USER32.DEF └── W32STRUC.INC └── WPACK ├── MAKEFILE ├── WPACK.C └── WPACK.H /BIN/ERRORS.RUS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/BIN/ERRORS.RUS -------------------------------------------------------------------------------- /BIN/PPRO.CFG: -------------------------------------------------------------------------------- 1 | /U..\UNITS 2 | /I..\UNITS 3 | /O..\OBJ 4 | /Meng 5 | /TWDOSX -------------------------------------------------------------------------------- /BIN/PPRO.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/BIN/PPRO.EXE -------------------------------------------------------------------------------- /BIN/PPRO.SRC: -------------------------------------------------------------------------------- 1 | [WDOSX] 2 | ; WDOSX platform configuration 3 | 4 | ; Assembler file name 5 | ASSEMBLER='TASM32' 6 | ;ASSEMBLER='C:\ASM\NASM\NASMW.EXE' 7 | ; Assembler command line 8 | ASSEMBLEROPTIONS='/ml /t $asmfile$, $objfile$' 9 | ;ASSEMBLEROPTIONS='-f obj $asmfile$ -o $objfile$' 10 | 11 | ; Linker file name 12 | LINKER='TLINK32' 13 | ;LINKER='ALINK' 14 | ; Linker command line 15 | LINKEROPTIONS='/Tpe /c /Sc:$stackcommitsize$ @FILELIST, $exefile$' 16 | ;LINKEROPTIONS='-c -oPE -stackcommitsize $stackcommitsize$ -o $exefile$ @FILELIST' 17 | ; Separate file names in response file by eol or by space 18 | SEPARATEBYEOL='NO' 19 | ;SEPARATEBYEOL='YES' 20 | 21 | ; Stub tool file name 22 | STUBER='STUBIT' 23 | ;STUBER='' 24 | ; Stub tool command line 25 | STUBEROPTIONS='$exefile$' 26 | 27 | ; File extensions 28 | UNITEXTENSION='.PU' 29 | OBJEXTENSION='.OBJ' 30 | ASMEXTENSION='.ASM' 31 | 32 | ; Stack sizes 33 | RESERVESTACKSIZE='0'; 34 | COMMITSTACKSIZE='65536'; 35 | 36 | [DOS32] 37 | ; DOS32 platform configuration 38 | 39 | ASSEMBLER='TASM32' 40 | ;ASSEMBLER='C:\ASM\NASM\NASMW.EXE' 41 | ASSEMBLEROPTIONS='/ml /t $asmfile$, $objfile$' 42 | ;ASSEMBLEROPTIONS='-f obj $asmfile$ -o $objfile$' 43 | LINKER='DLINK' 44 | LINKEROPTIONS='/c @FILELIST , $exefile$' 45 | STUBER='' 46 | STUBEROPTIONS='' 47 | UNITEXTENSION='.PUD' 48 | OBJEXTENSION='.OBD' 49 | ASMEXTENSION='.ASM' 50 | RESERVESTACKSIZE='65536'; 51 | COMMITSTACKSIZE='0'; 52 | 53 | EXTENDEDFLOATINSTRUCTIONS='YES' 54 | ;EXTENDEDFLOATINSTRUCTIONS='NO' 55 | NASMPUSHCONST='NO' 56 | ;NASMPUSHCONST='YES' 57 | NASMSEGMENTOVERRIDE='NO' 58 | ;NASMSEGMENTOVERRIDE='YES' 59 | 60 | 61 | [TASM32] 62 | ; Assembler syntax switches 63 | EXTENDEDFLOATINSTRUCTIONS='YES' 64 | NASMPUSHCONST='NO' 65 | NASMSEGMENTOVERRIDE='NO' 66 | 67 | CPU = '.386P' 68 | FPU = '.387' 69 | MODEL = '.MODEL FLAT' 70 | CODE = '.CODE' 71 | DATA = '.DATA' 72 | DATA_ = '.DATA?' 73 | STACK = '.STACK' 74 | MAIN = 'main' 75 | START = '' 76 | END = 'END' 77 | PROC = 'PROC' 78 | ENDP = 'ENDP' 79 | BPTR = 'byte ptr' 80 | WPTR = 'word ptr' 81 | DPTR = 'dword ptr' 82 | PPTR = 'pword ptr' 83 | QPTR = 'qword ptr' 84 | TPTR = 'tbyte ptr' 85 | FPTR = 'far ptr' 86 | NPTR = 'near ptr' 87 | OFFSET = 'offset' 88 | DB = 'DB' 89 | DW = 'DW' 90 | DD = 'DD' 91 | DQ = 'DQ' 92 | DT = 'DT' 93 | DUP = 'DUP(?)' 94 | RESB = 'DB' 95 | EXTRN = 'EXTRN' 96 | PUBLIC = 'PUBLIC' 97 | ST = 'ST(#)' 98 | NEAR = ': NEAR' 99 | BYTE = ': BYTE' 100 | 101 | [NASMW] 102 | ; Assembler syntax switches 103 | EXTENDEDFLOATINSTRUCTIONS='NO' 104 | NASMPUSHCONST='YES' 105 | NASMSEGMENTOVERRIDE='YES' 106 | 107 | CPU = '[BITS 32]' 108 | FPU = '' 109 | MODEL = '' 110 | CODE = 'SECTION _text public flat class=CODE use32' 111 | DATA = 'SECTION _data public flat class=DATA use32' 112 | DATA_ = 'SECTION _bss public flat class=BSS use32' 113 | STACK = '.STACK' 114 | MAIN = '_main' 115 | START = '..start' 116 | END = ';' 117 | PROC = ':' 118 | ENDP = '' 119 | BPTR = 'byte' 120 | WPTR = 'word' 121 | DPTR = 'dword' 122 | PPTR = 'far' 123 | QPTR = 'qword' 124 | TPTR = 'tword' 125 | FPTR = 'far' 126 | NPTR = 'near' 127 | OFFSET = '' 128 | DB = 'DB' 129 | DW = 'DW' 130 | DD = 'DD' 131 | DQ = 'DQ' 132 | DT = 'DT' 133 | DUP = '' 134 | RESB = 'RESB' 135 | EXTRN = 'EXTERN' 136 | PUBLIC = 'GLOBAL' 137 | ST = 'ST#' 138 | NEAR = '' 139 | BYTE = '' -------------------------------------------------------------------------------- /BIN/PPROC.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/BIN/PPROC.EXE -------------------------------------------------------------------------------- /DOC/BP7.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/DOC/BP7.TXT -------------------------------------------------------------------------------- /DOC/CRT.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/DOC/CRT.TXT -------------------------------------------------------------------------------- /DOC/DOS.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/DOC/DOS.TXT -------------------------------------------------------------------------------- /DOC/FEATURES.ENG: -------------------------------------------------------------------------------- 1 | 2 | Pascal Pro features 3 | 4 | Types: 5 | Implemented 6 | - Ordinale types 7 | - Pascal strings 8 | - Pointers 9 | - Records 10 | - Arrays 11 | - sets { 22.06.98 } 12 | - files { 6.07.98 } 13 | - procedural { 25.07.98 } 14 | - objects (classes) { 20.08.98 } 15 | 16 | Not implemented 17 | 18 | Constants: 19 | Implemented 20 | - Simple constants 21 | - Typed constants 22 | - Pointer constants { 9.07.98 } 23 | 24 | Not implemented 25 | 26 | Variables: 27 | Implemented 28 | - Local, Global 29 | - absolute 30 | 31 | Not implemented 32 | 33 | Procedures, functions, operators: 34 | Implemented 35 | - Nested subprograms 36 | - Function, procedure and operator overloading 37 | - var-paramaters, const-parameters 38 | - Functions are able to return value of any type 39 | 40 | Not implemented 41 | 42 | Misc: 43 | Implemented 44 | - Basic statements 45 | - Assignment also has result ( a:= ( b := c ) + 10 ) 46 | - Built-in assembler 47 | - Functions WRITE,WRITELN,INC,DEC,PRED,SUCC,STR 48 | - case-statement { 16.06.98 } 49 | - break, continue, exit { 17.06.98 } 50 | - NEW,DISPOSE { 21.07.98 } 51 | - preprocessor ( DEFINE, IFNDEF, ...) { 22.07.98 } 52 | - WITH...DO - statement { 27.07.98 } 53 | - OOP ( Object oriented programming ) { 20.08.98 } 54 | - IF..THEN..ELSE expression { 17.02.99 } 55 | 56 | - CRT unit { 18.10.98 } 57 | - DOS unit { 26.10.98 } 58 | - Supporting DOS32 extender. { 30.10.98 } 59 | - ASCIIZ and character arrays consts supporting { 21.11.98 } 60 | - Labels and GOTO operator { 22.11.98 } 61 | - STRINGS unit { 02.01.99 } 62 | - Absolute variables { 07.01.98 } 63 | 64 | Not implemented 65 | 66 | In developing: 67 | - RTL 68 | - Catching and fixing bugs 69 | - OBJECTS unit 70 | - DPMI32 unit 71 | 72 | Future plans 73 | - Best OOP support 74 | -------------------------------------------------------------------------------- /DOC/FEATURES.RUS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/DOC/FEATURES.RUS -------------------------------------------------------------------------------- /DOC/HISTORY.ENG: -------------------------------------------------------------------------------- 1 | 2 | Changes since version 0.1 beta 5 3 | Function ASSIGNCRT under DOS32 was fixed 4 | Function FINDNEXT under DOS32 was fixed 5 | Function FINDFIRST under DOS32 was fixed 6 | Function tBufStream.Seek was fixed 7 | IF..THEN..ELSE expression operator was implemented 8 | Nested procedures error was fixed 9 | Absolute variables error was fixed 10 | Nested comments error was fixed 11 | 12 | -------------------------------------------------------------------------- 13 | 14 | 01/02/99 version 0.1 beta 5 was released 15 | Changes since version 0.1 beta 4 16 | Support of CDECL, STDCALL, PASCAL calling conventions was implemented 17 | Extern subroutines support was implemented 18 | ALINK support was implemented 19 | NASM support was implemented 20 | ABSOLUTE support was implemented 21 | Random numbers routines was made 22 | POS function was fixed 23 | KEYPRESSED function was fixed 24 | STRINGS unit was finished 25 | Function ODD was fixed 26 | Function SUCC was fixed 27 | A lot of bugs was fixed 28 | GETDIR was fixed 29 | Bug in tCollection (Objects unit) object was fixed 30 | !!! Compiling speed was extremly increased (about 100%-150%) !!! 31 | 'RESULT' variable to functions was added 32 | String parameters bug fixed 33 | 34 | -------------------------------------------------------------------------- 35 | 36 | 30/11/98 version 0.1 beta 4 was released 37 | Changes since version 0.1 beta 3 38 | 'INC' and 'DEC' for pointers was implemented 39 | '+' and '-' operators for pointers was implemented 40 | FPU error-handler was written 41 | Parenthess for function without paramaters not required now 42 | Labels and GOTO operator was implemented 43 | ASCIIZ supporting 44 | OFS function was fixed 45 | Initializing charecter arrays as string consts supported 46 | Condition calculating in if..then was fixed 47 | EOF, FileSize, FilePos was fixed 48 | ReWrite procedure for typed/untyped files was fixed 49 | !!! Compiling speed was significantly increased (about 30%-40%) !!! 50 | FSPLIT procedure fixed 51 | Error of writing value of string typed constants to asm file was fixed 52 | Pseudo-circular unit reference fixed 53 | SHL and SHR operators were fixed 54 | FreeMem procedure was fixed 55 | Nested procedures bug was fixed 56 | DOS32-extender supporting 57 | Object supporting was fixed 58 | Writing values of typed const was fixed 59 | 60 | -------------------------------------------------------------------------- 61 | 62 | 29/10/98 version 0.1 beta 3 was released 63 | Changes since version 0.1 beta 2 64 | 65 | function call without assignment was fixed 66 | interrupt 21 handler was fixed ( SYSTEM unit ) 67 | DOS unit was finished 68 | Pointer comparing was fixed 69 | 70 | -------------------------------------------------------------------------- 71 | 72 | 23/10/98 version 0.1 beta 2 was released 73 | Changes since version 0.1 beta 1 74 | 75 | char consts bug was removed 76 | CRT unit was finished 77 | memory cleaning was fixed (Runtime error 216 is not shown now) 78 | unit initialization part bug was removed 79 | 80 | -------------------------------------------------------------------------- 81 | 82 | 26/08/98 version 0.1 beta 1 had been released -------------------------------------------------------------------------------- /DOC/HISTORY.RUS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/DOC/HISTORY.RUS -------------------------------------------------------------------------------- /DOC/README.ENG: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------- 2 | Pascal Pro - free 32-bit pascal compiler 3 | http:\\www.cryogen.com\pascalpro 4 | email to: pascalpro@cryogen.com 5 | --------------------------------------------------------------------------- 6 | 7 | 1. Introduction. 8 | 9 | 2. Installation. 10 | 11 | 3. Compiling programs. 12 | 3.1. Compiling programs under WDOSX platform. 13 | 3.2. Compiling programs under DOS32 platform. 14 | 15 | 4. Used tools. 16 | 4.1. Supported assemblers. 17 | 4.2. Supported linkers. 18 | 4.3. Other tools. 19 | 20 | 5. Configuring compiler for you own platform. 21 | 5.1. Configuring command lines. 22 | 5.2. Configuring generated assembler output. 23 | 24 | 25 | ------------------------------------------------------- 26 | 1. Introduction. 27 | My English is not good, so excuse me for some mistakes in this description. 28 | This file contains some information about Pascal Pro compiler. 29 | Pascal Pro is 32-bit free compile. You didn't need to pay for using that. 30 | But if you'ld like you can send me $5-$50. In this case you have to contact 31 | me and I'll say how you can do that. 32 | If you'll have some interesting ideas about Pascal Pro or you'll find 33 | some errors also contact me, please. 34 | 35 | ------------------------------------------------------- 36 | 2. Installation. 37 | This version contains 3 packed files. For installation you must have 38 | ZIP-unpacker, for example PKUNZIP. 39 | Unzip packages (with subdirectories) to a directory on your hard drive, 40 | for example C:\PPRO\. 41 | For more comfortable usage you can add Pascal Pro directory to your path 42 | search in autoexec.bat. 43 | 44 | ------------------------------------------------------- 45 | 3. Compiling programs. 46 | 47 | This version of Pascal Pro can produce programs for dos-protected mode 48 | using two dos-extenders WDOSX and DOS32. 49 | To specify target which you'ld to use with your programs you have to 50 | specify /Txxx parameter, where xxx is the target name. 51 | At first this target is default. But you can change default target by 52 | setting /T switch in the ppro.cfg file. 53 | 54 | 3.1. Compiling programs under WDOSX platform. 55 | For compiling program under WDOSX platform you have to call ppro with 56 | /TWDOSX parameter, for example 57 | ppro /TWDOSX hello.pas 58 | 59 | 3.2. Compiling programs under DOS32 platform. 60 | For compiling program under DOS32 platform you have to call ppro with 61 | /TDOS32 parameter, for example 62 | ppro /TDOS32 hello.pas 63 | 64 | ------------------------------------------------------- 65 | 4. Used tools. 66 | 4.1. Supported assemblers. 67 | 4.2. Supported linkers. 68 | 4.3. Other tools. 69 | 70 | ------------------------------------------------------- 71 | 5. Configuring compiler for you own platform. 72 | 5.1. Configuring command lines. 73 | 5.2. Configuring generated assembler output. 74 | 75 | 76 | -------------------------------------------------------------------------------- /DOC/README.RUS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/DOC/README.RUS -------------------------------------------------------------------------------- /OBJ/CRT.OBD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/CRT.OBD -------------------------------------------------------------------------------- /OBJ/CRT.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/CRT.OBJ -------------------------------------------------------------------------------- /OBJ/DOS.OBD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/DOS.OBD -------------------------------------------------------------------------------- /OBJ/DOS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/DOS.OBJ -------------------------------------------------------------------------------- /OBJ/OBJECTS.OBD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/OBJECTS.OBD -------------------------------------------------------------------------------- /OBJ/OBJECTS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/OBJECTS.OBJ -------------------------------------------------------------------------------- /OBJ/STRINGS.OBD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/STRINGS.OBD -------------------------------------------------------------------------------- /OBJ/STRINGS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/STRINGS.OBJ -------------------------------------------------------------------------------- /OBJ/SYSTEM.OBD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/SYSTEM.OBD -------------------------------------------------------------------------------- /OBJ/SYSTEM.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/OBJ/SYSTEM.OBJ -------------------------------------------------------------------------------- /README.TXT: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------- 2 | Pascal Pro - free 32-bit pascal compiler 3 | http:\\www.cryogen.com\pascalpro 4 | email to: pascalpro@cryogen.com 5 | --------------------------------------------------------------------------- 6 | 7 | 1. Introduction. 8 | 9 | 2. Installation. 10 | 11 | 3. Compiling programs. 12 | 3.1. Compiling programs under WDOSX platform. 13 | 3.2. Compiling programs under DOS32 platform. 14 | 15 | 4. Used tools. 16 | 4.1. Supported assemblers. 17 | 4.2. Supported linkers. 18 | 4.3. Other tools. 19 | 20 | 5. Configuring compiler for you own platform. 21 | 5.1. Configuring command lines. 22 | 5.2. Configuring generated assembler output. 23 | 24 | 25 | ------------------------------------------------------- 26 | 1. Introduction. 27 | My English is not good, so excuse me for some mistakes in this description. 28 | This file contains some information about Pascal Pro compiler. 29 | Pascal Pro is 32-bit free compile. You didn't need to pay for using that. 30 | But if you'ld like you can send me $5-$50. In this case you have to contact 31 | me and I'll say how you can do that. 32 | If you'll have some interesting ideas about Pascal Pro or you'll find 33 | some errors also contact me, please. 34 | 35 | ------------------------------------------------------- 36 | 2. Installation. 37 | This version contains 3 packed files. For installation you must have 38 | ZIP-unpacker, for example PKUNZIP. 39 | Unzip packages (with subdirectories) to a directory on your hard drive, 40 | for example C:\PPRO\. 41 | For more comfortable usage you can add Pascal Pro directory to your path 42 | search in autoexec.bat. 43 | 44 | ------------------------------------------------------- 45 | 3. Compiling programs. 46 | 47 | This version of Pascal Pro can produce programs for dos-protected mode 48 | using two dos-extenders WDOSX and DOS32. 49 | To specify target which you'ld to use with your programs you have to 50 | specify /Txxx parameter, where xxx is the target name. 51 | At first this target is default. But you can change default target by 52 | setting /T switch in the ppro.cfg file. 53 | 54 | 3.1. Compiling programs under WDOSX platform. 55 | For compiling program under WDOSX platform you have to call ppro with 56 | /TWDOSX parameter, for example 57 | ppro /TWDOSX hello.pas 58 | 59 | 3.2. Compiling programs under DOS32 platform. 60 | For compiling program under DOS32 platform you have to call ppro with 61 | /TDOS32 parameter, for example 62 | ppro /TDOS32 hello.pas 63 | 64 | ------------------------------------------------------- 65 | 4. Used tools. 66 | 4.1. Supported assemblers. 67 | 4.2. Supported linkers. 68 | 4.3. Other tools. 69 | 70 | ------------------------------------------------------- 71 | 5. Configuring compiler for you own platform. 72 | 5.1. Configuring command lines. 73 | 5.2. Configuring generated assembler output. 74 | 75 | 76 | -------------------------------------------------------------------------------- /RTL/DOS32/CRT/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\..\obj 5 | UNITS=..\..\..\units 6 | 7 | crt.obj: crt.pas 8 | $(PPRO) /TDOS32 crt 9 | copy crt.obd $(OBJ)\crt.obd 10 | copy crt.pud $(UNITS)\crt.pud 11 | del crt.obd 12 | del crt.pud 13 | -------------------------------------------------------------------------------- /RTL/DOS32/DOS/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\..\obj 5 | UNITS=..\..\..\units 6 | 7 | dos.obj: dos.pas 8 | $(PPRO) /TDOS32 dos 9 | copy dos.obd $(OBJ)\dos.obd 10 | copy dos.pud $(UNITS)\dos.pud 11 | del dos.obd 12 | del dos.pud 13 | -------------------------------------------------------------------------------- /RTL/DOS32/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\obj 5 | UNITS=..\..\units 6 | PPROOPT=-TDOS32 7 | 8 | rtl: system dos crt strings objects 9 | 10 | system: $(UNITS)\SYSTEM.PUD 11 | 12 | dos: $(UNITS)\DOS.PUD 13 | 14 | crt: $(UNITS)\CRT.PUD 15 | 16 | strings: $(UNITS)\STRINGS.PUD 17 | 18 | objects: $(UNITS)\OBJECTS.PUD 19 | 20 | $(UNITS)\system.pud: \ 21 | system\system.pas \ 22 | system\mathh.inc system\math.inc \ 23 | system\stringh.inc system\string.inc \ 24 | system\seth.inc system\set.inc \ 25 | system\texth.inc system\text.inc \ 26 | system\fileh.inc system\file.inc \ 27 | system\dirh.inc system\dir.inc \ 28 | system\heaph.inc system\heap.inc \ 29 | system\valh.inc system\val.inc 30 | cd system 31 | $(PPRO) -Cs $(PPROOPT) system 32 | copy system.obd ..\$(OBJ)\system.obd 33 | copy system.pud ..\$(UNITS)\system.pud 34 | del system.obd 35 | del system.pud 36 | # del system.lst 37 | del system.asm 38 | del build.bat 39 | cd .. 40 | 41 | $(UNITS)\dos.pud: dos\dos.pas 42 | cd dos 43 | $(PPRO) $(PPROOPT) dos 44 | copy dos.obd ..\$(OBJ)\dos.obd 45 | copy dos.pud ..\$(UNITS)\dos.pud 46 | del dos.obd 47 | del dos.pud 48 | # del dos.lst 49 | del dos.asm 50 | del build.bat 51 | cd .. 52 | 53 | $(UNITS)\crt.pud: crt\crt.pas 54 | cd crt 55 | $(PPRO) $(PPROOPT) crt 56 | copy crt.obd ..\$(OBJ)\crt.obd 57 | copy crt.pud ..\$(UNITS)\crt.pud 58 | del crt.obd 59 | del crt.pud 60 | # del crt.lst 61 | del crt.asm 62 | del build.bat 63 | cd .. 64 | 65 | $(UNITS)\STRINGS.PUD: strings\strings.pas 66 | cd strings 67 | $(PPRO) $(PPROOPT) strings 68 | copy strings.obd ..\$(OBJ)\strings.obd 69 | copy strings.pud ..\$(UNITS)\strings.pud 70 | del strings.obd 71 | del strings.pud 72 | # del strings.lst 73 | del strings.asm 74 | del build.bat 75 | cd .. 76 | 77 | $(UNITS)\OBJECTS.PUD: objects\objects.pas 78 | cd objects 79 | $(PPRO) $(PPROOPT) objects 80 | copy objects.obd ..\$(OBJ)\objects.obd 81 | copy objects.pud ..\$(UNITS)\objects.pud 82 | del objects.obd 83 | del objects.pud 84 | # del objects.lst 85 | del objects.asm 86 | del build.bat 87 | cd .. 88 | -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/DIR.INC: -------------------------------------------------------------------------------- 1 | 2 | procedure ChDir( const Dir: String); 3 | var 4 | Buf: array [0..255] of char; 5 | begin 6 | ToASCIIZ( Dir, @Buf); 7 | asm 8 | mov ah, $3b 9 | lea edx, Buf 10 | int $21 11 | jc @@exit 12 | xor ax, ax 13 | @@exit: 14 | mov InOutRes, ax 15 | end; 16 | end; 17 | 18 | procedure MkDir( const Dir: String); 19 | var 20 | Buf: array [0..255] of char; 21 | begin 22 | ToASCIIZ( Dir, @Buf); 23 | asm 24 | mov ah, $39 25 | lea edx, Buf 26 | int $21 27 | jc @@exit 28 | xor ax, ax 29 | @@exit: 30 | mov InOutRes, ax 31 | end; 32 | end; 33 | 34 | procedure RmDir( const Dir: String); 35 | var 36 | Buf: array [0..255] of char; 37 | begin 38 | ToASCIIZ( Dir, @Buf); 39 | asm 40 | mov ah, $3A 41 | lea edx, Buf 42 | int $21 43 | jc @@exit 44 | xor ax, ax 45 | @@exit: 46 | mov InOutRes, ax 47 | end; 48 | end; 49 | 50 | procedure GetDir( Drive: Byte; var Dir: String); 51 | var 52 | Buf: array [0..255] of Char; 53 | begin 54 | asm 55 | mov ah, $47 56 | mov dl, Drive 57 | lea esi, Buf 58 | int $21 59 | jc @@exit 60 | xor ax, ax 61 | @@exit: 62 | mov InOutRes, ax 63 | end; 64 | if InOutRes = 0 then 65 | FromASCIIZ( @Buf, Dir); 66 | end; 67 | 68 | -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/DIRH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/DIRH.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/FILEH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/FILEH.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/HEAP.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/HEAP.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/HEAPH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/HEAPH.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\..\obj 5 | UNITS=..\..\..\units 6 | 7 | system.obj: system.pas \ 8 | mathh.inc math.inc \ 9 | stringh.inc string.inc \ 10 | seth.inc set.inc \ 11 | texth.inc text.inc \ 12 | fileh.inc file.inc \ 13 | dirh.inc dir.inc \ 14 | heaph.inc heap.inc \ 15 | valh.inc val.inc 16 | $(PPRO) -Cs -TDOS32 system 17 | copy system.obd $(OBJ)\system.obd 18 | copy system.pud $(UNITS)\system.pud 19 | del system.obd 20 | del system.pud 21 | -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/MATH.INC: -------------------------------------------------------------------------------- 1 | 2 | 3 | function Trunc( R: Extended): longint; assembler; 4 | var 5 | Temp: longint; 6 | TempWord, 7 | CtrlWord : word; 8 | asm 9 | fstcw word ptr [CtrlWord] 10 | mov ax,word ptr [CtrlWord] 11 | {and ax,$F3FF} 12 | or ax,$0C00 13 | mov word ptr [TempWord],ax 14 | fldcw word ptr [TempWord] 15 | 16 | fld tbyte ptr [r] 17 | fistp dword ptr [Temp] 18 | 19 | fldcw word ptr [CtrlWord] 20 | mov eax, Temp 21 | end; 22 | 23 | function Round( R: Extended): LongInt; assembler; 24 | var 25 | Temp: longint; 26 | TempWord, 27 | CtrlWord : word; 28 | asm 29 | fstcw word ptr [CtrlWord] 30 | mov ax, CtrlWord 31 | and ax, $F3FF 32 | mov word ptr [TempWord],ax 33 | fldcw word ptr [TempWord] 34 | 35 | fld tbyte ptr [r] 36 | fistp dword ptr [Temp] 37 | 38 | fldcw word ptr [CtrlWord] 39 | mov eax, Temp 40 | end; 41 | 42 | function Int( R: Extended): Extended; assembler; 43 | var 44 | TempWord, 45 | CtrlWord : word; 46 | asm 47 | fstcw word ptr [CtrlWord] 48 | mov ax,word ptr [CtrlWord] 49 | {and ax,$F3FF} 50 | or ax,$0C00 51 | mov word ptr [TempWord],ax 52 | fldcw word ptr [TempWord] 53 | 54 | fld tbyte ptr [r] 55 | frndint 56 | 57 | fldcw word ptr [CtrlWord] 58 | end; 59 | 60 | function Frac( R: Extended): Extended; assembler; 61 | var 62 | TempWord, 63 | CtrlWord : word; 64 | asm 65 | fstcw word ptr [CtrlWord] 66 | mov ax,word ptr [CtrlWord] 67 | {and ax,$F3FF} 68 | or ax,$0C00 69 | mov word ptr [TempWord],ax 70 | fldcw word ptr [TempWord] 71 | 72 | fld tbyte ptr [R] 73 | fld tbyte ptr [R] 74 | 75 | frndint 76 | fsub 77 | 78 | fldcw word ptr [CtrlWord] 79 | end; 80 | 81 | function Exp( R: Extended): Extended; assembler; 82 | var 83 | CtrlWord, TempWord: Word; 84 | asm 85 | fld tbyte ptr [R] 86 | fldl2e 87 | fmulp 88 | fstcw CtrlWord 89 | fwait 90 | mov ax, CtrlWord 91 | and ax, $F3FF 92 | mov TempWord, ax 93 | fldcw TempWord 94 | fld st(0) 95 | frndint 96 | fldcw CtrlWord 97 | fxch st(1) 98 | fsub st, st(1) 99 | f2xm1 100 | fld1 101 | faddp 102 | fscale 103 | fstp st(1) 104 | end; 105 | 106 | function Ln( R: Extended): Extended; assembler; 107 | asm 108 | fldln2 109 | fld tbyte ptr [R] 110 | fyl2x 111 | end; 112 | 113 | -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/MATHH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/MATHH.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/SET.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/SET.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/SETH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/SETH.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/STRINGH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/STRINGH.INC -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/SYSTEM.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/SYSTEM.PAS -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/TEXTH.INC: -------------------------------------------------------------------------------- 1 | 2 | const 3 | 4 | fmClosed = $D7B0; 5 | fmInput = $D7B1; 6 | fmOutput = $D7B2; 7 | fmInOut = $D7B3; 8 | fmAppend = $D7B4; 9 | 10 | NameLength = 79; 11 | 12 | type 13 | 14 | TextBuf = array[0..127] of Char; 15 | 16 | TextRec = record 17 | Handle : Word; 18 | Mode : Word; 19 | BufSize : LongInt; 20 | BufPos : Word; 21 | BufEnd : Word; 22 | BufPtr : ^TextBuf; 23 | OpenFunc : Pointer; 24 | InOutFunc : Pointer; 25 | FlushFunc : Pointer; 26 | CloseFunc : Pointer; 27 | UserData : array[1..16] of Byte; 28 | Name : array [0..NameLength] of Char; 29 | Buffer : TextBuf; 30 | end; 31 | 32 | 33 | procedure Reset( var TextFile: Text); 34 | procedure ReWrite( var TextFile: Text); 35 | procedure Close( var TextFile: Text); 36 | procedure Append( var TextFile: Text); 37 | procedure Flush( var TextFile: Text); 38 | 39 | function EOF( var TextFile: Text): Boolean; 40 | function EOLn( var TextFile: Text): Boolean; 41 | function SeekEOF( var TextFile: Text): Boolean; 42 | function SeekEOLn( var TextFile: Text): Boolean; 43 | 44 | procedure ReName( var TextFile: Text; const NewName: String); 45 | procedure Erase( var TextFile: Text); 46 | 47 | procedure SetTextBuf( var TextFile: Text; var Buffer; Size: LongInt); 48 | -------------------------------------------------------------------------------- /RTL/DOS32/SYSTEM/VALH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/DOS32/SYSTEM/VALH.INC -------------------------------------------------------------------------------- /RTL/WDOSX/CRT/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\..\obj 5 | UNITS=..\..\..\units 6 | 7 | crt.obj: crt.pas 8 | $(PPRO) crt 9 | copy crt.obj $(OBJ)\crt.obj 10 | copy crt.pu $(UNITS)\crt.pu 11 | del crt.obj 12 | del crt.pu 13 | -------------------------------------------------------------------------------- /RTL/WDOSX/DOS/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\..\obj 5 | UNITS=..\..\..\units 6 | 7 | dos.obj: dos.pas 8 | $(PPRO) dos 9 | copy dos.obj $(OBJ)\dos.obj 10 | copy dos.pu $(UNITS)\dos.pu 11 | del dos.obj 12 | del dos.pu 13 | -------------------------------------------------------------------------------- /RTL/WDOSX/DPMI32/DPMI32.PAS: -------------------------------------------------------------------------------- 1 | {----------------------------------------------------------------------------} 2 | { Pascal Pro Runtime Library } 3 | { (c) Copyright 1997-1999 } 4 | { DPMI32 Unit } 5 | { Iggor Khachko - hachko@icl.kazan.su } 6 | {----------------------------------------------------------------------------} 7 | 8 | unit DPMI32; 9 | 10 | interface 11 | 12 | type 13 | { Protected mode selector } 14 | tPMSelector = Word; 15 | { Real mode selector } 16 | tRMSegment = Word; 17 | { Protected mode offset } 18 | tPMOffset = LongInt; 19 | { Real mode offset } 20 | tRMOffset = Word; 21 | 22 | { Allocates LDT descriptors. If successful returns base selector in } 23 | { other case returns 0. The base and limit of the returned descriptors } 24 | { will be 0, and the type will be "data" } 25 | function AllocateLdtDescriptors( Count: Word): tPMSelector; 26 | 27 | { Frees LDT descriptor. Only one descriptor freed per call. Any segment } 28 | { registers containing the freed selector are set to $0000 } 29 | procedure FreeLdtDescriptor( Sel: tPMSelector); 30 | 31 | { Converst real mode segment to protected mode selector. } 32 | function SegmentToDescriptor( Seg: tRMSegment): tPMSelector; 33 | 34 | 35 | const 36 | DPMIError: Integer = 0; 37 | 38 | implementation 39 | 40 | 41 | function AllocateLdtDescriptors( Count: Word): tPMSelector; assembler; 42 | asm 43 | xor eax, eax 44 | movzx ecx, Count 45 | int $31 46 | jnc @@NoError 47 | mov cx, ax 48 | xor eax, eax 49 | jmp @@Exit 50 | @@NoError: 51 | xor cx, cx 52 | movzx eax, ax 53 | @@Exit: 54 | mov DPMIError, cx 55 | end; 56 | 57 | 58 | procedure FreeLdtDescriptor( Sel: tPMSelector); assembler; 59 | asm 60 | mov eax, $0001 61 | movzx ebx, Sel 62 | int $31 63 | jc @@Exit 64 | xor ax, ax 65 | @@Exit: 66 | mov DPMIError, ax 67 | end; 68 | 69 | 70 | end. -------------------------------------------------------------------------------- /RTL/WDOSX/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\obj 5 | UNITS=..\..\units 6 | 7 | rtl: system dos crt strings objects 8 | 9 | system: $(UNITS)\SYSTEM.PU 10 | 11 | dos: $(UNITS)\DOS.PU 12 | 13 | crt: $(UNITS)\CRT.PU 14 | 15 | strings: $(UNITS)\STRINGS.PU 16 | 17 | objects: $(UNITS)\OBJECTS.PU 18 | 19 | $(UNITS)\system.pu: \ 20 | system\system.pas \ 21 | system\mathh.inc system\math.inc \ 22 | system\stringh.inc system\string.inc \ 23 | system\seth.inc system\set.inc \ 24 | system\texth.inc system\text.inc \ 25 | system\fileh.inc system\file.inc \ 26 | system\dirh.inc system\dir.inc \ 27 | system\heaph.inc system\heap.inc \ 28 | system\valh.inc system\val.inc 29 | cd SYSTEM 30 | $(PPRO) -Cs system 31 | copy system.obj ..\$(OBJ)\system.obj 32 | copy system.pu ..\$(UNITS)\system.pu 33 | del system.obj 34 | del system.pu 35 | # del system.lst 36 | del system.asm 37 | del build.bat 38 | cd .. 39 | 40 | $(UNITS)\dos.pu: dos\dos.pas 41 | cd dos 42 | $(PPRO) dos 43 | copy dos.obj ..\$(OBJ)\dos.obj 44 | copy dos.pu ..\$(UNITS)\dos.pu 45 | del dos.obj 46 | del dos.pu 47 | # del dos.lst 48 | del dos.asm 49 | del build.bat 50 | cd .. 51 | 52 | $(UNITS)\crt.pu: crt\crt.pas 53 | cd crt 54 | $(PPRO) crt 55 | copy crt.obj ..\$(OBJ)\crt.obj 56 | copy crt.pu ..\$(UNITS)\crt.pu 57 | del crt.obj 58 | del crt.pu 59 | # del crt.lst 60 | del crt.asm 61 | del build.bat 62 | cd .. 63 | 64 | $(UNITS)\STRINGS.PU: strings\strings.pas 65 | cd strings 66 | $(PPRO) strings 67 | copy strings.obj ..\$(OBJ)\strings.obj 68 | copy strings.pu ..\$(UNITS)\strings.pu 69 | del strings.obj 70 | del strings.pu 71 | # del strings.lst 72 | del strings.asm 73 | del build.bat 74 | cd .. 75 | 76 | $(UNITS)\OBJECTS.PU: objects\objects.pas 77 | cd objects 78 | $(PPRO) objects 79 | copy objects.obj ..\$(OBJ)\objects.obj 80 | copy objects.pu ..\$(UNITS)\objects.pu 81 | del objects.obj 82 | del objects.pu 83 | # del objects.lst 84 | del objects.asm 85 | del build.bat 86 | cd .. 87 | -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/DIR.INC: -------------------------------------------------------------------------------- 1 | 2 | procedure ChDir( const Dir: String); 3 | var 4 | Buf: array [0..255] of char; 5 | begin 6 | ToASCIIZ( Dir, @Buf); 7 | asm 8 | mov ah, $3b 9 | lea edx, Buf 10 | int $21 11 | jc @@exit 12 | xor ax, ax 13 | @@exit: 14 | mov InOutRes, ax 15 | end; 16 | end; 17 | 18 | procedure MkDir( const Dir: String); 19 | var 20 | Buf: array [0..255] of char; 21 | begin 22 | ToASCIIZ( Dir, @Buf); 23 | asm 24 | mov ah, $39 25 | lea edx, Buf 26 | int $21 27 | jc @@exit 28 | xor ax, ax 29 | @@exit: 30 | mov InOutRes, ax 31 | end; 32 | end; 33 | 34 | procedure RmDir( const Dir: String); 35 | var 36 | Buf: array [0..255] of char; 37 | begin 38 | ToASCIIZ( Dir, @Buf); 39 | asm 40 | mov ah, $3A 41 | lea edx, Buf 42 | int $21 43 | jc @@exit 44 | xor ax, ax 45 | @@exit: 46 | mov InOutRes, ax 47 | end; 48 | end; 49 | 50 | procedure GetDir( Drive: Byte; var Dir: String); 51 | var 52 | Buf: array [0..255] of Char; 53 | begin 54 | asm 55 | mov al, Drive 56 | or al, al 57 | jnz @@1 58 | mov eax, $1900 59 | int $21 60 | inc al 61 | mov Drive, al 62 | 63 | @@1: 64 | mov ah, $47 65 | mov dl, Drive 66 | lea esi, Buf 67 | int $21 68 | jc @@exit 69 | xor ax, ax 70 | @@exit: 71 | mov InOutRes, ax 72 | end; 73 | if InOutRes = 0 then 74 | FromASCIIZ( @Buf, Dir); 75 | Dir := Chr( Drive + Ord( 'A') - 1) + ':\' + Dir; 76 | end; 77 | 78 | -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/DIRH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/DIRH.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/FILEH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/FILEH.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/HEAP.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/HEAP.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/HEAPH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/HEAPH.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | ASM=tasm32 3 | PPRO=ppro 4 | OBJ=..\..\..\obj 5 | UNITS=..\..\..\units 6 | 7 | system.obj: system.pas \ 8 | mathh.inc math.inc \ 9 | stringh.inc string.inc \ 10 | seth.inc set.inc \ 11 | texth.inc text.inc \ 12 | fileh.inc file.inc \ 13 | dirh.inc dir.inc \ 14 | heaph.inc heap.inc \ 15 | valh.inc val.inc 16 | $(PPRO) -Cs system.pas 17 | copy system.obj $(OBJ)\system.obj 18 | copy system.pu $(UNITS)\system.pu 19 | # del system.asm 20 | # del system.lst 21 | del system.obj 22 | del system.pu 23 | -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/MATH.INC: -------------------------------------------------------------------------------- 1 | 2 | 3 | function Trunc( R: Extended): longint; assembler; 4 | var 5 | Temp: longint; 6 | TempWord, 7 | CtrlWord : word; 8 | asm 9 | fstcw word ptr [CtrlWord] 10 | mov ax,word ptr [CtrlWord] 11 | {and ax,$F3FF} 12 | or ax,$0C00 13 | mov word ptr [TempWord],ax 14 | fldcw word ptr [TempWord] 15 | 16 | fld tbyte ptr [r] 17 | fistp dword ptr [Temp] 18 | 19 | fldcw word ptr [CtrlWord] 20 | mov eax, Temp 21 | end; 22 | 23 | function Round( R: Extended): LongInt; assembler; 24 | var 25 | Temp: longint; 26 | TempWord, 27 | CtrlWord : word; 28 | asm 29 | fstcw word ptr [CtrlWord] 30 | mov ax, CtrlWord 31 | and ax, $F3FF 32 | mov word ptr [TempWord],ax 33 | fldcw word ptr [TempWord] 34 | 35 | fld tbyte ptr [r] 36 | fistp dword ptr [Temp] 37 | 38 | fldcw word ptr [CtrlWord] 39 | mov eax, Temp 40 | end; 41 | 42 | function Int( R: Extended): Extended; assembler; 43 | var 44 | TempWord, 45 | CtrlWord : word; 46 | asm 47 | fstcw word ptr [CtrlWord] 48 | mov ax,word ptr [CtrlWord] 49 | {and ax,$F3FF} 50 | or ax,$0C00 51 | mov word ptr [TempWord],ax 52 | fldcw word ptr [TempWord] 53 | 54 | fld tbyte ptr [r] 55 | frndint 56 | 57 | fldcw word ptr [CtrlWord] 58 | end; 59 | 60 | function Frac( R: Extended): Extended; assembler; 61 | var 62 | TempWord, 63 | CtrlWord : word; 64 | asm 65 | fstcw word ptr [CtrlWord] 66 | mov ax,word ptr [CtrlWord] 67 | {and ax,$F3FF} 68 | or ax,$0C00 69 | mov word ptr [TempWord],ax 70 | fldcw word ptr [TempWord] 71 | 72 | fld tbyte ptr [R] 73 | fld tbyte ptr [R] 74 | 75 | frndint 76 | fsub 77 | 78 | fldcw word ptr [CtrlWord] 79 | end; 80 | 81 | function Exp( R: Extended): Extended; assembler; 82 | var 83 | CtrlWord, TempWord: Word; 84 | asm 85 | fld tbyte ptr [R] 86 | fldl2e 87 | fmulp 88 | fstcw CtrlWord 89 | fwait 90 | mov ax, CtrlWord 91 | and ax, $F3FF 92 | mov TempWord, ax 93 | fldcw TempWord 94 | fld st(0) 95 | frndint 96 | fldcw CtrlWord 97 | fxch st(1) 98 | fsub st, st(1) 99 | f2xm1 100 | fld1 101 | faddp 102 | fscale 103 | fstp st(1) 104 | end; 105 | 106 | function Ln( R: Extended): Extended; assembler; 107 | asm 108 | fldln2 109 | fld tbyte ptr [R] 110 | fyl2x 111 | end; 112 | 113 | -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/MATHH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/MATHH.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/SET.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/SET.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/SETH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/SETH.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/STRINGH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/STRINGH.INC -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/SYSTEM.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/SYSTEM.PAS -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/TEXTH.INC: -------------------------------------------------------------------------------- 1 | 2 | const 3 | 4 | fmClosed = $D7B0; 5 | fmInput = $D7B1; 6 | fmOutput = $D7B2; 7 | fmInOut = $D7B3; 8 | fmAppend = $D7B4; 9 | 10 | NameLength = 79; 11 | 12 | type 13 | 14 | TextBuf = array[0..127] of Char; 15 | 16 | TextRec = record 17 | Handle : Word; 18 | Mode : Word; 19 | BufSize : LongInt; 20 | BufPos : Word; 21 | BufEnd : Word; 22 | BufPtr : ^TextBuf; 23 | OpenFunc : Pointer; 24 | InOutFunc : Pointer; 25 | FlushFunc : Pointer; 26 | CloseFunc : Pointer; 27 | UserData : array[1..16] of Byte; 28 | Name : array [0..NameLength] of Char; 29 | Buffer : TextBuf; 30 | end; 31 | 32 | 33 | procedure Reset( var TextFile: Text); 34 | procedure ReWrite( var TextFile: Text); 35 | procedure Close( var TextFile: Text); 36 | procedure Append( var TextFile: Text); 37 | procedure Flush( var TextFile: Text); 38 | 39 | function EOF( var TextFile: Text): Boolean; 40 | function EOLn( var TextFile: Text): Boolean; 41 | function SeekEOF( var TextFile: Text): Boolean; 42 | function SeekEOLn( var TextFile: Text): Boolean; 43 | 44 | procedure ReName( var TextFile: Text; const NewName: String); 45 | procedure Erase( var TextFile: Text); 46 | 47 | procedure SetTextBuf( var TextFile: Text; var Buffer; Size: LongInt); 48 | -------------------------------------------------------------------------------- /RTL/WDOSX/SYSTEM/VALH.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/RTL/WDOSX/SYSTEM/VALH.INC -------------------------------------------------------------------------------- /SOURCE/ASMCODE.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/ASMCODE.PAS -------------------------------------------------------------------------------- /SOURCE/ASMOPT.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/ASMOPT.PAS -------------------------------------------------------------------------------- /SOURCE/BPMAKE.BAT: -------------------------------------------------------------------------------- 1 | make -fmakefile.bp -------------------------------------------------------------------------------- /SOURCE/CODE.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/CODE.PAS -------------------------------------------------------------------------------- /SOURCE/COMPILER.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/COMPILER.PAS -------------------------------------------------------------------------------- /SOURCE/CONFIG.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/CONFIG.PAS -------------------------------------------------------------------------------- /SOURCE/ERRORS.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/ERRORS.PAS -------------------------------------------------------------------------------- /SOURCE/ERRORS.RUS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/ERRORS.RUS -------------------------------------------------------------------------------- /SOURCE/IASM386.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/IASM386.PAS -------------------------------------------------------------------------------- /SOURCE/MAKEFILE: -------------------------------------------------------------------------------- 1 | 2 | BPC=bpc 3 | PPRO=PPRO 4 | 5 | 6 | all: pproc.exe ppro.exe 7 | 8 | pproc.exe : pproc.pas asmcode.pas basmcomp.pas code.pas codeopt.pas \ 9 | compiler.pas config.pas errors.pas iasm386.pas pascomp.pas scanner.pas \ 10 | stdlib.pas symbols.pas tools.pas cg_flat.pas filecoll.pas 11 | $(PPRO) pproc.pas /TWDOSX /D_DEBUG 12 | copy pproc.exe ..\bin\pproc.exe 13 | # del *.asm 14 | # del *.lst 15 | del *.pu 16 | # del build.bat 17 | # del filelist 18 | # del *.obj 19 | del *.map 20 | del pproc.exe 21 | 22 | ppro.exe : ppro.pas stdlib.pas 23 | $(BPC) /CD ppro.pas /m /DTP /v /gd /DDEBUG 24 | copy ppro.exe ..\bin\ppro.exe 25 | del ppro.exe 26 | -------------------------------------------------------------------------------- /SOURCE/MAKEFILE.BP: -------------------------------------------------------------------------------- 1 | 2 | PC=bpc 3 | 4 | all: ppro.exe pproc.exe 5 | 6 | pproc.exe : pproc.pas asmcode.pas basmcomp.pas code.pas codeopt.pas \ 7 | compiler.pas config.pas errors.pas iasm386.pas pascomp.pas scanner.pas \ 8 | stdlib.pas symbols.pas tools.pas cg_flat.pas filecoll.pas asmopt.pas 9 | $(PC) /CP pproc.pas /m /DTP /v /gd /DDEBUG 10 | copy pproc.exe ..\bin\pproc.exe 11 | del pproc.exe 12 | 13 | ppro.exe : ppro.pas stdlib.pas 14 | $(PC) /CD ppro.pas /m /DTP /v /gd /DDEBUG 15 | copy ppro.exe ..\bin\ppro.exe 16 | del ppro.exe 17 | -------------------------------------------------------------------------------- /SOURCE/PASCOMP.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/PASCOMP.PAS -------------------------------------------------------------------------------- /SOURCE/PPDEBUG.BAT: -------------------------------------------------------------------------------- 1 | ppro pproc -D_DEBUG -D___EXTDEBUG -------------------------------------------------------------------------------- /SOURCE/PPRO.CFG: -------------------------------------------------------------------------------- 1 | /U..\UNITS 2 | /I..\UNITS 3 | /O..\OBJ 4 | /Meng 5 | /TWDOSX -------------------------------------------------------------------------------- /SOURCE/PPRO.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/PPRO.PAS -------------------------------------------------------------------------------- /SOURCE/PPRO.SRC: -------------------------------------------------------------------------------- 1 | [WDOSX] 2 | ; WDOSX platform configuration 3 | 4 | ; Assembler file name 5 | ASSEMBLER='TASM32' 6 | ;ASSEMBLER='C:\ASM\NASM\NASMW.EXE' 7 | ; Assembler command line 8 | ASSEMBLEROPTIONS='/ml /t $asmfile$, $objfile$' 9 | ;ASSEMBLEROPTIONS='-f obj $asmfile$ -o $objfile$' 10 | 11 | ; Linker file name 12 | LINKER='TLINK32' 13 | ;LINKER='ALINK' 14 | ; Linker command line 15 | LINKEROPTIONS='/Tpe /c /Sc:$stackcommitsize$ @FILELIST, $exefile$' 16 | ;LINKEROPTIONS='-c -oPE -stackcommitsize $stackcommitsize$ -o $exefile$ @FILELIST' 17 | ; Separate file names in response file by eol or by space 18 | SEPARATEBYEOL='NO' 19 | ;SEPARATEBYEOL='YES' 20 | 21 | ; Stub tool file name 22 | STUBER='STUBIT' 23 | ;STUBER='' 24 | ; Stub tool command line 25 | STUBEROPTIONS='-nowfse $exefile$' 26 | 27 | ; File extensions 28 | UNITEXTENSION='.PU' 29 | OBJEXTENSION='.OBJ' 30 | ASMEXTENSION='.ASM' 31 | 32 | ; Stack sizes 33 | RESERVESTACKSIZE='0'; 34 | COMMITSTACKSIZE='65536'; 35 | 36 | [DOS32] 37 | ; DOS32 platform configuration 38 | 39 | ASSEMBLER='TASM32' 40 | ;ASSEMBLER='C:\ASM\NASM\NASMW.EXE' 41 | ASSEMBLEROPTIONS='/ml /t $asmfile$, $objfile$' 42 | ;ASSEMBLEROPTIONS='-f obj $asmfile$ -o $objfile$' 43 | LINKER='DLINK' 44 | LINKEROPTIONS='/c @FILELIST, $exefile$' 45 | STUBER='' 46 | STUBEROPTIONS='' 47 | UNITEXTENSION='.PUD' 48 | OBJEXTENSION='.OBD' 49 | ASMEXTENSION='.ASM' 50 | RESERVESTACKSIZE='65536'; 51 | COMMITSTACKSIZE='0'; 52 | 53 | EXTENDEDFLOATINSTRUCTIONS='YES' 54 | ;EXTENDEDFLOATINSTRUCTIONS='NO' 55 | NASMPUSHCONST='NO' 56 | ;NASMPUSHCONST='YES' 57 | NASMSEGMENTOVERRIDE='NO' 58 | ;NASMSEGMENTOVERRIDE='YES' 59 | 60 | 61 | [TASM32] 62 | ; Assembler syntax switches 63 | EXTENDEDFLOATINSTRUCTIONS='YES' 64 | NASMPUSHCONST='NO' 65 | NASMSEGMENTOVERRIDE='NO' 66 | 67 | CPU = '.386P' 68 | FPU = '.387' 69 | MODEL = '.MODEL FLAT' 70 | CODE = '.CODE' 71 | DATA = '.DATA' 72 | DATA_ = '.DATA?' 73 | STACK = '.STACK' 74 | MAIN = 'main' 75 | START = '' 76 | END = 'END' 77 | PROC = 'PROC' 78 | ENDP = 'ENDP' 79 | BPTR = 'byte ptr' 80 | WPTR = 'word ptr' 81 | DPTR = 'dword ptr' 82 | PPTR = 'pword ptr' 83 | QPTR = 'qword ptr' 84 | TPTR = 'tbyte ptr' 85 | FPTR = 'far ptr' 86 | NPTR = 'near ptr' 87 | OFFSET = 'offset' 88 | DB = 'DB' 89 | DW = 'DW' 90 | DD = 'DD' 91 | DQ = 'DQ' 92 | DT = 'DT' 93 | DUP = 'DUP(?)' 94 | RESB = 'DB' 95 | EXTRN = 'EXTRN' 96 | PUBLIC = 'PUBLIC' 97 | ST = 'ST(#)' 98 | NEAR = ': NEAR' 99 | BYTE = ': BYTE' 100 | 101 | [NASMW] 102 | ; Assembler syntax switches 103 | EXTENDEDFLOATINSTRUCTIONS='NO' 104 | NASMPUSHCONST='YES' 105 | NASMSEGMENTOVERRIDE='YES' 106 | 107 | CPU = '[BITS 32]' 108 | FPU = '' 109 | MODEL = '' 110 | CODE = 'SECTION _text public flat class=CODE use32' 111 | DATA = 'SECTION _data public flat class=DATA use32' 112 | DATA_ = 'SECTION _bss public flat class=BSS use32' 113 | STACK = '.STACK' 114 | MAIN = '_main' 115 | START = '..start' 116 | END = ';' 117 | PROC = ':' 118 | ENDP = '' 119 | BPTR = 'byte' 120 | WPTR = 'word' 121 | DPTR = 'dword' 122 | PPTR = 'far' 123 | QPTR = 'qword' 124 | TPTR = 'tword' 125 | FPTR = 'far' 126 | NPTR = 'near' 127 | OFFSET = '' 128 | DB = 'DB' 129 | DW = 'DW' 130 | DD = 'DD' 131 | DQ = 'DQ' 132 | DT = 'DT' 133 | DUP = '' 134 | RESB = 'RESB' 135 | EXTRN = 'EXTERN' 136 | PUBLIC = 'GLOBAL' 137 | ST = 'ST#' 138 | NEAR = '' 139 | BYTE = '' -------------------------------------------------------------------------------- /SOURCE/PPROC.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/PPROC.PAS -------------------------------------------------------------------------------- /SOURCE/SCANNER.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/SCANNER.PAS -------------------------------------------------------------------------------- /SOURCE/STDLIB.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/STDLIB.PAS -------------------------------------------------------------------------------- /SOURCE/SYMBOLS.PAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/SOURCE/SYMBOLS.PAS -------------------------------------------------------------------------------- /UNITS/CRT.PU: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/CRT.PU -------------------------------------------------------------------------------- /UNITS/CRT.PUD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/CRT.PUD -------------------------------------------------------------------------------- /UNITS/DOS.PU: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/DOS.PU -------------------------------------------------------------------------------- /UNITS/DOS.PUD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/DOS.PUD -------------------------------------------------------------------------------- /UNITS/OBJECTS.PU: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/OBJECTS.PU -------------------------------------------------------------------------------- /UNITS/OBJECTS.PUD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/OBJECTS.PUD -------------------------------------------------------------------------------- /UNITS/STRINGS.PU: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/STRINGS.PU -------------------------------------------------------------------------------- /UNITS/STRINGS.PUD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/STRINGS.PUD -------------------------------------------------------------------------------- /UNITS/SYSTEM.PU: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/SYSTEM.PU -------------------------------------------------------------------------------- /UNITS/SYSTEM.PUD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/UNITS/SYSTEM.PUD -------------------------------------------------------------------------------- /WDOSX96B/BIN/ADVAPI32.WDL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/ADVAPI32.WDL -------------------------------------------------------------------------------- /WDOSX96B/BIN/KERNEL32.WDL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/KERNEL32.WDL -------------------------------------------------------------------------------- /WDOSX96B/BIN/OLEAUT32.WDL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/OLEAUT32.WDL -------------------------------------------------------------------------------- /WDOSX96B/BIN/STUBIT.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/STUBIT.EXE -------------------------------------------------------------------------------- /WDOSX96B/BIN/USER32.WDL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/USER32.WDL -------------------------------------------------------------------------------- /WDOSX96B/BIN/WADD.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/WADD.EXE -------------------------------------------------------------------------------- /WDOSX96B/BIN/WDIR.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/WDIR.EXE -------------------------------------------------------------------------------- /WDOSX96B/BIN/WDMEM.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/WDMEM.EXE -------------------------------------------------------------------------------- /WDOSX96B/BIN/WUDEBUG.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/BIN/WUDEBUG.EXE -------------------------------------------------------------------------------- /WDOSX96B/LICENSE.TXT: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | ## WDOSX license agreement ## 3 | ############################################################################## 4 | 5 | 6 | THIS SOFTWARE IS PROVIDED "AS IS". IN NO EVENT SHALL I, THE AUTOR, BE LIABLE 7 | FOR ANY KIND OF LOSS OR DAMAGE ARISING OUT OF THE USE, ABUSE OR THE INABILITY 8 | TO USE THIS SOFTWRAE, NEITHER SHALL CO-AUTHORS AND CONTRIBUTORS. USE IT AT YOUR 9 | OWN RISK! 10 | 11 | THIS SOFTWARE COMES WITHOUT ANY KIND OF WARRANTY, EITHER EXPRESSED OR IMPLIED, 12 | INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY OR 13 | FITNESS FOR A PARTICULAR PURPOSE. 14 | 15 | THIS SOFTWARE IS FREEWARE. NON- EXCLUSIVE PERMISSION TO USE THIS SOFTWARE IN 16 | ITS UNMODIFIED FORM FOR THE SOLE PURPOSE OF BUILDING PROTECTED MODE DOS 17 | APPLICATIONS HEREBY GRANTED. 18 | 19 | YOU MAY FURTHER REDISTRIBUTE COPIES OF THIS SOFTWARE PROVIDED YOU INCLUDE ALL 20 | OF THE FILES THAT CAME WITH THE ORIGNAL PACKAGE. YOU ARE NOT ALLOWED TO 21 | REDISTRIBUTE MODIFIED COPIES OF THE SOFTWARE OR MERE PARTS OF IT. 22 | 23 | YOU MAY FURTHER SELL APPLICATIONS USING A DOS EXTENDER STUB FROM THIS PACKAGE, 24 | BUT YOU ARE NOT ALLOWED TO SELL THIS SOFTWARE AS A STAND ALONE PRODUCT OR AS 25 | PART OF A SOFTWARE COMPILATION, EXCEPT FOR A SMALL, USUAL FEE COVERING THE 26 | REDISTRIBUTION ITSELF. 27 | 28 | THE SOURCE CODE CONTAINED IN THIS PACKAGE MAY BE MODIFIED FOR YOUR OWN USE. 29 | HOWEVER, MODIFIED VERSIONS OF THE SOURCE CODE OR BINARIES COMPILED FROM 30 | MODIFIED VERSIONS OF THE SOURCE CODE MUST NOT BE REDISTRIBUTED WITHOUT PRIOR 31 | PERMISSION, WITH ONE EXCEPTION: YOU MAY REDISTRIBUTE BINARIES OBTAINED FROM 32 | MODIFIED VERSIONS OF THE SOURCE CODE AS PART OF AN APPLICATION THAT USES WDOSX 33 | AS ITS DOS EXTENDER IF MODIFICATIONS WERE NECESSARY TO FIX BUGS OR ADD MISSING 34 | FUNCTIONALITY FOR THE NEEDS OF YOUR PARTICULAR APPLICATION. 35 | 36 | EITHER WAY, THE PREFERRED APPROACH IS THAT YOU CONTACT THE AUTHOR (ME) IF YOU 37 | FEEL THE CHANGES YOU MADE TO THE SOURCE CODE SHOULD BE INCORPORATED INTO 38 | FUTURE VERSIONS. 39 | 40 | IF YOU DON'T AGREE WITH THIS TERMS OR IF YOUR JURISTDICTION DOES NOT ALLOW THE 41 | EXCLUSION OF WARRANTY AND LIABILITY AS STATED ABOVE YOU ARE NOT ALLOWED TO USE 42 | THIS SOFTWARE AT ALL. 43 | 44 | THIS SOFTWARE IS COPYRIGHT (C)1996-1999 MICHAEL TIPPACH, ALL RIGHTS RESERVED. 45 | 46 | ENGLISH: IF YOU MAKE ME WISH I NEVER HAD RELEASED IT, YOU SHOULD ROT IN HELL! 47 | 48 | 49 | Author contact: 50 | 51 | Michael Tippach 52 | Im Gries 14a 53 | 86919 Utting a.A. 54 | Germany 55 | e-mail: wuschel@geocities.com 56 | mtippach@gmx.net 57 | 58 | 59 | ---------------------------- End Of Landshark Baid -------------------------- 60 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/BUILD.ME/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/build.me/makefile 1.2 2000/05/28 12:39:35 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.2 2000/05/28 12:39:35 MikeT 13 | # Add wdmem utility. 14 | # 15 | # Revision 1.1 1999/02/07 20:47:22 MikeT 16 | # Initial check in. 17 | # 18 | # 19 | # ---------------------------------------------------------------------------- 20 | # 21 | # Build all the WDOSX binaries 22 | # 23 | 24 | CO = coo.exe 25 | 26 | makefile : stubit.exe wudebug.exe wadd.exe wdir.exe kernel32.wdl user32.wdl \ 27 | oleaut32.wdl advapi32.wdl wdmem.exe 28 | 29 | stubit.exe : ..\util\stubit.exe 30 | COPY ..\util\stubit.exe 31 | 32 | wudebug.exe : ..\deb\wudebug.exe 33 | COPY ..\deb\wudebug.exe 34 | 35 | wadd.exe : ..\tools\wadd.exe 36 | COPY ..\tools\wadd.exe 37 | 38 | wdir.exe : ..\tools\wdir.exe 39 | COPY ..\tools\wdir.exe 40 | 41 | wdmem.exe : ..\tools\wdmem.exe 42 | COPY ..\tools\wdmem.exe 43 | 44 | kernel32.wdl : ..\win32\kernel32.wdl 45 | COPY ..\win32\kernel32.wdl 46 | 47 | user32.wdl : ..\win32\user32.wdl 48 | COPY ..\win32\user32.wdl 49 | 50 | oleaut32.wdl : ..\win32\oleaut32.wdl 51 | COPY ..\win32\oleaut32.wdl 52 | 53 | advapi32.wdl : ..\win32\advapi32.wdl 54 | COPY ..\win32\advapi32.wdl 55 | 56 | 57 | ..\util\stubit.exe : 58 | CD ..\util 59 | make stubit.exe 60 | CD ..\build.me 61 | 62 | ..\deb\wudebug.exe : 63 | CD ..\deb 64 | make wudebug.exe 65 | CD ..\build.me 66 | 67 | ..\tools\wadd.exe : 68 | CD ..\tools 69 | make wadd.exe 70 | CD ..\build.me 71 | 72 | ..\tools\wdir.exe : 73 | CD ..\tools 74 | make wdir.exe 75 | CD ..\build.me 76 | 77 | ..\tools\wdmem.exe : 78 | CD ..\tools 79 | make wdmem.exe 80 | CD ..\build.me 81 | 82 | ..\win32\kernel32.wdl : 83 | CD ..\win32 84 | make kernel32.wdl 85 | CD ..\build.me 86 | 87 | ..\win32\user32.wdl : 88 | CD ..\win32 89 | make user32.wdl 90 | CD ..\build.me 91 | 92 | ..\win32\oleaut32.wdl : 93 | CD ..\win32 94 | make oleaut32.wdl 95 | CD ..\build.me 96 | 97 | ..\win32\advapi32.wdl : 98 | CD ..\win32 99 | make advapi32.wdl 100 | CD ..\build.me 101 | 102 | get : 103 | MD ..\win32 104 | CD ..\win32 105 | $(CO) makefile 106 | make get 107 | MD ..\util 108 | CD ..\util 109 | $(CO) makefile 110 | make get 111 | MD ..\tools 112 | CD ..\tools 113 | $(CO) makefile 114 | make get 115 | MD ..\deb 116 | CD ..\deb 117 | $(CO) makefile 118 | make get 119 | CD ..\build.me 120 | 121 | clean : 122 | CD ..\util 123 | make clean 124 | CD ..\win32 125 | make clean 126 | CD ..\tools 127 | make clean 128 | CD ..\deb 129 | make clean 130 | CD ..\build.me 131 | DEL *.exe 132 | DEL *.wdl 133 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BDOS.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC bdos 5 | 6 | .code 7 | 8 | bdos proc near 9 | 10 | sub eax,eax 11 | mov ah,[esp+4] 12 | mov edx,[esp+8] 13 | mov al,[esp+12] 14 | int 21h 15 | ret 16 | 17 | bdos endp 18 | 19 | end 20 | 21 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BDOSPTR.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | EXTRN __IOerror:NEAR 5 | 6 | PUBLIC bdosptr 7 | 8 | .code 9 | 10 | bdosptr proc near 11 | 12 | sub eax,eax 13 | mov ah,[esp+4] 14 | mov edx,[esp+8] 15 | mov al,[esp+12] 16 | clc 17 | int 21h 18 | jc short BdosErr 19 | ret 20 | 21 | BdosErr: 22 | push eax 23 | call __IOerror 24 | pop eax 25 | ret 26 | 27 | bdosptr endp 28 | 29 | end 30 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOSCOM.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC bioscom 5 | 6 | .code 7 | 8 | bioscom proc near 9 | 10 | sub eax,eax 11 | mov ah,[esp+4] 12 | mov al,[esp+8] 13 | mov edx,[esp+12] 14 | int 14h 15 | ret 16 | 17 | bioscom endp 18 | 19 | end 20 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOSEQU.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC biosequip 5 | PUBLIC biosmemory 6 | PUBLIC biostime 7 | 8 | .code 9 | 10 | biosequip proc near 11 | sub eax,eax 12 | int 11h 13 | ret 14 | biosequip endp 15 | 16 | 17 | biosmemory proc near 18 | 19 | sub eax,eax 20 | int 12h 21 | ret 22 | 23 | biosmemory endp 24 | 25 | biostime proc near 26 | 27 | mov ah,[esp+4] 28 | mov edx,[esp+8] 29 | shld ecx,edx,16 30 | int 1Ah 31 | shrd eax,edx,16 32 | shrd eax,ecx,16 33 | ret 34 | 35 | biostime endp 36 | 37 | end 38 | 39 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOSKEY.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC bioskey 5 | 6 | .code 7 | 8 | bioskey proc near 9 | 10 | sub eax,eax 11 | mov ah,[esp+4] 12 | int 16h 13 | jz short @@02 14 | test byte ptr [esp+4],1 15 | jnz short @@00 16 | ret 17 | @@00: 18 | cmp eax,1 19 | @@01: 20 | sbb edx,edx 21 | or eax,edx 22 | ret 23 | @@02: 24 | test byte ptr [esp+4],1 25 | jnz short @@01 26 | ret 27 | 28 | bioskey endp 29 | 30 | end 31 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOSPRIN.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC biosprint 5 | 6 | .code 7 | 8 | biosprint proc near 9 | 10 | mov ah,[esp+4] 11 | mov al,[esp+8] 12 | mov dx,[esp+12] 13 | int 17h 14 | movzx eax,ah 15 | ret 16 | 17 | biosprint endp 18 | 19 | end 20 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOS_COM.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC _bios_serialcom 5 | 6 | .code 7 | 8 | _bios_serialcom proc near 9 | 10 | mov ah,[esp+4] 11 | mov edx,[esp+8] 12 | mov al,[esp+12] 13 | int 14h 14 | movzx eax,ax 15 | ret 16 | 17 | _bios_serialcom endp 18 | 19 | end 20 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOS_EQU.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC _bios_equiplist 5 | PUBLIC _bios_memsize 6 | PUBLIC _bios_timeofday 7 | 8 | .code 9 | 10 | _bios_equiplist proc near 11 | 12 | sub eax,eax 13 | int 11h 14 | ret 15 | 16 | _bios_equiplist endp 17 | 18 | _bios_memsize proc near 19 | 20 | sub eax,eax 21 | int 12h 22 | ret 23 | 24 | _bios_memsize endp 25 | 26 | _bios_timeofday proc near 27 | 28 | mov edx,[esp+8] 29 | mov edx,[edx] 30 | shld ecx,edx,16 31 | sub eax,eax 32 | mov ah,[esp+4] 33 | int 1ah 34 | cmp byte ptr [esp+4],0 35 | jnz @@00 36 | shl edx,16 37 | shld ecx,edx,16 38 | mov edx,[esp+8] 39 | mov [edx],ecx 40 | @@00: 41 | ret 42 | 43 | _bios_timeofday endp 44 | 45 | end 46 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOS_KEY.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC _bios_keybrd 5 | 6 | .code 7 | 8 | _bios_keybrd proc near 9 | 10 | sub eax,eax 11 | mov ah,[esp+4] 12 | int 16h 13 | jz short @@02 14 | test byte ptr [esp+4],1 15 | jnz short @@00 16 | ret 17 | @@00: 18 | cmp eax,1 19 | @@01: 20 | sbb edx,edx 21 | or eax,edx 22 | ret 23 | @@02: 24 | test byte ptr [esp+4],1 25 | jnz short @@01 26 | ret 27 | 28 | _bios_keybrd endp 29 | 30 | end 31 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/BIOS_PRN.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC _bios_printer 5 | 6 | .code 7 | 8 | _bios_printer proc near 9 | 10 | mov ah,[esp+4] 11 | mov edx,[esp+8] 12 | mov al,[esp+12] 13 | int 17h 14 | movzx eax,ah 15 | ret 16 | 17 | _bios_printer endp 18 | 19 | end 20 | 21 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/CALLSTR.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | include dpmi32.inc 5 | 6 | PUBLIC RmCallStruc 7 | 8 | .data? 9 | 10 | __WDOSXRmRegs RmCallStruc <> 11 | 12 | end 13 | 14 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/CORELEFT.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC coreleft 5 | 6 | .code 7 | 8 | coreleft proc near 9 | 10 | push edi 11 | sub esp,32 12 | mov edi,esp 13 | mov eax,500h 14 | int 31h 15 | pop eax 16 | add esp,28 17 | pop edi 18 | ret 19 | 20 | coreleft endp 21 | 22 | end 23 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/COUNTRY.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | include dpmi32.inc 5 | 6 | EXTRN __WDOSXRmRegs:RmCallStruc 7 | 8 | PUBLIC country 9 | 10 | .code 11 | 12 | country proc near 13 | 14 | ; allocate a small DOS memory block 15 | 16 | mov eax,100h 17 | push ebx 18 | mov ebx,3 19 | int 31h 20 | pop ebx 21 | jc short Error 22 | 23 | mov __WDOSXRmRegs._ds,ax 24 | mov __WDOSXRmRegs._dx,0 25 | 26 | mov ah,38h 27 | mov al,[esp+4] 28 | mov __WDOSXRmRegs._eax,eax 29 | push ebx 30 | push edi 31 | lea edi,__WDOSXRmRegs 32 | mov bl,21h 33 | sub ecx,ecx 34 | mov eax,300h 35 | int 31h 36 | pop edi 37 | pop ebx 38 | jc short Error1 39 | test byte ptr [__WDOSXRmRegs._flags],1 40 | jnz short Error1 41 | push gs 42 | mov gs,edx 43 | mov eax,[esp+12] 44 | mov ecx,8 45 | @@00: 46 | mov edx,gs:[ecx*4-4] 47 | mov [eax+ecx*4-4],edx 48 | loop short @@00 49 | 50 | mov edx,gs 51 | mov eax,0101h 52 | int 31h 53 | pop gs 54 | mov eax,[esp+8] 55 | ret 56 | Error1: 57 | mov eax,0101h 58 | int 31h 59 | Error: 60 | sub eax,eax 61 | ret 62 | 63 | country endp 64 | 65 | end 66 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/CTRLBRK.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC ctrlbrk 5 | 6 | ; Note that while under plain DOS, WDOSX INT23's will be swallowed by wdosx 7 | ; either. So, this function has been implemented as a dummy. The handler you 8 | ; provide will never be called. I think this is something we can live with. 9 | 10 | .code 11 | 12 | OurHandler: 13 | 14 | and byte ptr [esp+8],0feh 15 | iretd 16 | 17 | 18 | ctrlbrk proc near 19 | 20 | mov edx,offset OurHandler 21 | mov ecx,cs 22 | mov eax,0205h 23 | push ebx 24 | mov bl,23h 25 | int 31h 26 | pop ebx 27 | sbb eax,eax 28 | inc eax 29 | ret 30 | 31 | ctrlbrk endp 32 | 33 | end 34 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/DELAY.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC delay 5 | 6 | .code 7 | 8 | delay proc near 9 | 10 | mov edx,[esp+4] 11 | shl edx,10 12 | shld ecx,edx,16 13 | mov ah,86h 14 | int 15h 15 | ret 16 | 17 | delay endp 18 | 19 | end 20 | 21 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/DOSCMMIT.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC _dos_commit 5 | 6 | .code 7 | 8 | _dos_commit proc near 9 | 10 | mov ah,0dh 11 | int 21h 12 | sub eax,eax 13 | ret 14 | 15 | _dos_commit endp 16 | 17 | end 18 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/DOSEXT.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC dosexterr 5 | 6 | include dpmi32.inc 7 | 8 | EXTRN __WDOSXRmRegs:RmCallStruc 9 | 10 | .code 11 | 12 | dosexterr proc near 13 | 14 | push ebx 15 | push edi 16 | mov __WDOSXRmRegs._ah,59h 17 | mov __WDOSXRmRegs._bx,0 18 | sub ecx,ecx 19 | lea edi,__WDOSXRmRegs 20 | mov bl,21h 21 | mov eax,300h 22 | int 31h 23 | pop edi 24 | pop ebx 25 | mov edx,[esp+4] 26 | mov eax,__WDOSXRmRegs._ebx 27 | mov [edx+4],ah 28 | mov [edx+5],al 29 | mov eax,__WDOSXRmRegs._ebx 30 | mov [edx+6],ah 31 | movzx eax,__WDOSXRmRegs._ax 32 | mov [edx],ax 33 | ret 34 | 35 | dosexterr endp 36 | 37 | end 38 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/DPMI32.INC: -------------------------------------------------------------------------------- 1 | 2 | RealModePtr struc 3 | 4 | RmOffset dw ? 5 | RmSegment dw ? 6 | 7 | RealModePtr ends 8 | 9 | ProtModePtr struc 10 | 11 | PmOffset dd ? 12 | PmSelector dd ? 13 | 14 | ProtModePtr ends 15 | 16 | 17 | RmCallStruc struc 18 | 19 | _edi label dword 20 | _di dw ? 21 | dw ? 22 | _esi label dword 23 | _si dw ? 24 | dw ? 25 | _ebp label dword 26 | _bp dw ? 27 | dw ? 28 | _esp label dword 29 | _spl dw ? 30 | dw ? 31 | _ebx label dword 32 | _bx label word 33 | _bl db ? 34 | _bh db ? 35 | dw ? 36 | _edx label dword 37 | _dx label word 38 | _dl db ? 39 | _dh db ? 40 | dw ? 41 | _ecx label dword 42 | _cx label word 43 | _cl db ? 44 | _ch db ? 45 | dw ? 46 | _eax label dword 47 | _ax label word 48 | _al db ? 49 | _ah db ? 50 | dw ? 51 | _flags dw ? 52 | _es dw ? 53 | _ds dw ? 54 | _fs dw ? 55 | _gs dw ? 56 | _ip dw ? 57 | _cs dw ? 58 | _sp dw ? 59 | _ss dw ? 60 | 61 | RmCallStruc ends 62 | 63 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/DPMI32.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/C/BORLANDC/DPMI32/DPMI32.LIB -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/GENINT.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC _genericInterrupt 5 | 6 | .code 7 | 8 | 9 | _genericInterrupt proc near 10 | 11 | push eax 12 | mov eax,[esp+8] 13 | mov byte ptr ss:[offset PokeHere],al 14 | pop eax 15 | jmp short ClearQueue 16 | 17 | ClearQueue: 18 | int 0 19 | org $-1 20 | PokeHere db ? 21 | ret 22 | 23 | _genericInterrupt endp 24 | 25 | end 26 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/GETCBRK.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC getcbrk 5 | PUBLIC setcbrk 6 | 7 | .code 8 | 9 | getcbrk proc near 10 | 11 | mov eax,3300h 12 | int 21h 13 | sub eax,eax 14 | mov al,dl 15 | ret 16 | 17 | getcbrk endp 18 | 19 | setcbrk proc near 20 | 21 | mov eax,3301h 22 | mov dl,[esp+4] 23 | int 21h 24 | sub eax,eax 25 | mov al,dl 26 | ret 27 | 28 | setcbrk endp 29 | 30 | end 31 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/GETDTA.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC getdta 5 | 6 | ; the current version of WDOSX (0.93) does not support an extended 21/2f yet 7 | ; Don't use this one with WDOSX 0.93. I'm sure 0.94 will have support 8 | ; added. 9 | ; The DTA is in the real mode region at psp:[80h]. 10 | 11 | .code 12 | 13 | getdta proc near 14 | 15 | push ebx 16 | mov ah,2Fh 17 | int 21h 18 | mov eax,ebx 19 | pop ebx 20 | ret 21 | 22 | getdta endp 23 | 24 | end 25 | 26 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/GETFAT.ASM: -------------------------------------------------------------------------------- 1 | 2 | .386 3 | .model flat,C 4 | 5 | PUBLIC getfat 6 | 7 | include dpmi32.inc 8 | 9 | EXTRN __WDOSXRmRegs:RmCallStruc 10 | 11 | .code 12 | 13 | getfat proc near 14 | 15 | push ebx 16 | push edi 17 | mov eax,[esp+12] 18 | mov __WDOSXRmRegs._ah,1ch 19 | mov __WDOSXRmRegs._edx,eax 20 | sub ecx,ecx 21 | lea edi,__WDOSXRmRegs 22 | mov bl,21h 23 | mov eax,300h 24 | int 31h 25 | mov ebx,ds 26 | mov eax,6 27 | int 31h 28 | shl ecx,16 29 | mov cx,dx 30 | pop edi 31 | pop ebx 32 | movzx eax,__WDOSXRmRegs._ds 33 | shl eax,4 34 | movzx edx,__WDOSXRmRegs._bx 35 | sub edx,ecx 36 | mov ah,[edx+eax] 37 | mov edx,[esp+8] 38 | mov al,__WDOSXRmRegs._al 39 | and eax,0ffffh 40 | mov [edx],eax 41 | movzx eax,__WDOSXRmRegs._dx 42 | mov [edx+4],edx 43 | movzx eax,__WDOSXRmRegs._cx 44 | mov [edx+8],eax 45 | ret 46 | 47 | getfat endp 48 | 49 | 50 | getfatd proc near 51 | 52 | push dword ptr [esp+4] 53 | push 0 54 | call getfat 55 | add esp,8 56 | ret 57 | 58 | getfatd endp 59 | 60 | end 61 | 62 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/GETPSP.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC getpsp 5 | 6 | .code 7 | 8 | getpsp proc near 9 | 10 | push ebx 11 | mov ah,62h 12 | int 21h 13 | movzx eax,bx 14 | pop ebx 15 | ret 16 | 17 | getpsp endp 18 | 19 | end 20 | 21 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/GETVERF.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC getverify 5 | PUBLIC setverify 6 | 7 | .code 8 | 9 | getverify proc near 10 | 11 | mov eax,5400h 12 | int 21h 13 | movzx eax,al 14 | ret 15 | 16 | getverify endp 17 | 18 | setverify proc near 19 | 20 | mov al,[esp+4] 21 | mov ah,2eh 22 | int 21h 23 | ret 24 | 25 | setverify endp 26 | 27 | end 28 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/INPORT.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC inport 5 | PUBLIC inportb 6 | PUBLIC inpw 7 | PUBLIC inp 8 | 9 | ; This one runs circles around Borland's implementation 10 | ; If speed really is a concern, alter the declarations in to fastcall. 11 | ; This code must be changed too, then. 12 | 13 | .code 14 | 15 | inport proc near 16 | 17 | inpw: 18 | mov edx,[esp+4] 19 | sub eax,eax 20 | in ax,dx 21 | ret 22 | 23 | inport endp 24 | 25 | inportb proc near 26 | 27 | inp: 28 | mov edx,[esp+4] 29 | sub eax,eax 30 | in al,dx 31 | ret 32 | 33 | inportb endp 34 | 35 | end 36 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/INT386.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | EXTRN _genericInterrupt:NEAR 5 | EXTRN _doserrno:DWORD 6 | EXTRN errno:DWORD 7 | EXTRN segread:NEAR 8 | 9 | PUBLIC int386 10 | PUBLIC int386x 11 | 12 | ; Note that the Borland routine had a bug that made it impossible to 13 | ; pass another DS: selector. Second one is that esi is not preserved upon 14 | ; return from the interrupt. The replacement code does not suffer from this. 15 | 16 | .code 17 | 18 | int386 proc near 19 | 20 | sub esp,12 21 | push esp 22 | call segread 23 | push dword ptr [esp+32] 24 | push dword ptr [esp+32] 25 | push dword ptr [esp+32] 26 | call int386x 27 | add esp,16 28 | ret 29 | 30 | int386 endp 31 | 32 | int386x proc near 33 | 34 | push ebp 35 | push ebx 36 | push esi 37 | push edi 38 | 39 | push ds 40 | push es 41 | push fs 42 | push gs 43 | 44 | mov ebp,[esp+12+32] 45 | mov es,word ptr [ebp] 46 | mov ds,word ptr [ebp+6] 47 | mov fs,word ptr [ebp+8] 48 | mov gs,word ptr [ebp+10] 49 | mov ebp,[esp+8+32] 50 | mov eax,[ebp] 51 | mov ebx,[ebp+4] 52 | mov ecx,[ebp+8] 53 | mov edx,[ebp+12] 54 | mov esi,[ebp+16] 55 | mov edi,[ebp+20] 56 | 57 | clc 58 | push dword ptr [esp+4+32] 59 | 60 | call _genericInterrupt 61 | 62 | mov ebp,[esp+12+32+4] 63 | mov [ebp],eax 64 | mov [ebp+4],ebx 65 | mov [ebp+8],ecx 66 | mov [ebp+12],edx 67 | mov [ebp+16],esi 68 | mov [ebp+20],edi 69 | 70 | pushfd 71 | pop edx 72 | mov [ebp+28],edx 73 | and edx,1 74 | mov [ebp+28],edx 75 | 76 | add esp,4 77 | 78 | mov ebp,[esp+16+32] 79 | 80 | mov word ptr [ebp],es 81 | mov word ptr [ebp+6],ds 82 | mov word ptr [ebp+8],fs 83 | mov word ptr [ebp+10],gs 84 | 85 | pop gs 86 | pop fs 87 | pop es 88 | pop ds 89 | 90 | ; this is stupid, but your program may rely on this behaviour: 91 | 92 | test eax,eax 93 | jnz short SkipErr 94 | 95 | mov _doserrno,eax 96 | mov errno,eax 97 | 98 | SkipErr: 99 | pop edi 100 | pop esi 101 | pop ebx 102 | pop ebp 103 | ret 104 | 105 | int386x endp 106 | 107 | end 108 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/IOCTL.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | EXTRN __IOerror:NEAR 5 | 6 | include dpmi32.inc 7 | EXTRN __WDOSXRmRegs:RmCallStruc 8 | 9 | PUBLIC ioctl 10 | 11 | .code 12 | 13 | ioctl proc near 14 | 15 | mov eax,[esp+8] 16 | mov ah,44h 17 | cmp al,2 18 | jc Simple 19 | cmp al,6 20 | jnc Simple 21 | 22 | mov __WDOSXRmRegs._eax,eax 23 | 24 | ; allocate a small DOS memory block 25 | 26 | mov eax,100h 27 | push ebx 28 | mov ebx,[esp+20] 29 | add ebx,15 30 | shr ebx,4 31 | int 31h 32 | pop ebx 33 | jc Error 34 | 35 | mov __WDOSXRmRegs._ds,ax 36 | mov __WDOSXRmRegs._dx,0 37 | 38 | test __WDOSXRmRegs._al,1 39 | jz @@nowrite 40 | 41 | push gs 42 | mov gs,edx 43 | mov eax,[esp+16] 44 | mov ecx,[esp+20] 45 | @@00: 46 | mov dl,[eax+ecx-1] 47 | mov gs:[ecx-1],dl 48 | loop short @@00 49 | mov edx,gs 50 | pop gs 51 | 52 | @@nowrite: 53 | mov eax,[esp+4] 54 | mov __WDOSXRmRegs._ebx,eax 55 | mov eax,[esp+16] 56 | mov __WDOSXRmRegs._ecx,eax 57 | push ebx 58 | push edi 59 | lea edi,__WDOSXRmRegs 60 | mov bl,21h 61 | sub ecx,ecx 62 | mov eax,300h 63 | int 31h 64 | pop edi 65 | pop ebx 66 | jc short Error1 67 | test byte ptr [__WDOSXRmRegs._flags],1 68 | jnz short Error1 69 | 70 | test __WDOSXRmRegs._al,1 71 | jnz @@notread 72 | 73 | push gs 74 | mov gs,edx 75 | mov eax,[esp+16] 76 | mov ecx,[esp+20] 77 | @@01: 78 | mov dl,gs:[ecx-1] 79 | mov [eax+ecx-1],dl 80 | loop short @@01 81 | 82 | mov edx,gs 83 | pop gs 84 | 85 | @@notread: 86 | mov eax,0101h 87 | int 31h 88 | mov eax,__WDOSXRmRegs._eax 89 | ret 90 | Error1: 91 | mov eax,0101h 92 | int 31h 93 | Error: 94 | mov eax,-1 95 | ret 96 | 97 | Simple: 98 | push ebx 99 | mov ebx,[esp+8] 100 | cmp al,1 101 | jnz short @@02 102 | mov edx,[esp+20] 103 | @@02: 104 | push eax 105 | int 21h 106 | pop ecx 107 | pop ebx 108 | 109 | ; 2do: set error information 110 | 111 | jc Error 112 | cmp cl,6 113 | jc @@03 114 | movsx eax,al 115 | ret 116 | @@03: 117 | movzx eax,dx 118 | ret 119 | 120 | ioctl endp 121 | 122 | end 123 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/MOVEDATA.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC movedata 5 | 6 | .code 7 | 8 | movedata proc near 9 | 10 | push ds 11 | push es 12 | push esi 13 | push edi 14 | cld 15 | mov ecx,[esp+20+16] 16 | mov esi,[esp+8+16] 17 | mov edi,[esp+16+16] 18 | mov es,dword ptr [esp+12+16] 19 | mov ds,dword ptr [esp+4+16] 20 | shr ecx,2 21 | rep movsd 22 | xor ecx,3 23 | and ecx,[esp+20+16] 24 | rep movsb 25 | pop edi 26 | pop esi 27 | pop es 28 | pop ds 29 | ret 30 | 31 | movedata endp 32 | 33 | end 34 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/NOWIN32.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC __disallowDPMI32onWin32 5 | 6 | .code 7 | 8 | ; We don't disallow nothing even on Win32 9 | 10 | __disallowDPMI32onWin32 proc near 11 | 12 | ret 13 | 14 | __disallowDPMI32onWin32 endp 15 | 16 | end 17 | 18 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/OUTPORT.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC outport 5 | PUBLIC outportb 6 | PUBLIC outpw 7 | PUBLIC outp 8 | 9 | .code 10 | 11 | outport proc near 12 | 13 | outpw: 14 | mov edx,[esp+4] 15 | mov eax,[esp+8] 16 | out dx,ax 17 | ret 18 | 19 | outport endp 20 | 21 | outportb proc near 22 | 23 | outp: 24 | mov edx,[esp+4] 25 | mov eax,[esp+8] 26 | out dx,al 27 | ret 28 | 29 | outportb endp 30 | 31 | end 32 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/PARSFNM.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC parsfnm 5 | 6 | .code 7 | 8 | ; FCB functions are plain silly, I don't care 9 | 10 | parsfnm proc near 11 | sub eax,eax 12 | ret 13 | parsfnm endp 14 | 15 | end 16 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/PEEK.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC peek 5 | PUBLIC peekb 6 | 7 | .code 8 | 9 | peek proc near 10 | 11 | push ds 12 | mov ds,[esp+4] 13 | mov edx,[esp+8] 14 | mov eax,[edx] 15 | pop ds 16 | ret 17 | 18 | peek endp 19 | 20 | peekb proc near 21 | 22 | push ds 23 | mov ds,[esp+4] 24 | mov edx,[esp+8] 25 | sub eax,eax 26 | mov al,[edx] 27 | pop ds 28 | ret 29 | 30 | peekb endp 31 | 32 | end 33 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/POKE.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC poke 5 | PUBLIC pokeb 6 | 7 | .code 8 | 9 | poke proc near 10 | 11 | push ds 12 | mov edx,[esp+8] 13 | mov eax,[esp+12] 14 | mov ds,[esp+4] 15 | mov [edx],eax 16 | pop ds 17 | ret 18 | 19 | poke endp 20 | 21 | pokeb proc near 22 | 23 | push ds 24 | mov edx,[esp+8] 25 | mov eax,[esp+12] 26 | mov ds,[esp+4] 27 | mov [edx],al 28 | pop ds 29 | ret 30 | 31 | pokeb endp 32 | 33 | end 34 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/README.TXT: -------------------------------------------------------------------------------- 1 | Replacement for borlands DPMI32.LIB including source code. Runs with WDOSX 0.94 2 | or better. 3 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/SEGREAD.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC segread 5 | 6 | .code 7 | 8 | segread proc near 9 | 10 | mov eax,[esp+4] 11 | mov word ptr [eax],es 12 | mov word ptr [eax+2],cs 13 | mov word ptr [eax+4],ss 14 | mov word ptr [eax+6],ds 15 | mov word ptr [eax+8],fs 16 | mov word ptr [eax+10],gs 17 | ret 18 | 19 | segread endp 20 | 21 | end 22 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/SETDTA.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC setdta 5 | 6 | ; Not supported in 0.93 yet, don't use until 0.94 is out! 7 | ; Use the default DTA at psp:[80h] instead. 8 | 9 | .code 10 | 11 | setdta proc near 12 | 13 | mov ah,1Ah 14 | mov edx,[esp+4] 15 | int 21h 16 | ret 17 | 18 | setdta endp 19 | 20 | end 21 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/BORLANDC/DPMI32/SOUND.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .model flat,C 3 | 4 | PUBLIC sound 5 | PUBLIC nosound 6 | 7 | .code 8 | 9 | sound proc near 10 | 11 | movzx ecx,word ptr [esp+4] 12 | cmp ecx,18 13 | jna @@00 14 | mov eax,1193180 15 | sub edx,edx 16 | div ecx 17 | mov ecx,eax 18 | mov al,182 19 | out 43h,al 20 | mov al,cl 21 | out 42h,al 22 | mov al,ch 23 | out 42h,al 24 | in al,61h 25 | or al,3 26 | out 61h,al 27 | @@00: 28 | ret 29 | 30 | sound endp 31 | 32 | nosound proc near 33 | 34 | in al,61h 35 | and al,0fch 36 | out 061h,al 37 | ret 38 | 39 | nosound endp 40 | 41 | end 42 | 43 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/COMMON/IRQ/PMIRQ.ASM: -------------------------------------------------------------------------------- 1 | ;---------------------------------------------------------------------------- 2 | ; Configuration parameters 3 | ; 4 | NUM_INTERRUPT_STACKS = 4 5 | INTERRUPT_STACK_SIZE = 1000h 6 | 7 | ;---------------------------------------------------------------------------- 8 | ; TASM red tape 9 | ; 10 | .386 11 | .model flat 12 | .code 13 | 14 | PUBLICDLL SetIRQHandler 15 | PUBLICDLL GetIRQHandler 16 | 17 | SIZE_OF_ENTRY EQU ((OFFSET __entryEnd - OFFSET __entryStart) SHR 4) 18 | SIZE_OF_WRAPPER EQU ((OFFSET __wrapperEnd - OFFSET __wrapperStart) SHR 4) 19 | 20 | ;+--------------------------------------------------------------------------- 21 | ; DLL Entry point 22 | ; 23 | DllMain PROC NEAR 24 | pushad 25 | mov DataSelector, ds 26 | mov TIBSelector, fs 27 | mov ebx, 8 28 | mov edi, OFFSET __wrapperStart 29 | mov esi, OFFSET __entryStart 30 | 31 | @@getSetLoop: 32 | mov eax, 0204h 33 | int 31h 34 | mov [edi + SIZE_OF_WRAPPER - 8], edx 35 | mov [edi + SIZE_OF_WRAPPER - 4], ecx 36 | mov edx, esi 37 | mov ecx, cs 38 | mov eax, 0205h 39 | int 31h 40 | add esi, SIZE_OF_ENTRY 41 | add edi, SIZE_OF_WRAPPER 42 | inc ebx 43 | cmp ebx, 78h 44 | je @@getSetDone 45 | 46 | cmp ebx, 16 47 | jne @@getSetLoop 48 | 49 | mov ebx, 70h 50 | jmp @@getSetLoop 51 | 52 | @@getSetDone: 53 | popad 54 | mov eax, 1 55 | retn 12 56 | DllMain ENDP 57 | 58 | ;---------------------------------------------------------------------------- 59 | ; The actual interrupt glue code 60 | ; 61 | EnterInterrupt PROC NEAR 62 | xchg ecx, [esp] 63 | push eax 64 | push edx 65 | push gs 66 | push fs 67 | push es 68 | push ds 69 | mov ds, DWORD PTR cs:[OFFSET DataSelector] 70 | mov fs, TIBSelector 71 | mov edx, ss 72 | mov eax, esp 73 | sub DWORD PTR [OFFSET IntStackTop], INTERRUPT_STACK_SIZE 74 | push ds 75 | push ds 76 | pop es 77 | pop ss 78 | mov esp, DWORD PTR [OFFSET IntStackTop] 79 | push edx 80 | push eax 81 | call ecx 82 | lss esp, [esp] 83 | add DWORD PTR [OFFSET IntStackTop], INTERRUPT_STACK_SIZE 84 | pop ds 85 | pop es 86 | pop fs 87 | pop gs 88 | pop edx 89 | pop eax 90 | pop ecx 91 | iretd 92 | EnterInterrupt ENDP 93 | 94 | ;---------------------------------------------------------------------------- 95 | ; Standard Interrupt entry points 96 | ; 97 | __entryStart LABEL NEAR 98 | i = 0 99 | REPT 16 100 | IrqEntry CATSTR ,%i, 101 | IrqEntry LABEL NEAR 102 | call EnterInterrupt 103 | jmp DWORD PTR [OFFSET HandlerArray + i * 4] 104 | i = i + 1 105 | ENDM 106 | __entryEnd LABEL NEAR 107 | 108 | ;---------------------------------------------------------------------------- 109 | ; NEAR callable irq handler entries with IRET stackframe 110 | ; 111 | __wrapperStart LABEL NEAR 112 | i = 0 113 | REPT 16 114 | xchg eax, [esp] 115 | push eax 116 | push eax 117 | pushfd 118 | pop eax 119 | xchg [esp + 8], eax 120 | mov [esp + 4], cs 121 | db 0EAh 122 | dd ? 123 | dd ? 124 | i = i + 1 125 | ENDM 126 | __wrapperEnd LABEL NEAR 127 | 128 | ;+---------------------------------------------------------------------------- 129 | ; GetIrqHandler 130 | ; 131 | GetIrqHandler PROC NEAR 132 | mov eax, [esp + 4] 133 | mov eax, [eax * 4 + OFFSET HandlerArray] 134 | retn 4 135 | GetIrqHandler ENDP 136 | 137 | ;+---------------------------------------------------------------------------- 138 | ; SetIrqHandler 139 | ; 140 | SetIrqHandler PROC NEAR 141 | mov edx, [esp + 4] 142 | mov eax, [esp + 8] 143 | mov [edx * 4 + OFFSET HandlerArray], eax 144 | retn 8 145 | SetIrqHandler ENDP 146 | 147 | .data 148 | 149 | HandlerArray LABEL DWORD 150 | i = 0 151 | REPT 16 152 | dd OFFSET __wrapperStart + i * SIZE_OF_WRAPPER 153 | i = i + 1 154 | ENDM 155 | 156 | IntStackTop dd OFFSET TheTopOfStack 157 | 158 | .data? 159 | DataSelector dd ? 160 | TIBSelector dd ? 161 | db NUM_INTERRUPT_STACKS * INTERRUPT_STACK_SIZE DUP (?) 162 | TheTopOfStack LABEL DWORD 163 | 164 | END DllMain 165 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/COMMON/IRQ/PMIRQ.C: -------------------------------------------------------------------------------- 1 | /* 2 | ** Usage example for PMIRQ.WDL. Sets a new timer handler (IRQ 0) and increments 3 | ** the character value in the upper left screen corner. 4 | */ 5 | #include "pmirq.h" 6 | #include 7 | 8 | void (*OldHandler)(); 9 | 10 | void NewHandler() { 11 | unsigned char *p; 12 | p = 0xB8000; 13 | ++ (*p); 14 | OldHandler(); 15 | } 16 | 17 | int main() { 18 | OldHandler = GetIRQHandler(0); 19 | SetIRQHandler(0, NewHandler); 20 | while (!kbhit()); 21 | SetIRQHandler(0, OldHandler); 22 | return(0); 23 | } 24 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/COMMON/IRQ/PMIRQ.H: -------------------------------------------------------------------------------- 1 | /* 2 | ** PMIRQ.H - functions exported from PMIRQ.WDL 3 | */ 4 | 5 | #if !defined(__PMIRQ_H) 6 | #define __PMIRQ_H 7 | 8 | void (*__stdcall GetIRQHandler(int))(); 9 | void __stdcall SetIRQHandler(int, void()); 10 | 11 | #endif /* __PMIRQ_H */ 12 | 13 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/COMMON/IRQ/PMIRQ.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/C/COMMON/IRQ/PMIRQ.LIB -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/COMMON/IRQ/PMIRQ.WDL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/C/COMMON/IRQ/PMIRQ.WDL -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/COMMON/VBE/DPMI32.H: -------------------------------------------------------------------------------- 1 | /* 2 | ############################################################################ 3 | ## Filename : dpmi32.h ## 4 | ## Description : DPMI function wrappers for Borland C / WDOSX ## 5 | ## Author : Michael Tippach ## 6 | ## Creation Date: 1997/03/17 ## 7 | ## Last Modified: 1997/03/17 ## 8 | ############################################################################ 9 | */ 10 | 11 | #ifndef DPMI32_H 12 | #define DPMI32_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | typedef struct { unsigned short Offset, Segment; } RMFarPtr; 19 | typedef struct { unsigned long Offset, Selector; } PMFarPtr; 20 | typedef struct { unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; 21 | unsigned short flags, es, ds, fs, gs, ip, cs, sp, ss; 22 | } RMCallStruc; 23 | 24 | unsigned long CsSelector (void); 25 | unsigned long SsSelector (void); 26 | unsigned long DsSelector (void); 27 | unsigned long EsSelector (void); 28 | unsigned long FsSelector (void); 29 | unsigned long GsSelector (void); 30 | 31 | int _cdecl dpmiAllocDescriptor ( unsigned long *Selector ); 32 | 33 | int _cdecl dpmiFreeDescriptor ( unsigned long Selector ); 34 | 35 | int _cdecl dpmiSegToDescriptor ( unsigned long Segment, 36 | unsigned long *Selector ); 37 | 38 | int _cdecl dpmiGetSelectorBase ( unsigned long Selector, 39 | unsigned long *BaseAddr ); 40 | 41 | int _cdecl dpmiSetSelectorBase ( unsigned long Selector, 42 | unsigned long BaseAddr ); 43 | 44 | int _cdecl dpmiGetSelectorLimit ( unsigned long Selector, 45 | unsigned long *Limit ); 46 | 47 | int _cdecl dpmiSetSelectorLimit ( unsigned long Selector, 48 | unsigned long Limit ); 49 | 50 | int _cdecl dpmiGetAccessRights ( unsigned long Selector, 51 | unsigned long *Rights ); 52 | 53 | int _cdecl dpmiSetAccessRights ( unsigned long Selector, 54 | unsigned long Rights ); 55 | 56 | int _cdecl dpmiCreateAlias ( unsigned long Selector, 57 | unsigned long *AliasSel ); 58 | 59 | int _cdecl dpmiAllocateDOSMemory ( unsigned long SizeInBytes, 60 | unsigned long *Segment, 61 | unsigned long *Selector ); 62 | 63 | int _cdecl dpmiFreeDOSMemory ( unsigned long Selector ); 64 | 65 | int _cdecl dpmiResizeDOSMemory ( unsigned long Selector, 66 | unsigned long NewSize ); 67 | 68 | int _cdecl dpmiGetRMVector ( int IntNum, RMFarPtr *IntVec ); 69 | 70 | int _cdecl dpmiSetRMVector ( int IntNum, RMFarPtr *IntVec ); 71 | 72 | int _cdecl dpmiGetPMVector ( int IntNum, PMFarPtr *IntVec ); 73 | 74 | int _cdecl dpmiSetPMVector ( int IntNum, PMFarPtr *IntVec ); 75 | 76 | int _cdecl dpmiSimulateInterrupt ( int IntNum, RMCallStruc *RmRegs ); 77 | 78 | int _cdecl dpmiAllocateCallback ( RMFarPtr *CallbackAddr, 79 | void *CallbackFunc, 80 | RMCallStruc *CallbackStruc); 81 | 82 | int _cdecl dpmiFreeCallback ( RMFarPtr *CallbackAddr ); 83 | 84 | unsigned short _cdecl dpmiGetIntFromIRQ ( unsigned short IRQNum ); 85 | 86 | int _cdecl dpmiLockLinearRegion ( unsigned long LockStart, 87 | unsigned long LockSize ); 88 | 89 | int _cdecl dpmiUnlockLinearRegion ( unsigned long UnlockStart, 90 | unsigned long UnlockSize ); 91 | 92 | int _cdecl dpmiMapPhysicalRegion ( unsigned long MapStart, 93 | unsigned long MapSize, 94 | unsigned long *MapLinear ); 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif /* DPMI32_H */ 101 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/C/COMMON/VBE/VBE.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include "dpmi32.h" 3 | 4 | // 5 | // This short example will establish a VESA mode 0x0101 screen in linear frame 6 | // buffer mode and draw a line there. 7 | // 8 | // No, I repeat: NO error checking is beeing done so expect the code to go 9 | // ballistic if you graphics card is not VESA 2 compliant, does not support 10 | // 640 * 480 LFB or if you're running this in an NT DOS box. 11 | // 12 | // This "code" has been tested with both, BC++ and MSVC++ yielding identical 13 | // results. We deliberately chose to _not_ use _any_ assembly here. 14 | // 15 | // And: yes, it _is_ silly, if you've done stuff like this before. 16 | // 17 | 18 | int main (int argc, char *argv[], char *env[] ) 19 | { 20 | 21 | // Variables 22 | 23 | RMCallStruc rmcall; 24 | unsigned char *screen; 25 | unsigned long RealSeg; 26 | unsigned long DosSel; 27 | int i; 28 | 29 | // Allocate some DOS memory 30 | 31 | dpmiAllocateDOSMemory (256, &RealSeg, &DosSel); 32 | 33 | // Preload rmcall register structure 34 | 35 | rmcall.ss = 0; 36 | rmcall.sp = 0; 37 | rmcall.es = (unsigned short) RealSeg; 38 | rmcall.edi = 0; 39 | rmcall.eax = 0x4F01; 40 | rmcall.ecx = 0x0101; 41 | 42 | // Call the VESA BIOS 43 | 44 | dpmiSimulateInterrupt(0x10, &rmcall); 45 | 46 | // Get the pointer to the LFB 47 | 48 | dpmiMapPhysicalRegion ( * (unsigned long *) ((RealSeg << 4) + 40), \ 49 | 640 * 480, (unsigned long *) &screen); 50 | 51 | // Free the DOS memory block as we don't need it any more 52 | 53 | dpmiFreeDOSMemory(DosSel); 54 | 55 | // Set the video mode. This could be done with 3 lines of 56 | // inline assembly but we don't want to use any assembly here 57 | 58 | rmcall.ebx = 0x4101; 59 | rmcall.eax = 0x4F02; 60 | dpmiSimulateInterrupt(0x10, &rmcall); 61 | 62 | // Now draw some pixels 63 | 64 | for (i = 0; i < (640 * 480); i += 641) screen[i] = (unsigned char) 0x7; 65 | 66 | // ...wait for a key 67 | 68 | while (!kbhit()); 69 | 70 | // Set video mode back to text mode. Again, this could be done 71 | // with only two lines of inline assembly... 72 | 73 | rmcall.eax = 0x0003; 74 | dpmiSimulateInterrupt(0x10, &rmcall); 75 | 76 | return (0); 77 | } 78 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/COFF/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/coff/makefile 1.1 1999/02/06 16:54:02 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.1 1999/02/06 16:54:02 MikeT 13 | # Initial check in. 14 | # 15 | # 16 | # ---------------------------------------------------------------------------- 17 | # 18 | # Makefile for the DJGPP v2 .COFF loader 19 | # 20 | ASM = tasm.exe 21 | AFLAGS = /m9 22 | LINK = tlink.exe 23 | LFLAGS = /3 24 | CO = coo.exe 25 | 26 | makefile : stubc.cof 27 | 28 | stubc.cof : stubcf.exe 29 | ..\hacks\sh stubcf.exe stubc.cof 30 | 31 | stubcf.exe : stubcf.obj 32 | 33 | stubcf.obj : stubcf.asm 34 | 35 | .obj.exe : 36 | $(LINK) $(LFLAGS) $< 37 | 38 | .asm.obj : 39 | $(ASM) $(AFLAGS) $< 40 | 41 | get : 42 | $(CO) stubcf.asm 43 | 44 | clean : 45 | DEL *.exe 46 | DEL *.obj 47 | DEL *.cof 48 | DEL *.map 49 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/DEBUG.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/DEBUG.INC 1.2 1999/02/07 20:08:13 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: DEBUG.INC $ 12 | ; Revision 1.2 1999/02/07 20:08:13 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:03 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | .386p 21 | .387 22 | .model flat,C 23 | 24 | .code 25 | extrn LoadProgram:Near 26 | extrn disasm:near 27 | extrn Initialize:near 28 | extrn SingleStep:near 29 | extrn Run:near 30 | extrn Here:near 31 | extrn GetLinear:near 32 | extrn GetBreakpoint:near 33 | extrn SetBreakpoint:near 34 | extrn KillBreakpoint:near 35 | extrn KillAllBp:near 36 | extrn ReadByte:near 37 | extrn WriteByte:near 38 | extrn SetUserScreen:near 39 | extrn SetDebScreen:near 40 | extrn GetExceptionName:near 41 | extrn IsDebugVideo:near 42 | 43 | extrn Deax:dword 44 | extrn Debx:dword 45 | extrn Decx:dword 46 | extrn Dedx:dword 47 | extrn Desi:dword 48 | extrn Dedi:dword 49 | extrn Debp:dword 50 | extrn Desp:dword 51 | 52 | extrn Dcs:dword 53 | extrn Dss:dword 54 | extrn Dds:dword 55 | extrn Des:dword 56 | extrn Dfs:dword 57 | extrn Dgs:dword 58 | 59 | extrn Deip:dword 60 | extrn Deflags:dword 61 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/DISASM.OB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/DEB/DISASM.OB -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/FLAGS.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/FLAGS.INC 1.2 1999/02/07 20:08:42 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: FLAGS.INC $ 12 | ; Revision 1.2 1999/02/07 20:08:42 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:03 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | FlagMaskCF equ 1 21 | FlagMaskPF equ 4 22 | FlagMaskAF equ 10h 23 | FlagMaskZF equ 40h 24 | FlagMaskSF equ 80h 25 | FlagMaskDF equ 400h 26 | FlagMaskOF equ 800h 27 | 28 | FlagsX equ 77 29 | FlagsY equ 0 30 | 31 | FlagsSaveState proc near 32 | mov eax,Deflags 33 | mov SaveEflags,eax 34 | ret 35 | FlagsSaveState endp 36 | 37 | FlagsUpdateView proc near 38 | push 0 ; current y 39 | mov eax,30h 40 | cmp ActiveWindow,AwFlagWindow 41 | jz @@Flcolor 42 | mov eax,7 43 | mov FlagsCurrentY,0 44 | @@Flcolor: 45 | push eax ; color 46 | push 7 47 | push 3 48 | push FlagsY 49 | push FlagsX 50 | call FillColor 51 | mov edx,offset DlFlags 52 | mov ecx,FlagsX 53 | @@FlMloop: 54 | mov eax,[esp+20] 55 | cmp eax,FlagsCurrentY 56 | jnz @@Flcolor1 57 | cmp ActiveWindow,AwFlagWindow 58 | jnz @@Flcolor1 59 | mov word ptr [ecx+offset ScreenColors],1f1fh 60 | mov byte ptr [ecx+offset ScreenColors+2],1fh 61 | @@FlColor1: 62 | mov eax,[edx] 63 | ror eax,16 64 | mov word ptr [ecx+offset ScreenChars],ax 65 | shr eax,16 66 | and eax,0ffffh 67 | test eax,Deflags 68 | jz @@FlWrite0 69 | mov byte ptr [ecx+offset ScreenChars+2],'1' 70 | test eax,SaveEflags 71 | jnz @@FlWritten 72 | or byte ptr [ecx+offset ScreenColors+2],0fh 73 | jmp @@FlWritten 74 | @@FlWrite0: 75 | mov byte ptr [ecx+offset ScreenChars+2],'0' 76 | test eax,SaveEflags 77 | jz @@FlWritten 78 | or byte ptr [ecx+offset ScreenColors+2],0fh 79 | @@FlWritten: 80 | add edx,4 81 | add ecx,ScreenX 82 | inc dword ptr [esp+20] 83 | cmp dword ptr [edx],0 84 | jnz @@FlMloop 85 | 86 | call SetRectangle 87 | add esp,24 88 | ret 89 | FlagsUpdateView endp 90 | 91 | FlagsOnKeyUp proc near 92 | cmp FlagsCurrentY,0 93 | jz @@flkudone 94 | dec FlagsCurrentY 95 | call FlagsUpdateView 96 | @@flkudone: 97 | ret 98 | FlagsOnKeyUp endp 99 | 100 | FlagsOnKeyDown proc near 101 | cmp FlagsCurrentY,6 102 | adc FlagsCurrentY,0 103 | call FlagsUpdateView 104 | ret 105 | FlagsOnKeyDown endp 106 | 107 | FlagsOnEnter proc near 108 | mov edx,FlagsCurrentY 109 | movzx eax,word ptr DlFlags[edx*4] 110 | xor Deflags,eax 111 | xor SaveEflags,eax 112 | call FlagsUpdateView 113 | ret 114 | FlagsOnEnter endp 115 | 116 | FlagsOnKeyHome proc near 117 | mov FlagsCurrentY,0 118 | call FlagsUpdateView 119 | ret 120 | FlagsOnKeyHome endp 121 | 122 | FlagsOnKeyEnd proc near 123 | mov FlagsCurrentY,6 124 | call FlagsUpdateView 125 | ret 126 | FlagsOnKeyEnd endp 127 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/HELP.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/HELP.INC 1.2 1999/02/07 20:09:12 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: HELP.INC $ 12 | ; Revision 1.2 1999/02/07 20:09:12 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:04 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | OnKeyF1 proc near 21 | mov ecx,2000 22 | mov eax,70007000h 23 | mov edx,0b8000h 24 | @@f1cls: 25 | mov gs:[edx],eax 26 | add edx,4 27 | loop @@f1cls 28 | push 24 29 | push 0b8000h 30 | mov ecx,offset helpscreen 31 | @@f1print1: 32 | mov edx,[esp] 33 | @@f1print2: 34 | mov al,[ecx] 35 | mov gs:[edx],al 36 | inc edx 37 | inc edx 38 | inc ecx 39 | test al,al 40 | jnz @@f1print2 41 | mov eax,ScreenX 42 | add eax,eax 43 | add [esp],eax 44 | dec dword ptr [esp+4] 45 | jnz @@f1print1 46 | add esp,8 47 | sub eax,eax 48 | int 16h 49 | call DaUpdateView 50 | call UpdateAll 51 | ret 52 | OnKeyF1 endp 53 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/HELPSCR.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/HELPSCR.INC 1.2 1999/02/07 20:05:11 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: HELPSCR.INC $ 12 | ; Revision 1.2 1999/02/07 20:05:11 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:21:29 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | helpscreen label near 21 | db ' ******** THANKS FOR PRESSING F1 ! ********',0 22 | db 0 23 | db ' Global keys: F1 - This ALT F5 - Show user screen',0 24 | db ' F7 - Trace TAB - Next window',0 25 | db ' F8 - Step SFT TAB- Previous window',0 26 | db ' F9 - Run ALT X - Exit',0 27 | db 0 28 | db ' Disassembly: UP/DOWN - Move cursor CTRL O - Goto EIP',0 29 | db ' PGUP/DOWN - Page up/down CTRL N - Set EIP to cursor',0 30 | db ' F2 - Toggle Breakpoint CTRL G - Goto XXXXXXXX',0 31 | db ' F4 - Execute to cursor',0 32 | db 0 33 | db ' Registers+ : UP/DOWN - Move cursor RETURN - Enter value (registers)',0 34 | db ' Flags HOME/END - First/Last item Toggle flag (flags)',0 35 | db 0 36 | db ' Memory dump: ARROW KEYS- Navigate ALT C - Goto CS:0',0 37 | db ' PGUP/DOWN - Page up/down ALT D - Goto DS:0',0 38 | db ' RETURN - Enter data byte ALT E - Goto ES:0',0 39 | db ' CTRL G - Goto XXXXXXXX ALT F - Goto FS:0',0 40 | db ' ALT 0 - Goto lin. 00000000 ALT G - Goto GS:0',0 41 | db 0 42 | db ' Stack view : UP/DOWN - Move cursor CTRL O - Goto SS:ESP',0 43 | db ' PGUP/DOWN - Page up/down CTRL G - Goto SS:XXXXXXXX',0 44 | db ' RETURN - Enter data dword',0 45 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/INBOX.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/INBOX.INC 1.2 1999/02/07 20:10:11 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: INBOX.INC $ 12 | ; Revision 1.2 1999/02/07 20:10:11 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:05 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | InputBox8 proc near 21 | 22 | IbColor equ 7fh ; test 23 | 24 | ; int _cdecl InputBox(int dx,char *str) 25 | ; returns 0 if ESC has been pressed, 1 if RETURN pressed 26 | 27 | ; get coordinates to draw (dy = numStrings + 2) 28 | ; x = (ScreenX - dx) / 2 29 | ; y = (ScreenY - dy) / 2 30 | 31 | mov eax,[esp+4] ; dx 32 | mov edx,4 33 | push IbColor 34 | push 4 35 | push eax 36 | neg edx 37 | neg eax 38 | add edx,ScreenY 39 | add eax,ScreenX 40 | shr edx,1 41 | shr eax,1 42 | push edx 43 | push eax 44 | call FillColor 45 | mov dword ptr [esp+16],0 46 | call FillChar 47 | 48 | ; leave the stuff on stack 49 | 50 | mov eax,[esp] ; x 51 | mov edx,[esp+4] ; y 52 | inc eax ; x of string 53 | inc edx ; y of string 54 | push dword ptr [esp+28] 55 | push edx ; y 56 | push eax ; x 57 | 58 | ;junk 59 | ;mov cs:[0],al 60 | 61 | call FillString 62 | add esp,12 ; remove locals 63 | call SwapRectangle ; on screen 64 | mov edx,[esp+4] ; y 65 | add edx,2 ; y for input 66 | mov eax,[esp+8] ; dx 67 | sub eax,8 ; length 68 | shr eax,1 ; center 69 | add eax,[esp] ; x for input 70 | push edx 71 | push eax 72 | call InputDword 73 | pop edx 74 | pop edx 75 | jc @@ib8error 76 | mov [esp+16],eax 77 | call SetRectangle 78 | add esp,16 79 | pop eax 80 | clc 81 | ret 82 | @@ib8error: 83 | call SetRectangle 84 | add esp,20 ; remove locals 85 | stc 86 | ret 87 | InputBox8 endp 88 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/INSNSD.OB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/DEB/INSNSD.OB -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/KEYBOARD.ASM: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/KEYBOARD.ASM 1.2 1999/02/07 20:05:33 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: KEYBOARD.ASM $ 12 | ; Revision 1.2 1999/02/07 20:05:33 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:16:40 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | SetUserKeyb proc near 21 | push ebx 22 | mov ebx,Pic1Map 23 | inc ebx 24 | cmp bl,9 25 | jz @@suk00 26 | mov eax,204h 27 | int 31h 28 | mov [ebx*8+offset DebugInts],edx 29 | mov [ebx*8+offset DebugInts+4],ecx 30 | mov edx,[ebx*8+offset UserInts] 31 | mov ecx,[ebx*8+offset UserInts+4] 32 | mov eax,205h 33 | int 31h 34 | @@suk00: 35 | 36 | mov bl,9 37 | mov eax,204h 38 | int 31h 39 | mov [ebx*8+offset DebugInts],edx 40 | mov [ebx*8+offset DebugInts+4],ecx 41 | mov edx,[ebx*8+offset UserInts] 42 | mov ecx,[ebx*8+offset UserInts+4] 43 | mov eax,205h 44 | int 31h 45 | 46 | pop ebx 47 | ret 48 | SetUserKeyb endp 49 | 50 | 51 | SetDebKeyb proc near 52 | push ebx 53 | mov ebx,Pic1Map 54 | inc ebx 55 | cmp ebx,9 56 | jz @@sdk00 57 | mov eax,204h 58 | int 31h 59 | mov [ebx*8+offset UserInts],edx 60 | mov [ebx*8+offset UserInts+4],ecx 61 | mov edx,[ebx*8+offset DebugInts] 62 | mov ecx,[ebx*8+offset DebugInts+4] 63 | mov eax,205h 64 | int 31h 65 | @@sdk00: 66 | 67 | mov bl,9 68 | 69 | mov eax,204h 70 | int 31h 71 | mov [ebx*8+offset UserInts],edx 72 | mov [ebx*8+offset UserInts+4],ecx 73 | mov edx,[ebx*8+offset DebugInts] 74 | mov ecx,[ebx*8+offset DebugInts+4] 75 | mov eax,205h 76 | int 31h 77 | 78 | pop ebx 79 | ret 80 | 81 | SetDebKeyb endp -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/KEYS.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/KEYS.INC 1.2 1999/02/07 20:10:39 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: KEYS.INC $ 12 | ; Revision 1.2 1999/02/07 20:10:39 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:05 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | ; key codes as returned by BIOS 21 | 22 | ; function keys 23 | 24 | Key_F1 equ 3b00h 25 | Key_F2 equ 3c00h 26 | Key_F3 equ 3d00h 27 | Key_F4 equ 3e00h 28 | Key_F5 equ 3f00h 29 | Key_F6 equ 4000h 30 | Key_F7 equ 4100h 31 | Key_F8 equ 4200h 32 | Key_F9 equ 4300h 33 | Key_F10 equ 4400h 34 | 35 | 36 | ; function keys with ALT 37 | 38 | Key_Alt_F1 equ 6800h 39 | Key_Alt_F2 equ 6900h 40 | Key_Alt_F3 equ 6a00h 41 | Key_Alt_F4 equ 6b00h 42 | Key_Alt_F5 equ 6c00h 43 | Key_Alt_F6 equ 6d00h 44 | Key_Alt_F7 equ 6e00h 45 | Key_Alt_F8 equ 6f00h 46 | Key_Alt_F9 equ 7000h 47 | Key_Alt_F10 equ 7100h 48 | 49 | ; Cursor keys 50 | 51 | Key_Up equ 4800h 52 | Key_Down equ 5000h 53 | Key_Left equ 4b00h 54 | Key_Right equ 4d00h 55 | Key_PgUp equ 4900h 56 | Key_PgDown equ 5100h 57 | 58 | Key_Delete equ 5300h 59 | Key_Bspace equ 0e08h 60 | Key_Home equ 4700h 61 | Key_End equ 4f00h 62 | 63 | ; special keys ( unsorted ) 64 | 65 | Key_Alt_X equ 2d00h 66 | Key_Alt_C equ 2e00h 67 | Key_Alt_D equ 2000h 68 | Key_Alt_E equ 1200h 69 | Key_Alt_F equ 2100h 70 | Key_Alt_G equ 2200h 71 | Key_Alt_X equ 2d00h 72 | Key_Alt_0 equ 8100h 73 | 74 | Key_Ctl_N equ 310eh 75 | Key_Ctl_O equ 180fh 76 | Key_Ctl_G equ 2207h 77 | 78 | Key_Ctl_F2 equ 5f00h 79 | 80 | Key_Tab equ 0f09h 81 | Key_Shift_Tab equ 0f00h 82 | Key_Return equ 1c0dh 83 | 84 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/KEYTAB.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/KEYTAB.INC 1.2 1999/02/07 20:11:02 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: KEYTAB.INC $ 12 | ; Revision 1.2 1999/02/07 20:11:02 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:05 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | ; keys understood by the desktop 21 | 22 | include keys.inc 23 | 24 | KtDesktop label near 25 | 26 | dd Key_F1,offset OnKeyF1 27 | dd Key_F7,offset DaExecute 28 | dd Key_F8,offset DaExecute 29 | dd Key_F9,offset DaExecute 30 | dd Key_Alt_F5,offset DoToggleScreen 31 | dd Key_Alt_X,offset AppExit 32 | dd Key_Tab,offset DtOnTab 33 | dd Key_Shift_Tab,offset DtOnShiftTab 34 | dd Key_Ctl_F2,offset DebReload 35 | dd 0 36 | 37 | ; keys understood by the disassembly window 38 | 39 | KtDisAsm label near 40 | 41 | dd Key_F2,offset DaToggleBp 42 | dd Key_F4,offset DaExecute 43 | dd Key_CtL_O,offset DaGotoOrigin 44 | dd Key_Ctl_N,offset DaNewEip 45 | dd Key_Up,offset DaCursorUp 46 | dd Key_Down,offset DaCursorDown 47 | dd Key_PgUp,offset DaPageUp 48 | dd Key_PgDown,offset DaPageDown 49 | dd Key_Ctl_G,offset DaOnGoto 50 | dd 0 51 | 52 | ; keys understood by the register window 53 | 54 | KtRegisters label near 55 | dd Key_Up,offset RegCursorUp 56 | dd Key_Down,offset RegCursorDown 57 | dd Key_Left,offset RegCursorLeft 58 | dd Key_Right,offset RegCursorRight 59 | dd Key_Home,offset RegCursorHome 60 | dd Key_End,offset RegCursorEnd 61 | dd Key_Return,offset RegOnReturn 62 | dd 0 63 | 64 | 65 | ; keys understood by the flags window 66 | 67 | KtFlags label near 68 | dd Key_Up,offset FlagsOnKeyUp 69 | dd Key_Down,offset FlagsOnKeyDown 70 | dd Key_Home,offset FlagsOnKeyHome 71 | dd Key_End,offset FlagsOnKeyEnd 72 | dd Key_Return,offset FlagsOnEnter 73 | dd 0 74 | 75 | ; keys understood by the memory window 76 | 77 | KtMem label near 78 | dd Key_PgUp,offset MemOnPgUp 79 | dd Key_PgDown,offset MemOnPgDown 80 | dd Key_Up,offset MemOnKeyUp 81 | dd Key_Down,offset MemOnKeyDown 82 | dd Key_Left,offset MemOnKeyLeft 83 | dd Key_Right,offset MemOnKeyRight 84 | dd Key_Return,offset Input2 85 | dd Key_Alt_C,offset MemOnKeyAlt 86 | dd Key_Alt_D,offset MemOnKeyAlt 87 | dd Key_Alt_E,offset MemOnKeyAlt 88 | dd Key_Alt_F,offset MemOnKeyAlt 89 | dd Key_Alt_G,offset MemOnKeyAlt 90 | dd Key_Alt_0,offset MemOnKeyAlt 91 | dd Key_Ctl_G,offset MemOnGoto 92 | dd 0 93 | 94 | ; keys understand by the stack frame window 95 | 96 | KtStack label near 97 | 98 | dd Key_PgUp,offset StackOnPgUp 99 | dd Key_PgDown,offset StackOnPgDown 100 | dd Key_Up,offset StackOnKeyUp 101 | dd Key_Down,offset StackOnKeyDown 102 | dd Key_Ctl_O,offset StackToOrigin 103 | dd Key_Return,offset StackOnEnter 104 | dd Key_Ctl_G,offset StackOnGoto 105 | dd 0 106 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/deb/makefile 1.2 1999/02/13 14:26:32 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.2 1999/02/13 14:26:32 MikeT 13 | # Moved the debugger to true flat memory model. Do not use -m_float 14 | # anymore when stubbing WUDEBUG. 15 | # 16 | # Revision 1.1 1999/02/07 20:03:59 MikeT 17 | # Initial check in. 18 | # 19 | # 20 | # ---------------------------------------------------------------------------- 21 | # 22 | # Makefile for WUDEBUG.EXE 23 | # 24 | ASM = tasm.exe 25 | AFLAGS = /m9 26 | LINK = tlink32.exe 27 | LFLAGS = 28 | CO = coo.exe 29 | 30 | makefile : wudebug.exe 31 | 32 | wudebug.exe : DISASM.OBJ INSNSD.OBJ SYNC.OBJ SDEBUG.OBJ MAIN.OBJ SLIB.OBJ \ 33 | ..\util\stubit.exe 34 | $(LINK) $(LFLAGS) DISASM.OBJ INSNSD.OBJ SYNC.OBJ SDEBUG.OBJ MAIN.OBJ \ 35 | SLIB.OBJ,wudebug.exe 36 | ..\util\stubit wudebug.exe 37 | 38 | # 39 | # 2do: work out include dependencies 40 | # 41 | main.obj : main.asm 42 | slib.obj : slib.asm 43 | sdebug.obj : sdebug.asm loadle.inc 44 | disasm.obj : disasm.ob 45 | insnsd.obj : insnsd.ob 46 | sync.obj : sync.ob 47 | 48 | loadle.inc : ..\kernel\loadle.inc 49 | COPY ..\kernel\loadle.inc 50 | 51 | ..\kernel\loadle.inc : 52 | CD ..\kernel 53 | make loadle.inc 54 | CD ..\deb 55 | 56 | ..\util\stubit.exe : 57 | CD ..\util 58 | make stubit.exe 59 | CD ..\deb 60 | 61 | .ob.obj : 62 | COPY $< *.obj 63 | 64 | .asm.obj : 65 | $(ASM) $(AFLAGS) $< 66 | 67 | get : 68 | $(CO) DEBUG.INC 69 | $(CO) FLAGS.INC 70 | $(CO) LOADER.ASM 71 | $(CO) HELP.INC 72 | $(CO) MAIN.ASM 73 | $(CO) SCREEN.ASM 74 | $(CO) SDEBUG.ASM 75 | $(CO) SLIB.ASM 76 | $(CO) IFIELD.INC 77 | $(CO) INBOX.INC 78 | $(CO) KEYS.INC 79 | $(CO) KEYTAB.INC 80 | $(CO) MEMWIN.INC 81 | $(CO) REGWIN.INC 82 | $(CO) SEGDEF.INC 83 | $(CO) UPDATE.INC 84 | $(CO) KEYBOARD.ASM 85 | $(CO) STACKWIN.INC 86 | $(CO) NFIELDS.INC 87 | $(CO) HELPSCR.INC 88 | $(CO) sync.ob 89 | $(CO) disasm.ob 90 | $(CO) insnsd.ob 91 | 92 | clean : 93 | DEL *.obj 94 | DEL *.map 95 | DEL *.exe 96 | DEL *.bak 97 | DEL loadle.inc 98 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/NFIELDS.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/NFIELDS.INC 1.2 1999/02/07 20:06:01 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: NFIELDS.INC $ 12 | ; Revision 1.2 1999/02/07 20:06:01 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:20:20 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | ; static numeric fields 21 | 22 | FieldEax NumField 23 | FieldEbx NumField 24 | FieldEcx NumField 25 | FieldEdx NumField 26 | FieldEsi NumField 27 | FieldEdi NumField 28 | FieldEbp NumField 29 | FieldEsp NumField 30 | 31 | FieldCs NumField 32 | FieldDs NumField 33 | FieldEs NumField 34 | FieldFs NumField 35 | FieldGs NumField 36 | FieldSs NumField 37 | 38 | ; display list for register window 39 | 40 | DlRegisters dd offset FieldEax 41 | dd offset FieldEbx 42 | dd offset FieldEcx 43 | dd offset FieldEdx 44 | dd offset FieldEsi 45 | dd offset FieldEdi 46 | dd offset FieldEbp 47 | dd offset FieldEsp 48 | 49 | dd offset FieldCs 50 | dd offset FieldDs 51 | dd offset FieldEs 52 | dd offset FieldFs 53 | dd offset FieldGs 54 | dd offset FieldSs 55 | 56 | dd 0 57 | 58 | ; display list for flags window 59 | 60 | DlFlags label near 61 | dw FlagMaskCF,'=C' 62 | dw FlagMaskPF,'=P' 63 | dw FlagMaskAF,'=A' 64 | dw FlagMaskZF,'=Z' 65 | dw FlagMaskSF,'=S' 66 | dw FlagMaskDF,'=D' 67 | dw FlagMaskOF,'=O' 68 | dd 0 69 | 70 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/REGWIN.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/REGWIN.INC 1.2 1999/02/07 20:16:09 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: REGWIN.INC $ 12 | ; Revision 1.2 1999/02/07 20:16:09 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:06 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | RegCursorUp proc near 21 | cmp RegCurrentY,0 22 | jna @@rcaDone 23 | dec RegCurrentY 24 | call ShowRegisters 25 | @@RcaDone: 26 | ret 27 | RegCursorUp endp 28 | 29 | RegCursorDown proc near 30 | cmp RegCurrentY,13 31 | jnc @@rcdDone 32 | inc RegCurrentY 33 | call ShowRegisters 34 | @@RcdDone: 35 | ret 36 | RegCursorDown endp 37 | 38 | RegCursorHome proc near 39 | mov RegCurrentY,0 40 | call ShowRegisters 41 | ret 42 | RegCursorHome endp 43 | 44 | RegCursorEnd proc near 45 | mov RegCurrentY,13 46 | call ShowRegisters 47 | ret 48 | RegCursorEnd endp 49 | 50 | RegCursorLeft proc near 51 | ; mov RegCurrentX,0 52 | ; call ShowRegisters 53 | ret 54 | RegCursorLeft endp 55 | 56 | RegCursorRight proc near 57 | ; cmp RegCurrentY,5 58 | ; ja @@rcrDone 59 | ; mov RegCurrentX,1 60 | call ShowRegisters 61 | @@rcrDone: 62 | ret 63 | RegCursorRight endp 64 | 65 | RegOnReturn proc near 66 | mov edx,RegCurrentY 67 | mov edx,[edx*4+offset DlRegisters] 68 | push edx 69 | call OnEnterProc[edx] 70 | add esp,4 71 | call ShowRegisters 72 | ret 73 | RegOnReturn endp 74 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/SCREEN.ASM: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/SCREEN.ASM 1.2 1999/02/07 20:16:40 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: SCREEN.ASM $ 12 | ; Revision 1.2 1999/02/07 20:16:40 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:04 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | _IsDebugVideo proc near 21 | mov eax,ActiveScreen 22 | ret 23 | _IsDebugVideo endp 24 | 25 | _SetUserScreen proc near 26 | 27 | ; restore user screen 28 | cmp ActiveScreen,0 29 | jz @@susdone 30 | 31 | mov ecx,40*50 32 | sub edx,edx 33 | @@usrs00: 34 | mov eax,[edx*4+offset SaveScreen] 35 | mov gs:[edx*4+0b8000h],eax 36 | inc edx 37 | loop @@usrs00 38 | 39 | push edi 40 | push ebx 41 | mov edi,offset DpmiReg 42 | mov _ss,0 43 | mov _sp,0 44 | mov _bx,0 45 | mov _dl,2 46 | mov eax,SaveMethod 47 | test al,al 48 | jnz @@usrs01 49 | mov al,2 50 | @@usrs01: 51 | mov _eax,eax 52 | mov eax,RmCallSeg 53 | mov _es,ax 54 | mov _cx,7 55 | mov bl,10h 56 | mov eax,300h 57 | int 31h 58 | pop ebx 59 | pop edi 60 | mov ActiveScreen,0 61 | @@susdone: 62 | ret 63 | 64 | _SetUserScreen endp 65 | 66 | _SetDebScreen proc near 67 | 68 | ; save user screen 69 | 70 | cmp ActiveScreen,1 71 | jz @@sdsdone 72 | 73 | sub ecx,ecx 74 | push edi 75 | push ebx 76 | mov edi,offset DpmiReg 77 | mov _ss,0 78 | mov _sp,0 79 | mov _bx,0 80 | mov _dl,1 81 | mov eax,SaveMethod 82 | test al,al 83 | jnz @@debs01 84 | mov al,1 85 | @@debs01: 86 | mov _eax,eax 87 | mov eax,RmCallSeg 88 | mov _es,ax 89 | mov _cx,7 90 | mov bl,10h 91 | mov eax,300h 92 | int 31h 93 | mov eax,83h 94 | int 10h 95 | mov edx,-1 96 | sub ebx,ebx 97 | mov eax,200h 98 | int 10h 99 | mov ecx,40*50 100 | sub edx,edx 101 | pop ebx 102 | pop edi 103 | 104 | @@debs00: 105 | mov eax,gs:[edx*4+0b8000h] 106 | mov [edx*4+offset SaveScreen],eax 107 | inc edx 108 | loop @@debs00 109 | 110 | mov ActiveScreen,1 111 | @@sdsdone: 112 | ret 113 | 114 | _SetDebScreen endp 115 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/SEGDEF.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/deb/SEGDEF.INC 1.2 1999/02/07 20:17:09 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: SEGDEF.INC $ 12 | ; Revision 1.2 1999/02/07 20:17:09 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 03:14:06 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | .386P 21 | .387 22 | DGROUP group _DATA,_BSS 23 | ASSUME cs:_TEXT,ds:DGROUP,ss:DGROUP 24 | 25 | _TEXT SEGMENT PARA PUBLIC USE32 'CODE' 26 | _TEXT ENDS 27 | 28 | _DATA SEGMENT PARA PUBLIC USE32 'DATA' 29 | _DATA ENDS 30 | 31 | _BSS SEGMENT PARA PUBLIC USE32 'BSS' 32 | _BSS ENDS 33 | 34 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DEB/SYNC.OB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/DEB/SYNC.OB -------------------------------------------------------------------------------- /WDOSX96B/SRC/DELPHI/MISC/KEYBOARD.PAS: -------------------------------------------------------------------------------- 1 | unit keyboard; 2 | { 3 | Keyboard handler example. Get the actual key state by hooking the keyboard 4 | interrupt. Useful for games etc. The 32 bit DOS unit is needed for compiling. 5 | Just standard TP stuff, except that now we can do this in Delphi 2 too! 6 | Note that it doesn't need a single line of assembly anymore... 7 | 8 | usage: 9 | ------------------------ 8< ----------------------- 10 | 11 | uses keyboard; 12 | begin 13 | SetKeyboardHandler; 14 | repeat until IsKeyDown(Key_ESC); 15 | RemoveKeyboardHandler; 16 | end. 17 | 18 | ------------------------ 8< ----------------------- 19 | 20 | Mainly to show what the DOS unit can do for you as far as IRQ handlers are 21 | concerned. 22 | 23 | } 24 | 25 | interface 26 | 27 | const 28 | 29 | Key_ESC = 1; 30 | 31 | { Add more scancodes here, if you like } 32 | 33 | procedure SetKeyboardHandler; 34 | procedure RemoveKeyboardHandler; 35 | function IsKeyDown(key: byte):boolean; 36 | 37 | implementation 38 | uses dos; 39 | 40 | var 41 | 42 | Keys: array [0..127] of byte; 43 | hooked:boolean; 44 | keybh:pointer; 45 | 46 | procedure ISR; { "Interrupt" keyword not supported in D 2 } 47 | var key:byte; 48 | begin 49 | key:=port[$60]; 50 | if key <> $E0 then begin 51 | if key > 127 then Keys[key and 127]:=0 else Keys[key]:=1; 52 | end; 53 | port[$61]:=port[$61] or $80; 54 | port[$61]:=port[$61] and $7F; 55 | port[$20]:=$20; 56 | end; 57 | 58 | procedure ClearAllKeys; 59 | var i:byte; 60 | begin 61 | for i:=0 to 127 do Keys[i]:=0; 62 | end; 63 | 64 | procedure SetKeyboardHandler; 65 | begin 66 | ClearAllKeys; 67 | if not hooked then begin 68 | hooked:=true; 69 | GetIntVec($9,keybh); 70 | SetIntVec($9,@ISR); 71 | end; 72 | end; 73 | 74 | procedure RemoveKeyboardHandler; 75 | begin 76 | ClearAllKeys; 77 | if hooked then SetIntVec($9,keybh); 78 | hooked:=false; 79 | end; 80 | 81 | function IsKeyDown(key: byte):boolean; 82 | begin 83 | IsKeyDown:=(Keys[key and 127] = 1); 84 | end; 85 | 86 | 87 | begin 88 | hooked:=false; 89 | end. 90 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DELPHI/MISC/README.TXT: -------------------------------------------------------------------------------- 1 | 2 | There best way to describe the stuff in this directory is the word "stuff" 3 | itself. Just snippets. 4 | 5 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DELPHI/MISC/VBE/FBUFFERS.PAS: -------------------------------------------------------------------------------- 1 | { 2 | ############################################################################# 3 | ## Offscreen drawing surface. ## 4 | ## ## 5 | ## Copyright (c)1998, Michael Tippach ## 6 | ## Released under the terms of the WDosX 0.95 license agreement ## 7 | ############################################################################# 8 | 9 | The idea with this one is that we add a set of very neat methodes to allow 10 | drawing of primitives as well as rendering of polygons as well as... 11 | 12 | } 13 | 14 | unit fbuffers; 15 | 16 | interface 17 | uses sysutils; 18 | 19 | Type 20 | 21 | EDDError = class(Exception); 22 | 23 | TDDSurface = class(TObject) 24 | 25 | private 26 | MemBlock: pointer; 27 | SizeX, SizeY: longint; 28 | BPPix: longint; 29 | 30 | public 31 | Constructor Create(X, Y, bpp: longint); 32 | Destructor Destroy; 33 | property Buffer: pointer read MemBlock; 34 | property XSize: longint read SizeX; 35 | property YSize: longint read SizeY; 36 | property BitsPerPixel: longint read BPPix; 37 | end; 38 | 39 | implementation 40 | 41 | Constructor TDDSurface.Create(X, Y, bpp: longint); 42 | begin 43 | SizeX:= X; 44 | SizeY:= Y; 45 | BPPix:= bpp; 46 | GetMem(MemBlock, X * Y * ((bpp + 7) SHR 3)); 47 | if MemBlock = NIL then 48 | raise EDDError.Create('Not enough memory for off screen buffer.'); 49 | end; 50 | 51 | Destructor TDDSurface.Destroy; 52 | begin 53 | if MemBlock <> NIL then FreeMem(MemBlock); 54 | end; 55 | 56 | end. 57 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DELPHI/MISC/VBE/GRAPHICS.PAS: -------------------------------------------------------------------------------- 1 | { 2 | ############################################################################## 3 | ## Main graphics interface for Delphi2/3 and WDosX 0.95. ## 4 | ## ## 5 | ## This one mainly provides static instances of vbe related classes. ## 6 | ## ## 7 | ############################################################################## 8 | } 9 | unit graphics; 10 | 11 | interface 12 | uses vbe; 13 | 14 | const 15 | Screen: TVbeInterface = NIL; 16 | 17 | implementation 18 | 19 | initialization 20 | Screen:= TVbeInterface.Create; 21 | 22 | finalization 23 | Screen.Destroy; 24 | 25 | end. 26 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DELPHI/MISC/VBE/MAKE.BAT: -------------------------------------------------------------------------------- 1 | dcc32 testvbe.dpr 2 | stubit testvbe.exe 3 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DELPHI/MISC/VBE/PALETTES.PAS: -------------------------------------------------------------------------------- 1 | { 2 | ############################################################################# 3 | ## VBE style palette definitions for 8 bpp modes. ## 4 | ## ## 5 | ## Copyright (c)1998, Michael Tippach ## 6 | ## Released under the terms of the WDosX 0.95 licence agreement ## 7 | ############################################################################# 8 | 9 | 2DO: Add decent gamma support, the current gamma is crap which is why it 10 | isn't used at all. 11 | } 12 | unit palettes; 13 | 14 | interface 15 | 16 | Type 17 | 18 | TRGB8 = packed record 19 | Blue, Green, Red, Alignment: byte; 20 | end; 21 | 22 | TPalette = class(TObject) 23 | 24 | public 25 | Palette: array[byte] of TRGB8; 26 | end; 27 | 28 | 29 | TPalette2Dot6 = class(TPalette) 30 | 31 | public 32 | Constructor Create; 33 | end; 34 | 35 | TPalette332 = class(TPalette) 36 | 37 | public 38 | Constructor Create; 39 | end; 40 | 41 | 42 | implementation 43 | 44 | Const 45 | Gamma64: array[0..63] of byte = ( 46 | 0, 10, 14, 17, 19, 21, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 47 | 35, 36, 37, 37, 38, 39, 40, 41, 41, 42, 43, 44, 44, 45, 46, 46, 48 | 47, 48, 48, 49, 49, 50, 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, 49 | 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63 ); 50 | 51 | NoGamma64: array[0..63] of byte = ( 52 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 53 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 54 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 55 | 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 ); 56 | 57 | Constructor TPalette2Dot6.Create; 58 | var r, g ,b: integer; 59 | begin 60 | for r:= 0 to 5 do for g:= 0 to 5 do for b:= 0 to 5 do begin 61 | Palette[((r * 6) + g) * 6 + b].Red:= NoGamma64[(r * 63) DIV 5]; 62 | Palette[((r * 6) + g) * 6 + b].Green:= NoGamma64[(g * 63) DIV 5]; 63 | Palette[((r * 6) + g) * 6 + b].Blue:= NoGamma64[(b * 63) DIV 5]; 64 | end; 65 | for g:= 216 to 255 do begin 66 | Palette[g].Red:= NoGamma64[((g - 216) * 63) DIV (255 - 216)]; 67 | Palette[g].Green:= Palette[g].Red; 68 | Palette[g].Blue:= Palette[g].Red; 69 | end; 70 | end; 71 | 72 | Constructor TPalette332.Create; 73 | var i: integer; 74 | begin 75 | for i:= 0 to 255 do begin 76 | Palette[i].Red:= NoGamma64[((i SHR 5) * 63) DIV 7]; 77 | Palette[i].Green:= NoGamma64[(((i SHR 2) AND 7) * 63) DIV 7]; 78 | Palette[i].Blue:= NoGamma64[((i AND 3) * 63) DIV 3]; 79 | end; 80 | end; 81 | 82 | end. 83 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DELPHI/MISC/VBE/TESTVBE.DPR: -------------------------------------------------------------------------------- 1 | { 2 | ############################################################################## 3 | ## Test program for the VBE stuff. Requires Delphi2/3 and WDosX 0.95. ## 4 | ## ## 5 | ## Copyr... err... this one is so stupid that I hereby grant anyone the ## 6 | ## right to sell it to Microsoft. ## 7 | ############################################################################## 8 | } 9 | 10 | uses graphics, palettes, fbuffers; 11 | Type 12 | s = array[0..0] of byte; 13 | 14 | var 15 | Xres, Yres: integer; 16 | Pal26: TPalette2Dot6; 17 | Pal332: TPalette332; 18 | Surface: TDDSurface; 19 | p: ^s; 20 | px, py: integer; 21 | r, g, b: integer; 22 | begin 23 | 24 | Xres:= 640; 25 | Yres:= 480; 26 | 27 | { Create a drawing surface. } 28 | Surface:= TDDSurface.Create(Xres, Yres, 8); 29 | 30 | with Screen do begin 31 | 32 | { Set a video mode (fingers crossed as it might not be supported) } 33 | ScreenMode(Xres, Yres, 8); 34 | 35 | { Create a palette with 2.6 bits per primary color. } 36 | Pal26:= TPalette2Dot6.Create; 37 | Pal332:= TPalette332.Create; 38 | 39 | { Make this one the active palette. } 40 | Palette:= Pal26; 41 | 42 | { Create a test pattern. This is really stupid and slow. } 43 | p:= Surface.Buffer; 44 | for px:= 0 to Xres-1 do begin 45 | for py:= 0 to Yres-1 do begin 46 | r:= (px * 6) DIV Xres; 47 | g:= (py * 6) DIV Yres; 48 | b:= ((px * 36) DIV Xres) MOD 6; 49 | p^[px + py * Xres]:= r * 36 + g * 6 + b; 50 | end; 51 | end; 52 | 53 | { Blit our test pattern to screen. } 54 | Content:= Surface; 55 | 56 | 57 | { Create another stupid test pattern. } 58 | p:= Surface.Buffer; 59 | for px:= 0 to Xres-1 do begin 60 | for py:= 0 to Yres-1 do begin 61 | r:= (px * 8) DIV Xres; 62 | g:= (py * 8) DIV Yres; 63 | b:= ((px * 32) DIV Xres) MOD 4; 64 | p^[px + py * Xres]:= r * 32 + g * 4 + b; 65 | end; 66 | end; 67 | 68 | { Wait for user input. } 69 | readln; 70 | 71 | { Blit our test pattern to screen. } 72 | Content:= Surface; 73 | 74 | { Wait for user input. } 75 | readln; 76 | 77 | { Switch Palette to 3-3-2. } 78 | Palette:= Pal332; 79 | 80 | { Wait for user input. } 81 | readln; 82 | 83 | end; { with } 84 | 85 | end. 86 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/DOS32/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/dos32/makefile 1.1 1999/02/06 17:04:55 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.1 1999/02/06 17:04:55 MikeT 13 | # Initial check in. 14 | # 15 | # 16 | # ---------------------------------------------------------------------------- 17 | # 18 | # Makefile for the DOS32 loader 19 | # 20 | ASM = tasm.exe 21 | AFLAGS = /m9 22 | LINK = tlink.exe 23 | LFLAGS = /3 24 | CO = coo.exe 25 | 26 | makefile : wdx32.dx 27 | 28 | wdx32.dx : dos32.exe 29 | ..\hacks\sh dos32.exe wdx32.dx 30 | 31 | dos32.exe : dos32.obj 32 | 33 | dos32.obj : dos32.asm 34 | 35 | .obj.exe : 36 | $(LINK) $(LFLAGS) $< 37 | 38 | .asm.obj : 39 | $(ASM) $(AFLAGS) $< 40 | 41 | get : 42 | $(CO) dos32.asm 43 | 44 | clean : 45 | DEL *.exe 46 | DEL *.obj 47 | DEL *.dx 48 | DEL *.map 49 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/HACKS/SH.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/HACKS/SH.EXE -------------------------------------------------------------------------------- /WDOSX96B/SRC/HACKS/TOH.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/HACKS/TOH.EXE -------------------------------------------------------------------------------- /WDOSX96B/SRC/HACKS/TOINC.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/HACKS/TOINC.EXE -------------------------------------------------------------------------------- /WDOSX96B/SRC/HACKS/WDCOMP.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/HACKS/WDCOMP.EXE -------------------------------------------------------------------------------- /WDOSX96B/SRC/HACKS/WPACK.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DosWorld/ppro/8dc8eb30302f912f29721bce6c536ca571ded39d/WDOSX96B/SRC/HACKS/WPACK.DLL -------------------------------------------------------------------------------- /WDOSX96B/SRC/IDLIST.LST: -------------------------------------------------------------------------------- 1 | ;;; 2 | ;;; Version 0.96 beta 1 3 | ;;; 4 | BUILD.ME\MAKEFILE -r1.2 5 | WIN32\MAKEFILE -r1.6 6 | WIN32\K32SPAWN.ASM -r1.6 7 | WIN32\CONSOLE.ASM -r1.24 8 | WIN32\K32VMEM.ASM -r1.9 9 | WIN32\OLEAUT32.ASM -r1.4 10 | WIN32\K32LOAD.ASM -r1.11 11 | WIN32\K32LFUNS.ASM -r1.4 12 | WIN32\ADVAPI32.ASM -r1.2 13 | WIN32\USER32.ASM -r1.15 14 | WIN32\K32FILE.ASM -r1.16 15 | WIN32\K32HEAP.ASM -r1.8 16 | WIN32\K32MISC.ASM -r1.13 17 | WIN32\KERNEL32.ASM -r1.20 18 | WIN32\K32NLS.ASM -r1.4 19 | WIN32\K32MEM.ASM -r1.1 20 | WIN32\U32NLS.ASM -r1.2 21 | WIN32\W32STRUC.INC -r1.8 22 | WIN32\847.ASM -r1.1 23 | WIN32\866.ASM -r1.1 24 | WIN32\857.ASM -r1.1 25 | WIN32\852.ASM -r1.1 26 | WIN32\775.ASM -r1.1 27 | WIN32\720.ASM -r1.1 28 | WIN32\932.ASM -r1.1 29 | WIN32\1258.ASM -r1.1 30 | WIN32\437.ASM -r1.1 31 | WIN32\737.ASM -r1.1 32 | WIN32\850.ASM -r1.1 33 | WIN32\855.ASM -r1.1 34 | WIN32\862.ASM -r1.1 35 | WIN32\USER32.DEF -r1.2 36 | UTIL\MAKEFILE -r1.6 37 | UTIL\ADDFILE.ASM -r1.3 38 | UTIL\GENERAL.INC -r1.2 39 | UTIL\WDXINFO.INC -r1.2 40 | UTIL\DUALMODE.INC -r1.2 41 | UTIL\W32STRUC.INC -r1.2 42 | UTIL\IMPORT.ASM -r1.5 43 | UTIL\STUBIT.C -r1.12 44 | UTIL\WDXINFO.H -r1.1 45 | DOS32\MAKEFILE -r1.1 46 | DOS32\DOS32.ASM -r1.2 47 | RDOFF\MAKEFILE -r1.1 48 | RDOFF\RDOFF.ASM -r1.5 49 | PE\MAKEFILE -r1.1 50 | PE\LOADPE.ASM -r1.6 51 | COFF\MAKEFILE -r1.1 52 | COFF\STUBCF.ASM -r1.7 53 | KERNEL\MAKEFILE -r1.4 54 | KERNEL\WDOSX.ASM -r1.32 55 | KERNEL\LEHEADER.INC -r1.2 56 | KERNEL\LOADLE.ASM -r1.8 57 | KERNEL\WDXINFO.INC -r1.3 58 | LEGACY\MAKEFILE -r1.1 59 | LEGACY\LOADPE.ASM -r1.1 60 | LEGACY\IMPORTS.INC -r1.1 61 | LEGACY\WIN32API.INC -r1.2 62 | LEGACY\VARIANT.INC -r1.1 63 | LEGACY\WIDECHR.INC -r1.1 64 | LEGACY\CONHELP.INC -r1.1 65 | LEGACY\CONSOLE.ASI -r1.1 66 | LEGACY\SEH.INC -r1.1 67 | LEGACY\ADVAPI32.ASI -r1.1 68 | LEGACY\LFUNS.ASI -r1.1 69 | LEGACY\UTIL.INC -r1.1 70 | LEGACY\EXCEPT.INC -r1.1 71 | LEGACY\RESRC.INC -r1.1 72 | LEGACY\WINNLS.INC -r1.1 73 | LEGACY\W32STRUC.INC -r1.1 74 | LEGACY\TIME.INC -r1.1 75 | LEGACY\MEMSTAT.INC -r1.1 76 | LEGACY\FATTRIB.INC -r1.1 77 | WPACK\MAKEFILE -r1.1 78 | WPACK\WPACK.C -r1.1 79 | WPACK\WPACK.H -r1.1 80 | TOOLS\MAKEFILE -r1.3 81 | TOOLS\WADD.ASM -r1.3 82 | TOOLS\WDIR.ASM -r1.2 83 | TOOLS\WDXINFO.INC -r1.2 84 | TOOLS\WDMEM.ASM -r1.1 85 | TOOLS\DUALMODE.INC -r1.1 86 | TOOLS\GENERAL.INC -r1.1 87 | TOOLS\ADC.ASM -r1.2 88 | DEB\MAKEFILE -r1.2 89 | DEB\DEBUG.INC -r1.2 90 | DEB\FLAGS.INC -r1.2 91 | DEB\LOADER.ASM -r1.4 92 | DEB\HELP.INC -r1.2 93 | DEB\MAIN.ASM -r1.3 94 | DEB\SCREEN.ASM -r1.2 95 | DEB\SDEBUG.ASM -r1.4 96 | DEB\SLIB.ASM -r1.2 97 | DEB\IFIELD.INC -r1.2 98 | DEB\INBOX.INC -r1.2 99 | DEB\KEYS.INC -r1.2 100 | DEB\KEYTAB.INC -r1.2 101 | DEB\MEMWIN.INC -r1.2 102 | DEB\REGWIN.INC -r1.2 103 | DEB\SEGDEF.INC -r1.2 104 | DEB\UPDATE.INC -r1.2 105 | DEB\KEYBOARD.ASM -r1.2 106 | DEB\STACKWIN.INC -r1.2 107 | DEB\NFIELDS.INC -r1.2 108 | DEB\HELPSCR.INC -r1.2 109 | TOOLSRC\SH.C -r1.2 110 | TOOLSRC\TOH.C -r1.1 111 | TOOLSRC\TOINC.C -r1.2 112 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/KERNEL/LEHEADER.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/kernel/leheader.inc 1.2 1999/02/07 17:36:16 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: leheader.inc $ 12 | ; Revision 1.2 1999/02/07 17:36:16 MikeT 13 | ; Updated copyright + some cosmetics. No code changes. 14 | ; 15 | ; Revision 1.1 1998/10/01 19:13:51 MikeT 16 | ; Initial check in. 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | ; LE executable loader 21 | ; Structure declarations 22 | ; 23 | LEHeader struc 24 | 25 | LESignature dd ? ; must be 0x454C since order is little endian 26 | LEFormatLevel dd ? ; not really needed 27 | LECpuType dw ? 28 | LETargetSystem dw ? ; should be 01 (OS/2) 29 | LEModuleVersion dd ? ; who cares... 30 | LEModuleType dd ? ; Must be flat 31 | LENumberPages dd ? 32 | LEEntrySection dd ? 33 | LEEntryOffset dd ? 34 | LEStackSection dd ? 35 | LEInitialESP dd ? 36 | LEPageSize dd ? 37 | LEBytesLastPage dd ? 38 | LEFixupSize dd ? 39 | LEFixupChecks dd ? 40 | LELoaderSize dd ? 41 | LELoaderChecks dd ? 42 | LEObjectTable dd ? 43 | LEObjectEntries dd ? 44 | LEObjectPMTable dd ? 45 | LEIterateData dd ? 46 | LEResourceTable dd ? 47 | LEResources dd ? 48 | LEResNamesTable dd ? 49 | LEEntryTable dd ? 50 | LEModuleDirTab dd ? 51 | LEModuleDirs dd ? 52 | LEFixupPageTab dd ? 53 | LEFixupRecords dd ? 54 | LEWeDontNeed dd 3 dup (?) ; getting bored 55 | LEPPchecksumTab dd ? 56 | LEDataPages dd ? 57 | LEPreloadPages dd ? 58 | LEWeDontNeed2 dd 3 dup (?) 59 | LEAutoData dd ? 60 | LEDebugStart dd ? 61 | LEDebugSize dd ? 62 | LEPrelInstPages dd ? 63 | LEDemdInstPages dd ? 64 | LEExtraHeap dd ? 65 | LEReserved dd 3 dup (?) 66 | 67 | ends 68 | 69 | ObjectTable struc 70 | 71 | OTVirtualSize dd ? 72 | OTRelocBase dd ? 73 | OTObjectFlags dd ? 74 | OTPageMapIndex dd ? 75 | OTPageMapSize dd ? 76 | OTReserved dd ? 77 | 78 | ends 79 | 80 | ObjectPMTable struc 81 | 82 | OPMTUnknown db ? 83 | OPMTFixupTabIdx dw ? ; big endian! 84 | OPMTType db ? ; 0 = no reloc 3 = reloc 85 | 86 | ends 87 | 88 | ;Fixup type equates 89 | 90 | ModSingle equ 1000h 91 | ModMultiple equ 3000h 92 | 93 | ;only valid types listed here 94 | 95 | ByteOffset equ 0 96 | WordOffset equ 5 97 | DwordOffset equ 7 98 | RelativeJMP equ 8 99 | 100 | OrdinalIsByte equ 80h 101 | OrdinalIs16 equ 40h 102 | AddADword equ 20h 103 | SizeOverride equ 10h 104 | AddToDest equ 4 105 | 106 | 107 | ;Single internal fixup 108 | 109 | _FixupRecord struc 110 | 111 | FRType dw ? ;only 6 and 7 supported 112 | FROffset dw ? 113 | FRObject db ? 114 | FRItem dw ? 115 | 116 | ends 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/KERNEL/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/kernel/makefile 1.4 1999/02/07 17:44:01 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.4 1999/02/07 17:44:01 MikeT 13 | # Use AFLAGS and LFLAGS, updated copyright. 14 | # 15 | # Revision 1.3 1999/02/06 16:24:16 MikeT 16 | # make wdxinfo.inc local. 17 | # 18 | # Revision 1.2 1999/02/06 15:16:41 MikeT 19 | # Corrected GET target 20 | # 21 | # Revision 1.1 1999/02/06 15:15:41 MikeT 22 | # Initial check in 23 | # 24 | # 25 | # ---------------------------------------------------------------------------- 26 | # 27 | # Makefile for the WDOSX kernel 28 | # 29 | ASM = tasm.exe 30 | AFLAGS = /m9 31 | LINK = tlink.exe 32 | LFLAGS = /3 33 | CO = coo.exe 34 | 35 | makefile : wdosx.dx wdosxle.exe 36 | 37 | wdosx.dx : wdosx.exe 38 | DEL wdosx.dx 39 | REN wdosx.exe wdosx.dx 40 | 41 | wdosx.exe : wdosx.obj 42 | $(LINK) $(LFLAGS) wdosx.obj 43 | ..\hacks\sh $< $< 44 | ..\hacks\wdcomp $< 45 | 46 | wdosxle.exe : wdosxle.obj 47 | $(LINK) $(LFLAGS) wdosxle.obj 48 | ..\hacks\sh $< $< 49 | ..\hacks\wdcomp $< 50 | 51 | wdosx.obj : wdosx.asm 52 | $(ASM) $(AFLAGS) wdosx 53 | 54 | wdosxle.obj : wdosx.asm loadle.inc 55 | $(ASM) $(AFLAGS) /D__WATCOM__ wdosx, wdosxle 56 | 57 | loadle.inc : loadle.exe 58 | ..\hacks\toinc loadle.exe loadle.inc 59 | 60 | loadle.exe : loadle.asm leheader.inc 61 | $(ASM) $(AFLAGS) loadle 62 | $(LINK) $(LFLAGS) loadle 63 | 64 | get : 65 | $(CO) wdosx.asm 66 | $(CO) leheader.inc 67 | $(CO) loadle.asm 68 | $(CO) wdxinfo.inc 69 | 70 | clean : 71 | DEL *.obj 72 | DEL *.exe 73 | DEL loadle.inc 74 | DEL *.map 75 | DEL wdosx.dx 76 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/ADVAPI32.ASI: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/ADVAPI32.ASI 1.1 1999/02/07 18:12:10 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: ADVAPI32.ASI $ 12 | ; Revision 1.1 1999/02/07 18:12:10 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | 23 | RegOpenKeyA: 24 | sub eax,eax 25 | retn 12 26 | 27 | RegOpenKeyExA: 28 | sub eax,eax 29 | retn 20 30 | 31 | RegCloseKey: 32 | sub eax,eax 33 | retn 4 34 | 35 | RegQueryValueExA: 36 | or eax,-1 37 | retn 24 38 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/CONHELP.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/CONHELP.INC 1.1 1999/02/07 18:13:12 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: CONHELP.INC $ 12 | ; Revision 1.1 1999/02/07 18:13:12 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | ; 23 | ; structure declarations 24 | ; 25 | COORD struc 26 | X dw ? 27 | Y dw ? 28 | COORD ends 29 | 30 | SMALL_RECT struc 31 | Left dw ? 32 | Top dw ? 33 | Right dw ? 34 | Bottom dw ? 35 | SMALL_RECT ends 36 | 37 | CONSOLE_SCREEN_BUFFER_INFO struc 38 | dwSize COORD <> 39 | dwCursorPosition COORD <> 40 | wAttributes dw ? 41 | srWindow SMALL_RECT <> 42 | dwMaximumWindowSize COORD <> 43 | CONSOLE_SCREEN_BUFFER_INFO ends 44 | 45 | ; 46 | ; housekeeping data 47 | ; 48 | align 4 49 | 50 | ConsoleScreenBufferInfo CONSOLE_SCREEN_BUFFER_INFO <> 51 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/FATTRIB.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/FATTRIB.INC 1.1 1999/02/07 18:13:35 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: FATTRIB.INC $ 12 | ; Revision 1.1 1999/02/07 18:13:35 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | ; DOS file attributes 23 | 24 | DOS_FA_NORMAL equ 0 25 | DOS_FA_READONLY equ 1 26 | DOS_FA_HIDDEN equ 2 27 | DOS_FA_SYSTEM equ 4 28 | DOS_FA_VOLUME equ 8 29 | DOS_FA_DIRECTORY equ 10h 30 | DOS_FA_ARCHIVE equ 20h 31 | DOS_FA_SHAREABLE equ 80h 32 | 33 | ; Win 32 file attributes that matter 34 | 35 | FILE_ATTRIBUTE_READONLY equ 1 36 | FILE_ATTRIBUTE_HIDDEN equ 2 37 | FILE_ATTRIBUTE_SYSTEM equ 4 38 | FILE_ATTRIBUTE_DIRECTORY equ 10 39 | FILE_ATTRIBUTE_ARCHIVE equ 20 40 | FILE_ATTRIBUTE_NORMAL equ 80 41 | 42 | ;----------------------------------------------------------------------------- 43 | ; These map fine to the extended Wdosx DOS API 44 | ;----------------------------------------------------------------------------- 45 | 46 | GetFileAttributesA: 47 | mov edx,[esp+4] 48 | mov eax,4300h 49 | int 21h 50 | jc @@FattrError00 51 | 52 | ; do the translation 53 | 54 | mov eax,FILE_ATTRIBUTE_NORMAL 55 | 56 | and ecx,037h 57 | jz short @@FattrDone00 58 | mov eax,ecx 59 | @@FattrDone00: 60 | retn 4 61 | 62 | @@FattrError00: 63 | and eax,0ffh 64 | mov LastError,eax 65 | or eax,-1 66 | retn 4 67 | 68 | ;----------------------------------------------------------------------------- 69 | 70 | SetFileAttributesA: 71 | mov ecx,[esp+8] 72 | and ecx,37h 73 | mov edx,[esp+4] 74 | mov eax,4301h 75 | int 21h 76 | jc @@FattrError01 77 | mov eax,1 78 | retn 8 79 | 80 | @@FattrError01: 81 | and eax,0ffh 82 | mov LastError,eax 83 | sub eax,eax 84 | retn 8 85 | 86 | ;----------------------------------------------------------------------------- 87 | 88 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/IMPORTS.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/IMPORTS.INC 1.1 1999/02/07 18:13:46 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: IMPORTS.INC $ 12 | ; Revision 1.1 1999/02/07 18:13:46 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | 23 | ; routines needed processing Win32 API imports 24 | 25 | output0string proc near 26 | ; print a 0 terminated string to stdout, add a CRLF 27 | push edx 28 | push ecx 29 | push eax 30 | mov ecx,[esp+16] 31 | sub edx,edx 32 | @@ocstr00: 33 | mov ah,2 34 | mov dl,[ecx] 35 | test dl,dl 36 | jz @@ocstr01 37 | cmp dl,0ah 38 | jnz @@ocstr02 39 | cmp dh,0dh 40 | jz @@ocstr02 41 | mov dl,0dh 42 | int 21h 43 | mov dl,0ah 44 | mov ah,2 45 | @@ocstr02: 46 | inc ecx 47 | int 21h 48 | mov dh, dl 49 | jmp @@ocstr00 50 | @@ocstr01: 51 | mov dl,0dh 52 | mov ah,2 53 | int 21h 54 | mov dl,0ah 55 | mov ah,2 56 | int 21h 57 | pop eax 58 | pop ecx 59 | pop edx 60 | retn 4 61 | output0string endp 62 | 63 | ;----------------------------------------------------------------------------- 64 | 65 | compare_string proc near 66 | push edi 67 | push esi 68 | sub eax,eax 69 | 70 | cs_getnext: 71 | mov al,[esi] 72 | inc edi 73 | inc esi 74 | test al,al 75 | jz short cs_done 76 | cmp al,[edi-1] 77 | jz short cs_getnext 78 | 79 | cs_done: 80 | pop esi 81 | pop edi 82 | ret 83 | compare_string endp 84 | 85 | ;----------------------------------------------------------------------------- 86 | 87 | parse_import proc 88 | 89 | ; -> edx = offset table, esi=^function name 90 | ; returns: eax=0 if error or proc address 91 | ; 2do: speedup by making use of the fact that strings are sorted 92 | 93 | sub eax,eax 94 | push edi 95 | push edx 96 | 97 | import_next: 98 | mov edi,[edx+4] 99 | call compare_string 100 | test eax,eax 101 | jz short import_end 102 | add edx,8 103 | cmp dword ptr [edx],0 104 | jnz short import_next 105 | 106 | import_end: 107 | mov eax,[edx] 108 | pop edx 109 | pop edi 110 | ret 111 | parse_import endp 112 | 113 | ;----------------------------------------------------------------------------- 114 | 115 | process_imports proc near 116 | 117 | ; get rva of .idata 118 | 119 | mov ebp,imagebase 120 | mov ebp,dword ptr [80h+ebp] 121 | 122 | ; convert to offset 123 | 124 | add ebp,rva2offset 125 | mov edx,offset k32dll 126 | 127 | do_import_descriptor: 128 | 129 | ; check if last in chain 130 | 131 | cmp dword ptr [ebp+12],0 ;no dll name? 132 | jz short ready2launch ;last entry 133 | mov ebx,[ebp+16] ;rva import_lookup_table 134 | add ebx,rva2offset 135 | 136 | get_next_import: 137 | mov esi,[ebx] 138 | test esi,esi 139 | js import_error ;import by number! 140 | jnz short is_string 141 | add ebp,20 142 | jmp short do_import_descriptor 143 | 144 | is_string: 145 | add esi,rva2offset 146 | add esi,2 ;ignore hint 147 | call parse_import 148 | test eax,eax 149 | jz todo_error 150 | mov [ebx],eax 151 | add ebx,4 152 | jmp short get_next_import 153 | 154 | ready2launch: 155 | ret 156 | process_imports endp 157 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/legacy/makefile 1.1 1999/02/07 18:17:22 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.1 1999/02/07 18:17:22 MikeT 13 | # Initial check in. 14 | # 15 | # 16 | # ---------------------------------------------------------------------------- 17 | # 18 | # Makefile for the the old Win32 PE loaders. 19 | # 20 | # Note: This code is no longer being maintained. The reason why it's still 21 | # here is that it is used to build the floating application segment loaders 22 | # for PE files as of WDOSX 0.93 and 0.94. If eventually noone is using this 23 | # feature any more, this directory can be retired. 24 | # 25 | ASM = tasm.exe 26 | AFLAGS = /m9 27 | LINK = tlink.exe 28 | LFLAGS = /3 29 | CO = coo.exe 30 | 31 | makefile : loadpe.raw loadpe.win 32 | 33 | loadpe.win : loadwin.obj 34 | $(LINK) $(LFLAGS) loadwin 35 | ..\hacks\sh loadwin.exe loadpe.win 36 | 37 | loadpe.raw : loadraw.obj 38 | $(LINK) $(LFLAGS) loadraw 39 | ..\hacks\sh loadraw.exe loadpe.raw 40 | 41 | loadwin.obj : LOADPE.ASM IMPORTS.INC WIN32API.INC VARIANT.INC WIDECHR.INC \ 42 | CONHELP.INC CONSOLE.ASI SEH.INC ADVAPI32.ASI LFUNS.ASI UTIL.INC \ 43 | EXCEPT.INC RESRC.INC WINNLS.INC W32STRUC.INC TIME.INC \ 44 | MEMSTAT.INC FATTRIB.INC 45 | $(ASM) $(AFLAGS) -DWIN32API loadpe.asm, loadwin.obj 46 | 47 | # 48 | # 2do: remove unnecessary dependencies from the non-API build 49 | # 50 | loadraw.obj : LOADPE.ASM IMPORTS.INC WIN32API.INC VARIANT.INC WIDECHR.INC \ 51 | CONHELP.INC CONSOLE.ASI SEH.INC ADVAPI32.ASI LFUNS.ASI UTIL.INC \ 52 | EXCEPT.INC RESRC.INC WINNLS.INC W32STRUC.INC TIME.INC \ 53 | MEMSTAT.INC FATTRIB.INC 54 | $(ASM) $(AFLAGS) loadpe.asm, loadraw.obj 55 | 56 | 57 | get : 58 | $(CO) LOADPE.ASM 59 | $(CO) IMPORTS.INC 60 | $(CO) WIN32API.INC 61 | $(CO) VARIANT.INC 62 | $(CO) WIDECHR.INC 63 | $(CO) CONHELP.INC 64 | $(CO) CONSOLE.ASI 65 | $(CO) SEH.INC 66 | $(CO) ADVAPI32.ASI 67 | $(CO) LFUNS.ASI 68 | $(CO) UTIL.INC 69 | $(CO) EXCEPT.INC 70 | $(CO) RESRC.INC 71 | $(CO) WINNLS.INC 72 | $(CO) W32STRUC.INC 73 | $(CO) TIME.INC 74 | $(CO) MEMSTAT.INC 75 | $(CO) FATTRIB.INC 76 | 77 | clean : 78 | DEL *.obj 79 | DEL *.exe 80 | DEL *.map 81 | DEL loadpe.raw 82 | DEL loadpe.win 83 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/MEMSTAT.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/MEMSTAT.INC 1.1 1999/02/07 18:13:57 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: MEMSTAT.INC $ 12 | ; Revision 1.1 1999/02/07 18:13:57 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | ;----------------------------------------------------------------------------- 23 | 24 | GlobalMemoryStatus: 25 | push ebp 26 | mov ebp,esp 27 | push edi 28 | sub esp,30h 29 | mov edi,esp 30 | mov eax,500h 31 | int 31h 32 | 33 | ; get percentage 34 | 35 | mov eax,ApiInitialFree 36 | sub eax,[esp] 37 | mov ecx,100 38 | mul ecx 39 | mov ecx,ApiInitialFree 40 | div ecx 41 | mov edx,[ebp+8] 42 | mov dwMemoryLoad[edx],eax 43 | 44 | ; total physical memory 45 | 46 | mov eax,[esp+18h] 47 | shl eax,12 48 | cmp eax,0fffff000h 49 | jnz @@Memstat00 50 | mov eax,ApiInitialFree 51 | @@MemStat00: 52 | mov dwTotalPhys[edx],eax 53 | 54 | ; available physical memory 55 | 56 | mov eax,[esp+14h] 57 | shl eax,12 58 | cmp eax,0fffff000h 59 | jnz @@Memstat01 60 | mov eax,[esp] 61 | @@MemStat01: 62 | mov dwAvailPhys[edx],eax 63 | 64 | ; available page file 65 | ; this is not quite correct, but as usual, I don't care. 66 | 67 | mov eax,[esp] 68 | mov dwAvailPageFile[edx],eax 69 | 70 | ; total page file 71 | 72 | mov eax,[esp+20h] 73 | cmp eax,-1 74 | jnz @@MemStat03 75 | sub eax,eax 76 | mov dwAvailPageFile[edx],eax 77 | @@MemStat03: 78 | mov dwTotalPageFile[edx],eax 79 | 80 | ; the linear space thing 81 | 82 | mov eax,[esp+0ch] 83 | cmp eax,-1 84 | jnz @@MemStat04 85 | mov eax,ApiInitialFree 86 | @@MemStat04: 87 | mov dwTotalVirtual[edx],eax 88 | 89 | ; virtual available? 90 | 91 | mov eax,[esp+1ch] 92 | cmp eax,-1 93 | jnz @@MemStat05 94 | mov eax,[esp] 95 | @@MemStat05: 96 | mov dwAvailVirtual[edx],eax 97 | add esp,30h 98 | pop edi 99 | mov esp,ebp 100 | pop ebp 101 | retn 4 102 | 103 | ;----------------------------------------------------------------------------- -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/UTIL.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/UTIL.INC 1.1 1999/02/07 18:15:02 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: UTIL.INC $ 12 | ; Revision 1.1 1999/02/07 18:15:02 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | ; ############################################################################ 23 | ; ## Number display etc. ## 24 | ; ############################################################################ 25 | 26 | OutHex4 proc near 27 | mov ecx,[esp+4] 28 | mov eax,30000200h 29 | ror ecx,12 30 | @@oh401: 31 | mov dl,cl 32 | and dl,0fh 33 | cmp dl,0ah 34 | jc short @@oh400 35 | add dl,7 36 | @@oh400: 37 | add dl,30h 38 | int 21h 39 | rol ecx,4 40 | sub eax,10000000h 41 | jnc short @@oh401 42 | 43 | retn 4 44 | OutHex4 endp 45 | 46 | OutHex8 proc near 47 | push dword ptr [esp+4] 48 | call OutHex4 49 | mov ax,word ptr [esp+6] 50 | push eax 51 | call OutHex4 52 | retn 4 53 | OutHex8 endp 54 | 55 | OutSel proc near 56 | push ebx 57 | mov ebx,[esp+8] 58 | push ebx 59 | call OutHex4 60 | mov eax,6 61 | int 31h 62 | jnc short @@os001 63 | push offset ExcStrUnavail 64 | call Output0String 65 | retn 4 66 | @@os001: 67 | push edx 68 | push ecx 69 | push offset ExcStrBase 70 | call Output0String 71 | call OutHex4 72 | call OutHex4 73 | push offset ExcStrLimit 74 | call Output0String 75 | lsl eax,ebx 76 | push eax 77 | call OutHex8 78 | push offset ExcStrAcc 79 | call Output0String 80 | lar ax,bx 81 | push eax 82 | call OutHex4 83 | pop ebx 84 | retn 4 85 | OutSel endp 86 | 87 | ExcStrContext db 'WDOSX Win32 subsystem: Abort from unhandled exception at %4:%8',0dh,0ah 88 | db 'Context record dump:',0dh,0ah,0dh,0ah 89 | db 'EAX = %8 EBX = %8 ECX = %8 EDX = %8',0dh,0ah 90 | db 'ESI = %8 EDI = %8 EBP = %8 ESP = %8',0dh,0ah 91 | db 'CS = %s',0dh,0ah 92 | db 'DS = %s',0dh,0ah 93 | db 'ES = %s',0dh,0ah 94 | db 'FS = %s',0dh,0ah 95 | db 'GS = %s',0dh,0ah 96 | db 'SS = %s',0dh,0ah 97 | ExcStrUnavail db ' N/A' 98 | ExcStrBase db ' Base = ',0 99 | ExcStrLimit db ' Limit = ',0 100 | ExcStrAcc db ' Type/Acc = ',0 101 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/W32STRUC.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/W32STRUC.INC 1.1 1999/02/07 18:15:28 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: W32STRUC.INC $ 12 | ; Revision 1.1 1999/02/07 18:15:28 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | memorystatus struc 23 | dwLength dd ? ; sizeof(memorystatus) 24 | dwMemoryLoad dd ? ; percent of memory in use 25 | dwTotalPhys dd ? ; bytes of physical memory 26 | dwAvailPhys dd ? ; free physical memory bytes 27 | dwTotalPageFile dd ? ; bytes of paging file 28 | dwAvailPageFile dd ? ; free bytes of paging file 29 | dwTotalVirtual dd ? ; user bytes of address space 30 | dwAvailVirtual dd ? ; free user bytes 31 | memorystatus ends 32 | 33 | systime struc 34 | wYear dw ? 35 | wMonth dw ? 36 | wDayOfWeek dw ? 37 | wDay dw ? 38 | wHour dw ? 39 | wMinute dw ? 40 | wSecond dw ? 41 | wMilliseconds dw ? 42 | systime ends 43 | 44 | time_zone_information struc 45 | Bias dd ? 46 | StandardName db 32 dup (?) 47 | StandardDate systime 48 | StandardBias dd ? 49 | DaylightName db 32 dup (?) 50 | DaylightDate systime 51 | DaylightBias dd ? 52 | time_zone_information ends 53 | 54 | startupinfo struc 55 | cb dd ? 56 | lpReserved dd ? 57 | lpDesktop dd ? 58 | lpTitle dd ? 59 | dwX dd ? 60 | dwY dd ? 61 | dwXSize dd ? 62 | dwYSize dd ? 63 | dwXCountChars dd ? 64 | dwYCountChars dd ? 65 | dwFillAttribute dd ? 66 | dwFlags dd ? 67 | wShowWindow dw ? 68 | cbReserved2 dw ? 69 | lpReserved2 dd ? 70 | hStdInput dd ? 71 | hStdOutput dd ? 72 | hStdError dd ? 73 | startupinfo ends 74 | 75 | blockcount equ 16 76 | 77 | mcb struc 78 | mcb_next dd ? ;pointer to next mcb, 0 if last in chain 79 | mcb_desc dd ? ;descriptor flags 80 | mcb ends 81 | 82 | memblock struc 83 | mem_block label dword 84 | mem_size dw ? 85 | mem_start dw ? 86 | memblock ends 87 | 88 | ;descriptor flags 89 | mcb_free equ 1 90 | 91 | CREATE_ALWAYS equ 2 92 | OPEN_EXISTING equ 3 93 | OPEN_ALWAYS equ 4 94 | TRUNCATE_EXISTING equ 5 95 | CREATE_NEW equ 1 96 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/LEGACY/WIDECHR.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/legacy/WIDECHR.INC 1.1 1999/02/07 18:15:42 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: WIDECHR.INC $ 12 | ; Revision 1.1 1999/02/07 18:15:42 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; 18 | ; Old floating segment PE code which I'm too lazy to maintain any longer or to 19 | ; even comment on. It should stay as is and eventually die. 20 | ; 21 | 22 | ; ########### No conversion done in these routines ########################### 23 | ; 2do maybe the other way around 24 | 25 | MultiByteToWideChar: 26 | mov eax,[esp+16] 27 | cmp eax,-1 28 | jne @@Mbwc02 29 | mov eax,[esp+12] 30 | @@Mbwc00: 31 | cmp byte ptr [eax],0 32 | jz short @@Mbwc01 33 | inc eax 34 | jmp short @@Mbwc00 35 | @@Mbwc01: 36 | sub eax,[esp+12] 37 | @@Mbwc02: 38 | test eax,eax 39 | jz short @@Mbwc04 40 | mov ecx,dword ptr [esp+24] 41 | test ecx,ecx 42 | jz short @@Mbwc04 43 | cmp ecx,eax 44 | jnc @@Mbwc03 45 | mov eax,ecx 46 | @@Mbwc03: 47 | mov [esp+16],eax 48 | push eax 49 | mov eax,[esp+12] 50 | mov edx,[esp+20] 51 | sub ch,ch 52 | @@Mbwc05: 53 | mov cl,[eax] 54 | inc eax 55 | mov word ptr [edx],cx 56 | add edx,2 57 | dec dword ptr [esp+16] 58 | jnz @@Mbwc05 59 | pop eax 60 | cmp eax,[esp+24] 61 | jnc @@Mbwc04 62 | mov word ptr [edx],0 63 | inc eax 64 | @@Mbwc04: 65 | retn 24 66 | 67 | 68 | ; ############################################################################ 69 | 70 | WideCharTomultiByte: 71 | 72 | mov eax,[esp+16] 73 | cmp eax,-1 74 | jne @@Wcmb02 75 | mov eax,[esp+12] 76 | @@Wcmb00: 77 | cmp word ptr [eax],0 78 | jz short @@Wcmb01 79 | add eax,2 80 | jmp short @@Wcmb00 81 | @@Wcmb01: 82 | shr eax,2 83 | sub eax,[esp+12] 84 | @@Wcmb02: 85 | test eax,eax 86 | jz short @@Wcmb04 87 | mov ecx,dword ptr [esp+24] 88 | test ecx,ecx 89 | jz short @@Wcmb04 90 | cmp ecx,eax 91 | jnc @@Wcmb03 92 | mov eax,ecx 93 | @@Wcmb03: 94 | mov [esp+16],eax 95 | push eax 96 | mov eax,[esp+12] 97 | mov edx,[esp+20] 98 | sub ch,ch 99 | @@Wcmb05: 100 | mov cl,[eax] 101 | add eax,2 102 | mov [edx],cl 103 | inc edx 104 | dec dword ptr [esp+16] 105 | jnz @@Wcmb05 106 | pop eax 107 | cmp eax,[esp+24] 108 | jnc @@Wcmb04 109 | mov byte ptr [edx],0 110 | inc eax 111 | @@Wcmb04: 112 | retn 32 113 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/PE/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/pe/makefile 1.1 1999/02/06 17:12:56 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.1 1999/02/06 17:12:56 MikeT 13 | # Initial check in. 14 | # 15 | # 16 | # ---------------------------------------------------------------------------- 17 | # 18 | # Makefile for the WDOSX PE loader 19 | # 20 | ASM = tasm.exe 21 | AFLAGS = /m9 22 | LINK = tlink.exe 23 | LFLAGS = /3 24 | CO = coo.exe 25 | 26 | makefile : loadpe.ra0 27 | 28 | loadpe.ra0 : loadpe.exe 29 | ..\hacks\sh loadpe.exe loadpe.ra0 30 | 31 | loadpe.exe : loadpe.obj 32 | 33 | loadpe.obj : loadpe.asm 34 | 35 | .obj.exe : 36 | $(LINK) $(LFLAGS) $< 37 | 38 | .asm.obj : 39 | $(ASM) $(AFLAGS) $< 40 | 41 | get : 42 | $(CO) loadpe.asm 43 | 44 | clean : 45 | DEL *.exe 46 | DEL *.obj 47 | DEL *.ra0 48 | DEL *.map 49 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/RDOFF/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/rdoff/makefile 1.1 1999/02/06 18:00:20 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.1 1999/02/06 18:00:20 MikeT 13 | # Initial check in. 14 | # 15 | # 16 | # ---------------------------------------------------------------------------- 17 | # 18 | # Makefile for the WDOSX RDOFF loader 19 | # 20 | ASM = tasm.exe 21 | AFLAGS = /m9 22 | LINK = tlink.exe 23 | LFLAGS = /3 24 | CO = coo.exe 25 | 26 | makefile : rdoff.rd 27 | 28 | rdoff.rd : rdoff.exe 29 | ..\hacks\sh rdoff.exe rdoff.rd 30 | 31 | rdoff.exe : rdoff.obj 32 | 33 | rdoff.obj : rdoff.asm 34 | 35 | .obj.exe : 36 | $(LINK) $(LFLAGS) $< 37 | 38 | .asm.obj : 39 | $(ASM) $(AFLAGS) $< 40 | 41 | get : 42 | $(CO) rdoff.asm 43 | 44 | clean : 45 | DEL *.exe 46 | DEL *.obj 47 | DEL *.rd 48 | DEL *.map 49 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/README.TXT: -------------------------------------------------------------------------------- 1 | 2 | To build the WDOSX binaries, the following Borland tools were used: 3 | 4 | TASM.EXE v 3.1 5 | TLINK.EXE v 3.01 6 | TLINK32.EXE v 1.6.72.0 7 | BCC32.EXE from BC++ 5.0 8 | MAKE.EXE v 4.0 9 | 10 | Using different versions and/or completely different tools might or might not 11 | yield satisfactory results. 12 | 13 | The build must be run from within a Win32 DOS box, it will _not_ run under 14 | plain DOS. All of the above utilities must be in the search path (obviously). 15 | 16 | To start the build, change into the BUILD.ME directory and type "make". 17 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/TOOLS/DUALMODE.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/tools/dualmode.inc 1.1 1999/02/07 18:40:19 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: dualmode.inc $ 12 | ; Revision 1.1 1999/02/07 18:40:19 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; ############################################################################ 18 | ; ## Macro definition for static/dynamic library generation. ## 19 | ; ############################################################################ 20 | .386 21 | ; 22 | ; Tasm 3.1 does not accept STDCALL as an argument to the model directive. 23 | ; 24 | IFDEF __DLL__ 25 | .model flat 26 | ELSE 27 | .model flat, C 28 | ENDIF 29 | 30 | DUAL_EXPORT MACRO some_label 31 | IFDEF __DLL__ 32 | PUBLICDLL some_label 33 | ELSE 34 | PUBLIC some_label 35 | ENDIF 36 | ENDM 37 | 38 | DUAL_MAIN MACRO 39 | IFDEF __DLL__ 40 | dllMain PROC NEAR 41 | ENDIF 42 | ENDM 43 | 44 | DUAL_ENDMAIN MACRO 45 | IFDEF __DLL__ 46 | dllMain ENDP 47 | ENDIF 48 | ENDM 49 | 50 | DUAL_STDMAIN MACRO 51 | IFDEF __DLL__ 52 | dllMain PROC NEAR 53 | mov eax, 1 54 | retn 12 55 | dllMain ENDP 56 | ENDIF 57 | ENDM 58 | 59 | DUAL_RETURN MACRO num_args 60 | IFDEF __DLL__ 61 | retn num_args 62 | ELSE 63 | retn 64 | ENDIF 65 | ENDM 66 | 67 | DUAL_END MACRO 68 | IFDEF __DLL__ 69 | END dllMain 70 | ENDIF 71 | END 72 | ENDM 73 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/TOOLS/GENERAL.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/tools/general.inc 1.1 1999/02/07 18:39:54 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: general.inc $ 12 | ; Revision 1.1 1999/02/07 18:39:54 MikeT 13 | ; Initial check in. 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | pushadFrame STRUC 18 | ediReg dd ? 19 | esiReg dd ? 20 | ebpReg dd ? 21 | espReg dd ? 22 | ebxReg dd ? 23 | edxReg dd ? 24 | ecxReg dd ? 25 | eaxReg dd ? 26 | pushadFrame ENDS 27 | 28 | FRAME_SIZE = 32 29 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/TOOLS/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/tools/makefile 1.3 2000/05/28 12:34:55 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.3 2000/05/28 12:34:55 MikeT 13 | # Add wdmem utility. 14 | # 15 | # Revision 1.2 1999/06/20 15:51:26 MikeT 16 | # Use Joergen Ibsen's WPACK compressor instead of the old LZ77 one. 17 | # 18 | # Revision 1.1 1999/02/07 19:04:25 MikeT 19 | # Initial check in. 20 | # 21 | # 22 | # ---------------------------------------------------------------------------- 23 | # 24 | # Makefile for the WADD and WDIR utilities. 25 | # 26 | ASM = tasm.exe 27 | AFLAGS = /m9 /mx 28 | LINK = tlink32.exe 29 | LFLAGS = 30 | CO = coo.exe 31 | 32 | makefile : wdir.exe wadd.exe wdmem.exe 33 | 34 | wdir.exe : wdirw.exe ..\util\stubit.exe 35 | ..\util\stubit wdirw.exe 36 | DEL wdir.exe 37 | REN wdirw.exe wdir.exe 38 | 39 | wadd.exe : waddw.exe ..\util\stubit.exe 40 | ..\util\stubit waddw.exe 41 | DEL wadd.exe 42 | REN waddw.exe wadd.exe 43 | 44 | wdmem.exe : wdmemw.exe ..\util\stubit.exe 45 | ..\util\stubit wdmemw.exe 46 | DEL wdmem.exe 47 | REN wdmemw.exe wdmem.exe 48 | 49 | wdirw.exe : wdirw.obj 50 | $(LINK) $(LFLAGS) wdirw 51 | 52 | wdirw.obj : wdir.asm wdxinfo.inc 53 | $(ASM) $(AFLAGS) wdir.asm,wdirw.obj 54 | 55 | waddw.exe : waddw.obj adc.obj ..\wpack\wpack.obj 56 | $(LINK) $(LFLAGS) waddw ..\wpack\wpack.obj adc,waddw 57 | 58 | waddw.obj : wadd.asm wdxinfo.inc 59 | $(ASM) $(AFLAGS) wadd.asm,waddw.obj 60 | 61 | ..\wpack\wpack.obj : 62 | CD ..\wpack 63 | make wpack.obj 64 | CD ..\tools 65 | 66 | adc.obj : dualmode.inc general.inc adc.asm wdxinfo.inc 67 | $(ASM) $(AFLAGS) adc.asm 68 | 69 | wdmemw.exe : wdmemw.obj 70 | $(LINK) $(LFLAGS) wdmemw 71 | 72 | wdmemw.obj : wdmem.asm wdxinfo.inc 73 | $(ASM) $(AFLAGS) wdmem.asm,wdmemw.obj 74 | 75 | ..\util\stubit.exe : 76 | CD ..\util 77 | make stubit.exe 78 | CD ..\tools 79 | 80 | get : 81 | $(CO) wadd.asm 82 | $(CO) wdir.asm 83 | $(CO) wdxinfo.inc 84 | $(CO) wdmem.asm 85 | $(CO) dualmode.inc 86 | $(CO) general.inc 87 | $(CO) adc.asm 88 | CD ..\wpack 89 | $(CO) makefile 90 | make get 91 | CD ..\tools 92 | 93 | clean : 94 | DEL *.map 95 | DEL *.exe 96 | DEL *.obj 97 | DEL *.bak 98 | CD ..\wpack 99 | make clean 100 | CD ..\tools 101 | 102 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/TOOLSRC/SH.C: -------------------------------------------------------------------------------- 1 | /* 2 | ############################################################################ 3 | ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 4 | ## ## 5 | ## Released under the terms of the WDOSX license agreement. ## 6 | ############################################################################ 7 | 8 | $Header: E:/RCS/WDOSX/0.95/SRC/TOOLSRC/sh.c 1.2 1999/02/06 16:50:19 MikeT Exp MikeT $ 9 | 10 | ---------------------------------------------------------------------------- 11 | 12 | $Log: sh.c $ 13 | Revision 1.2 1999/02/06 16:50:19 MikeT 14 | Some cosmetics. 15 | 16 | Revision 1.1 1999/02/06 16:47:10 MikeT 17 | Initial check in. 18 | 19 | 20 | ---------------------------------------------------------------------------- 21 | 22 | What this does: It shrinks the .EXE header of an .EXE that must not contain 23 | fixups down to 32 bytes and inserts the "TIPPACH" signature. Certain 24 | assumptions are being made thus it should not be used with anything else 25 | than the WDOSX build. 26 | 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | FILE *InFile; 36 | FILE *OutFile; 37 | 38 | const char ThatsMe[] = ">TIPPACH"; 39 | 40 | int InSize; 41 | 42 | unsigned char *Buffer; 43 | unsigned short * Header; 44 | unsigned short wtemp; 45 | 46 | int main (int argc, char *argv[]) { 47 | if (!(Buffer = malloc(0x10000))) { 48 | printf ("Not enough memory\n"); 49 | return(1); 50 | } 51 | Header = &Buffer[0]; 52 | if (argc != 3) { 53 | printf ("Usage: sh infile outfile\n"); 54 | return(1); 55 | } 56 | if (!(InFile = fopen (argv[1],"rb"))) { 57 | printf ("Error opening input file %s\n", argv[1]); 58 | return(1); 59 | } 60 | InSize = fread (Buffer,1,0x10000,InFile) - 512; 61 | fclose (InFile); 62 | 63 | /* Update header size */ 64 | 65 | Header[4] = 2; 66 | 67 | /* Update file size */ 68 | 69 | wtemp = (Header[2] << 9) - (( - Header[1]) & 511) - 512 + 32; 70 | Header[1] = wtemp & 511; 71 | Header[2] = (wtemp + 511) >> 9; 72 | 73 | /* Write signature */ 74 | 75 | memcpy (&Buffer[24], ThatsMe, 8); 76 | if (!(OutFile = fopen (argv[2],"wb"))) { 77 | printf ("Error opening output file %s\n", argv[2]); 78 | return(1); 79 | } 80 | if ((fwrite (Buffer,1,32,OutFile)) != 32) { 81 | printf ("Error writing output file %s\n", argv[2]); 82 | return(1); 83 | } 84 | if ((fwrite (&Buffer[512],1,InSize,OutFile)) != InSize) { 85 | printf ("Error writing output file %s\n", argv[2]); 86 | return(1); 87 | } 88 | fclose (OutFile); 89 | return (0); 90 | }; 91 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/TOOLSRC/TOH.C: -------------------------------------------------------------------------------- 1 | /* 2 | ############################################################################ 3 | ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 4 | ## ## 5 | ## Released under the terms of the WDOSX license agreement. ## 6 | ############################################################################ 7 | 8 | $Header: E:/RCS/SRCREL/wdosx/0.95/SRC/TOOLSRC/toh.c 1.1 1999/02/06 20:14:22 MikeT Exp MikeT $ 9 | 10 | ---------------------------------------------------------------------------- 11 | 12 | $Log: toh.c $ 13 | Revision 1.1 1999/02/06 20:14:22 MikeT 14 | Initial check in. 15 | 16 | 17 | ---------------------------------------------------------------------------- 18 | 19 | What this does: Convert a binary file into an .h. Certain assumptions being 20 | made so don't use unless you are me! 21 | 22 | */ 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | FILE *InFile; 31 | FILE *OutFile; 32 | 33 | int InSize; 34 | int LinePos; 35 | 36 | unsigned char *Buffer; 37 | 38 | const char EWarn[] = "/* This is a program generated file. Do not edit! */\n"; 39 | 40 | /* No error checking and stuff, since *I* probably know what I'm doing !?!? */ 41 | 42 | int main (int argc, char *argv[]) { 43 | if (!(Buffer = malloc(0x40000))) { 44 | printf ("Not enough memory\n"); 45 | return(1); 46 | } 47 | if (argc != 4) { 48 | printf ("Usage: toh infile outfile labelname\n"); 49 | return(1); 50 | } 51 | if (!(InFile = fopen (argv[1],"rb"))) { 52 | printf ("Error opening input file %s\n", argv[1]); 53 | return(1); 54 | } 55 | InSize = fread (Buffer,1,0x40000,InFile); 56 | fclose (InFile); 57 | if (!(OutFile = fopen (argv[2],"w"))) { 58 | printf ("Error opening output file %s\n", argv[2]); 59 | return(1); 60 | } 61 | fprintf (OutFile,EWarn); 62 | fprintf (OutFile,"char %s[] = {\n", argv[3]); 63 | while (InSize--) { 64 | fprintf (OutFile,"0x%X",Buffer[0]); 65 | Buffer++; 66 | LinePos++; 67 | if (InSize) fprintf (OutFile,","); else fprintf (OutFile,"};\n"); 68 | if (LinePos > 14) { 69 | fprintf (OutFile,"\n"); 70 | LinePos = 0; 71 | }; 72 | }; 73 | fclose (OutFile); 74 | return (0); 75 | } 76 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/TOOLSRC/TOINC.C: -------------------------------------------------------------------------------- 1 | /* 2 | ############################################################################ 3 | ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 4 | ## ## 5 | ## Released under the terms of the WDOSX license agreement. ## 6 | ############################################################################ 7 | 8 | $Header: E:/RCS/WDOSX/0.95/SRC/TOOLSRC/toinc.c 1.2 1999/02/06 16:49:55 MikeT Exp MikeT $ 9 | 10 | ---------------------------------------------------------------------------- 11 | 12 | $Log: toinc.c $ 13 | Revision 1.2 1999/02/06 16:49:55 MikeT 14 | Some cosmetics. 15 | 16 | Revision 1.1 1999/02/06 16:48:52 MikeT 17 | Initial check in. 18 | 19 | 20 | ---------------------------------------------------------------------------- 21 | 22 | What this does: Convert the meat of an MZ.EXE into an .inc. Certain 23 | assumptions being made so don't use unless you are me! 24 | 25 | */ 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | FILE *InFile; 34 | FILE *OutFile; 35 | 36 | int InSize; 37 | int LinePos; 38 | 39 | unsigned char *Buffer; 40 | 41 | const char EWarn[] = ";\n; This is a program generated file. Do not edit!\n;\n"; 42 | 43 | /* No error checking and stuff, since *I* probably know what I'm doing !?!? */ 44 | 45 | int main (int argc, char *argv[]) { 46 | if (!(Buffer = malloc(0x10000))) { 47 | printf ("Not enough memory\n"); 48 | return(1); 49 | } 50 | if (argc != 3) { 51 | printf ("Usage: toinc infile outfile (offset)\n"); 52 | return(1); 53 | } 54 | if (!(InFile = fopen (argv[1],"rb"))) { 55 | printf ("Error opening input file %s\n", argv[1]); 56 | return(1); 57 | } 58 | fseek(InFile, 512, 0); /* skip exe header */ 59 | InSize = fread (Buffer,1,0x10000,InFile); 60 | fclose (InFile); 61 | if (!(OutFile = fopen (argv[2],"w"))) { 62 | printf ("Error opening output file %s\n", argv[2]); 63 | return(1); 64 | } 65 | fprintf (OutFile,EWarn); 66 | fprintf (OutFile,"db "); 67 | while (InSize--) { 68 | fprintf (OutFile,"0%Xh",Buffer[0]); 69 | Buffer++; 70 | LinePos++; 71 | if (!(InSize)) { 72 | fprintf (OutFile,"\n"); 73 | } else { 74 | if (LinePos > 14) { 75 | fprintf (OutFile,"\ndb "); 76 | LinePos = 0; 77 | } else fprintf (OutFile,","); 78 | } 79 | } 80 | fclose (OutFile); 81 | return (0); 82 | } 83 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/UTIL/DUALMODE.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/util/DUALMODE.INC 1.2 1999/02/07 18:25:48 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: DUALMODE.INC $ 12 | ; Revision 1.2 1999/02/07 18:25:48 MikeT 13 | ; Updated copyright + some cosmetics. 14 | ; 15 | ; Revision 1.1 1998/08/03 02:54:41 MikeT 16 | ; Initial revision 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | ; ############################################################################ 21 | ; ## Macro definition for static/dynamic library generation. ## 22 | ; ############################################################################ 23 | .386 24 | ; 25 | ; Tasm 3.1 does not accept STDCALL as an argument to the model directive. 26 | ; 27 | IFDEF __DLL__ 28 | .model flat 29 | ELSE 30 | .model flat, C 31 | ENDIF 32 | 33 | DUAL_EXPORT MACRO some_label 34 | IFDEF __DLL__ 35 | PUBLICDLL some_label 36 | ELSE 37 | PUBLIC some_label 38 | ENDIF 39 | ENDM 40 | 41 | DUAL_MAIN MACRO 42 | IFDEF __DLL__ 43 | dllMain PROC NEAR 44 | ENDIF 45 | ENDM 46 | 47 | DUAL_ENDMAIN MACRO 48 | IFDEF __DLL__ 49 | dllMain ENDP 50 | ENDIF 51 | ENDM 52 | 53 | DUAL_STDMAIN MACRO 54 | IFDEF __DLL__ 55 | dllMain PROC NEAR 56 | mov eax, 1 57 | retn 12 58 | dllMain ENDP 59 | ENDIF 60 | ENDM 61 | 62 | DUAL_RETURN MACRO num_args 63 | IFDEF __DLL__ 64 | retn num_args 65 | ELSE 66 | retn 67 | ENDIF 68 | ENDM 69 | 70 | DUAL_END MACRO 71 | IFDEF __DLL__ 72 | END dllMain 73 | ENDIF 74 | END 75 | ENDM 76 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/UTIL/GENERAL.INC: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/util/GENERAL.INC 1.2 1999/02/07 18:26:12 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: GENERAL.INC $ 12 | ; Revision 1.2 1999/02/07 18:26:12 MikeT 13 | ; Updated copyright + some cosmetics. 14 | ; 15 | ; Revision 1.1 1998/08/03 02:53:11 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | 21 | pushadFrame STRUC 22 | ediReg dd ? 23 | esiReg dd ? 24 | ebpReg dd ? 25 | espReg dd ? 26 | ebxReg dd ? 27 | edxReg dd ? 28 | ecxReg dd ? 29 | eaxReg dd ? 30 | pushadFrame ENDS 31 | 32 | FRAME_SIZE = 32 33 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/UTIL/WDXINFO.H: -------------------------------------------------------------------------------- 1 | /* 2 | ############################################################################ 3 | ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 4 | ## ## 5 | ## Released under the terms of the WDOSX license agreement. ## 6 | ############################################################################ 7 | 8 | $Header: E:/RCS/wdosx/0.95/src/util/WDXINFO.H 1.1 1999/02/07 18:25:03 MikeT Exp $ 9 | 10 | ---------------------------------------------------------------------------- 11 | 12 | $Log: WDXINFO.H $ 13 | Revision 1.1 1999/02/07 18:25:03 MikeT 14 | Initial check in. Taken from the source root and moved up here. 15 | 16 | 17 | ---------------------------------------------------------------------------- 18 | */ 19 | 20 | /* 21 | 22 | Theory of operation 23 | ---------------------------------------------------------------------------- 24 | 25 | Due to the need to provide a zero based memory model for all fully 26 | relocatable executable formats, we need a means for parametrizing the 27 | execution of WdosX. 28 | 29 | The solution is to define a structure WdxInfo and locate it at offset 0 30 | of the executable image of wdosx.dx (the DOS extender kernel) 31 | 32 | Not all of the information in this structure is actually processed by the 33 | kernel but rather meant to be taken care of by an executable loader. 34 | 35 | The structure will be initialized with default values to allow for 100% 36 | backward compatibility with earlier versions of WdosX and a pretty good 37 | level of backward compatibility even with the BASE0- feature turned ON. 38 | 39 | Since the Watcom- variant of WdosX runs zero- based since day one, the BASE0 40 | ON/OFF setting will be ignored by the executable loader. 41 | 42 | If the revision is incremented, the meaning of all earlier defined fields in 43 | the structure MUST NOT CHANGE to allow for future backward compatibility. 44 | 45 | Algorithm for accessing the WdxInfo structure: 46 | 47 | 1: Open executable file 48 | 2: Read executable header 49 | 3: Read header size from header 50 | 4: Set file pointer to after the header 51 | 5: Read in at least 4 bytes (you might want to read in all of the structure 52 | at once) 53 | 6: If these four bytes match the string '$WdX', then WdxInfo is present 54 | ---------------------------------------------------------------------------- 55 | */ 56 | 57 | #define WDXINFO_FLAGS_BASE0 1 58 | 59 | #define STUB_CLASS_WDX 1 60 | #define STUB_CLASS_WATCOM 2 61 | #define STUB_CLASS_PE 3 62 | #define STUB_CLASS_RDOFF 4 63 | #define STUB_CLASS_DOS32 5 64 | /* just for completeness */ 65 | #define STUB_CLASS_COFF 6 66 | 67 | typedef struct { 68 | unsigned long Signature; 69 | unsigned short Revision; 70 | unsigned char Flags; 71 | unsigned char StubClass; 72 | unsigned long XMemReserve; 73 | unsigned long XMemAlloc; 74 | unsigned long WfseStart; /* Revision 2+ */ 75 | } WdxInfo; 76 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/WIN32/ADVAPI32.ASM: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/win32/ADVAPI32.ASM 1.2 1999/02/07 21:09:35 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: ADVAPI32.ASM $ 12 | ; Revision 1.2 1999/02/07 21:09:35 MikeT 13 | ; Updated copyright. 14 | ; 15 | ; Revision 1.1 1998/08/03 01:37:46 MikeT 16 | ; Initial check in 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | ; ############################################################################ 21 | ; ## Stubbed out registry functions ## 22 | ; ############################################################################ 23 | 24 | .386 25 | .model flat 26 | .code 27 | 28 | PUBLICDLL RegOpenKeyA 29 | PUBLICDLL RegOpenKeyExA 30 | PUBLICDLL RegCloseKey 31 | PUBLICDLL RegQueryValueExA 32 | 33 | dllMain PROC NEAR 34 | 35 | mov eax, 1 36 | retn 12 37 | 38 | dllMain ENDP 39 | 40 | 41 | RegOpenKeyA LABEL NEAR 42 | 43 | sub eax, eax 44 | retn 12 45 | 46 | RegOpenKeyExA LABEL NEAR 47 | 48 | sub eax, eax 49 | retn 20 50 | 51 | RegCloseKey LABEL NEAR 52 | 53 | sub eax, eax 54 | retn 4 55 | 56 | RegQueryValueExA LABEL NEAR 57 | 58 | or eax, -1 59 | retn 24 60 | 61 | END dllMain 62 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/WIN32/K32MEM.ASM: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/win32/K32MEM.ASM 1.1 2000/03/18 18:37:12 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: K32MEM.ASM $ 12 | ; Revision 1.1 2000/03/18 18:37:12 MikeT 13 | ; New file 14 | ; 15 | ; 16 | ; ---------------------------------------------------------------------------- 17 | ; ############################################################################ 18 | ; ## Win32 - Generic mem functions ## 19 | ; ############################################################################ 20 | 21 | .386p 22 | .model flat 23 | 24 | include w32struc.inc 25 | 26 | .code 27 | 28 | PUBLICDLL RtlMoveMemory 29 | PUBLICDLL RtlFillMemory 30 | PUBLICDLL RtlZeroMemory 31 | 32 | ;+---------------------------------------------------------------------------- 33 | ; Win32 - RtlMoveMemory 34 | ; 35 | RtlMoveMemory PROC NEAR 36 | 37 | push esi 38 | push edi 39 | cld 40 | mov esi, [esp + 4 + 8] 41 | mov edi, [esp + 8 + 8] 42 | mov ecx, [esp +12 + 8] 43 | cmp esi, edi 44 | jnc mmCopy 45 | 46 | std 47 | sub eax, eax 48 | cmp ecx, 4 49 | adc eax, eax 50 | cmp ecx, 4 51 | adc eax, eax 52 | lea esi, [esi + ecx - 4] 53 | lea edi, [edi + ecx - 4] 54 | add esi, eax 55 | add edi, eax 56 | 57 | mmCopy: 58 | shr ecx, 2 59 | rep movsd 60 | mov ecx, [esp +12 + 8] 61 | and ecx, 3 62 | rep movsb 63 | cld 64 | pop edi 65 | pop esi 66 | retn 12 67 | 68 | RtlMoveMemory ENDP 69 | 70 | ;+---------------------------------------------------------------------------- 71 | ; Win32 - RtlFillMemory 72 | ; 73 | RtlFillMemory PROC NEAR 74 | 75 | push edi 76 | mov edi, [esp + 4 + 4] 77 | mov ecx, [esp + 8 + 4] 78 | cld 79 | movzx eax, BYTE PTR [esp +12] 80 | mov edx, eax 81 | shl eax, 16 82 | or eax, edx 83 | mov edx, eax 84 | shl edx, 8 85 | or eax, edx 86 | shr ecx, 2 87 | rep stosd 88 | mov ecx, [esp + 8 + 4] 89 | and ecx, 3 90 | rep stosb 91 | pop edi 92 | retn 12 93 | 94 | RtlFillMemory ENDP 95 | 96 | ;+---------------------------------------------------------------------------- 97 | ; Win32 - RtlZeroMemory 98 | ; 99 | RtlZeroMemory PROC NEAR 100 | 101 | push edi 102 | mov edi, [esp + 4 + 4] 103 | mov ecx, [esp + 8 + 4] 104 | sub eax, eax 105 | cld 106 | shr ecx, 2 107 | rep stosd 108 | mov ecx, [esp + 8 + 4] 109 | and ecx, 3 110 | rep stosb 111 | pop edi 112 | retn 8 113 | 114 | RtlZeroMemory ENDP 115 | 116 | END 117 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/WIN32/OLEAUT32.ASM: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/win32/OLEAUT32.ASM 1.4 1999/12/12 22:03:59 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: OLEAUT32.ASM $ 12 | ; Revision 1.4 1999/12/12 22:03:59 MikeT 13 | ; Implemented stub for SysReAllocStringLen 14 | ; 15 | ; Revision 1.3 1999/02/07 21:12:44 MikeT 16 | ; Updated copyright. 17 | ; 18 | ; Revision 1.2 1998/09/12 23:10:43 MikeT 19 | ; Fully implement VariantClear in order to support Delphi 4 20 | ; 21 | ; Revision 1.1 1998/08/03 01:47:11 MikeT 22 | ; Initial check in 23 | ; 24 | ; 25 | ; ---------------------------------------------------------------------------- 26 | ; ########################################################################### 27 | ; ## Functions dealing with variants and stuff ( oleaut32.dll ) ## 28 | ; ########################################################################### 29 | 30 | 31 | .386 32 | .model flat 33 | .code 34 | 35 | PUBLICDLL VariantClear 36 | PUBLICDLL VariantCopy 37 | PUBLICDLL VariantCopyInd 38 | PUBLICDLL VariantInit 39 | PUBLICDLL VariantChangeType 40 | PUBLICDLL VariantChangeTypeEx 41 | PUBLICDLL SysFreeString 42 | PUBLICDLL SysStringLen 43 | PUBLICDLL SysAllocStringLen 44 | PUBLICDLL SysReAllocStringLen 45 | 46 | dllMain PROC NEAR 47 | 48 | mov eax, 1 49 | retn 12 50 | 51 | dllMain ENDP 52 | 53 | VariantClear LABEL NEAR 54 | mov edx, [esp + 4] 55 | sub eax, eax 56 | mov [edx], eax 57 | mov [edx + 4], eax 58 | retn 4 59 | ; 60 | ; They aren't truely supported yet, but at least there won't be errors at 61 | ; load time anymore. Again every one gets its own breakpoint so we can look 62 | ; them up in the TDUMP. 63 | ; 64 | VariantCopy LABEL NEAR 65 | 66 | int 3 67 | 68 | VariantCopyInd LABEL NEAR 69 | 70 | int 3 71 | 72 | VariantInit LABEL NEAR 73 | 74 | int 3 75 | 76 | VariantChangeType LABEL NEAR 77 | 78 | int 3 79 | 80 | VariantChangeTypeEx LABEL NEAR 81 | 82 | int 3 83 | 84 | SysFreeString LABEL NEAR 85 | 86 | int 3 87 | 88 | SysStringLen LABEL NEAR 89 | 90 | int 3 91 | 92 | SysAllocStringLen LABEL NEAR 93 | 94 | int 3 95 | 96 | SysReAllocStringLen LABEL NEAR 97 | 98 | int 3 99 | 100 | END dllMain 101 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/WIN32/USER32.DEF: -------------------------------------------------------------------------------- 1 | ; ############################################################################ 2 | ; ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | ; ## ## 4 | ; ## Released under the terms of the WDOSX license agreement. ## 5 | ; ############################################################################ 6 | ; 7 | ; $Header: E:/RCS/wdosx/0.95/src/win32/USER32.DEF 1.2 2000/03/19 16:28:45 MikeT Exp $ 8 | ; 9 | ; ---------------------------------------------------------------------------- 10 | ; 11 | ; $Log: USER32.DEF $ 12 | ; Revision 1.2 2000/03/19 16:28:45 MikeT 13 | ; Added Import of Kernel32.FindResourceA 14 | ; 15 | ; Revision 1.1 1999/03/06 23:17:00 MikeT 16 | ; Initial check in. 17 | ; 18 | ; 19 | ; ---------------------------------------------------------------------------- 20 | ; 21 | ; This is a very sophisticated DEF file for user32.wdl 22 | ; 23 | IMPORTS KERNEL32.GetOEMCP 24 | IMPORTS KERNEL32.FindResourceA 25 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/WPACK/MAKEFILE: -------------------------------------------------------------------------------- 1 | # ############################################################################ 2 | # ## WDOSX DOS Extender Copyright (c) 1996, 1999, Michael Tippach ## 3 | # ## ## 4 | # ## Released under the terms of the WDOSX license agreement. ## 5 | # ############################################################################ 6 | # 7 | # $Header: E:/RCS/wdosx/0.95/src/wpack/makefile 1.1 1999/06/20 15:44:13 MikeT Exp $ 8 | # 9 | # ---------------------------------------------------------------------------- 10 | # 11 | # $Log: makefile $ 12 | # Revision 1.1 1999/06/20 15:44:13 MikeT 13 | # Initial check in. 14 | # 15 | # 16 | # ---------------------------------------------------------------------------- 17 | # 18 | # Makefile for WPACK 19 | # 20 | CC = bcc32.exe 21 | CCFLAGS = -c -O2 -5 22 | CO = coo.exe 23 | 24 | makefile : wpack.obj 25 | 26 | wpack.obj : wpack.c wpack.h 27 | $(CC) $(CCFLAGS) wpack.c 28 | 29 | get : 30 | $(CO) WPACK.C 31 | $(CO) WPACK.H 32 | 33 | clean : 34 | DEL wpack.obj 35 | -------------------------------------------------------------------------------- /WDOSX96B/SRC/WPACK/WPACK.H: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * $Header: E:/RCS/wdosx/0.95/src/wpack/WPACK.H 1.1 1999/06/20 15:43:14 MikeT Exp $ 4 | * 5 | *************************************************************************** 6 | * 7 | * $Log: WPACK.H $ 8 | * Revision 1.1 1999/06/20 15:43:14 MikeT 9 | * Initial check in. 10 | * 11 | * 12 | ***************************************************************************/ 13 | 14 | /************************************************************************** 15 | * WDOSX-Pack Copyright (c) 1999 by Joergen Ibsen / Jibz * 16 | * All Rights Reserved * 17 | * * 18 | * For data and executable compression software: http://apack.cjb.net/ * 19 | * jibz@hotmail.com * 20 | **************************************************************************/ 21 | 22 | #ifndef __WDOSXPACK_H 23 | #define __WDOSXPACK_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* function prototype */ 30 | unsigned int WdosxPack(unsigned char *source, 31 | unsigned char *destination, 32 | unsigned int length 33 | ); 34 | 35 | #ifdef __cplusplus 36 | } /* extern "C" */ 37 | #endif 38 | 39 | #endif 40 | --------------------------------------------------------------------------------