⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strucs.inc

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 INC
📖 第 1 页 / 共 2 页
字号:
ESP0            dd 0            ;SP for level 0 interupt.
SS0             dw 0
                dw 0            ;reserved.
ESP1            dd 0            ;Level 1 interupt handlers stack.
SS1             dw 0
                dw 0            ;reserved.
ESP2            dd 0            ;Level 2 interupt handlers stack.
SS2             dw 0
                dw 0            ;reserved.
tCR3            dd 0            ;CR3 value.
tEIP            dd 0            ;Instruction pointer.
tEFlags         dw 0            ;EFlags.
                dw 0
tEAX            dd 0            ;AX for init.
tECX            dd 0            ;CX for init.
tEDX            dd 0            ;DX for init.
tEBX            dd 0
tESP            dd 0
tEBP            dd 0
tESI            dd 0
tEDI            dd 0
tES             dw 0
                dw 0            ;reserved.
tCS             dw 0
                dw 0            ;reserved.
tSS             dw 0
                dw 0            ;reserved.
tDS             dw 0
                dw 0            ;reserved.
tFS             dw 0
                dw 0            ;reserved.
tGS             dw 0
                dw 0            ;reserved.
tLDT            dw 0
                dw 0            ;reserved.
                dw 0            ;reserved.
IOMap           dw 0            ;displacement to I/O map.
;
tPL3Stack               db tPL2StackSize dup (0)
tPL2Stack               db tPL1StackSize dup (0)

;tPL1Stack              db tPL0StackSize dup (0)
tPL1Stack       DD      0       ; make WASM happy
                db tPL0StackSize-4 dup (0)

tPL0Stack               dw ?
TSSFields               ends

NewHeaderStruc  struc
NewID           db '3P' ;identifier.
NewSize         dd 0            ;byte size of 3P section of file.
NewLength               dd 0            ;byte size of exe image data.
NewAlloc                dd 0            ;byte size of program.
NewSegments             dw 0            ;number of segment definitions.
NewRelocs               dd 0            ;number of relocation table entries.
NewEntryEIP             dd 0            ;entry offset.
NewEntryCS              dw 0            ;segment list entry number for entry CS.
NewEntryESP             dd 0            ;ESP offset.
NewEntrySS              dw 0            ;segment list entry number for SS.
NewFlags                dd 0            ;Control flags.
NewAutoStack            dd 0            ;Auto stack size.
NewAutoDS               dw 0            ;Auto DS segment number +1
NewExports              dd 0            ;Length of EXPORT section.
NewImports              dd 0            ;Length of IMPORT section.
NewImportModCnt dd 0            ;Number of IMPORT modules.
NewReserved             db 10 DUP (?)
NewHeaderStruc  ends
;


PSP_Struc               struc
;
;First the standard DOS PSP structure. Won't use any of existing entries for
;extended info incase currently un-used entries get used at a later data.
;
 PSP_INT20              dw ?            ;INT 20 instruction for CP/M CALL 0 program
                                ;termination the CDh 20h here is often used as a
                                ;signature for a valid PSP
 PSP_MemTop             dw ?            ;segment of first byte beyond memory allocated to
                                ;program. N/A
 PSP_Filler1            db ?            ;unused filler

 PSP_CPM                db ?            ;CP/M CALL 5 service request (FAR JMP to 000C0h)
                                ;BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh
                                ;point at 000BEh
                dw ?            ;CP/M compatibility--size of first segment for
                                ;.COM files
                dw ?            ;remainder of FAR JMP at 05h
 PSP_INT22              dd ?            ;stored INT 22 termination address
 PSP_INT23              dd ?            ;stored INT 23 control-Break handler address
 PSP_INT24              dd ?            ;DOS 1.1+ stored INT 24 critical error handler
                                ;address
 PSP_Parent             dw ?            ;segment of parent PSP
 PSP_HandleList db 20 dup (?) ;DOS 2+ Job File Table, one byte per file
                                ;handle, FFh = closed
 PSP_Environment        dw ?            ;segment of environment for process
 PSP_INT21SSSP  dd ?            ;N/A
 PSP_Handles            dw ?            ;DOS 3+ number of entries in JFT (default 20)
 PSP_HandlePtr  dd ?            ;DOS 3+ pointer to JFT (default PSP:0018h)
 PSP_Previous   dd ?            ;DOS 3+ pointer to previous PSP (default
                                ;FFFFFFFFh in 3.x) used by SHARE in DOS 3.3.
 PSP_Filler2            dd ?            ;unused by DOS versions <= 6.00
                                ;reportedly used by Novell NetWare shell 3.x
 PSP_DOSVersion dw ?            ;DOS 5+ version to return on INT 21/AH=30h
 PSP_NextPSP            dw ?            ;(MSWin3) selector of next PSP (PDB) in linked
                                ;list Windows keeps a linked list of Windows
                                ;programs only
 PSP_Filler3            dd ?            ;unused by DOS versions <= 6.00
 PSP_WinOldAp   db ?            ;(MSWindows3) bit 0 set if non-Windows
                                ;application (WINOLDAP)
 PSP_Filler4            db 7 dup (?) ;unused by DOS versions <= 6.00
 PSP_INT21              db 3 dup (?) ;DOS 2+ service request (INT 21/RETF instructions)
 PSP_Filler5            db 9 dup (?) ;unused in DOS versions <= 6.00
 PSP_FCB1               db 16 dup (?) ;first default FCB, filled in from first
                                ;commandline argument overwrites second FCB if
                                ;opened
 PSP_FCB2               db 16 dup (?) ;second default FCB, filled in from second
                                ;commandline argument overwrites beginning of
                                ;commandline if opened
 PSP_Filler6            dd ?            ;unused
 PSP_CommandTail        db 128 dup (?) ;commandline / default DTA
                                ;command tail is BYTE for length of tail, N BYTEs
                                ;for the tail, followed by a BYTE containing 0Dh
