📄 rxdosdef.asm
字号:
pspVersion dw ? ; Major, Minor version (VERS)
db 14 dup ( ? ) ; unused
pspDosCall db 3 dup ( ? ) ; int 21/ retf
db 9 dup ( ? ) ; unused
pspFCB_1 db 16 dup ( ? ) ; FCB 1
pspFCB_2 db 16 dup ( ? ) ; FCB 2
db 4 dup ( ? )
pspCommandTail db 128 dup ( ? ) ; command tail (also default DTA )
PSP ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Exe File Header ;
;...............................................................;
EXEHEADER struc
exeSignature dw ? ; .EXE file signature
exeExtraBytes dw ? ; number of bytes in last partial page
exePages dw ? ; number of whole and partial pages
exeRelocItems dw ? ; number of pointers in reloc table
exeHeaderSize dw ? ; size of header, in paragraphs
exeMinAlloc dw ? ; minimum allocation (parag)
exeMaxAlloc dw ? ; maximum allocation (parag)
exeInitSS dw ? ; initial ss value
exeInitSP dw ? ; initial sp value
exeChecksum dw ? ; complemented checksum
exeInitIP dw ? ; initial ip value
exeInitCS dw ? ; initial cs value
exeRelocTable dw ? ; byte offset to reloc table
exeOverlay dw ? ; overlay number
dw 16 dup( ? ) ; reserved (unused)
exeNewExe dd ? ; pointer to new EXE header
EXEHEADER ends
EXE_SIGNATURE equ 5A4DH ; 'MZ'
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Execution State ;
;...............................................................;
EXECSTATE struc
dw ?
execFlags dw ?
execProgName dd ?
execPSP dw ?
execStartAddr dd ?
execProgSize dd ?
EXECSTATE ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Load and Execute ;
;...............................................................;
EXEC struc
lexecEnvironment dw ?
lexecCommandTail dd ?
lexecFCB_1 dd ?
lexecFCB_2 dd ?
EXEC ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Load Program ;
;...............................................................;
LOADPROG struc
lprogEnvironment dw ?
lprogCommandTail dd ?
lprogFCB_1 dd ?
lprogFCB_2 dd ?
lprogSSSP dd ? ; starting stack address
lprogCSIP dd ? ; starting code address
LOADPROG ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Load Overlay ;
;...............................................................;
LOADOVERLAY struc
loverSegLoadAddress dw ?
loverRelocFactor dw ? ; .EXE files only
LOADOVERLAY ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Get Buffered Input Line Structure ;
;...............................................................;
BUFLINE struc
bufMaxLength db ? ; max bytes
bufActualLength db ? ; actual bytes read
bufData db 128 dup(?) ; actual bytes (any length)
BUFLINE ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Line Editor Structure ;
;...............................................................;
LINEEDITOR struc
editCursor dw ? ; cursor offset
editMaxAvail dw ? ; max characters in buffer
editMaxBuffer dw ? ; max characters allowed
editFlags dw ? ; flags
editPhysCursorRow db ? ; beg of edit phys cursor pos
editPhysCursorCol db ? ; beg of edit phys cursor pos
editBufPointer dd ? ; pointer to client buffer
LINEEDITOR ends
editInsertFlag equ 8000h ; insert mode
editSearchFlag equ 4000h ; search mode
editControlFlag equ 2000h ; next character a control character
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; LineEditor_BufferPool ;
;...............................................................;
LINEEDITOR_BUFFERPOOL struc
bOwnerPSP dw ? ; owner PSP
bBuffer db 128 dup(?) ; interim storage
LINEEDITOR_BUFFERPOOL ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Clock Data ;
;...............................................................;
CLOCKDATA struc
cl_daysSince1980 dw ? ; since Jan 1, 1980
cl_minutes db ?
cl_hours db ?
cl_hseconds db ?
cl_seconds db ?
cl_day db ?
cl_month db ?
cl_year dw ?
CLOCKDATA ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; ERROR Structure ;
;...............................................................;
ERROR struc
errAX dw ? ; AX
errBX dw ? ; BX
errCX dw ? ; CX
errDX dw ? ; DX
errSI dw ? ; SI
errDI dw ? ; DI
errDS dw ? ; DS
errES dw ? ; ES
errReserved dw ? ; Reserved
errUID dw ? ; user (computer) ID
errPID dw ? ; program ID (PSP)
ERROR ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; ERROR Structure ;
;...............................................................;
EXTERRORCODE struc
ExtErrorCodeValue dw ?
Locus db ?
SuggestedAction db ?
ErrorClass db ?
db ?
EXTERRORCODE ends
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; DOS Error Messages ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
; All error messages are defined here. ;
; ;
; ;
;...............................................................;
errInvalidFunction equ 0001h
errFileNotFound equ 0002h
errPathNotFound equ 0003h
errIllegalName equ ( errPathNotFound )
errNoHandlesAvailable equ 0004h
errAccessDenied equ 0005h
errInvalidHandle equ 0006h
errArenaTrashed equ 0007h
errNotEnoughMemory equ 0008h
errInvalidBlock equ 0009h
errInvalidAccess equ 000Ch
errInvalidDrive equ 000Fh
errCurrentDirectory equ 0010h
errNoMoreFiles equ 0012h
errFileExists equ 0050h
errFCBSizeTooLarge equ 0002h
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Critical Error Flags ;
;...............................................................;
CRITERROR_IGNORE equ 00
CRITERROR_RETRY equ 01
CRITERROR_TERMINATE equ 02
CRITERROR_FAIL equ 03
CRITERROR_IGNOREALLOWED equ 0008h ; ignore allowed bit
CRITERROR_RETRYALLOWED equ 0010h ; retry allowed bit
CRITERROR_FAILALLOWED equ 0020h ; fail allowed bit
CRITERROR_STDRETRIES equ 03 ; retry three times.
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Extended Errors Class Codes ;
;...............................................................;
ERRCLASS_OUTRES equ 01h ; out of resources
ERRCLASS_TEMPSIT equ 02h ; not an error, temporary situation
ERRCLASS_AUTH equ 03h ; authorization problem
ERRCLASS_INTRN equ 04h ; internal error
ERRCLASS_HRDFAIL equ 05h ; hardware failure
ERRCLASS_SYSFAIL equ 06h ; system failure
ERRCLASS_APPERR equ 07h ; application error (inv param or buff ptr)
ERRCLASS_NOTFND equ 08h ; item not found
ERRCLASS_BADFMT equ 09h ; bad format
ERRCLASS_LOCKED equ 0Ah ; interlocked item or file
ERRCLASS_MEDIA equ 0Bh ; media error
ERRCLASS_ALREADY equ 0Ch ; item already exists
ERRCLASS_UNK equ 0Dh ; unknown
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Extended Errors Suggested Action Codes ;
;...............................................................;
ERRACT_RETRY equ 01h ; retry immediately
ERRACT_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -