     1                                  
     2                                  ; Public Domain
     3                                  
     4                                  ; test install command: install; ldmem; ldmem uninstall
     5                                  ; test run command: ; .; .
     6                                  
     7                                  %include "lmacros3.mac"
     1                              <1> [list -]
    14                              <2> [list -]
    14                              <1> [list -]
     8                                  
     9                                  	numdef OTHER, 0
    10                                  %if _OTHER
    11                                   %define ELDOTHER 1
    12                                   %define OTH_STRING "OTH"
    13                                   %imacro getotherds 0
    14                                  reloc	mov ds, word [ss:otherds]
    15                                  internaldatarelocation
    16                                   %endmacro
    17                                   %imacro resetds 0
    18                                  	push ss
    19                                  	pop ds
    20                                   %endmacro
    21                                   %imacro getotheres 0
    22                                  reloc	mov es, word [ss:otherds]
    23                                  internaldatarelocation
    24                                   %endmacro
    25                                   %imacro resetes 0
    26                                  	push ss
    27                                  	pop es
    28                                   %endmacro
    29                                  %else
    30                                   %define OTH_STRING ""
    31                                   %idefine getotherds
    32                                   %idefine resetds
    33                                   %idefine getotheres
    34                                   %idefine resetes
    35                                  %endif
    36                                  
    37                                  %include "eld.mac"
     1                              <1> %if 0
     2                              <1> 
     3                              <1> Extensions for lDebug macros
     4                              <1> 
     5                              <1> Copyright (C) 2008-2025 E. C. Masloch
     6                              <1> 
     7                              <1> Usage of the works is permitted provided that this
     8                              <1> instrument is retained with the works, so that any entity
     9                              <1> that uses the works is notified of this instrument.
    10                              <1> 
    11                              <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <1> 
    13                              <1> %endif
    14                              <1> 
    15                              <1> %ifndef ELD_MAC
    16                              <1> %define ELD_MAC 1
    17                              <1> 
    18                              <1> %include "lmacros3.mac"
     1                              <2> [list -]
    19                              <1> 
    20                              <1> 		; ELD executable header
    21                              <1> 	struc ELD_HEADER
    22 00000000 ????????            <1> eldhSignature:		resb 4	; "ELD1"
    23 00000004 ??????              <1> 			resb 3	; reserved
    24 00000007 ??                  <1> 			resb 1	; 26 (Ctrl-Z)
    25 00000008 ????????            <1> eldhCodeOffset:		resd 1	; position displacement from eldhSignature
    26 0000000C ????                <1> eldhCodeImageLength:	resw 1	; amount bytes, at least 32
    27 0000000E ????                <1> eldhCodeAllocLength:	resw 1	; amount bytes, added to prior. sum < 64 KiB
    28 00000010 ????????            <1> eldhDataOffset:		resd 1
    29 00000014 ????                <1> eldhDataImageLength:	resw 1	; (zero allowed)
    30 00000016 ????                <1> eldhDataAllocLength:	resw 1	; (zero allowed)
    31 00000018 ????                <1> eldhCodeEntrypoint:	resw 1	; within code section, used as displacement
    32 0000001A ????????            <1> eldhReserved:		resb 4	; reserved
    33 0000001E ????                <1> eldhExtensionSize:	resw 1	; from eldhSignature, -> past eldhx fields in use
    34                              <1> 	endstruc
    35                              <1> 	endarea ELD_HEADER, 1
    36                              <1> 
    37                              <1> 	struc ELD_HEADERX
    38 00000000 <res 20h>           <1> eldhxHeader:		resb ELD_HEADER_size
    39 00000020 ????????            <1> eldhxDescriptionOffset:	resd 1	; zero if none, from eldhxHeader. <= 128 Bytes
    40 00000024 ????????            <1> eldhxHelpOffset:	resd 1	; zero if none, from eldhxHeader
    41 00000028 ????????            <1> eldhxLibTable:		resd 1	; zero if none, from eldhxHeader
    42 0000002C ????????            <1> eldhxDateTimeOffset:	resd 1	; zero if none, from eldhxHeader
    43                              <1> 	alignb 16
    44                              <1> 	endstruc
    45                              <1> 
    46                              <1> 	struc ELD_TRAILER_HEADER
    47 00000000 ????????????????    <1> eldthSignature:		resb 8	; "ELD1TAIL"
    48 00000008 ????????            <1> eldthHeaderOffset:	resd 1	; negative displacement from eldthSignature,
    49                              <1> 				;  add this dword to the seek offset
    50 0000000C ????                <1> eldthReserved:		resw 1	; reserved, must be initialised to zero
    51 0000000E ????                <1> eldthChecksum:		resw 1	; sum of all words in trailer header = 0
    52                              <1> 	endstruc
    53                              <1> 	endarea ELD_TRAILER_HEADER, 1
    54                              <1> 
    55                              <1> 	struc ELD_LIBTABLE
    56 00000000 ????                <1> eldltFormat:		resw 1
    57                              <1> 	; 0 = uncompressed
    58                              <1> 	; 2 = heatshrink compressed
    59                              <1> 	; 3 = lzexedat -4 compressed
    60                              <1> 	; 4 = lzexedat -4 -l compressed
    61 00000002 ????                <1> eldltAmount:		resw 1
    62 00000004 ????????            <1> eldltOffset:		resd 1	; from eldhxHeader
    63                              <1> eldltCompressedLength:		; (dword, only present if format 2, 3, or 4)
    64                              <1> 	endstruc
    65                              <1> 	endarea ELD_LIBTABLE, 1
    66                              <1> 
    67                              <1> 		; ELD instance header
    68                              <1> 	struc ELD_INSTANCE
    69 00000000 ????                <1> eldiStartCode:		resw 1	; -> this structure itself (para aligned)
    70 00000002 ????                <1> eldiEndCode:		resw 1	; -> behind memory used by instance (para aligned)
    71 00000004 ????                <1> eldiStartData:		resw 1	; -> data in data entry section (para aligned), or 0
    72 00000006 ????                <1> eldiEndData:		resw 1	; -> behind data (para aligned), or 0
    73 00000008 ????????????????    <1> eldiIdentifier:		resb 8	; blank-filled text
    74 00000010 ????                <1> eldiFlags:		resw 1	; flags
    75                              <1> eldiListing_size equ 14
    76 00000012 <res Eh>            <1> eldiListing:		resb eldiListing_size
    77                              <1> 				; ASCIZ listing file name
    78                              <1> 	endstruc
    79                              <1> 		; flags for eldiFlags:
    80                              <1> eldifResident:		equ 1
    81                              <1> 
    82                              <1> 		; ELD link info header
    83                              <1> 	struc ELD_LINKINFO
    84 00000000 ????                <1> eldlSignature:		resw 1	; 0E1D1h
    85 00000002 ????????            <1> eldlReserved:		resw 2
    86 00000006 ????                <1> eldlUseLinkHash:	resw 1
    87 00000008 ????                <1> eldlDataAmount:		resw 1
    88 0000000A ????                <1> eldlDataPrefixes:	resw 1
    89 0000000C ????                <1> eldlDataEntries:	resw 1
    90 0000000E ????                <1> eldlDataAddresses:	resw 1
    91 00000010 ????                <1> eldlCodeAmount:		resw 1
    92 00000012 ????                <1> eldlCodePrefixes:	resw 1
    93 00000014 ????                <1> eldlCodeEntries:	resw 1
    94 00000016 ????                <1> eldlCodeAddresses:	resw 1
    95                              <1> 	endstruc
    96                              <1> 
    97                              <1> 	numdef ELD_CODE_VSTART, 9001h
    98                              <1> 	numdef ELD_DATA_VSTART, 8000h
    99                              <1> 	numdef ELD_RELOC_VSTART, 8000h
   100                              <1> 
   101                              <1> 	numdef ELD_RECLAIM_HINT, 0
   102                              <1> 	strdef ELD_LISTING, ""
   103                              <1> 	numdef ELD_DATETIME, 0
   104                              <1> 
   105                              <1> %if _ELD_DATETIME
   106                              <1>  %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart
   107                              <1>  %macro PUT_ELD_DATETIME 0.nolist
   108                              <1> datetime:	asciz __UTC_DATE__,'T',__UTC_TIME__,'Z'
   109                              <1> 		asciz		; for future extension
   110                              <1>  %endmacro
   111                              <1> %else
   112                              <1>  %define PUT_ELDHX_DATETIME_OFFSET
   113                              <1>  %define PUT_ELD_DATETIME
   114                              <1> %endif
   115                              <1> 
   116                              <1> %endif
    38                                  %include "eldcall.mac"
     1                              <1> %if 0
     2                              <1> 
     3                              <1> Extensions for lDebug call macros
     4                              <1> 
     5                              <1> Copyright (C) 2008-2024 E. C. Masloch
     6                              <1> 
     7                              <1> Usage of the works is permitted provided that this
     8                              <1> instrument is retained with the works, so that any entity
     9                              <1> that uses the works is notified of this instrument.
    10                              <1> 
    11                              <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <1> 
    13                              <1> %endif
    14                              <1> 
    15                              <1> %ifndef ELDCALL_MAC
    16                              <1> %define ELDCALL_MAC 1
    17                              <1> 
    18                              <1> %include "lmacros3.mac"
     1                              <2> [list -]
    19                              <1> %include "nasmhash.mac"
     1                              <2> 
     2                              <2> %if 0
     3                              <2> 
     4                              <2> Hashing macros
     5                              <2>  by E. C. Masloch, 2019
     6                              <2> 
     7                              <2> Usage of the works is permitted provided that this
     8                              <2> instrument is retained with the works, so that any entity
     9                              <2> that uses the works is notified of this instrument.
    10                              <2> 
    11                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <2> 
    13                              <2> %endif
    14                              <2> 
    15                              <2> %ifndef __NASMHASH_MAC__
    16                              <2> %assign __NASMHASH_MAC__ 1
    17                              <2> 
    18                              <2> 
    19                              <2> 	%macro hashdef 2+.nolist
    20                              <2> %ifempty %2
    21                              <2>  %assign _%1 1
    22                              <2> %else
    23                              <2> %ifstr %2
    24                              <2>  %define %%string %2
    25                              <2> %elifid %2
    26                              <2>  %defstr %%string %2
    27                              <2> %elifnum %2
    28                              <2>  %defstr %%string %2
    29                              <2> %eliftok %2
    30                              <2>  %defstr %%string %2
    31                              <2> %else
    32                              <2>  %error Unknown input
    33                              <2> %endif
    34                              <2> %strlen %%length %%string
    35                              <2> %assign %%hash 1
    36                              <2> %assign %%index 1
    37                              <2> %rep %%length
    38                              <2>  %substr %%char %%string %%index
    39                              <2>  %assign %%hash (%%hash * 31 + %%char) & 0FFFFh
    40                              <2>  %assign %%index %%index + 1
    41                              <2> %endrep
    42                              <2> %assign _%1 %%hash
    43                              <2> %endif
    44                              <2> 	%endmacro
    45                              <2> 
    46                              <2> 
    47                              <2> %endif
    20                              <1> %include "elddata.mac"
     1                              <2> %if 0
     2                              <2> 
     3                              <2> Extensions for lDebug data relocation macros
     4                              <2> 
     5                              <2> Copyright (C) 2008-2024 E. C. Masloch
     6                              <2> 
     7                              <2> Usage of the works is permitted provided that this
     8                              <2> instrument is retained with the works, so that any entity
     9                              <2> that uses the works is notified of this instrument.
    10                              <2> 
    11                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <2> 
    13                              <2> %endif
    14                              <2> 
    15                              <2> %ifndef ELDDATA_MAC
    16                              <2> %define ELDDATA_MAC 1
    17                              <2> 
    18                              <2> %include "lmacros3.mac"
     1                              <3> [list -]
    19                              <2> %include "nasmhash.mac"
     1                              <3> 
     2                              <3> %if 0
     3                              <3> 
     4                              <3> Hashing macros
     5                              <3>  by E. C. Masloch, 2019
     6                              <3> 
     7                              <3> Usage of the works is permitted provided that this
     8                              <3> instrument is retained with the works, so that any entity
     9                              <3> that uses the works is notified of this instrument.
    10                              <3> 
    11                              <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <3> 
    13                              <3> %endif
    14                              <3> 
    15                              <3> %ifndef __NASMHASH_MAC__
    16                              <3> %assign __NASMHASH_MAC__ 1
    17                              <3> 
    18                              <3> 
    19                              <3> 	%macro hashdef 2+.nolist
    20                              <3> %ifempty %2
    21                              <3>  %assign _%1 1
    22                              <3> %else
    23                              <3> %ifstr %2
    24                              <3>  %define %%string %2
    25                              <3> %elifid %2
    26                              <3>  %defstr %%string %2
    27                              <3> %elifnum %2
    28                              <3>  %defstr %%string %2
    29                              <3> %eliftok %2
    30                              <3>  %defstr %%string %2
    31                              <3> %else
    32                              <3>  %error Unknown input
    33                              <3> %endif
    34                              <3> %strlen %%length %%string
    35                              <3> %assign %%hash 1
    36                              <3> %assign %%index 1
    37                              <3> %rep %%length
    38                              <3>  %substr %%char %%string %%index
    39                              <3>  %assign %%hash (%%hash * 31 + %%char) & 0FFFFh
    40                              <3>  %assign %%index %%index + 1
    41                              <3> %endrep
    42                              <3> %assign _%1 %%hash
    43                              <3> %endif
    44                              <3> 	%endmacro
    45                              <3> 
    46                              <3> 
    47                              <3> %endif
    20                              <2> %include "eldcheck.mac"
     1                              <3> %if 0
     2                              <3> 
     3                              <3> Extensions for lDebug relocation check macros
     4                              <3> 
     5                              <3> Copyright (C) 2008-2023 E. C. Masloch
     6                              <3> 
     7                              <3> Usage of the works is permitted provided that this
     8                              <3> instrument is retained with the works, so that any entity
     9                              <3> that uses the works is notified of this instrument.
    10                              <3> 
    11                              <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <3> 
    13                              <3> %endif
    14                              <3> 
    15                              <3> %ifndef ELDCHECK_MAC
    16                              <3> %define ELDCHECK_MAC 1
    17                              <3> 
    18                              <3> %assign ELDSTRICT 0
    19                              <3> %assign ELDSTRICTCOUNTER 0
    20                              <3> 
    21                              <3> 	%imacro eldstrict 1.nolist
    22                              <3> %ifidni %1, on
    23                              <3>  %assign ELDSTRICT 1
    24                              <3>  [warning +error=reloc-abs]
    25                              <3>  [warning +reloc-abs]
    26                              <3> %elifidni %1, off
    27                              <3>  %assign ELDSTRICT 0
    28                              <3>  [warning -reloc-abs]
    29                              <3> %else
    30                              <3>  %error Unknown keyword
    31                              <3> %endif
    32                              <3> 	%endmacro
    33                              <3> 
    34                              <3> 	%imacro reloc 1+.nolist
    35                              <3> %if ELDSTRICT
    36                              <3>  %if ELDSTRICTCOUNTER
    37                              <3>   %error Missing relocation
    38                              <3>  %endif
    39                              <3>  [warning -reloc-abs]
    40                              <3>  %assign ELDSTRICTCOUNTER 1
    41                              <3> %endif
    42                              <3> %1
    43                              <3> 	%endmacro
    44                              <3> 
    45                              <3> 	%imacro reloc2 1+.nolist
    46                              <3> %if ELDSTRICT
    47                              <3>  %if ELDSTRICTCOUNTER
    48                              <3>   %error Missing relocation
    49                              <3>  %endif
    50                              <3>  [warning -reloc-abs]
    51                              <3>  %assign ELDSTRICTCOUNTER 2
    52                              <3> %endif
    53                              <3> %1
    54                              <3> 	%endmacro
    55                              <3> 
    56                              <3> 	%imacro eldstrictcheck 0.nolist
    57                              <3> %if ELDSTRICT
    58                              <3>  %ifn ELDSTRICTCOUNTER
    59                              <3>   %error Unexpected relocation
    60                              <3>  %else
    61                              <3>   %assign ELDSTRICTCOUNTER ELDSTRICTCOUNTER - 1
    62                              <3>   %ifn ELDSTRICTCOUNTER
    63                              <3>    [warning +reloc-abs]
    64                              <3>   %endif
    65                              <3>  %endif
    66                              <3> %endif
    67                              <3> 	%endmacro
    68                              <3> 
    69                              <3> %endif
    70                              <3> 
    21                              <2> 
    22                              <2> 
    23                              <2> %assign ELDLINKER 0
    24                              <2> 
    25                              <2> %define INTERNAL_CODE_TO_CODE_RELOCATIONS ""
    26                              <2> %define INTERNAL_CODE_TO_DATA_RELOCATIONS ""
    27                              <2> %define INTERNAL_DATA_TO_CODE_RELOCATIONS ""
    28                              <2> %define INTERNAL_DATA_TO_DATA_RELOCATIONS ""
    29                              <2> %define INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS ""
    30                              <2> %define INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS ""
    31                              <2> %define INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS ""
    32                              <2> %define INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS ""
    33                              <2> %assign ELDDATA_OPTIONAL_STATUS 0		; not any seen yet
    34                              <2> %assign ELDDATA_PMREQUIRED_STATUS 0		; not any seen yet
    35                              <2> 
    36                              <2> 	%imacro internalcoderelocation 0-1.nolist -2
    37                              <2> %assign %%entry $ + _CURRENT_SECTION %+ FIXUP + %1
    38                              <2> %if ELDLINKER
    39                              <2>  %ifidni _CURRENT_SECTION_TYPE, DATA
    40                              <2>   %xdefine INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS, %%entry
    41                              <2>  %else
    42                              <2>   %xdefine INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS, %%entry
    43                              <2>  %endif
    44                              <2> %else
    45                              <2>  %ifidni _CURRENT_SECTION_TYPE, DATA
    46                              <2>   %xdefine INTERNAL_DATA_TO_CODE_RELOCATIONS INTERNAL_DATA_TO_CODE_RELOCATIONS, %%entry
    47                              <2>  %else
    48                              <2>   %xdefine INTERNAL_CODE_TO_CODE_RELOCATIONS INTERNAL_CODE_TO_CODE_RELOCATIONS, %%entry
    49                              <2>  %endif
    50                              <2> %endif
    51                              <2> 	eldstrictcheck
    52                              <2> 	%endmacro
    53                              <2> 
    54                              <2> 	%imacro internaldatarelocation 0-1.nolist -2
    55                              <2> %assign %%entry $ + _CURRENT_SECTION %+ FIXUP + %1
    56                              <2> %if ELDLINKER
    57                              <2>  %ifidni _CURRENT_SECTION_TYPE, DATA
    58                              <2>   %xdefine INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS, %%entry
    59                              <2>  %else
    60                              <2>   %xdefine INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS, %%entry
    61                              <2>  %endif
    62                              <2> %else
    63                              <2>  %ifidni _CURRENT_SECTION_TYPE, DATA
    64                              <2>   %xdefine INTERNAL_DATA_TO_DATA_RELOCATIONS INTERNAL_DATA_TO_DATA_RELOCATIONS, %%entry
    65                              <2>  %else
    66                              <2>   %xdefine INTERNAL_CODE_TO_DATA_RELOCATIONS INTERNAL_CODE_TO_DATA_RELOCATIONS, %%entry
    67                              <2>  %endif
    68                              <2> %endif
    69                              <2> 	eldstrictcheck
    70                              <2> 	%endmacro
    71                              <2> 
    72                              <2> ; dw INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS, 0
    73                              <2> ; dw INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS, 0
    74                              <2> ; dw INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS, -1
    75                              <2> ; dw INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS, -1
    76                              <2> ; dw INTERNAL_CODE_TO_CODE_RELOCATIONS, 0
    77                              <2> ; dw INTERNAL_CODE_TO_DATA_RELOCATIONS, 0
    78                              <2> ; dw INTERNAL_DATA_TO_CODE_RELOCATIONS, -1
    79                              <2> ; dw INTERNAL_DATA_TO_DATA_RELOCATIONS, -1
    80                              <2> 
    81                              <2> 
    82                              <2> %define LINK_DATA_RELOCATIONS ""
    83                              <2> %define LINK_LINKER_DATA_RELOCATIONS ""
    84                              <2> %define LINK_DATA_NAMES db ""
    85                              <2> %define LINK_DATA_DETECTION none, none
    86                              <2> 
    87                              <2> %define LINK_OTHER_DATA_RELOCATIONS ""
    88                              <2> %define LINK_OTHER_LINKER_DATA_RELOCATIONS ""
    89                              <2> %define LINK_OTHER_DATA_NAMES db ""
    90                              <2> %define LINK_OTHER_DATA_DETECTION none, none
    91                              <2> 
    92                              <2> %ifndef ELDOTHER
    93                              <2>  %assign ELDOTHER 0
    94                              <2> %endif
    95                              <2> %assign ELDOTHERLINK 0
    96                              <2> 
    97                              <2> 	%imacro otherlinkdatarelocation 1-3.nolist -2, required
    98                              <2> %if ELDOTHER
    99                              <2>  %assign ELDOTHERLINK 1
   100                              <2> %endif
   101                              <2> 	linkdatarelocation %1, %2, %3
   102                              <2> %assign ELDOTHERLINK 0
   103                              <2> 	%endmacro
   104                              <2> 
   105                              <2> 	%imacro linkdatarelocation 1-3.nolist -2, required
   106                              <2> %assign %%entry $ + _CURRENT_SECTION %+ FIXUP + %2
   107                              <2> %ifidni %3, required
   108                              <2>  %assign %%optional 0
   109                              <2> %elifidni %3, optional
   110                              <2>  %assign %%optional 100h
   111                              <2>  %if ELDDATA_OPTIONAL_STATUS == 0
   112                              <2>   %assign ELDDATA_OPTIONAL_STATUS 1
   113                              <2>  %elif ELDDATA_OPTIONAL_STATUS == 1
   114                              <2>  %else
   115                              <2>   %error Optional data link not allowed here
   116                              <2>  %endif
   117                              <2> %elifidni %3, PM required
   118                              <2>  %assign %%optional 300h
   119                              <2>  %assign ELDDATA_PMREQUIRED_STATUS 1
   120                              <2>  %if ELDDATA_OPTIONAL_STATUS == 0
   121                              <2>   %assign ELDDATA_OPTIONAL_STATUS 1
   122                              <2>  %elif ELDDATA_OPTIONAL_STATUS == 1
   123                              <2>  %else
   124                              <2>   %error Optional data link not allowed here
   125                              <2>  %endif
   126                              <2> %else
   127                              <2>  %fatal Unknown optional keyword
   128                              <2> %endif
   129                              <2> %ifidni _CURRENT_SECTION_TYPE, DATA
   130                              <2>  %assign %%DATASECTION 1
   131                              <2> %else
   132                              <2>  %assign %%DATASECTION 0
   133                              <2> %endif
   134                              <2> 	%if ELDOTHERLINK
   135                              <2> %if ELDLINKER
   136                              <2>  %xdefine LINK_OTHER_LINKER_DATA_RELOCATIONS LINK_OTHER_LINKER_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   137                              <2> %else
   138                              <2>  %xdefine LINK_OTHER_DATA_RELOCATIONS LINK_OTHER_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   139                              <2> %endif
   140                              <2> 	%else
   141                              <2> %if ELDLINKER
   142                              <2>  %xdefine LINK_LINKER_DATA_RELOCATIONS LINK_LINKER_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   143                              <2> %else
   144                              <2>  %xdefine LINK_DATA_RELOCATIONS LINK_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   145                              <2> %endif
   146                              <2> 	%endif
   147                              <2> %defstr %%string %1
   148                              <2> %strlen %%length %%string
   149                              <2> %if %%length > 64
   150                              <2>  %error Too long link name: %1
   151                              <2> %endif
   152                              <2> %define LINK_DATA_CHECK %1
   153                              <2> 	%if ELDOTHERLINK
   154                              <2> 	linkdata_detect LINK_OTHER_DATA_DETECTION
   155                              <2> %if LINK_DATA_NEW
   156                              <2>  %xdefine LINK_OTHER_DATA_DETECTION LINK_OTHER_DATA_DETECTION, %1, %%name
   157                              <2> 	hashdef HASH, %%string
   158                              <2>  %xdefine LINK_OTHER_DATA_NAMES 	LINK_OTHER_DATA_NAMES, %%name:, dw _HASH, {counted %%string}
   160                              <2> %else
   161                              <2>  %%name equ LINK_DATA_DUPLICATE
   162                              <2> %endif
   163                              <2> 	%else
   164                              <2> 	linkdata_detect LINK_DATA_DETECTION
   165                              <2> %if LINK_DATA_NEW
   166                              <2>  %xdefine LINK_DATA_DETECTION LINK_DATA_DETECTION, %1, %%name
   167                              <2> 	hashdef HASH, %%string
   168                              <2>  %xdefine LINK_DATA_NAMES 	LINK_DATA_NAMES, %%name:, dw _HASH, {counted %%string}
   170                              <2> %else
   171                              <2>  %%name equ LINK_DATA_DUPLICATE
   172                              <2> %endif
   173                              <2> 	%endif
   174                              <2> 	eldstrictcheck
   175                              <2> 	%endmacro
   176                              <2> 
   177                              <2> 	%imacro linkdata_detect 2-*.nolist
   178                              <2> %assign LINK_DATA_NEW 1
   179                              <2> %rep (%0 - 2) / 2
   180                              <2>  %rotate 2
   181                              <2>  %ifidni %1, LINK_DATA_CHECK
   182                              <2>   %assign LINK_DATA_NEW 0
   183                              <2>   %xdefine LINK_DATA_DUPLICATE %2
   184                              <2>   %exitrep
   185                              <2>  %endif
   186                              <2> %endrep
   187                              <2> 	%endmacro
   188                              <2> 
   189                              <2> 	%imacro link_data_dump_names 1-*.nolist
   190                              <2> %rep %0
   191                              <2> 	%1
   192                              <2>  %rotate 1
   193                              <2> %endrep
   194                              <2> 	%endmacro
   195                              <2> 
   196                              <2> ; dw LINK_LINKER_DATA_RELOCATIONS, 0, 0
   197                              <2> ; dw LINK_DATA_RELOCATIONS, 0, 0
   198                              <2> ; link_data_dump_names ELDCALL_CODE_NAMES
   199                              <2> 
   200                              <2> %endif
    21                              <1> 
    22                              <1> %assign ELDLINKER 0
    23                              <1> 
    24                              <1> [section relocatedzero nobits vstart=0]
    25                              <1> relocatedzero:
    26                              <1> __SECT__
    27                              <1> 
    28                              <1> 	numdef HOUDINI, 1
    29                              <1> 	numdef HOUDINI_CONDITIONAL, 1
    30                              <1> 
    31                              <1> %imacro houdini 0.nolist
    32                              <1> %if _HOUDINI
    33                              <1>  %if _HOUDINI_CONDITIONAL
    34                              <1> reloc	testopt [ss:relocateddata], 100h
    35                              <1> linkdatarelocation options7, -3
    36                              <1> 	jz %%skip
    37                              <1>  %endif
    38                              <1> reloc	testopt [ss:relocateddata], 100h
    39                              <1> linkdatarelocation internalflags6, -3
    40                              <1> 	jz %%skip
    41                              <1> 	int3
    42                              <1> %%skip:
    43                              <1> %endif
    44                              <1> %endmacro
    45                              <1> 
    46                              <1> %define ELDCALL_CODE_RELOCATIONS ""
    47                              <1> %define ELDCALL_LINKER_CODE_RELOCATIONS ""
    48                              <1> %define ELDCALL_CODE_RELOCATIONS_OPTIONAL ""
    49                              <1> %define ELDCALL_LINKER_CODE_RELOCATIONS_OPTIONAL ""
    50                              <1> %define ELDCALL_CODE_NAMES db ""
    51                              <1> %define ELDCALL_CODE_DETECTION none, none
    52                              <1> %assign ELDCALL_OPTIONAL_STATUS 0		; not any seen yet
    53                              <1> %assign ELDCALL_PMREQUIRED_STATUS 0		; not any seen yet
    54                              <1> 
    55                              <1> 	%imacro extcall 1-2.nolist required
    56                              <1> %ifidni _CURRENT_SECTION_TYPE, DATA
    57                              <1>  %error "ELD call cannot be used in ELD data block"
    58                              <1> %endif
    59                              <1> %assign %%entry $ + _CURRENT_SECTION %+ FIXUP
    60                              <1> %ifidni %2, required
    61                              <1>  %assign %%optional 0
    62                              <1> %elifidni %2, optional
    63                              <1>  %assign %%optional 100h
    64                              <1>  %if ELDCALL_OPTIONAL_STATUS == 0
    65                              <1>   %assign ELDCALL_OPTIONAL_STATUS 1
    66                              <1>  %elif ELDCALL_OPTIONAL_STATUS == 1
    67                              <1>  %else
    68                              <1>   %error Optional code link not allowed here
    69                              <1>  %endif
    70                              <1> %elifidni %2, PM required
    71                              <1>  %assign %%optional 300h
    72                              <1>  %assign ELDCALL_PMREQUIRED_STATUS 1
    73                              <1>  %if ELDCALL_OPTIONAL_STATUS == 0
    74                              <1>   %assign ELDCALL_OPTIONAL_STATUS 1
    75                              <1>  %elif ELDCALL_OPTIONAL_STATUS == 1
    76                              <1>  %else
    77                              <1>   %error Optional code link not allowed here
    78                              <1>  %endif
    79                              <1> %else
    80                              <1>  %fatal Unknown optional keyword
    81                              <1> %endif
    82                              <1> %if 0
    83                              <1> [warning -reloc-rel-word]
    84                              <1> 	call near relocatedzero
    85                              <1> [warning +reloc-rel-word]
    86                              <1> %else
    87                              <1> 	db 0E8h
    88                              <1> reloc	dw relocatedzero
    89                              <1> 	eldstrictcheck
    90                              <1> %endif
    91                              <1> 	jmp strict short %%skipparameter
    92                              <1> 	dw 0
    93                              <1> %%skipparameter:
    94                              <1> %if ELDLINKER
    95                              <1>  %xdefine ELDCALL_LINKER_CODE_RELOCATIONS ELDCALL_LINKER_CODE_RELOCATIONS, %%entry, %%name
    96                              <1>  %xdefine ELDCALL_LINKER_CODE_RELOCATIONS_OPTIONAL ELDCALL_LINKER_CODE_RELOCATIONS_OPTIONAL, 1 + %%optional, %%entry, %%name
    97                              <1> %else
    98                              <1>  %xdefine ELDCALL_CODE_RELOCATIONS ELDCALL_CODE_RELOCATIONS, %%entry, %%name
    99                              <1>  %xdefine ELDCALL_CODE_RELOCATIONS_OPTIONAL ELDCALL_CODE_RELOCATIONS_OPTIONAL, 1 + %%optional, %%entry, %%name
   100                              <1> %endif
   101                              <1> %defstr %%string %1
   102                              <1> %strlen %%length %%string
   103                              <1> %if %%length > 64
   104                              <1>  %error Too long link name: %1
   105                              <1> %endif
   106                              <1> %define ELDCALL_CODE_CHECK %1
   107                              <1> 	linkcode_detect ELDCALL_CODE_DETECTION
   108                              <1> %if ELDCALL_CODE_NEW
   109                              <1>  %xdefine ELDCALL_CODE_DETECTION ELDCALL_CODE_DETECTION, %1, %%name
   110                              <1> 	hashdef HASH, %%string
   111                              <1> %xdefine ELDCALL_CODE_NAMES 	ELDCALL_CODE_NAMES, %%name:, dw _HASH, {counted %%string}
   113                              <1> %else
   114                              <1>  %%name equ ELDCALL_CODE_DUPLICATE
   115                              <1> %endif
   116                              <1> 	%endmacro
   117                              <1> 
   118                              <1> 	%imacro linkcode_detect 2-*.nolist
   119                              <1> %assign ELDCALL_CODE_NEW 1
   120                              <1> %rep (%0 - 2) / 2
   121                              <1>  %rotate 2
   122                              <1>  %ifidni %1, ELDCALL_CODE_CHECK
   123                              <1>   %assign ELDCALL_CODE_NEW 0
   124                              <1>   %xdefine ELDCALL_CODE_DUPLICATE %2
   125                              <1>   %exitrep
   126                              <1>  %endif
   127                              <1> %endrep
   128                              <1> 	%endmacro
   129                              <1> 
   130                              <1> 
   131                              <1> %define ELDCALL_CALLCALL_LIST none
   132                              <1> 
   133                              <1> 	%imacro extcallcall 1.nolist
   134                              <1> 	call %1
   135                              <1> %xdefine ELDCALL_CALLCALL_LIST ELDCALL_CALLCALL_LIST, %1
   136                              <1> 	%endmacro
   137                              <1> 
   138                              <1> %assign ELDCALLCALL_DUMPED 0
   139                              <1> 
   140                              <1> 	%imacro eldcall_dump_callcall 1-*.nolist
   141                              <1> %define ELDCALL_CALLCALL_PROCESSED none
   142                              <1>  %rep %0 - 1
   143                              <1>   %rotate 1
   144                              <1>   %define ELDCALL_CHECK %1
   145                              <1> 	eldcall_callcall_detect ELDCALL_CALLCALL_PROCESSED
   146                              <1>   %if ELDCALL_NEW
   147                              <1>    %xdefine ELDCALL_CALLCALL_PROCESSED ELDCALL_CALLCALL_PROCESSED, %1
   148                              <1> 	align 8, nop
   149                              <1> %1:
   150                              <1> 	extcall %1
   151                              <1> 	retn
   152                              <1>   %endif
   153                              <1>  %endrep
   154                              <1> %unimacro extcallcall 1.nolist
   155                              <1> %assign ELDCALLCALL_DUMPED 1
   156                              <1> %define ELDCALL_CALLCALL_LIST none
   157                              <1> 	%endmacro
   158                              <1> 
   159                              <1> 	%imacro eldcall_callcall_detect 1-*.nolist
   160                              <1> %assign ELDCALL_NEW 1
   161                              <1> %rep %0 - 1
   162                              <1>  %rotate 1
   163                              <1>  %ifidni %1, ELDCALL_CHECK
   164                              <1>   %assign ELDCALL_NEW 0
   165                              <1>   %exitrep
   166                              <1>  %endif
   167                              <1> %endrep
   168                              <1> 	%endmacro
   169                              <1> 
   170                              <1> 	%imacro eldcall_dump_names 1-*.nolist
   171                              <1> %rep %0
   172                              <1> 	%1
   173                              <1>  %rotate 1
   174                              <1> %endrep
   175                              <1> 	%endmacro
   176                              <1> 
   177                              <1> ; eldcall_dump_callcall ELDCALL_CALLCALL_LIST
   178                              <1> ; if using optional code links:
   179                              <1> ;  dw ELDCALL_LINKER_CODE_RELOCATIONS_OPTIONAL, 0
   180                              <1> ;  dw ELDCALL_CODE_RELOCATIONS_OPTIONAL, 0
   181                              <1> ; if not using optional code links:
   182                              <1> ;  dw ELDCALL_LINKER_CODE_RELOCATIONS, 0, 0
   183                              <1> ;  dw ELDCALL_CODE_RELOCATIONS, 0, 0
   184                              <1> ; eldcall_dump_names ELDCALL_CODE_NAMES
   185                              <1> 
   186                              <1> %endif
    39                                  %include "elddata.mac"
     1                              <1> %if 0
     2                              <1> 
     3                              <1> Extensions for lDebug data relocation macros
     4                              <1> 
     5                              <1> Copyright (C) 2008-2024 E. C. Masloch
     6                              <1> 
     7                              <1> Usage of the works is permitted provided that this
     8                              <1> instrument is retained with the works, so that any entity
     9                              <1> that uses the works is notified of this instrument.
    10                              <1> 
    11                              <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <1> 
    13                              <1> %endif
    14                              <1> 
    15                              <1> %ifndef ELDDATA_MAC
    16                              <1> %define ELDDATA_MAC 1
    17                              <1> 
    18                              <1> %include "lmacros3.mac"
    19                              <1> %include "nasmhash.mac"
    20                              <1> %include "eldcheck.mac"
    21                              <1> 
    22                              <1> 
    23                              <1> %assign ELDLINKER 0
    24                              <1> 
    25                              <1> %define INTERNAL_CODE_TO_CODE_RELOCATIONS ""
    26                              <1> %define INTERNAL_CODE_TO_DATA_RELOCATIONS ""
    27                              <1> %define INTERNAL_DATA_TO_CODE_RELOCATIONS ""
    28                              <1> %define INTERNAL_DATA_TO_DATA_RELOCATIONS ""
    29                              <1> %define INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS ""
    30                              <1> %define INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS ""
    31                              <1> %define INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS ""
    32                              <1> %define INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS ""
    33                              <1> %assign ELDDATA_OPTIONAL_STATUS 0		; not any seen yet
    34                              <1> %assign ELDDATA_PMREQUIRED_STATUS 0		; not any seen yet
    35                              <1> 
    36                              <1> 	%imacro internalcoderelocation 0-1.nolist -2
    37                              <1> %assign %%entry $ + _CURRENT_SECTION %+ FIXUP + %1
    38                              <1> %if ELDLINKER
    39                              <1>  %ifidni _CURRENT_SECTION_TYPE, DATA
    40                              <1>   %xdefine INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS, %%entry
    41                              <1>  %else
    42                              <1>   %xdefine INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS, %%entry
    43                              <1>  %endif
    44                              <1> %else
    45                              <1>  %ifidni _CURRENT_SECTION_TYPE, DATA
    46                              <1>   %xdefine INTERNAL_DATA_TO_CODE_RELOCATIONS INTERNAL_DATA_TO_CODE_RELOCATIONS, %%entry
    47                              <1>  %else
    48                              <1>   %xdefine INTERNAL_CODE_TO_CODE_RELOCATIONS INTERNAL_CODE_TO_CODE_RELOCATIONS, %%entry
    49                              <1>  %endif
    50                              <1> %endif
    51                              <1> 	eldstrictcheck
    52                              <1> 	%endmacro
    53                              <1> 
    54                              <1> 	%imacro internaldatarelocation 0-1.nolist -2
    55                              <1> %assign %%entry $ + _CURRENT_SECTION %+ FIXUP + %1
    56                              <1> %if ELDLINKER
    57                              <1>  %ifidni _CURRENT_SECTION_TYPE, DATA
    58                              <1>   %xdefine INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS, %%entry
    59                              <1>  %else
    60                              <1>   %xdefine INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS, %%entry
    61                              <1>  %endif
    62                              <1> %else
    63                              <1>  %ifidni _CURRENT_SECTION_TYPE, DATA
    64                              <1>   %xdefine INTERNAL_DATA_TO_DATA_RELOCATIONS INTERNAL_DATA_TO_DATA_RELOCATIONS, %%entry
    65                              <1>  %else
    66                              <1>   %xdefine INTERNAL_CODE_TO_DATA_RELOCATIONS INTERNAL_CODE_TO_DATA_RELOCATIONS, %%entry
    67                              <1>  %endif
    68                              <1> %endif
    69                              <1> 	eldstrictcheck
    70                              <1> 	%endmacro
    71                              <1> 
    72                              <1> ; dw INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS, 0
    73                              <1> ; dw INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS, 0
    74                              <1> ; dw INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS, -1
    75                              <1> ; dw INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS, -1
    76                              <1> ; dw INTERNAL_CODE_TO_CODE_RELOCATIONS, 0
    77                              <1> ; dw INTERNAL_CODE_TO_DATA_RELOCATIONS, 0
    78                              <1> ; dw INTERNAL_DATA_TO_CODE_RELOCATIONS, -1
    79                              <1> ; dw INTERNAL_DATA_TO_DATA_RELOCATIONS, -1
    80                              <1> 
    81                              <1> 
    82                              <1> %define LINK_DATA_RELOCATIONS ""
    83                              <1> %define LINK_LINKER_DATA_RELOCATIONS ""
    84                              <1> %define LINK_DATA_NAMES db ""
    85                              <1> %define LINK_DATA_DETECTION none, none
    86                              <1> 
    87                              <1> %define LINK_OTHER_DATA_RELOCATIONS ""
    88                              <1> %define LINK_OTHER_LINKER_DATA_RELOCATIONS ""
    89                              <1> %define LINK_OTHER_DATA_NAMES db ""
    90                              <1> %define LINK_OTHER_DATA_DETECTION none, none
    91                              <1> 
    92                              <1> %ifndef ELDOTHER
    93                              <1>  %assign ELDOTHER 0
    94                              <1> %endif
    95                              <1> %assign ELDOTHERLINK 0
    96                              <1> 
    97                              <1> 	%imacro otherlinkdatarelocation 1-3.nolist -2, required
    98                              <1> %if ELDOTHER
    99                              <1>  %assign ELDOTHERLINK 1
   100                              <1> %endif
   101                              <1> 	linkdatarelocation %1, %2, %3
   102                              <1> %assign ELDOTHERLINK 0
   103                              <1> 	%endmacro
   104                              <1> 
   105                              <1> 	%imacro linkdatarelocation 1-3.nolist -2, required
   106                              <1> %assign %%entry $ + _CURRENT_SECTION %+ FIXUP + %2
   107                              <1> %ifidni %3, required
   108                              <1>  %assign %%optional 0
   109                              <1> %elifidni %3, optional
   110                              <1>  %assign %%optional 100h
   111                              <1>  %if ELDDATA_OPTIONAL_STATUS == 0
   112                              <1>   %assign ELDDATA_OPTIONAL_STATUS 1
   113                              <1>  %elif ELDDATA_OPTIONAL_STATUS == 1
   114                              <1>  %else
   115                              <1>   %error Optional data link not allowed here
   116                              <1>  %endif
   117                              <1> %elifidni %3, PM required
   118                              <1>  %assign %%optional 300h
   119                              <1>  %assign ELDDATA_PMREQUIRED_STATUS 1
   120                              <1>  %if ELDDATA_OPTIONAL_STATUS == 0
   121                              <1>   %assign ELDDATA_OPTIONAL_STATUS 1
   122                              <1>  %elif ELDDATA_OPTIONAL_STATUS == 1
   123                              <1>  %else
   124                              <1>   %error Optional data link not allowed here
   125                              <1>  %endif
   126                              <1> %else
   127                              <1>  %fatal Unknown optional keyword
   128                              <1> %endif
   129                              <1> %ifidni _CURRENT_SECTION_TYPE, DATA
   130                              <1>  %assign %%DATASECTION 1
   131                              <1> %else
   132                              <1>  %assign %%DATASECTION 0
   133                              <1> %endif
   134                              <1> 	%if ELDOTHERLINK
   135                              <1> %if ELDLINKER
   136                              <1>  %xdefine LINK_OTHER_LINKER_DATA_RELOCATIONS LINK_OTHER_LINKER_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   137                              <1> %else
   138                              <1>  %xdefine LINK_OTHER_DATA_RELOCATIONS LINK_OTHER_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   139                              <1> %endif
   140                              <1> 	%else
   141                              <1> %if ELDLINKER
   142                              <1>  %xdefine LINK_LINKER_DATA_RELOCATIONS LINK_LINKER_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   143                              <1> %else
   144                              <1>  %xdefine LINK_DATA_RELOCATIONS LINK_DATA_RELOCATIONS, 1 + %%DATASECTION + %%optional, %%entry, %%name
   145                              <1> %endif
   146                              <1> 	%endif
   147                              <1> %defstr %%string %1
   148                              <1> %strlen %%length %%string
   149                              <1> %if %%length > 64
   150                              <1>  %error Too long link name: %1
   151                              <1> %endif
   152                              <1> %define LINK_DATA_CHECK %1
   153                              <1> 	%if ELDOTHERLINK
   154                              <1> 	linkdata_detect LINK_OTHER_DATA_DETECTION
   155                              <1> %if LINK_DATA_NEW
   156                              <1>  %xdefine LINK_OTHER_DATA_DETECTION LINK_OTHER_DATA_DETECTION, %1, %%name
   157                              <1> 	hashdef HASH, %%string
   158                              <1>  %xdefine LINK_OTHER_DATA_NAMES 	LINK_OTHER_DATA_NAMES, %%name:, dw _HASH, {counted %%string}
   160                              <1> %else
   161                              <1>  %%name equ LINK_DATA_DUPLICATE
   162                              <1> %endif
   163                              <1> 	%else
   164                              <1> 	linkdata_detect LINK_DATA_DETECTION
   165                              <1> %if LINK_DATA_NEW
   166                              <1>  %xdefine LINK_DATA_DETECTION LINK_DATA_DETECTION, %1, %%name
   167                              <1> 	hashdef HASH, %%string
   168                              <1>  %xdefine LINK_DATA_NAMES 	LINK_DATA_NAMES, %%name:, dw _HASH, {counted %%string}
   170                              <1> %else
   171                              <1>  %%name equ LINK_DATA_DUPLICATE
   172                              <1> %endif
   173                              <1> 	%endif
   174                              <1> 	eldstrictcheck
   175                              <1> 	%endmacro
   176                              <1> 
   177                              <1> 	%imacro linkdata_detect 2-*.nolist
   178                              <1> %assign LINK_DATA_NEW 1
   179                              <1> %rep (%0 - 2) / 2
   180                              <1>  %rotate 2
   181                              <1>  %ifidni %1, LINK_DATA_CHECK
   182                              <1>   %assign LINK_DATA_NEW 0
   183                              <1>   %xdefine LINK_DATA_DUPLICATE %2
   184                              <1>   %exitrep
   185                              <1>  %endif
   186                              <1> %endrep
   187                              <1> 	%endmacro
   188                              <1> 
   189                              <1> 	%imacro link_data_dump_names 1-*.nolist
   190                              <1> %rep %0
   191                              <1> 	%1
   192                              <1>  %rotate 1
   193                              <1> %endrep
   194                              <1> 	%endmacro
   195                              <1> 
   196                              <1> ; dw LINK_LINKER_DATA_RELOCATIONS, 0, 0
   197                              <1> ; dw LINK_DATA_RELOCATIONS, 0, 0
   198                              <1> ; link_data_dump_names ELDCALL_CODE_NAMES
   199                              <1> 
   200                              <1> %endif
    40                                  %include "isvariab.mac"
     1                              <1> 
     2                              <1> %if 0
     3                              <1> 
     4                              <1> lDebug isvariable? function strutures and macros
     5                              <1> 
     6                              <1> Copyright (C) 2008-2023 E. C. Masloch
     7                              <1> 
     8                              <1> Usage of the works is permitted provided that this
     9                              <1> instrument is retained with the works, so that any entity
    10                              <1> that uses the works is notified of this instrument.
    11                              <1> 
    12                              <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    13                              <1> 
    14                              <1> %endif
    15                              <1> 
    16                              <1> 
    17                              <1> 	struc ISVARIABLESTRUC
    18 00000000 ????                <1> ivName:		resw 1		; -> name (up to 13 bytes, but actually only 11)
    19                              <1> 				;  (search for ivfNameLengthLimit for limit)
    20                              <1> 				;  (length given by ivFlags & ivfNameLengthMask)
    21                              <1> 	; The ivName pointer is only used for more-byte names. It actually
    22                              <1> 	;  contains the trailer of the name, excluding the prefix formed by
    23                              <1> 	;  the first two bytes. This suffix can be the empty string if the
    24                              <1> 	;  variable in question has a two-byte name.
    25                              <1> 	; (For one-byte names this field is unused and contains zero.)
    26 00000002 ????                <1> ivFlags:	resw 1
    27 00000004 ????                <1> ivAddress:	resw 1		; default -> variable
    28                              <1> 	; The ivAddress field is used by default_variable_setup as the base
    29                              <1> 	;  address for the variable(s). It is also used by var_ext_setup as
    30                              <1> 	;  the ELD code section offset to transfer control to. Otherwise, it
    31                              <1> 	;  is usually set to zero and unused.
    32 00000006 ????                <1> ivSetup:	resw 1		; -> set up code (in expr code section)
    33                              <1> 	; INP:	ax = array index (0-based)
    34                              <1> 	;	di = 0
    35                              <1> 	;	cl = default size of variable (1..4)
    36                              <1> 	;	ch = length of variable name
    37                              <1> 	; CHG:	si, ax, dx
    38                              <1> 	; OUT:	NC if valid,
    39                              <1> 	;	 bx -> var, di = 0 or di -> mask
    40                              <1> 	;	 cl = size of variable (1..4)
    41                              <1> 	;	 ch = length of variable name
    42 00000008 ??                  <1> ivArrayLast:	resb 1		; 0 if no array, FFh = 256 entries
    43                              <1> 	; The ivArrayLast field is used by the dispatcher to determine
    44                              <1> 	;  whether to support array index expressions. It is checked
    45                              <1> 	;  before decrementing the index if ivfArrayOneBased is set.
    46 00000009 ??                  <1> ivArrayBetween: resb 1		; how many bytes to skip for each index
    47                              <1> 	; The ivArrayBetween field is only used by default_variable_setup.
    48                              <1> 	endstruc
    49                              <1> 
    50                              <1> ivfNameLengthMask:	equ 15	; gives name trailer length, 0 to 11
    51                              <1> ivfNameLengthLimit:	equ 13
    52                              <1> ivfVarLengthShift:	equ 4
    53                              <1> ivfVarLengthMask:	equ 3 << ivfVarLengthShift
    54                              <1> 				; gives default variable size minus 1
    55                              <1> ivfReadOnly:		equ 80h	; variable cannot be written at all
    56                              <1> ivfArrayOneBased:	equ 100h; first array entry is 1 not 0 (ivArrayLast > 0)
    57                              <1> ivfArrayOptional:	equ 200h; array index expression is optional
    58                              <1> ivfSeparatorSpecial:	equ 400h; used for RIxxP/L/S/O
    59                              <1> 
    60                              <1> %define ISVARIABLESTRINGS db "",db ""
    61                              <1> %define IVS_ONEBYTE_NAMES ""
    62                              <1> %define IVS_MOREBYTE_NAMEHEADERS ""
    63                              <1> %assign IVS_HAVE_ONEBYTE 0
    64                              <1> %assign IVS_SINGLE_ONEBYTE 1
    65                              <1> 
    66                              <1> 		; %1 = name string
    67                              <1> 		; %2 = default variable length, 1 to 4
    68                              <1> 		; %3 = flags to set (except name length and var length)
    69                              <1> 		; %4 = ivAddress value
    70                              <1> 		; %5 = ivArrayLast, defaults to 0 (no array)
    71                              <1> 		; %6 = ivArrayBetween, defaults to 0 (immediately consecutive)
    72                              <1> 		; %7 = ivSetup, defaults to default_variable_setup
    73                              <1> 	%macro isvariablestruc 4-7.nolist 0, 0, default_variable_setup
    74                              <1> %push
    75                              <1> %strlen %$namelength %1
    76                              <1> %if %$namelength > ivfNameLengthLimit
    77                              <1>  %error Expected at most 13-byte name (or adjust isvariable? code)
    78                              <1> %endif
    79                              <1> %if IVS_ONEBYTE && %$namelength != 1
    80                              <1>  %error Expected a one-byte name
    81                              <1> %elif ! IVS_ONEBYTE && %$namelength < 2
    82                              <1>  %error Expected at least a two-byte name
    83                              <1> %endif
    84                              <1> %if IVS_ONEBYTE
    85                              <1>  %define IVS_SINGLE_ONEBYTE_NAME %1
    86                              <1>  %if IVS_HAVE_ONEBYTE
    87                              <1>   %assign IVS_SINGLE_ONEBYTE 0
    88                              <1>  %endif
    89                              <1>  %assign IVS_HAVE_ONEBYTE 1
    90                              <1>  %assign %$namelength 0
    91                              <1>  %xdefine IVS_ONEBYTE_NAMES IVS_ONEBYTE_NAMES, %1
    92                              <1>  %%name equ 0
    93                              <1> %else
    94                              <1>  %assign %$namelength %$namelength - 2
    95                              <1>  %substr %$nametrailer %1 3,-1
    96                              <1>  %substr %$nameheader %1 1,2
    97                              <1>  %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, %$nameheader
    98                              <1>  %xdefine ISVARIABLESTRINGS ISVARIABLESTRINGS, %%name:, {db %$nametrailer}
    99                              <1> %endif
   100                              <1> 
   101                              <1> %assign %$varlength %2 - 1	; 0 means one byte, 1 means two bytes,
   102                              <1> 				;  2 means three bytes, 3 means four bytes
   103                              <1> 	istruc ISVARIABLESTRUC
   104                              <1> at ivName,		dw %%name
   105                              <1>  IV_NAME_RELOCATION
   106                              <1> at ivFlags,		dw %$$namelength | (%$$varlength << ivfVarLengthShift) | %3
   107                              <1> at ivAddress,		dw %4
   108                              <1>  IV_ADDRESS_RELOCATION
   109                              <1> at ivSetup,		dw %7
   110                              <1>  IV_SETUP_RELOCATION
   111                              <1> at ivArrayLast,		db %5
   112                              <1> at ivArrayBetween,	db %6
   113                              <1> 	iend
   114                              <1> %pop
   115                              <1> %ifndef SECTION_OF_%7
   116                              <1>  %error Unknown target section for symbol %7
   117                              <1> %elifnidni %[SECTION_OF_%7], _EXPR_SECTION
   118                              <1>  %error Wrong section for symbol %7: section_of=SECTION_OF_%7, expr=_EXPR_SECTION
   119                              <1> %endif
   120                              <1> 	%endmacro
   121                              <1> 
   122                              <1> %define IV_NAME_RELOCATION
   123                              <1> %define IV_ADDRESS_RELOCATION
   124                              <1> %define IV_SETUP_RELOCATION
   125                              <1> 
   126                              <1> 	%macro isvariablestrings 2-*.nolist
   127                              <1> %rep %0
   128                              <1>  %1
   129                              <1>  %rotate 1
   130                              <1> %endrep
   131                              <1> 	%endmacro
    41                                  
    42                                  	struc HANDLERTABLE
    43 00000000 ????                    htMessage:		resw 1
    44 00000002 ????                    htHandler:		resw 1
    45 00000004 ????                    htTemplate:		resw 1
    46 00000006 ????                    htReturn:		resw 1
    47 00000008 ????                    htFlags:		resw 1
    48                                  	endstruc
    49                                  
    50                                  htfIsAMIS equ 1
    51                                  htfIsInject equ 2
    52                                  
    53                                  
    54                                  	cpu 8086
    55                                  
    56                                  	addsection RELOCATEDDATA, nobits vstart=_ELD_RELOC_VSTART
    57                                  relocateddata:
    58                                  
    59                                  	addsection HEADER, start=0
    60                                  
    61                                  	istruc ELD_HEADERX
    62                                  at eldhxHeader
    63                                  		; ELD executable header
    64                                  	istruc ELD_HEADER
    65 00000000 454C4431                at eldhSignature,	db "ELD1"
    66 00000004 000000                  			db 0,0,0
    67 00000007 1A                      			db 26
    68 00000008 50000000                at eldhCodeOffset,	dd CODEOFFSET
    69 0000000C A01A                    at eldhCodeImageLength,	dw code_size
    70 0000000E 0000                    at eldhCodeAllocLength,	dw 0
    71 00000010 F01A0000                at eldhDataOffset,	dd DATAOFFSET
    72 00000014 D00B                    at eldhDataImageLength,	dw data_size
    73 00000016 0000                    at eldhDataAllocLength,	dw total_data_size - data_size
    74 00000018 E30A                    at eldhCodeEntrypoint,	dw linker - code
    75                                  at eldhReserved
    76 0000001A 00<rep 4h>2800          at eldhExtensionSize,	dw header_extension_end - $$
    77                                  	iend
    78 00000020 [30000000]              at eldhxDescriptionOffset,	dd description
    79 00000024 7F230000                at eldhxHelpOffset,		dd DATAOFFSET + msg.help - datastart
    80                                  PUT_ELDHX_DATETIME_OFFSET
    81                                  header_extension_end:
    82 00000028 00<rep 8h>              	iend
    83                                  
    84 00000030 44756D70206C446562-     description:		asciz "Dump lDebug memory use."
    84 00000039 7567206D656D6F7279-
    84 00000042 207573652E00       
    85                                  
    86                                  
    87 00000048 00<rep 8h>              	align 16, db 0
    88                                  
    89                                  	eldstrict on
    90                                  
    91                                  CODEOFFSET equ $ - $$
    92                                  	addsection CODE, follows=HEADER vstart=_ELD_CODE_VSTART
    93                                  %define CODEFIXUP - code + 0
    94                                  code:
    95                                  		; ELD instance header
    96                                  	istruc ELD_INSTANCE
    97                                  at eldiStartCode
    98 00000000 00<rep 2h>              at eldiEndCode
    99 00000002 00<rep 2h>              at eldiStartData
   100 00000004 00<rep 2h>              at eldiEndData
   101 00000006 00<rep 2h>4C444D45-     at eldiIdentifier,	fill 8, 32, db "LDMEM",OTH_STRING
   101 0000000C 4D20<rep 3h>       
   102 00000010 00<rep 2h>6C646D65-     at eldiListing,		asciz _ELD_LISTING
   102 00000016 6D2E6C737400       
   103 0000001C 00<rep 4h>              	iend
   104                                  
   105                                  
   106                                  	numdef ELD_BUG, 0
   107                                  	numdef ELD_BUG_RELOC, _ELD_BUG
   108                                  	numdef ELD_BUG_LINK, _ELD_BUG
   109                                  	numdef ELD_BUG_LENGTH, _ELD_BUG
   110                                  
   111                                  
   112                                  %rep _ELD_BUG_LINK
   113                                  	eldstrict off
   114                                  
   115                                  	dw relocateddata		; missing linkdatarelocation
   116                                  %endrep
   117                                  
   118                                  %rep _ELD_BUG_RELOC
   119                                  	eldstrict off
   120                                  
   121                                  	dw msg.ldmem			; missing internaldatarelocation
   122                                  %endrep
   123                                  
   124                                  %if _ELD_BUG_LENGTH && _ELD_CODE_VSTART
   125                                  times 64 db 0
   126                                  %endif
   127                                  
   128                                  command:
   129 00000020 EB08                    	jmp strict short .entry
   130                                  .chain:
   131 00000022 E8[0000]EB020000        	extcall cmd3_not_ext, required	; must NOT be extcallcall
   132 00000029 90                      	times 10 - ($ - command) nop
   133                                  .entry:
   134 0000002A 56                      	push si
   135 0000002B 3C2D                    	cmp al, '-'
   136 0000002D 7503                    	jne @F
   137 0000002F E86E09                  	extcallcall skipcomma
   138                                  @@:
   139 00000032 4E                      	dec si
   140                                  
   141 00000033 BA[5102]                reloc	mov dx, msg.ldmem
   142                                  internaldatarelocation
   143 00000036 E86F09                  	extcallcall isstring?
   144 00000039 7405                    	je .ours
   145 0000003B 5E                      	pop si
   146 0000003C 4E                      	dec si
   147 0000003D AC                      	lodsb
   148 0000003E EBE2                    	jmp .chain
   149                                  
   150                                  .ours:
   151 00000040 58                      	pop ax
   152 00000041 E85C09                  	extcallcall skipcomma
   153 00000044 4E                      	dec si
   154 00000045 C706[0000][0000]        reloc2	mov word [relocateddata], relocateddata
   155                                  linkdatarelocation lastcmd, -4
   156                                  linkdatarelocation dmycmd
   157 0000004B BA[0000]                reloc	mov dx, relocateddata
   158                                  linkdatarelocation msg.uninstall
   159 0000004E E85709                  	extcallcall isstring?
   160 00000051 7406                    	je uninstall
   161                                  
   162                                  %if _OTHER
   163                                  reloc	mov ax, word [otherseg]
   164                                  internaldatarelocation
   165                                  	extcallcall ispm
   166                                  	jnz @F
   167                                  	xchg dx, ax
   168                                  	extcallcall setes2dx
   169                                  reloc	mov ax, word [es:relocateddata]
   170                                  otherlinkdatarelocation dssel
   171                                  @@:
   172                                  reloc	mov word [otherds], ax
   173                                  internaldatarelocation
   174                                  %endif
   175                                  
   176 00000053 E88300                  	call run
   177 00000056 E85709                  	extcallcall cmd3
   178                                  
   179                                  uninstall:
   180 00000059 AC                      	lodsb
   181 0000005A E85B09                  	extcallcall chkeol
   182                                  
   183 0000005D E86B00                  	call get_es_ext
   184                                  
   185 00000060 06                      	push es
   186 00000061 1F                      	pop ds
   187 00000062 31DB                    	xor bx, bx		; = 0 (no prior, modify ext_command_handler)
   188 00000064 BF[2000]                reloc	mov di, command		; di -> us
   189                                  internalcoderelocation
   190 00000067 368B36[0000]            reloc	mov si, word [ss:relocateddata]
   191                                  linkdatarelocation ext_command_handler
   192                                  				; si -> first
   193 0000006C 85F6                    	test si, si		; none installed ?
   194 0000006E 7450                    	jz .error		; error -->
   195                                  
   196                                  .loop:
   197 00000070 39F7                    	cmp di, si		; found ?
   198 00000072 740D                    	je .bx			; yes, use bx -->
   199 00000074 89F3                    	mov bx, si		; bx -> prior handler
   200 00000076 AD                      	lodsw			; skip entrypoint jmp strict short
   201 00000077 AC                      	lodsb			; get first byte of chainer
   202 00000078 3CE9                    	cmp al, 0E9h		; expecting jmp near ?
   203 0000007A 7544                    	jne .error		; no, error -->
   204 0000007C AD                      	lodsw			; get rel16 displacement
   205 0000007D 01C6                    	add si, ax		; -> next handler
   206 0000007F EBEF                    	jmp .loop
   207                                  
   208                                  .bx:
   209 00000081 85DB                    	test bx, bx		; any prior ?
   210 00000083 751A                    	jnz .bxnz		; yes -->
   211 00000085 AF                      	scasw			; skip entrypoint jmp strict short
   212 00000086 803DE8                  	cmp byte [di], 0E8h	; is it a call to cmd3_not_ext ?
   213 00000089 7507                    	jne @F			; no -->
   214                                  				; yes, reset ext_command_handler to zero
   215                                  .setbx:
   216 0000008B 36891E[0000]            reloc	mov word [ss:relocateddata], bx
   217                                  linkdatarelocation ext_command_handler
   218 00000090 EB1E                    	jmp .done
   219                                  
   220                                  @@:
   221 00000092 803DE9                  	cmp byte [di], 0E9h	; validate
   222 00000095 7529                    	jne .error		; failure -->
   223 00000097 47                      	inc di			; -> rel16 displacement
   224 00000098 8B1D                    	mov bx, word [di]	; get displacement
   225 0000009A AF                      	scasw			; -> after jmp near
   226 0000009B 01FB                    	add bx, di		; -> next handler
   227 0000009D EBEC                    	jmp .setbx		; set ext_command_handler to next
   228                                  
   229                                  .bxnz:
   230 0000009F 89DE                    	mov si, bx		; -> prior handler with us as downlink
   231 000000A1 87FE                    	xchg di, si		; si -> ours, di -> prior
   232 000000A3 A7                      	cmpsw			; skip entrypoint jmp strict short
   233 000000A4 A4                      	movsb			; copy 0E8h/0E9h
   234 000000A5 AD                      	lodsw			; ax = near rel16 displacement
   235 000000A6 01F0                    	add ax, si		; add in our base (= absolute offset)
   236 000000A8 29F8                    	sub ax, di
   237 000000AA 48                      	dec ax
   238 000000AB 48                      	dec ax			; subtract new base (= relative displacement)
   239 000000AC AB                      	stosw			; store new rel16 displacement
   240 000000AD A5                      	movsw			; jmp strict short
   241 000000AE A5                      	movsw			; linkcall target
   242 000000AF A4                      	movsb			; trailer
   243                                  .done:
   244 000000B0 8026[1000]FE            reloc	clropt [code + eldiFlags], eldifResident
   245                                  internalcoderelocation -3	; mark block as free
   246 000000B5 BA[5702]                reloc	mov dx, msg.uninstall_done
   247                                  internaldatarelocation
   248                                  @@:
   249 000000B8 16                      	push ss
   250 000000B9 1F                      	pop ds
   251 000000BA E80309                  	extcallcall putsz
   252 000000BD E8F008                  	extcallcall cmd3	; return
   253                                  
   254                                  .error:
   255 000000C0 B8010E                  	mov ax, 0E01h
   256 000000C3 E80209                  	extcallcall setrc
   257 000000C6 BA[6C02]                reloc	mov dx, msg.uninstall_error
   258                                  internaldatarelocation
   259 000000C9 EBED                    	jmp @B
   260                                  
   261                                  
   262                                  get_es_ext:
   263 000000CB 8E06[0000]              reloc	mov es, word [relocateddata]
   264                                  linkdatarelocation extdssel
   265 000000CF E8FE08                  	extcallcall ispm
   266 000000D2 7404                    	jz @F
   267 000000D4 8E06[0000]              reloc	mov es, word [relocateddata]
   268                                  linkdatarelocation extseg
   269                                  @@:
   270 000000D8 C3                      	retn
   271                                  
   272                                  
   273                                  %if _OTHER
   274                                  get_es_ext_other:
   275                                  	getotherds
   276                                  reloc	mov es, word [relocateddata]
   277                                  otherlinkdatarelocation extdssel
   278                                  	extcallcall ispm
   279                                  	jz @F
   280                                  reloc	mov es, word [relocateddata]
   281                                  otherlinkdatarelocation extseg
   282                                  @@:
   283                                  	resetds
   284                                  	retn
   285                                  %else
   286                                   get_es_ext_other equ get_es_ext
   287                                  %endif
   288                                  
   289                                  
   290                                  run:
   291 000000D9 16                      	push ss
   292 000000DA 07                      	pop es
   293 000000DB C706[7808][8E06]        reloc2	mov word [separatormessage], msg.empty
   294                                  internaldatarelocation -4
   295                                  internaldatarelocation
   296 000000E1 AC                      	lodsb
   297 000000E2 E8F308                  	extcallcall iseol?
   298 000000E5 7503                    	jne @F
   299 000000E7 BE[2001]                reloc	mov si, msg.allexceptseg + 1
   300                                  internaldatarelocation
   301                                  @@:
   302 000000EA 4E                      	dec si			; -> keyword
   303                                  
   304 000000EB 31C0                    	xor ax, ax
   305 000000ED 50                      	push ax			; on stack = 0
   306                                  
   307                                  .loopouter:			; si -> next keyword
   308 000000EE AC                      	lodsb
   309 000000EF E8E608                  	extcallcall iseol?
   310 000000F2 7506                    	jne @F
   311                                  .continue:
   312 000000F4 5E                      	pop si			; get next string
   313 000000F5 85F6                    	test si, si		; any ?
   314 000000F7 75F5                    	jnz .loopouter		; yes -->
   315 000000F9 C3                      	retn			; done
   316                                  
   317                                  @@:
   318 000000FA 4E                      	dec si			; -> keyword
   319 000000FB 87F1                    	xchg si, cx
   320 000000FD BE[D800]                reloc	mov si, nountable
   321                                  internaldatarelocation
   322                                  .loop:
   323 00000100 AC                      	lodsb
   324 00000101 B400                    	mov ah, 0
   325 00000103 01F0                    	add ax, si
   326 00000105 39F0                    	cmp ax, si
   327 00000107 742A                    	je .notfound
   328 00000109 92                      	xchg dx, ax		; -> match string
   329 0000010A 87F1                    	xchg si, cx		; si -> keyword
   330 0000010C E89908                  	extcallcall isstring?
   331 0000010F 7406                    	je .got
   332 00000111 87F1                    	xchg si, cx		; si -> table
   333 00000113 AC                      	lodsb
   334 00000114 AD                      	lodsw			; skip
   335 00000115 EBE9                    	jmp .loop		; try to match next noun -->
   336                                  
   337                                  .got:
   338 00000117 E88608                  	extcallcall skipcomma
   339 0000011A 4E                      	dec si			; -> next keyword
   340 0000011B 56                      	push si			; stack next keyword
   341 0000011C 87F1                    	xchg si, cx		; si -> table
   342 0000011E AC                      	lodsb
   343 0000011F 3C01                    	cmp al, 1
   344 00000121 AD                      	lodsw			; ax -> next string or function
   345 00000122 740C                    	je .sublist
   346                                  .function:
   347 00000124 E85700                  	call .separator
   348 00000127 FFD0                    	call ax			; call code
   349 00000129 16                      	 push ss
   350 0000012A 07                      	 pop es
   351 0000012B 16                      	 push ss
   352 0000012C 1F                      	 pop ds
   353 0000012D 5E                      	pop si			; restore -> next keyword
   354 0000012E EBBE                    	jmp .loopouter		; continue noun loop -->
   355                                  
   356                                  .sublist:
   357 00000130 96                      	xchg si, ax		; si -> sub list
   358 00000131 EBBB                    	jmp .loopouter		; handle sub list --> (stack has continue offset)
   359                                  
   360                                  .notfound:
   361 00000133 E84800                  	call .separator
   362 00000136 B8430E                  	mov ax, 0E43h
   363 00000139 E88C08                  	extcallcall setrc
   364 0000013C BA[3B02]                reloc	mov dx, msg.notfound.1
   365                                  internaldatarelocation
   366 0000013F E87E08                  	extcallcall putsz
   367 00000142 87F1                    	xchg si, cx		; si -> keyword
   368 00000144 89F2                    	mov dx, si		; dx -> start of keyword
   369                                  @@:
   370 00000146 AC                      	lodsb
   371 00000147 E88E08                  	extcallcall iseol?	; EOL ?
   372 0000014A 741D                    	je @F
   373 0000014C 3C20                    	cmp al, 32		; blank ?
   374 0000014E 7419                    	je @F
   375 00000150 3C09                    	cmp al, 9
   376 00000152 7415                    	je @F
   377 00000154 3C2C                    	cmp al, ','		; comma ?
   378 00000156 75EE                    	jne @B
   379                                  		; We do not want to loop on trailing commas
   380                                  		;  indefinitely, so handle this in a special
   381                                  		;  way here. (Trailing comma after a valid
   382                                  		;  name will emit the not found message with
   383                                  		;  an empty name.)
   384 00000158 56                      	push si
   385 00000159 E88408                  	extcallcall skipwhite
   386 0000015C E87908                  	extcallcall iseol?	; EOL after comma ?
   387 0000015F 7507                    	jne .nottrailingcomma
   388 00000161 4E                      	dec si
   389 00000162 58                      	pop ax			; -> after keyword + 1
   390 00000163 48                      	dec ax			; -> after keyword
   391 00000164 89C1                    	mov cx, ax		; -> after keyword
   392 00000166 EB04                    	jmp @FF
   393                                  
   394                                  .nottrailingcomma:
   395 00000168 5E                      	pop si
   396                                  @@:
   397 00000169 4E                      	dec si			; -> after keyword
   398 0000016A 89F1                    	mov cx, si		; -> after keyword
   399                                  @@:
   400 0000016C 29D1                    	sub cx, dx		; cx = length of keyword
   401 0000016E E87708                  	extcallcall puts
   402 00000171 BA[4202]                reloc	mov dx, msg.notfound.2
   403                                  internaldatarelocation
   404 00000174 E84908                  	extcallcall putsz
   405 00000177 E82608                  	extcallcall skipcomma	; skip comma (except trailing comma)
   406 0000017A 4E                      	dec si			; -> next keyword
   407 0000017B E970FF                  	jmp .loopouter
   408                                  
   409                                  .separator:
   410 0000017E BA[8C06]                reloc	mov dx, msg.linebreak
   411                                  internaldatarelocation
   412 00000181 8716[7808]              reloc	xchg dx, word [separatormessage]
   413                                  internaldatarelocation
   414 00000185 E83808                  	extcallcall putsz
   415 00000188 C3                      	retn
   416                                  
   417                                  
   418                                  display_seg:
   419 00000189 E83E01                  	call sort_mem
   420                                  
   421 0000018C BE[8008]                reloc	mov si, table_sorted
   422                                  internaldatarelocation
   423 0000018F BF[0000]                reloc	mov di, relocateddata
   424                                  linkdatarelocation line_out
   425                                  .loop1:
   426 00000192 AD                      	lodsw
   427 00000193 85C0                    	test ax, ax
   428 00000195 7435                    	jz .done1
   429                                  
   430 00000197 56                      	push si
   431 00000198 96                      	xchg si, ax
   432 00000199 E81E00                  	call .get_name
   433 0000019C 91                      	xchg ax, cx
   434 0000019D 3C04                    	cmp al, 4
   435 0000019F 730B                    	jae @F
   436 000001A1 E84C08                  	extcallcall copy_single_counted_string
   437 000001A4 91                      	xchg ax, cx
   438 000001A5 F7D9                    	neg cx
   439 000001A7 83C104                  	add cx, 4
   440 000001AA EB03                    	jmp @FF
   441                                  @@:
   442 000001AC E84108                  	extcallcall copy_single_counted_string
   443                                  @@:
   444 000001AF 41                      	inc cx
   445 000001B0 B020                    	mov al, 32
   446 000001B2 F3AA                    	rep stosb
   447 000001B4 5E                      	pop si
   448 000001B5 83C608                  	add si, 8
   449 000001B8 EBD8                    	jmp .loop1
   450                                  
   451                                  .get_name:
   452 000001BA 56                      	push si
   453 000001BB 31C9                    	xor cx, cx
   454 000001BD 8A0C                    	mov cl, [si]
   455 000001BF 01CE                    	add si, cx
   456 000001C1 46                      	inc si
   457 000001C2 8A0C                    	mov cl, [si]
   458 000001C4 E302                    	jcxz @F
   459 000001C6 5A                      	pop dx
   460 000001C7 C3                      	retn
   461                                  @@:
   462 000001C8 5E                      	pop si
   463 000001C9 8A0C                    	mov cl, [si]
   464 000001CB C3                      	retn
   465                                  
   466                                  .done1:
   467 000001CC E82908                  	extcallcall trimputs
   468                                  
   469 000001CF BE[8008]                reloc	mov si, table_sorted
   470                                  internaldatarelocation
   471 000001D2 BF[0000]                reloc	mov di, relocateddata
   472                                  linkdatarelocation line_out
   473                                  .loop2:
   474 000001D5 AD                      	lodsw
   475 000001D6 85C0                    	test ax, ax
   476 000001D8 741B                    	jz .done2
   477 000001DA 56                      	push si
   478 000001DB 50                      	push ax
   479 000001DC AD                      	lodsw
   480 000001DD AD                      	lodsw
   481                                  
   482 000001DE E81F08                  	extcallcall hexword
   483 000001E1 5E                      	pop si
   484 000001E2 E8D5FF                  	call .get_name
   485 000001E5 80E903                  	sub cl, 3
   486 000001E8 7501                    	jnz @F
   487 000001EA 41                      	inc cx
   488                                  @@:
   489 000001EB B020                    	mov al, 32
   490 000001ED F3AA                    	rep stosb
   491 000001EF 5E                      	pop si
   492 000001F0 83C608                  	add si, 8
   493 000001F3 EBE0                    	jmp .loop2
   494                                  
   495                                  .done2:
   496 000001F5 E80008                  	extcallcall trimputs
   497                                  
   498 000001F8 E8D507                  	extcallcall ispm
   499 000001FB 753B                    	jnz .end
   500                                  
   501 000001FD BE[8008]                reloc	mov si, table_sorted
   502                                  internaldatarelocation
   503 00000200 BF[0000]                reloc	mov di, relocateddata
   504                                  linkdatarelocation line_out
   505                                  .loop3:
   506 00000203 AD                      	lodsw
   507 00000204 85C0                    	test ax, ax
   508 00000206 742D                    	jz .done3
   509 00000208 93                      	xchg bx, ax
   510 00000209 83C606                  	add si, 6
   511 0000020C AD                      	lodsw
   512 0000020D 85C0                    	test ax, ax
   513 0000020F 750A                    	jnz @F
   514 00000211 B86E6F                  	mov ax, "no"
   515 00000214 AB                      	stosw
   516 00000215 B86E65                  	mov ax, "ne"
   517 00000218 AB                      	stosw
   518 00000219 EB07                    	jmp @FF
   519                                  @@:
   520 0000021B 93                      	xchg bx, ax
   521                                  	getotherds
   522 0000021C 8B1F                    	mov bx, [bx]
   523                                  	resetds
   524 0000021E 93                      	xchg bx, ax
   525                                  
   526 0000021F E8DE07                  	extcallcall hexword
   527                                  @@:
   528 00000222 56                      	push si
   529 00000223 89DE                    	mov si, bx
   530 00000225 E892FF                  	call .get_name
   531 00000228 5E                      	pop si
   532 00000229 80E903                  	sub cl, 3
   533 0000022C 7501                    	jnz @F
   534 0000022E 41                      	inc cx
   535                                  @@:
   536 0000022F B020                    	mov al, 32
   537 00000231 F3AA                    	rep stosb
   538 00000233 EBCE                    	jmp .loop3
   539                                  
   540                                  .done3:
   541 00000235 E8C007                  	extcallcall trimputs
   542                                  
   543                                  .end:
   544 00000238 E81A02                  	call display_data_sel
   545 0000023B C3                      	retn
   546                                  
   547                                  
   548                                  display_patchareas:
   549 0000023C BE[C000]                reloc	mov si, store_table
   550                                  internaldatarelocation
   551                                  
   552                                  .loop:
   553 0000023F AD                      	lodsw
   554 00000240 97                      	xchg di, ax		; di = offset -> patch area
   555 00000241 AD                      	lodsw
   556 00000242 93                      	xchg bx, ax		; bx -> word [segment] => patch area
   557 00000243 AD                      	lodsw
   558 00000244 91                      	xchg cx, ax		; cx = length
   559 00000245 AD                      	lodsw			; ax -> name message
   560 00000246 50                      	push ax			; name
   561 00000247 E367                    	jcxz .none		; zero length means not supported -->
   562 00000249 85DB                    	test bx, bx
   563 0000024B 7463                    	jz .none		; zero offset of segment is invalid -->
   564                                  	; test di, di		; (could be valid)
   565                                  	; jz .none
   566                                  
   567                                  	houdini
   568                                  
   569 0000024D BA[E507]                reloc	mov dx, msg.patch_area.1
   570                                  internaldatarelocation
   571 00000250 E86D07                  	extcallcall putsz	; header
   572 00000253 57                      	push di			; preserve -> patch area
   573 00000254 51                      	 push cx
   574 00000255 91                      	xchg ax, cx		; ax = length
   575 00000256 BF[0000]                reloc	mov di, relocateddata
   576                                  linkdatarelocation line_out
   577 00000259 E8AC07                  	extcallcall decword	; write length
   578 0000025C 53                      	 push bx
   579 0000025D E8B007                  	extcallcall putsline
   580 00000260 5B                      	 pop bx			; preserve segment variable offset
   581 00000261 59                      	 pop cx			; preserve length
   582 00000262 5F                      	pop di
   583                                  	getotherds
   584 00000263 8B17                    	mov dx, word [bx]	; => segment of patch area
   585                                  	resetds
   586 00000265 89D5                    	mov bp, dx		; preserve segment
   587 00000267 E8AE07                  	extcallcall setes2dx	; es => patch area
   588 0000026A BA[0508]                reloc	mov dx, msg.patch_area.2.notinuse
   589                                  internaldatarelocation
   590 0000026D 57                      	push di
   591 0000026E B090                    	mov al, 90h		; check if all NOPs, meaning not in use
   592 00000270 F3AE                    	repe scasb		; check
   593 00000272 7403                    	je @F			; if not in use -->
   594 00000274 BA[F907]                reloc	mov dx, msg.patch_area.2.inuse
   595                                  internaldatarelocation		; indicate in use
   596                                  @@:
   597 00000277 16                      	 push ss
   598 00000278 07                      	 pop es
   599 00000279 E84407                  	extcallcall putsz
   600 0000027C BA[0F08]                reloc	mov dx, msg.patch_area.3.entry
   601                                  internaldatarelocation
   602 0000027F 81FB[0000]              reloc	cmp bx, strict word relocateddata
   603                                  linkdatarelocation pspdbg	; is entry segment ?
   604 00000283 7413                    	je @F
   605 00000285 BA[1508]                reloc	mov dx, msg.patch_area.3.code
   606                                  internaldatarelocation
   607 00000288 81FB[0000]              reloc	cmp bx, strict word relocateddata
   608                                  linkdatarelocation code_seg	; is code segment ?
   609 0000028C 740A                    	je @F
   610 0000028E BA[1A08]                reloc	mov dx, msg.patch_area.3.unknown
   611                                  internaldatarelocation
   612 00000291 BF[2208]                reloc	mov di, msg.patch_area.3.unknown.s
   613                                  internaldatarelocation
   614 00000294 95                      	xchg ax, bp		; ax = segment value
   615 00000295 E86807                  	extcallcall hexword
   616                                  @@:
   617 00000298 E82507                  	extcallcall putsz
   618 0000029B BA[2808]                reloc	mov dx, msg.patch_area.3.offset
   619                                  internaldatarelocation
   620 0000029E BF[2908]                reloc	mov di, msg.patch_area.3.offset.o
   621                                  internaldatarelocation
   622 000002A1 58                      	pop ax
   623 000002A2 E85B07                  	extcallcall hexword
   624 000002A5 E81807                  	extcallcall putsz
   625 000002A8 BA[3108]                reloc	mov dx, msg.patch_area.4
   626                                  internaldatarelocation
   627 000002AB E81207                  	extcallcall putsz
   628 000002AE EB06                    	jmp .next
   629                                  
   630                                  .none:
   631 000002B0 BA[3808]                reloc	mov dx, msg.patch_area.5
   632                                  internaldatarelocation
   633 000002B3 E80A07                  	extcallcall putsz
   634                                  
   635                                  .next:
   636 000002B6 5A                      	pop dx
   637 000002B7 E80607                  	extcallcall putsz
   638                                  
   639 000002BA BA[8C06]                reloc	mov dx, msg.linebreak
   640                                  internaldatarelocation
   641 000002BD E80007                  	extcallcall putsz
   642                                  
   643 000002C0 81FE[D800]              reloc	cmp si, strict word store_table.end
   644                                  internaldatarelocation
   645 000002C4 7303E976FF              	jb .loop
   646 000002C9 C3                      	retn
   647                                  
   648                                  
   649                                  sort_mem:
   650 000002CA BE[0000]                reloc	mov si, table
   651                                  internaldatarelocation
   652 000002CD BA[8008]                reloc	mov dx, table_sorted
   653                                  internaldatarelocation
   654                                  
   655                                  loopprepare:
   656 000002D0 AD                      	lodsw
   657 000002D1 85C0                    	test ax, ax
   658 000002D3 7452                    	jz .done
   659 000002D5 AD                      	lodsw
   660 000002D6 85C0                    	test ax, ax
   661 000002D8 7505                    	jnz @F
   662                                  .segzero:
   663 000002DA 83C606                  	add si, 6
   664 000002DD EB46                    	jmp .next
   665                                  
   666                                  @@:
   667 000002DF 93                      	xchg bx, ax
   668                                  	getotherds
   669 000002E0 8B07                    	mov ax, [bx]
   670                                  	resetds
   671 000002E2 85C0                    	test ax, ax
   672 000002E4 74F4                    	jz .segzero
   673 000002E6 BF[8408]                reloc	mov di, table_sorted + 4
   674                                  internaldatarelocation
   675                                  @@:
   676 000002E9 39D7                    	cmp di, dx
   677 000002EB 7308                    	jae .insert_at_di_minus_4
   678 000002ED AF                      	scasw
   679 000002EE 7206                    	jb .insert_at_di_minus_6
   680 000002F0 83C708                  	add di, 8
   681 000002F3 EBF4                    	jmp @B
   682                                  
   683                                  .insert_at_di_minus_4:
   684 000002F5 AF                      	scasw
   685                                  .insert_at_di_minus_6:
   686 000002F6 83EF06                  	sub di, 6
   687                                  .insert_at_di:
   688 000002F9 89D1                    	mov cx, dx
   689 000002FB 29F9                    	sub cx, di
   690 000002FD 56                      	push si
   691 000002FE 57                      	push di
   692 000002FF 89D7                    	mov di, dx		; -> end
   693 00000301 83C70A                  	add di, 10		; -> after destination
   694 00000304 89FA                    	mov dx, di		; update -> end
   695 00000306 FD                      	std			; AMD erratum 109 workaround
   696 00000307 AF                      	scasw			; -> last word destination
   697 00000308 8D75F6                  	lea si, [di - 10]	; -> last word source (dx - 2)
   698 0000030B D1E9                    	shr cx, 1		; = amount of words
   699 0000030D E308                    	jcxz @FF
   700 0000030F 83F914                  	cmp cx, 20
   701 00000312 7703                    	ja @FF
   702                                  @@:
   703 00000314 A5                      	movsw
   704 00000315 E2FD                    	loop @B
   705                                  @@:
   706 00000317 F3A5                    	rep movsw		; move up all following entries
   707 00000319 FC                      	cld
   708 0000031A 5F                      	pop di
   709 0000031B 5E                      	pop si
   710 0000031C 83EE04                  	sub si, 4
   711 0000031F A5                      	movsw			; copy message offset
   712 00000320 A5                      	movsw			; copy seg offset
   713 00000321 AB                      	stosw			; store seg value
   714 00000322 AD                      	lodsw			; skip this field
   715 00000323 A5                      	movsw			; copy size offset
   716 00000324 A5                      	movsw			; copy sel offset
   717                                  .next:
   718 00000325 EBA9                    	jmp loopprepare
   719                                  
   720                                  .done:
   721 00000327 87D7                    	xchg dx, di
   722 00000329 31C0                    	xor ax, ax
   723 0000032B AB                      	stosw			; terminator
   724 0000032C C3                      	retn
   725                                  
   726                                  
   727                                  display_mem:
   728 0000032D E89AFF                  	call sort_mem
   729                                  
   730 00000330 BB[0000]                reloc	mov bx, relocateddata
   731                                  otherlinkdatarelocation alloc_seg, -2, optional
   732 00000333 89DA                    	mov dx, bx
   733 00000335 85DB                    	test bx, bx
   734 00000337 7402                    	jz @F
   735                                  	getotherds
   736 00000339 8B17                    	mov dx, [bx]
   737                                  	resetds
   738                                  @@:
   739                                  
   740 0000033B BE[8008]                reloc	mov si, table_sorted
   741                                  internaldatarelocation
   742                                  loop:
   743 0000033E BF[0000]                reloc	mov di, relocateddata
   744                                  linkdatarelocation line_out
   745 00000341 AD                      	lodsw
   746 00000342 85C0                    	test ax, ax
   747 00000344 7503E9BB00              	jz .done
   748 00000349 56                      	push si
   749 0000034A 50                      	push ax
   750 0000034B AD                      	lodsw
   751 0000034C 85D2                    	test dx, dx
   752 0000034E 741A                    	jz .nogap
   753 00000350 85C0                    	test ax, ax
   754 00000352 7416                    	jz .nogap
   755 00000354 93                      	xchg bx, ax
   756                                  	getotherds
   757 00000355 8B07                    	mov ax, [bx]
   758                                  	resetds
   759 00000357 39C2                    	cmp dx, ax
   760 00000359 740F                    	je .nogap
   761 0000035B 720A                    	jb .gap
   762 0000035D 52                      	push dx
   763 0000035E BA[C903]                reloc	mov dx, msg.overlap
   764                                  internaldatarelocation
   765 00000361 E85C06                  	extcallcall putsz
   766 00000364 5A                      	pop dx
   767 00000365 EB03                    	jmp .nogap
   768                                  .gap:
   769 00000367 E81306                  	call gap
   770                                  .nogap:
   771 0000036A 5E                      	pop si
   772 0000036B E88206                  	extcallcall copy_single_counted_string
   773 0000036E BE[FA02]                reloc	mov si, msg.segment_colon
   774                                  internaldatarelocation
   775 00000371 E87C06                  	extcallcall copy_single_counted_string
   776 00000374 5E                      	pop si
   777 00000375 AD                      	lodsw
   778 00000376 85C0                    	test ax, ax
   779 00000378 750F                    	jnz @F
   780 0000037A 83C606                  	add si, 6
   781 0000037D 56                      	push si
   782 0000037E BE[0503]                reloc	mov si, msg.none
   783                                  internaldatarelocation
   784                                  .next_string:
   785 00000381 E86C06                  	extcallcall copy_single_counted_string
   786 00000384 31D2                    	xor dx, dx
   787 00000386 5E                      	pop si
   788 00000387 EB73                    	jmp .next
   789                                  
   790                                  @@:
   791 00000389 93                      	xchg bx, ax
   792 0000038A B9[1A00]                reloc	mov cx, relocateddata + 26
   793                                  linkdatarelocation line_out
   794 0000038D 29F9                    	sub cx, di
   795 0000038F 7604                    	jbe @F
   796 00000391 B020                    	mov al, 32
   797 00000393 F3AA                    	rep stosb
   798                                  @@:
   799                                  	getotherds
   800 00000395 8B07                    	mov ax, [bx]
   801                                  	resetds
   802 00000397 89C2                    	mov dx, ax
   803 00000399 E86406                  	extcallcall hexword
   804 0000039C 56                      	push si
   805 0000039D BE[4103]                reloc	mov si, msg.address.1
   806                                  internaldatarelocation
   807 000003A0 E84D06                  	extcallcall copy_single_counted_string
   808 000003A3 5E                      	pop si
   809 000003A4 AD                      	lodsw
   810 000003A5 AD                      	lodsw
   811 000003A6 85C0                    	test ax, ax
   812 000003A8 750C                    	jnz @F
   813 000003AA AD                      	lodsw
   814 000003AB 56                      	push si
   815 000003AC BE[2803]                reloc	mov si, msg.nonesize
   816                                  internaldatarelocation
   817 000003AF 31D2                    	xor dx, dx
   818 000003B1 E83C06                  	extcallcall copy_single_counted_string
   819 000003B4 EB30                    	jmp .next_sel
   820                                  
   821                                  @@:
   822 000003B6 52                      	push dx
   823 000003B7 56                      	push si
   824 000003B8 BE[4403]                reloc	mov si, msg.size.1
   825                                  internaldatarelocation
   826 000003BB E83206                  	extcallcall copy_single_counted_string
   827 000003BE 93                      	xchg bx, ax
   828                                  	getotherds
   829 000003BF 8B07                    	mov ax, [bx]
   830                                  	resetds
   831 000003C1 E83C06                  	extcallcall hexword
   832 000003C4 BE[4C03]                reloc	mov si, msg.size.2
   833                                  internaldatarelocation
   834 000003C7 E82606                  	extcallcall copy_single_counted_string
   835 000003CA 31D2                    	xor dx, dx
   836 000003CC B90100                  	mov cx, 1
   837 000003CF BB0900                  	mov bx, 9
   838 000003D2 E84B06                  	extcallcall disp_dxax_times_cx_width_bx_size.store
   839 000003D5 5E                      	pop si
   840 000003D6 5A                      	pop dx
   841 000003D7 83C00F                  	add ax, 15
   842 000003DA D1E8                    	shr ax, 1
   843 000003DC D1E8                    	shr ax, 1
   844 000003DE D1E8                    	shr ax, 1
   845 000003E0 D1E8                    	shr ax, 1
   846 000003E2 01C2                    	add dx, ax
   847 000003E4 AD                      	lodsw
   848 000003E5 56                      	push si
   849                                  .next_sel:
   850 000003E6 E8E705                  	extcallcall ispm
   851 000003E9 7510                    	jnz @F
   852 000003EB 85C0                    	test ax, ax
   853 000003ED 740C                    	jz @F
   854 000003EF 93                      	xchg bx, ax
   855                                  	getotherds
   856 000003F0 8B07                    	mov ax, [bx]
   857                                  	resetds
   858 000003F2 BE[4F03]                reloc	mov si, msg.sel
   859                                  internaldatarelocation
   860 000003F5 E8F805                  	extcallcall copy_single_counted_string
   861 000003F8 E80506                  	extcallcall hexword
   862                                  
   863                                  @@:
   864 000003FB 5E                      	pop si
   865                                  
   866                                  .next:
   867 000003FC 52                      	push dx
   868 000003FD E82806                  	extcallcall putsline_crlf
   869 00000400 5A                      	pop dx
   870 00000401 E93AFF                  	jmp loop
   871                                  
   872                                  .done:
   873                                  loop_done:
   874                                  
   875 00000404 BB[0000]                reloc	mov bx, relocateddata
   876                                  otherlinkdatarelocation alloc_seg, -2, optional
   877 00000407 85DB                    	test bx, bx
   878 00000409 7416                    	jz .nogap
   879                                  	getotherds
   880 0000040B 8B07                    	mov ax, [bx]
   881 0000040D BB[0000]                reloc	mov bx, relocateddata
   882                                  otherlinkdatarelocation alloc_size, -2, optional
   883 00000410 85DB                    	test bx, bx
   884 00000412 740D                    	jz .nogap
   885 00000414 0307                    	add ax, [bx]
   886                                  	resetds
   887 00000416 85D2                    	test dx, dx
   888 00000418 7407                    	jz .nogap
   889 0000041A 39C2                    	cmp dx, ax
   890 0000041C 7303                    	jae .nogap
   891 0000041E E85C05                  	call gap
   892                                  .nogap:
   893                                  	resetds
   894                                  
   895                                  
   896                                  display_alloc:
   897 00000421 BA[9303]                reloc	mov dx, msg.alloc
   898                                  internaldatarelocation
   899 00000424 E89905                  	extcallcall putsz
   900                                  
   901 00000427 BB[0000]                reloc	mov bx, relocateddata
   902                                  otherlinkdatarelocation alloc_seg, -2, optional
   903 0000042A 85DB                    	test bx, bx
   904 0000042C 7508                    	jnz @F
   905 0000042E BE[0503]                reloc	mov si, msg.none
   906                                  internaldatarelocation
   907                                  .eol_string:
   908 00000431 E8BC05                  	extcallcall copy_single_counted_string
   909 00000434 EB1C                    	jmp .eol
   910                                  
   911                                  @@:
   912                                  	getotherds
   913 00000436 8B07                    	mov ax, [bx]
   914                                  	resetds
   915 00000438 E8C505                  	extcallcall hexword
   916 0000043B BE[4103]                reloc	mov si, msg.address.1
   917                                  internaldatarelocation
   918 0000043E E8AF05                  	extcallcall copy_single_counted_string
   919                                  
   920 00000441 BB[0000]                reloc	mov bx, relocateddata
   921                                  otherlinkdatarelocation alloc_size, -2, optional
   922 00000444 85DB                    	test bx, bx
   923 00000446 7505                    	jnz @F
   924 00000448 BE[2803]                reloc	mov si, msg.nonesize
   925                                  internaldatarelocation
   926 0000044B EBE4                    	jmp .eol_string
   927                                  
   928                                  @@:
   929                                  	getotherds
   930 0000044D 8B07                    	mov ax, [bx]
   931                                  	resetds
   932 0000044F E8FD04                  	call parasize
   933                                  .eol:
   934 00000452 E8D305                  	extcallcall putsline_crlf
   935                                  
   936                                  
   937                                  display_data_sel:
   938 00000455 E87805                  	extcallcall ispm
   939 00000458 7539                    	jnz .end
   940                                  
   941 0000045A BF[0000]                reloc	mov di, relocateddata
   942                                  linkdatarelocation line_out
   943 0000045D B90200                  	mov cx, 2
   944                                  @@:
   945 00000460 BB[0000]                reloc	mov bx, relocateddata
   946                                  otherlinkdatarelocation dssel, -2, optional
   947 00000463 80F902                  	cmp cl, 2
   948 00000466 7403                    	je .dssel
   949 00000468 BB[0000]                reloc	mov bx, relocateddata
   950                                  otherlinkdatarelocation extdssel, -2, optional
   951                                  .dssel:
   952 0000046B 85DB                    	test bx, bx
   953 0000046D 7419                    	jz .next
   954                                  	getotherds
   955 0000046F 8B07                    	mov ax, [bx]
   956                                  	resetds
   957 00000471 BE[5C03]                reloc	mov si, msg.dssel
   958                                  internaldatarelocation
   959 00000474 80F902                  	cmp cl, 2
   960 00000477 7403                    	je .msgdssel
   961 00000479 BE[7203]                reloc	mov si, msg.extdssel
   962                                  internaldatarelocation
   963                                  .msgdssel:
   964 0000047C 51                      	push cx
   965 0000047D E87005                  	extcallcall copy_single_counted_string
   966 00000480 59                      	pop cx
   967 00000481 E87C05                  	extcallcall hexword
   968 00000484 B82020                  	mov ax, 2020h
   969 00000487 AB                      	stosw
   970                                  .next:
   971 00000488 E2D6                    	loop @B
   972 0000048A 81FF[0000]              reloc	cmp di, strict word relocateddata
   973                                  linkdatarelocation line_out
   974 0000048E 7403                    	je .end
   975 00000490 E86505                  	extcallcall trimputs
   976                                  
   977                                  .end:
   978 00000493 C3                      	retn
   979                                  
   980                                  
   981                                  historysize:
   982                                  	lframe none
   983 00000494 5589E5                  	lenter
   984 00000497 C606[1A01]00            reloc	mov byte [history_data_entry], 0
   985                                  internaldatarelocation -3
   986 0000049C B8[0000]                reloc	mov ax, relocateddata
   987                                  otherlinkdatarelocation historyformat, -2, optional
   988 0000049F 85C0                    	test ax, ax
   989 000004A1 7509                    	jnz @F
   990 000004A3 BA[D403]                reloc	mov dx, msg.history_none
   991                                  internaldatarelocation
   992                                  .putsz_end:
   993 000004A6 E81705                  	extcallcall putsz
   994 000004A9 E9B400                  	jmp .end
   995                                  
   996                                  @@:
   997 000004AC BA[F403]                reloc	mov dx, msg.history_data_entry
   998                                  internaldatarelocation
   999                                  	; houdini
  1000                                  @@:
  1001 000004AF 83F802                  	cmp ax, 2
  1002 000004B2 720A                    	jb .in_data_entry
  1003 000004B4 BA[1504]                reloc	mov dx, msg.history_separate
  1004                                  internaldatarelocation
  1005 000004B7 7409                    	je .in_separate
  1006                                  
  1007                                  %if 0
  1008                                  reloc	mov di, relocateddata
  1009                                  linkdatarelocation line_out
  1010                                  	extcallcall hexword
  1011                                  	mov al, 32
  1012                                  	stosb
  1013                                  reloc	mov si, @B
  1014                                  internalcoderelocation
  1015                                  	mov cx, 16
  1016                                  @@:
  1017                                  	cs lodsb
  1018                                  	extcallcall hexbyte
  1019                                  	mov al, 32
  1020                                  	stosb
  1021                                  	loop @B
  1022                                  	extcallcall trimputs
  1023                                  %endif
  1024                                  
  1025 000004B9 BA[3604]                reloc	mov dx, msg.history_unknown
  1026                                  internaldatarelocation
  1027 000004BC EBE8                    	jmp .putsz_end
  1028                                  
  1029                                  .in_data_entry:
  1030 000004BE F616[1A01]              reloc	not byte [history_data_entry]
  1031                                  internaldatarelocation
  1032                                  .in_separate:
  1033 000004C2 E8FB04                  	extcallcall putsz
  1034 000004C5 BB[0000]                reloc	mov bx, relocateddata
  1035                                  otherlinkdatarelocation history.last, -2, optional
  1036 000004C8 BA[0000]                reloc	mov dx, relocateddata
  1037                                  otherlinkdatarelocation history.first, -2, optional
  1038 000004CB 85DB                    	test bx, bx
  1039 000004CD 7404                    	jz @F
  1040 000004CF 85D2                    	test dx, dx
  1041 000004D1 7505                    	jnz @FF
  1042                                  
  1043                                  @@:
  1044                                  .missing:
  1045                                  	resetds
  1046 000004D3 BA[5004]                reloc	mov dx, msg.history_missing
  1047                                  internaldatarelocation
  1048 000004D6 EBCE                    	jmp .putsz_end
  1049                                  
  1050                                  @@:
  1051 000004D8 BF[0000]                reloc	mov di, relocateddata
  1052                                  linkdatarelocation line_out
  1053 000004DB BE[8904]                reloc	mov si, msg.history.1
  1054                                  internaldatarelocation
  1055 000004DE E80F05                  	extcallcall copy_single_counted_string
  1056                                  	getotherds
  1057 000004E1 87D3                    	xchg dx, bx
  1058 000004E3 8B07                    	mov ax, [bx]
  1059 000004E5 87D3                    	xchg dx, bx
  1060 000004E7 2B07                    	sub ax, [bx]
  1061                                  	resetds
  1062 000004E9 D1E8                    	shr ax, 1
  1063 000004EB E81A05                  	extcallcall decword
  1064 000004EE 50                      	push ax
  1065 000004EF BE[9B04]                reloc	mov si, msg.history.2
  1066                                  internaldatarelocation
  1067 000004F2 E8FB04                  	extcallcall copy_single_counted_string
  1068                                  	getotherds
  1069 000004F5 8B1F                    	mov bx, [bx]
  1070                                  	resetds
  1071 000004F7 D006[1A01]              reloc	rol byte [history_data_entry], 1
  1072                                  internaldatarelocation
  1073                                  	getotherds
  1074 000004FB 720B                    	jc .not_seg
  1075 000004FD 53                      	push bx
  1076 000004FE BB[0000]                reloc	mov bx, relocateddata
  1077                                  otherlinkdatarelocation history.segorsel, -2, optional
  1078 00000501 85DB                    	test bx, bx
  1079 00000503 74CE                    	jz .missing
  1080 00000505 8E1F                    	mov ds, word [bx]
  1081 00000507 5B                      	pop bx
  1082                                  .not_seg:
  1083 00000508 8B07                    	mov ax, [bx]
  1084 0000050A 16                      	 push ss
  1085 0000050B 1F                      	 pop ds
  1086 0000050C 59                      	pop cx
  1087 0000050D 01C8                    	add ax, cx
  1088 0000050F 01C8                    	add ax, cx
  1089 00000511 51                      	push cx
  1090 00000512 40                      	inc ax
  1091 00000513 40                      	inc ax
  1092 00000514 E8F104                  	extcallcall decword
  1093 00000517 50                      	push ax
  1094 00000518 BE[AD04]                reloc	mov si, msg.history.3
  1095                                  internaldatarelocation
  1096 0000051B E8D204                  	extcallcall copy_single_counted_string
  1097 0000051E 89D3                    	mov bx, dx
  1098                                  	getotherds
  1099 00000520 8B07                    	mov ax, [bx]
  1100                                  	resetds
  1101 00000522 D006[1A01]              reloc	rol byte [history_data_entry], 1
  1102                                  internaldatarelocation
  1103 00000526 730B                    	jnc .not_entry
  1104 00000528 53                      	push bx
  1105 00000529 BB[0000]                reloc	mov bx, relocateddata
  1106                                  otherlinkdatarelocation historybuffer, -2, optional
  1107 0000052C 85DB                    	test bx, bx
  1108 0000052E 74A3                    	jz .missing
  1109 00000530 29D8                    	sub ax, bx
  1110 00000532 5B                      	pop bx
  1111                                  .not_entry:
  1112 00000533 40                      	inc ax
  1113 00000534 40                      	inc ax
  1114 00000535 E8D004                  	extcallcall decword
  1115 00000538 58                      	pop ax
  1116 00000539 5A                      	pop dx
  1117 0000053A 85D2                    	test dx, dx
  1118 0000053C 7505                    	jnz @F
  1119                                  
  1120 0000053E BE[E804]                reloc	mov si, msg.history.average.none
  1121                                  internaldatarelocation
  1122 00000541 EB17                    	jmp .string_end
  1123                                  
  1124                                  @@:
  1125 00000543 BE[B604]                reloc	mov si, msg.history.average.1
  1126                                  internaldatarelocation
  1127 00000546 E8A704                  	extcallcall copy_single_counted_string
  1128                                  
  1129 00000549 31C9                    	xor cx, cx
  1130 0000054B 87CA                    	xchg cx, dx
  1131 0000054D F7F1                    	div cx
  1132 0000054F 85D2                    	test dx, dx
  1133 00000551 7401                    	jz @F
  1134 00000553 40                      	inc ax
  1135                                  @@:
  1136 00000554 E8B104                  	extcallcall decword
  1137 00000557 BE[E004]                reloc	mov si, msg.history.average.2
  1138                                  internaldatarelocation
  1139                                  .string_end:
  1140 0000055A E89304                  	extcallcall copy_single_counted_string
  1141 0000055D E8C804                  	extcallcall putsline_crlf
  1142                                  .end:
  1143 00000560 89EC5D                  	lleave , forcerestoresp
  1144 00000563 C3                      	retn
  1145                                  
  1146                                  
  1147                                  stacksize:
  1148 00000564 BF[0000]                reloc	mov di, relocateddata
  1149                                  linkdatarelocation line_out
  1150 00000567 BB[0000]                reloc	mov bx, relocateddata
  1151                                  otherlinkdatarelocation stack, -2, optional
  1152 0000056A BA[0000]                reloc	mov dx, relocateddata
  1153                                  otherlinkdatarelocation stack_end, -2, optional
  1154 0000056D 85DB                    	test bx, bx
  1155 0000056F 7404                    	jz @F
  1156 00000571 85D2                    	test dx, dx
  1157 00000573 7505                    	jnz @FF
  1158                                  @@:
  1159 00000575 BE[1E05]                reloc	mov si, msg.stack.none
  1160                                  internaldatarelocation
  1161 00000578 EB31                    	jmp .string_end
  1162                                  
  1163                                  @@:
  1164 0000057A BE[3505]                reloc	mov si, msg.stack.1
  1165                                  internaldatarelocation
  1166 0000057D E87004                  	extcallcall copy_single_counted_string
  1167 00000580 89D0                    	mov ax, dx
  1168 00000582 29D8                    	sub ax, bx
  1169 00000584 E88104                  	extcallcall decword
  1170 00000587 BE[4205]                reloc	mov si, msg.stack.2
  1171                                  internaldatarelocation
  1172 0000058A E86304                  	extcallcall copy_single_counted_string
  1173                                  	getotherds
  1174 0000058D 8A07                    	mov al, [bx]
  1175                                  	resetds
  1176 0000058F E89E04                  	extcallcall hexbyte
  1177 00000592 BE[6105]                reloc	mov si, msg.stack.3
  1178                                  internaldatarelocation
  1179 00000595 E85804                  	extcallcall copy_single_counted_string
  1180 00000598 87FB                    	xchg di, bx
  1181                                  	getotheres
  1182 0000059A B9FFFF                  	mov cx, -1
  1183 0000059D F3AE                    	repe scasb
  1184                                  	resetes
  1185 0000059F F7D1                    	not cx
  1186 000005A1 49                      	dec cx
  1187 000005A2 91                      	xchg ax, cx
  1188 000005A3 87FB                    	xchg di, bx
  1189 000005A5 E86004                  	extcallcall decword
  1190 000005A8 BE[7D05]                reloc	mov si, msg.stack.4
  1191                                  internaldatarelocation
  1192                                  
  1193                                  .string_end:
  1194 000005AB E84204                  	extcallcall copy_single_counted_string
  1195 000005AE E85F04                  	extcallcall putsline
  1196 000005B1 C3                      	retn
  1197                                  
  1198                                  
  1199                                  display_eld_memory:
  1200 000005B2 BA[8605]                reloc	mov dx, msg.eld.1
  1201                                  internaldatarelocation
  1202 000005B5 E80804                  	extcallcall putsz
  1203                                  
  1204 000005B8 31C0                    	xor ax, ax
  1205                                  .loop:
  1206 000005BA BF[0000]                reloc	mov di, relocateddata
  1207                                  linkdatarelocation line_out
  1208                                  	getotherds
  1209 000005BD 3906[0000]              reloc	cmp word [relocateddata], ax
  1210                                  otherlinkdatarelocation extseg_used
  1211 000005C1 7719                    	ja @F
  1212                                  
  1213 000005C3 31ED                    	xor bp, bp
  1214 000005C5 8B16[0000]              reloc	mov dx, word [relocateddata]
  1215                                  otherlinkdatarelocation extseg_size
  1216 000005C9 29C2                    	sub dx, ax
  1217 000005CB 31DB                    	xor bx, bx
  1218 000005CD 31C9                    	xor cx, cx
  1219                                  .free:
  1220 000005CF 16                      	 push ss
  1221 000005D0 1F                      	 pop ds
  1222 000005D1 51                      	push cx
  1223 000005D2 BE[B505]                reloc	mov si, msg.eld.free
  1224                                  internaldatarelocation
  1225 000005D5 E81804                  	extcallcall copy_single_counted_string
  1226 000005D8 59                      	pop cx
  1227 000005D9 E9A200                  	jmp .have
  1228                                  
  1229                                  @@:
  1230 000005DC BB[0000]                reloc	mov bx, relocateddata
  1231                                  otherlinkdatarelocation extdssel, -2, optional
  1232 000005DF E8EE03                  	extcallcall ispm
  1233 000005E2 7403                    	jz @F
  1234 000005E4 BB[0000]                reloc	mov bx, relocateddata
  1235                                  otherlinkdatarelocation extseg, -2, optional
  1236                                  @@:
  1237 000005E7 85DB                    	test bx, bx
  1238 000005E9 7509                    	jnz @F
  1239                                  .error:
  1240                                  	resetds
  1241 000005EB BA[9505]                reloc	mov dx, msg.eld.error
  1242                                  internaldatarelocation
  1243 000005EE E8CF03                  	extcallcall putsz
  1244 000005F1 E9AD00                  	jmp .end
  1245                                  
  1246                                  @@:
  1247 000005F4 8E07                    	mov es, word [bx]
  1248 000005F6 89C3                    	mov bx, ax
  1249 000005F8 263907                  	cmp word [es:bx + eldiStartCode], ax
  1250 000005FB 75EE                    	jne .error
  1251 000005FD 89C2                    	mov dx, ax
  1252 000005FF 83C220                  	add dx, ELD_INSTANCE_size
  1253 00000602 72E7                    	jc .error
  1254 00000604 26395702                	cmp word [es:bx + eldiEndCode], dx
  1255 00000608 72E1                    	jb .error
  1256 0000060A 8B16[0000]              reloc	mov dx, word [relocateddata]
  1257                                  otherlinkdatarelocation extseg_used
  1258 0000060E 26395702                	cmp word [es:bx + eldiEndCode], dx
  1259 00000612 77D7                    	ja .error
  1260 00000614 740B                    	je @F
  1261 00000616 83EA20                  	sub dx, ELD_INSTANCE_size
  1262 00000619 72D0                    	jc .error
  1263 0000061B 26395702                	cmp word [es:bx + eldiEndCode], dx
  1264 0000061F 77CA                    	ja .error
  1265                                  @@:
  1266 00000621 268B5702                	mov dx, word [es:bx + eldiEndCode]
  1267 00000625 89D5                    	mov bp, dx
  1268 00000627 29C2                    	sub dx, ax
  1269 00000629 72C0                    	jc .error
  1270 0000062B 26FF7704                	push word [es:bx + eldiStartData]
  1271 0000062F 53                      	push bx
  1272 00000630 268B5F06                	mov bx, word [es:bx + eldiEndData]
  1273 00000634 5E                      	pop si
  1274 00000635 26F6441001              	testopt [es:si + eldiFlags], eldifResident
  1275 0000063A 8D7408                  	lea si, [si + eldiIdentifier]
  1276 0000063D 06                      	push es
  1277 0000063E 1F                      	pop ds
  1278 0000063F 16                      	 push ss
  1279 00000640 07                      	 pop es
  1280 00000641 59                      	pop cx
  1281 00000642 7537                    	jnz .nonfree
  1282                                  
  1283 00000644 51                      	push cx
  1284 00000645 1E                      	push ds
  1285 00000646 56                      	push si
  1286 00000647 16                      	 push ss
  1287 00000648 1F                      	 pop ds
  1288 00000649 BE[B505]                reloc	mov si, msg.eld.free
  1289                                  internaldatarelocation
  1290 0000064C E8A103                  	extcallcall copy_single_counted_string
  1291                                  
  1292 0000064F BE[C505]                reloc	mov si, msg.eld.2
  1293                                  internaldatarelocation
  1294 00000652 53                      	push bx
  1295 00000653 E8C902                  	call display_eld_size
  1296 00000656 5B                      	pop bx
  1297                                  
  1298 00000657 BE[C005]                reloc	mov si, msg.eld.free.2
  1299                                  internaldatarelocation
  1300 0000065A E89303                  	extcallcall copy_single_counted_string
  1301                                  
  1302 0000065D 5E                      	pop si
  1303 0000065E 1F                      	pop ds
  1304                                  
  1305 0000065F E80900                  	call .copyname
  1306                                  
  1307 00000662 BE[C305]                reloc	mov si, msg.eld.free.3
  1308                                  internaldatarelocation
  1309 00000665 E88803                  	extcallcall copy_single_counted_string
  1310                                  
  1311 00000668 59                      	pop cx
  1312                                  
  1313 00000669 EB1B                    	jmp .havedata
  1314                                  
  1315                                  .copyname:
  1316 0000066B 51                      	push cx
  1317 0000066C 50                      	push ax
  1318 0000066D B022                    	mov al, '"'
  1319 0000066F AA                      	stosb
  1320 00000670 B90400                  	mov cx, 4
  1321 00000673 F3A5                    	rep movsw
  1322 00000675 AA                      	stosb
  1323 00000676 58                      	pop ax
  1324 00000677 16                      	 push ss
  1325 00000678 1F                      	 pop ds
  1326 00000679 59                      	pop cx
  1327 0000067A C3                      	retn
  1328                                  
  1329                                  .nonfree:
  1330 0000067B E8EDFF                  	call .copyname
  1331                                  
  1332                                  .have:
  1333 0000067E BE[C505]                reloc	mov si, msg.eld.2
  1334                                  internaldatarelocation
  1335 00000681 53                      	push bx
  1336 00000682 E89A02                  	call display_eld_size
  1337 00000685 5B                      	pop bx
  1338                                  
  1339                                  .havedata:
  1340 00000686 89D8                    	mov ax, bx
  1341 00000688 29C8                    	sub ax, cx
  1342 0000068A 7409                    	jz .next
  1343 0000068C 92                      	xchg dx, ax
  1344 0000068D 89C8                    	mov ax, cx
  1345 0000068F BE[E305]                reloc	mov si, msg.eld.5
  1346                                  internaldatarelocation
  1347 00000692 E88A02                  	call display_eld_size
  1348                                  
  1349                                  .next:
  1350 00000695 E89003                  	extcallcall putsline_crlf
  1351 00000698 85ED                    	test bp, bp
  1352 0000069A 89E8                    	mov ax, bp
  1353 0000069C 7403E919FF              	jnz .loop
  1354                                  .end:
  1355                                  
  1356 000006A1 BF[0000]                reloc	mov di, relocateddata
  1357                                  linkdatarelocation line_out
  1358                                  	getotherds
  1359 000006A4 A1[0000]                reloc	mov ax, word [relocateddata]
  1360                                  otherlinkdatarelocation extdata_used
  1361 000006A7 8B16[0000]              reloc	mov dx, word [relocateddata]
  1362                                  otherlinkdatarelocation extdata_size
  1363 000006AB 29C2                    	sub dx, ax
  1364 000006AD 740D                    	jz @F
  1365 000006AF 0306[0000]              reloc	add ax, [relocateddata]
  1366                                  otherlinkdatarelocation extdata
  1367 000006B3 BE[FD05]                reloc	mov si, msg.eld.6
  1368                                  internaldatarelocation
  1369                                  	resetds
  1370 000006B6 E86602                  	call display_eld_size
  1371 000006B9 E86C03                  	extcallcall putsline_crlf
  1372                                  @@:
  1373                                  	resetds
  1374 000006BC C3                      	retn
  1375                                  
  1376                                  
  1377                                  display_eld_variables:
  1378 000006BD BF[0000]                reloc	mov di, relocateddata
  1379                                  linkdatarelocation line_out
  1380                                  
  1381 000006C0 BE[1506]                reloc	mov si, msg.var.format
  1382                                  internaldatarelocation
  1383 000006C3 E82A03                  	extcallcall copy_single_counted_string
  1384                                  
  1385 000006C6 B8[0000]                reloc	mov ax, relocateddata
  1386                                  otherlinkdatarelocation ext_var_format
  1387 000006C9 83F801                  	cmp ax, 1
  1388 000006CC 740F                    	je .known
  1389                                  
  1390                                  .unknown:
  1391 000006CE BF[8706]                reloc	mov di, msg.varunknown.format
  1392                                  internaldatarelocation
  1393 000006D1 E82C03                  	extcallcall hexword
  1394                                  
  1395 000006D4 BA[6806]                reloc	mov dx, msg.varunknown
  1396                                  internaldatarelocation
  1397 000006D7 E8E602                  	extcallcall putsz
  1398 000006DA E9B100                  	jmp .end
  1399                                  
  1400                                  .known:
  1401 000006DD E82003                  	extcallcall hexword
  1402                                  
  1403 000006E0 BE[2B06]                reloc	mov si, msg.var.size
  1404                                  internaldatarelocation
  1405 000006E3 E80A03                  	extcallcall copy_single_counted_string
  1406                                  
  1407 000006E6 B8[0000]                reloc	mov ax, relocateddata
  1408                                  otherlinkdatarelocation ext_var_size
  1409                                  
  1410 000006E9 E81403                  	extcallcall hexword
  1411 000006EC 92                      	xchg dx, ax
  1412                                  
  1413 000006ED BE[3E06]                reloc	mov si, msg.var.amount
  1414                                  internaldatarelocation
  1415 000006F0 E8FD02                  	extcallcall copy_single_counted_string
  1416                                  
  1417 000006F3 31DB                    	xor bx, bx
  1418 000006F5 B9[0000]                reloc	mov cx, relocateddata
  1419                                  otherlinkdatarelocation ext_var_amount
  1420 000006F8 51                      	push cx
  1421 000006F9 E313                    	jcxz .donecount
  1422                                  
  1423 000006FB 57                      	push di
  1424 000006FC BF[0000]                reloc	mov di, relocateddata
  1425                                  otherlinkdatarelocation ext_var
  1426 000006FF BE[0000]                reloc	mov si, relocateddata
  1427                                  otherlinkdatarelocation isvariable_morebyte_nameheaders.ext
  1428                                  	getotherds
  1429                                  .loopcount:
  1430 00000702 833D00                  	cmp word [di], 0
  1431 00000705 7401                    	je .nextcount
  1432 00000707 43                      	inc bx
  1433                                  .nextcount:
  1434 00000708 01D7                    	add di, dx
  1435 0000070A AD                      	lodsw
  1436 0000070B E2F5                    	loop .loopcount
  1437 0000070D 5F                      	pop di
  1438                                  .donecount:
  1439                                  	resetds
  1440                                  
  1441 0000070E 93                      	xchg ax, bx
  1442 0000070F E8F602                  	extcallcall decword
  1443                                  
  1444 00000712 BE[5806]                reloc	mov si, msg.var.amountbetween
  1445                                  internaldatarelocation
  1446 00000715 E8D802                  	extcallcall copy_single_counted_string
  1447                                  
  1448 00000718 58                      	pop ax
  1449 00000719 E8EC02                  	extcallcall decword
  1450 0000071C 50                      	push ax
  1451                                  
  1452 0000071D BE[6106]                reloc	mov si, msg.var.amountafter
  1453                                  internaldatarelocation
  1454 00000720 E8CD02                  	extcallcall copy_single_counted_string
  1455 00000723 52                      	push dx
  1456 00000724 E80103                  	extcallcall putsline_crlf
  1457 00000727 5A                      	pop dx
  1458 00000728 59                      	pop cx
  1459                                  
  1460 00000729 BB[0000]                reloc	mov bx, relocateddata
  1461                                  otherlinkdatarelocation ext_var
  1462 0000072C BE[0000]                reloc	mov si, relocateddata
  1463                                  otherlinkdatarelocation isvariable_morebyte_nameheaders.ext
  1464                                  
  1465                                  	getotherds
  1466 0000072F E35D                    	jcxz .donelist
  1467                                  .looplist:
  1468 00000731 833F00                  	cmp word [bx], 0
  1469 00000734 7453                    	je .nextlist
  1470 00000736 51                      	push cx
  1471 00000737 56                      	push si
  1472                                  
  1473 00000738 BF[0000]                reloc	mov di, relocateddata
  1474                                  linkdatarelocation line_out
  1475                                  
  1476                                  	resetds
  1477 0000073B BE[8F06]                reloc	mov si, msg.var.list.flags
  1478                                  internaldatarelocation
  1479 0000073E E8AF02                  	extcallcall copy_single_counted_string
  1480                                  
  1481                                  	getotherds
  1482 00000741 8B4702                  	mov ax, word [bx + ivFlags]
  1483 00000744 E8B902                  	extcallcall hexword
  1484                                  
  1485                                  	resetds
  1486 00000747 BE[9606]                reloc	mov si, msg.var.list.array
  1487                                  internaldatarelocation
  1488 0000074A E8A302                  	extcallcall copy_single_counted_string
  1489                                  
  1490                                  	getotherds
  1491 0000074D 8A4708                  	mov al, byte [bx + ivArrayLast]
  1492 00000750 E8DD02                  	extcallcall hexbyte
  1493                                  
  1494 00000753 8A4709                  	mov al, byte [bx + ivArrayBetween]
  1495                                  	resetds
  1496 00000756 84C0                    	test al, al
  1497 00000758 7409                    	jz @F
  1498                                  
  1499 0000075A BE[9F06]                reloc	mov si, msg.var.list.between
  1500                                  internaldatarelocation
  1501 0000075D E89002                  	extcallcall copy_single_counted_string
  1502                                  
  1503 00000760 E8CD02                  	extcallcall hexbyte
  1504                                  @@:
  1505                                  
  1506 00000763 BE[AA06]                reloc	mov si, msg.var.list.name
  1507                                  internaldatarelocation
  1508 00000766 E88702                  	extcallcall copy_single_counted_string
  1509                                  
  1510 00000769 5E                      	pop si
  1511                                  	getotherds
  1512 0000076A A5                      	movsw
  1513 0000076B 56                      	push si
  1514                                  
  1515 0000076C 8B37                    	mov si, word [bx + ivName]
  1516 0000076E 8B4F02                  	mov cx, word [bx + ivFlags]
  1517 00000771 83E10F                  	and cx, ivfNameLengthMask
  1518 00000774 F3A4                    	rep movsb
  1519                                  
  1520 00000776 53                      	push bx
  1521 00000777 52                      	push dx
  1522                                  
  1523 00000778 8B4704                  	mov ax, word [bx + ivAddress]
  1524                                  	resetds
  1525 0000077B BE[B306]                reloc	mov si, msg.var.list.entry
  1526                                  internaldatarelocation
  1527 0000077E E83D01                  	call display_entry_and_instance
  1528                                  
  1529 00000781 E8A402                  	extcallcall putsline_crlf
  1530 00000784 5A                      	pop dx
  1531 00000785 5B                      	pop bx
  1532                                  
  1533 00000786 5E                      	pop si
  1534 00000787 59                      	pop cx
  1535 00000788 A8                      	db __TEST_IMM8		; skip lodsw
  1536                                  .nextlist:
  1537 00000789 AD                      	lodsw
  1538 0000078A 01D3                    	add bx, dx
  1539 0000078C E2A3                    	loop .looplist
  1540                                  .donelist:
  1541                                  
  1542                                  .end:
  1543 0000078E C3                      	retn
  1544                                  
  1545                                  
  1546                                  display_command_handler:
  1547 0000078F BB[5200]                reloc	mov bx, handlertable.command
  1548                                  internaldatarelocation
  1549 00000792 EB12                    	jmp @F
  1550                                  
  1551                                  display_amis_handler:
  1552 00000794 BB[6800]                reloc	mov bx, handlertable.amis
  1553                                  internaldatarelocation
  1554 00000797 EB0D                    	jmp @F
  1555                                  
  1556                                  display_asm_handler:
  1557 00000799 BB[7400]                reloc	mov bx, handlertable.asm
  1558                                  internaldatarelocation
  1559 0000079C EB08                    	jmp @F
  1560                                  
  1561                                  display_puts_handler:
  1562 0000079E BB[8A00]                reloc	mov bx, handlertable.puts
  1563                                  internaldatarelocation
  1564 000007A1 EB03                    	jmp @F
  1565                                  
  1566                                  display_inject_handler:
  1567 000007A3 BB[AA00]                reloc	mov bx, handlertable.inject
  1568                                  internaldatarelocation
  1569                                  @@:
  1570                                  
  1571                                  display_handlers:
  1572                                  	houdini
  1573                                  	lframe
  1574 000007A6 5589E5                  	lenter
  1575 000007A9 53                      	 push bx
  1576                                  	lvar word, table
  1577 000007AA EB06                    	jmp @F
  1578                                  
  1579                                  .next_table:
  1580 000007AC BA[0F07]                reloc	mov dx, msg.handler.init.pre
  1581                                  internaldatarelocation
  1582 000007AF E80E02                  	extcallcall putsz
  1583                                  @@:
  1584 000007B2 8B17                    	mov dx, word [bx + htMessage]
  1585 000007B4 E80902                  	extcallcall putsz
  1586 000007B7 BA[1207]                reloc	mov dx, msg.handler.init.post
  1587                                  internaldatarelocation
  1588 000007BA E80302                  	extcallcall putsz
  1589                                  
  1590 000007BD 8B17                    	mov dx, word [bx + htMessage]
  1591 000007BF 8B5F02                  	mov bx, word [bx + htHandler]
  1592                                  	getotherds
  1593 000007C2 8B1F                    	mov bx, [bx]
  1594                                  	resetds
  1595 000007C4 85DB                    	test bx, bx
  1596 000007C6 7514                    	jnz @F
  1597 000007C8 52                      	push dx
  1598 000007C9 BA[1F07]                reloc	mov dx, msg.handler.none.pre
  1599                                  internaldatarelocation
  1600 000007CC E8F101                  	extcallcall putsz
  1601 000007CF 5A                      	pop dx
  1602 000007D0 E8ED01                  	extcallcall putsz
  1603 000007D3 BA[3207]                reloc	mov dx, msg.handler.none.post
  1604                                  internaldatarelocation
  1605                                  .putsz_end:
  1606 000007D6 E8E701                  	extcallcall putsz
  1607 000007D9 E99A00                  	jmp .end
  1608                                  
  1609                                  @@:
  1610                                  .loop:
  1611 000007DC 16                      	push ss
  1612 000007DD 07                      	pop es
  1613 000007DE 53                      	push bx
  1614 000007DF BF[0000]                reloc	mov di, relocateddata
  1615                                  linkdatarelocation line_out
  1616 000007E2 93                      	xchg ax, bx
  1617 000007E3 BE[0707]                reloc	mov si, msg.commandhandler.entry
  1618                                  internaldatarelocation
  1619 000007E6 E8D500                  	call display_entry_and_instance
  1620 000007E9 E83C02                  	extcallcall putsline_crlf
  1621 000007EC 5B                      	pop bx
  1622 000007ED E8DBF8                  	call get_es_ext_other
  1623                                  	houdini
  1624 000007F0 8B76FE                  	mov si, word [bp + ?table]
  1625 000007F3 F6440802                	testopt [si + htFlags], htfIsInject
  1626 000007F7 757D                    	jnz .end
  1627 000007F9 F6440801                	testopt [si + htFlags], htfIsAMIS
  1628 000007FD 7417                    	jz .notamis
  1629 000007FF 26813FEB03              	cmp word [es:bx], 03EBh
  1630 00000804 755A                    	jne .error
  1631 00000806 26807F02E9              	cmp byte [es:bx + 2], 0E9h
  1632 0000080B 7417                    	je .next
  1633 0000080D 26807F02CB              	cmp byte [es:bx + 2], 0CBh	; retf
  1634 00000812 754C                    	jne .error
  1635 00000814 EB60                    	jmp .end
  1636                                  
  1637                                  .notamis:
  1638 00000816 26813FEB08              	cmp word [es:bx], 08EBh
  1639 0000081B 7543                    	jne .error
  1640 0000081D 26807F02E9              	cmp byte [es:bx + 2], 0E9h
  1641 00000822 7509                    	jne @F
  1642                                  .next:
  1643 00000824 26035F03                	add bx, word [es:bx + 2 + 1]
  1644 00000828 83C305                  	add bx, 2 + 3
  1645 0000082B EBAF                    	jmp .loop
  1646                                  
  1647                                  @@:
  1648                                  %if ! _OTHER
  1649 0000082D 8B7404                  	mov si, word [si + htTemplate]	; cs:si -> template
  1650 00000830 B90700                  	mov cx, template_size
  1651 00000833 83EC08                  	sub sp, fromwords(words(template_size))
  1652 00000836 0E                      	push cs
  1653 00000837 1F                      	pop ds				; ds:si -> template
  1654 00000838 89E7                    	mov di, sp			; ss:di -> stack
  1655 0000083A 06                      	push es
  1656 0000083B 16                      	 push ss
  1657 0000083C 07                      	 pop es				; es:di
  1658 0000083D 51                      	 push cx
  1659 0000083E F3A4                    	rep movsb
  1660 00000840 59                      	 pop cx				; restore template length
  1661 00000841 07                      	pop es				; => ELD instance
  1662 00000842 16                      	push ss
  1663 00000843 1F                      	pop ds				; reset ds
  1664 00000844 89E6                    	mov si, sp			; ds:si -> template on stack
  1665 00000846 8B4401                  	mov ax, [si + 1]
  1666 00000849 8B7EFE                  	mov di, word [bp + ?table]
  1667 0000084C 034504                  	add ax, word [di + htTemplate]	; change to (biased) absolute offset
  1668 0000084F 8D7F02                  	lea di, [bx + 2]		; es:di -> downlink
  1669 00000852 29F8                    	sub ax, di			; change to rel16 displacement
  1670 00000854 894401                  	mov word [si + 1], ax		; enter into template
  1671 00000857 8D4408                  	lea ax, [si + fromwords(words(template_size))]
  1672                                  					; -> prior stack
  1673 0000085A F3A6                    	rep cmpsb			; does it match expected downlink ?
  1674 0000085C 89C4                    	mov sp, ax			; reset stack
  1675                                  %else
  1676                                  	cmp byte [es:bx + 2], 0E8h
  1677                                  	jne .error
  1678                                  	mov ax, word [si + htReturn]
  1679                                  	cmp word [es:bx + 2 + 1 + 4], ax
  1680                                  %endif
  1681 0000085E 7416                    	je .end
  1682                                  .error:
  1683 00000860 16                      	push ss
  1684 00000861 07                      	pop es
  1685 00000862 8B5EFE                  	mov bx, word [bp + ?table]
  1686 00000865 BA[4807]                reloc	mov dx, msg.handler.error.pre
  1687                                  internaldatarelocation
  1688 00000868 E85501                  	extcallcall putsz
  1689 0000086B 8B17                    	mov dx, word [bx + htMessage]
  1690 0000086D E85001                  	extcallcall putsz
  1691 00000870 BA[4A07]                reloc	mov dx, msg.handler.error.post
  1692                                  internaldatarelocation
  1693 00000873 E960FF                  	jmp .putsz_end
  1694                                  
  1695                                  .end:
  1696 00000876 16                      	push ss
  1697 00000877 07                      	pop es
  1698 00000878 8B5EFE                  	mov bx, word [bp + ?table]
  1699 0000087B 83C30A                  	add bx, HANDLERTABLE_size
  1700 0000087E 895EFE                  	mov word [bp + ?table], bx
  1701 00000881 833F00                  	cmp word [bx], 0
  1702 00000884 7403E923FF              	jne .next_table
  1703                                  
  1704 00000889 89EC5D                  	lleave
  1705                                  emptyfunction:
  1706 0000088C C3                      	retn
  1707                                  
  1708                                  
  1709                                  template_commandhandler:
  1710                                  template:
  1711 0000088D E8[0000]EB020000        	extcall cmd3_not_ext, required	; must NOT be extcallcall
  1712                                  	endarea template
  1713                                  template_preprocesshandler:
  1714 00000894 E8[0000]EB020000        	extcall cmd3_preprocessed, required	; must NOT be extcallcall
  1715                                  template_aabeforehandler:
  1716 0000089B E8[0000]EB020000        	extcall aa_before_getline, required	; must NOT be extcallcall
  1717                                  template_aaafterhandler:
  1718 000008A2 E8[0000]EB020000        	extcall aa_after_getline, required	; must NOT be extcallcall
  1719                                  template_putshandler:
  1720 000008A9 E8[0000]EB020000        	extcall puts_ext_done, required		; must NOT be extcallcall
  1721                                  template_putscohandler:
  1722 000008B0 E8[0000]EB020000        	extcall puts_copyoutput_ext_done, required
  1723                                  				; must NOT be extcallcall
  1724                                  template_putsgetlinehandler:
  1725 000008B7 E8[0000]EB020000        	extcall puts_getline_ext_done, required
  1726                                  				; must NOT be extcallcall
  1727                                  
  1728                                  
  1729                                  display_entry_and_instance:
  1730 000008BE E82F01                  	extcallcall copy_single_counted_string
  1731 000008C1 E83C01                  	extcallcall hexword
  1732                                  
  1733 000008C4 92                      	xchg dx, ax
  1734                                  
  1735 000008C5 E803F8                  	call get_es_ext_other
  1736 000008C8 31F6                    	xor si, si
  1737 000008CA 31DB                    	xor bx, bx
  1738                                  .loop:
  1739                                  	getotherds
  1740 000008CC 3B36[0000]              reloc	cmp si, word [relocateddata]
  1741                                  otherlinkdatarelocation extseg_used
  1742                                  	resetds
  1743 000008D0 7343                    	jae .notfound
  1744 000008D2 263B34                  	cmp si, [es:si + eldiStartCode]
  1745 000008D5 7543                    	jne .error
  1746 000008D7 8D5C20                  	lea bx, [si + ELD_INSTANCE_size]
  1747 000008DA 263B5C02                	cmp bx, word [es:si + eldiEndCode]
  1748 000008DE 773A                    	ja .error
  1749 000008E0 268B5C02                	mov bx, word [es:si + eldiEndCode]
  1750 000008E4 39D3                    	cmp bx, dx
  1751 000008E6 7432                    	je .error
  1752 000008E8 7704                    	ja .found
  1753                                  .next:
  1754 000008EA 89DE                    	mov si, bx
  1755 000008EC EBDE                    	jmp .loop
  1756                                  
  1757                                  .found:
  1758 000008EE 06                      	push es				; stack => ext seg
  1759 000008EF 96                      	xchg ax, si			; ax -> instance
  1760 000008F0 16                      	 push ss
  1761 000008F1 07                      	 pop es
  1762 000008F2 BE[BE06]                reloc	mov si, msg.instance.1
  1763                                  internaldatarelocation
  1764 000008F5 E8F800                  	extcallcall copy_single_counted_string
  1765 000008F8 E80501                  	extcallcall hexword		; write offset -> instance
  1766                                  
  1767 000008FB BE[CB06]                reloc	mov si, msg.instance.2
  1768                                  internaldatarelocation
  1769 000008FE E8EF00                  	extcallcall copy_single_counted_string
  1770                                  
  1771 00000901 96                      	xchg si, ax			; si -> instance
  1772 00000902 8D7408                  	lea si, [si + eldiIdentifier]	; si -> id
  1773 00000905 1F                      	pop ds				; => ext seg
  1774 00000906 B104                    	mov cl, 4			; cx = 4
  1775 00000908 F3A5                    	rep movsw			; copy id
  1776                                  
  1777 0000090A 16                      	push ss
  1778 0000090B 1F                      	pop ds
  1779                                  
  1780 0000090C BE[DB06]                reloc	mov si, msg.instance.3
  1781                                  internaldatarelocation
  1782                                  @@:
  1783 0000090F 16                      	push ss
  1784 00000910 07                      	pop es
  1785 00000911 E8DC00                  	extcallcall copy_single_counted_string
  1786 00000914 C3                      	retn
  1787                                  
  1788                                  .notfound:
  1789 00000915 BE[DD06]                reloc	mov si, msg.instance.notfound
  1790                                  internaldatarelocation
  1791 00000918 EBF5                    	jmp @B
  1792                                  
  1793                                  .error:
  1794 0000091A BE[F406]                reloc	mov si, msg.instance.error
  1795                                  internaldatarelocation
  1796 0000091D EBF0                    	jmp @B
  1797                                  
  1798                                  
  1799                                  		; INP:	si -> first string
  1800                                  		;	ax = start
  1801                                  		;	dx = length
  1802                                  display_eld_size:
  1803 0000091F 51                      	push cx
  1804 00000920 E8CD00                  	extcallcall copy_single_counted_string
  1805 00000923 E8DA00                  	call hexword
  1806 00000926 BE[D305]                reloc	mov si, msg.eld.3
  1807                                  internaldatarelocation
  1808 00000929 E8C400                  	extcallcall copy_single_counted_string
  1809 0000092C 01D0                    	add ax, dx
  1810 0000092E E8CF00                  	call hexword
  1811 00000931 BE[DB05]                reloc	mov si, msg.eld.4
  1812                                  internaldatarelocation
  1813 00000934 E8B900                  	extcallcall copy_single_counted_string
  1814 00000937 89D0                    	mov ax, dx
  1815 00000939 E8C400                  	call hexword
  1816 0000093C BE[4C03]                reloc	mov si, msg.size.2
  1817                                  internaldatarelocation
  1818 0000093F E8AE00                  	extcallcall copy_single_counted_string
  1819 00000942 31D2                    	xor dx, dx
  1820 00000944 B90100                  	mov cx, 1
  1821 00000947 BB0900                  	mov bx, 9
  1822 0000094A E8D300                  	extcallcall disp_dxax_times_cx_width_bx_size.store
  1823 0000094D 59                      	pop cx
  1824 0000094E C3                      	retn
  1825                                  
  1826                                  
  1827                                  parasize:
  1828 0000094F BE[4403]                reloc	mov si, msg.size.1
  1829                                  internaldatarelocation
  1830 00000952 E89B00                  	extcallcall copy_single_counted_string
  1831 00000955 B104                    	mov cl, 4
  1832 00000957 50                      	push ax
  1833 00000958 89C2                    	mov dx, ax
  1834 0000095A D3C0                    	rol ax, cl
  1835 0000095C A80F                    	test al, 15
  1836 0000095E 7404                    	jz @F
  1837 00000960 4F                      	dec di
  1838 00000961 E8D400                  	extcallcall hexnyb
  1839                                  @@:
  1840 00000964 92                      	xchg ax, dx
  1841 00000965 D3E0                    	shl ax, cl
  1842 00000967 E89600                  	extcallcall hexword
  1843 0000096A BE[4C03]                reloc	mov si, msg.size.2
  1844                                  internaldatarelocation
  1845 0000096D E88000                  	extcallcall copy_single_counted_string
  1846 00000970 58                      	pop ax
  1847 00000971 31D2                    	xor dx, dx
  1848 00000973 B91000                  	mov cx, 16
  1849 00000976 BB0900                  	mov bx, 9
  1850 00000979 E8A400                  	extcallcall disp_dxax_times_cx_width_bx_size.store
  1851 0000097C C3                      	retn
  1852                                  
  1853                                  
  1854                                  		; INP:	dx => end of prior
  1855                                  		;	ax => start of next
  1856                                  gap:
  1857 0000097D 52                      	push dx
  1858 0000097E F7DA                    	neg dx
  1859 00000980 01C2                    	add dx, ax
  1860 00000982 BE[AE03]                reloc	mov si, msg.gap
  1861                                  internaldatarelocation
  1862 00000985 E86800                  	extcallcall copy_single_counted_string
  1863 00000988 58                      	pop ax
  1864 00000989 E87400                  	extcallcall hexword
  1865 0000098C BE[4103]                reloc	mov si, msg.address.1
  1866                                  internaldatarelocation
  1867 0000098F E85E00                  	extcallcall copy_single_counted_string
  1868 00000992 92                      	xchg ax, dx
  1869 00000993 E8B9FF                  	call parasize
  1870 00000996 E88F00                  	extcallcall putsline_crlf
  1871 00000999 BF[0000]                reloc	mov di, relocateddata
  1872                                  linkdatarelocation line_out
  1873 0000099C C3                      	retn
  1874                                  
  1875                                  
  1876 0000099D 90<rep 3h>E8[0000]-     	eldcall_dump_callcall ELDCALL_CALLCALL_LIST
  1876 000009A3 EB020000C3E8[0000]-
  1876 000009AB EB020000C3E8[0000]-
  1876 000009B3 EB020000C3E8[0000]-
  1876 000009BB EB020000C3E8[0000]-
  1876 000009C3 EB020000C3E8[0000]-
  1876 000009CB EB020000C3E8[0000]-
  1876 000009D3 EB020000C3E8[0000]-
  1876 000009DB EB020000C3E8[0000]-
  1876 000009E3 EB020000C3E8[0000]-
  1876 000009EB EB020000C3E8[0000]-
  1876 000009F3 EB020000C3E8[0000]-
  1876 000009FB EB020000C3E8[0000]-
  1876 00000A03 EB020000C3E8[0000]-
  1876 00000A0B EB020000C3E8[0000]-
  1876 00000A13 EB020000C3E8[0000]-
  1876 00000A1B EB020000C3E8[0000]-
  1876 00000A23 EB020000C3E8[0000]-
  1876 00000A2B EB020000C3E8[0000]-
  1876 00000A33 EB020000C3E8[0000]-
  1876 00000A3B EB020000C3         
  1877                                  
  1878                                  endinstalled equ ($ + CODEFIXUP + 15) & ~15
  1879                                  
  1880                                  
  1881                                  start:
  1882 00000A40 8CC3                    	mov bx, es
  1883 00000A42 16                      	 push ss
  1884 00000A43 07                      	 pop es
  1885 00000A44 E859FF                  	call skipcomma
  1886 00000A47 4E                      	dec si
  1887 00000A48 BA[0000]                reloc	mov dx, relocateddata
  1888                                  linkdatarelocation msg.install
  1889 00000A4B E85AFF                  	call isstring?
  1890 00000A4E 7440                    	je install
  1891 00000A50 BA[8A08]                reloc	mov dx, msg.keyword_help
  1892                                  internaldatarelocation
  1893 00000A53 E852FF                  	call isstring?
  1894 00000A56 7409                    	je help
  1895 00000A58 E87EF6                  	call run
  1896                                  @@:
  1897 00000A5B E80F00                  	call uninstall_oneshot
  1898 00000A5E 31C0                    	xor ax, ax
  1899 00000A60 CB                      	retf
  1900                                  
  1901                                  help:
  1902 00000A61 AC                      	lodsb
  1903 00000A62 E853FF                  	call chkeol
  1904 00000A65 BA[8F08]                reloc	mov dx, msg.help
  1905                                  internaldatarelocation
  1906 00000A68 E855FF                  	call putsz
  1907 00000A6B EBEE                    	jmp @B
  1908                                  
  1909                                  
  1910                                  uninstall_oneshot:
  1911 00000A6D 36F606[0000]01          reloc	testopt [ss:relocateddata], 1
  1912                                  linkdatarelocation options7, -3
  1913 00000A73 751A                    	jnz @F
  1914                                  
  1915 00000A75 2EA1[0200]              reloc	mov ax, word [cs:code + eldiEndCode]
  1916                                  internalcoderelocation
  1917 00000A79 2E2B06[0000]            reloc	sub ax, word [cs:code + eldiStartCode]
  1918                                  internalcoderelocation
  1919 00000A7E 2906[0000]              reloc	sub word [relocateddata], ax
  1920                                  linkdatarelocation extseg_used
  1921                                  
  1922 00000A82 2EA1[0600]              reloc	mov ax, word [cs:code + eldiEndData]
  1923                                  internalcoderelocation
  1924 00000A86 2E2B06[0400]            reloc	sub ax, word [cs:code + eldiStartData]
  1925                                  internalcoderelocation
  1926 00000A8B 2906[0000]              reloc	sub word [relocateddata], ax
  1927                                  linkdatarelocation extdata_used
  1928                                  @@:
  1929 00000A8F C3                      	retn
  1930                                  
  1931                                  
  1932                                  DATAOFFSET equ CODEOFFSET + code_size
  1933                                  	addsection DATA, follows=CODE vstart=_ELD_DATA_VSTART
  1934                                  %define DATAFIXUP - datastart + 0
  1935                                  datastart:
  1936                                  PUT_ELD_DATETIME
  1937                                  
  1938                                  %rep _ELD_BUG
  1939                                  	eldstrict off
  1940                                  
  1941                                  	dw msg.ldmem			; missing internaldatarelocation
  1942                                  %endrep
  1943                                  
  1944                                  %if _OTHER
  1945                                  	align 2, db 0
  1946                                  otherds:	dw 0
  1947                                  otherseg:	dw 0
  1948                                  %endif
  1949                                  
  1950                                  	align 8, db 0
  1951                                  table:
  1952                                  .:
  1953 00000000 [8902]                  reloc	dw msg.entryseg
  1954                                  internaldatarelocation
  1955 00000002 [0000]                  reloc	dw relocateddata
  1956                                  otherlinkdatarelocation pspdbg, -2, optional
  1957 00000004 0000                    	dw 0
  1958 00000006 [0000]                  reloc	dw relocateddata
  1959                                  otherlinkdatarelocation entryseg_size, -2, optional
  1960 00000008 [0000]                  reloc	dw relocateddata
  1961                                  otherlinkdatarelocation cssel, -2, optional
  1962                                  
  1963 0000000A [9002]                  reloc	dw msg.messageseg
  1964                                  internaldatarelocation
  1965 0000000C [0000]                  reloc	dw relocateddata
  1966                                  otherlinkdatarelocation messageseg, -2, optional
  1967 0000000E 0000                    	dw 0
  1968 00000010 [0000]                  reloc	dw relocateddata
  1969                                  otherlinkdatarelocation messageseg_size, -2, optional
  1970 00000012 [0000]                  reloc	dw relocateddata
  1971                                  otherlinkdatarelocation messagesel, -2, optional
  1972                                  
  1973 00000014 [BC02]                  reloc	dw msg.auxbuffseg
  1974                                  internaldatarelocation
  1975 00000016 [0000]                  reloc	dw relocateddata
  1976                                  otherlinkdatarelocation auxbuff_segment, -2, optional
  1977 00000018 0000                    	dw 0
  1978 0000001A [0000]                  reloc	dw relocateddata
  1979                                  otherlinkdatarelocation auxbuff_current_size, -2, optional
  1980 0000001C [0000]                  reloc	dw relocateddata
  1981                                  otherlinkdatarelocation auxbuff_segorsel, -2, optional
  1982                                  
  1983 0000001E [9902]                  reloc	dw msg.codeseg
  1984                                  internaldatarelocation
  1985 00000020 [0000]                  reloc	dw relocateddata
  1986                                  otherlinkdatarelocation code_seg, -2, optional
  1987 00000022 0000                    	dw 0
  1988 00000024 [0000]                  reloc	dw relocateddata
  1989                                  otherlinkdatarelocation code_size, -2, optional
  1990 00000026 [0000]                  reloc	dw relocateddata
  1991                                  otherlinkdatarelocation code_sel, -2, optional
  1992                                  
  1993 00000028 [AA02]                  reloc	dw msg.code2seg
  1994                                  internaldatarelocation
  1995 0000002A [0000]                  reloc	dw relocateddata
  1996                                  otherlinkdatarelocation code2_seg, -2, optional
  1997 0000002C 0000                    	dw 0
  1998 0000002E [0000]                  reloc	dw relocateddata
  1999                                  otherlinkdatarelocation code2_size, -2, optional
  2000 00000030 [0000]                  reloc	dw relocateddata
  2001                                  otherlinkdatarelocation code2_sel, -2, optional
  2002                                  
  2003 00000032 [D702]                  reloc	dw msg.historyseg
  2004                                  internaldatarelocation
  2005 00000034 [0000]                  reloc	dw relocateddata
  2006                                  otherlinkdatarelocation history_segment, -2, optional
  2007 00000036 0000                    	dw 0
  2008 00000038 [0000]                  reloc	dw relocateddata
  2009                                  otherlinkdatarelocation historyseg_size, -2, optional
  2010 0000003A [0000]                  reloc	dw relocateddata
  2011                                  otherlinkdatarelocation history.segorsel, -2, optional
  2012                                  
  2013 0000003C [E002]                  reloc	dw msg.extseg
  2014                                  internaldatarelocation
  2015 0000003E [0000]                  reloc	dw relocateddata
  2016                                  otherlinkdatarelocation extseg, -2, optional
  2017 00000040 0000                    	dw 0
  2018 00000042 [0000]                  reloc	dw relocateddata
  2019                                  otherlinkdatarelocation extseg_size, -2, optional
  2020 00000044 [0000]                  reloc	dw relocateddata
  2021                                  otherlinkdatarelocation extcssel, -2, optional
  2022                                  
  2023 00000046 [EA02]                  reloc	dw msg.envseg
  2024                                  internaldatarelocation
  2025 00000048 [0000]                  reloc	dw relocateddata
  2026                                  otherlinkdatarelocation envseg, -2, optional
  2027 0000004A 0000                    	dw 0
  2028 0000004C [0000]                  reloc	dw relocateddata
  2029                                  otherlinkdatarelocation env_size, -2, optional
  2030 0000004E 0000                    	dw 0
  2031                                  .end:
  2032                                  .amount equ (.end - .) / 10
  2033                                  
  2034 00000050 0000                    	dw 0
  2035                                  
  2036                                  	align 2, db 0
  2037                                  handlertable:
  2038                                  .command:
  2039                                  	istruc HANDLERTABLE
  2040 00000052 [5C07]                  at htMessage,reloc	dw msg.commandhandler
  2041                                  internaldatarelocation
  2042 00000054 [0000]                  at htHandler,reloc	dw relocateddata
  2043                                  otherlinkdatarelocation ext_command_handler
  2044 00000056 [8D08]                  at htTemplate,reloc	dw template_commandhandler
  2045                                  internalcoderelocation
  2046 00000058 [0000]                  at htReturn,reloc	dw relocateddata
  2047                                  otherlinkdatarelocation cmd3_not_ext
  2048 0000005A 00<rep 2h>              	iend
  2049                                  	istruc HANDLERTABLE
  2050 0000005C [6407]                  at htMessage,reloc	dw msg.preprocesshandler
  2051                                  internaldatarelocation
  2052 0000005E [0000]                  at htHandler,reloc	dw relocateddata
  2053                                  otherlinkdatarelocation ext_preprocess_handler
  2054 00000060 [9408]                  at htTemplate,reloc	dw template_preprocesshandler
  2055                                  internalcoderelocation
  2056 00000062 [0000]                  at htReturn,reloc	dw relocateddata
  2057                                  otherlinkdatarelocation cmd3_preprocessed
  2058 00000064 00<rep 2h>              	iend
  2059 00000066 0000                    	dw 0
  2060                                  
  2061                                  .amis:
  2062                                  	istruc HANDLERTABLE
  2063 00000068 [6F07]                  at htMessage,reloc	dw msg.amishandler
  2064                                  internaldatarelocation
  2065 0000006A [0000]                  at htHandler,reloc	dw relocateddata
  2066                                  otherlinkdatarelocation ext_amis_handler
  2067 0000006C 0000                    at htTemplate,		dw 0
  2068 0000006E 0000                    at htReturn,		dw 0
  2069 00000070 0100                    at htFlags,		dw htfIsAMIS
  2070                                  	iend
  2071 00000072 0000                    	dw 0
  2072                                  
  2073                                  .asm:
  2074                                  	istruc HANDLERTABLE
  2075 00000074 [7407]                  at htMessage,reloc	dw msg.aabeforehandler
  2076                                  internaldatarelocation
  2077 00000076 [0000]                  at htHandler,reloc	dw relocateddata
  2078                                  otherlinkdatarelocation ext_aa_before_getline_handler
  2079 00000078 [9B08]                  at htTemplate,reloc	dw template_aabeforehandler
  2080                                  internalcoderelocation
  2081 0000007A [0000]                  at htReturn,reloc	dw relocateddata
  2082                                  otherlinkdatarelocation aa_before_getline
  2083 0000007C 00<rep 2h>              	iend
  2084                                  	istruc HANDLERTABLE
  2085 0000007E [8507]                  at htMessage,reloc	dw msg.aaafterhandler
  2086                                  internaldatarelocation
  2087 00000080 [0000]                  at htHandler,reloc	dw relocateddata
  2088                                  otherlinkdatarelocation ext_aa_after_getline_handler
  2089 00000082 [A208]                  at htTemplate,reloc	dw template_aaafterhandler
  2090                                  internalcoderelocation
  2091 00000084 [0000]                  at htReturn,reloc	dw relocateddata
  2092                                  otherlinkdatarelocation aa_after_getline
  2093 00000086 00<rep 2h>              	iend
  2094 00000088 0000                    	dw 0
  2095                                  
  2096                                  .puts:
  2097                                  	istruc HANDLERTABLE
  2098 0000008A [9507]                  at htMessage,reloc	dw msg.putshandler
  2099                                  internaldatarelocation
  2100 0000008C [0000]                  at htHandler,reloc	dw relocateddata
  2101                                  otherlinkdatarelocation ext_puts_handler
  2102 0000008E [A908]                  at htTemplate,reloc	dw template_putshandler
  2103                                  internalcoderelocation
  2104 00000090 [0000]                  at htReturn,reloc	dw relocateddata
  2105                                  otherlinkdatarelocation puts_ext_done
  2106 00000092 00<rep 2h>              	iend
  2107                                  	istruc HANDLERTABLE
  2108 00000094 [A807]                  at htMessage,reloc	dw msg.putscohandler
  2109                                  internaldatarelocation
  2110 00000096 [0000]                  at htHandler,reloc	dw relocateddata
  2111                                  otherlinkdatarelocation ext_puts_copyoutput_handler
  2112 00000098 [B008]                  at htTemplate,reloc	dw template_putscohandler
  2113                                  internalcoderelocation
  2114 0000009A [0000]                  at htReturn,reloc	dw relocateddata
  2115                                  otherlinkdatarelocation puts_copyoutput_ext_done
  2116 0000009C 00<rep 2h>              	iend
  2117                                  	istruc HANDLERTABLE
  2118 0000009E [B807]                  at htMessage,reloc	dw msg.putsgetlinehandler
  2119                                  internaldatarelocation
  2120 000000A0 [0000]                  at htHandler,reloc	dw relocateddata
  2121                                  otherlinkdatarelocation ext_puts_getline_handler
  2122 000000A2 [B708]                  at htTemplate,reloc	dw template_putsgetlinehandler
  2123                                  internalcoderelocation
  2124 000000A4 [0000]                  at htReturn,reloc	dw relocateddata
  2125                                  otherlinkdatarelocation puts_getline_ext_done
  2126 000000A6 00<rep 2h>              	iend
  2127 000000A8 0000                    	dw 0
  2128                                  
  2129                                  .inject:
  2130                                  	istruc HANDLERTABLE
  2131 000000AA [C507]                  at htMessage,reloc	dw msg.commandinjecthandler
  2132                                  internaldatarelocation
  2133 000000AC [0000]                  at htHandler,reloc	dw relocateddata
  2134                                  otherlinkdatarelocation ext_inject_handler
  2135 000000AE 0000                    at htTemplate,		dw 0
  2136 000000B0 0000                    at htReturn,		dw 0
  2137 000000B2 0200                    at htFlags,		dw htfIsInject
  2138                                  	iend
  2139                                  	istruc HANDLERTABLE
  2140 000000B4 [D407]                  at htMessage,reloc	dw msg.aainjecthandler
  2141                                  internaldatarelocation
  2142 000000B6 [0000]                  at htHandler,reloc	dw relocateddata
  2143                                  otherlinkdatarelocation ext_aa_inject_handler
  2144 000000B8 0000                    at htTemplate,		dw 0
  2145 000000BA 0000                    at htReturn,		dw 0
  2146 000000BC 0200                    at htFlags,		dw htfIsInject
  2147                                  	iend
  2148 000000BE 0000                    	dw 0
  2149                                  
  2150                                  	align 2, db 0
  2151                                  store_table:
  2152 000000C0 [0000]                  reloc	dw relocateddata
  2153                                  otherlinkdatarelocation patcharea_run, -2, optional
  2154 000000C2 [0000]                  reloc	dw relocateddata
  2155                                  otherlinkdatarelocation patcharea_run.segment, -2, optional
  2156 000000C4 [0000]                  reloc	dw relocateddata
  2157                                  otherlinkdatarelocation patcharea_run.size, -2, optional
  2158 000000C6 [5108]                  reloc	dw msg.patch_area_run
  2159                                  internaldatarelocation
  2160                                  
  2161 000000C8 [0000]                  reloc	dw relocateddata
  2162                                  otherlinkdatarelocation patcharea_intrtn, -2, optional
  2163 000000CA [0000]                  reloc	dw relocateddata
  2164                                  otherlinkdatarelocation patcharea_intrtn.segment, -2, optional
  2165 000000CC [0000]                  reloc	dw relocateddata
  2166                                  otherlinkdatarelocation patcharea_intrtn.size, -2, optional
  2167 000000CE [5508]                  reloc	dw msg.patch_area_intrtn
  2168                                  internaldatarelocation
  2169                                  
  2170 000000D0 [0000]                  reloc	dw relocateddata
  2171                                  otherlinkdatarelocation patcharea_pm_exc, -2, optional
  2172 000000D2 [0000]                  reloc	dw relocateddata
  2173                                  otherlinkdatarelocation patcharea_pm_exc.segment, -2, optional
  2174 000000D4 [0000]                  reloc	dw relocateddata
  2175                                  otherlinkdatarelocation patcharea_pm_exc.size, -2, optional
  2176 000000D6 [6408]                  reloc	dw msg.patch_area_pm_exc
  2177                                  internaldatarelocation
  2178                                  
  2179                                  .end:
  2180                                  
  2181                                  	struc STORETABLEENTRY
  2182 00000000 ????                    steAreaOffset:		resw 1
  2183 00000002 ????                    steAreaSegmentVariable:	resw 1
  2184 00000004 ????                    steAreaLength:		resw 1
  2185 00000006 ????                    steName:		resw 1
  2186                                  	endstruc
  2187                                  
  2188                                  
  2189                                  	align 2, db 0
  2190                                  nountable:
  2191 000000D8 42                      	db msg.all - $ - 1
  2192 000000D9 01                      	db 1
  2193 000000DA [A201]                  reloc	dw msg.all_replace
  2194                                  internaldatarelocation
  2195 000000DC 42                      	db msg.allexceptseg - $ - 1
  2196 000000DD 01                      	db 1
  2197 000000DE [C501]                  reloc	dw msg.allnoseg_replace
  2198                                  internaldatarelocation
  2199 000000E0 63                      	db msg.eldall - $ - 1
  2200 000000E1 01                      	db 1
  2201 000000E2 [E401]                  reloc	dw msg.eldall_replace
  2202                                  internaldatarelocation
  2203 000000E4 71                      	db msg.eldhandlers - $ - 1
  2204 000000E5 01                      	db 1
  2205 000000E6 [FB01]                  reloc	dw msg.eldhandlers_replace
  2206                                  internaldatarelocation
  2207 000000E8 49                      	db msg.mem - $ - 1
  2208 000000E9 00                      	db 0
  2209 000000EA [2D03]                  reloc	dw display_mem
  2210                                  internalcoderelocation
  2211 000000EC 49                      	db msg.history - $ - 1
  2212 000000ED 00                      	db 0
  2213 000000EE [9404]                  reloc	dw historysize
  2214                                  internalcoderelocation
  2215 000000F0 4D                      	db msg.stack - $ - 1
  2216 000000F1 00                      	db 0
  2217 000000F2 [6405]                  reloc	dw stacksize
  2218                                  internalcoderelocation
  2219 000000F4 56                      	db msg.eld - $ - 1
  2220 000000F5 00                      	db 0
  2221 000000F6 [B205]                  reloc	dw display_eld_memory
  2222                                  internalcoderelocation
  2223 000000F8 56                      	db msg.eldvar - $ - 1
  2224 000000F9 00                      	db 0
  2225 000000FA [BD06]                  reloc	dw display_eld_variables
  2226                                  internalcoderelocation
  2227 000000FC 65                      	db msg.commandhandler_noun - $ - 1
  2228 000000FD 00                      	db 0
  2229 000000FE [8F07]                  reloc	dw display_command_handler
  2230                                  internalcoderelocation
  2231 00000100 70                      	db msg.amishandler_noun - $ - 1
  2232 00000101 00                      	db 0
  2233 00000102 [9407]                  reloc	dw display_amis_handler
  2234                                  internalcoderelocation
  2235 00000104 78                      	db msg.asmhandler - $ - 1
  2236 00000105 00                      	db 0
  2237 00000106 [9907]                  reloc	dw display_asm_handler
  2238                                  internalcoderelocation
  2239 00000108 7F                      	db msg.putshandler_noun - $ - 1
  2240 00000109 00                      	db 0
  2241 0000010A [9E07]                  reloc	dw display_puts_handler
  2242                                  internalcoderelocation
  2243 0000010C 87                      	db msg.injecthandler_noun - $ - 1
  2244 0000010D 00                      	db 0
  2245 0000010E [A307]                  reloc	dw display_inject_handler
  2246                                  internalcoderelocation
  2247 00000110 17                      	db msg.seg - $ - 1
  2248 00000111 00                      	db 0
  2249 00000112 [8901]                  reloc	dw display_seg
  2250                                  internalcoderelocation
  2251 00000114 17                      	db msg.patch - $ - 1
  2252 00000115 00                      	db 0
  2253 00000116 [3C02]                  reloc	dw display_patchareas
  2254                                  internalcoderelocation
  2255 00000118 0000                    	dw 0
  2256                                  
  2257                                  history_data_entry:
  2258 0000011A 00                      	db 0
  2259                                  
  2260                                  msg:
  2261 0000011B 414C4C00                .all:		asciz "ALL"
  2262 0000011F 414C4C4E4F53454700      .allexceptseg:	asciz "ALLNOSEG"
  2263 00000128 53454700                .seg:		asciz "SEG"
  2264 0000012C 504154434800            .patch:		asciz "PATCH"
  2265 00000132 4D454D00                .mem:		asciz "MEM"
  2266 00000136 484953544F525900        .history:	asciz "HISTORY"
  2267 0000013E 535441434B00            .stack:		asciz "STACK"
  2268 00000144 454C44414C4C00          .eldall:	asciz "ELDALL"
  2269 0000014B 454C4400                .eld:		asciz "ELD"
  2270 0000014F 454C4456415200          .eldvar:	asciz "ELDVAR"
  2271 00000156 454C4448414E444C45-     .eldhandlers:	asciz "ELDHANDLERS"
  2271 0000015F 525300             
  2272 00000162 434F4D4D414E444841-     .commandhandler_noun:	asciz "COMMANDHANDLER"
  2272 0000016B 4E444C455200       
  2273 00000171 414D495348414E444C-     .amishandler_noun:	asciz "AMISHANDLER"
  2273 0000017A 455200             
  2274 0000017D 41534D48414E444C45-     .asmhandler:		asciz "ASMHANDLER"
  2274 00000186 5200               
  2275 00000188 5055545348414E444C-     .putshandler_noun:	asciz "PUTSHANDLER"
  2275 00000191 455200             
  2276 00000194 494E4A45435448414E-     .injecthandler_noun:	asciz "INJECTHANDLER"
  2276 0000019D 444C455200         
  2277 000001A2 4D454D205345472048-     .all_replace:		asciz "MEM SEG HISTORY STACK ELDALL PATCH"
  2277 000001AB 4953544F5259205354-
  2277 000001B4 41434B20454C44414C-
  2277 000001BD 4C20504154434800   
  2278 000001C5 4D454D20484953544F-     .allnoseg_replace:	asciz "MEM HISTORY STACK ELDALL PATCH"
  2278 000001CE 525920535441434B20-
  2278 000001D7 454C44414C4C205041-
  2278 000001E0 54434800           
  2279 000001E4 454C4420454C445641-     .eldall_replace:	asciz "ELD ELDVAR ELDHANDLERS"
  2279 000001ED 5220454C4448414E44-
  2279 000001F6 4C45525300         
  2280 000001FB 434F4D4D414E444841-     .eldhandlers_replace:	asciz "COMMANDHANDLER AMISHANDLER ASMHANDLER PUTSHANDLER INJECTHANDLER"
  2280 00000204 4E444C455220414D49-
  2280 0000020D 5348414E444C455220-
  2280 00000216 41534D48414E444C45-
  2280 0000021F 52205055545348414E-
  2280 00000228 444C455220494E4A45-
  2280 00000231 435448414E444C4552-
  2280 0000023A 00                 
  2281 0000023B 4E6F756E202200          .notfound.1:		asciz 'Noun "'
  2282 00000242 22206E6F7420666F75-     .notfound.2:		asciz '" not found!',13,10
  2282 0000024B 6E64210D0A00       
  2283 00000251 4C444D454D00            .ldmem:			asciz "LDMEM",OTH_STRING
  2284 00000257 4C444D454D20756E69-     .uninstall_done:	db "LDMEM",OTH_STRING," uninstalled."
  2284 00000260 6E7374616C6C65642E 
  2285                                  %if _ELD_RECLAIM_HINT
  2286                                  			db " (Don't forget to use reclaim.eld)"
  2287                                  %endif
  2288 00000269 0D0A00                  			asciz 13,10
  2289 0000026C 4C444D454D20756E61-     .uninstall_error:	asciz "LDMEM",OTH_STRING," unable to uninstall!",13,10
  2289 00000275 626C6520746F20756E-
  2289 0000027E 696E7374616C6C210D-
  2289 00000287 0A00               
  2290 00000289 05456E747279            .entryseg:	counted "Entry"
  2291 0000028F 00                      		counted
  2292 00000290 074D657373616765        .messageseg:	counted "Message"
  2293 00000298 00                      		counted
  2294 00000299 0A466972737420636F-     .codeseg:	counted "First code"
  2294 000002A2 6465               
  2295 000002A4 05436F646531            		counted "Code1"
  2296 000002AA 0B5365636F6E642063-     .code2seg:	counted "Second code"
  2296 000002B3 6F6465             
  2297 000002B6 05436F646532            		counted "Code2"
  2298 000002BC 10417578696C696172-     .auxbuffseg:	counted "Auxiliary buffer"
  2298 000002C5 7920627566666572   
  2299 000002CD 09417578696C696172-     		counted "Auxiliary"
  2299 000002D6 79                 
  2300 000002D7 07486973746F7279        .historyseg:	counted "History"
  2301 000002DF 00                      		counted
  2302 000002E0 08454C4420636F6465      .extseg:	counted "ELD code"
  2303 000002E9 00                      		counted
  2304 000002EA 0B456E7669726F6E6D-     .envseg:	counted "Environment"
  2304 000002F3 656E74             
  2305 000002F6 03456E76                		counted "Env"
  2306 000002FA 0A207365676D656E74-     .segment_colon:	counted " segment: "
  2306 00000303 3A20               
  2307 00000305 224E6F6E6520285365-     .none:		counted "None (Segment data not available.)"
  2307 0000030E 676D656E7420646174-
  2307 00000317 61206E6F7420617661-
  2307 00000320 696C61626C652E29   
  2308 00000328 1853697A6520646174-     .nonesize:	counted "Size data not available."
  2308 00000331 61206E6F7420617661-
  2308 0000033A 696C61626C652E     
  2309 00000341 022020                  .address.1:	counted "  "
  2310 00000344 0753697A653A2020        .size.1:	counted "Size:  "
  2311 0000034C 022020                  .size.2:	counted "  "
  2312 0000034F 0C202073656C656374-     .sel:		counted "  selector: "
  2312 00000358 6F723A20           
  2313 0000035C 15456E7472792F6461-     .dssel:		counted "Entry/data selector: "
  2313 00000365 74612073656C656374-
  2313 0000036E 6F723A20           
  2314 00000372 20454C4420636F6465-     .extdssel:	counted "ELD code segment data selector: "
  2314 0000037B 207365676D656E7420-
  2314 00000384 646174612073656C65-
  2314 0000038D 63746F723A20       
  2315 00000393 546F74616C20616C6C-     .alloc:		fill 26, 32, db "Total allocation: "
  2315 0000039C 6F636174696F6E3A20-
  2315 000003A5 20<rep 8h>         
  2316 000003AD 00                      		asciz
  2317 000003AE 1A                      .gap:		db .gap.end - ($ + 1)
  2318 000003AF 4761703A2020-           		fill 26, 32, db "Gap: "
  2318 000003AF <rep 15h>          
  2319                                  .gap.end:
  2320 000003C9 4F7665726C6170210D-     .overlap:		asciz "Overlap!",13,10
  2320 000003D2 0A00               
  2321 000003D4 4E6F20686973746F72-     .history_none:		asciz "No history format link found.",13,10
  2321 000003DD 7920666F726D617420-
  2321 000003E6 6C696E6B20666F756E-
  2321 000003EF 642E0D0A00         
  2322 000003F4 486973746F72792069-     .history_data_entry:	asciz "History in data entry section.",13,10
  2322 000003FD 6E206461746120656E-
  2322 00000406 747279207365637469-
  2322 0000040F 6F6E2E0D0A00       
  2323 00000415 486973746F72792069-     .history_separate:	asciz "History in a separate segment.",13,10
  2323 0000041E 6E2061207365706172-
  2323 00000427 617465207365676D65-
  2323 00000430 6E742E0D0A00       
  2324 00000436 556E6B6E6F776E2068-     .history_unknown:	asciz "Unknown history format.",13,10
  2324 0000043F 6973746F727920666F-
  2324 00000448 726D61742E0D0A00   
  2325 00000450 486973746F7279206C-     .history_missing:	asciz "History last or first displacement or segment missing.",13,10
  2325 00000459 617374206F72206669-
  2325 00000462 72737420646973706C-
  2325 0000046B 6163656D656E74206F-
  2325 00000474 72207365676D656E74-
  2325 0000047D 206D697373696E672E-
  2325 00000486 0D0A00             
  2326 00000489 11486973746F727920-     .history.1:		counted "History entries: "
  2326 00000492 656E74726965733A20 
  2327 0000049B 110D0A486973746F72-     .history.2:		counted 13,10,"History bytes: "
  2327 000004A4 792062797465733A20 
  2328 000004AD 082075736564202F20      .history.3:		counted " used / "
  2329 000004B6 2920746F74616C0D0A-     .history.average.1:	counted " total",13,10,"Average history entry size is <= "
  2329 000004BF 417665726167652068-
  2329 000004C8 6973746F727920656E-
  2329 000004D1 7472792073697A6520-
  2329 000004DA 6973203C3D20       
  2330 000004E0 072062797465732E        .history.average.2:	counted " bytes."
  2331 000004E8 3520746F74616C0D0A-     .history.average.none:	counted " total",13,10,"Cannot calculate average, no history entries."
  2331 000004F1 43616E6E6F74206361-
  2331 000004FA 6C63756C6174652061-
  2331 00000503 7665726167652C206E-
  2331 0000050C 6F20686973746F7279-
  2331 00000515 20656E74726965732E 
  2332 0000051E 164E6F20737461636B-     .stack.none:		counted "No stack link found.",13,10
  2332 00000527 206C696E6B20666F75-
  2332 00000530 6E642E0D0A         
  2333 00000535 0C537461636B207369-     .stack.1:		counted "Stack size: "
  2333 0000053E 7A653A20           
  2334 00000542 1E2062797465730D0A-     .stack.2:		counted " bytes",13,10,"Heuristic match byte: "
  2334 0000054B 486575726973746963-
  2334 00000554 206D61746368206279-
  2334 0000055D 74653A20           
  2335 00000561 1B680D0A4865757269-     .stack.3:		counted "h",13,10,"Heuristic unused stack: "
  2335 0000056A 7374696320756E7573-
  2335 00000573 656420737461636B3A-
  2335 0000057C 20                 
  2336 0000057D 082062797465730D0A      .stack.4:		counted " bytes",13,10
  2337 00000586 4C6F6164656420454C-     .eld.1:			asciz "Loaded ELDs:",13,10
  2337 0000058F 44733A0D0A00       
  2338 00000595 4572726F7220647572-     .eld.error:		asciz "Error during ELD enumeration.",13,10
  2338 0000059E 696E6720454C442065-
  2338 000005A7 6E756D65726174696F-
  2338 000005B0 6E2E0D0A00         
  2339 000005B5 0A4672656520737061-     .eld.free:		counted "Free space"
  2339 000005BE 6365               
  2340 000005C0 022028                  .eld.free.2:		counted " ("
  2341 000005C3 0129                    .eld.free.3:		counted ")"
  2342 000005C5 0D2C20636F64652073-     .eld.2:			counted ", code start "
  2342 000005CE 7461727420         
  2343 000005D3 072C2073746F7020        .eld.3:			counted ", stop "
  2344 000005DB 072C2073697A6520        .eld.4:			counted ", size "
  2345 000005E3 19                      .eld.5:			db .eld.5.end - ($ + 1)
  2346 000005E4 0D0A                    			db 13,10
  2347 000005E6 20<rep Ch>              			times 8 + 2 + 2 db 32
  2348 000005F2 446174612073746172-     			db "Data start "
  2348 000005FB 7420               
  2349                                  .eld.5.end:
  2350 000005FD 174672656520737061-     .eld.6:			counted "Free space, data start "
  2350 00000606 63652C206461746120-
  2350 0000060F 737461727420       
  2351 00000615 154578742076617269-     .var.format:		counted "Ext variables format="
  2351 0000061E 61626C657320666F72-
  2351 00000627 6D61743D           
  2352 0000062B 12682C207374727563-     .var.size:		counted "h, structure size="
  2352 00000634 747572652073697A65-
  2352 0000063D 3D                 
  2353 0000063E 19680D0A416D6F756E-     .var.amount:		counted "h",13,10,"Amount ext variables: "
  2353 00000647 742065787420766172-
  2353 00000650 6961626C65733A20   
  2354 00000658 082075736564202F20      .var.amountbetween:	counted " used / "
  2355 00000661 0620746F74616C          .var.amountafter:	counted " total"
  2356 00000668 0D0A556E6B6E6F776E-     .varunknown:		db 13,10,"Unknown ext variables format="
  2356 00000671 206578742076617269-
  2356 0000067A 61626C657320666F72-
  2356 00000683 6D61743D           
  2357 00000687 2D2D2D2D68              .varunknown.format:	db "----h"
  2358 0000068C 0D0A                    .linebreak:		db 13,10
  2359 0000068E 00                      .empty:			asciz
  2360 0000068F 06466C6167733D          .var.list.flags:	counted "Flags="
  2361 00000696 08682061727261793D      .var.list.array:	counted "h array="
  2362 0000069F 0A6820626574776565-     .var.list.between:	counted "h between="
  2362 000006A8 6E3D               
  2363 000006AA 0868206E616D653D22      .var.list.name:		counted "h name=",'"'
  2364 000006B3 0A220D0A20456E7472-     .var.list.entry:	counted '"',13,10," Entry="
  2364 000006BC 793D               
  2365 000006BE 0C682C20696E737461-     .instance.1:		counted "h, instance="
  2365 000006C7 6E63653D           
  2366 000006CB 0F682C206964656E74-     .instance.2:		counted "h, identifier=",'"'
  2366 000006D4 69666965723D22     
  2367 000006DB 0122                    .instance.3:		counted '"'
  2368 000006DD 16682E20496E737461-     .instance.notfound:	counted "h. Instance not found!"
  2368 000006E6 6E6365206E6F742066-
  2368 000006EF 6F756E6421         
  2369 000006F4 12682E20496E737461-     .instance.error:	counted "h. Instance error!"
  2369 000006FD 6E6365206572726F72-
  2369 00000706 21                 
  2370 00000707 0720456E7472793D        .commandhandler.entry:	counted " Entry="
  2371 0000070F 0D0A00                  .handler.init.pre:	asciz 13,10
  2372 00000712 2068616E646C657273-     .handler.init.post:	asciz " handlers:",13,10
  2372 0000071B 3A0D0A00           
  2373 0000071F 20456E7472793D3030-     .handler.none.pre:	asciz " Entry=0000h - No "
  2373 00000728 303068202D204E6F20-
  2373 00000731 00                 
  2374 00000732 2068616E646C657220-     .handler.none.post:	asciz " handler installed.",13,10
  2374 0000073B 696E7374616C6C6564-
  2374 00000744 2E0D0A00           
  2375 00000748 2000                    .handler.error.pre:	asciz " "
  2376 0000074A 2068616E646C657220-     .handler.error.post:	asciz " handler error!",13,10
  2376 00000753 6572726F72210D0A00 
  2377 0000075C 436F6D6D616E6400        .commandhandler:	asciz "Command"
  2378 00000764 50726570726F636573-     .preprocesshandler:	asciz "Preprocess"
  2378 0000076D 7300               
  2379 0000076F 414D495300              .amishandler:		asciz "AMIS"
  2380 00000774 417373656D626C6572-     .aabeforehandler:	asciz "Assembler before"
  2380 0000077D 206265666F726500   
  2381 00000785 417373656D626C6572-     .aaafterhandler:	asciz "Assembler after"
  2381 0000078E 20616674657200     
  2382 00000795 4D756C74692D707572-     .putshandler:		asciz "Multi-purpose puts"
  2382 0000079E 706F73652070757473-
  2382 000007A7 00                 
  2383 000007A8 434F50594F55545055-     .putscohandler:		asciz "COPYOUTPUT puts"
  2383 000007B1 54207075747300     
  2384 000007B8 4745544C494E452070-     .putsgetlinehandler:	asciz "GETLINE puts"
  2384 000007C1 75747300           
  2385 000007C5 436F6D6D616E642069-     .commandinjecthandler:	asciz "Command inject"
  2385 000007CE 6E6A65637400       
  2386 000007D4 417373656D626C6572-     .aainjecthandler:	asciz "Assembler inject"
  2386 000007DD 20696E6A65637400   
  2387 000007E5 506174636820617265-     .patch_area.1:		asciz "Patch area, length "
  2387 000007EE 612C206C656E677468-
  2387 000007F7 2000               
  2388 000007F9 2028696E2075736529-     .patch_area.2.inuse:	asciz " (in use), "
  2388 00000802 2C2000             
  2389 00000805 202866726565292C20-     .patch_area.2.notinuse:	asciz " (free), "
  2389 0000080E 00                 
  2390 0000080F 656E74727900            .patch_area.3.entry:	asciz "entry"
  2391 00000815 636F646500              .patch_area.3.code:	asciz "code"
  2392 0000081A 756E6B6E6F776E3D        .patch_area.3.unknown:	db "unknown="
  2393 00000822 2D2D2D2D6800            .patch_area.3.unknown.s:asciz "----h"
  2394 00000828 3A                      .patch_area.3.offset:	db ":"
  2395 00000829 2D2D2D2D682C2000        .patch_area.3.offset.o:	asciz "----h, "
  2396 00000831 6E616D653A2000          .patch_area.4:		asciz "name: "
  2397 00000838 506174636820617265-     .patch_area.5:		asciz "Patch area not present: "
  2397 00000841 61206E6F7420707265-
  2397 0000084A 73656E743A2000     
  2398 00000851 52756E00                .patch_area_run:	asciz "Run"
  2399 00000855 3836204D6F64652069-     .patch_area_intrtn:	asciz "86 Mode intrtn"
  2399 0000085E 6E7472746E00       
  2400 00000864 50726F746563746564-     .patch_area_pm_exc:	asciz "Protected Mode exc"
  2400 0000086D 204D6F646520657863-
  2400 00000876 00                 
  2401                                  
  2402                                  uinit_data: equ $
  2403 00000877 4C444D454D20696E73-     .installed:		asciz "LDMEM",OTH_STRING," installed.",13,10
  2403 00000880 74616C6C65642E0D0A-
  2403 00000889 00                 
  2404 0000088A 48454C5000              .keyword_help:		asciz "HELP"
  2405 0000088F 5468697320454C4420-     .help:		db "This ELD can be installed residently or used transiently.",13,10
  2405 00000898 63616E20626520696E-
  2405 000008A1 7374616C6C65642072-
  2405 000008AA 65736964656E746C79-
  2405 000008B3 206F72207573656420-
  2405 000008BC 7472616E7369656E74-
  2405 000008C5 6C792E0D0A         
  2406 000008CA 0D0A                    		db 13,10
  2407 000008CC 416E79206E756D6265-     		db "Any number of keywords can be passed to this ELD to choose output:",13,10
  2407 000008D5 72206F66206B657977-
  2407 000008DE 6F7264732063616E20-
  2407 000008E7 626520706173736564-
  2407 000008F0 20746F207468697320-
  2407 000008F9 454C4420746F206368-
  2407 00000902 6F6F7365206F757470-
  2407 0000090B 75743A0D0A         
  2408 00000910 09286E6F6E65290909-     		db 9,"(none)",9,9,"Alias to ALLNOSEG",13,10
  2408 00000919 416C69617320746F20-
  2408 00000922 414C4C4E4F5345470D-
  2408 0000092B 0A                 
  2409 0000092C 09414C4C0909446973-     		db 9,"ALL",9,9,"Display all output",13,10
  2409 00000935 706C617920616C6C20-
  2409 0000093E 6F75747075740D0A   
  2410 00000946 09414C4C4E4F534547-     		db 9,"ALLNOSEG",9,"Display all output except SEG",13,10
  2410 0000094F 09446973706C617920-
  2410 00000958 616C6C206F75747075-
  2410 00000961 742065786365707420-
  2410 0000096A 5345470D0A         
  2411 0000096F 09454C44414C4C0909-     		db 9,"ELDALL",9,9,"Display all ELD output",13,10
  2411 00000978 446973706C61792061-
  2411 00000981 6C6C20454C44206F75-
  2411 0000098A 747075740D0A       
  2412 00000990 09454C4448414E444C-     		db 9,"ELDHANDLERS",9,"Display all ELD handlers",13,10
  2412 00000999 45525309446973706C-
  2412 000009A2 617920616C6C20454C-
  2412 000009AB 442068616E646C6572-
  2412 000009B4 730D0A             
  2413 000009B7 094D454D0909446973-     		db 9,"MEM",9,9,"Display memory areas with segments/selectors",13,10
  2413 000009C0 706C6179206D656D6F-
  2413 000009C9 727920617265617320-
  2413 000009D2 77697468207365676D-
  2413 000009DB 656E74732F73656C65-
  2413 000009E4 63746F72730D0A     
  2414 000009EB 095345470909446973-     		db 9,"SEG",9,9,"Display segments/selectors mostly on one line",13,10
  2414 000009F4 706C6179207365676D-
  2414 000009FD 656E74732F73656C65-
  2414 00000A06 63746F7273206D6F73-
  2414 00000A0F 746C79206F6E206F6E-
  2414 00000A18 65206C696E650D0A   
  2415 00000A20 09484953544F525909-     		db 9,"HISTORY",9,9,"Display history utilisation",13,10
  2415 00000A29 09446973706C617920-
  2415 00000A32 686973746F72792075-
  2415 00000A3B 74696C69736174696F-
  2415 00000A44 6E0D0A             
  2416 00000A47 09535441434B090944-     		db 9,"STACK",9,9,"Display stack utilisation",13,10
  2416 00000A50 6973706C6179207374-
  2416 00000A59 61636B207574696C69-
  2416 00000A62 736174696F6E0D0A   
  2417 00000A6A 09454C440909446973-     		db 9,"ELD",9,9,"Display ELD code instances and data blocks use",13,10
  2417 00000A73 706C617920454C4420-
  2417 00000A7C 636F646520696E7374-
  2417 00000A85 616E63657320616E64-
  2417 00000A8E 206461746120626C6F-
  2417 00000A97 636B73207573650D0A 
  2418 00000AA0 09454C445641520909-     		db 9,"ELDVAR",9,9,"Display ELD variables",13,10
  2418 00000AA9 446973706C61792045-
  2418 00000AB2 4C4420766172696162-
  2418 00000ABB 6C65730D0A         
  2419 00000AC0 09434F4D4D414E4448-     		db 9,"COMMANDHANDLER",9,"Display ELD command and preprocess handlers",13,10
  2419 00000AC9 414E444C4552094469-
  2419 00000AD2 73706C617920454C44-
  2419 00000ADB 20636F6D6D616E6420-
  2419 00000AE4 616E64207072657072-
  2419 00000AED 6F636573732068616E-
  2419 00000AF6 646C6572730D0A     
  2420 00000AFD 09414D495348414E44-     		db 9,"AMISHANDLER",9,"Display ELD AMIS handlers",13,10
  2420 00000B06 4C455209446973706C-
  2420 00000B0F 617920454C4420414D-
  2420 00000B18 49532068616E646C65-
  2420 00000B21 72730D0A           
  2421 00000B25 0941534D48414E444C-     		db 9,"ASMHANDLER",9,"Display ELD assembly handlers",13,10
  2421 00000B2E 455209446973706C61-
  2421 00000B37 7920454C4420617373-
  2421 00000B40 656D626C792068616E-
  2421 00000B49 646C6572730D0A     
  2422 00000B50 095055545348414E44-     		db 9,"PUTSHANDLER",9,"Display ELD puts-related handlers",13,10
  2422 00000B59 4C455209446973706C-
  2422 00000B62 617920454C44207075-
  2422 00000B6B 74732D72656C617465-
  2422 00000B74 642068616E646C6572-
  2422 00000B7D 730D0A             
  2423 00000B80 09494E4A4543544841-     		db 9,"INJECTHANDLER",9,"Display ELD inject handlers",13,10
  2423 00000B89 4E444C455209446973-
  2423 00000B92 706C617920454C4420-
  2423 00000B9B 696E6A656374206861-
  2423 00000BA4 6E646C6572730D0A   
  2424 00000BAC 095041544348090944-     		db 9,"PATCH",9,9,"Display patch areas",13,10
  2424 00000BB5 6973706C6179207061-
  2424 00000BBE 746368206172656173-
  2424 00000BC7 0D0A               
  2425 00000BC9 00                      		asciz
  2426                                  
  2427 00000BCA 00<rep 6h>              	align 16, db 0
  2428                                  init_data_end:
  2429                                  data_size equ $ - datastart
  2430                                  transient_data_size equ data_size
  2431                                  
  2432                                  	absolute uinit_data
  2433 00000877 ??                      	alignb 2
  2434                                  separatormessage:
  2435 00000878 ????                    	resw 1
  2436                                  
  2437 0000087A ????????????            	alignb 8
  2438                                  table_sorted:
  2439 00000880 <res 52h>               	resb 10 * table.amount + 2
  2440                                  
  2441 000008D2 <res Eh>                	alignb 16
  2442                                  uinit_data_end:
  2443                                  resident_data_end:
  2444                                  resident_data_size equ resident_data_end - datastart
  2445                                  
  2446                                  %if uinit_data_end >= init_data_end
  2447                                   total_data_size equ $ - datastart
  2448                                  %else
  2449                                   total_data_size equ init_data_end - datastart
  2450                                  %endif
  2451                                  %assign _DATA_SIZE total_data_size
  2452                                  
  2453                                  
  2454                                  	usesection CODE
  2455                                  
  2456                                  install:
  2457 00000A90 AC                      	lodsb
  2458 00000A91 E8[0000]EB020000        	extcall chkeol
  2459                                  
  2460                                  	houdini
  2461 00000A98 8EC3                    	mov es, bx		; => ext seg (writable)
  2462                                  
  2463 00000A9A B8B000                  	mov ax, endresident - endinstalled
  2464 00000A9D 262906[0200]            reloc	sub word [es:code + eldiEndCode], ax
  2465                                  internalcoderelocation		; adjust size
  2466 00000AA2 2906[0000]              reloc	sub word [relocateddata], ax
  2467                                  linkdatarelocation extseg_used	; adjust size
  2468                                  
  2469                                  %if (transient_data_size - resident_data_size) > 0
  2470 00000AA6 B8F002                  	mov ax, transient_data_size - resident_data_size
  2471 00000AA9 262906[0600]            reloc	sub word [es:code + eldiEndData], ax
  2472                                  internalcoderelocation		; adjust size
  2473 00000AAE 2906[0000]              reloc	sub word [relocateddata], ax
  2474                                  linkdatarelocation extdata_used	; adjust size
  2475                                  %endif
  2476                                  
  2477 00000AB2 8B1E[0000]              reloc	mov bx, word [relocateddata]
  2478                                  linkdatarelocation ext_command_handler
  2479                                  				; -> prior
  2480 00000AB6 BF[2000]                reloc	mov di, command		; -> our handler
  2481                                  internalcoderelocation
  2482 00000AB9 85DB                    	test bx, bx		; installing as first ?
  2483 00000ABB 740A                    	jz .only_first		; yes, simple --> (leave as extcall cmd3_not_ext)
  2484 00000ABD AF                      	scasw			; skip entrypoint jmp strict short
  2485 00000ABE B0E9                    	mov al, 0E9h		; = jmp near opcode
  2486 00000AC0 AA                      	stosb			; store
  2487 00000AC1 93                      	xchg ax, bx		; ax -> next handler
  2488 00000AC2 29F8                    	sub ax, di
  2489 00000AC4 48                      	dec ax
  2490 00000AC5 48                      	dec ax			; ax = ax - (di + 2)
  2491 00000AC6 AB                      	stosw			; store our downlink as rel16 displacement
  2492                                  
  2493                                  .only_first:
  2494 00000AC7 26800E[1000]01          reloc	setopt [es:code + eldiFlags], eldifResident
  2495                                  internalcoderelocation -3	; mark block as resident
  2496 00000ACD C706[0000][2000]        reloc2	mov word [relocateddata], command
  2497                                  linkdatarelocation ext_command_handler, -4
  2498                                  internalcoderelocation		; -> our entrypoint
  2499                                  
  2500 00000AD3 F606[0000]04            reloc	testopt [relocateddata], 4
  2501                                  linkdatarelocation options7, -3
  2502 00000AD8 7506                    	jnz @F
  2503 00000ADA BA[7708]                reloc	mov dx, msg.installed
  2504                                  internaldatarelocation
  2505 00000ADD E8E0FE                  	call putsz
  2506                                  @@:
  2507 00000AE0 31C0                    	xor ax, ax
  2508 00000AE2 CB                      	retf
  2509                                  
  2510                                  
  2511                                  %include "eldlink.asm"
     1                              <1> %if 0
     2                              <1> 
     3                              <1> Extensions for lDebug linker
     4                              <1> 
     5                              <1> Copyright (C) 2008-2025 E. C. Masloch
     6                              <1> 
     7                              <1> Usage of the works is permitted provided that this
     8                              <1> instrument is retained with the works, so that any entity
     9                              <1> that uses the works is notified of this instrument.
    10                              <1> 
    11                              <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <1> 
    13                              <1> %endif
    14                              <1> 
    15                              <1> %include "lmacros3.mac"
     1                              <2> [list -]
    16                              <1> %include "eld.mac"
     1                              <2> %if 0
     2                              <2> 
     3                              <2> Extensions for lDebug macros
     4                              <2> 
     5                              <2> Copyright (C) 2008-2025 E. C. Masloch
     6                              <2> 
     7                              <2> Usage of the works is permitted provided that this
     8                              <2> instrument is retained with the works, so that any entity
     9                              <2> that uses the works is notified of this instrument.
    10                              <2> 
    11                              <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
    12                              <2> 
    13                              <2> %endif
    14                              <2> 
    15                              <2> %ifndef ELD_MAC
    16                              <2> %define ELD_MAC 1
    17                              <2> 
    18                              <2> %include "lmacros3.mac"
    19                              <2> 
    20                              <2> 		; ELD executable header
    21                              <2> 	struc ELD_HEADER
    22                              <2> eldhSignature:		resb 4	; "ELD1"
    23                              <2> 			resb 3	; reserved
    24                              <2> 			resb 1	; 26 (Ctrl-Z)
    25                              <2> eldhCodeOffset:		resd 1	; position displacement from eldhSignature
    26                              <2> eldhCodeImageLength:	resw 1	; amount bytes, at least 32
    27                              <2> eldhCodeAllocLength:	resw 1	; amount bytes, added to prior. sum < 64 KiB
    28                              <2> eldhDataOffset:		resd 1
    29                              <2> eldhDataImageLength:	resw 1	; (zero allowed)
    30                              <2> eldhDataAllocLength:	resw 1	; (zero allowed)
    31                              <2> eldhCodeEntrypoint:	resw 1	; within code section, used as displacement
    32                              <2> eldhReserved:		resb 4	; reserved
    33                              <2> eldhExtensionSize:	resw 1	; from eldhSignature, -> past eldhx fields in use
    34                              <2> 	endstruc
    35                              <2> 	endarea ELD_HEADER, 1
    36                              <2> 
    37                              <2> 	struc ELD_HEADERX
    38                              <2> eldhxHeader:		resb ELD_HEADER_size
    39                              <2> eldhxDescriptionOffset:	resd 1	; zero if none, from eldhxHeader. <= 128 Bytes
    40                              <2> eldhxHelpOffset:	resd 1	; zero if none, from eldhxHeader
    41                              <2> eldhxLibTable:		resd 1	; zero if none, from eldhxHeader
    42                              <2> eldhxDateTimeOffset:	resd 1	; zero if none, from eldhxHeader
    43                              <2> 	alignb 16
    44                              <2> 	endstruc
    45                              <2> 
    46                              <2> 	struc ELD_TRAILER_HEADER
    47                              <2> eldthSignature:		resb 8	; "ELD1TAIL"
    48                              <2> eldthHeaderOffset:	resd 1	; negative displacement from eldthSignature,
    49                              <2> 				;  add this dword to the seek offset
    50                              <2> eldthReserved:		resw 1	; reserved, must be initialised to zero
    51                              <2> eldthChecksum:		resw 1	; sum of all words in trailer header = 0
    52                              <2> 	endstruc
    53                              <2> 	endarea ELD_TRAILER_HEADER, 1
    54                              <2> 
    55                              <2> 	struc ELD_LIBTABLE
    56                              <2> eldltFormat:		resw 1
    57                              <2> 	; 0 = uncompressed
    58                              <2> 	; 2 = heatshrink compressed
    59                              <2> 	; 3 = lzexedat -4 compressed
    60                              <2> 	; 4 = lzexedat -4 -l compressed
    61                              <2> eldltAmount:		resw 1
    62                              <2> eldltOffset:		resd 1	; from eldhxHeader
    63                              <2> eldltCompressedLength:		; (dword, only present if format 2, 3, or 4)
    64                              <2> 	endstruc
    65                              <2> 	endarea ELD_LIBTABLE, 1
    66                              <2> 
    67                              <2> 		; ELD instance header
    68                              <2> 	struc ELD_INSTANCE
    69                              <2> eldiStartCode:		resw 1	; -> this structure itself (para aligned)
    70                              <2> eldiEndCode:		resw 1	; -> behind memory used by instance (para aligned)
    71                              <2> eldiStartData:		resw 1	; -> data in data entry section (para aligned), or 0
    72                              <2> eldiEndData:		resw 1	; -> behind data (para aligned), or 0
    73                              <2> eldiIdentifier:		resb 8	; blank-filled text
    74                              <2> eldiFlags:		resw 1	; flags
    75                              <2> eldiListing_size equ 14
    76                              <2> eldiListing:		resb eldiListing_size
    77                              <2> 				; ASCIZ listing file name
    78                              <2> 	endstruc
    79                              <2> 		; flags for eldiFlags:
    80                              <2> eldifResident:		equ 1
    81                              <2> 
    82                              <2> 		; ELD link info header
    83                              <2> 	struc ELD_LINKINFO
    84                              <2> eldlSignature:		resw 1	; 0E1D1h
    85                              <2> eldlReserved:		resw 2
    86                              <2> eldlUseLinkHash:	resw 1
    87                              <2> eldlDataAmount:		resw 1
    88                              <2> eldlDataPrefixes:	resw 1
    89                              <2> eldlDataEntries:	resw 1
    90                              <2> eldlDataAddresses:	resw 1
    91                              <2> eldlCodeAmount:		resw 1
    92                              <2> eldlCodePrefixes:	resw 1
    93                              <2> eldlCodeEntries:	resw 1
    94                              <2> eldlCodeAddresses:	resw 1
    95                              <2> 	endstruc
    96                              <2> 
    97                              <2> 	numdef ELD_CODE_VSTART, 9001h
    98                              <2> 	numdef ELD_DATA_VSTART, 8000h
    99                              <2> 	numdef ELD_RELOC_VSTART, 8000h
   100                              <2> 
   101                              <2> 	numdef ELD_RECLAIM_HINT, 0
   102                              <2> 	strdef ELD_LISTING, ""
   103                              <2> 	numdef ELD_DATETIME, 0
   104                              <2> 
   105                              <2> %if _ELD_DATETIME
   106                              <2>  %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart
   107                              <2>  %macro PUT_ELD_DATETIME 0.nolist
   108                              <2> datetime:	asciz __UTC_DATE__,'T',__UTC_TIME__,'Z'
   109                              <2> 		asciz		; for future extension
   110                              <2>  %endmacro
   111                              <2> %else
   112                              <2>  %define PUT_ELDHX_DATETIME_OFFSET
   113                              <2>  %define PUT_ELD_DATETIME
   114                              <2> %endif
   115                              <2> 
   116                              <2> %endif
    17                              <1> 
    18                              <1> 	cpu 8086
    19                              <1> 
    20                              <1> %if ELDSTRICT
    21                              <1>  %if ELDSTRICTCOUNTER
    22                              <1>   %error Missing relocation
    23                              <1>  %endif
    24                              <1> %endif
    25                              <1> 	eldstrict off		; linker does some relocations
    26                              <1> 
    27                              <1> %ifn ELDCALLCALL_DUMPED
    28                              <1> 	eldcall_dump_callcall ELDCALL_CALLCALL_LIST
    29                              <1> %endif
    30                              <1> 
    31                              <1> 	numdef ELD_IDENTICALISE, 0
    32                              <1> 	numdef ELD_DEBUG, 0
    33                              <1> 	numdef ELD_LINKER_PASSES, 1
    34                              <1> 	strdef LISTING, _ELD_LISTING
    35                              <1> 	numdef ELDCALL_OPTIONAL, ELDCALL_OPTIONAL_STATUS
    36                              <1> 	numdef ELDDATA_OPTIONAL, ELDDATA_OPTIONAL_STATUS
    37                              <1> %if _ELD_IDENTICALISE
    38                              <1>  ;%assign _ELDCALL_OPTIONAL 1
    39                              <1> %endif
    40                              <1> %ifn _ELDCALL_OPTIONAL
    41                              <1> %assign ELDCALL_OPTIONAL_STATUS 2		; not allowed
    42                              <1> %endif
    43                              <1> ;%ifn _ELDDATA_OPTIONAL
    44                              <1> ;%assign ELDDATA_OPTIONAL_STATUS 2		; not allowed
    45                              <1> ;%endif
    46                              <1> 	gendef MAP, ""
    47                              <1> 
    48                              <1> %ifnidni _MAP, ""
    49                              <1>  [map all _MAP]
    50                              <1> %endif
    51                              <1> 
    52                              <1> 
    53                              <1> endresident: equ ($ + _CURRENT_SECTION %+ FIXUP + 15) & ~15
    54                              <1> 
    55                              <1> %if _ELD_LINKER_PASSES
    56                              <1> %assign ELDLINKER 1
    57                              <1> 
    58                              <1> 	struc LINKTABLE
    59 00000000 ????????            <1> ltCodeToCode:	resw 2
    60 00000004 ????????            <1> ltCodeToData:	resw 2
    61 00000008 ????????            <1> ltDataToCode:	resw 2
    62 0000000C ????????            <1> ltDataToData:	resw 2
    63 00000010 ????????            <1> ltLinkData:	resw 2
    64 00000014 ????????            <1> ltLinkCode:	resw 2
    65                              <1> 	endstruc
    66                              <1> %endif
    67                              <1> 
    68                              <1> 
    69                              <1> linker:
    70                              <1> 		; The first 15 Bytes of the linker should be
    71                              <1> 		;  the same regardless of the linker options
    72                              <1> 		;  used (debug, passes, vstart). This allows
    73                              <1> 		;  the eldcomp ELD to match even if up to 15
    74                              <1> 		;  Bytes of the linker are trailing in the
    75                              <1> 		;  resident part of the ELD.
    76                              <1> 	lframe
    77                              <1>  %if ELDOTHER
    78                              <1> 	lvar dword, linkinfo_other
    79                              <1> 	lvar word, use_hash_other
    80                              <1>  %endif
    81 00000AE3 5589E5              <1> 	lenter
    82                              <1> 	lvar dword, instance
    83 00000AE6 06                  <1> 	 push es
    84 00000AE7 52                  <1> 	 push dx
    85                              <1> 	lvar word, targetsection_low_optional_high
    86 00000AE8 50                  <1> 	 push ax
    87                              <1> 	lequ ?targetsection_low_optional_high, targetsection
    88                              <1> 	lequ ?targetsection_low_optional_high + 1, optional
    89                              <1> 	lvar dword, linkinfo
    90 00000AE9 1E                  <1> 	 push ds
    91 00000AEA 57                  <1> 	 push di
    92                              <1> 	lvar dword, nextreloc
    93 00000AEB 06                  <1> 	 push es
    94 00000AEC 52                  <1> 	 push dx
    95                              <1> 	lvar dword, entry
    96 00000AED 06                  <1> 	 push es
    97 00000AEE 50                  <1> 	 push ax		; placeholder
    98 00000AEF 31C0                <1> 	xor ax, ax
    99 00000AF1 813DD1E1            <1> 	cmp word [di + eldlSignature], 0E1D1h
   100                              <1> %if ($ - linker) < 16
   101                              <1>  %error Expected invariant first paragraph of linker
   102                              <1> %endif
   103 00000AF5 7403E95502          <1> 	jne .error_j
   104 00000AFA 837D0601            <1> 	cmp word [di + eldlUseLinkHash], 1
   105 00000AFE 7603E94C02          <1> 	ja .error_j
   106 00000B03 7201                <1> 	jb @F
   107 00000B05 48                  <1> 	dec ax
   108                              <1> @@:
   109                              <1> 	lvar word, use_hash
   110 00000B06 50                  <1> 	 push ax
   111                              <1> %if _ELD_IDENTICALISE && _ELD_LINKER_PASSES
   112                              <1> 	mov ax, linktable - code
   113                              <1> 	lvar word, lt
   114                              <1> 	 push ax
   115                              <1> %endif
   116                              <1> %if _ELD_LINKER_PASSES || ELDOTHER
   117 00000B07 31C0                <1> 	xor ax, ax
   118                              <1>  %if _ELD_LINKER_PASSES
   119                              <1> 	lvar word, pass
   120 00000B09 50                  <1> 	 push ax
   121                              <1> 	lvar word, amounterrors
   122 00000B0A 50                  <1> 	 push ax
   123                              <1> 	lvar word, name
   124 00000B0B 50                  <1> 	 push ax
   125                              <1>  %endif
   126                              <1>  %if ELDOTHER
   127                              <1> 	lvar word, other
   128                              <1> 	 push ax
   129                              <1>  %endif
   130                              <1> %endif
   131 00000B0C 56                  <1> 	push si
   132 00000B0D 53                  <1> 	push bx
   133                              <1> 
   134                              <1> 			; simple: add instance base (dx) to code
   135 00000B0E 06                  <1> 	push es
   136 00000B0F 1F                  <1> 	pop ds
   137                              <1> %if _ELD_LINKER_PASSES
   138                              <1> .pass:
   139 00000B10 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   140 00000B13 01D3                <1> 	add bx, dx
   141                              <1>  %if _ELD_IDENTICALISE
   142                              <1> 	add bx, word [bp + ?lt]
   143                              <1> 	mov si, word [ltCodeToCode + bx]
   144                              <1>  %else
   145 00000B15 8BB7BC0E            <1> 	mov si, word [linktable - code + ltCodeToCode + bx]
   146                              <1>  %endif
   147                              <1> %else
   148                              <1> 	mov si, internalcodetocoderelocations - code
   149                              <1> %endif
   150 00000B19 01D6                <1> 	add si, dx
   151                              <1> @@:
   152 00000B1B AD                  <1> 	lodsw
   153 00000B1C 85C0                <1> 	test ax, ax		; was last ?
   154 00000B1E 740B                <1> 	jz @F			; yes -->
   155 00000B20 93                  <1> 	xchg bx, ax		; bx = entry
   156 00000B21 01D3                <1> 	add bx, dx		; relocate the entry itself
   157                              <1> %if _ELD_CODE_VSTART
   158 00000B23 812F[0000]          <1> 	sub word [bx], code	; undo adjustment
   159                              <1> %endif
   160 00000B27 0117                <1> 	add word [bx], dx	; relocate word referenced by entry
   161 00000B29 EBF0                <1> 	jmp @B
   162                              <1> 
   163                              <1> @@:
   164                              <1> 			; next, add heap data base (on stack) to code
   165                              <1> %if _ELD_LINKER_PASSES
   166 00000B2B 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   167 00000B2E 01D3                <1> 	add bx, dx
   168                              <1>  %if _ELD_IDENTICALISE
   169                              <1> 	add bx, word [bp + ?lt]
   170                              <1> 	mov si, word [ltCodeToData + bx]
   171                              <1>  %else
   172 00000B30 8BB7C00E            <1> 	mov si, word [linktable - code + ltCodeToData + bx]
   173                              <1>  %endif
   174                              <1> %else
   175                              <1> 	mov si, internalcodetodatarelocations - code
   176                              <1> %endif
   177 00000B34 01D6                <1> 	add si, dx
   178                              <1> @@:
   179 00000B36 AD                  <1> 	lodsw
   180 00000B37 85C0                <1> 	test ax, ax		; was last ?
   181 00000B39 740C                <1> 	jz @F			; yes -->
   182 00000B3B 93                  <1> 	xchg bx, ax		; bx = entry
   183 00000B3C 01D3                <1> 	add bx, dx		; relocate the entry itself
   184 00000B3E 58                  <1> 	pop ax			; ax -> heap data
   185 00000B3F 50                  <1> 	push ax
   186                              <1> %if _ELD_DATA_VSTART
   187 00000B40 2D[0000]            <1> 	sub ax, datastart	; undo adjustment
   188                              <1> %endif
   189 00000B43 0107                <1> 	add word [bx], ax	; relocate word referenced by entry
   190 00000B45 EBEF                <1> 	jmp @B
   191                              <1> 
   192                              <1> @@:
   193                              <1> 
   194                              <1> 			; add instance base (dx) to data
   195                              <1> %if _ELD_LINKER_PASSES
   196 00000B47 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   197 00000B4A 01D3                <1> 	add bx, dx
   198                              <1>  %if _ELD_IDENTICALISE
   199                              <1> 	add bx, word [bp + ?lt]
   200                              <1> 	mov si, word [ltDataToCode + bx]
   201                              <1>  %else
   202 00000B4C 8BB7C40E            <1> 	mov si, word [linktable - code + ltDataToCode + bx]
   203                              <1>  %endif
   204                              <1> %else
   205                              <1> 	mov si, internaldatatocoderelocations - code
   206                              <1> %endif
   207 00000B50 01D6                <1> 	add si, dx
   208                              <1> @@:
   209 00000B52 AD                  <1> 	lodsw
   210 00000B53 83F8FF              <1> 	cmp ax, -1		; was last ?
   211 00000B56 740F                <1> 	je @F			; yes -->
   212 00000B58 93                  <1> 	xchg bx, ax		; bx = entry
   213 00000B59 58                  <1> 	pop ax
   214 00000B5A 50                  <1> 	push ax
   215 00000B5B 01C3                <1> 	add bx, ax		; relocate the entry itself
   216                              <1> %if _ELD_CODE_VSTART
   217 00000B5D 36812F[0000]        <1> 	sub word [ss:bx], code	; undo adjustment
   218                              <1> %endif
   219 00000B62 360117              <1> 	add word [ss:bx], dx	; relocate word referenced by entry
   220 00000B65 EBEB                <1> 	jmp @B
   221                              <1> 
   222                              <1> @@:
   223                              <1> 			; next, add heap data base (on stack) to data
   224                              <1> %if _ELD_LINKER_PASSES
   225 00000B67 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   226 00000B6A 01D3                <1> 	add bx, dx
   227                              <1>  %if _ELD_IDENTICALISE
   228                              <1> 	add bx, word [bp + ?lt]
   229                              <1> 	mov si, word [ltDataToData + bx]
   230                              <1>  %else
   231 00000B6C 8BB7C80E            <1> 	mov si, word [linktable - code + ltDataToData + bx]
   232                              <1>  %endif
   233                              <1> %else
   234                              <1> 	mov si, internaldatatodatarelocations - code
   235                              <1> %endif
   236 00000B70 01D6                <1> 	add si, dx
   237                              <1> @@:
   238 00000B72 AD                  <1> 	lodsw
   239 00000B73 83F8FF              <1> 	cmp ax, -1		; was last ?
   240 00000B76 740D                <1> 	je @F			; yes -->
   241 00000B78 93                  <1> 	xchg bx, ax		; bx = entry
   242 00000B79 58                  <1> 	pop ax			; ax -> heap data
   243 00000B7A 50                  <1> 	push ax
   244 00000B7B 01C3                <1> 	add bx, ax		; relocate the entry itself
   245                              <1> %if _ELD_DATA_VSTART
   246 00000B7D 2D[0000]            <1> 	sub ax, datastart	; undo adjustment
   247                              <1> %endif
   248 00000B80 360107              <1> 	add word [ss:bx], ax	; relocate word referenced by entry
   249 00000B83 EBED                <1> 	jmp @B
   250                              <1> 
   251                              <1> @@:
   252 00000B85 8B56FC              <1> 	mov dx, word [bp + ?instance]
   253                              <1> %if _ELD_LINKER_PASSES
   254 00000B88 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   255 00000B8B 01D3                <1> 	add bx, dx
   256                              <1>  %if _ELD_IDENTICALISE
   257                              <1> 	add bx, word [bp + ?lt]
   258                              <1> 	add dx, word [ltLinkData + bx]
   259                              <1>  %else
   260 00000B8D 0397CC0E            <1> 	add dx, word [linktable - code + ltLinkData + bx]
   261                              <1>  %endif
   262                              <1> %else
   263                              <1> 	add dx, linkerdatarelocations - code
   264                              <1> %endif
   265                              <1> .otherloop:
   266 00000B91 8956F2              <1> 	mov word [bp + ?nextreloc], dx
   267                              <1> 
   268                              <1> .datarelocloop:		; must be done before further relocs
   269 00000B94 C576F2              <1> 	lds si, [bp + ?nextreloc]
   270 00000B97 AD                  <1> 	lodsw			; ax = section indicator
   271 00000B98 85C0                <1> 	test ax, ax		; end of table ?
   272 00000B9A 7503E92301          <1> 	jz .donedatareloc
   273 00000B9F 48                  <1> 	dec ax			; al = 1 if data, 0 if code
   274 00000BA0 5B                  <1> 	pop bx
   275 00000BA1 53                  <1> 	push bx			; bx -> ELD data block
   276 00000BA2 8946FA              <1> 	mov word [bp + ?targetsection_low_optional_high], ax
   277 00000BA5 84C0                <1> 	test al, al		; data ?
   278 00000BA7 AD                  <1> 	lodsw
   279 00000BA8 7504                <1> 	jnz @F			; yes -->
   280 00000BAA 0346FC              <1> 	add ax, word [bp + ?instance]
   281                              <1> 				; relocate entry into code
   282 00000BAD A9                  <1> 	db __TEST_IMM16		; (skip add)
   283                              <1> @@:
   284 00000BAE 01D8                <1> 	add ax, bx		; relocate entry into data
   285 00000BB0 8946EE              <1> 	mov word [bp + ?entry], ax
   286 00000BB3 AD                  <1> 	lodsw
   287 00000BB4 8976F2              <1> 	mov word [bp + ?nextreloc], si
   288 00000BB7 E8DC00              <1> 	call .build_match
   289                              <1> %if _ELD_LINKER_PASSES
   290 00000BBA 73D8                <1> 	jnc .datarelocloop
   291                              <1> %endif
   292 00000BBC C45EF6              <1> 	les bx, [bp + ?linkinfo]
   293                              <1> %if ELDOTHER
   294                              <1> 	rol byte [bp + ?other], 1
   295                              <1> 	jnc @F
   296                              <1> 	les bx, [bp + ?linkinfo_other]
   297                              <1> @@:
   298                              <1> %endif
   299 00000BBF 268B4F08            <1> 	mov cx, word [es:bx + eldlDataAmount]	; amount data link info
   300 00000BC3 268B7F0A            <1> 	mov di, word [es:bx + eldlDataPrefixes]	; -> prefixes or hashes
   301                              <1> .datarelocfind:
   302 00000BC7 F2AF                <1> 	repne scasw			; scan initial
   303 00000BC9 7541                <1> 	jne .datarelocnotfound
   304 00000BCB 57                  <1> 	push di
   305 00000BCC 51                  <1> 	push cx
   306 00000BCD 56                  <1> 	push si
   307 00000BCE 262B7F0A            <1> 	sub di, word [es:bx + eldlDataPrefixes]	; = double index, 1-based
   308 00000BD2 4F                  <1> 	dec di
   309 00000BD3 4F                  <1> 	dec di				; 0-based
   310 00000BD4 26037F0C            <1> 	add di, word [es:bx + eldlDataEntries]	; -> entry
   311 00000BD8 268B3D              <1> 	mov di, [es:di]			; -> counted suffix/string
   312 00000BDB B500                <1> 	mov ch, 0
   313 00000BDD 8A0C                <1> 	mov cl, byte [si]		; cx = length
   314 00000BDF 41                  <1> 	inc cx
   315                              <1> 	; cmp al, al			; ZR if length is zero
   316 00000BE0 F3A6                <1> 	repe cmpsb			; match ?
   317 00000BE2 5E                  <1> 	pop si
   318 00000BE3 59                  <1> 	pop cx
   319 00000BE4 5F                  <1> 	pop di
   320 00000BE5 75E0                <1> 	jne .datarelocfind
   321 00000BE7 8814                <1> 	mov byte [si], dl
   322 00000BE9 262B7F0A            <1> 	sub di, word [es:bx + eldlDataPrefixes]	; = double index, 1-based
   323 00000BED 4F                  <1> 	dec di
   324 00000BEE 4F                  <1> 	dec di				; 0-based
   325 00000BEF 26037F0E            <1> 	add di, word [es:bx + eldlDataAddresses]	; -> address (offset)
   326 00000BF3 268B05              <1> 	mov ax, word [es:di]
   327 00000BF6 E80700              <1> 	call .address_data_reloc
   328                              <1> %if _ELD_RELOC_VSTART
   329 00000BF9 2D[0000]            <1> 	sub ax, relocateddata		; *not* a relocation
   330                              <1> %endif
   331 00000BFC 0104                <1> 	add word [si], ax		; relocate
   332 00000BFE EB94                <1> 	jmp .datarelocloop
   333                              <1> 
   334                              <1> .address_data_reloc:
   335 00000C00 C576EE              <1> 	lds si, [bp + ?entry]		; -> entry if in ELD code instance
   336 00000C03 807EFA00            <1> 	cmp byte [bp + ?targetsection], 0
   337                              <1> 					; relocation in code ?
   338 00000C07 7402                <1> 	je @F				; yes -->
   339 00000C09 16                  <1> 	push ss
   340 00000C0A 1F                  <1> 	pop ds				; => our ELD data block
   341                              <1> @@:
   342 00000C0B C3                  <1> 	retn
   343                              <1> 
   344                              <1> .datarelocnotfound:
   345 00000C0C 8814                <1> 	mov byte [si], dl
   346 00000C0E 807EFB00            <1> 	cmp byte [bp + ?optional], 0
   347                              <1> %if _ELD_DEBUG
   348                              <1> 	jne @F
   349                              <1>  %ifn _ELD_LINKER_PASSES
   350                              <1> 	mov si, 0			; (invalid link)
   351                              <1> linkdatarelocation internalflags6
   352                              <1> 	test si, si
   353                              <1> 	jz .datanotfound
   354                              <1> 	mov si, 0			; (invalid link)
   355                              <1> linkdatarelocation options7
   356                              <1> 	test si, si
   357                              <1> 	jz .datanotfound
   358                              <1>  %else
   359                              <1> 	cmp byte [bp + ?pass], 0
   360                              <1> 	je .datanotfound
   361                              <1>  %endif
   362                              <1> 	houdini
   363                              <1> 	jmp .datanotfound
   364                              <1> @@:
   365                              <1> %else
   366 00000C12 7417                <1> 	je .datanotfound
   367                              <1> %endif
   368                              <1> 
   369                              <1> %if ELDDATA_PMREQUIRED_STATUS
   370                              <1> 	mov si, relocateddata
   371                              <1> linkdatarelocation build_option_PM
   372                              <1> 	test si, si
   373                              <1> 	jz @F
   374                              <1> 	test byte [bp + ?optional], 2
   375                              <1> 	jnz .datanotfound
   376                              <1> @@:
   377                              <1> %endif
   378                              <1> 
   379                              <1> %if _ELD_LINKER_PASSES
   380 00000C14 36F606[0000]02      <1> 	testopt [ss:relocateddata], 2
   381                              <1> linkdatarelocation options7, -3
   382 00000C1A 7406                <1> 	jz @F
   383 00000C1C BE[401A]            <1> 	mov si, lmsg.warning_data_optional
   384                              <1> internalcoderelocation
   385 00000C1F E82B00              <1> 	call .notfound
   386                              <1> @@:
   387                              <1> %endif
   388 00000C22 E8DBFF              <1> 	call .address_data_reloc
   389 00000C25 832400              <1> 	and word [si], 0		; indicate optional data link failed
   390 00000C28 E969FF              <1> 	jmp .datarelocloop
   391                              <1> 
   392                              <1> 
   393                              <1> %if _ELDCALL_OPTIONAL
   394                              <1> .coderelocnotfound:
   395                              <1> 	mov byte [si], dl
   396                              <1> 	cmp byte [bp + ?optional], 0
   397                              <1> %if _ELD_DEBUG
   398                              <1> 	jne @F
   399                              <1>  %ifn _ELD_LINKER_PASSES
   400                              <1> 	mov si, 0			; (invalid link)
   401                              <1> linkdatarelocation internalflags6
   402                              <1> 	test si, si
   403                              <1> 	jz .codenotfound
   404                              <1> 	mov si, 0			; (invalid link)
   405                              <1> linkdatarelocation options7
   406                              <1> 	test si, si
   407                              <1> 	jz .codenotfound
   408                              <1>  %else
   409                              <1> 	cmp byte [bp + ?pass], 0
   410                              <1> 	je .codenotfound
   411                              <1>  %endif
   412                              <1> 	houdini
   413                              <1> 	jmp .codenotfound
   414                              <1> @@:
   415                              <1> %else
   416                              <1> 	je .codenotfound
   417                              <1> %endif
   418                              <1> 
   419                              <1> %if ELDCALL_PMREQUIRED_STATUS
   420                              <1>  %if _ELD_LINKER_PASSES
   421                              <1>   %assign ELDLINKER 0
   422                              <1>  %endif
   423                              <1> 	mov si, relocateddata
   424                              <1> linkdatarelocation build_option_PM
   425                              <1>  %if _ELD_LINKER_PASSES
   426                              <1>   %assign ELDLINKER 1
   427                              <1>  %endif
   428                              <1> 	test si, si
   429                              <1> 	jz @F
   430                              <1> 	test byte [bp + ?optional], 2
   431                              <1> 	jnz .codenotfound
   432                              <1> @@:
   433                              <1> %endif
   434                              <1> 
   435                              <1> %if _ELD_LINKER_PASSES
   436                              <1> 	testopt [ss:relocateddata], 2
   437                              <1> linkdatarelocation options7, -3
   438                              <1> 	jz @F
   439                              <1> 	mov si, lmsg.warning_code_optional
   440                              <1> internalcoderelocation
   441                              <1> 	call .notfound
   442                              <1> @@:
   443                              <1> %endif
   444                              <1> 	lds si, [bp + ?entry]
   445                              <1> 	mov word [si], 9090h
   446                              <1> 	mov byte [si + 2], 90h		; indicate optional code link failed
   447                              <1> 	jmp .coderelocloop
   448                              <1> %endif
   449                              <1> 
   450                              <1> 
   451                              <1> %if _ELD_LINKER_PASSES
   452                              <1> .datanotfound:
   453 00000C2B BE[621A]            <1> 	mov si, lmsg.error_data
   454                              <1> internalcoderelocation
   455 00000C2E E81C00              <1> 	call .notfound
   456 00000C31 7203E91901          <1> 	jnc .error_j
   457 00000C36 FF46E8              <1> 	inc word [bp + ?amounterrors]
   458 00000C39 E958FF              <1> 	jmp .datarelocloop
   459                              <1> 
   460                              <1> .codenotfound:
   461 00000C3C BE[7B1A]            <1> 	mov si, lmsg.error_code
   462                              <1> internalcoderelocation
   463 00000C3F E80B00              <1> 	call .notfound
   464 00000C42 7203E90801          <1> 	jnc .error_j
   465 00000C47 FF46E8              <1> 	inc word [bp + ?amounterrors]
   466 00000C4A E98400              <1> 	jmp .coderelocloop
   467                              <1> 
   468                              <1> .notfound:
   469 00000C4D 807EEA00            <1> 	cmp byte [bp + ?pass], 0
   470 00000C51 743A                <1> 	je @F				; --> (NC)
   471 00000C53 16                  <1> 	 push ss
   472 00000C54 07                  <1> 	 pop es
   473 00000C55 BF[0000]            <1> 	mov di, relocateddata
   474                              <1> linkdatarelocation line_out
   475 00000C58 E83300              <1> 	call .copy
   476 00000C5B 8B76E6              <1> 	mov si, word [bp + ?name]
   477 00000C5E AD                  <1> 	lodsw
   478 00000C5F E8[0000]EB020000    <1> 	extcall hexword
   479 00000C66 56                  <1> 	push si
   480 00000C67 BE[941A]            <1> 	mov si, lmsg.error.2
   481                              <1> internalcoderelocation
   482 00000C6A E82100              <1> 	call .copy
   483 00000C6D 5E                  <1> 	pop si
   484                              <1> %if _ELD_LINKER_PASSES
   485 00000C6E 56                  <1> 	push si
   486 00000C6F E81C00              <1> 	call .copy
   487 00000C72 5E                  <1> 	pop si
   488 00000C73 C60400              <1> 	mov byte [si], 0		; mark as failed
   489                              <1> %else
   490                              <1> 	call .copy
   491                              <1> %endif
   492 00000C76 B022                <1> 	mov al, '"'
   493 00000C78 AA                  <1> 	stosb
   494 00000C79 16                  <1> 	 push ss
   495 00000C7A 1F                  <1> 	 pop ds
   496 00000C7B E8[0000]EB020000    <1> 	extcall putsline_crlf
   497 00000C82 B8350E              <1> 	mov ax, 0E35h
   498 00000C85 E8[0000]EB020000    <1> 	extcall setrc
   499 00000C8C F9                  <1> 	stc				; CY, diagnostic displayed
   500                              <1> @@:
   501 00000C8D C3                  <1> 	retn
   502                              <1> 
   503                              <1> .copy:
   504 00000C8E E8[0000]EB020000    <1> 	extcall copy_single_counted_string
   505 00000C95 C3                  <1> 	retn
   506                              <1> %else
   507                              <1> .datanotfound: equ .error_j
   508                              <1> .codenotfound: equ .error_j
   509                              <1> %endif
   510                              <1> 
   511                              <1> .build_match:
   512                              <1> %if _ELD_CODE_VSTART
   513 00000C96 2D[0000]            <1> 	sub ax, code
   514                              <1> %endif
   515 00000C99 0346FC              <1> 	add ax, word [bp + ?instance]
   516 00000C9C 96                  <1> 	xchg si, ax
   517                              <1> %if _ELD_LINKER_PASSES
   518 00000C9D 8976E6              <1> 	mov word [bp + ?name], si
   519                              <1> %endif
   520 00000CA0 AD                  <1> 	lodsw			; = hash, si -> counted string
   521 00000CA1 8A14                <1> 	mov dl, byte [si]
   522                              <1> %if _ELD_LINKER_PASSES
   523 00000CA3 84D2                <1> 	test dl, dl		; marked as already failed ?
   524 00000CA5 750A                <1> 	jnz @F
   525 00000CA7 837EE800            <1> 	cmp word [bp + ?amounterrors], 0
   526 00000CAB 7503E99F00          <1> 	je .error_j
   527 00000CB0 C3                  <1> 	retn			; (NC)
   528                              <1> 
   529                              <1> @@:
   530                              <1> %endif
   531                              <1> %if ELDOTHER
   532                              <1> 	rol byte [bp + ?other], 1
   533                              <1> 	jnc @F
   534                              <1> 	rol byte [bp + ?use_hash_other], 1
   535                              <1> 	jmp @FF
   536                              <1> 
   537                              <1> @@:
   538                              <1> %endif
   539 00000CB1 D046EC              <1> 	rol byte [bp + ?use_hash], 1
   540                              <1> @@:
   541 00000CB4 720A                <1> 	jc @F
   542 00000CB6 AC                  <1> 	lodsb
   543 00000CB7 91                  <1> 	xchg cx, ax		; cl = length
   544 00000CB8 AD                  <1> 	lodsw			; ax = prefix
   545 00000CB9 49                  <1> 	dec cx
   546 00000CBA 49                  <1> 	dec cx
   547 00000CBB 4E                  <1> 	dec si
   548 00000CBC 8A14                <1> 	mov dl, byte [si]
   549 00000CBE 880C                <1> 	mov byte [si], cl	; si -> counted string suffix
   550                              <1> @@:
   551                              <1> %if _ELD_LINKER_PASSES
   552 00000CC0 F9                  <1> 	stc			; CY
   553                              <1> %endif
   554 00000CC1 C3                  <1> 	retn
   555                              <1> 
   556                              <1> 
   557                              <1> .donedatareloc:
   558                              <1> %if ELDOTHER
   559                              <1> 	rol byte [bp + ?other], 1
   560                              <1> 	jc .otherdone
   561                              <1> %endif
   562                              <1> 
   563 00000CC2 8B56FC              <1> 	mov dx, word [bp + ?instance]
   564                              <1> %if _ELD_LINKER_PASSES
   565 00000CC5 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   566 00000CC8 01D3                <1> 	add bx, dx
   567                              <1>  %if _ELD_IDENTICALISE
   568                              <1> 	add bx, word [bp + ?lt]
   569                              <1> 	add dx, word [ltLinkCode + bx]
   570                              <1>  %else
   571 00000CCA 0397D00E            <1> 	add dx, word [linktable - code + ltLinkCode + bx]
   572                              <1>  %endif
   573                              <1> %else
   574                              <1> 	add dx, linkercoderelocations - code
   575                              <1> %endif
   576 00000CCE 8956F2              <1> 	mov word [bp + ?nextreloc], dx
   577                              <1> 
   578                              <1> .coderelocloop:
   579 00000CD1 C576F2              <1> 	lds si, [bp + ?nextreloc]
   580 00000CD4 AD                  <1> 	lodsw
   581                              <1> %if _ELDCALL_OPTIONAL
   582                              <1> 	dec ax
   583                              <1> 	js .donecodereloc
   584                              <1> 	mov word [bp + ?targetsection_low_optional_high], ax
   585                              <1> 	lodsw
   586                              <1> %endif
   587 00000CD5 0346FC              <1> 	add ax, word [bp + ?instance]
   588 00000CD8 8946EE              <1> 	mov word [bp + ?entry], ax
   589 00000CDB AD                  <1> 	lodsw
   590 00000CDC 8976F2              <1> 	mov word [bp + ?nextreloc], si
   591                              <1> %ifn _ELDCALL_OPTIONAL
   592 00000CDF 85C0                <1> 	test ax, ax
   593 00000CE1 747E                <1> 	jz .donecodereloc
   594                              <1> %endif
   595 00000CE3 E8B0FF              <1> 	call .build_match
   596                              <1> %if _ELD_LINKER_PASSES
   597 00000CE6 73E9                <1> 	jnc .coderelocloop
   598                              <1> %endif
   599 00000CE8 C45EF6              <1> 	les bx, [bp + ?linkinfo]
   600 00000CEB 268B4F10            <1> 	mov cx, word [es:bx + eldlCodeAmount]	; amount code link info
   601 00000CEF 268B7F12            <1> 	mov di, word [es:bx + eldlCodePrefixes]	; -> prefixes or hashes
   602                              <1> .coderelocfind:
   603 00000CF3 F2AF                <1> 	repne scasw			; scan initial
   604                              <1> %if _ELDCALL_OPTIONAL
   605                              <1> 	jne .coderelocnotfound
   606                              <1> %else
   607                              <1>  %if _ELD_DEBUG
   608                              <1> 	je @F
   609                              <1> 	houdini
   610                              <1> 	jmp .codenotfound
   611                              <1> @@:
   612                              <1>  %else
   613 00000CF5 7403E942FF          <1> 	jne .codenotfound
   614                              <1>  %endif
   615                              <1> %endif
   616 00000CFA 57                  <1> 	push di
   617 00000CFB 51                  <1> 	push cx
   618 00000CFC 56                  <1> 	push si
   619 00000CFD 262B7F12            <1> 	sub di, word [es:bx + eldlCodePrefixes]	; = double index, 1-based
   620 00000D01 4F                  <1> 	dec di
   621 00000D02 4F                  <1> 	dec di				; 0-based
   622 00000D03 26037F14            <1> 	add di, word [es:bx + eldlCodeEntries]	; -> entry
   623 00000D07 268B3D              <1> 	mov di, [es:di]			; -> counted suffix/string
   624 00000D0A B500                <1> 	mov ch, 0
   625 00000D0C 8A0C                <1> 	mov cl, byte [si]		; cx = length
   626 00000D0E 41                  <1> 	inc cx
   627                              <1> 	; cmp al, al			; ZR if length is zero
   628 00000D0F F3A6                <1> 	repe cmpsb			; match ?
   629 00000D11 5E                  <1> 	pop si
   630 00000D12 59                  <1> 	pop cx
   631 00000D13 5F                  <1> 	pop di
   632 00000D14 75DD                <1> 	jne .coderelocfind
   633 00000D16 8814                <1> 	mov byte [si], dl
   634 00000D18 262B7F12            <1> 	sub di, word [es:bx + eldlCodePrefixes]	; = double index, 1-based
   635 00000D1C 4F                  <1> 	dec di
   636 00000D1D 4F                  <1> 	dec di				; 0-based
   637 00000D1E 01FF                <1> 	add di, di			; quadruple index
   638 00000D20 26037F16            <1> 	add di, word [es:bx + eldlCodeAddresses]	; -> address (offset, segment)
   639 00000D24 26FF35              <1> 	push word [es:di]
   640 00000D27 C576EE              <1> 	lds si, [bp + ?entry]
   641 00000D2A 8F4405              <1> 	pop word [si + 3 + 2]		; call near imm (3), jmp short (2)
   642                              <1> 					;  patch the destination address
   643 00000D2D 803CE8              <1> 	cmp byte [si], 0E8h		; is it as expected ?
   644 00000D30 751D                <1> 	jne .error_j
   645 00000D32 268B7D02            <1> 	mov di, word [es:di + 2]
   646 00000D36 BB[0000]            <1> 	mov bx, relocateddata
   647                              <1> linkdatarelocation linkcall_table	; ss:bx -> link call table
   648 00000D39 36833F01            <1> 	cmp word [ss:bx], 1		; is it initialised to format 1 ?
   649 00000D3D 7510                <1> 	jne .error_j			; no -->
   650 00000D3F 368B4F02            <1> 	mov cx, word [ss:bx + 2]	; get amount of segments
   651 00000D43 E30A                <1> 	jcxz .error_j			; none -->
   652                              <1> @@:
   653 00000D45 83C304              <1> 	add bx, 4			; -> next segment
   654 00000D48 36393F              <1> 	cmp word [ss:bx], di		; value matches ?
   655 00000D4B 7405                <1> 	je @F				; yes, found -->
   656 00000D4D E2F6                <1> 	loop @B				; try remaining segments
   657                              <1> .error_j:
   658 00000D4F E98A00              <1> 	jmp .error
   659                              <1> 
   660                              <1> @@:
   661 00000D52 368B5F02            <1> 	mov bx, word [ss:bx + 2]	; -> call destination offset
   662                              <1> 		; si + 3 + delta = bx
   663                              <1> 		; delta = bx - si - 3
   664 00000D56 29F3                <1> 	sub bx, si
   665 00000D58 83EB03              <1> 	sub bx, 3
   666 00000D5B 895C01              <1> 	mov word [si + 1], bx		; patch the call instruction
   667 00000D5E E970FF              <1> 	jmp .coderelocloop
   668                              <1> 
   669                              <1> .donecodereloc:
   670                              <1> %if _ELD_LINKER_PASSES
   671 00000D61 8B46E8              <1> 	mov ax, word [bp + ?amounterrors]
   672 00000D64 85C0                <1> 	test ax, ax
   673 00000D66 75E7                <1> 	jnz .error_j
   674 00000D68 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   675 00000D6B 85DB                <1> 	test bx, bx
   676 00000D6D 750B                <1> 	jnz @F
   677 00000D6F 43                  <1> 	inc bx
   678 00000D70 43                  <1> 	inc bx
   679 00000D71 895EEA              <1> 	mov word [bp + ?pass], bx
   680 00000D74 8B56FC              <1> 	mov dx, word [bp + ?instance]
   681 00000D77 E996FD              <1> 	jmp .pass
   682                              <1> 
   683                              <1> @@:
   684                              <1> %endif
   685                              <1> 
   686                              <1> %ifnidni _LISTING, ""
   687                              <1> %assign ELDLINKER 0
   688                              <1> .hint:
   689 00000D7A 16                  <1> 	push ss
   690 00000D7B 1F                  <1> 	pop ds
   691 00000D7C B02D                <1> 	mov al, 2Dh
   692 00000D7E E8[0000]EB020000    <1> 	extcall intchk			; ZR if offset = -1 or segment = 0
   693                              <1> 					; CHG: ax, dx, bx
   694 00000D85 7437                <1> 	jz .no_hint
   695                              <1> 
   696 00000D87 8A26[0000]          <1> 	mov ah, byte [relocateddata]
   697                              <1> linkdatarelocation try_debugger_amis_multiplex_number
   698 00000D8B E85500              <1> 	call plex_check
   699 00000D8E 7305                <1> 	jnc @F
   700                              <1> 
   701 00000D90 B4FF                <1> 	mov ah, 0FFh		; start with multiplex number 0FFh
   702                              <1> .loop_hint:
   703 00000D92 E84E00              <1> 	call plex_check
   704                              <1> @@:
   705 00000D95 7307                <1> 	jnc .end_hint		; if found --> (NC)
   706 00000D97 80EC01              <1> 	sub ah, 1		; search is backward (to find latest installed first), from 0FFh to 00h including
   707 00000D9A 73F6                <1> 	jnc .loop_hint		; try next if we didn't check all yet -->
   708 00000D9C EB20                <1> 	jmp .no_hint
   709                              <1> 
   710                              <1> .end_hint:
   711 00000D9E 50                  <1> 	push ax
   712 00000D9F C446FC              <1> 	les ax, [bp + ?instance]
   713 00000DA2 BF[5313]            <1> 	mov di, listmsg.hint.offset
   714                              <1> internalcoderelocation
   715 00000DA5 E8[0000]EB020000    <1> 	extcall hexword
   716 00000DAC BB[3413]            <1> 	mov bx, listmsg.hint
   717                              <1> internalcoderelocation
   718 00000DAF 368B16[0000]        <1> 	mov dx, [ss:relocateddata]
   719                              <1> linkdatarelocation extseg	; must be 86 Mode segment even in PM
   720 00000DB4 58                  <1> 	pop ax
   721 00000DB5 B040                <1> 	mov al, 40h		; AMIS message display service
   722 00000DB7 E8[0000]EB020000    <1> 	extcall call_int2D
   723                              <1> .no_hint:
   724                              <1> %endif
   725                              <1> 
   726                              <1> %if ELDOTHER
   727                              <1> %assign ELDLINKER 0
   728                              <1> 	not byte [bp + ?other]
   729                              <1> 
   730                              <1> 	push ss
   731                              <1> 	pop ds
   732                              <1> 	mov al, 2Dh
   733                              <1> 	extcall intchk			; ZR if offset = -1 or segment = 0
   734                              <1> 					; CHG: ax, dx, bx
   735                              <1> 	jz .no_other
   736                              <1> 
   737                              <1> 	mov ah, byte [relocateddata]
   738                              <1> linkdatarelocation try_debugger_amis_multiplex_number
   739                              <1> 	call plex_check
   740                              <1> 	jnc @F
   741                              <1> 
   742                              <1> 	mov ah, 0FFh		; start with multiplex number 0FFh
   743                              <1> .loop_other:
   744                              <1> 	call plex_check
   745                              <1> @@:
   746                              <1> 	jnc .end_other		; if found --> (NC)
   747                              <1> 	sub ah, 1		; search is backward (to find latest installed first), from 0FFh to 00h including
   748                              <1> 	jnc .loop_other		; try next if we didn't check all yet -->
   749                              <1> 	jmp .no_other
   750                              <1> 
   751                              <1> .end_other:
   752                              <1> 	mov al, 42h		; AMIS get other link info service
   753                              <1> 	extcall call_int2D
   754                              <1> 	cmp al, 0FFh
   755                              <1> 	jne .no_other
   756                              <1> 
   757                              <1> 	mov ax, si		; selector => PSP
   758                              <1> 	extcall ispm
   759                              <1> 	jz @F
   760                              <1> 	mov ax, dx		; segment => PSP
   761                              <1> @@:
   762                              <1> 	 push ss
   763                              <1> 	 pop ds
   764                              <1> 	mov word [otherds], ax
   765                              <1> internaldatarelocation		; current mode sel/seg
   766                              <1> 	mov word [otherseg], dx
   767                              <1> internaldatarelocation		; remember segment
   768                              <1> 
   769                              <1> 	mov ax, cx		; selector => link info
   770                              <1> 	extcall ispm
   771                              <1> 	jz @F
   772                              <1> 	mov ax, bx		; segment => link info
   773                              <1> @@:
   774                              <1> 	mov word [bp + ?linkinfo_other], di
   775                              <1> 	mov word [bp + ?linkinfo_other + 2], ax
   776                              <1> 
   777                              <1> 	mov ds, ax		; => link info
   778                              <1> 	xor ax, ax
   779                              <1> 	cmp word [di + eldlSignature], 0E1D1h
   780                              <1> 	jne .error_other
   781                              <1> 	cmp word [di + eldlUseLinkHash], 1
   782                              <1> 	ja .error_other
   783                              <1> 	jb @F
   784                              <1> 	dec ax
   785                              <1> @@:
   786                              <1> 	mov word [bp + ?use_hash_other], ax
   787                              <1> 
   788                              <1> 	mov dx, word [bp + ?instance]
   789                              <1> 	add dx, linkerotherdatarelocations - code
   790                              <1> 	jmp .otherloop
   791                              <1> 
   792                              <1> .error_other:
   793                              <1> 	push cs
   794                              <1> 	pop ds
   795                              <1> 	mov ax, 0E33h
   796                              <1> 	extcall setrc
   797                              <1> 	mov dx, lmsg.error_other
   798                              <1> internalcoderelocation
   799                              <1> 	jmp @F
   800                              <1> 
   801                              <1> .no_other:
   802                              <1> 	push cs
   803                              <1> 	pop ds
   804                              <1> 	mov ax, 0E34h
   805                              <1> 	extcall setrc
   806                              <1> 	mov dx, lmsg.no_other
   807                              <1> internalcoderelocation
   808                              <1> @@:
   809                              <1> 	extcall putsz
   810                              <1> 	jmp .error
   811                              <1> 
   812                              <1> .otherdone:
   813                              <1> %endif
   814                              <1> 
   815 00000DBE 5B                  <1> 	pop bx				; -> our heap data
   816 00000DBF 5E                  <1> 	pop si				; -> our command line tail
   817 00000DC0 16                  <1> 	 push ss
   818 00000DC1 1F                  <1> 	 pop ds
   819 00000DC2 C47EFC              <1> 	les di, [bp + ?instance]
   820 00000DC5 268B4502            <1> 	mov ax, word [es:di + eldiEndCode]
   821                              <1> houdini
   822 00000DC9 2D[F00A]            <1> 	sub ax, strict word endresident + code
   823                              <1> internalcoderelocation
   824 00000DCC 26C74502[F00A]      <1> 	mov word [es:di + eldiEndCode], endresident + code
   825                              <1> internalcoderelocation
   826 00000DD2 2906[0000]          <1> 	sub word [relocateddata], ax
   827                              <1> linkdatarelocation extseg_used
   828                              <1> %if _DATA_SIZE == 0
   829                              <1> 	xor ax, ax
   830                              <1> 	mov word [es:di + eldiStartData], ax
   831                              <1> 	mov word [es:di + eldiEndData], ax
   832                              <1> %endif
   833 00000DD6 89EC5D              <1> 	lleave code
   834                              <1> 		; INP:	es => ELD code segment
   835                              <1> 		;	ds:si -> command line tail
   836                              <1> 		;	ds:bx -> ELD data block
   837                              <1> 		;	ss:sp -> far return address for current mode
   838                              <1> 		; STT:	ds = ss, UP, EI
   839 00000DD9 E964FC              <1> 	jmp start
   840                              <1> 
   841                              <1> .error:
   842 00000DDC 89EC5D              <1> 	lleave
   843 00000DDF B8FFFF              <1> 	mov ax, -1
   844 00000DE2 CB                  <1> 	retf
   845                              <1> 
   846                              <1> 
   847                              <1> %ifnidni _LISTING, ""
   848                              <1>  %assign ELDHINT 1
   849                              <1> %else
   850                              <1>  %assign ELDHINT 0
   851                              <1> %endif
   852                              <1> 
   853                              <1> %if ELDOTHER || ELDHINT
   854                              <1> 		; INP:	ah = multiplex number to check
   855                              <1> 		; OUT:	CY if multiplex number unused or no signature match,
   856                              <1> 		;	 bp, ah, ds unmodified
   857                              <1> 		;	NC if match found,
   858                              <1> 		;	 ah = multiplex number (unmodified)
   859                              <1> 		; CHG:	si, di, es, cx, dx
   860                              <1> plex_check:
   861 00000DE3 16                  <1> 	push ss
   862 00000DE4 1F                  <1> 	pop ds
   863 00000DE5 F606[0000]08        <1> 	testopt [relocateddata], 8
   864                              <1> linkdatarelocation internalflags4, -3
   865 00000DEA 740B                <1> 	jz @F
   866 00000DEC BE[0000]            <1> 	mov si, relocateddata
   867                              <1> linkdatarelocation amis_multiplex_number, -2, optional
   868 00000DEF 85F6                <1> 	test si, si
   869 00000DF1 7404                <1> 	jz @F
   870 00000DF3 3A24                <1> 	cmp ah, byte [si]
   871 00000DF5 7420                <1> 	je .notfound		; do not use our own multiplexer -->
   872                              <1> @@:
   873 00000DF7 B000                <1> 	mov al, 00h		; AMIS installation check
   874 00000DF9 E8[0000]EB020000    <1> 	extcall call_int2D	; AMIS (or "DOS reserved" = iret if no AMIS present)
   875 00000E00 3CFF                <1> 	cmp al, 0FFh
   876 00000E02 7513                <1> 	jne .notfound
   877 00000E04 0E                  <1> 	push cs
   878 00000E05 1F                  <1> 	pop ds
   879 00000E06 BE[2413]            <1> 	mov si, debuggeramissig	; ds:si -> our AMIS name strings
   880                              <1> internalcoderelocation
   881 00000E09 E8[0000]EB020000    <1> 	extcall setes2dx	; es:di -> name strings of AMIS multiplexer that just answered
   882 00000E10 B90800              <1> 	mov cx, 8		; Ignore description, only compare vendor and program name
   883 00000E13 F3A7                <1> 	repe cmpsw
   884 00000E15 7401                <1> 	je .checkret		; ZR, NC = match -->
   885                              <1> .notfound:
   886 00000E17 F9                  <1> 	stc			; CY no match
   887                              <1> .checkret:
   888 00000E18 C3                  <1> 	retn
   889                              <1> %endif
   890                              <1> 
   891                              <1> 
   892 00000E19 00<rep 3h>          <1> 	align 4, db 0
   893                              <1> linkercoderelocations:
   894                              <1> %if _ELDCALL_OPTIONAL
   895                              <1> 	dw ELDCALL_CODE_RELOCATIONS_OPTIONAL, 0
   896                              <1> %else
   897 00000E1C 2200[5B13]8D08-     <1> 	dw ELDCALL_CODE_RELOCATIONS, 0, 0
   897 00000E22 [5B13]9408[6A13]9B- <1>
   897 00000E29 08[7E13]A208[9213]- <1>
   897 00000E30 A908[A513]B008-     <1>
   897 00000E36 [B513]B708[D013]A0- <1>
   897 00000E3D 09[E813]A809[F413]- <1>
   897 00000E44 B009[0014]B809-     <1>
   897 00000E4A [0714]C009[1014]C8- <1>
   897 00000E51 09[1814]D009[2014]- <1>
   897 00000E58 D809[2714]E009-     <1>
   897 00000E5E [3014]E809[3C14]F0- <1>
   897 00000E65 09[4314]F809[6014]- <1>
   897 00000E6C 000A[6B14]080A-     <1>
   897 00000E72 [7514]100A[7F14]18- <1>
   897 00000E79 0A[8A14]200A[9514]- <1>
   897 00000E80 280A[BE14]300A-     <1>
   897 00000E86 [CE14]380A[D814]91- <1>
   897 00000E8D 0A[0714]7E0D[E114]- <1>
   897 00000E94 A50D[6B14]B70D-     <1>
   897 00000E9A [EA14]F90D[EA14]09- <1>
   897 00000EA1 0E[8A14]00000000    <1>
   898                              <1> %endif
   899                              <1> 
   900                              <1> %if _ELD_LINKER_PASSES
   901                              <1> linkerlinkercoderelocations:
   902                              <1> %if _ELDCALL_OPTIONAL
   903                              <1> 	dw ELDCALL_LINKER_CODE_RELOCATIONS_OPTIONAL, 0
   904                              <1> %else
   905 00000EA8 5F0C[6B14]7B0C-     <1> 	dw ELDCALL_LINKER_CODE_RELOCATIONS, 0, 0
   905 00000EAE [BE14]850C[1814]8E- <1>
   905 00000EB5 0C[4314]00000000    <1>
   906                              <1> %endif
   907                              <1> 
   908                              <1> 	align 2, db 0
   909                              <1> linktable:
   910                              <1> 	istruc LINKTABLE
   911                              <1> at ltCodeToCode
   912 00000EBC 1413                <1> 	dw internallinkercodetocoderelocations - code
   913 00000EBE 9A11                <1> 	dw internalcodetocoderelocations - code
   914                              <1> at ltCodeToData
   915 00000EC0 1E13                <1> 	dw internallinkercodetodatarelocations - code
   916 00000EC2 BC11                <1> 	dw internalcodetodatarelocations - code
   917                              <1> at ltDataToCode
   918 00000EC4 2013                <1> 	dw internallinkerdatatocoderelocations - code
   919 00000EC6 A412                <1> 	dw internaldatatocoderelocations - code
   920                              <1> at ltDataToData
   921 00000EC8 2213                <1> 	dw internallinkerdatatodatarelocations - code
   922 00000ECA CC12                <1> 	dw internaldatatodatarelocations - code
   923                              <1> at ltLinkData
   924 00000ECC 0013                <1> 	dw linkerlinkerdatarelocations - code
   925 00000ECE D40E                <1> 	dw linkerdatarelocations - code
   926                              <1> at ltLinkCode
   927 00000ED0 A80E                <1> 	dw linkerlinkercoderelocations - code
   928 00000ED2 1C0E                <1> 	dw linkercoderelocations - code
   929                              <1> 	iend
   930                              <1> %endif
   931                              <1> 
   932                              <1> 	align 2, db 0
   933                              <1> linkerdatarelocations:
   934 00000ED4 01004700[F714]0100- <1> 	dw LINK_DATA_RELOCATIONS, 0
   934 00000EDC 4900[0115]01004C00- <1>
   934 00000EE4 [0A15]01006A00-     <1>
   934 00000EEA [1A15]01008E00-     <1>
   934 00000EF0 [1A15]0100CD00-     <1>
   934 00000EF6 [3015]0100D600-     <1>
   934 00000EFC [3B15]01009001-     <1>
   934 00000F02 [4415]0100D301-     <1>
   934 00000F08 [4415]01000102-     <1>
   934 00000F0E [4415]01005702-     <1>
   934 00000F14 [4415]01008102-     <1>
   934 00000F1A [4F15]01008A02-     <1>
   934 00000F20 [5815]01013103-     <1>
   934 00000F26 [6315]01003F03-     <1>
   934 00000F2C [4415]01008B03-     <1>
   934 00000F32 [4415]01010504-     <1>
   934 00000F38 [6315]01010E04-     <1>
   934 00000F3E [6F15]01012804-     <1>
   934 00000F44 [6315]01014204-     <1>
   934 00000F4A [6F15]01005B04-     <1>
   934 00000F50 [4415]01016104-     <1>
   934 00000F56 [7C15]01016904-     <1>
   934 00000F5C [3015]01008C04-     <1>
   934 00000F62 [4415]01019D04-     <1>
   934 00000F68 [8415]0101C604-     <1>
   934 00000F6E [9415]0101C904-     <1>
   934 00000F74 [A315]0100D904-     <1>
   934 00000F7A [4415]0101FF04-     <1>
   934 00000F80 [B315]01012A05-     <1>
   934 00000F86 [C615]01006505-     <1>
   934 00000F8C [4415]01016805-     <1>
   934 00000F92 [D615]01016B05-     <1>
   934 00000F98 [DE15]0100BB05-     <1>
   934 00000F9E [4415]0100BF05-     <1>
   934 00000FA4 [EA15]0100C705-     <1>
   934 00000FAA [F815]0101DD05-     <1>
   934 00000FB0 [3015]0101E505-     <1>
   934 00000FB6 [3B15]01000C06-     <1>
   934 00000FBC [EA15]0100A206-     <1>
   934 00000FC2 [4415]0100A506-     <1>
   934 00000FC8 [0616]0100A906-     <1>
   934 00000FCE [1516]0100B106-     <1>
   934 00000FD4 [2416]0100BE06-     <1>
   934 00000FDA [4415]0100C706-     <1>
   934 00000FE0 [2E16]0100E706-     <1>
   934 00000FE6 [3F16]0100F606-     <1>
   934 00000FEC [4E16]0100FD06-     <1>
   934 00000FF2 [5F16]01000007-     <1>
   934 00000FF8 [6916]01002A07-     <1>
   934 00000FFE [5F16]01002D07-     <1>
   934 00001004 [6916]01003907-     <1>
   934 0000100A [4415]0100E007-     <1>
   934 00001010 [4415]0100CE08-     <1>
   934 00001016 [EA15]01009A09-     <1>
   934 0000101C [4415]0100490A-     <1>
   934 00001022 [8F16]0100700A-     <1>
   934 00001028 [9D16]0100800A-     <1>
   934 0000102E [EA15]01008D0A-     <1>
   934 00001034 [0616]02010200-     <1>
   934 0000103A [4F15]02010600-     <1>
   934 00001040 [A816]02010800-     <1>
   934 00001046 [B816]02010C00-     <1>
   934 0000104C [C016]02011000-     <1>
   934 00001052 [CD16]02011200-     <1>
   934 00001058 [DF16]02011600-     <1>
   934 0000105E [EC16]02011A00-     <1>
   934 00001064 [FE16]02011C00-     <1>
   934 0000106A [1517]02012000-     <1>
   934 00001070 [5815]02012400-     <1>
   934 00001076 [2817]02012600-     <1>
   934 0000107C [3417]02012A00-     <1>
   934 00001082 [3F17]02012E00-     <1>
   934 00001088 [4B17]02013000-     <1>
   934 0000108E [5817]02013400-     <1>
   934 00001094 [6417]02013800-     <1>
   934 0000109A [7617]02013A00-     <1>
   934 000010A0 [B315]02013E00-     <1>
   934 000010A6 [3B15]02014200-     <1>
   934 000010AC [F815]02014400-     <1>
   934 000010B2 [8817]02014800-     <1>
   934 000010B8 [9317]02014C00-     <1>
   934 000010BE [9C17]02005400-     <1>
   934 000010C4 [1A15]02005800-     <1>
   934 000010CA [A717]02005E00-     <1>
   934 000010D0 [B617]02006200-     <1>
   934 000010D6 [CF17]02006A00-     <1>
   934 000010DC [E317]02007600-     <1>
   934 000010E2 [F617]02007A00-     <1>
   934 000010E8 [1618]02008000-     <1>
   934 000010EE [2A18]02008400-     <1>
   934 000010F4 [4918]02008C00-     <1>
   934 000010FA [5C18]02009000-     <1>
   934 00001100 [6F18]02009600-     <1>
   934 00001106 [7F18]02009A00-     <1>
   934 0000110C [9D18]0200A000-     <1>
   934 00001112 [B818]0200A400-     <1>
   934 00001118 [D318]0200AC00-     <1>
   934 0000111E [EB18]0200B600-     <1>
   934 00001124 [0019]0201C000-     <1>
   934 0000112A [1819]0201C200-     <1>
   934 00001130 [2819]0201C400-     <1>
   934 00001136 [4019]0201C800-     <1>
   934 0000113C [5519]0201CA00-     <1>
   934 00001142 [6819]0201CC00-     <1>
   934 00001148 [8319]0201D000-     <1>
   934 0000114E [9B19]0201D200-     <1>
   934 00001154 [AE19]0201D400-     <1>
   934 0000115A [C919]0100A40A-     <1>
   934 00001160 [EA15]0100B00A-     <1>
   934 00001166 [0616]0100B40A-     <1>
   934 0000116C [1A15]0100CF0A-     <1>
   934 00001172 [1A15]0100D50A-     <1>
   934 00001178 [9D16]0100890D-     <1>
   934 0000117E [F219]0100B20D-     <1>
   934 00001184 [3B15]0100D40D-     <1>
   934 0000118A [EA15]0100E70D-     <1>
   934 00001190 [171A]0101ED0D-     <1>
   934 00001196 [281A]0000          <1>
   935                              <1> 
   936                              <1> 	align 2, db 0
   937                              <1> internalcodetocoderelocations:
   938 0000119A 6500B200770A7C0A84- <1> 	dw INTERNAL_CODE_TO_CODE_RELOCATIONS, 0
   938 000011A3 0A890AA00AAC0AB70A- <1>
   938 000011AC CA0AD10AA30DAD0DCA- <1>
   938 000011B5 0DD00D070E0000      <1>
   939                              <1> 
   940                              <1> 	align 2, db 0
   941                              <1> internalcodetodatarelocations:
   942 000011BC 3400B600C700DD00DF- <1> 	dw INTERNAL_CODE_TO_DATA_RELOCATIONS, 0
   942 000011C5 00E800FE003D017201- <1>
   942 000011CE 7F0183018D01D001FE- <1>
   942 000011D7 013D024E026B027502- <1>
   942 000011E0 7D0286028F0292029C- <1>
   942 000011E9 029F02A902B102BB02- <1>
   942 000011F2 C202CB02CE02E7023C- <1>
   942 000011FB 035F036F037F039E03- <1>
   942 00001204 AD03B903C503F30322- <1>
   942 0000120D 042F043C0449047204- <1>
   942 00001216 7A049904A404AD04B5- <1>
   942 0000121F 04BA04C004D404DC04- <1>
   942 00001228 F004F904190524053F- <1>
   942 00001231 054405580576057B05- <1>
   942 0000123A 88059305A905B305D3- <1>
   942 00001243 05EC054A0650065806- <1>
   942 0000124C 63067F069006B406C1- <1>
   942 00001255 06CF06D506E106EE06- <1>
   942 0000125E 13071E073C0748075B- <1>
   942 00001267 0764077C0790079507- <1>
   942 00001270 9A079F07A407AD07B8- <1>
   942 00001279 07CA07D407E4076608- <1>
   942 00001282 7108F308FC080D0916- <1>
   942 0000128B 091B09270932093D09- <1>
   942 00001294 50096B0983098D0951- <1>
   942 0000129D 0A660ADB0A0000      <1>
   943                              <1> 
   944                              <1> 	align 2, db 0
   945                              <1> internaldatatocoderelocations:
   946 000012A4 56006000780082008E- <1> 	dw INTERNAL_DATA_TO_CODE_RELOCATIONS, -1
   946 000012AD 009800A200EA00EE00- <1>
   946 000012B6 F200F600FA00FE0002- <1>
   946 000012BF 0106010A010E011201- <1>
   946 000012C8 1601FFFF            <1>
   947                              <1> 
   948                              <1> 	align 2, db 0
   949                              <1> internaldatatodatarelocations:
   950 000012CC 00000A0014001E0028- <1> 	dw INTERNAL_DATA_TO_DATA_RELOCATIONS, -1
   950 000012D5 0032003C0046005200- <1>
   950 000012DE 5C00680074007E008A- <1>
   950 000012E7 0094009E00AA00B400- <1>
   950 000012F0 C600CE00D600DA00DE- <1>
   950 000012F9 00E200E600FFFF      <1>
   951                              <1> 
   952                              <1> %if _ELD_LINKER_PASSES
   953                              <1> 	align 2, db 0
   954                              <1> linkerlinkerdatarelocations:
   955 00001300 0100170C[9D16]0100- <1> 	dw LINK_LINKER_DATA_RELOCATIONS, 0
   955 00001308 560C[4415]0100370D- <1>
   955 00001310 [E119]0000          <1>
   956                              <1> 
   957                              <1> 	align 2, db 0
   958                              <1> internallinkercodetocoderelocations:
   959 00001314 1D0C2C0C3D0C680C00- <1> 	dw INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS, 0
   959 0000131D 00                  <1>
   960                              <1> 
   961                              <1> 	align 2, db 0
   962                              <1> internallinkercodetodatarelocations:
   963 0000131E 0000                <1> 	dw INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS, 0
   964                              <1> 
   965                              <1> 	align 2, db 0
   966                              <1> internallinkerdatatocoderelocations:
   967 00001320 FFFF                <1> 	dw INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS, -1
   968                              <1> 
   969                              <1> 	align 2, db 0
   970                              <1> internallinkerdatatodatarelocations:
   971 00001322 FFFF                <1> 	dw INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS, -1
   972                              <1> %endif
   973                              <1> 
   974                              <1> %if ELDOTHER
   975                              <1> 	align 2, db 0
   976                              <1> linkerotherdatarelocations:
   977                              <1> 	dw LINK_OTHER_DATA_RELOCATIONS, 0
   978                              <1> 
   979                              <1>  %ifnidn LINK_OTHER_LINKER_DATA_RELOCATIONS, ""
   980                              <1>   %error Other linker data links not supported
   981                              <1>  %endif
   982                              <1> %endif
   983                              <1> 
   984                              <1> %if ELDOTHER || ELDHINT
   985                              <1> 	align 2, db 0
   986                              <1> debuggeramissig:
   987 00001324 65636D20<rep 5h>    <1> 		fill 8, 32, db "ecm"
   988 0000132C 6C446562756720-     <1> 		fill 8, 32, db "lDebug"
   988 0000132C <rep 2h>            <1>
   989                              <1> %endif
   990                              <1> 
   991                              <1> %ifnidni _LISTING, ""
   992                              <1> listmsg:
   993 00001334 547261634C6973742D- <1> .hint:		db "TracList-add-offset=",_LISTING,"::"
   993 0000133D 6164642D6F66667365- <1>
   993 00001346 743D6C646D656D2E6C- <1>
   993 0000134F 73743A3A            <1>
   994 00001353 2D2D2D2D680D0A00    <1> .hint.offset:	asciz "----h",13,10
   995                              <1> %endif
   996                              <1> 
   997 0000135B 30CD0C636D64335F6E- <1> 	eldcall_dump_names ELDCALL_CODE_NAMES
   997 00001364 6F745F657874702A11- <1>
   997 0000136D 636D64335F70726570- <1>
   997 00001376 726F636573736564A8- <1>
   997 0000137F 1B1161615F6265666F- <1>
   997 00001388 72655F6765746C696E- <1>
   997 00001391 6509B91061615F6166- <1>
   997 0000139A 7465725F6765746C69- <1>
   997 000013A3 6E651AB70D70757473- <1>
   997 000013AC 5F6578745F646F6E65- <1>
   997 000013B5 CF3F18707574735F63- <1>
   997 000013BE 6F70796F7574707574- <1>
   997 000013C7 5F6578745F646F6E65- <1>
   997 000013D0 6F9D15707574735F67- <1>
   997 000013D9 65746C696E655F6578- <1>
   997 000013E2 745F646F6E65D55509- <1>
   997 000013EB 736B6970636F6D6D61- <1>
   997 000013F4 03C309697373747269- <1>
   997 000013FD 6E673FBABD04636D64- <1>
   997 00001406 33DDB90663686B656F- <1>
   997 0000140F 6C551205707574737A- <1>
   997 00001418 B21205736574726328- <1>
   997 00001421 90046973706DE83A06- <1>
   997 0000142A 6973656F6C3F29EF09- <1>
   997 00001433 736B69707768697465- <1>
   997 0000143C C5C60470757473D0BB- <1>
   997 00001445 1A636F70795F73696E- <1>
   997 0000144E 676C655F636F756E74- <1>
   997 00001457 65645F737472696E67- <1>
   997 00001460 67B1087472696D7075- <1>
   997 00001469 747384810768657877- <1>
   997 00001472 6F7264EBA607646563- <1>
   997 0000147B 776F7264398C087075- <1>
   997 00001484 74736C696E65B77408- <1>
   997 0000148D 7365746573326478AB- <1>
   997 00001496 FF26646973705F6478- <1>
   997 0000149F 61785F74696D65735F- <1>
   997 000014A8 63785F77696474685F- <1>
   997 000014B1 62785F73697A652E73- <1>
   997 000014BA 746F72656FA20D7075- <1>
   997 000014C3 74736C696E655F6372- <1>
   997 000014CC 6C66821B0768657862- <1>
   997 000014D5 7974653DBA06686578- <1>
   997 000014DE 6E7962986906696E74- <1>
   997 000014E7 63686B21300A63616C- <1>
   997 000014F0 6C5F696E743244      <1>
   998 000014F7 C30B076C617374636D- <1> 	link_data_dump_names LINK_DATA_NAMES
   998 00001500 646B5D06646D79636D- <1>
   998 00001509 6454400D6D73672E75- <1>
   998 00001512 6E696E7374616C6C97- <1>
   998 0000151B B6136578745F636F6D- <1>
   998 00001524 6D616E645F68616E64- <1>
   998 0000152D 6C6572EB4208657874- <1>
   998 00001536 647373656CD52D0665- <1>
   998 0000153F 787473656784E3086C- <1>
   998 00001548 696E655F6F7574FDFC- <1>
   998 00001551 06707370646267044A- <1>
   998 0000155A 08636F64655F736567- <1>
   998 00001563 6A5D09616C6C6F635F- <1>
   998 0000156C 7365678C610A616C6C- <1>
   998 00001575 6F635F73697A650A0A- <1>
   998 0000157E 05647373656C2AE70D- <1>
   998 00001587 686973746F7279666F- <1>
   998 00001590 726D617431AA0C6869- <1>
   998 00001599 73746F72792E6C6173- <1>
   998 000015A2 7475AE0D686973746F- <1>
   998 000015AB 72792E66697273747D- <1>
   998 000015B4 4210686973746F7279- <1>
   998 000015BD 2E7365676F7273656C- <1>
   998 000015C6 73830D686973746F72- <1>
   998 000015CF 79627566666572279B- <1>
   998 000015D8 05737461636BC36709- <1>
   998 000015E1 737461636B5F656E64- <1>
   998 000015EA E7D30B657874736567- <1>
   998 000015F3 5F757365642BC80B65- <1>
   998 000015FC 78747365675F73697A- <1>
   998 00001605 65B2400C6578746461- <1>
   998 0000160E 74615F75736564F634- <1>
   998 00001617 0C657874646174615F- <1>
   998 00001620 73697A652AAE076578- <1>
   998 00001629 74646174612E6B0E65- <1>
   998 00001632 78745F7661725F666F- <1>
   998 0000163B 726D6174F8B40C6578- <1>
   998 00001644 745F7661725F73697A- <1>
   998 0000164D 658FC30E6578745F76- <1>
   998 00001656 61725F616D6F756E74- <1>
   998 0000165F E8B4076578745F7661- <1>
   998 00001668 72C4E2236973766172- <1>
   998 00001671 6961626C655F6D6F72- <1>
   998 0000167A 65627974655F6E616D- <1>
   998 00001683 65686561646572732E- <1>
   998 0000168C 6578748D710B6D7367- <1>
   998 00001695 2E696E7374616C6C5A- <1>
   998 0000169E BC086F7074696F6E73- <1>
   998 000016A7 37BC890D656E747279- <1>
   998 000016B0 7365675F73697A6589- <1>
   998 000016B9 F205637373656CAF9D- <1>
   998 000016C2 0A6D65737361676573- <1>
   998 000016CB 656791300F6D657373- <1>
   998 000016D4 6167657365675F7369- <1>
   998 000016DD 7A65B49D0A6D657373- <1>
   998 000016E6 61676573656CEAE50F- <1>
   998 000016EF 617578627566665F73- <1>
   998 000016F8 65676D656E74B0B214- <1>
   998 00001701 617578627566665F63- <1>
   998 0000170A 757272656E745F7369- <1>
   998 00001713 7A658B001061757862- <1>
   998 0000171C 7566665F7365676F72- <1>
   998 00001725 73656C320809636F64- <1>
   998 0000172E 655F73697A65094A08- <1>
   998 00001737 636F64655F73656C1A- <1>
   998 00001740 F209636F6465325F73- <1>
   998 00001749 6567DC620A636F6465- <1>
   998 00001752 325F73697A651FF209- <1>
   998 0000175B 636F6465325F73656C- <1>
   998 00001764 67340F686973746F72- <1>
   998 0000176D 795F7365676D656E74- <1>
   998 00001776 1E380F686973746F72- <1>
   998 0000177F 797365675F73697A65- <1>
   998 00001788 6A2B08657874637373- <1>
   998 00001791 656C892B06656E7673- <1>
   998 0000179A 6567140B08656E765F- <1>
   998 000017A3 73697A6530CD0C636D- <1>
   998 000017AC 64335F6E6F745F6578- <1>
   998 000017B5 749648166578745F70- <1>
   998 000017BE 726570726F63657373- <1>
   998 000017C7 5F68616E646C657270- <1>
   998 000017D0 2A11636D64335F7072- <1>
   998 000017D9 6570726F6365737365- <1>
   998 000017E2 64C001106578745F61- <1>
   998 000017EB 6D69735F68616E646C- <1>
   998 000017F4 657295551D6578745F- <1>
   998 000017FD 61615F6265666F7265- <1>
   998 00001806 5F6765746C696E655F- <1>
   998 0000180F 68616E646C6572A81B- <1>
   998 00001818 1161615F6265666F72- <1>
   998 00001821 655F6765746C696E65- <1>
   998 0000182A F2351C6578745F6161- <1>
   998 00001833 5F61667465725F6765- <1>
   998 0000183C 746C696E655F68616E- <1>
   998 00001845 646C657209B9106161- <1>
   998 0000184E 5F61667465725F6765- <1>
   998 00001857 746C696E65AE241065- <1>
   998 00001860 78745F707574735F68- <1>
   998 00001869 616E646C65721AB70D- <1>
   998 00001872 707574735F6578745F- <1>
   998 0000187B 646F6E65DD301B6578- <1>
   998 00001884 745F707574735F636F- <1>
   998 0000188D 70796F75747075745F- <1>
   998 00001896 68616E646C6572CF3F- <1>
   998 0000189F 18707574735F636F70- <1>
   998 000018A8 796F75747075745F65- <1>
   998 000018B1 78745F646F6E65B9E1- <1>
   998 000018BA 186578745F70757473- <1>
   998 000018C3 5F6765746C696E655F- <1>
   998 000018CC 68616E646C65726F9D- <1>
   998 000018D5 15707574735F676574- <1>
   998 000018DE 6C696E655F6578745F- <1>
   998 000018E7 646F6E653B26126578- <1>
   998 000018F0 745F696E6A6563745F- <1>
   998 000018F9 68616E646C65729C6C- <1>
   998 00001902 156578745F61615F69- <1>
   998 0000190B 6E6A6563745F68616E- <1>
   998 00001914 646C6572C0CD0D7061- <1>
   998 0000191D 746368617265615F72- <1>
   998 00001926 756E05BD1570617463- <1>
   998 0000192F 68617265615F72756E- <1>
   998 00001938 2E7365676D656E746F- <1>
   998 00001941 E31270617463686172- <1>
   998 0000194A 65615F72756E2E7369- <1>
   998 00001953 7A65C88C1070617463- <1>
   998 0000195C 68617265615F696E74- <1>
   998 00001965 72746E0DF418706174- <1>
   998 0000196E 6368617265615F696E- <1>
   998 00001977 7472746E2E7365676D- <1>
   998 00001980 656E74674915706174- <1>
   998 00001989 6368617265615F696E- <1>
   998 00001992 7472746E2E73697A65- <1>
   998 0000199B 79A510706174636861- <1>
   998 000019A4 7265615F706D5F6578- <1>
   998 000019AD 63BECB187061746368- <1>
   998 000019B6 617265615F706D5F65- <1>
   998 000019BF 78632E7365676D656E- <1>
   998 000019C8 7456F7157061746368- <1>
   998 000019D1 617265615F706D5F65- <1>
   998 000019DA 78632E73697A656844- <1>
   998 000019E3 0E6C696E6B63616C6C- <1>
   998 000019EC 5F7461626C65F09E22- <1>
   998 000019F5 7472795F6465627567- <1>
   998 000019FE 6765725F616D69735F- <1>
   998 00001A07 6D756C7469706C6578- <1>
   998 00001A10 5F6E756D626572CB51- <1>
   998 00001A19 0E696E7465726E616C- <1>
   998 00001A22 666C61677334688C15- <1>
   998 00001A2B 616D69735F6D756C74- <1>
   998 00001A34 69706C65785F6E756D- <1>
   998 00001A3D 626572              <1>
   999                              <1> %if ELDOTHER
  1000                              <1> 	link_data_dump_names LINK_OTHER_DATA_NAMES
  1001                              <1> %endif
  1002                              <1> 
  1003                              <1> lmsg:
  1004                              <1> %if _ELD_LINKER_PASSES
  1005                              <1> %if _ELDCALL_OPTIONAL
  1006                              <1> .warning_code_optional:		counted "Optional code link missing, hash="
  1007                              <1> %endif
  1008 00001A40 214F7074696F6E616C- <1> .warning_data_optional:		counted "Optional data link missing, hash="
  1008 00001A49 2064617461206C696E- <1>
  1008 00001A52 6B206D697373696E67- <1>
  1008 00001A5B 2C20686173683D      <1>
  1009 00001A62 1844617461206C696E- <1> .error_data:			counted "Data link missing, hash="
  1009 00001A6B 6B206D697373696E67- <1>
  1009 00001A74 2C20686173683D      <1>
  1010 00001A7B 18436F6465206C696E- <1> .error_code:			counted "Code link missing, hash="
  1010 00001A84 6B206D697373696E67- <1>
  1010 00001A8D 2C20686173683D      <1>
  1011 00001A94 0A682C206C6162656C- <1> .error.2:			counted "h, label ",'"'
  1011 00001A9D 2022                <1>
  1012                              <1> %endif
  1013                              <1> %if ELDOTHER
  1014                              <1> .no_other:		asciz "ELD linker: No other link info found!",13,10
  1015                              <1> .error_other:		asciz "ELD linker: Other link info unknown format!",13,10
  1016                              <1> %endif
  1017                              <1> 
  1018 00001A9F 00                  <1> 	align 16, db 0
  2512                                  
  2513                                  	align 16
  2514                                  code_size equ $ - code