PSP_Struc               ends


LE_OBJ_Flags_Read       equ 1   ;Readable.
LE_OBJ_Flags_Write      equ 2   ;Writeable.
LE_OBJ_Flags_Exec       equ 4   ;Executable.
LE_OBJ_Flags_Res        equ 8   ;Resource.
LE_OBJ_Flags_Discard    equ 16  ;Discardable.
LE_OBJ_Flags_Shared     equ 32  ;Shared.
LE_OBJ_Flags_PreLoad    equ 64  ;Preload.
LE_OBJ_Flags_Invalid    equ 128 ;Invalid.
LE_OBJ_Flags_FillMsk    equ 256+512     ;Mask for fill type bits.
LE_OBJ_Flags_Normal     equ 0   ;Normal fill type.
LE_OBJ_Flags_Zero       equ 256 ;Zero filled.
LE_OBJ_Flags_Res1       equ 512 ;resident.
LE_OBJ_Flags_Res2       equ 256+512     ;resident/contiguous.
LE_OBJ_Flags_LongLoc    equ 1024        ;long lockable.
LE_OBJ_Flags_16Alias    equ 4096        ;16:16_ALIAS
LE_OBJ_Flags_Big        equ 8192        ;"BIG" (Huge: 32-bit)
LE_OBJ_Flags_Conform    equ 16384       ;Conforming.
LE_OBJ_Flags_IOPriv     equ 32768       ;"OBJECT_I/O_PRIVILEGE_LEVEL

;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;
;LE header format.
;
LE_Header               struc
LE_ID           dw ?    ;"LE" text identifier.
LE_ByteOrder            db ?    ;byte order, 0=little-endian, none-zero=big.
LE_WordOrder            db ?    ;word order.
LE_Format               dd ?    ;format level.
;
LE_CPU          dw ?    ;CPU type.
LE_CPU_286              equ 1
LE_CPU_386              equ 2
LE_CPU_486              equ 3
LE_CPU_586              equ 4
LE_CPU_i860             equ 20h
LE_CPU_N11              equ 21h
LE_CPU_R2000            equ 40h
LE_CPU_R6000            equ 41h
LE_CPU_R4000            equ 42h
;
LE_OS           dw ?    ;Target operating system.
LE_OS_OS2               equ 1
LE_OS_Windows           equ 2
LE_OS_DOS4              equ 3
LE_OS_Win386            equ 4
;
LE_Version              dd ?    ;Module version.
;
LE_Type         dd ?    ;Module type.
LE_Type_InitPer equ 1 shl 2     ;initialise per process.
LE_Type_IntFixup        equ 1 shl 4     ;no internal fixups.
LE_Type_ExtFixup        equ 1 shl 5     ;no external fixups.
LE_Type_NoLoad          equ 1 shl 13    ;module not loadable.
LE_Type_DLL             equ 1 shl 15    ;DLL
;
LE_Pages                dd ?    ;number of memory pages.
LE_EntryCS              dd ?    ;Entry CS object.
LE_EntryEIP             dd ?    ;Entry EIP.
LE_EntrySS              dd ?    ;Entry SS object.
LE_EntryESP             dd ?    ;Entry ESP.
LE_PageSize             dd ?    ;Page size.
LE_LastBytes            dd ?    ;Bytes on last page.
LE_FixupSize            dd ?    ;fixup section size.
LE_FixupChk             dd ?    ;fixup section check sum.
LE_LoaderSize           dd ?    ;loader section size.
LE_LoaderChk            dd ?    ;loader section check sum.
LE_ObjOffset            dd ?    ;offset of object table.
LE_ObjNum               dd ?    ;object table entries
LE_PageMap              dd ?    ;object page map table offset.
LE_IterateMap           dd ?    ;object iterate data map offset.
LE_Resource             dd ?    ;resource table offset
LE_ResourceNum          dd ?    ;resource table entries.
LE_ResidentNames        dd ?    ;resident names table offset.
LE_EntryTable           dd ?    ;entry table offset.
LE_Directives           dd ?    ;module directives table offset.
LE_DirectivesNum        dd ?    ;module directives entries.
LE_Fixups               dd ?    ;fixup page table offset.
LE_FixupsRec            dd ?    ;fixup record table offset.
LE_ImportModNames       dd ?    ;imported module name table offset.
LE_ImportModNum dd ?    ;imported modules count.
LE_ImportNames          dd ?    ;imported procedures name table offset.
LE_PageChk              dd ?    ;per-page checksum table offset.
LE_Data         dd ?    ;data pages offset.
LE_PreLoadNum           dd ?    ;pre-load page count.
LE_NoneRes              dd ?    ;non-resident names table offset.
LE_NoneResSize          dd ?    ;non-resident names table length.
LE_NoneResChk           dd ?    ;non-resident names checksum.
LE_AutoDS               dd ?    ;automatic data object.
LE_Debug                dd ?    ;debug information offset.
LE_DebugSize            dd ?    ;debug information size.
LE_PreLoadInstNum       dd ?    ;pre-load instance pages number.
LE_DemandInstNum        dd ?    ;demand instance pages number.
LE_HeapExtra            dd ?    ;extra heap alloction.
LE_Reserved             db 20 dup (?) ;reserved.
LE_DeviceID             dw ?    ;device ID (Windows VxD only).
LE_DDK          dw ?    ;DDK version number.
LE_Header               ends

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -