diff options
Diffstat (limited to 'v4.0/src/INC/EXE.INC')
| -rw-r--r-- | v4.0/src/INC/EXE.INC | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/v4.0/src/INC/EXE.INC b/v4.0/src/INC/EXE.INC new file mode 100644 index 0000000..e768f6b --- /dev/null +++ b/v4.0/src/INC/EXE.INC | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | ; SCCSID = @(#)exe.asm 1.1 85/04/10 | ||
| 2 | ; SCCSID = @(#)exe.asm 1.1 85/04/10 | ||
| 3 | BREAK <EXEC and EXE file structures> | ||
| 4 | ; | ||
| 5 | ; EXEC arg block - load/go program | ||
| 6 | ; | ||
| 7 | |||
| 8 | ; | ||
| 9 | ; The following get used as arguments to the EXEC system call. They indicate | ||
| 10 | ; whether or not the program is executed or whether or not a program header | ||
| 11 | ; gets created. | ||
| 12 | ; | ||
| 13 | exec_func_no_execute EQU 1 ; no execute bit | ||
| 14 | exec_func_overlay EQU 2 ; overlay bit | ||
| 15 | |||
| 16 | Exec0 STRUC | ||
| 17 | Exec0_environ DW ? ; seg addr of environment | ||
| 18 | Exec0_com_line DD ? ; pointer to asciz command line | ||
| 19 | Exec0_5C_FCB DD ? ; default fcb at 5C | ||
| 20 | Exec0_6C_FCB DD ? ; default fcb at 6C | ||
| 21 | Exec0 ENDS | ||
| 22 | |||
| 23 | Exec1 STRUC | ||
| 24 | Exec1_environ DW ? ; seg addr of environment | ||
| 25 | Exec1_com_line DD ? ; pointer to asciz command line | ||
| 26 | Exec1_5C_FCB DD ? ; default fcb at 5C | ||
| 27 | Exec1_6C_FCB DD ? ; default fcb at 6C | ||
| 28 | Exec1_SP DW ? ; stack pointer of program | ||
| 29 | Exec1_SS DW ? ; stack seg register of program | ||
| 30 | Exec1_IP DW ? ; entry point IP | ||
| 31 | Exec1_CS DW ? ; entry point CS | ||
| 32 | Exec1 ENDS | ||
| 33 | |||
| 34 | Exec3 STRUC | ||
| 35 | Exec3_load_addr DW ? ; seg address of load point | ||
| 36 | Exec3_reloc_fac DW ? ; relocation factor | ||
| 37 | Exec3 ENDS | ||
| 38 | |||
| 39 | ; | ||
| 40 | ; Exit codes in upper byte | ||
| 41 | ; | ||
| 42 | Exit_terminate EQU 0 | ||
| 43 | Exit_abort EQU 0 | ||
| 44 | Exit_Ctrl_C EQU 1 | ||
| 45 | Exit_Hard_Error EQU 2 | ||
| 46 | Exit_Keep_process EQU 3 | ||
| 47 | |||
| 48 | ; | ||
| 49 | ; EXE file header | ||
| 50 | ; | ||
| 51 | |||
| 52 | EXE_file STRUC | ||
| 53 | exe_signature DW ? ; must contain 4D5A (yay zibo!) | ||
| 54 | exe_len_mod_512 DW ? ; low 9 bits of length | ||
| 55 | exe_pages DW ? ; number of 512b pages in file | ||
| 56 | exe_rle_count DW ? ; count of reloc entries | ||
| 57 | exe_par_dir DW ? ; number of paragraphs before image | ||
| 58 | exe_min_BSS DW ? ; minimum number of para of BSS | ||
| 59 | exe_max_BSS DW ? ; max number of para of BSS | ||
| 60 | exe_SS DW ? ; stack of image | ||
| 61 | exe_SP DW ? ; SP of image | ||
| 62 | exe_chksum DW ? ; checksum of file (ignored) | ||
| 63 | exe_IP DW ? ; IP of entry | ||
| 64 | exe_CS DW ? ; CS of entry | ||
| 65 | exe_rle_table DW ? ; byte offset of reloc table | ||
| 66 | exe_iov DW ? ; overlay number (0 for root) | ||
| 67 | exe_sym_tab DD ? ; offset of symbol table in file | ||
| 68 | EXE_file ENDS | ||
| 69 | |||
| 70 | exe_valid_signature EQU 5A4Dh | ||
| 71 | exe_valid_old_signature EQU 4D5Ah | ||
| 72 | |||
| 73 | symbol_entry STRUC | ||
| 74 | sym_value DD ? | ||
| 75 | sym_type DW ? | ||
| 76 | sym_len DB ? | ||
| 77 | sym_name DB 255 dup (?) | ||
| 78 | symbol_entry ENDS | ||