DOS 3.30 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.1 KiB

5 years ago
  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. ; The following get used as arguments to the EXEC system call. They indicate
  9. ; whether or not the program is executed or whether or not a program header
  10. ; gets created.
  11. ;
  12. exec_func_no_execute EQU 1 ; no execute bit
  13. exec_func_overlay EQU 2 ; overlay bit
  14. Exec0 STRUC
  15. Exec0_environ DW ? ; seg addr of environment
  16. Exec0_com_line DD ? ; pointer to asciz command line
  17. Exec0_5C_FCB DD ? ; default fcb at 5C
  18. Exec0_6C_FCB DD ? ; default fcb at 6C
  19. Exec0 ENDS
  20. Exec1 STRUC
  21. Exec1_environ DW ? ; seg addr of environment
  22. Exec1_com_line DD ? ; pointer to asciz command line
  23. Exec1_5C_FCB DD ? ; default fcb at 5C
  24. Exec1_6C_FCB DD ? ; default fcb at 6C
  25. Exec1_SP DW ? ; stack pointer of program
  26. Exec1_SS DW ? ; stack seg register of program
  27. Exec1_IP DW ? ; entry point IP
  28. Exec1_CS DW ? ; entry point CS
  29. Exec1 ENDS
  30. Exec3 STRUC
  31. Exec3_load_addr DW ? ; seg address of load point
  32. Exec3_reloc_fac DW ? ; relocation factor
  33. Exec3 ENDS
  34. ;
  35. ; Exit codes in upper byte
  36. ;
  37. Exit_terminate EQU 0
  38. Exit_abort EQU 0
  39. Exit_Ctrl_C EQU 1
  40. Exit_Hard_Error EQU 2
  41. Exit_Keep_process EQU 3
  42. ;
  43. ; EXE file header
  44. ;
  45. EXE_file STRUC
  46. exe_signature DW ? ; must contain 4D5A (yay zibo!)
  47. exe_len_mod_512 DW ? ; low 9 bits of length
  48. exe_pages DW ? ; number of 512b pages in file
  49. exe_rle_count DW ? ; count of reloc entries
  50. exe_par_dir DW ? ; number of paragraphs before image
  51. exe_min_BSS DW ? ; minimum number of para of BSS
  52. exe_max_BSS DW ? ; max number of para of BSS
  53. exe_SS DW ? ; stack of image
  54. exe_SP DW ? ; SP of image
  55. exe_chksum DW ? ; checksum of file (ignored)
  56. exe_IP DW ? ; IP of entry
  57. exe_CS DW ? ; CS of entry
  58. exe_rle_table DW ? ; byte offset of reloc table
  59. exe_iov DW ? ; overlay number (0 for root)
  60. exe_sym_tab DD ? ; offset of symbol table in file
  61. EXE_file ENDS
  62. exe_valid_signature EQU 5A4Dh
  63. exe_valid_old_signature EQU 4D5Ah
  64. symbol_entry STRUC
  65. sym_value DD ?
  66. sym_type DW ?
  67. sym_len DB ?
  68. sym_name DB 255 dup (?)
  69. symbol_entry ENDS