Files
DR-DOS-OpenDOS/IBMDOS/BIN/ERROR.LST
2020-11-04 23:59:28 +01:00

1475 lines
90 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 1
= 0001 __RASM__ EQU 1
; File : $ERROR.A86$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
; $Log$
; ERROR.A86 1.17 94/12/02 11:01:03
; added logical error entry
; ERROR.A86 1.16 93/11/26 15:51:29
; Update char_error so ES:SI -> device driver header itself
; ERROR.A86 1.14 93/09/09 22:36:26
; Int 21/59 uses error stack (for benefit of Lantastic)
; ERROR.A86 1.13 93/09/03 20:28:11
; Add "no critical errors" support (int 21/6C)
; ENDLOG
;
; This file contains the Error handling routines for PCMODE
; When a function encounters an error it jumps to the ERROR_EXIT
; function which will process the error consistantly. FCB_ERROR_EXIT
; is a special case of ERROR_EXIT where the error code is not returned
; directly to the user but is still saved for func59
;
= include pcmode.equ
= ; File : $PCMODE.EQU$
= ;
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 2
= ; Description :
= ;
= ; Original Author : DIGITAL RESEARCH
= ;
= ; Last Edited By : $CALDERA$
= ;
= ;-----------------------------------------------------------------------;
= ; Copyright Work of Caldera, Inc. All Rights Reserved.
= ;
= ; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
= ; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
= ; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
= ; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
= ; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
= ; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
= ; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
= ; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
= ; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
= ; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
= ; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
= ; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
= ; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
= ; CIVIL LIABILITY.
= ;-----------------------------------------------------------------------;
= ;
= ; *** Current Edit History ***
= ; *** End of Current Edit History ***
= ;
= ; $Log$
= ;
= ; ENDLOG
= ; This file contains all the general purpose definitions
= ; and equates used by the PCMODE Module.
= ;
=
= FFFF TRUE equ 0FFFFh ; value of TRUE
= 0000 FALSE equ 0 ; value of FALSE
=
= 0006 TRUE_VERSION equ 6
=
= FFFF IDLE_DETECT equ TRUE ; Check for IDLE Process's
=
= if IDLE_DETECT
= 0001 IDLE_COMMAND equ 0001h ; Command Processor Active
= 0002 IDLE_DOSFUNC equ 0002h ; DOS Function Called
= 0004 IDLE_INT28 equ 0004h ; INT 28 Called
=
= 4000 IDLE_ON equ 4000h ; ReSet when Idle Checking Enabled
= 8000 IDLE_INIT equ 8000h ; ReSet when $IDLE$ Loaded and Active
= C000 IDLE_DISABLE equ IDLE_INIT + IDLE_ON
=
= 0001 PROC_IDLE equ 0001 ; Process is IDLE
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 3
= 0002 PROC_INT28 equ 0002 ; INT28 Polling Loop
= 0003 PROC_KEYIN equ 0003 ; Keyboard Input
= 0004 PROC_DEVIN equ 0004 ; Device Input Routine
= endif
=
=
= 00C0 STACK_SIZE equ 192 ; Local Stack Size (Levels)
= 0050 MAX_PATHLEN equ 80 ; Maximum Path length
= 000D MAX_FILELEN equ 13
=
= ;
= ; DOS process termination Codes
= ;
= 0000 TERM_NORMAL equ 0 ; Normal Termination
= 0001 TERM_BREAK equ 1 ; Termination by Control Break
= 0002 TERM_ERROR equ 2 ; Termination by Critical Error
= 0003 TERM_RESIDENT equ 3 ; Terminate and Stay Resident
=
= ;
= ; Critical Error responses from the default INT 24 handler and
= ; the DO_INT24 routine.
= ;
= 0000 ERR_IGNORE equ 0 ; Ignore Error
= 0001 ERR_RETRY equ 1 ; Retry the Operation
= 0002 ERR_ABORT equ 2 ; Terminate the Process
= 0003 ERR_FAIL equ 3 ; Fail Function
= ;
= 0008 OK_FAIL equ 0000$1000b ; Fail is a Valid Response
= 0010 OK_RETRY equ 0001$0000b ; Retry is a Valid Response
= 0020 OK_IGNORE equ 0010$0000b ; Ignore is a valid Response
= 0038 OK_RIF equ 0011$1000b ; All Responsese are Valid
= 0030 OK_RI equ 0011$0000b ; Retry and Ignore are Valid
= 0018 OK_RF equ 0001$1000b ; Retry and Fail are Valid
= ;
= 0040 NO_CRIT_ERRORS equ 0100$0000b ; critical error shouldn't be generated
= ; warning - must match FDOS.A86
= ;
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 4
= eject
= ; The following equates define the format in which the users registers
= ; are saved on the stack. This format is also seen by an application
= ; when a critical error occurs.
= ;
= CodeMacro POP$DOS ; Pop User Registers a la MS-DOS
= db 058h ! db 05Bh ; pop AX ! pop BX
= db 059h ! db 05Ah ; pop BX ! pop CX
= db 05Eh ! db 05Fh ; pop SI ! pop DI
= db 05Dh ; pop BP
= db 01Fh ! db 007h ; pop DS ! pop ES
= EndM
=
= CodeMacro PUSH$DOS ; Push User Registers
= db 006h ! db 01Eh ; push ES ! push DS
= db 055h ; push BP
= db 057h ! db 056h ; push DI ! push SI
= db 052h ! db 051h ; push DX ! push CX
= db 053h ! db 050h ; push BX ! push AX
= EndM
=
= 0000 reg_AX equ word ptr .00
= 0000 reg_AL equ byte ptr .00
= 0001 reg_AH equ byte ptr .01
=
= 0002 reg_BX equ word ptr .02
= 0002 reg_BL equ byte ptr .02
= 0003 reg_BH equ byte ptr .03
=
= 0004 reg_CX equ word ptr .04
= 0004 reg_CL equ byte ptr .04
= 0005 reg_CH equ byte ptr .05
=
= 0006 reg_DX equ word ptr .06
= 0006 reg_DL equ byte ptr .06
= 0007 reg_DH equ byte ptr .07
=
= 0008 reg_SI equ word ptr .08
= 000A reg_DI equ word ptr .10
= 000C reg_BP equ word ptr .12
=
= 000E reg_DS equ word ptr .14
= 0010 reg_ES equ word ptr .16
=
= 0012 reg_IP equ word ptr .18
= 0014 reg_CS equ word ptr .20
= 0016 reg_FLAGS equ word ptr .22
=
= ; Processor Flags
= 0001 CARRY_FLAG equ 0001h ; Carry Flag
= 0040 ZERO_FLAG equ 0040h ; Zero Flag
= 0080 SIGN_FLAG equ 0080h ; Sign Flag
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 5
= 0200 INT_FLAG equ 0200h ; Interrupt Flag
= 0400 DIR_FLAG equ 0400h ; Direction Flag
= 0800 OFLW_FLAG equ 0800h ; OverFlow Flag
=
= 0000 DMD_ID equ es:byte ptr .0 ; id code ('M' or 'Z')
= 0001 DMD_PSP equ es:word ptr .1 ; owner of memory block
= 0003 DMD_LEN equ es:word ptr .3 ; length of memory block
= 0006 DMD_IDLE_FLAGS equ es:word ptr .6 ; idle flags live here
= 0008 DMD_NAME equ es:byte ptr .8 ; ASCIIZ name field
= 0008 DMD_NAME_LEN equ 8 ; 8 Bytes long
= 004D IDM equ 'M' ; not last id code
= 005A IDZ equ 'Z' ; last id code
=
= PCMCODE GROUP PCM_HEADER, PCM_CODE, BDOS_CODE, PCM_RODATA
= PCMCODE GROUP PCM_HISTORY, PCM_ICODE, PCM_CODEND
=
= PCM_HEADER CSEG PARA
= PCM_CODE CSEG BYTE
= PCM_RODATA CSEG WORD
= BDOS_CODE CSEG WORD
= PCM_HISTORY CSEG BYTE
= PCM_ICODE CSEG BYTE
= PCM_CODEND CSEG PARA
=
=
= PCMDATA GROUP PCMODE_DATA, FDOS_DSEG, FIXED_DOS_DATA
= PCMDATA GROUP PCMODE_CODE, GLOBAL_DATA, BDOS_DATA, PCMODE_DSIZE
=
= PCMODE_DATA DSEG WORD ; DOS Data
= FDOS_DSEG DSEG WORD COMMON ; FDOS Parameter Block
=0000 fdos_data rw 7
= FIXED_DOS_DATA CSEG WORD 'DATA' ; Fixed DOS Data Area
= PCMODE_CODE CSEG WORD 'DATA' ; DATA relative CODE
= GLOBAL_DATA DSEG WORD ; GLOBAL DOS DATA (Process Independant)
= BDOS_DATA DSEG WORD ; BDOS Data Area
= PCMODE_DSIZE DSEG PARA ; End of DOS Data Area
= include fdos.def
= ; File : $FDOS.DEF$
= ;
= ; Description :
= ;
= ; Original Author : DIGITAL RESEARCH
= ;
= ; Last Edited By : $CALDERA$
= ;
= ;-----------------------------------------------------------------------;
= ; Copyright Work of Caldera, Inc. All Rights Reserved.
= ;
= ; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
= ; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
= ; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 6
= ; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
= ; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
= ; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
= ; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
= ; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
= ; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
= ; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
= ; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
= ; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
= ; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
= ; CIVIL LIABILITY.
= ;-----------------------------------------------------------------------;
= ;
= ; *** Current Edit History ***
= ; *** End of Current Edit History ***
= ;
= ; $Log$
= ;
= ; ENDLOG
=
= 0048 FD_DISKINFO equ 48h
= 0049 FD_FLUSH equ 49h
= 004A FD_SELECT equ 4Ah
= 004B FD_EXEC equ 4Bh
= 004C FD_EXIT equ 4Ch
= 004D FD_FCB equ 4Dh
= 0050 FD_COMMIT equ 50H
= 0051 FD_NEW equ 51h
= 0052 FD_LOCK equ 52h
= 0054 FD_DDIO equ 54h
= 0055 FD_EXPAND equ 55h
= 0058 FD_REOPEN equ 58h
=
= 0007 FDOS_MAXPARM equ 7 ; Maximum FDOS Parameter Length (WORDS)
=
= 0000 FD_FUNC equ fdos_data
=
= 0002 FD_DRIVE equ fdos_data + 2
= 0004 FD_DPB equ dword ptr fdos_data + 4
= 0004 FD_DPBOFF equ fdos_data + 4
= 0006 FD_DPBSEG equ fdos_data + 6
= 0008 FD_ADJUST equ fdos_data + 8
=
= 0002 FD_NAME equ dword ptr fdos_data + 2
= 0002 FD_NAMEOFF equ fdos_data + 2
= 0004 FD_NAMESEG equ fdos_data + 4
=
= 0006 FD_MODE equ fdos_data + 6
=
= 0002 FD_HANDLE equ fdos_data + 2
=
= 0004 FD_BUF equ dword ptr fdos_data + 4
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 7
= 0004 FD_BUFOFF equ fdos_data + 4
= 0006 FD_BUFSEG equ fdos_data + 6
=
= 0008 FD_COUNT equ fdos_data + 8
=
= 0004 FD_OFFSET equ dword ptr fdos_data + 4
=
= 0008 FD_METHOD equ fdos_data + 8
=
= 0006 FD_FLAG equ fdos_data + 6
=
= 0008 FD_ATTRIB equ fdos_data + 8
=
= 0004 FD_PATH equ dword ptr fdos_data + 4
= 0004 FD_PATHOFF equ fdos_data + 4
= 0006 FD_PATHSEG equ fdos_data + 6
=
= 0002 FD_ONAME equ dword ptr fdos_data + 2
= 0002 FD_ONAMEOFF equ fdos_data + 2
= 0004 FD_ONAMESEG equ fdos_data + 4
=
= 000A FD_NNAME equ dword ptr fdos_data + 10
= 000A FD_NNAMEOFF equ fdos_data + 10
= 000C FD_NNAMESEG equ fdos_data + 12
=
= 0004 FD_SFLAG equ fdos_data + 4
= 0006 FD_DATE equ fdos_data + 6
= 0008 FD_TIME equ fdos_data + 8
=
= 0008 FD_LENGTH equ dword ptr fdos_data + 8
= 000C FD_LFLAG equ word ptr fdos_data + 12
=
= 0004 FD_NEWHND equ fdos_data + 4
=
= 0002 FD_FCBADR equ dword ptr fdos_data + 2
= 0002 FD_FCBOFF equ fdos_data + 2
= 0004 FD_FCBSEG equ fdos_data + 4
=
= 0006 FD_FCBCNT equ fdos_data + 6
= 0008 FD_FCBFUNC equ fdos_data + 8
=
= 0002 FD_PSPSEG equ fdos_data + 2
=
= 0002 FD_BPBOFF equ fdos_data + 2
= 0004 FD_BPBSEG equ fdos_data + 4
= 0006 FD_DDSCOFF equ fdos_data + 6
= 0008 FD_DDSCSEG equ fdos_data + 8
=
= 0004 FD_IOCTLFUNC equ fdos_data + 4
= 0006 FD_IOCTLSTAT equ fdos_data + 6
=
= 0002 FD_NUMOPEN equ fdos_data + 2
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 8
=
= 0002 FD_DDIO_DRV_OP equ fdos_data + 2
= 0004 FD_DDIO_NSECTORS equ fdos_data + 4
= 0006 FD_DDIO_STARTLOW equ fdos_data + 6
= 0008 FD_DDIO_STARTHIGH equ fdos_data + 8
= 000A FD_DDIO_DMAOFF equ fdos_data + 10
= 000C FD_DDIO_DMASEG equ fdos_data + 12
=
= include i:msdos.equ
= ; File : $MSDOS.EQU$
= ;
= ; Description :
= ;
= ; Original Author : DIGITAL RESEARCH
= ;
= ; Last Edited By : $CALDERA$
= ;
= ;-----------------------------------------------------------------------;
= ; Copyright Work of Caldera, Inc. All Rights Reserved.
= ;
= ; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
= ; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
= ; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
= ; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
= ; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
= ; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
= ; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
= ; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
= ; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
= ; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
= ; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
= ; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
= ; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
= ; CIVIL LIABILITY.
= ;-----------------------------------------------------------------------;
= ;
= ; *** Current Edit History ***
= ; *** End of Current Edit History ***
= ;
= ; $Log$
= ;
= ; ENDLOG
=
=
= 0000 MS_P_TERMCPM equ 00H
= 0001 MS_C_READ equ 01H
= 0002 MS_C_WRITE equ 02H
= 0003 MS_A_READ equ 03H
= 0004 MS_A_WRITE equ 04H
= 0005 MS_L_WRITE equ 05H
= 0006 MS_C_RAWIO equ 06H
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 9
= 0007 MS_C_RAWIN equ 07H
= 0008 MS_C_NOECHO equ 08H
= 0009 MS_C_WRITESTR equ 09H
= 000A MS_C_READSTR equ 0aH
= 000B MS_C_STAT equ 0bH
= 000C MS_C_FLUSH equ 0cH
= 000D MS_DRV_ALLRESET equ 0dH
= 000E MS_DRV_SET equ 0eH
= 000F MS_F_OPEN equ 0fH
= 0010 MS_F_CLOSE equ 10H
= 0011 MS_F_SFIRST equ 11H
= 0012 MS_F_SNEXT equ 12H
= 0013 MS_F_DELETE equ 13H
= 0014 MS_F_READ equ 14H
= 0015 MS_F_WRITE equ 15H
= 0016 MS_F_MAKE equ 16H
= 0017 MS_F_RENAME equ 17H
= 0019 MS_DRV_GET equ 19H
= 001A MS_F_DMAOFF equ 1aH
= 001B MS_DRV_ALLOC equ 1bH
= 001C MS_DRV_ALLOCSPEC equ 1cH
= 0021 MS_F_READRAND equ 21H
= 0022 MS_F_WRITERAND equ 22H
= 0023 MS_F_SIZE equ 23H
= 0024 MS_F_RANDREC equ 24H
= 0025 MS_S_SETINT equ 25H
= 0026 MS_P_MKPSP equ 26H
= 0027 MS_F_READBLK equ 27H
= 0028 MS_F_WRITEBLK equ 28H
= 0029 MS_F_PARSE equ 29H
= 002A MS_T_GETDATE equ 2aH
= 002B MS_T_SETDATE equ 2bH
= 002C MS_T_GETTIME equ 2cH
= 002D MS_T_SETTIME equ 2dH
= 002E MS_F_VERIFY equ 2eH
= 002F MS_F_DMAGET equ 2fH
= 0030 MS_S_BDOSVER equ 30H
= 0031 MS_P_TERMKEEP equ 31H
= 0033 MS_S_BREAK equ 33H
= 0035 MS_S_GETINT equ 35H
= 0036 MS_DRV_SPACE equ 36H
= 0038 MS_S_COUNTRY equ 38H
= 0039 MS_X_MKDIR equ 39H
= 003A MS_X_RMDIR equ 3aH
= 003B MS_X_CHDIR equ 3bH
= 003C MS_X_CREAT equ 3cH
= 003D MS_X_OPEN equ 3dH
= 003E MS_X_CLOSE equ 3eH
= 003F MS_X_READ equ 3fH
= 0040 MS_X_WRITE equ 40H
= 0041 MS_X_UNLINK equ 41H
= 0042 MS_X_LSEEK equ 42H
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 10
= 0043 MS_X_CHMOD equ 43H
= 0044 MS_X_IOCTL equ 44H
= 0045 MS_X_DUP equ 45H
= 0046 MS_X_DUP2 equ 46H
= 0047 MS_X_CURDIR equ 47H
= 0048 MS_M_ALLOC equ 48H
= 0049 MS_M_FREE equ 49H
= 004A MS_M_SETBLOCK equ 4aH
= 004B MS_X_EXEC equ 4bH
= 004C MS_X_EXIT equ 4cH
= 004D MS_X_WAIT equ 4dH
= 004E MS_X_FIRST equ 4eH
= 004F MS_X_NEXT equ 4fH
= 0050 MS_P_SETPSP equ 50H
= 0054 MS_F_GETVERIFY equ 54H
= 0056 MS_X_RENAME equ 56H
= 0057 MS_X_DATETIME equ 57H
= 0058 MS_M_STRATEGY equ 58h
= 0059 MS_F_ERROR equ 59H
= 005A MS_X_MKTEMP equ 5aH
= 005B MS_X_MKNEW equ 5bH
= 005C MS_F_LOCK equ 5cH
= 0060 MS_X_EXPAND equ 60H
= 0062 MS_P_GETPSP equ 62H
= 6601 MS_X_GETCP equ 6601h
= 6602 MS_X_SETCP equ 6602h
= 0067 MS_X_SETHC equ 67h
= 0068 MS_X_COMMIT equ 68h
=
= 0021 DOS_INT equ 21h ; DOS Entry Point
= ;
= 0000 STDIN equ 0 ; Standard Console Input Handle
= 0001 STDOUT equ 1 ; Standard Console Output Handle
= 0002 STDERR equ 2 ; Standard Error Output
= 0003 STDAUX equ 3 ; Auxilary Device Handle
= 0004 STDPRN equ 4 ; Printer Device Handle
= include i:mserror.equ
= ; File : $MSERROR.EQU$
= ;
= ; Description :
= ;
= ; Original Author : DIGITAL RESEARCH
= ;
= ; Last Edited By : $CALDERA$
= ;
= ;-----------------------------------------------------------------------;
= ; Copyright Work of Caldera, Inc. All Rights Reserved.
= ;
= ; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
= ; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
= ; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 11
= ; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
= ; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
= ; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
= ; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
= ; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
= ; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
= ; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
= ; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
= ; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
= ; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
= ; CIVIL LIABILITY.
= ;-----------------------------------------------------------------------;
= ;
= ; *** Current Edit History ***
= ; *** End of Current Edit History ***
= ;
= ; $Log$
= ;
= ; ENDLOG
=
= FFFF ED_FUNCTION equ -01 ; invalid function number
= FFFE ED_FILE equ -02 ; file not found
= FFFD ED_PATH equ -03 ; path not found
= FFFC ED_HANDLE equ -04 ; too many open files
= FFFB ED_ACCESS equ -05 ; file access denied
= FFFA ED_H_MATCH equ -06 ; invalid handle number
= FFF9 ED_DMD equ -07 ; memory descriptor destroyed
= FFF8 ED_MEMORY equ -08 ; insufficient memory
= FFF7 ED_BLOCK equ -09 ; invalid memory block addr
= FFF6 ED_ENVIRON equ -10 ; invalid environment
= FFF5 ED_FORMAT equ -11 ; invalid format
= FFF4 ED_ACC_CODE equ -12 ; invalid access code
= FFF3 ED_DATA equ -13 ; invalid data
= FFF1 ED_DRIVE equ -15 ; invalid drive specified
= FFF0 ED_DIR equ -16 ; can't remove current dir
= FFEF ED_DEVICE equ -17 ; not same device
= FFEE ED_ROOM equ -18 ; no more files
=
= FFED ED_PROTECT equ -19 ; disk write protected
= FFEC ED_BADUNIT equ -20 ; invalid drive specified
= FFEB ED_NOTREADY equ -21 ; drive doesn't respond
= FFEA ED_BADCMD equ -22 ; invalid command to driver
= FFE9 ED_BADDATA equ -23 ; data CRC error
= FFE8 ED_BADRHLEN equ -24 ; (shouldn't happen)
= FFE7 ED_BADSEEK equ -25 ; can't seek to track
= FFE6 ED_BADMEDIA equ -26 ; unrecognizable medium
= FFE5 ED_RNF equ -27 ; record/sector not found
= FFE4 ED_NOPAPER equ -28 ; printer error
= FFE3 ED_WRFAIL equ -29 ; write failed
= FFE2 ED_RDFAIL equ -30 ; read failed
= FFE1 ED_GENFAIL equ -31 ; anything failed
= FFE0 ED_SHAREFAIL equ -32 ; sharing conflict
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 12
= FFDF ED_LOCKFAIL equ -33 ; locking conflict
= FFDE ED_DISKCHG equ -34 ; invalid disk change
= FFDD ED_NOFCBS equ -35 ; FCB table exhausted
= FFDC ED_NOLOCKS equ -36 ; lock list items exhausted
= FFCE ED_NET equ -50 ; Network Request Not Supported
=
= FFBF ED_NETACCESS equ -65 ; file access denied
=
= FFB7 ED_NETPWD equ -73 ; Server Password Error
= FFB6 ED_NETVER equ -74 ; Incorrect Server version
= FFB5 ED_NETREQ equ -75 ; No Local Network Resources
= FFB4 ED_NETTIME equ -76 ; Network Time Out Error
= FFB3 ED_NETCOMM equ -77 ; Network Communications Error
= FFB2 ED_NETSRVR equ -78 ; No Server Network Resources
= FFB1 ED_NETLOG equ -79 ; Server Not Logged In
=
= FFB0 ED_EXISTS equ -80 ; file already exists
= FFAE ED_MAKE equ -82 ; Cannot Make (Files ??)
= FFAD ED_FAIL equ -83 ; FAIL code returned from INT 24
= FFAC ED_STRUCT equ -84 ; Out of Structures
= FFAB ED_ASSIGN equ -85 ; Already Assigned
= FFAA ED_PASSWORD equ -86 ; Invalid Password
= FFA9 ED_PARAM equ -87 ; Invalid Parameter
= FFA8 ED_NETWRITE equ -88 ; Network write fault
= FFA7 ED_NETFUNC equ -89 ; Function not supported on network
= FFA6 ED_COMPONENT equ -90 ; system component not installed
= FFA6 ED_LASTERROR equ -90 ; Last Error Number Used
=
=
= 0001 CLASS_RESOURCE equ 1 ; Out of Resource
= 0002 CLASS_TEMP equ 2 ; Temporary Situation
= 0003 CLASS_AUTHOR equ 3 ; Authorization Error
= 0004 CLASS_INTERNAL equ 4 ; Internal System Software Error
= 0005 CLASS_HARDWARE equ 5 ; Hardware Failure
= 0006 CLASS_SYSTEM equ 6 ; Serious System Failure
= 0007 CLASS_APPLIC equ 7 ; Application Program Error
= 0008 CLASS_LOST equ 8 ; File/Item Not Found
= 0009 CLASS_FORMAT equ 9 ; File/Item Illegal Format
= 000A CLASS_LOCKED equ 10 ; File/Item Locked
= 000B CLASS_MEDIA equ 11 ; Media Failure
= 000C CLASS_EXISTS equ 12 ; Item Already Exists
= 000D CLASS_UNKNOWN equ 13 ; Unknown Classification
=
= 0001 ACT_RETRY equ 1 ; Retry a few times then prompt user
= 0002 ACT_DELAY equ 2 ; Delay then as ACT_RETRY
= 0003 ACT_USER equ 3 ; Prompt user to re-enter data
= 0004 ACT_ABORT equ 4 ; Clean Up then ABORT the process
= 0005 ACT_TERM equ 5 ; Terminate immeadiately NO CLEAN UP
= 0006 ACT_IGNORE equ 6 ; Ignore the Error
= 0007 ACT_URETRY equ 7 ; Retry the error after user intervention
=
= 0001 LOC_UNKNOWN equ 1 ; Unknown error location
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 13
= 0002 LOC_BLOCK equ 2 ; Block Device Failure
= 0003 LOC_NET equ 3 ; Network Failure
= 0004 LOC_CHAR equ 4 ; Related to Serial/Character devices
= 0005 LOC_MEMORY equ 5 ; Failure related to Memory
= include i:psp.def
= ; File : $PSP.DEF$
= ;
= ; Description :
= ;
= ; Original Author : DIGITAL RESEARCH
= ;
= ; Last Edited By : $CALDERA$
= ;
= ;-----------------------------------------------------------------------;
= ; Copyright Work of Caldera, Inc. All Rights Reserved.
= ;
= ; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
= ; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
= ; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
= ; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
= ; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
= ; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
= ; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
= ; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
= ; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
= ; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
= ; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
= ; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
= ; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
= ; CIVIL LIABILITY.
= ;-----------------------------------------------------------------------;
= ;
= ; *** Current Edit History ***
= ; *** End of Current Edit History ***
= ;
= ; $Log$
= ;
= ; ENDLOG
= ;
= ; Program Segment Prefix
= ; ----------------------
= ; This structure holds vital information for DOS programs
= ;
= ;******************************************************************************
= ;*
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 00 | int 20 | memory | *** | jmpf|longjmp off|
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 08 |longjmp seg| int22 Off | int22 Seg | int22 Off |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 10 | int22 Seg | int24 Off | int24 Seg | Parent |
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 14
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 18 | Default Handle Table |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 20 | XFT (20 entries) |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 28 | XFT contd. | Environ | User SP |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 30 | User SS | xfnmax | xftoff | xftseg |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 38 | res1 | res2 | ric | *** | ********* |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 40 | version | ********* | ********* | ********* |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 48 | ********* | ********* | ********* | ********* |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 50 | int 21 | retf| *** | ********* | ********* |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
= ;* 58 | ********* | ********* | PSP fcb 1 |
= ;* +-----+-----+-----+-----+-----+-----+-----+-----+
=
= 0000 PSP_INT20 equ es:word ptr .0000h
= 0002 PSP_MEMORY equ es:word ptr .0002h
= ;PSP_??? equ es:byte ptr .0004h
= 0005 PSP_LONGCALL equ es:byte ptr .0005h
= 0006 PSP_LONGOFF equ es:word ptr .0006h
= 0008 PSP_LONGSEG equ es:word ptr .0008h
= 000A PSP_TERM_IP equ es:word ptr .000Ah
= 000C PSP_TERM_CS equ es:word ptr .000Ch
= 000E PSP_BREAK_IP equ es:word ptr .000Eh
= 0010 PSP_BREAK_CS equ es:word ptr .0010h
= 0012 PSP_ERROR_IP equ es:word ptr .0012h
= 0014 PSP_ERROR_CS equ es:word ptr .0014h
= 0016 PSP_PARENT equ es:word ptr .0016h
= 0018 PSP_XFT equ es:byte ptr .0018h
= ;
= ; The Default Handle Table is HERE !!
= ;
= 002C PSP_ENVIRON equ es:word ptr .002ch
= 002E PSP_USERSP equ es:word ptr .002eh
= 0030 PSP_USERSS equ es:word ptr .0030h
= 0032 PSP_XFNMAX equ es:word ptr .0032h
= 0034 PSP_XFTPTR equ es:dword ptr .0034h
= 0034 PSP_XFTOFF equ es:word ptr .0034h
= 0036 PSP_XFTSEG equ es:word ptr .0036h
= 0038 PSP_RES1 equ es:word ptr .0038h ; DOS Reserved 0FFFFh
= 003A PSP_RES2 equ es:word ptr .003Ah ; DOS Reserved 0FFFFh
= 003C PSP_RIC equ es:byte ptr .003Ch ; Return Interim Character flag
= 0040 PSP_VERSION equ es:word ptr .0040h ; DOS version number
=
=
= 0050 PSP_DOSCALL equ es:word ptr .0050h
= 0052 PSP_DOSRETF equ es:byte ptr .0052h
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 15
=
= 005C PSP_FCB1 equ es:byte ptr .005Ch
= 006C PSP_FCB2 equ es:byte ptr .006Ch
= 0080 PSP_COMLEN equ es:byte ptr .0080h
= 0081 PSP_COMLINE equ es:byte ptr .0081h
=
= 0014 XFNMAX equ 20
=
= 0100 PSPLEN equ 100h
= 0060 PSPILEN equ 60h
= include i:char.def
= ; File : $CHAR.DEF$
= ;
= ; Description :
= ;
= ; Original Author : DIGITAL RESEARCH
= ;
= ; Last Edited By : $CALDERA$
= ;
= ;-----------------------------------------------------------------------;
= ; Copyright Work of Caldera, Inc. All Rights Reserved.
= ;
= ; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
= ; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
= ; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
= ; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
= ; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
= ; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
= ; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
= ; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
= ; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
= ; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
= ; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
= ; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
= ; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
= ; CIVIL LIABILITY.
= ;-----------------------------------------------------------------------;
= ;
= ; *** Current Edit History ***
= ; *** End of Current Edit History ***
= ;
= ; $Log$
= ;
= ; ENDLOG
= ;************************************************;
= ;* *;
= ;* Character Definitions *;
= ;* *;
= ;************************************************;
=
= 0001 CTLA equ 'A' - '@'
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 16
= 0002 CTLB equ 'B' - '@'
= 0003 CTLC equ 'C' - '@'
= 0004 CTLD equ 'D' - '@'
= 0005 CTLE equ 'E' - '@'
= 0006 CTLF equ 'F' - '@'
= 0007 CTLG equ 'G' - '@'
= 0007 BELL equ 'G' - '@'
= 0008 CTLH equ 'H' - '@'
= 0009 CTLI equ 'I' - '@'
= 0009 TAB equ 'I' - '@'
= 000A CTLJ equ 'J' - '@'
= 000A LF equ 'J' - '@'
= 000B CTLK equ 'K' - '@'
= 000D CTLM equ 'M' - '@'
= 000D CR equ 'M' - '@'
= 0010 CTLP equ 'P' - '@'
= 0011 CTLQ equ 'Q' - '@'
= 0012 CTLR equ 'R' - '@'
= 0013 CTLS equ 'S' - '@'
= 0014 CTLT equ 'T' - '@'
= 0015 CTLU equ 'U' - '@'
= 0016 CTLV equ 'V' - '@'
= 0017 CTLW equ 'W' - '@'
= 0018 CTLX equ 'X' - '@'
= 0019 CTLY equ 'Y' - '@'
= 001A CTLZ equ 'Z' - '@'
= 001B ESC equ '[' - '@'
= 001C CTLBS equ '\' - '@'
= 001F CTLUB equ '_' - '@'
= 001E CTLUP equ '^' - '@'
= 007F DEL equ 07Fh
= 007F RUBOUT equ DEL
=
= 005E CTL equ '^'
= include i:reqhdr.equ
= ; File : $REQHDR.EQU$
= ;
= ; Description :
= ;
= ; Original Author : DIGITAL RESEARCH
= ;
= ; Last Edited By : $CALDERA$
= ;
= ;-----------------------------------------------------------------------;
= ; Copyright Work of Caldera, Inc. All Rights Reserved.
= ;
= ; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
= ; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
= ; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
= ; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
= ; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 17
= ; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
= ; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
= ; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
= ; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
= ; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
= ; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
= ; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
= ; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
= ; CIVIL LIABILITY.
= ;-----------------------------------------------------------------------;
= ;
= ; *** Current Edit History ***
= ; *** End of Current Edit History ***
= ;
= ; $Log$
= ;
= ; ENDLOG
=
= 0000 CMD_INIT equ 0 ; Initialize the Device Driver
= 0001 CMD_MEDIA_CHECK equ 1 ; Request Media Check
= 0002 CMD_BUILD_BPB equ 2 ; Build Drive BPB
= 0003 CMD_INPUT_IOCTL equ 3 ; IOCTL input
= 0004 CMD_INPUT equ 4 ; Input
= 0005 CMD_INPUT_NOWAIT equ 5 ; Non destructive input no wait
= 0006 CMD_INPUT_STATUS equ 6 ; Input status
= 0007 CMD_INPUT_FLUSH equ 7 ; Input flush
= 0008 CMD_OUTPUT equ 8 ; Output
= 0009 CMD_OUTPUT_VERIFY equ 9 ; Output with verify
= 000A CMD_OUTPUT_STATUS equ 10 ; Output status
= 000B CMD_OUTPUT_FLUSH equ 11 ; Output flush
= 000C CMD_OUTPUT_IOCTL equ 12 ; IOCTL output
= 000D CMD_DEVICE_OPEN equ 13 ; Device OPEN
= 000E CMD_DEVICE_CLOSE equ 14 ; Device CLOSE
= 000F CMD_FIXED_MEDIA equ 15 ; Removeable Media Check
= 0013 CMD_GENERIC_IOCTL equ 19 ; Generic IOCTL
= 0017 CMD_GET_DEVICE equ 23 ; Get the Logical Device
= 0018 CMD_SET_DEVICE equ 24 ; Set the Logical Device
= 0019 CMD_QUERY_IOCTL equ 25 ; query ioctl support
=
= ; Generic Request Header Format
=
= 0000 RH_LEN equ es:byte ptr 0[bx]
= 0001 RH_UNIT equ es:byte ptr 1[bx]
= 0002 RH_CMD equ es:byte ptr 2[bx]
= 0003 RH_STATUS equ es:word ptr 3[bx]
= 0100 RHS_DONE equ 0100h
= 0200 RHS_BUSY equ 0200h
= 0400 RHS_IC equ 0400h ; Interim Character
= 0800 RHS_RM equ 0800h
= 8000 RHS_ERROR equ 8000h
=
= ;******
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 18
= ;* No longer safe to use - some device drivers trample on them....
= ;*
= ;* RH_STRATEGY equ es:dword ptr 5[bx] ; Device Strategy Routine
= ;* RH_STRATOFF equ es:word ptr 5[bx] ; Strategy Offset
= ;* RH_STRATSEG equ es:word ptr 7[bx] ; Strategy Segment
= ;* RH_INTERRUPT equ es:dword ptr 9[bx] ; Device Interrupt Routine
= ;* RH_INTOFF equ es:word ptr 9[bx] ; Intterupt Offset
= ;* RH_INTSEG equ es:word ptr 11[bx] ; Interrupt Segment
= ;*****
=
= ; Request header for initialization
=
= 000D RH0_NUNITS equ es:byte ptr 13[bx]
= 000E RH0_RESIDENT equ es:word ptr 14[bx]
= 0012 RH0_BPBOFF equ es:word ptr 18[bx]
= 0014 RH0_BPBSEG equ es:word ptr 20[bx]
= 0016 RH0_DRIVE equ es:byte ptr 22[bx]
= 0016 RH0_LEN equ 22
=
= ; Request header for media check
=
= 000D RH1_MEDIA equ es:byte ptr 13[bx] ; BDOS: current media byte
= 000E RH1_RETURN equ es:byte ptr 14[bx] ; driver: return code (00, 01, FF)
= 000F RH1_VOLID equ es:dword ptr 15[bx] ; driver: volume label address
= 000F RH1_LEN equ 15
=
= ; Request header for "build BPB"
=
= 000D RH2_MEDIA equ es:byte ptr 13[bx] ; BDOS or driver?
= 000E RH2_BUFFER equ es:dword ptr 14[bx] ; BDOS: scratch buffer for driver use
= 0012 RH2_BPB equ es:dword ptr 18[bx] ; same as the following:
= 0012 RH2_BPBOFF equ es:word ptr 18[bx] ; driver: address of new BPB
= 0014 RH2_BPBSEG equ es:word ptr 20[bx]
= 0018 RH2_LEN equ 24
=
= ; Request header for input/output
=
= 000D RH4_MEDIA equ es:byte ptr 13[bx] ; BDOS: current media byte
= 000D RH4_RIC equ es:byte ptr 13[bx] ; BDOS: Return Interim Char flg
= 000E RH4_BUFFER equ es:dword ptr 14[bx] ; BDOS: disk transfer address
= 000E RH4_BUFOFF equ es:word ptr 14[bx] ; BDOS: Buffer Offset
= 0010 RH4_BUFSEG equ es:word ptr 16[bx] ; BDOS: Buffer Segment
= 0012 RH4_COUNT equ es:word ptr 18[bx] ; BDOS: sector count
= 0014 RH4_SECTOR equ es:word ptr 20[bx] ; BDOS: starting sector
= 0016 RH4_VOLID equ es:dword ptr 22[bx] ; driver: volume if illegal disk change
= 001A RH4_BIGSECTOR equ es:dword ptr 26[bx]
= 001A RH4_BIGSECTORLO equ es:word ptr 26[bx]
= 001C RH4_BIGSECTORHI equ es:word ptr 28[bx]
=
= 001E RH4_LEN equ 30
=
= ; Request Header for Non-Destructive Input
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 19
=
= 000D RH5_CHAR equ es:byte ptr 13[bx] ; Character Read from Device
= 000D RH5_RIC equ es:byte ptr 13[bx] ; BDOS: Return Interim Char flg
= 000E RH5_LEN equ 14
=
= ; Request Header for Device Open
=
= 000D RH13_LEN equ 13
=
= ; Request Header for Device Close
=
= 000D RH14_LEN equ 13
=
= ; Request header for generic IOCTL
=
= 000D RH19_CATEGORY equ es:word ptr 13[bx] ; BDOS: major/minor function number
= 000D RH19_MAJOR equ es:byte ptr 13[bx] ; BDOS: Major Function Number
= 000E RH19_MINOR equ es:byte ptr 14[bx] ; BDOS: Minor Function Number
= 000F RH19_SI equ es:word ptr 15[bx] ; BDOS: User SI
= 0011 RH19_DI equ es:word ptr 17[bx] ; BDOS: User DI
= 0013 RH19_GENPB equ es:dword ptr 19[bx] ; BDOS: extra parameters
= 0017 RH19_LEN equ 23
=
= 0040 RQ19_SET equ 40h ; set device parameters
= 0060 RQ19_GET equ 60h ; get device parameters
= 0041 RQ19_WRITE equ 41h ; write tracks
= 0061 RQ19_READ equ 61h ; read tracks
= 0042 RQ19_FORMAT equ 42h ; format tracks
= 0062 RQ19_VERIFY equ 62h ; verify tracks
=
= 004C RQ19_PRP_START equ 4Ch ; start of codepage prepare
= 004D RQ19_PRP_END equ 4Dh ; end of codepage prepare
= 004A RQ19_SELECT equ 4Ah ; select code page
= 006A RQ19_QRY_SEL equ 6Ah ; query selected code page
= 006B RQ19_QRY_PRP equ 6Bh ; query prepared code page(s)
= 005F RQ19_DSP_SET equ 5Fh ; set display information
= 007F RQ19_DSP_GET equ 7Fh ; get display information
=
= ; Request header for get/set drive
=
= 000E RH24_CMD equ es:byte ptr 14[bx] ; BDOS: Command Code
= 000F RH24_STATUS equ es:word ptr 15[bx] ; BDOS: Status
= 0011 RH24_RESVD equ es:dword ptr 17[bx] ; BDOS: Reserved
= 0015 RH24_LEN equ 21
=
= 001E RH_SIZE equ 30 ; maximum size of request header
;
0000 ERR_TBL_CODE equ byte ptr 0 ; Error Code in Table
0001 ERR_TBL_CLASS equ byte ptr 1 ; Error Class entry in Table
0002 ERR_TBL_ACTION equ byte ptr 2 ; Error Action entry in Table
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 20
0003 ERR_TBL_LOCUS equ byte ptr 3 ; Locus entry in table
0004 ERR_TBL_LEN equ 4 ; 4 bytes per entry
;
PCM_CODE CSEG BYTE
extrn get_dseg:near
extrn do_int24:near
extrn reload_registers:near
extrn return_AX_CLC:near
;
; *****************************
; *** DOS Function 59 ***
; *** Get Extended Error ***
; *****************************
;
Public func59
func59:
0000 C43E0000 E les di,error_dev ; Return device driver address
0004 8A3E0000 E mov bh,error_class ; return the Error Class
0008 8A1E0000 E mov bl,error_action ; the Action Code
000C 8A2E0000 E mov ch,error_locus ; the Locus Code
0010 A10000 E mov ax,error_code ; the Error Code
0013 C5360000 E lds si,int21regs_ptr ; point to user stack
0017 8C4410 mov reg_ES[si],es
001A 897C0A mov reg_DI[si],di
001D 895C02 mov reg_BX[si],bx
0020 894C04 mov reg_CX[si],cx
0023 161F push ss ! pop ds
0025 E90000 E jmp return_AX_CLC
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 21
eject
; On Entry:- AX == Internal Error Number
;
; On Exit:- None
; CY set if error should be returned
; CY clear if it should be ignored
;
Public error_exit
error_exit:
0028 803E000000 E cmp internal_flag,0 ; If this is an internal
002D 7506 0035 jnz error_ret ; do not generate a critical
002F E86800 009A call disk_error ; error
0032 7504 0038 jnz error_r10 ; No Error Occured or Ignored
0034 C3 ret ; in critcal error handler
;
; Return the error code to the user and DO NOT generate any
; critical errors.
;
; On Entry:- AX == Internal Error Number
;
; On Exit:- None
;
Public error_ret
error_ret:
0035 E8D600 010E call set_error ; the internal error code
error_r10: ; otherwise negate
0038 C43E0000 E les di,int21regs_ptr
003C 26814D160100 or es:reg_FLAGS[di],CARRY_FLAG ; set the "users" carry Flag
0042 F9 stc ; also set real one
if offset reg_AX EQ 0
0043 AB stosw ; save return code
else
mov es:reg_AX[di],ax
endif
0044 C3 ret
;
; On Entry:- AX == Internal Error Number
;
; On Exit:- None
;
Public fcberror_exit
fcberror_exit:
0045 E85200 009A call disk_error ; Process the error code generating
0048 7402 004C jz fe_e10 ; a critical error is required
004A B0FF mov al,0FFh ; on FCB error return AL = FF
fe_e10:
004C C3 ret
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 22
eject
; WARNING - may be called from FDOS with DS = SYSDAT
;
; CHAR_ERROR is called when any character device function generates
; an error. First CHAR_ERROR sets the correct parameters for Get
; Extended Error. Then it generates a Critical Error by calling
; DO_INT24.
;
; Entry:- ES:SI -> device driver header
; SS:BX -> RH_
; AX = RH_STATUS
;
; Exit AL Error Action
;
Public char_error
char_error:
004D 36F606000040 E test ss:valid_flg,NO_CRIT_ERRORS
0053 7403 0058 jz char_e10
0055 B003 mov al,ERR_FAIL ; no critical errors allowed
0057 C3 ret ; so just fail things
char_e10:
0058 1E push ds
0059 06 push es
005A 53 push bx
005B 51 push cx
005C 52 push dx
005D 56 push si
005E 57 push di
005F 161F push ss ! pop ds ; DS -> our data now
0061 89360000 E mov word ptr error_dev+0,si ; save the device driver address
0065 8C060200 E mov word ptr error_dev+2,es ; and then initialise the FUNC59
0069 06 push es ; data areas
006A 257F00 and ax,007Fh ; Mask the Unused Bits
006D 80CCB8 or ah,80h+OK_RIF ; Retry/Ignore/Abort/Fail allowable
0070 36807F0208 cmp ss:RH_CMD,CMD_OUTPUT ; is this a read or write failure ?
0075 7502 0079 jne char_e20
0077 FEC4 inc ah ; 01 is a Write Failure
char_e20:
0079 88260000 E mov rwmode,ah ;
007D 50 push ax ; save for int 24
007E 98 cbw ; zero AH again
007F F7D8 neg ax ; convert to an internal error
0081 05EDFF add ax,ED_PROTECT ; code for set_error
0084 B104 mov cl,LOC_CHAR
0086 E88500 010E call set_error
0089 05EDFF add ax,ED_PROTECT ; convert to hardware error
008C 97 xchg ax,di ; DI == hardware error
008D 58 pop ax
008E 07 pop es
008F E80000 E call do_int24 ; execute INT 24
0092 5F pop di
0093 5E pop si
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 23
0094 5A pop dx
0095 59 pop cx
0096 5B pop bx
0097 07 pop es
0098 1F pop ds
0099 C3 ret
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 24
eject
;
; DISK_ERROR gains control after any DOS disk based function
; has been executed which generates an error. First ERROR set the
; correct parameters for Get Extended Error. Then it determines if
; the current error should generate a Critical Error and calls
; DO_INT24 if TRUE.
;
;
; On Entry:
; AX Internal Error Code
;
; On Exit:
; AX 0 if no error to return (Ignore)
; AX DOS Error Code
; ZF reflects AX
;
disk_error:
009A B104 mov cl,LOC_CHAR ; assume character device
; determine if the error is
009C F606000080 E test rwmode,80h ; caused by a character or
00A1 7502 00A5 jnz disk_e10 ; block device and set the
00A3 B102 mov cl,LOC_BLOCK ; the critical error locus
disk_e10:
00A5 E86600 010E call set_error ; record error information
00A8 7461 010B jz disk_e50 ; just return a logical error.
00AA 05EDFF add ax,ED_PROTECT ; Convert to HardWare Error
00AD 8BF8 mov di,ax ; DI == HardWare Error
; Now get the information
00AF 8A260000 E mov ah,rwmode ; about the error location
00B3 80E4C7 and ah,not OK_RIF ; mask the all responses
; mov al,valid_flg ; valid flag contains no crit
; and al,not NO_CRITICAL_ERRORS ; errors bit, but if that was
; or ah,al ; set we wouldn't be here
00B6 0A260000 E or ah,valid_flg ; or in valid responses
00BA 83FBE1 cmp bx,ED_GENFAIL ; if it's general failure
00BD 7503 00C2 jne disk_e20 ; we cannot Ignore the error
00BF 80E4DF and ah,not OK_IGNORE ; but must Abort/Fail/Retry
disk_e20: ; as appropriate
00C2 A00000 E mov al,err_drv ; get the failing drive
00C5 A20000 E mov error_drive,al ; and save locally
00C8 C4360000 E les si,error_dev ; get device driver header
; are we are a character device
00CC F6C480 test ah,80h ; as these have handled at a
00CF 7529 00FA jnz disk_e40 ; lower level and just need
; to be FAILed back to caller
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 25
00D1 E80000 E call do_int24 ; Execute INT 24
00D4 8AD8 mov bl,al ; Copy reponse into BL
00D6 33C0 xor ax,ax ; Assume Ignore Error
00D8 80FB00742E 010B cmp bl,ERR_IGNORE ! jz disk_e50 ; Ignore the Error
00DD 80FB037418 00FA cmp bl,ERR_FAIL ! jz disk_e40 ; If not FAIL then RETRY
00E2 E80000 E call reload_registers ; get back entry registers
00E5 A30000 R mov FD_FUNC,ax ; save AX for a moment
00E8 8AC4 mov al,ah ; set up function number
00EA 32E4 xor ah,ah ; in AX
00EC 87060000 R xchg ax,FD_FUNC ; save for use by FDOS
00F0 32E4 xor ah,ah ; zero AH 'cause it's handy
00F2 8B260000 E mov sp,retry_sp ; Must be RETRY so reset the
00F6 FF260000 E jmp retry_off ; STACK and IP
disk_e40:
;
; When a Critical Error is FAILED then we do the following
; if (extended error_code <= ED_SHAREFAIL) then
; ret = ED_ACCESS;
; else
; ret = ED_FAIL;
; extended error_code = ED_FAIL;
; return(ret);
;
; nb. above proto-code is at the request of ant
;
00FA B85300 mov ax,-(ED_FAIL) ; always return ED_FAIL in the
00FD 87060000 E xchg ax,error_code ; extended error_code
0101 3D2000 cmp ax,-(ED_SHAREFAIL) ; did we FAIL on sharing conflict ?
0104 B80500 mov ax,-(ED_ACCESS) ; assume we did and prepare to return
0107 7302 010B jae disk_e50 ; ED_ACCESS
0109 B053 mov al,-(ED_FAIL) ; woops, return ED_FAIL after all
disk_e50:
010B 0BC0 or ax,ax ; NZ if error return required
010D C3 ret
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 26
eject
;
; On Entry:- AX Internal Error Code
; CL Critical Error Locus
;
; On Exit:- AX DOS Error Code
; BX Internal Error Code
; ZF set on logical error
set_error:
010E 8BD8 mov bx,ax ; by default we return the raw error
0110 BF7400 R mov di,offset critical_error; Scan for critical Errors First
0113 E88600 019C call scan_error_table ; look for a matching error
0116 723B 0153 jc set_logical_error
0118 880E0000 E mov locus,cl ; Save the critical error LOCUS
011C 3DE0FF cmp ax,ED_SHAREFAIL ; watch out for SHAREFAIL - the action
011F 7514 0135 jne set_e10 ; depends on the caller
;
; ED_SHAREFAIL will return ED_ACCESS if the result of an attempt to open
; a file in shared mode, otherwise (FCB's and compatibility) it will
; generate a critical error.
;
0121 BBE1FF mov bx,ED_GENFAIL ; assume we want a critical error
0124 833E00003D R cmp FD_FUNC,MS_X_OPEN ; is it a shared open ?
0129 7540 016B jnz set_error_data
012B F70606007000 R test FD_MODE,0$111$0$000b ; mode
0131 7438 016B jz set_error_data
0133 EB1B 0150 jmps set_e30 ; return a logical "access denied"
set_e10:
0135 3DDFFF cmp ax,ED_LOCKFAIL ; have we a lockfail error ?
0138 750C 0146 jne set_e20
;
; ED_LOCKFAIL returns ED_ACCESS if a lock attempt fails, but a critical error
; on an attempt to read/write a locked region.
;
013A 833E000052 R cmp FD_FUNC,FD_LOCK ; was it a result of specific lock
013F 7412 0153 je set_logical_error ; call ? yes, it's a logical error
0141 BBE1FF mov bx,ED_GENFAIL ; no, generate a critical error
0144 EB25 016B jmps set_error_data
set_e20:
0146 F606000040 E test valid_flg,NO_CRIT_ERRORS
014B 741E 016B jz set_error_data ; do we allow critical errors ?
014D B8FBFF mov ax,ED_ACCESS ; extended error code is Access Denied
set_e30:
0150 BBFBFF mov bx,ED_ACCESS ; return access denied to caller
; jmps set_logical_error
set_logical_error:
0153 33FF xor di,di
0155 893E0000 E mov word ptr error_dev+0,di ; must be a logical error so force
0159 893E0200 E mov word ptr error_dev+2,di ; the ERROR_DEV to 0000:0000
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 27
015D BF0000 R mov di,offset logical_error ; scan the Logical error table
0160 E83900 019C call scan_error_table
0163 3DBFFF cmp ax,ED_NETACCESS ; if it's a networked access denied
0166 7503 016B jne set_error_data ; turn it into ordinary one
0168 BBFBFF mov bx,ED_ACCESS ; return a logical "access denied"
; jmps set_error_data
set_error_data:
; On Entry:
; AX = Internal Error Code for extended error
; BX = Internal Error Code for returned error
; CS:DI -> error table entry
; On Exit:
; AX = DOS Error Code
; BX = Internal Error Code
; ZF set on logical error
;
016B F7D8 neg ax
016D A30000 E mov error_code,ax ; Save the Error Code
0170 2E8A4501 mov al,cs:ERR_TBL_CLASS[di]
0174 A20000 E mov error_class,al ; Save the Class
0177 2E8A4502 mov al,cs:ERR_TBL_ACTION[di]
017B A20000 E mov error_action,al ; Save the Action
017E 2E8A4503 mov al,cs:ERR_TBL_LOCUS[di] ; Get the Locus
0182 A20000 E mov error_locus,al ; Save the Locus and then check
0185 84C0 test al,al ; if the function overrides
0187 7506 018F jnz set_d10 ; this value
0189 A00000 E mov al,locus ; Get the Global Locus value
018C A20000 E mov error_locus,al ; set by the calling function
set_d10: ; and save for FUNC 59
018F 8BC3 mov ax,bx ; Return to the caller with
0191 F7D8 neg ax ; the DOS error code.
0193 8B3E0000 E mov di,word ptr error_dev ; set ZF if logical error
0197 0B3E0200 E or di,word ptr error_dev+2 ; error_dev = 0:0
019B C3 ret
scan_error_table:
019C 2E803D00 cmp cs:ERR_TBL_CODE[di],0
01A0 740A 01AC je scan_et10 ; Check for the end of the list
01A2 2E3A05 cmp al,cs:ERR_TBL_CODE[di]
01A5 7406 01AD je scan_et20
01A7 83C704 add di,ERR_TBL_LEN
01AA EBF0 019C jmps scan_error_table
scan_et10:
01AC F9 stc
scan_et20:
01AD C3 ret
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 28
eject
PCM_RODATA CSEG WORD
0000 logical_error rb 0
;
; Internal Code Error Class Error Action Error Locus
; ============= =========== ============ ===========
0000 FF070400 db ED_FUNCTION, CLASS_APPLIC, ACT_ABORT, 00
0004 FE080302 db ED_FILE, CLASS_LOST, ACT_USER, LOC_BLOCK
0008 FD080302 db ED_PATH, CLASS_LOST, ACT_USER, LOC_BLOCK
000C FC010401 db ED_HANDLE, CLASS_RESOURCE, ACT_ABORT, LOC_UNKNOWN
0010 FB030300 db ED_ACCESS, CLASS_AUTHOR, ACT_USER, 00
0014 BF030300 db ED_NETACCESS, CLASS_AUTHOR, ACT_USER, 00
0018 FA070401 db ED_H_MATCH, CLASS_APPLIC, ACT_ABORT, LOC_UNKNOWN
001C F9070505 db ED_DMD, CLASS_APPLIC, ACT_TERM, LOC_MEMORY
0020 F8010405 db ED_MEMORY, CLASS_RESOURCE, ACT_ABORT, LOC_MEMORY
0024 F7070405 db ED_BLOCK, CLASS_APPLIC, ACT_ABORT, LOC_MEMORY
0028 F6070405 db ED_ENVIRON, CLASS_APPLIC, ACT_ABORT, LOC_MEMORY
002C F5090301 db ED_FORMAT, CLASS_FORMAT, ACT_USER, LOC_UNKNOWN
0030 F4070401 db ED_ACC_CODE, CLASS_APPLIC, ACT_ABORT, LOC_UNKNOWN
0034 F3090401 db ED_DATA, CLASS_FORMAT, ACT_ABORT, LOC_UNKNOWN
0038 F1080302 db ED_DRIVE, CLASS_LOST, ACT_USER, LOC_BLOCK
003C F0030302 db ED_DIR, CLASS_AUTHOR, ACT_USER, LOC_BLOCK
0040 EF0D0302 db ED_DEVICE, CLASS_UNKNOWN, ACT_USER, LOC_BLOCK
0044 EE080302 db ED_ROOM, CLASS_LOST, ACT_USER, LOC_BLOCK
0048 B00C0302 db ED_EXISTS, CLASS_EXISTS, ACT_USER, LOC_BLOCK
004C AC010400 db ED_STRUCT, CLASS_RESOURCE, ACT_ABORT, 00
0050 AA030301 db ED_PASSWORD, CLASS_AUTHOR, ACT_USER, LOC_UNKNOWN
0054 AE010402 db ED_MAKE, CLASS_RESOURCE, ACT_ABORT, LOC_BLOCK
;; db ED_NET, CLASS_FORMAT, ACT_USER, LOC_NET
0058 AB0C0303 db ED_ASSIGN, CLASS_EXISTS, ACT_USER, LOC_NET
005C A9090301 db ED_PARAM, CLASS_FORMAT, ACT_USER, LOC_UNKNOWN
0060 AD0D0401 db ED_FAIL, CLASS_UNKNOWN, ACT_ABORT, LOC_UNKNOWN
0064 E00A0202 db ED_SHAREFAIL, CLASS_LOCKED, ACT_DELAY, LOC_BLOCK
0068 DF0A0202 db ED_LOCKFAIL, CLASS_LOCKED, ACT_DELAY, LOC_BLOCK
006C DC010405 db ED_NOLOCKS, CLASS_RESOURCE, ACT_ABORT, LOC_MEMORY
0070 00060501 db 00, CLASS_SYSTEM, ACT_TERM, LOC_UNKNOWN
0074 critical_error rb 0
;
; Internal Code Error Class Error Action Error Locus
; ============= =========== ============ ===========
0074 ED0B0702 db ED_PROTECT, CLASS_MEDIA, ACT_URETRY, LOC_BLOCK
0078 EC040501 db ED_BADUNIT, CLASS_INTERNAL, ACT_TERM, LOC_UNKNOWN
007C EB050700 db ED_NOTREADY, CLASS_HARDWARE, ACT_URETRY, 00
0080 EA040501 db ED_BADCMD, CLASS_INTERNAL, ACT_TERM, LOC_UNKNOWN
0084 E90B0402 db ED_BADDATA, CLASS_MEDIA, ACT_ABORT, LOC_BLOCK
0088 E7050102 db ED_BADSEEK, CLASS_HARDWARE, ACT_RETRY, LOC_BLOCK
008C E60B0702 db ED_BADMEDIA, CLASS_MEDIA, ACT_URETRY, LOC_BLOCK
0090 E50B0402 db ED_RNF, CLASS_MEDIA, ACT_ABORT, LOC_BLOCK
0094 E4020704 db ED_NOPAPER, CLASS_TEMP, ACT_URETRY, LOC_CHAR
0098 E3050400 db ED_WRFAIL, CLASS_HARDWARE, ACT_ABORT, 00
009C E2050400 db ED_RDFAIL, CLASS_HARDWARE, ACT_ABORT, 00
PC-DOS RASM-86 1.4a Source: ERROR.A86 Page 29
00A0 E10D0400 db ED_GENFAIL, CLASS_UNKNOWN, ACT_ABORT, 00
00A4 E00A0202 db ED_SHAREFAIL, CLASS_LOCKED, ACT_DELAY, LOC_BLOCK
00A8 DF0A0202 db ED_LOCKFAIL, CLASS_LOCKED, ACT_DELAY, LOC_BLOCK
00AC DD070401 db ED_NOFCBS, CLASS_APPLIC, ACT_ABORT, LOC_UNKNOWN
00B0 default_error rb 0
00B0 00060501 db 00, CLASS_SYSTEM, ACT_TERM, LOC_UNKNOWN
PCMODE_DATA DSEG WORD
extrn indos_flag:byte
extrn internal_flag:byte
extrn int21regs_ptr:dword
extrn current_psp:word
extrn retry_off:word, retry_sp:word
extrn valid_flg:byte
extrn error_locus:byte ; Error Locus
extrn error_code:word ; DOS format error Code
extrn error_action:byte ; Error Action Code
extrn error_class:byte ; Error Class
extrn error_dev:dword ; Failing Device Header
extrn error_drive:byte ; Failing Disk Drive
extrn err_drv:byte
extrn locus:byte
extrn rwmode:byte
end
End of assembly. Number of errors: 0. Use factor: 25%
 extrn error_class:byte ; Error Class