;       SCCSID = @(#)ras.inc    6.1 90/11/17
;      SCCSID = @(#)ras.inc     13.1 88/10/14

;***    RAS.INC  -  Defines all of the major and minor codes used by RAS

;
; This file contains the major and minor codes that are used by the RAS
; component. The entire file is conditionally assembled under control of
; the RAS flag (defined in rasms.inc).
;
; Major and minor code equates should be defined using the following format.
;
;       RAS_MC_component        ; major code for a component
;       RAS_PRE_func            ; pre-invocation minor code for a function
;       RAS_POST_func           ; post-invocation minor code for a function
;
; Minor code equates should be followed by a comment which specifies what
; information is being traced. The comment should reflect the order that
; the different pieces of information are in the buffer.
;
; For example:
;
;       RAS_MC_FILESYS          EQU     30
;       RAS_PRE_DOSOPEN         EQU     0Ah
;       RAS_POST_DOSOPEN        EQU     8Ah
;
; would define the major code for the file system component and the pre
; and post invocation, minor codes for DOSOPEN.
;

IF      RAS

;
;** Tasking major code (external)
;
RAS_MC_TASKING                  EQU     16      ; 10h
;
;* Pre-invocation Tasking minor codes
;
RAS_PRE_DOSCREATETHREAD         EQU     01h     ; program address
RAS_PRE_DOSCWAIT                EQU     02h     ; wait option, process id
RAS_PRE_DOSENTERCRITSEC         EQU     03h     ; none
RAS_PRE_DOSEXECPGM              EQU     04h     ; pgm pointer, asynch. indic.
RAS_PRE_DOSEXIT                 EQU     05h     ; result code
RAS_PRE_DOSEXITCRITSEC          EQU     06h     ; none
RAS_PRE_DOSEXITLIST             EQU     07h     ; none
RAS_PRE_DOSSETPRTY              EQU     08h     ; ID, priority delta,
                                                ; priority class, scope
RAS_PRE_DOSKILLPROCESS          EQU     09h     ; pid
RAS_PRE_DOSPTRACE               EQU     0Ah     ; none
RAS_PRE_DOSRESUMETHREAD         EQU     0Bh     ; thread id
RAS_PRE_DOSSUSPENDTHREAD        EQU     0Ch     ; thread id
RAS_PRE_DOSSETCP                EQU     0Dh     ; codepage id
;
;* Post-invocation Tasking minor codes
;
RAS_POST_DOSCREATETHREAD        EQU     81h     ; thread id, return code
RAS_POST_DOSCWAIT               EQU     82h     ; process id word, return code
RAS_POST_DOSENTERCRITSEC        EQU     83h     ; none
RAS_POST_DOSEXECPGM             EQU     84h     ; process id , return code
RAS_POST_DOSEXIT                EQU     85h     ; return code
RAS_POST_DOSEXITCRITSEC         EQU     86h     ; none
RAS_POST_DOSEXITLIST            EQU     87h     ; return code
RAS_POST_DOSSETPRTY             EQU     88h     ; return code
RAS_POST_DOSKILLPROCESS         EQU     89h     ; return code
RAS_POST_DOSPTRACE              EQU     8Ah     ; return code
RAS_POST_DOSRESUMETHREAD        EQU     8Bh     ; return code
RAS_POST_DOSSUSPENDTHREAD       EQU     8Ch     ; return code
RAS_POST_DOSSETCP               EQU     8Dh     ; return code
;
;** Program Execution Control major code (external)
;
RAS_MC_PGEXECCTL                EQU     20      ; 14h
;
;* Pre-invocation Program Execution Control minor code
;
RAS_PRE_DOSLOADMODULE           EQU     01h     ; module name
RAS_PRE_DOSFREEMODULE           EQU     02h     ; module handle
RAS_PRE_DOSGETPROCADDR          EQU     03h     ; proc name, module handle
RAS_PRE_DOSGETMODHANDLE         EQU     04h     ; module name
RAS_PRE_DOSGETMODNAME           EQU     05h     ; module handle
RAS_PRE_DOSQUERYEXTLIBPATH      EQU     06h     ; flag
RAS_PRE_DOSSETEXTLIBPATH        EQU     07h     ; path string, flag
;
;* Post-invocation Program Execution Control minor code
;
RAS_POST_DOSLOADMODULE          EQU     81h     ; module handle, return code
RAS_POST_DOSFREEMODULE          EQU     82h     ; return code
RAS_POST_DOSGETPROCADDR         EQU     83h     ; proc address, return code
RAS_POST_DOSGETMODHANDLE        EQU     84h     ; module handle, return code
RAS_POST_DOSGETMODNAME          EQU     85h     ; module name, return code
RAS_POST_DOSQUERYEXTLIBPATH     EQU     86h     ; path string, flag
RAS_POST_DOSSETEXTLIBPATH       EQU     87h     ; path string, flag
;
;** IPC major code (external)
;
RAS_MC_IPC                      EQU     24      ; 18h
;
;* Pre-invocation IPC minor code
;
RAS_PRE_DOSHOLDSIGNAL           EQU     01h     ; action code
RAS_PRE_DOSSENDSIGNAL           EQU     02h     ; sig number, pid
RAS_PRE_DOSSETSIGHANDLER        EQU     03h     ; sig number, action
RAS_PRE_DOSMAKEPIPE             EQU     04h     ; pipe size
RAS_PRE_DOSSEMCLEAR             EQU     05h     ; sem handle
RAS_PRE_DOSSEMREQUEST           EQU     06h     ; sem handle
RAS_PRE_DOSSEMSET               EQU     07h     ; sem handle
RAS_PRE_DOSSEMSETWAIT           EQU     08h     ; sem handle
RAS_PRE_DOSSEMWAIT              EQU     09h     ; sem handle
RAS_PRE_DOSMUXSEMWAIT           EQU     0Ah     ; none
RAS_PRE_DOSCLOSESEM             EQU     0Bh     ; sem handle
RAS_PRE_DOSCREATESEM            EQU     0Ch     ; sem name
RAS_PRE_DOSOPENSEM              EQU     0Dh     ; sem name
RAS_PRE_DOSFLAGPROCESS          EQU     0Eh     ; flag num, pid
;
;* Post-invocation IPC minor code
;
RAS_POST_DOSHOLDSIGNAL          EQU     81h     ; return code
RAS_POST_DOSSENDSIGNAL          EQU     82h     ; return code
RAS_POST_DOSSETSIGHANDLER       EQU     83h     ; return code
RAS_POST_DOSMAKEPIPE            EQU     84h     ; write hndl, read hndl,
                                                ; return code
RAS_POST_DOSSEMCLEAR            EQU     85h     ; return code
RAS_POST_DOSSEMREQUEST          EQU     86h     ; return code
RAS_POST_DOSSEMSET              EQU     87h     ; return code
RAS_POST_DOSSEMSETWAIT          EQU     88h     ; return code
RAS_POST_DOSSEMWAIT             EQU     89h     ; sem handle, return code
RAS_POST_DOSMUXSEMWAIT          EQU     8Ah     ; return code
RAS_POST_DOSCLOSESEM            EQU     8Bh     ; return code
RAS_POST_DOSCREATESEM           EQU     8Ch     ; sem handle, return code
RAS_POST_DOSOPENSEM             EQU     8Dh     ; sem handle, return code
RAS_POST_DOSFLAGPROCESS         EQU     8Eh     ; return code
;
;** Misc Services major code (external)
;
RAS_MC_MISCSERV                 EQU     28      ; 1Ch
;
;* Pre-invocation Misc Services minor code
;
RAS_PRE_DOSERROR                EQU     01h     ; flags
RAS_PRE_DOSSETVEC               EQU     02h     ; rtn address, vecnum
RAS_PRE_DOSSYSTEMSERVICE        EQU     03h     ; service category
;
;* Post-invocation Misc Services minor code
;
RAS_POST_DOSERROR               EQU     81h     ; return code
RAS_POST_DOSSETVEC              EQU     82h     ; return code
RAS_POST_DOSSYSTEMSERVICE       EQU     83h     ; return code
;
;** Virtual Memory Management major code (external)
;
RAS_MC_VIRTMEM                  EQU     36      ; 24h
;
;* Pre-invocation Virtual Memory Management minor code
;
RAS_PRE_DOSALLOCSEG             EQU     01h     ; size
RAS_PRE_DOSALLOCSHRSEG          EQU     02h     ; name, size
RAS_PRE_DOSGETSHRSEG            EQU     03h     ; name
RAS_PRE_DOSREALLOCSEG           EQU     04h     ; selector, size
RAS_PRE_DOSFREESEG              EQU     05h     ; selector
RAS_PRE_DOSALLOCHUGE            EQU     06h     ; size, numseg
RAS_PRE_DOSREALLOCHUGE          EQU     07h     ; selector, size, numseg
RAS_PRE_DOSCREATECSALIAS        EQU     08h     ; data selector
RAS_PRE_DOSGIVESEG              EQU     09h     ; caller seg handle, pid
;
;* Post-invocation Virtual Memory Management minor code
;
RAS_POST_DOSALLOCSEG            EQU     81h     ; selector, return code
RAS_POST_DOSALLOCSHRSEG         EQU     82h     ; selector, return code
RAS_POST_DOSGETSHRSEG           EQU     83h     ; selector, return code
RAS_POST_DOSREALLOCSEG          EQU     84h     ; return code
RAS_POST_DOSFREESEG             EQU     85h     ; return code
RAS_POST_DOSALLOCHUGE           EQU     86h     ; selector, return code
RAS_POST_DOSREALLOCHUGE         EQU     87h     ; return code
RAS_POST_DOSCREATECSALIAS       EQU     88h     ; code selector, return code
RAS_POST_DOSGIVESEG             EQU     89h     ; recipient seh handle,
                                                ; return code
;
;** Filesystem major code (external)
;
RAS_MC_FILESYS                  EQU     48      ; 30h
;
;* Pre-Invocation Filesystem minor codes
;
RAS_PRE_DOSBUFRESET             EQU     01h     ; file handle
RAS_PRE_DOSCHGFILEPTR           EQU     02h     ; distance, file handle
RAS_PRE_DOSCLOSE                EQU     03h     ; file handle
RAS_PRE_DOSDELETE               EQU     04h     ; file name
RAS_PRE_DOSDUPHANDLE            EQU     05h     ; old file handle
RAS_PRE_DOSFILELOCKS            EQU     06h     ; file handle
RAS_PRE_DOSMKDIR                EQU     07h     ; dir name
RAS_PRE_DOSMOVE                 EQU     08h     ; new pathname, old pathname
RAS_PRE_DOSNEWSIZE              EQU     09h     ; file size, file handle
RAS_PRE_DOSOPEN                 EQU     0Ah     ; file size, file name
RAS_PRE_DOSREAD                 EQU     0Bh     ; file handle
RAS_PRE_DOSREADASYNC            EQU     0Ch     ; ram semaphore, file handle
RAS_PRE_DOSRMDIR                EQU     0Dh     ; dir name
RAS_PRE_DOSSELECTDISK           EQU     0Eh     ; none
RAS_PRE_DOSSETFHANDSTATE        EQU     0Fh     ; file handle
RAS_PRE_DOSSETFILEMODE          EQU     10h     ; file name
RAS_PRE_DOSSETVERIFY            EQU     11h     ; none
RAS_PRE_DOSWRITE                EQU     12h     ; file handle
RAS_PRE_DOSWRITEASYNC           EQU     13h     ; ram semaphore, file handle
RAS_PRE_DOSCHDIR                EQU     14h     ; dir name
RAS_PRE_DOSFINDCLOSE            EQU     15h     ; dir handle
RAS_PRE_DOSFINDFIRST            EQU     16h     ; file name
RAS_PRE_DOSFINDNEXT             EQU     17h     ; dir handle

;;;;;BUGBUG 8-Jan-1988 MarkH - Temporary RAS equates - real ones from Boca
;
;           I put in these to get a clean assembly and delta.  RonN (in Boca)
;           is aware of our needs and should send us a file.
;
RAS_PRE_DOSFINDFIRST2           EQU     18h     ; file name
RAS_PRE_DOSMKDIR2               EQU     19h     ; dir name
RAS_PRE_DOSOPEN2                EQU     1Ah     ; file size, file name
;
;* Post-Invocation Filesystem minor codes
;
RAS_POST_DOSBUFRESET            EQU     81h     ; return code
RAS_POST_DOSCHGFILEPTR          EQU     82h     ; new pointer, return code
RAS_POST_DOSCLOSE               EQU     83h     ; return code
RAS_POST_DOSDELETE              EQU     84h     ; return code
RAS_POST_DOSDUPHANDLE           EQU     85h     ; new file handle, return code
RAS_POST_DOSFILELOCKS           EQU     86h     ; return code
RAS_POST_DOSMKDIR               EQU     87h     ; return code
RAS_POST_DOSMOVE                EQU     88h     ; return code
RAS_POST_DOSNEWSIZE             EQU     89h     ; return code
RAS_POST_DOSOPEN                EQU     8Ah     ; file handle, return code
RAS_POST_DOSREAD                EQU     8Bh     ; bytes read, return code
RAS_POST_DOSREADASYNC           EQU     8Ch     ; bytes read, return code
RAS_POST_DOSRMDIR               EQU     8Dh     ; return code
RAS_POST_DOSSELECTDISK          EQU     8Eh     ; return code
RAS_POST_DOSSETFHANDSTATE       EQU     8Fh     ; return code
RAS_POST_DOSSETFILEMODE         EQU     90h     ; return code
RAS_POST_DOSSETVERIFY           EQU     91h     ; return code
RAS_POST_DOSWRITE               EQU     92h     ; bytes written, return code
RAS_POST_DOSWRITEASYNC          EQU     93h     ; bytes written, return code
RAS_POST_DOSCHDIR               EQU     94h     ; return code
RAS_POST_DOSFINDCLOSE           EQU     95h     ; return code
RAS_POST_DOSFINDFIRST           EQU     96h     ; dir handle, return code
RAS_POST_DOSFINDNEXT            EQU     97h     ; return code

;;;;;BUGBUG 8-Jan-1988 MarkH - Temporary RAS equates - real ones from Boca
;
;           I put in these to get a clean assembly and delta.  RonN (in Boca)
;           is aware of our needs and should send us a file.
;
RAS_POST_DOSFINDFIRST2          EQU     98h     ; dir handle, return code
RAS_POST_DOSMKDIR2              EQU     99h     ; return code
RAS_POST_DOSOPEN2               EQU     9Ah     ; file handle, return code
;
;** Timer Services major code (external)
;
RAS_MC_TIMER                    EQU     56      ; 38h
;
;* Pre-Invocation Timer Services minor codes
;
RAS_PRE_DOSGETDATETIME          EQU     01h     ; none
RAS_PRE_DOSSETDATETIME          EQU     02h     ; none
RAS_PRE_DOSSLEEP                EQU     03h     ; time interval
RAS_PRE_DOSTIMERASYNC           EQU     04h     ; time interval,sem handle
RAS_PRE_DOSTIMERSTART           EQU     05h     ; time interval,sem handle
RAS_PRE_DOSTIMERSTOP            EQU     06h     ; handle

;* Post-Invocation Timer Services minor codes
;
RAS_POST_DOSGETDATETIME         EQU     81h     ; return code
RAS_POST_DOSSETDATETIME         EQU     82h     ; return code
RAS_POST_DOSSLEEP               EQU     83h     ; return code
RAS_POST_DOSTIMERASYNC          EQU     84h     ; return code,handle
RAS_POST_DOSTIMERSTART          EQU     85h     ; return code,handle
RAS_POST_DOSTIMERSTOP           EQU     86h     ; return code
;
;** Device Management major code (external)
;
RAS_MC_DEVMANA                  EQU     96      ; 60h
;
;* Pre-Invocation Device Management minor codes
;
RAS_PRE_DOSDEVCONFIG            EQU     01h     ; none
RAS_PRE_DOSDEVIOCTL             EQU     02h     ; devhandle, category, function
RAS_PRE_DOSIOACCESS             EQU     03h     ; none
RAS_PRE_DOSMONOPEN              EQU     04h     ; devname
RAS_PRE_DOSMONCLOSE             EQU     05h     ; handle
RAS_PRE_DOSMONREG               EQU     06h     ; bufferO, bufferI, handle
RAS_PRE_DOSMONREAD              EQU     07h     ; bufferI
RAS_PRE_DOSMONWRITE             EQU     08h     ; bytecnt, bufferO
RAS_PRE_DOSPHYSICALDISK         EQU     09h     ; function

;;;;;BUGBUG 8-Jan-1988 MarkH - Temporary RAS equates - real ones from Boca
;
;           I put in these to get a clean assembly and delta.  RonN (in Boca)
;           is aware of our needs and should send us a file.
;
RAS_PRE_DOSDEVIOCTL2            EQU     0Ah     ; devhandle, category, function

;* Post-Invocation Device Management minor codes
;
RAS_POST_DOSDEVCONFIG           EQU     81h     ; return code
RAS_POST_DOSDEVIOCTL            EQU     82h     ; return code
RAS_POST_DOSIOACCESS            EQU     83h     ; return code
RAS_POST_DOSMONOPEN             EQU     84h     ; handle, return code
RAS_POST_DOSMONCLOSE            EQU     85h     ; return code
RAS_POST_DOSMONREG              EQU     86h     ; return code
RAS_POST_DOSMONREAD             EQU     87h     ; bytecnt, return code
RAS_POST_DOSMONWRITE            EQU     88h     ; return code
RAS_POST_DOSPHYSICALDISK        EQU     89h     ; return code

;;;;;BUGBUG 8-Jan-1988 MarkH - Temporary RAS equates - real ones from Boca
;
;           I put in these to get a clean assembly and delta.  RonN (in Boca)
;           is aware of our needs and should send us a file.
;
RAS_POST_DOSDEVIOCTL2           EQU     8Ah     ; return code
;
;
;** Keyboard Device Driver major code
;
RAS_MC_KEYBOARD                 EQU     100                ; 64h
;
;* Pre-Invocation Keyboard Device Driver minor codes
;
RAS_PRE_DOSBEEP                 EQU     01h                ; none

;* Post-Invocation Keyboard Device Driver minor codes
;
RAS_POST_DOSBEEP                EQU     81h                ; return code
;
;** FAT major code (internal)
;
RAS_MC_FAT                      EQU     50      ; 32h
;
;* Pre-Invocation FAT minor codes
;
RAS_PRE_CLSTRALLOC              EQU     01h     ; number of clusters
RAS_PRE_CLSTRDEALLOC            EQU     02h     ; cluster number
RAS_PRE_FILELOCKRANGE           EQU     03h     ; length, offset, handle,
                                                ; lock/unlock
;
;* Post-Invocation FAT minor codes
;
RAS_POST_CLSTRALLOC             EQU     81h     ; (not) allocated
RAS_POST_CLSTRDEALLOC           EQU     82h     ; none
RAS_POST_FILELOCKRANGE          EQU     83h     ; none

;
;*      Tasking Major Code (internal)
;
RAS_MC_TASKING_INT              EQU     12h

;       Tasking minor Codes
RAS_PRE_THREADDISPATCH          EQU     1
RAS_PRE_EXITLIST                EQU     2

;
;*      Machine exception Major Code
;
RAS_MC_MACHINEEXCEPT            EQU     3

RAS_PRE_SEGNOTPRESENT           EQU     0Ch

;
;*      Mode switch major code
;
RAS_MC_MODESWITCH               EQU     2

;
;*      Mode switch minor codes
;
RAS_PRE_REALTOPROT              EQU     1
RAS_PRE_PROTTOREAL              EQU     81h

;
;*      Devhlp major code
;
RAS_MC_DEVHLP                   EQU     61h
RAS_MC_PTOV_DEVHLP              EQU     62h

;       Devhlp minor codes are in devhlp.asm

ENDIF   ; RAS
