home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
sample1.def
< prev
next >
Wrap
Text File
|
1993-03-24
|
18KB
|
262 lines
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
SOURCER DEFINITION FILE - SAMPLE1
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 1: CONTROL INFORMATION ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
comments are indented one or more spaces
┌─── Section 1 instructions──────────────────────────────────────────────────┐
│ │
│ Enter any of the following options, starting in the 1st column │
│ (for no options enter "none" ) Only the first letter of the │
│ command is necessary. │
│ │
│ Analysis option = xxxxx Any option letters A-Z can be used. Upper │
│ case indicates turning option on, lower case │
│ turns the option off. See manual for a │
│ complete list of options. │
│ Code style = xxx Code style types include: │
│ com, exe, fragment, zero start, │
│ device driver, overlay, special, new EXE, │
│ or Windows VxD. │
│ Drive = x Disk drive for output (letter a-z) │
│ Format = xxx Output format ASM or LST for source code or │
│ listing output (LST is the default) │
│ Go When the .def file has loaded, go │
│ Header = xxx Enter the ascii header string (32 char max) │
│ Input filename = xxx Filename for input (may include disk & path) │
│ Keep segments = xxx When loading a file, use the file defined │
│ segments (FILE), use the def file segments │
│ in section 2 (DEF) or use both (BOTH) │
│ NOTE: Specify this option prior to file input │
│ BOTH is the default, used in most cases │
│ Label = xxx Select label type, Decimal, Zero fill, │
│ Segment & offset, Letter segment & offset │
│ Math = xx Select math co-processor options ON/OFF/AUTO │
│ Narrow ON For listings, do not include hex instructions │
│ None Use default commands only │
│ Output filename = xxx Filename for output (may include drive & path) │
│ Passes = x Select the number of passes from 2 to 9 │
│ Remark = xxx Select remarks to be included: All, None, │
│ Data remarks only, Interrupts & I/O only, │
│ Others only, Except Data, Except Interrupts, │
│ Except Others │
│ Segment display = xxx Set the segment type, OFF/HEX/NAME │
│ Target assembler = xxx Select the assembler the code may be re- │
│ assembled on. Options include MASM-4.0, │
│ MASM-5.0, MASM-5.1, MASM-6.0, MASM-6.1, │
│ TASM-1.0, TASM-2.X, TASM-3.0, TASM-3.1, │
│ TASM-3.2, OPTASM, OTHER, or NONE (optional │
│ functional, size or byte match may follow) │
│ uP = xxx Select the uP from: │
│ 8088, V20/V30, 80186, 80286, P286, 80386, │
│ P386, 80486, P486 or AUTO for automatic │
│ Vertical lines = xxx For listings, select the number of lines per │
│ page from 10 to 255 (default is 59) │
│ Words to upper case Set upper case style (lower case is default) │
│ Xref = xx ON or OFF (selecting ON sets passes to 5) │
│ Zap load start = x:x Specifies double word start point within file │
│ │
└────────────────────────────────────────────────────────────────────────────┘
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 1: CONTROL INFORMATION ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
<<<<< Insert commands here (start in column 1) or "none"
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 2: RANGE DEFINITION ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
┌─── Section 2 instructions──────────────────────────────────────────────────┐
│ │
│ segment:offset = start processing location (hex) │
│ see note 3 at end on referencing loaded file segments │
│ │
│ end offset = ending location for segment │
│ │
│ default ds, es = default used when not overwritten by in-line code │
│ │
│ segment type = auto - code/data, full data resolving │
│ code - code, limited data resolving │
│ data - data, no code processed │
│ stack - stack, no code processed │
│ rauto - ROM code/data (same as "auto") in ROM │
│ rcode - ROM code (same as "code") in ROM │
│ │
│ segment size = use16 for 16 bit segments (this is the default) │
│ use32 for 32 bit segments. The text use32 may not be │
│ abbreviated. │
│ │
└────────────────────────────────────────────────────────────────────────────┘
▒▒▒▒ Segments ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
begin end default seg seg
seg:off off ds es type size
------- ---- ---- ---- ----- -----
<<<<< Insert ranges here (start in column 1) or "none"
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 3 REFERENCE DEFINITIONS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
┌─── Section 3 instructions──────────────────────────────────────────────────┐
│ │
│ segment:offset = absolute location of item (hex) │
│ see note 3 at end on referencing loaded file segments │
│ optional short-cut: │
│ use "+" to indicate next data offset │
│ │
│ typ = type field │
│ DB = data byte │
│ DW = data word │
│ DD = double word │
│ DA = ascii text byte(s) │
│ DS = data structure │
│ SUB = subroutine reference (S can also be used) │
│ LOC = location reference (L can also be used) │
│ FORCE = forced function (F can also be used) │
│ │
│ options (indicate one or more options with a comma separator, except │
│ forced functions only can have one option per line) │
│ │
│ data options: , C xxx comment number xxx (from 1 to 3FF) │
│ , EQU treat label as an equate │
│ , DUP duplicate same bytes/words R times │
│ , INDEX replace a index of the same value │
│ , OSN offset sub_xxx (Sub Near) │
│ , OSF offset sub_xxx, seg sub_xxx (Sub Far) │
│ , OLN offset loc_xxx (Loc Near) │
│ , OLF offset loc_xxx, seg loc_xxx (Loc Far) │
│ , ODN offset data_xxx (Data Near) │
│ , ODF offset data_xx, seg data_xx (Data Far) │
│ , R xxxx repeat 0 to FFFF, (FFFF bytes max) │
│ (i.e. dw, R 4 indicates 8 bytes) │
│ (see manual for additional options) │
│ , SEG item is a segment name (dw only) │
│ , UNUSED if item is never referenced, then do not use │
│ │
│ Location , C xx comment number xx (from 1 to FF) │
│ options: , EXT external entry point to program │
│ , FAR far procedure │
│ , NEAR near procedure │
│ Note: EXT, FAR & NEAR all reset the simulator │
│ , UNUSED if item is never referenced, then do not use │
│ │
│ Subroutine , C xx comment number xx (from 1 to FF) │
│ options: , FAR subroutine is defined as FAR │
│ , TERM subroutine terminates (does not return to │
│ caller) │
│ , UNUSED if item is never referenced, then do not use │
│ │
│ Forced , ANALYSIS xxxxx Select different analysis options │
│ options: at any time, with lower case to turn option │
│ off, and upper case to turn option(s) on. │
│ , CODE switch to code mode │
│ , COMMENT xxxxxxxxx A comment may be placed at any │
│ offset within a file, replacing any auto- │
│ matically generated comment │
│ , DATA switch to data mode │
│ , CODE16 switch to 16 bit code mode │
│ , CODE32 switch to 32 bit code mode │
│ , ENDP force a endp to appear after instruction │
│ , AX=xxxx change the value of any simulation │
│ register ax/bx/cx/dx/bp/si/di/sp │
│ ds/es/ss/fs/gs │
│ , EAX=xxxx change the value of any 32 bit simulation │
│ register eax/ebx/ecx/edx/ebp/esi/edi │
│ , EAx LEA instruction's reference item type │
│ EAS for sub, EAL for location, EAD for data│
│ optional segment follows │
│ , IMMEDIATE force an instrucion with an offset to │
│ an immediate. │
│ , Ox convert immediate value to offset │
│ OS for sub, OL for location, OD for data │
│ optional segment follows (cs segment default)│
│ , REG display the internal simulation registers │
│ │
│ Forced index table analysis for calls & jumps │
│ , SN table type "offset sub_xx" │
│ , SF table type "offset sub_xxx, seg sub_xxx" │
│ , LN table type "offset loc_xx" │
│ , LF table type "offset loc_xxx, seg loc_xxx" │
│ format: "seg_a:xxxx f, sn 1234:22 34" │
│ where 1234:22 is the location of the table │
│ with 34h entries │
│ │
│ label field = enter label up to 15 characters long (32 chars with EMS; │
│ label ignored for forced functions; do not place a │
│ comma before or inside label) │
│ │
│ comment field = a short comment can be included here (64 characters max) │
│ if a semi-colon appears, the rest of the line is ignored │
└────────────────────────────────────────────────────────────────────────────┘
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Section 3 REFERENCE DEFINITIONS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
════ Subroutines ═══════════════════════
seg:off type & options label comments
------- -------------- -------------- --------------
<<<<< Insert new reference definitions here (start in column 1)
════ Locations ═════════════════════════
seg:off type & options label comments
------- -------------- -------------- --------------
<<<<< Insert new reference definitions here (start in column 1)
════ Data Items ════════════════════════
seg:off type & options label comments
------- -------------- -------------- --------------
<<<<< Insert new reference definitions here (start in column 1)
┌─── General Notes ─────────────────────────────────────────────────────────┐
│ Notes: │
│ 1) Must have at least one entry in each section to operate properly. │
│ Use "none" if no entries are needed for a section. │
│ Separate each section with at least one line with a space in │
│ column 1. │
│ │
│ 2) Order of entries within sections 2 & 3 is unimportant. │
│ │
│ 3) When a filename is specified in section 1, it is loaded and the │
│ first 250 segments can be referenced as "seg_a" to "seg_z" and │
│ "seg_aa" to "seg_az" through to the 250th segment "seg_io". │
│ These can be used anywhere a segment is required. For example │
│ a location label can be defined as: │
│ │
│ 6234:0124 loc, Ext, C 2 temp_value_a │
│ or: seg_b:0124 loc, Ext, C 2 temp_value_a │
│ │
│ The second entry will use the 2nd segment within the loaded file │
│ An error will be generated if a segment is used beyond those │
│ specified by the file load (Consult manual for more information).│
│ │
│ 4) Section 3 ignores blank lines or lines starting with a space in │
│ column 1, or the balance of a line where a semicolon occurs. │
│ │
│ 5) The following examples show acceptable forms for the same function,│
│ a location entry as a external entry point with comment #2: │
│ │
│ seg_a:0124 loc, Ext, C 2 temp_value_a ; prefered format │
│ seg_a:0124 l, Ext, C 2 temp_value_a │
│ seg_a:0124 l, E, C=2 temp_value_a ; notes can follow │
│ seg_a:0124 l, External, C 2 temp_value_a │
│ seg_a:124 Location, Ext, C 02 temp_value_a │
│ seg_a:124 L, e, c 2 temp_value_a │
│ │
│ 6) Upper and lower case will have no effect (except for analysis │
│ options), but is preserved for labels. │
└───────────────────────────────────────────────────────────────────────────┘