     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 701C                    at eldhCodeImageLength,	dw code_size
    70 0000000E 0000                    at eldhCodeAllocLength,	dw 0
    71 00000010 C01C0000                at eldhDataOffset,	dd DATAOFFSET
    72 00000014 500C                    at eldhDataImageLength,	dw data_size
    73 00000016 0000                    at eldhDataAllocLength,	dw total_data_size - data_size
    74 00000018 FB0A                    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 D2250000                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 E88609                  	extcallcall skipcomma
   138                                  @@:
   139 00000032 4E                      	dec si
   140                                  
   141 00000033 BA[6F02]                reloc	mov dx, msg.ldmem
   142                                  internaldatarelocation
   143 00000036 E88709                  	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 E87409                  	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 E86F09                  	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 E86F09                  	extcallcall cmd3
   178                                  
   179                                  uninstall:
   180 00000059 AC                      	lodsb
   181 0000005A E87309                  	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[7502]                reloc	mov dx, msg.uninstall_done
   247                                  internaldatarelocation
   248                                  @@:
   249 000000B8 16                      	push ss
   250 000000B9 1F                      	pop ds
   251 000000BA E81B09                  	extcallcall putsz
   252 000000BD E80809                  	extcallcall cmd3	; return
   253                                  
   254                                  .error:
   255 000000C0 B8010E                  	mov ax, 0E01h
   256 000000C3 E81A09                  	extcallcall setrc
   257 000000C6 BA[8A02]                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 E81609                  	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[FA08][F306]        reloc2	mov word [separatormessage], msg.empty
   294                                  internaldatarelocation -4
   295                                  internaldatarelocation
   296 000000E1 AC                      	lodsb
   297 000000E2 E80B09                  	extcallcall iseol?
   298 000000E5 7503                    	jne @F
   299 000000E7 BE[3E01]                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 E8FE08                  	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[F600]                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 E8B108                  	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 E89E08                  	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 E8A408                  	extcallcall setrc
   364 0000013C BA[5902]                reloc	mov dx, msg.notfound.1
   365                                  internaldatarelocation
   366 0000013F E89608                  	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 E8A608                  	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 E89C08                  	extcallcall skipwhite
   386 0000015C E89108                  	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 E88F08                  	extcallcall puts
   402 00000171 BA[6002]                reloc	mov dx, msg.notfound.2
   403                                  internaldatarelocation
   404 00000174 E86108                  	extcallcall putsz
   405 00000177 E83E08                  	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[F106]                reloc	mov dx, msg.linebreak
   411                                  internaldatarelocation
   412 00000181 8716[FA08]              reloc	xchg dx, word [separatormessage]
   413                                  internaldatarelocation
   414 00000185 E85008                  	extcallcall putsz
   415 00000188 C3                      	retn
   416                                  
   417                                  
   418                                  display_seg:
   419 00000189 E84401                  	call sort_mem
   420                                  
   421 0000018C BE[0009]                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 E86408                  	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 E85908                  	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 E84108                  	extcallcall trimputs
   468                                  
   469 000001CF BE[0009]                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 E83708                  	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 E81808                  	extcallcall trimputs
   497                                  
   498 000001F8 E8ED07                  	extcallcall ispm
   499 000001FB 753B                    	jnz .end
   500                                  
   501 000001FD BE[0009]                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 E8F607                  	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 E8D807                  	extcallcall trimputs
   542                                  
   543                                  .end:
   544 00000238 E82002                  	call display_data_sel
   545 0000023B C3                      	retn
   546                                  
   547                                  
   548                                  display_patchareas.none:
   549 0000023C BA[BB08]                reloc	mov dx, msg.patch_area.5
   550                                  internaldatarelocation
   551 0000023F E89607                  	extcallcall putsz
   552 00000242 EB78                    	jmp display_patchareas.next
   553                                  
   554                                  display_patchareas:
   555 00000244 BE[DE00]                reloc	mov si, store_table
   556                                  internaldatarelocation
   557                                  
   558                                  .loop:
   559 00000247 AD                      	lodsw
   560 00000248 97                      	xchg di, ax		; di = offset -> patch area
   561 00000249 AD                      	lodsw
   562 0000024A 93                      	xchg bx, ax		; bx -> word [segment] => patch area
   563 0000024B AD                      	lodsw
   564 0000024C 91                      	xchg cx, ax		; cx = length
   565 0000024D AD                      	lodsw			; ax -> name message
   566 0000024E 50                      	push ax			; name
   567 0000024F E3EB                    	jcxz .none		; zero length means not supported -->
   568 00000251 85DB                    	test bx, bx
   569 00000253 74E7                    	jz .none		; zero offset of segment is invalid -->
   570                                  	; test di, di		; (could be valid)
   571                                  	; jz .none
   572                                  
   573                                  	houdini
   574                                  
   575 00000255 BA[6808]                reloc	mov dx, msg.patch_area.1
   576                                  internaldatarelocation
   577 00000258 E87D07                  	extcallcall putsz	; header
   578 0000025B 57                      	push di			; preserve -> patch area
   579 0000025C 51                      	 push cx
   580 0000025D 91                      	xchg ax, cx		; ax = length
   581 0000025E BF[0000]                reloc	mov di, relocateddata
   582                                  linkdatarelocation line_out
   583 00000261 E8BC07                  	extcallcall decword	; write length
   584 00000264 53                      	 push bx
   585 00000265 E8C007                  	extcallcall putsline
   586 00000268 5B                      	 pop bx			; preserve segment variable offset
   587 00000269 59                      	 pop cx			; preserve length
   588 0000026A 5F                      	pop di
   589                                  	getotherds
   590 0000026B 8B17                    	mov dx, word [bx]	; => segment of patch area
   591                                  	resetds
   592 0000026D 89D5                    	mov bp, dx		; preserve segment
   593 0000026F E8BE07                  	extcallcall setes2dx	; es => patch area
   594 00000272 BA[8808]                reloc	mov dx, msg.patch_area.2.notinuse
   595                                  internaldatarelocation
   596 00000275 57                      	push di
   597 00000276 B090                    	mov al, 90h		; check if all NOPs, meaning not in use
   598 00000278 F3AE                    	repe scasb		; check
   599 0000027A 7403                    	je @F			; if not in use -->
   600 0000027C BA[7C08]                reloc	mov dx, msg.patch_area.2.inuse
   601                                  internaldatarelocation		; indicate in use
   602                                  @@:
   603 0000027F 16                      	 push ss
   604 00000280 07                      	 pop es
   605 00000281 E85407                  	extcallcall putsz
   606 00000284 BA[9208]                reloc	mov dx, msg.patch_area.3.entry
   607                                  internaldatarelocation
   608 00000287 81FB[0000]              reloc	cmp bx, strict word relocateddata
   609                                  linkdatarelocation pspdbg	; is entry segment ?
   610 0000028B 7419                    	je @F
   611 0000028D BA[9808]                reloc	mov dx, msg.patch_area.3.code
   612                                  internaldatarelocation
   613 00000290 81FB[0000]              reloc	cmp bx, strict word relocateddata
   614                                  linkdatarelocation code_seg, -2, optional
   615                                  				; is code segment ?
   616 00000294 7410                    	je @F
   617 00000296 81FB[0000]              reloc	cmp bx, strict word relocateddata
   618                                  linkdatarelocation code_movable_seg, -2, optional
   619                                  				; is code segment ?
   620 0000029A 740A                    	je @F
   621 0000029C BA[9D08]                reloc	mov dx, msg.patch_area.3.unknown
   622                                  internaldatarelocation
   623 0000029F BF[A508]                reloc	mov di, msg.patch_area.3.unknown.s
   624                                  internaldatarelocation
   625 000002A2 95                      	xchg ax, bp		; ax = segment value
   626 000002A3 E87207                  	extcallcall hexword
   627                                  @@:
   628 000002A6 E82F07                  	extcallcall putsz
   629 000002A9 BA[AB08]                reloc	mov dx, msg.patch_area.3.offset
   630                                  internaldatarelocation
   631 000002AC BF[AC08]                reloc	mov di, msg.patch_area.3.offset.o
   632                                  internaldatarelocation
   633 000002AF 58                      	pop ax
   634 000002B0 E86507                  	extcallcall hexword
   635 000002B3 E82207                  	extcallcall putsz
   636 000002B6 BA[B408]                reloc	mov dx, msg.patch_area.4
   637                                  internaldatarelocation
   638 000002B9 E81C07                  	extcallcall putsz
   639                                  .next:
   640 000002BC 5A                      	pop dx
   641 000002BD E81807                  	extcallcall putsz
   642                                  
   643 000002C0 BA[F106]                reloc	mov dx, msg.linebreak
   644                                  internaldatarelocation
   645 000002C3 E81207                  	extcallcall putsz
   646                                  
   647 000002C6 81FE[F600]              reloc	cmp si, strict word store_table.end
   648                                  internaldatarelocation
   649 000002CA 7303E978FF              	jb .loop
   650 000002CF C3                      	retn
   651                                  
   652                                  
   653                                  sort_mem:
   654 000002D0 BE[0000]                reloc	mov si, table
   655                                  internaldatarelocation
   656 000002D3 BA[0009]                reloc	mov dx, table_sorted
   657                                  internaldatarelocation
   658                                  
   659                                  loopprepare:
   660 000002D6 AD                      	lodsw
   661 000002D7 85C0                    	test ax, ax
   662 000002D9 7452                    	jz .done
   663 000002DB AD                      	lodsw
   664 000002DC 85C0                    	test ax, ax
   665 000002DE 7505                    	jnz @F
   666                                  .segzero:
   667 000002E0 83C606                  	add si, 6
   668 000002E3 EB46                    	jmp .next
   669                                  
   670                                  @@:
   671 000002E5 93                      	xchg bx, ax
   672                                  	getotherds
   673 000002E6 8B07                    	mov ax, [bx]
   674                                  	resetds
   675 000002E8 85C0                    	test ax, ax
   676 000002EA 74F4                    	jz .segzero
   677 000002EC BF[0409]                reloc	mov di, table_sorted + 4
   678                                  internaldatarelocation
   679                                  @@:
   680 000002EF 39D7                    	cmp di, dx
   681 000002F1 7308                    	jae .insert_at_di_minus_4
   682 000002F3 AF                      	scasw
   683 000002F4 7206                    	jb .insert_at_di_minus_6
   684 000002F6 83C708                  	add di, 8
   685 000002F9 EBF4                    	jmp @B
   686                                  
   687                                  .insert_at_di_minus_4:
   688 000002FB AF                      	scasw
   689                                  .insert_at_di_minus_6:
   690 000002FC 83EF06                  	sub di, 6
   691                                  .insert_at_di:
   692 000002FF 89D1                    	mov cx, dx
   693 00000301 29F9                    	sub cx, di
   694 00000303 56                      	push si
   695 00000304 57                      	push di
   696 00000305 89D7                    	mov di, dx		; -> end
   697 00000307 83C70A                  	add di, 10		; -> after destination
   698 0000030A 89FA                    	mov dx, di		; update -> end
   699 0000030C FD                      	std			; AMD erratum 109 workaround
   700 0000030D AF                      	scasw			; -> last word destination
   701 0000030E 8D75F6                  	lea si, [di - 10]	; -> last word source (dx - 2)
   702 00000311 D1E9                    	shr cx, 1		; = amount of words
   703 00000313 E308                    	jcxz @FF
   704 00000315 83F914                  	cmp cx, 20
   705 00000318 7703                    	ja @FF
   706                                  @@:
   707 0000031A A5                      	movsw
   708 0000031B E2FD                    	loop @B
   709                                  @@:
   710 0000031D F3A5                    	rep movsw		; move up all following entries
   711 0000031F FC                      	cld
   712 00000320 5F                      	pop di
   713 00000321 5E                      	pop si
   714 00000322 83EE04                  	sub si, 4
   715 00000325 A5                      	movsw			; copy message offset
   716 00000326 A5                      	movsw			; copy seg offset
   717 00000327 AB                      	stosw			; store seg value
   718 00000328 AD                      	lodsw			; skip this field
   719 00000329 A5                      	movsw			; copy size offset
   720 0000032A A5                      	movsw			; copy sel offset
   721                                  .next:
   722 0000032B EBA9                    	jmp loopprepare
   723                                  
   724                                  .done:
   725 0000032D 87D7                    	xchg dx, di
   726 0000032F 31C0                    	xor ax, ax
   727 00000331 AB                      	stosw			; terminator
   728 00000332 C3                      	retn
   729                                  
   730                                  
   731                                  display_mem:
   732 00000333 E89AFF                  	call sort_mem
   733                                  
   734 00000336 BB[0000]                reloc	mov bx, relocateddata
   735                                  otherlinkdatarelocation alloc_seg, -2, optional
   736 00000339 89DA                    	mov dx, bx
   737 0000033B 85DB                    	test bx, bx
   738 0000033D 7402                    	jz @F
   739                                  	getotherds
   740 0000033F 8B17                    	mov dx, [bx]
   741                                  	resetds
   742                                  @@:
   743                                  
   744 00000341 BE[0009]                reloc	mov si, table_sorted
   745                                  internaldatarelocation
   746                                  loop:
   747 00000344 BF[0000]                reloc	mov di, relocateddata
   748                                  linkdatarelocation line_out
   749 00000347 AD                      	lodsw
   750 00000348 85C0                    	test ax, ax
   751 0000034A 7503E9BB00              	jz .done
   752 0000034F 56                      	push si
   753 00000350 50                      	push ax
   754 00000351 AD                      	lodsw
   755 00000352 85D2                    	test dx, dx
   756 00000354 741A                    	jz .nogap
   757 00000356 85C0                    	test ax, ax
   758 00000358 7416                    	jz .nogap
   759 0000035A 93                      	xchg bx, ax
   760                                  	getotherds
   761 0000035B 8B07                    	mov ax, [bx]
   762                                  	resetds
   763 0000035D 39C2                    	cmp dx, ax
   764 0000035F 740F                    	je .nogap
   765 00000361 720A                    	jb .gap
   766 00000363 52                      	push dx
   767 00000364 BA[2E04]                reloc	mov dx, msg.overlap
   768                                  internaldatarelocation
   769 00000367 E86E06                  	extcallcall putsz
   770 0000036A 5A                      	pop dx
   771 0000036B EB03                    	jmp .nogap
   772                                  .gap:
   773 0000036D E82706                  	call gap
   774                                  .nogap:
   775 00000370 5E                      	pop si
   776 00000371 E89406                  	extcallcall copy_single_counted_string
   777 00000374 BE[5F03]                reloc	mov si, msg.segment_colon
   778                                  internaldatarelocation
   779 00000377 E88E06                  	extcallcall copy_single_counted_string
   780 0000037A 5E                      	pop si
   781 0000037B AD                      	lodsw
   782 0000037C 85C0                    	test ax, ax
   783 0000037E 750F                    	jnz @F
   784 00000380 83C606                  	add si, 6
   785 00000383 56                      	push si
   786 00000384 BE[6A03]                reloc	mov si, msg.none
   787                                  internaldatarelocation
   788                                  .next_string:
   789 00000387 E87E06                  	extcallcall copy_single_counted_string
   790 0000038A 31D2                    	xor dx, dx
   791 0000038C 5E                      	pop si
   792 0000038D EB73                    	jmp .next
   793                                  
   794                                  @@:
   795 0000038F 93                      	xchg bx, ax
   796 00000390 B9[1A00]                reloc	mov cx, relocateddata + 26
   797                                  linkdatarelocation line_out
   798 00000393 29F9                    	sub cx, di
   799 00000395 7604                    	jbe @F
   800 00000397 B020                    	mov al, 32
   801 00000399 F3AA                    	rep stosb
   802                                  @@:
   803                                  	getotherds
   804 0000039B 8B07                    	mov ax, [bx]
   805                                  	resetds
   806 0000039D 89C2                    	mov dx, ax
   807 0000039F E87606                  	extcallcall hexword
   808 000003A2 56                      	push si
   809 000003A3 BE[A603]                reloc	mov si, msg.address.1
   810                                  internaldatarelocation
   811 000003A6 E85F06                  	extcallcall copy_single_counted_string
   812 000003A9 5E                      	pop si
   813 000003AA AD                      	lodsw
   814 000003AB AD                      	lodsw
   815 000003AC 85C0                    	test ax, ax
   816 000003AE 750C                    	jnz @F
   817 000003B0 AD                      	lodsw
   818 000003B1 56                      	push si
   819 000003B2 BE[8D03]                reloc	mov si, msg.nonesize
   820                                  internaldatarelocation
   821 000003B5 31D2                    	xor dx, dx
   822 000003B7 E84E06                  	extcallcall copy_single_counted_string
   823 000003BA EB30                    	jmp .next_sel
   824                                  
   825                                  @@:
   826 000003BC 52                      	push dx
   827 000003BD 56                      	push si
   828 000003BE BE[A903]                reloc	mov si, msg.size.1
   829                                  internaldatarelocation
   830 000003C1 E84406                  	extcallcall copy_single_counted_string
   831 000003C4 93                      	xchg bx, ax
   832                                  	getotherds
   833 000003C5 8B07                    	mov ax, [bx]
   834                                  	resetds
   835 000003C7 E84E06                  	extcallcall hexword
   836 000003CA BE[B103]                reloc	mov si, msg.size.2
   837                                  internaldatarelocation
   838 000003CD E83806                  	extcallcall copy_single_counted_string
   839 000003D0 31D2                    	xor dx, dx
   840 000003D2 B90100                  	mov cx, 1
   841 000003D5 BB0900                  	mov bx, 9
   842 000003D8 E85D06                  	extcallcall disp_dxax_times_cx_width_bx_size.store
   843 000003DB 5E                      	pop si
   844 000003DC 5A                      	pop dx
   845 000003DD 83C00F                  	add ax, 15
   846 000003E0 D1E8                    	shr ax, 1
   847 000003E2 D1E8                    	shr ax, 1
   848 000003E4 D1E8                    	shr ax, 1
   849 000003E6 D1E8                    	shr ax, 1
   850 000003E8 01C2                    	add dx, ax
   851 000003EA AD                      	lodsw
   852 000003EB 56                      	push si
   853                                  .next_sel:
   854 000003EC E8F905                  	extcallcall ispm
   855 000003EF 7510                    	jnz @F
   856 000003F1 85C0                    	test ax, ax
   857 000003F3 740C                    	jz @F
   858 000003F5 93                      	xchg bx, ax
   859                                  	getotherds
   860 000003F6 8B07                    	mov ax, [bx]
   861                                  	resetds
   862 000003F8 BE[B403]                reloc	mov si, msg.sel
   863                                  internaldatarelocation
   864 000003FB E80A06                  	extcallcall copy_single_counted_string
   865 000003FE E81706                  	extcallcall hexword
   866                                  
   867                                  @@:
   868 00000401 5E                      	pop si
   869                                  
   870                                  .next:
   871 00000402 52                      	push dx
   872 00000403 E83A06                  	extcallcall putsline_crlf
   873 00000406 5A                      	pop dx
   874 00000407 E93AFF                  	jmp loop
   875                                  
   876                                  .done:
   877                                  loop_done:
   878                                  
   879 0000040A BB[0000]                reloc	mov bx, relocateddata
   880                                  otherlinkdatarelocation alloc_seg, -2, optional
   881 0000040D 85DB                    	test bx, bx
   882 0000040F 7416                    	jz .nogap
   883                                  	getotherds
   884 00000411 8B07                    	mov ax, [bx]
   885 00000413 BB[0000]                reloc	mov bx, relocateddata
   886                                  otherlinkdatarelocation alloc_size, -2, optional
   887 00000416 85DB                    	test bx, bx
   888 00000418 740D                    	jz .nogap
   889 0000041A 0307                    	add ax, [bx]
   890                                  	resetds
   891 0000041C 85D2                    	test dx, dx
   892 0000041E 7407                    	jz .nogap
   893 00000420 39C2                    	cmp dx, ax
   894 00000422 7303                    	jae .nogap
   895 00000424 E87005                  	call gap
   896                                  .nogap:
   897                                  	resetds
   898                                  
   899                                  
   900                                  display_alloc:
   901 00000427 BA[F803]                reloc	mov dx, msg.alloc
   902                                  internaldatarelocation
   903 0000042A E8AB05                  	extcallcall putsz
   904                                  
   905 0000042D BB[0000]                reloc	mov bx, relocateddata
   906                                  otherlinkdatarelocation alloc_seg, -2, optional
   907 00000430 85DB                    	test bx, bx
   908 00000432 7508                    	jnz @F
   909 00000434 BE[6A03]                reloc	mov si, msg.none
   910                                  internaldatarelocation
   911                                  .eol_string:
   912 00000437 E8CE05                  	extcallcall copy_single_counted_string
   913 0000043A EB1C                    	jmp .eol
   914                                  
   915                                  @@:
   916                                  	getotherds
   917 0000043C 8B07                    	mov ax, [bx]
   918                                  	resetds
   919 0000043E E8D705                  	extcallcall hexword
   920 00000441 BE[A603]                reloc	mov si, msg.address.1
   921                                  internaldatarelocation
   922 00000444 E8C105                  	extcallcall copy_single_counted_string
   923                                  
   924 00000447 BB[0000]                reloc	mov bx, relocateddata
   925                                  otherlinkdatarelocation alloc_size, -2, optional
   926 0000044A 85DB                    	test bx, bx
   927 0000044C 7505                    	jnz @F
   928 0000044E BE[8D03]                reloc	mov si, msg.nonesize
   929                                  internaldatarelocation
   930 00000451 EBE4                    	jmp .eol_string
   931                                  
   932                                  @@:
   933                                  	getotherds
   934 00000453 8B07                    	mov ax, [bx]
   935                                  	resetds
   936 00000455 E81105                  	call parasize
   937                                  .eol:
   938 00000458 E8E505                  	extcallcall putsline_crlf
   939                                  
   940                                  
   941                                  display_data_sel:
   942 0000045B E88A05                  	extcallcall ispm
   943 0000045E 7539                    	jnz .end
   944                                  
   945 00000460 BF[0000]                reloc	mov di, relocateddata
   946                                  linkdatarelocation line_out
   947 00000463 B90200                  	mov cx, 2
   948                                  @@:
   949 00000466 BB[0000]                reloc	mov bx, relocateddata
   950                                  otherlinkdatarelocation dssel, -2, optional
   951 00000469 80F902                  	cmp cl, 2
   952 0000046C 7403                    	je .dssel
   953 0000046E BB[0000]                reloc	mov bx, relocateddata
   954                                  otherlinkdatarelocation extdssel, -2, optional
   955                                  .dssel:
   956 00000471 85DB                    	test bx, bx
   957 00000473 7419                    	jz .next
   958                                  	getotherds
   959 00000475 8B07                    	mov ax, [bx]
   960                                  	resetds
   961 00000477 BE[C103]                reloc	mov si, msg.dssel
   962                                  internaldatarelocation
   963 0000047A 80F902                  	cmp cl, 2
   964 0000047D 7403                    	je .msgdssel
   965 0000047F BE[D703]                reloc	mov si, msg.extdssel
   966                                  internaldatarelocation
   967                                  .msgdssel:
   968 00000482 51                      	push cx
   969 00000483 E88205                  	extcallcall copy_single_counted_string
   970 00000486 59                      	pop cx
   971 00000487 E88E05                  	extcallcall hexword
   972 0000048A B82020                  	mov ax, 2020h
   973 0000048D AB                      	stosw
   974                                  .next:
   975 0000048E E2D6                    	loop @B
   976 00000490 81FF[0000]              reloc	cmp di, strict word relocateddata
   977                                  linkdatarelocation line_out
   978 00000494 7403                    	je .end
   979 00000496 E87705                  	extcallcall trimputs
   980                                  
   981                                  .end:
   982 00000499 C3                      	retn
   983                                  
   984                                  
   985                                  historysize:
   986                                  	lframe none
   987 0000049A 5589E5                  	lenter
   988 0000049D C606[3801]00            reloc	mov byte [history_data_entry], 0
   989                                  internaldatarelocation -3
   990 000004A2 B8[0000]                reloc	mov ax, relocateddata
   991                                  otherlinkdatarelocation historyformat, -2, optional
   992 000004A5 85C0                    	test ax, ax
   993 000004A7 7509                    	jnz @F
   994 000004A9 BA[3904]                reloc	mov dx, msg.history_none
   995                                  internaldatarelocation
   996                                  .putsz_end:
   997 000004AC E82905                  	extcallcall putsz
   998 000004AF E9B400                  	jmp .end
   999                                  
  1000                                  @@:
  1001 000004B2 BA[5904]                reloc	mov dx, msg.history_data_entry
  1002                                  internaldatarelocation
  1003                                  	; houdini
  1004                                  @@:
  1005 000004B5 83F802                  	cmp ax, 2
  1006 000004B8 720A                    	jb .in_data_entry
  1007 000004BA BA[7A04]                reloc	mov dx, msg.history_separate
  1008                                  internaldatarelocation
  1009 000004BD 7409                    	je .in_separate
  1010                                  
  1011                                  %if 0
  1012                                  reloc	mov di, relocateddata
  1013                                  linkdatarelocation line_out
  1014                                  	extcallcall hexword
  1015                                  	mov al, 32
  1016                                  	stosb
  1017                                  reloc	mov si, @B
  1018                                  internalcoderelocation
  1019                                  	mov cx, 16
  1020                                  @@:
  1021                                  	cs lodsb
  1022                                  	extcallcall hexbyte
  1023                                  	mov al, 32
  1024                                  	stosb
  1025                                  	loop @B
  1026                                  	extcallcall trimputs
  1027                                  %endif
  1028                                  
  1029 000004BF BA[9B04]                reloc	mov dx, msg.history_unknown
  1030                                  internaldatarelocation
  1031 000004C2 EBE8                    	jmp .putsz_end
  1032                                  
  1033                                  .in_data_entry:
  1034 000004C4 F616[3801]              reloc	not byte [history_data_entry]
  1035                                  internaldatarelocation
  1036                                  .in_separate:
  1037 000004C8 E80D05                  	extcallcall putsz
  1038 000004CB BB[0000]                reloc	mov bx, relocateddata
  1039                                  otherlinkdatarelocation history.last, -2, optional
  1040 000004CE BA[0000]                reloc	mov dx, relocateddata
  1041                                  otherlinkdatarelocation history.first, -2, optional
  1042 000004D1 85DB                    	test bx, bx
  1043 000004D3 7404                    	jz @F
  1044 000004D5 85D2                    	test dx, dx
  1045 000004D7 7505                    	jnz @FF
  1046                                  
  1047                                  @@:
  1048                                  .missing:
  1049                                  	resetds
  1050 000004D9 BA[B504]                reloc	mov dx, msg.history_missing
  1051                                  internaldatarelocation
  1052 000004DC EBCE                    	jmp .putsz_end
  1053                                  
  1054                                  @@:
  1055 000004DE BF[0000]                reloc	mov di, relocateddata
  1056                                  linkdatarelocation line_out
  1057 000004E1 BE[EE04]                reloc	mov si, msg.history.1
  1058                                  internaldatarelocation
  1059 000004E4 E82105                  	extcallcall copy_single_counted_string
  1060                                  	getotherds
  1061 000004E7 87D3                    	xchg dx, bx
  1062 000004E9 8B07                    	mov ax, [bx]
  1063 000004EB 87D3                    	xchg dx, bx
  1064 000004ED 2B07                    	sub ax, [bx]
  1065                                  	resetds
  1066 000004EF D1E8                    	shr ax, 1
  1067 000004F1 E82C05                  	extcallcall decword
  1068 000004F4 50                      	push ax
  1069 000004F5 BE[0005]                reloc	mov si, msg.history.2
  1070                                  internaldatarelocation
  1071 000004F8 E80D05                  	extcallcall copy_single_counted_string
  1072                                  	getotherds
  1073 000004FB 8B1F                    	mov bx, [bx]
  1074                                  	resetds
  1075 000004FD D006[3801]              reloc	rol byte [history_data_entry], 1
  1076                                  internaldatarelocation
  1077                                  	getotherds
  1078 00000501 720B                    	jc .not_seg
  1079 00000503 53                      	push bx
  1080 00000504 BB[0000]                reloc	mov bx, relocateddata
  1081                                  otherlinkdatarelocation history.segorsel, -2, optional
  1082 00000507 85DB                    	test bx, bx
  1083 00000509 74CE                    	jz .missing
  1084 0000050B 8E1F                    	mov ds, word [bx]
  1085 0000050D 5B                      	pop bx
  1086                                  .not_seg:
  1087 0000050E 8B07                    	mov ax, [bx]
  1088 00000510 16                      	 push ss
  1089 00000511 1F                      	 pop ds
  1090 00000512 59                      	pop cx
  1091 00000513 01C8                    	add ax, cx
  1092 00000515 01C8                    	add ax, cx
  1093 00000517 51                      	push cx
  1094 00000518 40                      	inc ax
  1095 00000519 40                      	inc ax
  1096 0000051A E80305                  	extcallcall decword
  1097 0000051D 50                      	push ax
  1098 0000051E BE[1205]                reloc	mov si, msg.history.3
  1099                                  internaldatarelocation
  1100 00000521 E8E404                  	extcallcall copy_single_counted_string
  1101 00000524 89D3                    	mov bx, dx
  1102                                  	getotherds
  1103 00000526 8B07                    	mov ax, [bx]
  1104                                  	resetds
  1105 00000528 D006[3801]              reloc	rol byte [history_data_entry], 1
  1106                                  internaldatarelocation
  1107 0000052C 730B                    	jnc .not_entry
  1108 0000052E 53                      	push bx
  1109 0000052F BB[0000]                reloc	mov bx, relocateddata
  1110                                  otherlinkdatarelocation historybuffer, -2, optional
  1111 00000532 85DB                    	test bx, bx
  1112 00000534 74A3                    	jz .missing
  1113 00000536 29D8                    	sub ax, bx
  1114 00000538 5B                      	pop bx
  1115                                  .not_entry:
  1116 00000539 40                      	inc ax
  1117 0000053A 40                      	inc ax
  1118 0000053B E8E204                  	extcallcall decword
  1119 0000053E 58                      	pop ax
  1120 0000053F 5A                      	pop dx
  1121 00000540 85D2                    	test dx, dx
  1122 00000542 7505                    	jnz @F
  1123                                  
  1124 00000544 BE[4D05]                reloc	mov si, msg.history.average.none
  1125                                  internaldatarelocation
  1126 00000547 EB17                    	jmp .string_end
  1127                                  
  1128                                  @@:
  1129 00000549 BE[1B05]                reloc	mov si, msg.history.average.1
  1130                                  internaldatarelocation
  1131 0000054C E8B904                  	extcallcall copy_single_counted_string
  1132                                  
  1133 0000054F 31C9                    	xor cx, cx
  1134 00000551 87CA                    	xchg cx, dx
  1135 00000553 F7F1                    	div cx
  1136 00000555 85D2                    	test dx, dx
  1137 00000557 7401                    	jz @F
  1138 00000559 40                      	inc ax
  1139                                  @@:
  1140 0000055A E8C304                  	extcallcall decword
  1141 0000055D BE[4505]                reloc	mov si, msg.history.average.2
  1142                                  internaldatarelocation
  1143                                  .string_end:
  1144 00000560 E8A504                  	extcallcall copy_single_counted_string
  1145 00000563 E8DA04                  	extcallcall putsline_crlf
  1146                                  .end:
  1147 00000566 89EC5D                  	lleave , forcerestoresp
  1148 00000569 C3                      	retn
  1149                                  
  1150                                  
  1151                                  stacksize:
  1152 0000056A BF[0000]                reloc	mov di, relocateddata
  1153                                  linkdatarelocation line_out
  1154 0000056D BB[0000]                reloc	mov bx, relocateddata
  1155                                  otherlinkdatarelocation stack, -2, optional
  1156 00000570 BA[0000]                reloc	mov dx, relocateddata
  1157                                  otherlinkdatarelocation stack_end, -2, optional
  1158 00000573 85DB                    	test bx, bx
  1159 00000575 7404                    	jz @F
  1160 00000577 85D2                    	test dx, dx
  1161 00000579 7505                    	jnz @FF
  1162                                  @@:
  1163 0000057B BE[8305]                reloc	mov si, msg.stack.none
  1164                                  internaldatarelocation
  1165 0000057E EB31                    	jmp .string_end
  1166                                  
  1167                                  @@:
  1168 00000580 BE[9A05]                reloc	mov si, msg.stack.1
  1169                                  internaldatarelocation
  1170 00000583 E88204                  	extcallcall copy_single_counted_string
  1171 00000586 89D0                    	mov ax, dx
  1172 00000588 29D8                    	sub ax, bx
  1173 0000058A E89304                  	extcallcall decword
  1174 0000058D BE[A705]                reloc	mov si, msg.stack.2
  1175                                  internaldatarelocation
  1176 00000590 E87504                  	extcallcall copy_single_counted_string
  1177                                  	getotherds
  1178 00000593 8A07                    	mov al, [bx]
  1179                                  	resetds
  1180 00000595 E8B004                  	extcallcall hexbyte
  1181 00000598 BE[C605]                reloc	mov si, msg.stack.3
  1182                                  internaldatarelocation
  1183 0000059B E86A04                  	extcallcall copy_single_counted_string
  1184 0000059E 87FB                    	xchg di, bx
  1185                                  	getotheres
  1186 000005A0 B9FFFF                  	mov cx, -1
  1187 000005A3 F3AE                    	repe scasb
  1188                                  	resetes
  1189 000005A5 F7D1                    	not cx
  1190 000005A7 49                      	dec cx
  1191 000005A8 91                      	xchg ax, cx
  1192 000005A9 87FB                    	xchg di, bx
  1193 000005AB E87204                  	extcallcall decword
  1194 000005AE BE[E205]                reloc	mov si, msg.stack.4
  1195                                  internaldatarelocation
  1196                                  
  1197                                  .string_end:
  1198 000005B1 E85404                  	extcallcall copy_single_counted_string
  1199 000005B4 E87104                  	extcallcall putsline
  1200 000005B7 C3                      	retn
  1201                                  
  1202                                  
  1203                                  display_eld_memory:
  1204 000005B8 BA[EB05]                reloc	mov dx, msg.eld.1
  1205                                  internaldatarelocation
  1206 000005BB E81A04                  	extcallcall putsz
  1207                                  
  1208 000005BE 31C0                    	xor ax, ax
  1209                                  .loop:
  1210 000005C0 BF[0000]                reloc	mov di, relocateddata
  1211                                  linkdatarelocation line_out
  1212                                  	getotherds
  1213 000005C3 3906[0000]              reloc	cmp word [relocateddata], ax
  1214                                  otherlinkdatarelocation extseg_used
  1215 000005C7 7719                    	ja @F
  1216                                  
  1217 000005C9 31ED                    	xor bp, bp
  1218 000005CB 8B16[0000]              reloc	mov dx, word [relocateddata]
  1219                                  otherlinkdatarelocation extseg_size
  1220 000005CF 29C2                    	sub dx, ax
  1221 000005D1 31DB                    	xor bx, bx
  1222 000005D3 31C9                    	xor cx, cx
  1223                                  .free:
  1224 000005D5 16                      	 push ss
  1225 000005D6 1F                      	 pop ds
  1226 000005D7 51                      	push cx
  1227 000005D8 BE[1A06]                reloc	mov si, msg.eld.free
  1228                                  internaldatarelocation
  1229 000005DB E82A04                  	extcallcall copy_single_counted_string
  1230 000005DE 59                      	pop cx
  1231 000005DF E9A200                  	jmp .have
  1232                                  
  1233                                  @@:
  1234 000005E2 BB[0000]                reloc	mov bx, relocateddata
  1235                                  otherlinkdatarelocation extdssel, -2, optional
  1236 000005E5 E80004                  	extcallcall ispm
  1237 000005E8 7403                    	jz @F
  1238 000005EA BB[0000]                reloc	mov bx, relocateddata
  1239                                  otherlinkdatarelocation extseg, -2, optional
  1240                                  @@:
  1241 000005ED 85DB                    	test bx, bx
  1242 000005EF 7509                    	jnz @F
  1243                                  .error:
  1244                                  	resetds
  1245 000005F1 BA[FA05]                reloc	mov dx, msg.eld.error
  1246                                  internaldatarelocation
  1247 000005F4 E8E103                  	extcallcall putsz
  1248 000005F7 E9AD00                  	jmp .end
  1249                                  
  1250                                  @@:
  1251 000005FA 8E07                    	mov es, word [bx]
  1252 000005FC 89C3                    	mov bx, ax
  1253 000005FE 263907                  	cmp word [es:bx + eldiStartCode], ax
  1254 00000601 75EE                    	jne .error
  1255 00000603 89C2                    	mov dx, ax
  1256 00000605 83C220                  	add dx, ELD_INSTANCE_size
  1257 00000608 72E7                    	jc .error
  1258 0000060A 26395702                	cmp word [es:bx + eldiEndCode], dx
  1259 0000060E 72E1                    	jb .error
  1260 00000610 8B16[0000]              reloc	mov dx, word [relocateddata]
  1261                                  otherlinkdatarelocation extseg_used
  1262 00000614 26395702                	cmp word [es:bx + eldiEndCode], dx
  1263 00000618 77D7                    	ja .error
  1264 0000061A 740B                    	je @F
  1265 0000061C 83EA20                  	sub dx, ELD_INSTANCE_size
  1266 0000061F 72D0                    	jc .error
  1267 00000621 26395702                	cmp word [es:bx + eldiEndCode], dx
  1268 00000625 77CA                    	ja .error
  1269                                  @@:
  1270 00000627 268B5702                	mov dx, word [es:bx + eldiEndCode]
  1271 0000062B 89D5                    	mov bp, dx
  1272 0000062D 29C2                    	sub dx, ax
  1273 0000062F 72C0                    	jc .error
  1274 00000631 26FF7704                	push word [es:bx + eldiStartData]
  1275 00000635 53                      	push bx
  1276 00000636 268B5F06                	mov bx, word [es:bx + eldiEndData]
  1277 0000063A 5E                      	pop si
  1278 0000063B 26F6441001              	testopt [es:si + eldiFlags], eldifResident
  1279 00000640 8D7408                  	lea si, [si + eldiIdentifier]
  1280 00000643 06                      	push es
  1281 00000644 1F                      	pop ds
  1282 00000645 16                      	 push ss
  1283 00000646 07                      	 pop es
  1284 00000647 59                      	pop cx
  1285 00000648 7537                    	jnz .nonfree
  1286                                  
  1287 0000064A 51                      	push cx
  1288 0000064B 1E                      	push ds
  1289 0000064C 56                      	push si
  1290 0000064D 16                      	 push ss
  1291 0000064E 1F                      	 pop ds
  1292 0000064F BE[1A06]                reloc	mov si, msg.eld.free
  1293                                  internaldatarelocation
  1294 00000652 E8B303                  	extcallcall copy_single_counted_string
  1295                                  
  1296 00000655 BE[2A06]                reloc	mov si, msg.eld.2
  1297                                  internaldatarelocation
  1298 00000658 53                      	push bx
  1299 00000659 E8DD02                  	call display_eld_size
  1300 0000065C 5B                      	pop bx
  1301                                  
  1302 0000065D BE[2506]                reloc	mov si, msg.eld.free.2
  1303                                  internaldatarelocation
  1304 00000660 E8A503                  	extcallcall copy_single_counted_string
  1305                                  
  1306 00000663 5E                      	pop si
  1307 00000664 1F                      	pop ds
  1308                                  
  1309 00000665 E80900                  	call .copyname
  1310                                  
  1311 00000668 BE[2806]                reloc	mov si, msg.eld.free.3
  1312                                  internaldatarelocation
  1313 0000066B E89A03                  	extcallcall copy_single_counted_string
  1314                                  
  1315 0000066E 59                      	pop cx
  1316                                  
  1317 0000066F EB1B                    	jmp .havedata
  1318                                  
  1319                                  .copyname:
  1320 00000671 51                      	push cx
  1321 00000672 50                      	push ax
  1322 00000673 B022                    	mov al, '"'
  1323 00000675 AA                      	stosb
  1324 00000676 B90400                  	mov cx, 4
  1325 00000679 F3A5                    	rep movsw
  1326 0000067B AA                      	stosb
  1327 0000067C 58                      	pop ax
  1328 0000067D 16                      	 push ss
  1329 0000067E 1F                      	 pop ds
  1330 0000067F 59                      	pop cx
  1331 00000680 C3                      	retn
  1332                                  
  1333                                  .nonfree:
  1334 00000681 E8EDFF                  	call .copyname
  1335                                  
  1336                                  .have:
  1337 00000684 BE[2A06]                reloc	mov si, msg.eld.2
  1338                                  internaldatarelocation
  1339 00000687 53                      	push bx
  1340 00000688 E8AE02                  	call display_eld_size
  1341 0000068B 5B                      	pop bx
  1342                                  
  1343                                  .havedata:
  1344 0000068C 89D8                    	mov ax, bx
  1345 0000068E 29C8                    	sub ax, cx
  1346 00000690 7409                    	jz .next
  1347 00000692 92                      	xchg dx, ax
  1348 00000693 89C8                    	mov ax, cx
  1349 00000695 BE[4806]                reloc	mov si, msg.eld.5
  1350                                  internaldatarelocation
  1351 00000698 E89E02                  	call display_eld_size
  1352                                  
  1353                                  .next:
  1354 0000069B E8A203                  	extcallcall putsline_crlf
  1355 0000069E 85ED                    	test bp, bp
  1356 000006A0 89E8                    	mov ax, bp
  1357 000006A2 7403E919FF              	jnz .loop
  1358                                  .end:
  1359                                  
  1360 000006A7 BF[0000]                reloc	mov di, relocateddata
  1361                                  linkdatarelocation line_out
  1362                                  	getotherds
  1363 000006AA A1[0000]                reloc	mov ax, word [relocateddata]
  1364                                  otherlinkdatarelocation extdata_used
  1365 000006AD 8B16[0000]              reloc	mov dx, word [relocateddata]
  1366                                  otherlinkdatarelocation extdata_size
  1367 000006B1 29C2                    	sub dx, ax
  1368 000006B3 740D                    	jz @F
  1369 000006B5 0306[0000]              reloc	add ax, [relocateddata]
  1370                                  otherlinkdatarelocation extdata
  1371 000006B9 BE[6206]                reloc	mov si, msg.eld.6
  1372                                  internaldatarelocation
  1373                                  	resetds
  1374 000006BC E87A02                  	call display_eld_size
  1375 000006BF E87E03                  	extcallcall putsline_crlf
  1376                                  @@:
  1377                                  	resetds
  1378 000006C2 C3                      	retn
  1379                                  
  1380                                  
  1381                                  display_eld_variables:
  1382 000006C3 BF[0000]                reloc	mov di, relocateddata
  1383                                  linkdatarelocation line_out
  1384                                  
  1385 000006C6 BE[7A06]                reloc	mov si, msg.var.format
  1386                                  internaldatarelocation
  1387 000006C9 E83C03                  	extcallcall copy_single_counted_string
  1388                                  
  1389 000006CC B8[0000]                reloc	mov ax, relocateddata
  1390                                  otherlinkdatarelocation ext_var_format
  1391 000006CF 83F801                  	cmp ax, 1
  1392 000006D2 740F                    	je .known
  1393                                  
  1394                                  .unknown:
  1395 000006D4 BF[EC06]                reloc	mov di, msg.varunknown.format
  1396                                  internaldatarelocation
  1397 000006D7 E83E03                  	extcallcall hexword
  1398                                  
  1399 000006DA BA[CD06]                reloc	mov dx, msg.varunknown
  1400                                  internaldatarelocation
  1401 000006DD E8F802                  	extcallcall putsz
  1402 000006E0 E9B100                  	jmp .end
  1403                                  
  1404                                  .known:
  1405 000006E3 E83203                  	extcallcall hexword
  1406                                  
  1407 000006E6 BE[9006]                reloc	mov si, msg.var.size
  1408                                  internaldatarelocation
  1409 000006E9 E81C03                  	extcallcall copy_single_counted_string
  1410                                  
  1411 000006EC B8[0000]                reloc	mov ax, relocateddata
  1412                                  otherlinkdatarelocation ext_var_size
  1413                                  
  1414 000006EF E82603                  	extcallcall hexword
  1415 000006F2 92                      	xchg dx, ax
  1416                                  
  1417 000006F3 BE[A306]                reloc	mov si, msg.var.amount
  1418                                  internaldatarelocation
  1419 000006F6 E80F03                  	extcallcall copy_single_counted_string
  1420                                  
  1421 000006F9 31DB                    	xor bx, bx
  1422 000006FB B9[0000]                reloc	mov cx, relocateddata
  1423                                  otherlinkdatarelocation ext_var_amount
  1424 000006FE 51                      	push cx
  1425 000006FF E313                    	jcxz .donecount
  1426                                  
  1427 00000701 57                      	push di
  1428 00000702 BF[0000]                reloc	mov di, relocateddata
  1429                                  otherlinkdatarelocation ext_var
  1430 00000705 BE[0000]                reloc	mov si, relocateddata
  1431                                  otherlinkdatarelocation isvariable_morebyte_nameheaders.ext
  1432                                  	getotherds
  1433                                  .loopcount:
  1434 00000708 833D00                  	cmp word [di], 0
  1435 0000070B 7401                    	je .nextcount
  1436 0000070D 43                      	inc bx
  1437                                  .nextcount:
  1438 0000070E 01D7                    	add di, dx
  1439 00000710 AD                      	lodsw
  1440 00000711 E2F5                    	loop .loopcount
  1441 00000713 5F                      	pop di
  1442                                  .donecount:
  1443                                  	resetds
  1444                                  
  1445 00000714 93                      	xchg ax, bx
  1446 00000715 E80803                  	extcallcall decword
  1447                                  
  1448 00000718 BE[BD06]                reloc	mov si, msg.var.amountbetween
  1449                                  internaldatarelocation
  1450 0000071B E8EA02                  	extcallcall copy_single_counted_string
  1451                                  
  1452 0000071E 58                      	pop ax
  1453 0000071F E8FE02                  	extcallcall decword
  1454 00000722 50                      	push ax
  1455                                  
  1456 00000723 BE[C606]                reloc	mov si, msg.var.amountafter
  1457                                  internaldatarelocation
  1458 00000726 E8DF02                  	extcallcall copy_single_counted_string
  1459 00000729 52                      	push dx
  1460 0000072A E81303                  	extcallcall putsline_crlf
  1461 0000072D 5A                      	pop dx
  1462 0000072E 59                      	pop cx
  1463                                  
  1464 0000072F BB[0000]                reloc	mov bx, relocateddata
  1465                                  otherlinkdatarelocation ext_var
  1466 00000732 BE[0000]                reloc	mov si, relocateddata
  1467                                  otherlinkdatarelocation isvariable_morebyte_nameheaders.ext
  1468                                  
  1469                                  	getotherds
  1470 00000735 E35D                    	jcxz .donelist
  1471                                  .looplist:
  1472 00000737 833F00                  	cmp word [bx], 0
  1473 0000073A 7453                    	je .nextlist
  1474 0000073C 51                      	push cx
  1475 0000073D 56                      	push si
  1476                                  
  1477 0000073E BF[0000]                reloc	mov di, relocateddata
  1478                                  linkdatarelocation line_out
  1479                                  
  1480                                  	resetds
  1481 00000741 BE[F406]                reloc	mov si, msg.var.list.flags
  1482                                  internaldatarelocation
  1483 00000744 E8C102                  	extcallcall copy_single_counted_string
  1484                                  
  1485                                  	getotherds
  1486 00000747 8B4702                  	mov ax, word [bx + ivFlags]
  1487 0000074A E8CB02                  	extcallcall hexword
  1488                                  
  1489                                  	resetds
  1490 0000074D BE[FB06]                reloc	mov si, msg.var.list.array
  1491                                  internaldatarelocation
  1492 00000750 E8B502                  	extcallcall copy_single_counted_string
  1493                                  
  1494                                  	getotherds
  1495 00000753 8A4708                  	mov al, byte [bx + ivArrayLast]
  1496 00000756 E8EF02                  	extcallcall hexbyte
  1497                                  
  1498 00000759 8A4709                  	mov al, byte [bx + ivArrayBetween]
  1499                                  	resetds
  1500 0000075C 84C0                    	test al, al
  1501 0000075E 7409                    	jz @F
  1502                                  
  1503 00000760 BE[0407]                reloc	mov si, msg.var.list.between
  1504                                  internaldatarelocation
  1505 00000763 E8A202                  	extcallcall copy_single_counted_string
  1506                                  
  1507 00000766 E8DF02                  	extcallcall hexbyte
  1508                                  @@:
  1509                                  
  1510 00000769 BE[0F07]                reloc	mov si, msg.var.list.name
  1511                                  internaldatarelocation
  1512 0000076C E89902                  	extcallcall copy_single_counted_string
  1513                                  
  1514 0000076F 5E                      	pop si
  1515                                  	getotherds
  1516 00000770 A5                      	movsw
  1517 00000771 56                      	push si
  1518                                  
  1519 00000772 8B37                    	mov si, word [bx + ivName]
  1520 00000774 8B4F02                  	mov cx, word [bx + ivFlags]
  1521 00000777 83E10F                  	and cx, ivfNameLengthMask
  1522 0000077A F3A4                    	rep movsb
  1523                                  
  1524 0000077C 53                      	push bx
  1525 0000077D 52                      	push dx
  1526                                  
  1527 0000077E 8B4704                  	mov ax, word [bx + ivAddress]
  1528                                  	resetds
  1529 00000781 BE[1807]                reloc	mov si, msg.var.list.entry
  1530                                  internaldatarelocation
  1531 00000784 E85101                  	call display_entry_and_instance
  1532                                  
  1533 00000787 E8B602                  	extcallcall putsline_crlf
  1534 0000078A 5A                      	pop dx
  1535 0000078B 5B                      	pop bx
  1536                                  
  1537 0000078C 5E                      	pop si
  1538 0000078D 59                      	pop cx
  1539 0000078E A8                      	db __TEST_IMM8		; skip lodsw
  1540                                  .nextlist:
  1541 0000078F AD                      	lodsw
  1542 00000790 01D3                    	add bx, dx
  1543 00000792 E2A3                    	loop .looplist
  1544                                  .donelist:
  1545                                  
  1546                                  .end:
  1547 00000794 C3                      	retn
  1548                                  
  1549                                  
  1550                                  display_command_handler:
  1551 00000795 BB[7000]                reloc	mov bx, handlertable.command
  1552                                  internaldatarelocation
  1553 00000798 EB12                    	jmp @F
  1554                                  
  1555                                  display_amis_handler:
  1556 0000079A BB[8600]                reloc	mov bx, handlertable.amis
  1557                                  internaldatarelocation
  1558 0000079D EB0D                    	jmp @F
  1559                                  
  1560                                  display_asm_handler:
  1561 0000079F BB[9200]                reloc	mov bx, handlertable.asm
  1562                                  internaldatarelocation
  1563 000007A2 EB08                    	jmp @F
  1564                                  
  1565                                  display_puts_handler:
  1566 000007A4 BB[A800]                reloc	mov bx, handlertable.puts
  1567                                  internaldatarelocation
  1568 000007A7 EB03                    	jmp @F
  1569                                  
  1570                                  display_inject_handler:
  1571 000007A9 BB[C800]                reloc	mov bx, handlertable.inject
  1572                                  internaldatarelocation
  1573                                  @@:
  1574                                  
  1575                                  display_handlers:
  1576                                  	houdini
  1577                                  	lframe
  1578 000007AC 5589E5                  	lenter
  1579 000007AF 53                      	 push bx
  1580                                  	lvar word, table
  1581 000007B0 EB06                    	jmp @F
  1582                                  
  1583                                  .next_table:
  1584 000007B2 BA[7407]                reloc	mov dx, msg.handler.init.pre
  1585                                  internaldatarelocation
  1586 000007B5 E82002                  	extcallcall putsz
  1587                                  @@:
  1588 000007B8 8B17                    	mov dx, word [bx + htMessage]
  1589 000007BA E81B02                  	extcallcall putsz
  1590 000007BD BA[7707]                reloc	mov dx, msg.handler.init.post
  1591                                  internaldatarelocation
  1592 000007C0 E81502                  	extcallcall putsz
  1593                                  
  1594 000007C3 8B17                    	mov dx, word [bx + htMessage]
  1595 000007C5 8B5F02                  	mov bx, word [bx + htHandler]
  1596 000007C8 85DB                    	test bx, bx
  1597 000007CA 7510                    	jnz @F
  1598 000007CC 52                      	push dx
  1599 000007CD BA[AD07]                reloc	mov dx, msg.handler.notpresent.pre
  1600                                  internaldatarelocation
  1601 000007D0 E80502                  	extcallcall putsz
  1602 000007D3 5A                      	pop dx
  1603 000007D4 E80102                  	extcallcall putsz
  1604 000007D7 BA[B207]                reloc	mov dx, msg.handler.notpresent.post
  1605                                  internaldatarelocation
  1606 000007DA EB14                    	jmp .putsz_end
  1607                                  
  1608                                  @@:
  1609                                  	getotherds
  1610 000007DC 8B1F                    	mov bx, [bx]
  1611                                  	resetds
  1612 000007DE 85DB                    	test bx, bx
  1613 000007E0 7514                    	jnz @F
  1614 000007E2 52                      	push dx
  1615 000007E3 BA[8407]                reloc	mov dx, msg.handler.none.pre
  1616                                  internaldatarelocation
  1617 000007E6 E8EF01                  	extcallcall putsz
  1618 000007E9 5A                      	pop dx
  1619 000007EA E8EB01                  	extcallcall putsz
  1620 000007ED BA[9707]                reloc	mov dx, msg.handler.none.post
  1621                                  internaldatarelocation
  1622                                  .putsz_end:
  1623 000007F0 E8E501                  	extcallcall putsz
  1624 000007F3 E99A00                  	jmp .end
  1625                                  
  1626                                  @@:
  1627                                  .loop:
  1628 000007F6 16                      	push ss
  1629 000007F7 07                      	pop es
  1630 000007F8 53                      	push bx
  1631 000007F9 BF[0000]                reloc	mov di, relocateddata
  1632                                  linkdatarelocation line_out
  1633 000007FC 93                      	xchg ax, bx
  1634 000007FD BE[6C07]                reloc	mov si, msg.commandhandler.entry
  1635                                  internaldatarelocation
  1636 00000800 E8D500                  	call display_entry_and_instance
  1637 00000803 E83A02                  	extcallcall putsline_crlf
  1638 00000806 5B                      	pop bx
  1639 00000807 E8C1F8                  	call get_es_ext_other
  1640                                  	houdini
  1641 0000080A 8B76FE                  	mov si, word [bp + ?table]
  1642 0000080D F6440802                	testopt [si + htFlags], htfIsInject
  1643 00000811 757D                    	jnz .end
  1644 00000813 F6440801                	testopt [si + htFlags], htfIsAMIS
  1645 00000817 7417                    	jz .notamis
  1646 00000819 26813FEB03              	cmp word [es:bx], 03EBh
  1647 0000081E 755A                    	jne .error
  1648 00000820 26807F02E9              	cmp byte [es:bx + 2], 0E9h
  1649 00000825 7417                    	je .next
  1650 00000827 26807F02CB              	cmp byte [es:bx + 2], 0CBh	; retf
  1651 0000082C 754C                    	jne .error
  1652 0000082E EB60                    	jmp .end
  1653                                  
  1654                                  .notamis:
  1655 00000830 26813FEB08              	cmp word [es:bx], 08EBh
  1656 00000835 7543                    	jne .error
  1657 00000837 26807F02E9              	cmp byte [es:bx + 2], 0E9h
  1658 0000083C 7509                    	jne @F
  1659                                  .next:
  1660 0000083E 26035F03                	add bx, word [es:bx + 2 + 1]
  1661 00000842 83C305                  	add bx, 2 + 3
  1662 00000845 EBAF                    	jmp .loop
  1663                                  
  1664                                  @@:
  1665                                  %if ! _OTHER
  1666 00000847 8B7404                  	mov si, word [si + htTemplate]	; cs:si -> template
  1667 0000084A B90700                  	mov cx, template_size
  1668 0000084D 83EC08                  	sub sp, fromwords(words(template_size))
  1669 00000850 0E                      	push cs
  1670 00000851 1F                      	pop ds				; ds:si -> template
  1671 00000852 89E7                    	mov di, sp			; ss:di -> stack
  1672 00000854 06                      	push es
  1673 00000855 16                      	 push ss
  1674 00000856 07                      	 pop es				; es:di
  1675 00000857 51                      	 push cx
  1676 00000858 F3A4                    	rep movsb
  1677 0000085A 59                      	 pop cx				; restore template length
  1678 0000085B 07                      	pop es				; => ELD instance
  1679 0000085C 16                      	push ss
  1680 0000085D 1F                      	pop ds				; reset ds
  1681 0000085E 89E6                    	mov si, sp			; ds:si -> template on stack
  1682 00000860 8B4401                  	mov ax, [si + 1]
  1683 00000863 8B7EFE                  	mov di, word [bp + ?table]
  1684 00000866 034504                  	add ax, word [di + htTemplate]	; change to (biased) absolute offset
  1685 00000869 8D7F02                  	lea di, [bx + 2]		; es:di -> downlink
  1686 0000086C 29F8                    	sub ax, di			; change to rel16 displacement
  1687 0000086E 894401                  	mov word [si + 1], ax		; enter into template
  1688 00000871 8D4408                  	lea ax, [si + fromwords(words(template_size))]
  1689                                  					; -> prior stack
  1690 00000874 F3A6                    	rep cmpsb			; does it match expected downlink ?
  1691 00000876 89C4                    	mov sp, ax			; reset stack
  1692                                  %else
  1693                                  	cmp byte [es:bx + 2], 0E8h
  1694                                  	jne .error
  1695                                  	mov ax, word [si + htReturn]
  1696                                  	cmp word [es:bx + 2 + 1 + 4], ax
  1697                                  %endif
  1698 00000878 7416                    	je .end
  1699                                  .error:
  1700 0000087A 16                      	push ss
  1701 0000087B 07                      	pop es
  1702 0000087C 8B5EFE                  	mov bx, word [bp + ?table]
  1703 0000087F BA[CB07]                reloc	mov dx, msg.handler.error.pre
  1704                                  internaldatarelocation
  1705 00000882 E85301                  	extcallcall putsz
  1706 00000885 8B17                    	mov dx, word [bx + htMessage]
  1707 00000887 E84E01                  	extcallcall putsz
  1708 0000088A BA[CD07]                reloc	mov dx, msg.handler.error.post
  1709                                  internaldatarelocation
  1710 0000088D E960FF                  	jmp .putsz_end
  1711                                  
  1712                                  .end:
  1713 00000890 16                      	push ss
  1714 00000891 07                      	pop es
  1715 00000892 8B5EFE                  	mov bx, word [bp + ?table]
  1716 00000895 83C30A                  	add bx, HANDLERTABLE_size
  1717 00000898 895EFE                  	mov word [bp + ?table], bx
  1718 0000089B 833F00                  	cmp word [bx], 0
  1719 0000089E 7403E90FFF              	jne .next_table
  1720                                  
  1721 000008A3 89EC5D                  	lleave
  1722                                  emptyfunction:
  1723 000008A6 C3                      	retn
  1724                                  
  1725                                  
  1726                                  template_commandhandler:
  1727                                  template:
  1728 000008A7 E8[0000]EB020000        	extcall cmd3_not_ext, required	; must NOT be extcallcall
  1729                                  	endarea template
  1730                                  template_preprocesshandler:
  1731 000008AE E8[0000]EB020000        	extcall cmd3_preprocessed, required	; must NOT be extcallcall
  1732                                  template_aabeforehandler:
  1733 000008B5 E8[0000]EB020000        	extcall aa_before_getline, optional	; must NOT be extcallcall
  1734                                  template_aaafterhandler:
  1735 000008BC E8[0000]EB020000        	extcall aa_after_getline, optional	; must NOT be extcallcall
  1736                                  template_putshandler:
  1737 000008C3 E8[0000]EB020000        	extcall puts_ext_done, required		; must NOT be extcallcall
  1738                                  template_putscohandler:
  1739 000008CA E8[0000]EB020000        	extcall puts_copyoutput_ext_done, required
  1740                                  				; must NOT be extcallcall
  1741                                  template_putsgetlinehandler:
  1742 000008D1 E8[0000]EB020000        	extcall puts_getline_ext_done, required
  1743                                  				; must NOT be extcallcall
  1744                                  
  1745                                  
  1746                                  display_entry_and_instance:
  1747 000008D8 E82D01                  	extcallcall copy_single_counted_string
  1748 000008DB E83A01                  	extcallcall hexword
  1749                                  
  1750 000008DE 92                      	xchg dx, ax
  1751                                  
  1752 000008DF E8E9F7                  	call get_es_ext_other
  1753 000008E2 31F6                    	xor si, si
  1754 000008E4 31DB                    	xor bx, bx
  1755                                  .loop:
  1756                                  	getotherds
  1757 000008E6 3B36[0000]              reloc	cmp si, word [relocateddata]
  1758                                  otherlinkdatarelocation extseg_used
  1759                                  	resetds
  1760 000008EA 7343                    	jae .notfound
  1761 000008EC 263B34                  	cmp si, [es:si + eldiStartCode]
  1762 000008EF 7543                    	jne .error
  1763 000008F1 8D5C20                  	lea bx, [si + ELD_INSTANCE_size]
  1764 000008F4 263B5C02                	cmp bx, word [es:si + eldiEndCode]
  1765 000008F8 773A                    	ja .error
  1766 000008FA 268B5C02                	mov bx, word [es:si + eldiEndCode]
  1767 000008FE 39D3                    	cmp bx, dx
  1768 00000900 7432                    	je .error
  1769 00000902 7704                    	ja .found
  1770                                  .next:
  1771 00000904 89DE                    	mov si, bx
  1772 00000906 EBDE                    	jmp .loop
  1773                                  
  1774                                  .found:
  1775 00000908 06                      	push es				; stack => ext seg
  1776 00000909 96                      	xchg ax, si			; ax -> instance
  1777 0000090A 16                      	 push ss
  1778 0000090B 07                      	 pop es
  1779 0000090C BE[2307]                reloc	mov si, msg.instance.1
  1780                                  internaldatarelocation
  1781 0000090F E8F600                  	extcallcall copy_single_counted_string
  1782 00000912 E80301                  	extcallcall hexword		; write offset -> instance
  1783                                  
  1784 00000915 BE[3007]                reloc	mov si, msg.instance.2
  1785                                  internaldatarelocation
  1786 00000918 E8ED00                  	extcallcall copy_single_counted_string
  1787                                  
  1788 0000091B 96                      	xchg si, ax			; si -> instance
  1789 0000091C 8D7408                  	lea si, [si + eldiIdentifier]	; si -> id
  1790 0000091F 1F                      	pop ds				; => ext seg
  1791 00000920 B104                    	mov cl, 4			; cx = 4
  1792 00000922 F3A5                    	rep movsw			; copy id
  1793                                  
  1794 00000924 16                      	push ss
  1795 00000925 1F                      	pop ds
  1796                                  
  1797 00000926 BE[4007]                reloc	mov si, msg.instance.3
  1798                                  internaldatarelocation
  1799                                  @@:
  1800 00000929 16                      	push ss
  1801 0000092A 07                      	pop es
  1802 0000092B E8DA00                  	extcallcall copy_single_counted_string
  1803 0000092E C3                      	retn
  1804                                  
  1805                                  .notfound:
  1806 0000092F BE[4207]                reloc	mov si, msg.instance.notfound
  1807                                  internaldatarelocation
  1808 00000932 EBF5                    	jmp @B
  1809                                  
  1810                                  .error:
  1811 00000934 BE[5907]                reloc	mov si, msg.instance.error
  1812                                  internaldatarelocation
  1813 00000937 EBF0                    	jmp @B
  1814                                  
  1815                                  
  1816                                  		; INP:	si -> first string
  1817                                  		;	ax = start
  1818                                  		;	dx = length
  1819                                  display_eld_size:
  1820 00000939 51                      	push cx
  1821 0000093A E8CB00                  	extcallcall copy_single_counted_string
  1822 0000093D E8D800                  	call hexword
  1823 00000940 BE[3806]                reloc	mov si, msg.eld.3
  1824                                  internaldatarelocation
  1825 00000943 E8C200                  	extcallcall copy_single_counted_string
  1826 00000946 01D0                    	add ax, dx
  1827 00000948 E8CD00                  	call hexword
  1828 0000094B BE[4006]                reloc	mov si, msg.eld.4
  1829                                  internaldatarelocation
  1830 0000094E E8B700                  	extcallcall copy_single_counted_string
  1831 00000951 89D0                    	mov ax, dx
  1832 00000953 E8C200                  	call hexword
  1833 00000956 BE[B103]                reloc	mov si, msg.size.2
  1834                                  internaldatarelocation
  1835 00000959 E8AC00                  	extcallcall copy_single_counted_string
  1836 0000095C 31D2                    	xor dx, dx
  1837 0000095E B90100                  	mov cx, 1
  1838 00000961 BB0900                  	mov bx, 9
  1839 00000964 E8D100                  	extcallcall disp_dxax_times_cx_width_bx_size.store
  1840 00000967 59                      	pop cx
  1841 00000968 C3                      	retn
  1842                                  
  1843                                  
  1844                                  parasize:
  1845 00000969 BE[A903]                reloc	mov si, msg.size.1
  1846                                  internaldatarelocation
  1847 0000096C E89900                  	extcallcall copy_single_counted_string
  1848 0000096F B104                    	mov cl, 4
  1849 00000971 50                      	push ax
  1850 00000972 89C2                    	mov dx, ax
  1851 00000974 D3C0                    	rol ax, cl
  1852 00000976 A80F                    	test al, 15
  1853 00000978 7404                    	jz @F
  1854 0000097A 4F                      	dec di
  1855 0000097B E8D200                  	extcallcall hexnyb
  1856                                  @@:
  1857 0000097E 92                      	xchg ax, dx
  1858 0000097F D3E0                    	shl ax, cl
  1859 00000981 E89400                  	extcallcall hexword
  1860 00000984 BE[B103]                reloc	mov si, msg.size.2
  1861                                  internaldatarelocation
  1862 00000987 E87E00                  	extcallcall copy_single_counted_string
  1863 0000098A 58                      	pop ax
  1864 0000098B 31D2                    	xor dx, dx
  1865 0000098D B91000                  	mov cx, 16
  1866 00000990 BB0900                  	mov bx, 9
  1867 00000993 E8A200                  	extcallcall disp_dxax_times_cx_width_bx_size.store
  1868 00000996 C3                      	retn
  1869                                  
  1870                                  
  1871                                  		; INP:	dx => end of prior
  1872                                  		;	ax => start of next
  1873                                  gap:
  1874 00000997 52                      	push dx
  1875 00000998 F7DA                    	neg dx
  1876 0000099A 01C2                    	add dx, ax
  1877 0000099C BE[1304]                reloc	mov si, msg.gap
  1878                                  internaldatarelocation
  1879 0000099F E86600                  	extcallcall copy_single_counted_string
  1880 000009A2 58                      	pop ax
  1881 000009A3 E87200                  	extcallcall hexword
  1882 000009A6 BE[A603]                reloc	mov si, msg.address.1
  1883                                  internaldatarelocation
  1884 000009A9 E85C00                  	extcallcall copy_single_counted_string
  1885 000009AC 92                      	xchg ax, dx
  1886 000009AD E8B9FF                  	call parasize
  1887 000009B0 E88D00                  	extcallcall putsline_crlf
  1888 000009B3 BF[0000]                reloc	mov di, relocateddata
  1889                                  linkdatarelocation line_out
  1890 000009B6 C3                      	retn
  1891                                  
  1892                                  
  1893 000009B7 90E8[0000]EB020000-     	eldcall_dump_callcall ELDCALL_CALLCALL_LIST
  1893 000009BF C3E8[0000]EB020000-
  1893 000009C7 C3E8[0000]EB020000-
  1893 000009CF C3E8[0000]EB020000-
  1893 000009D7 C3E8[0000]EB020000-
  1893 000009DF C3E8[0000]EB020000-
  1893 000009E7 C3E8[0000]EB020000-
  1893 000009EF C3E8[0000]EB020000-
  1893 000009F7 C3E8[0000]EB020000-
  1893 000009FF C3E8[0000]EB020000-
  1893 00000A07 C3E8[0000]EB020000-
  1893 00000A0F C3E8[0000]EB020000-
  1893 00000A17 C3E8[0000]EB020000-
  1893 00000A1F C3E8[0000]EB020000-
  1893 00000A27 C3E8[0000]EB020000-
  1893 00000A2F C3E8[0000]EB020000-
  1893 00000A37 C3E8[0000]EB020000-
  1893 00000A3F C3E8[0000]EB020000-
  1893 00000A47 C3E8[0000]EB020000-
  1893 00000A4F C3E8[0000]EB020000-
  1893 00000A57 C3                 
  1894                                  
  1895                                  endinstalled equ ($ + CODEFIXUP + 15) & ~15
  1896                                  
  1897                                  
  1898                                  start:
  1899 00000A58 8CC3                    	mov bx, es
  1900 00000A5A 16                      	 push ss
  1901 00000A5B 07                      	 pop es
  1902 00000A5C E859FF                  	call skipcomma
  1903 00000A5F 4E                      	dec si
  1904 00000A60 BA[0000]                reloc	mov dx, relocateddata
  1905                                  linkdatarelocation msg.install
  1906 00000A63 E85AFF                  	call isstring?
  1907 00000A66 7440                    	je install
  1908 00000A68 BA[0D09]                reloc	mov dx, msg.keyword_help
  1909                                  internaldatarelocation
  1910 00000A6B E852FF                  	call isstring?
  1911 00000A6E 7409                    	je help
  1912 00000A70 E866F6                  	call run
  1913                                  @@:
  1914 00000A73 E80F00                  	call uninstall_oneshot
  1915 00000A76 31C0                    	xor ax, ax
  1916 00000A78 CB                      	retf
  1917                                  
  1918                                  help:
  1919 00000A79 AC                      	lodsb
  1920 00000A7A E853FF                  	call chkeol
  1921 00000A7D BA[1209]                reloc	mov dx, msg.help
  1922                                  internaldatarelocation
  1923 00000A80 E855FF                  	call putsz
  1924 00000A83 EBEE                    	jmp @B
  1925                                  
  1926                                  
  1927                                  uninstall_oneshot:
  1928 00000A85 36F606[0000]01          reloc	testopt [ss:relocateddata], 1
  1929                                  linkdatarelocation options7, -3
  1930 00000A8B 751A                    	jnz @F
  1931                                  
  1932 00000A8D 2EA1[0200]              reloc	mov ax, word [cs:code + eldiEndCode]
  1933                                  internalcoderelocation
  1934 00000A91 2E2B06[0000]            reloc	sub ax, word [cs:code + eldiStartCode]
  1935                                  internalcoderelocation
  1936 00000A96 2906[0000]              reloc	sub word [relocateddata], ax
  1937                                  linkdatarelocation extseg_used
  1938                                  
  1939 00000A9A 2EA1[0600]              reloc	mov ax, word [cs:code + eldiEndData]
  1940                                  internalcoderelocation
  1941 00000A9E 2E2B06[0400]            reloc	sub ax, word [cs:code + eldiStartData]
  1942                                  internalcoderelocation
  1943 00000AA3 2906[0000]              reloc	sub word [relocateddata], ax
  1944                                  linkdatarelocation extdata_used
  1945                                  @@:
  1946 00000AA7 C3                      	retn
  1947                                  
  1948                                  
  1949                                  DATAOFFSET equ CODEOFFSET + code_size
  1950                                  	addsection DATA, follows=CODE vstart=_ELD_DATA_VSTART
  1951                                  %define DATAFIXUP - datastart + 0
  1952                                  datastart:
  1953                                  PUT_ELD_DATETIME
  1954                                  
  1955                                  %rep _ELD_BUG
  1956                                  	eldstrict off
  1957                                  
  1958                                  	dw msg.ldmem			; missing internaldatarelocation
  1959                                  %endrep
  1960                                  
  1961                                  %if _OTHER
  1962                                  	align 2, db 0
  1963                                  otherds:	dw 0
  1964                                  otherseg:	dw 0
  1965                                  %endif
  1966                                  
  1967                                  	align 8, db 0
  1968                                  table:
  1969                                  .:
  1970 00000000 [A702]                  reloc	dw msg.entryseg
  1971                                  internaldatarelocation
  1972 00000002 [0000]                  reloc	dw relocateddata
  1973                                  otherlinkdatarelocation pspdbg, -2, optional
  1974 00000004 0000                    	dw 0
  1975 00000006 [0000]                  reloc	dw relocateddata
  1976                                  otherlinkdatarelocation entryseg_size, -2, optional
  1977 00000008 [0000]                  reloc	dw relocateddata
  1978                                  otherlinkdatarelocation cssel, -2, optional
  1979                                  
  1980 0000000A [AE02]                  reloc	dw msg.messageseg
  1981                                  internaldatarelocation
  1982 0000000C [0000]                  reloc	dw relocateddata
  1983                                  otherlinkdatarelocation messageseg, -2, optional
  1984 0000000E 0000                    	dw 0
  1985 00000010 [0000]                  reloc	dw relocateddata
  1986                                  otherlinkdatarelocation messageseg_size, -2, optional
  1987 00000012 [0000]                  reloc	dw relocateddata
  1988                                  otherlinkdatarelocation messagesel, -2, optional
  1989                                  
  1990 00000014 [0B03]                  reloc	dw msg.auxbuffseg
  1991                                  internaldatarelocation
  1992 00000016 [0000]                  reloc	dw relocateddata
  1993                                  otherlinkdatarelocation auxbuff_segment, -2, optional
  1994 00000018 0000                    	dw 0
  1995 0000001A [0000]                  reloc	dw relocateddata
  1996                                  otherlinkdatarelocation auxbuff_current_size, -2, optional
  1997 0000001C [0000]                  reloc	dw relocateddata
  1998                                  otherlinkdatarelocation auxbuff_segorsel, -2, optional
  1999                                  
  2000 0000001E [2603]                  reloc	dw msg.auxbuffmovableseg
  2001                                  internaldatarelocation
  2002 00000020 [0000]                  reloc	dw relocateddata
  2003                                  otherlinkdatarelocation auxbuff_movable_segment, -2, optional
  2004 00000022 0000                    	dw 0
  2005 00000024 [0000]                  reloc	dw relocateddata
  2006                                  otherlinkdatarelocation auxbuff_movable_current_size, -2, optional
  2007 00000026 [0000]                  reloc	dw relocateddata
  2008                                  otherlinkdatarelocation auxbuff_movable_segorsel, -2, optional
  2009                                  
  2010 00000028 [B702]                  reloc	dw msg.codeseg
  2011                                  internaldatarelocation
  2012 0000002A [0000]                  reloc	dw relocateddata
  2013                                  otherlinkdatarelocation code_seg, -2, optional
  2014 0000002C 0000                    	dw 0
  2015 0000002E [0000]                  reloc	dw relocateddata
  2016                                  otherlinkdatarelocation code_size, -2, optional
  2017 00000030 [0000]                  reloc	dw relocateddata
  2018                                  otherlinkdatarelocation code_sel, -2, optional
  2019                                  
  2020 00000032 [C802]                  reloc	dw msg.codemovableseg
  2021                                  internaldatarelocation
  2022 00000034 [0000]                  reloc	dw relocateddata
  2023                                  otherlinkdatarelocation code_movable_seg, -2, optional
  2024 00000036 0000                    	dw 0
  2025 00000038 [0000]                  reloc	dw relocateddata
  2026                                  otherlinkdatarelocation code_movable_size, -2, optional
  2027 0000003A [0000]                  reloc	dw relocateddata
  2028                                  otherlinkdatarelocation code_movable_sel, -2, optional
  2029                                  
  2030 0000003C [E002]                  reloc	dw msg.code2seg
  2031                                  internaldatarelocation
  2032 0000003E [0000]                  reloc	dw relocateddata
  2033                                  otherlinkdatarelocation code2_seg, -2, optional
  2034 00000040 0000                    	dw 0
  2035 00000042 [0000]                  reloc	dw relocateddata
  2036                                  otherlinkdatarelocation code2_size, -2, optional
  2037 00000044 [0000]                  reloc	dw relocateddata
  2038                                  otherlinkdatarelocation code2_sel, -2, optional
  2039                                  
  2040 00000046 [F202]                  reloc	dw msg.code2movableseg
  2041                                  internaldatarelocation
  2042 00000048 [0000]                  reloc	dw relocateddata
  2043                                  otherlinkdatarelocation code2_movable_seg, -2, optional
  2044 0000004A 0000                    	dw 0
  2045 0000004C [0000]                  reloc	dw relocateddata
  2046                                  otherlinkdatarelocation code2_movable_size, -2, optional
  2047 0000004E [0000]                  reloc	dw relocateddata
  2048                                  otherlinkdatarelocation code2_movable_sel, -2, optional
  2049                                  
  2050 00000050 [3C03]                  reloc	dw msg.historyseg
  2051                                  internaldatarelocation
  2052 00000052 [0000]                  reloc	dw relocateddata
  2053                                  otherlinkdatarelocation history_segment, -2, optional
  2054 00000054 0000                    	dw 0
  2055 00000056 [0000]                  reloc	dw relocateddata
  2056                                  otherlinkdatarelocation historyseg_size, -2, optional
  2057 00000058 [0000]                  reloc	dw relocateddata
  2058                                  otherlinkdatarelocation history.segorsel, -2, optional
  2059                                  
  2060 0000005A [4503]                  reloc	dw msg.extseg
  2061                                  internaldatarelocation
  2062 0000005C [0000]                  reloc	dw relocateddata
  2063                                  otherlinkdatarelocation extseg, -2, optional
  2064 0000005E 0000                    	dw 0
  2065 00000060 [0000]                  reloc	dw relocateddata
  2066                                  otherlinkdatarelocation extseg_size, -2, optional
  2067 00000062 [0000]                  reloc	dw relocateddata
  2068                                  otherlinkdatarelocation extcssel, -2, optional
  2069                                  
  2070 00000064 [4F03]                  reloc	dw msg.envseg
  2071                                  internaldatarelocation
  2072 00000066 [0000]                  reloc	dw relocateddata
  2073                                  otherlinkdatarelocation envseg, -2, optional
  2074 00000068 0000                    	dw 0
  2075 0000006A [0000]                  reloc	dw relocateddata
  2076                                  otherlinkdatarelocation env_size, -2, optional
  2077 0000006C 0000                    	dw 0
  2078                                  .end:
  2079                                  .amount equ (.end - .) / 10
  2080                                  
  2081 0000006E 0000                    	dw 0
  2082                                  
  2083                                  	align 2, db 0
  2084                                  handlertable:
  2085                                  .command:
  2086                                  	istruc HANDLERTABLE
  2087 00000070 [DF07]                  at htMessage,reloc	dw msg.commandhandler
  2088                                  internaldatarelocation
  2089 00000072 [0000]                  at htHandler,reloc	dw relocateddata
  2090                                  otherlinkdatarelocation ext_command_handler
  2091 00000074 [A708]                  at htTemplate,reloc	dw template_commandhandler
  2092                                  internalcoderelocation
  2093 00000076 [0000]                  at htReturn,reloc	dw relocateddata
  2094                                  otherlinkdatarelocation cmd3_not_ext
  2095 00000078 00<rep 2h>              	iend
  2096                                  	istruc HANDLERTABLE
  2097 0000007A [E707]                  at htMessage,reloc	dw msg.preprocesshandler
  2098                                  internaldatarelocation
  2099 0000007C [0000]                  at htHandler,reloc	dw relocateddata
  2100                                  otherlinkdatarelocation ext_preprocess_handler
  2101 0000007E [AE08]                  at htTemplate,reloc	dw template_preprocesshandler
  2102                                  internalcoderelocation
  2103 00000080 [0000]                  at htReturn,reloc	dw relocateddata
  2104                                  otherlinkdatarelocation cmd3_preprocessed
  2105 00000082 00<rep 2h>              	iend
  2106 00000084 0000                    	dw 0
  2107                                  
  2108                                  .amis:
  2109                                  	istruc HANDLERTABLE
  2110 00000086 [F207]                  at htMessage,reloc	dw msg.amishandler
  2111                                  internaldatarelocation
  2112 00000088 [0000]                  at htHandler,reloc	dw relocateddata
  2113                                  otherlinkdatarelocation ext_amis_handler, -2, optional
  2114 0000008A 0000                    at htTemplate,		dw 0
  2115 0000008C 0000                    at htReturn,		dw 0
  2116 0000008E 0100                    at htFlags,		dw htfIsAMIS
  2117                                  	iend
  2118 00000090 0000                    	dw 0
  2119                                  
  2120                                  .asm:
  2121                                  	istruc HANDLERTABLE
  2122 00000092 [F707]                  at htMessage,reloc	dw msg.aabeforehandler
  2123                                  internaldatarelocation
  2124 00000094 [0000]                  at htHandler,reloc	dw relocateddata
  2125                                  otherlinkdatarelocation ext_aa_before_getline_handler, -2, optional
  2126 00000096 [B508]                  at htTemplate,reloc	dw template_aabeforehandler
  2127                                  internalcoderelocation
  2128 00000098 [0000]                  at htReturn,reloc	dw relocateddata
  2129                                  otherlinkdatarelocation aa_before_getline, -2, optional
  2130 0000009A 00<rep 2h>              	iend
  2131                                  	istruc HANDLERTABLE
  2132 0000009C [0808]                  at htMessage,reloc	dw msg.aaafterhandler
  2133                                  internaldatarelocation
  2134 0000009E [0000]                  at htHandler,reloc	dw relocateddata
  2135                                  otherlinkdatarelocation ext_aa_after_getline_handler, -2, optional
  2136 000000A0 [BC08]                  at htTemplate,reloc	dw template_aaafterhandler
  2137                                  internalcoderelocation
  2138 000000A2 [0000]                  at htReturn,reloc	dw relocateddata
  2139                                  otherlinkdatarelocation aa_after_getline, -2, optional
  2140 000000A4 00<rep 2h>              	iend
  2141 000000A6 0000                    	dw 0
  2142                                  
  2143                                  .puts:
  2144                                  	istruc HANDLERTABLE
  2145 000000A8 [1808]                  at htMessage,reloc	dw msg.putshandler
  2146                                  internaldatarelocation
  2147 000000AA [0000]                  at htHandler,reloc	dw relocateddata
  2148                                  otherlinkdatarelocation ext_puts_handler
  2149 000000AC [C308]                  at htTemplate,reloc	dw template_putshandler
  2150                                  internalcoderelocation
  2151 000000AE [0000]                  at htReturn,reloc	dw relocateddata
  2152                                  otherlinkdatarelocation puts_ext_done
  2153 000000B0 00<rep 2h>              	iend
  2154                                  	istruc HANDLERTABLE
  2155 000000B2 [2B08]                  at htMessage,reloc	dw msg.putscohandler
  2156                                  internaldatarelocation
  2157 000000B4 [0000]                  at htHandler,reloc	dw relocateddata
  2158                                  otherlinkdatarelocation ext_puts_copyoutput_handler
  2159 000000B6 [CA08]                  at htTemplate,reloc	dw template_putscohandler
  2160                                  internalcoderelocation
  2161 000000B8 [0000]                  at htReturn,reloc	dw relocateddata
  2162                                  otherlinkdatarelocation puts_copyoutput_ext_done
  2163 000000BA 00<rep 2h>              	iend
  2164                                  	istruc HANDLERTABLE
  2165 000000BC [3B08]                  at htMessage,reloc	dw msg.putsgetlinehandler
  2166                                  internaldatarelocation
  2167 000000BE [0000]                  at htHandler,reloc	dw relocateddata
  2168                                  otherlinkdatarelocation ext_puts_getline_handler
  2169 000000C0 [D108]                  at htTemplate,reloc	dw template_putsgetlinehandler
  2170                                  internalcoderelocation
  2171 000000C2 [0000]                  at htReturn,reloc	dw relocateddata
  2172                                  otherlinkdatarelocation puts_getline_ext_done
  2173 000000C4 00<rep 2h>              	iend
  2174 000000C6 0000                    	dw 0
  2175                                  
  2176                                  .inject:
  2177                                  	istruc HANDLERTABLE
  2178 000000C8 [4808]                  at htMessage,reloc	dw msg.commandinjecthandler
  2179                                  internaldatarelocation
  2180 000000CA [0000]                  at htHandler,reloc	dw relocateddata
  2181                                  otherlinkdatarelocation ext_inject_handler
  2182 000000CC 0000                    at htTemplate,		dw 0
  2183 000000CE 0000                    at htReturn,		dw 0
  2184 000000D0 0200                    at htFlags,		dw htfIsInject
  2185                                  	iend
  2186                                  	istruc HANDLERTABLE
  2187 000000D2 [5708]                  at htMessage,reloc	dw msg.aainjecthandler
  2188                                  internaldatarelocation
  2189 000000D4 [0000]                  at htHandler,reloc	dw relocateddata
  2190                                  otherlinkdatarelocation ext_aa_inject_handler, -2, optional
  2191 000000D6 0000                    at htTemplate,		dw 0
  2192 000000D8 0000                    at htReturn,		dw 0
  2193 000000DA 0200                    at htFlags,		dw htfIsInject
  2194                                  	iend
  2195 000000DC 0000                    	dw 0
  2196                                  
  2197                                  	align 2, db 0
  2198                                  store_table:
  2199 000000DE [0000]                  reloc	dw relocateddata
  2200                                  otherlinkdatarelocation patcharea_run, -2, optional
  2201 000000E0 [0000]                  reloc	dw relocateddata
  2202                                  otherlinkdatarelocation patcharea_run.segment, -2, optional
  2203 000000E2 [0000]                  reloc	dw relocateddata
  2204                                  otherlinkdatarelocation patcharea_run.size, -2, optional
  2205 000000E4 [D408]                  reloc	dw msg.patch_area_run
  2206                                  internaldatarelocation
  2207                                  
  2208 000000E6 [0000]                  reloc	dw relocateddata
  2209                                  otherlinkdatarelocation patcharea_intrtn, -2, optional
  2210 000000E8 [0000]                  reloc	dw relocateddata
  2211                                  otherlinkdatarelocation patcharea_intrtn.segment, -2, optional
  2212 000000EA [0000]                  reloc	dw relocateddata
  2213                                  otherlinkdatarelocation patcharea_intrtn.size, -2, optional
  2214 000000EC [D808]                  reloc	dw msg.patch_area_intrtn
  2215                                  internaldatarelocation
  2216                                  
  2217 000000EE [0000]                  reloc	dw relocateddata
  2218                                  otherlinkdatarelocation patcharea_pm_exc, -2, optional
  2219 000000F0 [0000]                  reloc	dw relocateddata
  2220                                  otherlinkdatarelocation patcharea_pm_exc.segment, -2, optional
  2221 000000F2 [0000]                  reloc	dw relocateddata
  2222                                  otherlinkdatarelocation patcharea_pm_exc.size, -2, optional
  2223 000000F4 [E708]                  reloc	dw msg.patch_area_pm_exc
  2224                                  internaldatarelocation
  2225                                  
  2226                                  .end:
  2227                                  
  2228                                  	struc STORETABLEENTRY
  2229 00000000 ????                    steAreaOffset:		resw 1
  2230 00000002 ????                    steAreaSegmentVariable:	resw 1
  2231 00000004 ????                    steAreaLength:		resw 1
  2232 00000006 ????                    steName:		resw 1
  2233                                  	endstruc
  2234                                  
  2235                                  
  2236                                  	align 2, db 0
  2237                                  nountable:
  2238 000000F6 42                      	db msg.all - $ - 1
  2239 000000F7 01                      	db 1
  2240 000000F8 [C001]                  reloc	dw msg.all_replace
  2241                                  internaldatarelocation
  2242 000000FA 42                      	db msg.allexceptseg - $ - 1
  2243 000000FB 01                      	db 1
  2244 000000FC [E301]                  reloc	dw msg.allnoseg_replace
  2245                                  internaldatarelocation
  2246 000000FE 63                      	db msg.eldall - $ - 1
  2247 000000FF 01                      	db 1
  2248 00000100 [0202]                  reloc	dw msg.eldall_replace
  2249                                  internaldatarelocation
  2250 00000102 71                      	db msg.eldhandlers - $ - 1
  2251 00000103 01                      	db 1
  2252 00000104 [1902]                  reloc	dw msg.eldhandlers_replace
  2253                                  internaldatarelocation
  2254 00000106 49                      	db msg.mem - $ - 1
  2255 00000107 00                      	db 0
  2256 00000108 [3303]                  reloc	dw display_mem
  2257                                  internalcoderelocation
  2258 0000010A 49                      	db msg.history - $ - 1
  2259 0000010B 00                      	db 0
  2260 0000010C [9A04]                  reloc	dw historysize
  2261                                  internalcoderelocation
  2262 0000010E 4D                      	db msg.stack - $ - 1
  2263 0000010F 00                      	db 0
  2264 00000110 [6A05]                  reloc	dw stacksize
  2265                                  internalcoderelocation
  2266 00000112 56                      	db msg.eld - $ - 1
  2267 00000113 00                      	db 0
  2268 00000114 [B805]                  reloc	dw display_eld_memory
  2269                                  internalcoderelocation
  2270 00000116 56                      	db msg.eldvar - $ - 1
  2271 00000117 00                      	db 0
  2272 00000118 [C306]                  reloc	dw display_eld_variables
  2273                                  internalcoderelocation
  2274 0000011A 65                      	db msg.commandhandler_noun - $ - 1
  2275 0000011B 00                      	db 0
  2276 0000011C [9507]                  reloc	dw display_command_handler
  2277                                  internalcoderelocation
  2278 0000011E 70                      	db msg.amishandler_noun - $ - 1
  2279 0000011F 00                      	db 0
  2280 00000120 [9A07]                  reloc	dw display_amis_handler
  2281                                  internalcoderelocation
  2282 00000122 78                      	db msg.asmhandler - $ - 1
  2283 00000123 00                      	db 0
  2284 00000124 [9F07]                  reloc	dw display_asm_handler
  2285                                  internalcoderelocation
  2286 00000126 7F                      	db msg.putshandler_noun - $ - 1
  2287 00000127 00                      	db 0
  2288 00000128 [A407]                  reloc	dw display_puts_handler
  2289                                  internalcoderelocation
  2290 0000012A 87                      	db msg.injecthandler_noun - $ - 1
  2291 0000012B 00                      	db 0
  2292 0000012C [A907]                  reloc	dw display_inject_handler
  2293                                  internalcoderelocation
  2294 0000012E 17                      	db msg.seg - $ - 1
  2295 0000012F 00                      	db 0
  2296 00000130 [8901]                  reloc	dw display_seg
  2297                                  internalcoderelocation
  2298 00000132 17                      	db msg.patch - $ - 1
  2299 00000133 00                      	db 0
  2300 00000134 [4402]                  reloc	dw display_patchareas
  2301                                  internalcoderelocation
  2302 00000136 0000                    	dw 0
  2303                                  
  2304                                  history_data_entry:
  2305 00000138 00                      	db 0
  2306                                  
  2307                                  msg:
  2308 00000139 414C4C00                .all:		asciz "ALL"
  2309 0000013D 414C4C4E4F53454700      .allexceptseg:	asciz "ALLNOSEG"
  2310 00000146 53454700                .seg:		asciz "SEG"
  2311 0000014A 504154434800            .patch:		asciz "PATCH"
  2312 00000150 4D454D00                .mem:		asciz "MEM"
  2313 00000154 484953544F525900        .history:	asciz "HISTORY"
  2314 0000015C 535441434B00            .stack:		asciz "STACK"
  2315 00000162 454C44414C4C00          .eldall:	asciz "ELDALL"
  2316 00000169 454C4400                .eld:		asciz "ELD"
  2317 0000016D 454C4456415200          .eldvar:	asciz "ELDVAR"
  2318 00000174 454C4448414E444C45-     .eldhandlers:	asciz "ELDHANDLERS"
  2318 0000017D 525300             
  2319 00000180 434F4D4D414E444841-     .commandhandler_noun:	asciz "COMMANDHANDLER"
  2319 00000189 4E444C455200       
  2320 0000018F 414D495348414E444C-     .amishandler_noun:	asciz "AMISHANDLER"
  2320 00000198 455200             
  2321 0000019B 41534D48414E444C45-     .asmhandler:		asciz "ASMHANDLER"
  2321 000001A4 5200               
  2322 000001A6 5055545348414E444C-     .putshandler_noun:	asciz "PUTSHANDLER"
  2322 000001AF 455200             
  2323 000001B2 494E4A45435448414E-     .injecthandler_noun:	asciz "INJECTHANDLER"
  2323 000001BB 444C455200         
  2324 000001C0 4D454D205345472048-     .all_replace:		asciz "MEM SEG HISTORY STACK ELDALL PATCH"
  2324 000001C9 4953544F5259205354-
  2324 000001D2 41434B20454C44414C-
  2324 000001DB 4C20504154434800   
  2325 000001E3 4D454D20484953544F-     .allnoseg_replace:	asciz "MEM HISTORY STACK ELDALL PATCH"
  2325 000001EC 525920535441434B20-
  2325 000001F5 454C44414C4C205041-
  2325 000001FE 54434800           
  2326 00000202 454C4420454C445641-     .eldall_replace:	asciz "ELD ELDVAR ELDHANDLERS"
  2326 0000020B 5220454C4448414E44-
  2326 00000214 4C45525300         
  2327 00000219 434F4D4D414E444841-     .eldhandlers_replace:	asciz "COMMANDHANDLER AMISHANDLER ASMHANDLER PUTSHANDLER INJECTHANDLER"
  2327 00000222 4E444C455220414D49-
  2327 0000022B 5348414E444C455220-
  2327 00000234 41534D48414E444C45-
  2327 0000023D 52205055545348414E-
  2327 00000246 444C455220494E4A45-
  2327 0000024F 435448414E444C4552-
  2327 00000258 00                 
  2328 00000259 4E6F756E202200          .notfound.1:		asciz 'Noun "'
  2329 00000260 22206E6F7420666F75-     .notfound.2:		asciz '" not found!',13,10
  2329 00000269 6E64210D0A00       
  2330 0000026F 4C444D454D00            .ldmem:			asciz "LDMEM",OTH_STRING
  2331 00000275 4C444D454D20756E69-     .uninstall_done:	db "LDMEM",OTH_STRING," uninstalled."
  2331 0000027E 6E7374616C6C65642E 
  2332                                  %if _ELD_RECLAIM_HINT
  2333                                  			db " (Don't forget to use reclaim.eld)"
  2334                                  %endif
  2335 00000287 0D0A00                  			asciz 13,10
  2336 0000028A 4C444D454D20756E61-     .uninstall_error:	asciz "LDMEM",OTH_STRING," unable to uninstall!",13,10
  2336 00000293 626C6520746F20756E-
  2336 0000029C 696E7374616C6C210D-
  2336 000002A5 0A00               
  2337 000002A7 05456E747279            .entryseg:	counted "Entry"
  2338 000002AD 00                      		counted
  2339 000002AE 074D657373616765        .messageseg:	counted "Message"
  2340 000002B6 00                      		counted
  2341 000002B7 0A466972737420636F-     .codeseg:	counted "First code"
  2341 000002C0 6465               
  2342 000002C2 05436F646531            		counted "Code1"
  2343 000002C8 0E466972737420636F-     .codemovableseg:counted "First code (M)"
  2343 000002D1 646520284D29       
  2344 000002D7 08436F646531284D29      		counted "Code1(M)"
  2345 000002E0 0B5365636F6E642063-     .code2seg:	counted "Second code"
  2345 000002E9 6F6465             
  2346 000002EC 05436F646532            		counted "Code2"
  2347                                  .code2movableseg:
  2348 000002F2 0F5365636F6E642063-     		counted "Second code (M)"
  2348 000002FB 6F646520284D29     
  2349 00000302 08436F646532284D29      		counted "Code2(M)"
  2350 0000030B 10417578696C696172-     .auxbuffseg:	counted "Auxiliary buffer"
  2350 00000314 7920627566666572   
  2351 0000031C 09417578696C696172-     		counted "Auxiliary"
  2351 00000325 79                 
  2352                                  .auxbuffmovableseg:
  2353 00000326 0E41757820284D2920-     		counted "Aux (M) buffer"
  2353 0000032F 627566666572       
  2354 00000335 06417578284D29          		counted "Aux(M)"
  2355 0000033C 07486973746F7279        .historyseg:	counted "History"
  2356 00000344 00                      		counted
  2357 00000345 08454C4420636F6465      .extseg:	counted "ELD code"
  2358 0000034E 00                      		counted
  2359 0000034F 0B456E7669726F6E6D-     .envseg:	counted "Environment"
  2359 00000358 656E74             
  2360 0000035B 03456E76                		counted "Env"
  2361 0000035F 0A207365676D656E74-     .segment_colon:	counted " segment: "
  2361 00000368 3A20               
  2362 0000036A 224E6F6E6520285365-     .none:		counted "None (Segment data not available.)"
  2362 00000373 676D656E7420646174-
  2362 0000037C 61206E6F7420617661-
  2362 00000385 696C61626C652E29   
  2363 0000038D 1853697A6520646174-     .nonesize:	counted "Size data not available."
  2363 00000396 61206E6F7420617661-
  2363 0000039F 696C61626C652E     
  2364 000003A6 022020                  .address.1:	counted "  "
  2365 000003A9 0753697A653A2020        .size.1:	counted "Size:  "
  2366 000003B1 022020                  .size.2:	counted "  "
  2367 000003B4 0C202073656C656374-     .sel:		counted "  selector: "
  2367 000003BD 6F723A20           
  2368 000003C1 15456E7472792F6461-     .dssel:		counted "Entry/data selector: "
  2368 000003CA 74612073656C656374-
  2368 000003D3 6F723A20           
  2369 000003D7 20454C4420636F6465-     .extdssel:	counted "ELD code segment data selector: "
  2369 000003E0 207365676D656E7420-
  2369 000003E9 646174612073656C65-
  2369 000003F2 63746F723A20       
  2370 000003F8 546F74616C20616C6C-     .alloc:		fill 26, 32, db "Total allocation: "
  2370 00000401 6F636174696F6E3A20-
  2370 0000040A 20<rep 8h>         
  2371 00000412 00                      		asciz
  2372 00000413 1A                      .gap:		db .gap.end - ($ + 1)
  2373 00000414 4761703A2020-           		fill 26, 32, db "Gap: "
  2373 00000414 <rep 15h>          
  2374                                  .gap.end:
  2375 0000042E 4F7665726C6170210D-     .overlap:		asciz "Overlap!",13,10
  2375 00000437 0A00               
  2376 00000439 4E6F20686973746F72-     .history_none:		asciz "No history format link found.",13,10
  2376 00000442 7920666F726D617420-
  2376 0000044B 6C696E6B20666F756E-
  2376 00000454 642E0D0A00         
  2377 00000459 486973746F72792069-     .history_data_entry:	asciz "History in data entry section.",13,10
  2377 00000462 6E206461746120656E-
  2377 0000046B 747279207365637469-
  2377 00000474 6F6E2E0D0A00       
  2378 0000047A 486973746F72792069-     .history_separate:	asciz "History in a separate segment.",13,10
  2378 00000483 6E2061207365706172-
  2378 0000048C 617465207365676D65-
  2378 00000495 6E742E0D0A00       
  2379 0000049B 556E6B6E6F776E2068-     .history_unknown:	asciz "Unknown history format.",13,10
  2379 000004A4 6973746F727920666F-
  2379 000004AD 726D61742E0D0A00   
  2380 000004B5 486973746F7279206C-     .history_missing:	asciz "History last or first displacement or segment missing.",13,10
  2380 000004BE 617374206F72206669-
  2380 000004C7 72737420646973706C-
  2380 000004D0 6163656D656E74206F-
  2380 000004D9 72207365676D656E74-
  2380 000004E2 206D697373696E672E-
  2380 000004EB 0D0A00             
  2381 000004EE 11486973746F727920-     .history.1:		counted "History entries: "
  2381 000004F7 656E74726965733A20 
  2382 00000500 110D0A486973746F72-     .history.2:		counted 13,10,"History bytes: "
  2382 00000509 792062797465733A20 
  2383 00000512 082075736564202F20      .history.3:		counted " used / "
  2384 0000051B 2920746F74616C0D0A-     .history.average.1:	counted " total",13,10,"Average history entry size is <= "
  2384 00000524 417665726167652068-
  2384 0000052D 6973746F727920656E-
  2384 00000536 7472792073697A6520-
  2384 0000053F 6973203C3D20       
  2385 00000545 072062797465732E        .history.average.2:	counted " bytes."
  2386 0000054D 3520746F74616C0D0A-     .history.average.none:	counted " total",13,10,"Cannot calculate average, no history entries."
  2386 00000556 43616E6E6F74206361-
  2386 0000055F 6C63756C6174652061-
  2386 00000568 7665726167652C206E-
  2386 00000571 6F20686973746F7279-
  2386 0000057A 20656E74726965732E 
  2387 00000583 164E6F20737461636B-     .stack.none:		counted "No stack link found.",13,10
  2387 0000058C 206C696E6B20666F75-
  2387 00000595 6E642E0D0A         
  2388 0000059A 0C537461636B207369-     .stack.1:		counted "Stack size: "
  2388 000005A3 7A653A20           
  2389 000005A7 1E2062797465730D0A-     .stack.2:		counted " bytes",13,10,"Heuristic match byte: "
  2389 000005B0 486575726973746963-
  2389 000005B9 206D61746368206279-
  2389 000005C2 74653A20           
  2390 000005C6 1B680D0A4865757269-     .stack.3:		counted "h",13,10,"Heuristic unused stack: "
  2390 000005CF 7374696320756E7573-
  2390 000005D8 656420737461636B3A-
  2390 000005E1 20                 
  2391 000005E2 082062797465730D0A      .stack.4:		counted " bytes",13,10
  2392 000005EB 4C6F6164656420454C-     .eld.1:			asciz "Loaded ELDs:",13,10
  2392 000005F4 44733A0D0A00       
  2393 000005FA 4572726F7220647572-     .eld.error:		asciz "Error during ELD enumeration.",13,10
  2393 00000603 696E6720454C442065-
  2393 0000060C 6E756D65726174696F-
  2393 00000615 6E2E0D0A00         
  2394 0000061A 0A4672656520737061-     .eld.free:		counted "Free space"
  2394 00000623 6365               
  2395 00000625 022028                  .eld.free.2:		counted " ("
  2396 00000628 0129                    .eld.free.3:		counted ")"
  2397 0000062A 0D2C20636F64652073-     .eld.2:			counted ", code start "
  2397 00000633 7461727420         
  2398 00000638 072C2073746F7020        .eld.3:			counted ", stop "
  2399 00000640 072C2073697A6520        .eld.4:			counted ", size "
  2400 00000648 19                      .eld.5:			db .eld.5.end - ($ + 1)
  2401 00000649 0D0A                    			db 13,10
  2402 0000064B 20<rep Ch>              			times 8 + 2 + 2 db 32
  2403 00000657 446174612073746172-     			db "Data start "
  2403 00000660 7420               
  2404                                  .eld.5.end:
  2405 00000662 174672656520737061-     .eld.6:			counted "Free space, data start "
  2405 0000066B 63652C206461746120-
  2405 00000674 737461727420       
  2406 0000067A 154578742076617269-     .var.format:		counted "Ext variables format="
  2406 00000683 61626C657320666F72-
  2406 0000068C 6D61743D           
  2407 00000690 12682C207374727563-     .var.size:		counted "h, structure size="
  2407 00000699 747572652073697A65-
  2407 000006A2 3D                 
  2408 000006A3 19680D0A416D6F756E-     .var.amount:		counted "h",13,10,"Amount ext variables: "
  2408 000006AC 742065787420766172-
  2408 000006B5 6961626C65733A20   
  2409 000006BD 082075736564202F20      .var.amountbetween:	counted " used / "
  2410 000006C6 0620746F74616C          .var.amountafter:	counted " total"
  2411 000006CD 0D0A556E6B6E6F776E-     .varunknown:		db 13,10,"Unknown ext variables format="
  2411 000006D6 206578742076617269-
  2411 000006DF 61626C657320666F72-
  2411 000006E8 6D61743D           
  2412 000006EC 2D2D2D2D68              .varunknown.format:	db "----h"
  2413 000006F1 0D0A                    .linebreak:		db 13,10
  2414 000006F3 00                      .empty:			asciz
  2415 000006F4 06466C6167733D          .var.list.flags:	counted "Flags="
  2416 000006FB 08682061727261793D      .var.list.array:	counted "h array="
  2417 00000704 0A6820626574776565-     .var.list.between:	counted "h between="
  2417 0000070D 6E3D               
  2418 0000070F 0868206E616D653D22      .var.list.name:		counted "h name=",'"'
  2419 00000718 0A220D0A20456E7472-     .var.list.entry:	counted '"',13,10," Entry="
  2419 00000721 793D               
  2420 00000723 0C682C20696E737461-     .instance.1:		counted "h, instance="
  2420 0000072C 6E63653D           
  2421 00000730 0F682C206964656E74-     .instance.2:		counted "h, identifier=",'"'
  2421 00000739 69666965723D22     
  2422 00000740 0122                    .instance.3:		counted '"'
  2423 00000742 16682E20496E737461-     .instance.notfound:	counted "h. Instance not found!"
  2423 0000074B 6E6365206E6F742066-
  2423 00000754 6F756E6421         
  2424 00000759 12682E20496E737461-     .instance.error:	counted "h. Instance error!"
  2424 00000762 6E6365206572726F72-
  2424 0000076B 21                 
  2425 0000076C 0720456E7472793D        .commandhandler.entry:	counted " Entry="
  2426 00000774 0D0A00                  .handler.init.pre:	asciz 13,10
  2427 00000777 2068616E646C657273-     .handler.init.post:	asciz " handlers:",13,10
  2427 00000780 3A0D0A00           
  2428 00000784 20456E7472793D3030-     .handler.none.pre:	asciz " Entry=0000h - No "
  2428 0000078D 303068202D204E6F20-
  2428 00000796 00                 
  2429 00000797 2068616E646C657220-     .handler.none.post:	asciz " handler installed.",13,10
  2429 000007A0 696E7374616C6C6564-
  2429 000007A9 2E0D0A00           
  2430 000007AD 204E6F2000              .handler.notpresent.pre:	asciz " No "
  2431 000007B2 2068616E646C657220-     .handler.notpresent.post:	asciz " handler hook present.",13,10
  2431 000007BB 686F6F6B2070726573-
  2431 000007C4 656E742E0D0A00     
  2432 000007CB 2000                    .handler.error.pre:	asciz " "
  2433 000007CD 2068616E646C657220-     .handler.error.post:	asciz " handler error!",13,10
  2433 000007D6 6572726F72210D0A00 
  2434 000007DF 436F6D6D616E6400        .commandhandler:	asciz "Command"
  2435 000007E7 50726570726F636573-     .preprocesshandler:	asciz "Preprocess"
  2435 000007F0 7300               
  2436 000007F2 414D495300              .amishandler:		asciz "AMIS"
  2437 000007F7 417373656D626C6572-     .aabeforehandler:	asciz "Assembler before"
  2437 00000800 206265666F726500   
  2438 00000808 417373656D626C6572-     .aaafterhandler:	asciz "Assembler after"
  2438 00000811 20616674657200     
  2439 00000818 4D756C74692D707572-     .putshandler:		asciz "Multi-purpose puts"
  2439 00000821 706F73652070757473-
  2439 0000082A 00                 
  2440 0000082B 434F50594F55545055-     .putscohandler:		asciz "COPYOUTPUT puts"
  2440 00000834 54207075747300     
  2441 0000083B 4745544C494E452070-     .putsgetlinehandler:	asciz "GETLINE puts"
  2441 00000844 75747300           
  2442 00000848 436F6D6D616E642069-     .commandinjecthandler:	asciz "Command inject"
  2442 00000851 6E6A65637400       
  2443 00000857 417373656D626C6572-     .aainjecthandler:	asciz "Assembler inject"
  2443 00000860 20696E6A65637400   
  2444 00000868 506174636820617265-     .patch_area.1:		asciz "Patch area, length "
  2444 00000871 612C206C656E677468-
  2444 0000087A 2000               
  2445 0000087C 2028696E2075736529-     .patch_area.2.inuse:	asciz " (in use), "
  2445 00000885 2C2000             
  2446 00000888 202866726565292C20-     .patch_area.2.notinuse:	asciz " (free), "
  2446 00000891 00                 
  2447 00000892 656E74727900            .patch_area.3.entry:	asciz "entry"
  2448 00000898 636F646500              .patch_area.3.code:	asciz "code"
  2449 0000089D 756E6B6E6F776E3D        .patch_area.3.unknown:	db "unknown="
  2450 000008A5 2D2D2D2D6800            .patch_area.3.unknown.s:asciz "----h"
  2451 000008AB 3A                      .patch_area.3.offset:	db ":"
  2452 000008AC 2D2D2D2D682C2000        .patch_area.3.offset.o:	asciz "----h, "
  2453 000008B4 6E616D653A2000          .patch_area.4:		asciz "name: "
  2454 000008BB 506174636820617265-     .patch_area.5:		asciz "Patch area not present: "
  2454 000008C4 61206E6F7420707265-
  2454 000008CD 73656E743A2000     
  2455 000008D4 52756E00                .patch_area_run:	asciz "Run"
  2456 000008D8 3836204D6F64652069-     .patch_area_intrtn:	asciz "86 Mode intrtn"
  2456 000008E1 6E7472746E00       
  2457 000008E7 50726F746563746564-     .patch_area_pm_exc:	asciz "Protected Mode exc"
  2457 000008F0 204D6F646520657863-
  2457 000008F9 00                 
  2458                                  
  2459                                  uinit_data: equ $
  2460 000008FA 4C444D454D20696E73-     .installed:		asciz "LDMEM",OTH_STRING," installed.",13,10
  2460 00000903 74616C6C65642E0D0A-
  2460 0000090C 00                 
  2461 0000090D 48454C5000              .keyword_help:		asciz "HELP"
  2462 00000912 5468697320454C4420-     .help:		db "This ELD can be installed residently or used transiently.",13,10
  2462 0000091B 63616E20626520696E-
  2462 00000924 7374616C6C65642072-
  2462 0000092D 65736964656E746C79-
  2462 00000936 206F72207573656420-
  2462 0000093F 7472616E7369656E74-
  2462 00000948 6C792E0D0A         
  2463 0000094D 0D0A                    		db 13,10
  2464 0000094F 416E79206E756D6265-     		db "Any number of keywords can be passed to this ELD to choose output:",13,10
  2464 00000958 72206F66206B657977-
  2464 00000961 6F7264732063616E20-
  2464 0000096A 626520706173736564-
  2464 00000973 20746F207468697320-
  2464 0000097C 454C4420746F206368-
  2464 00000985 6F6F7365206F757470-
  2464 0000098E 75743A0D0A         
  2465 00000993 09286E6F6E65290909-     		db 9,"(none)",9,9,"Alias to ALLNOSEG",13,10
  2465 0000099C 416C69617320746F20-
  2465 000009A5 414C4C4E4F5345470D-
  2465 000009AE 0A                 
  2466 000009AF 09414C4C0909446973-     		db 9,"ALL",9,9,"Display all output",13,10
  2466 000009B8 706C617920616C6C20-
  2466 000009C1 6F75747075740D0A   
  2467 000009C9 09414C4C4E4F534547-     		db 9,"ALLNOSEG",9,"Display all output except SEG",13,10
  2467 000009D2 09446973706C617920-
  2467 000009DB 616C6C206F75747075-
  2467 000009E4 742065786365707420-
  2467 000009ED 5345470D0A         
  2468 000009F2 09454C44414C4C0909-     		db 9,"ELDALL",9,9,"Display all ELD output",13,10
  2468 000009FB 446973706C61792061-
  2468 00000A04 6C6C20454C44206F75-
  2468 00000A0D 747075740D0A       
  2469 00000A13 09454C4448414E444C-     		db 9,"ELDHANDLERS",9,"Display all ELD handlers",13,10
  2469 00000A1C 45525309446973706C-
  2469 00000A25 617920616C6C20454C-
  2469 00000A2E 442068616E646C6572-
  2469 00000A37 730D0A             
  2470 00000A3A 094D454D0909446973-     		db 9,"MEM",9,9,"Display memory areas with segments/selectors",13,10
  2470 00000A43 706C6179206D656D6F-
  2470 00000A4C 727920617265617320-
  2470 00000A55 77697468207365676D-
  2470 00000A5E 656E74732F73656C65-
  2470 00000A67 63746F72730D0A     
  2471 00000A6E 095345470909446973-     		db 9,"SEG",9,9,"Display segments/selectors mostly on one line",13,10
  2471 00000A77 706C6179207365676D-
  2471 00000A80 656E74732F73656C65-
  2471 00000A89 63746F7273206D6F73-
  2471 00000A92 746C79206F6E206F6E-
  2471 00000A9B 65206C696E650D0A   
  2472 00000AA3 09484953544F525909-     		db 9,"HISTORY",9,9,"Display history utilisation",13,10
  2472 00000AAC 09446973706C617920-
  2472 00000AB5 686973746F72792075-
  2472 00000ABE 74696C69736174696F-
  2472 00000AC7 6E0D0A             
  2473 00000ACA 09535441434B090944-     		db 9,"STACK",9,9,"Display stack utilisation",13,10
  2473 00000AD3 6973706C6179207374-
  2473 00000ADC 61636B207574696C69-
  2473 00000AE5 736174696F6E0D0A   
  2474 00000AED 09454C440909446973-     		db 9,"ELD",9,9,"Display ELD code instances and data blocks use",13,10
  2474 00000AF6 706C617920454C4420-
  2474 00000AFF 636F646520696E7374-
  2474 00000B08 616E63657320616E64-
  2474 00000B11 206461746120626C6F-
  2474 00000B1A 636B73207573650D0A 
  2475 00000B23 09454C445641520909-     		db 9,"ELDVAR",9,9,"Display ELD variables",13,10
  2475 00000B2C 446973706C61792045-
  2475 00000B35 4C4420766172696162-
  2475 00000B3E 6C65730D0A         
  2476 00000B43 09434F4D4D414E4448-     		db 9,"COMMANDHANDLER",9,"Display ELD command and preprocess handlers",13,10
  2476 00000B4C 414E444C4552094469-
  2476 00000B55 73706C617920454C44-
  2476 00000B5E 20636F6D6D616E6420-
  2476 00000B67 616E64207072657072-
  2476 00000B70 6F636573732068616E-
  2476 00000B79 646C6572730D0A     
  2477 00000B80 09414D495348414E44-     		db 9,"AMISHANDLER",9,"Display ELD AMIS handlers",13,10
  2477 00000B89 4C455209446973706C-
  2477 00000B92 617920454C4420414D-
  2477 00000B9B 49532068616E646C65-
  2477 00000BA4 72730D0A           
  2478 00000BA8 0941534D48414E444C-     		db 9,"ASMHANDLER",9,"Display ELD assembly handlers",13,10
  2478 00000BB1 455209446973706C61-
  2478 00000BBA 7920454C4420617373-
  2478 00000BC3 656D626C792068616E-
  2478 00000BCC 646C6572730D0A     
  2479 00000BD3 095055545348414E44-     		db 9,"PUTSHANDLER",9,"Display ELD puts-related handlers",13,10
  2479 00000BDC 4C455209446973706C-
  2479 00000BE5 617920454C44207075-
  2479 00000BEE 74732D72656C617465-
  2479 00000BF7 642068616E646C6572-
  2479 00000C00 730D0A             
  2480 00000C03 09494E4A4543544841-     		db 9,"INJECTHANDLER",9,"Display ELD inject handlers",13,10
  2480 00000C0C 4E444C455209446973-
  2480 00000C15 706C617920454C4420-
  2480 00000C1E 696E6A656374206861-
  2480 00000C27 6E646C6572730D0A   
  2481 00000C2F 095041544348090944-     		db 9,"PATCH",9,9,"Display patch areas",13,10
  2481 00000C38 6973706C6179207061-
  2481 00000C41 746368206172656173-
  2481 00000C4A 0D0A               
  2482 00000C4C 00                      		asciz
  2483                                  
  2484 00000C4D 00<rep 3h>              	align 16, db 0
  2485                                  init_data_end:
  2486                                  data_size equ $ - datastart
  2487                                  transient_data_size equ data_size
  2488                                  
  2489                                  	absolute uinit_data
  2490                                  	alignb 2
  2491                                  separatormessage:
  2492 000008FA ????                    	resw 1
  2493                                  
  2494 000008FC ????????                	alignb 8
  2495                                  table_sorted:
  2496 00000900 <res 70h>               	resb 10 * table.amount + 2
  2497                                  
  2498                                  	alignb 16
  2499                                  uinit_data_end:
  2500                                  resident_data_end:
  2501                                  resident_data_size equ resident_data_end - datastart
  2502                                  
  2503                                  %if uinit_data_end >= init_data_end
  2504                                   total_data_size equ $ - datastart
  2505                                  %else
  2506                                   total_data_size equ init_data_end - datastart
  2507                                  %endif
  2508                                  %assign _DATA_SIZE total_data_size
  2509                                  
  2510                                  
  2511                                  	usesection CODE
  2512                                  
  2513                                  install:
  2514 00000AA8 AC                      	lodsb
  2515 00000AA9 E8[0000]EB020000        	extcall chkeol
  2516                                  
  2517                                  	houdini
  2518 00000AB0 8EC3                    	mov es, bx		; => ext seg (writable)
  2519                                  
  2520 00000AB2 B8A000                  	mov ax, endresident - endinstalled
  2521 00000AB5 262906[0200]            reloc	sub word [es:code + eldiEndCode], ax
  2522                                  internalcoderelocation		; adjust size
  2523 00000ABA 2906[0000]              reloc	sub word [relocateddata], ax
  2524                                  linkdatarelocation extseg_used	; adjust size
  2525                                  
  2526                                  %if (transient_data_size - resident_data_size) > 0
  2527 00000ABE B8E002                  	mov ax, transient_data_size - resident_data_size
  2528 00000AC1 262906[0600]            reloc	sub word [es:code + eldiEndData], ax
  2529                                  internalcoderelocation		; adjust size
  2530 00000AC6 2906[0000]              reloc	sub word [relocateddata], ax
  2531                                  linkdatarelocation extdata_used	; adjust size
  2532                                  %endif
  2533                                  
  2534 00000ACA 8B1E[0000]              reloc	mov bx, word [relocateddata]
  2535                                  linkdatarelocation ext_command_handler
  2536                                  				; -> prior
  2537 00000ACE BF[2000]                reloc	mov di, command		; -> our handler
  2538                                  internalcoderelocation
  2539 00000AD1 85DB                    	test bx, bx		; installing as first ?
  2540 00000AD3 740A                    	jz .only_first		; yes, simple --> (leave as extcall cmd3_not_ext)
  2541 00000AD5 AF                      	scasw			; skip entrypoint jmp strict short
  2542 00000AD6 B0E9                    	mov al, 0E9h		; = jmp near opcode
  2543 00000AD8 AA                      	stosb			; store
  2544 00000AD9 93                      	xchg ax, bx		; ax -> next handler
  2545 00000ADA 29F8                    	sub ax, di
  2546 00000ADC 48                      	dec ax
  2547 00000ADD 48                      	dec ax			; ax = ax - (di + 2)
  2548 00000ADE AB                      	stosw			; store our downlink as rel16 displacement
  2549                                  
  2550                                  .only_first:
  2551 00000ADF 26800E[1000]01          reloc	setopt [es:code + eldiFlags], eldifResident
  2552                                  internalcoderelocation -3	; mark block as resident
  2553 00000AE5 C706[0000][2000]        reloc2	mov word [relocateddata], command
  2554                                  linkdatarelocation ext_command_handler, -4
  2555                                  internalcoderelocation		; -> our entrypoint
  2556                                  
  2557 00000AEB F606[0000]04            reloc	testopt [relocateddata], 4
  2558                                  linkdatarelocation options7, -3
  2559 00000AF0 7506                    	jnz @F
  2560 00000AF2 BA[FA08]                reloc	mov dx, msg.installed
  2561                                  internaldatarelocation
  2562 00000AF5 E8E0FE                  	call putsz
  2563                                  @@:
  2564 00000AF8 31C0                    	xor ax, ax
  2565 00000AFA CB                      	retf
  2566                                  
  2567                                  
  2568                                  %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> 		; INP:	es:dx -> loaded initial ELD image
    70                              <1> 		;	 ELD instance structure filled
    71                              <1> 		;	es => ELD code area
    72                              <1> 		;	ds:di -> link info
    73                              <1> 		;	ss:bx -> loaded initial data
    74                              <1> 		;	ss:si -> command line tail
    75                              <1> 		;	cs:ip -> entrypoint
    76                              <1> 		;	ss:sp -> far return address for current mode
    77                              <1> 		; STT:	UP, EI
    78                              <1> linker:
    79                              <1> 		; The first 15 Bytes of the linker should be
    80                              <1> 		;  the same regardless of the linker options
    81                              <1> 		;  used (debug, passes, vstart). This allows
    82                              <1> 		;  the eldcomp ELD to match even if up to 15
    83                              <1> 		;  Bytes of the linker are trailing in the
    84                              <1> 		;  resident part of the ELD.
    85                              <1> 	lframe
    86                              <1>  %if ELDOTHER
    87                              <1> 	lvar dword, linkinfo_other
    88                              <1> 	lvar word, use_hash_other
    89                              <1>  %endif
    90 00000AFB 5589E5              <1> 	lenter
    91                              <1> 	lvar dword, instance
    92 00000AFE 06                  <1> 	 push es
    93 00000AFF 52                  <1> 	 push dx		; -> start of where we're loaded in ELD cs
    94                              <1> 	lvar word, targetsection_low_optional_high
    95 00000B00 50                  <1> 	 push ax		; placeholder
    96                              <1> 	lequ ?targetsection_low_optional_high, targetsection
    97                              <1> 	lequ ?targetsection_low_optional_high + 1, optional
    98                              <1> 	lvar dword, linkinfo
    99 00000B01 1E                  <1> 	 push ds
   100 00000B02 57                  <1> 	 push di		; -> link info (in debugger ss or message seg)
   101                              <1> 	lvar dword, nextreloc
   102 00000B03 06                  <1> 	 push es		; => ELD cs
   103 00000B04 52                  <1> 	 push dx		; placeholder
   104                              <1> 	lvar dword, entry
   105 00000B05 06                  <1> 	 push es		; => ELD cs
   106 00000B06 50                  <1> 	 push ax		; placeholder
   107 00000B07 31C0                <1> 	xor ax, ax
   108 00000B09 813DD1E1            <1> 	cmp word [di + eldlSignature], 0E1D1h
   109                              <1> %if ($ - linker) < 16
   110                              <1>  %error Expected invariant first paragraph of linker
   111                              <1> %endif
   112 00000B0D 7403E98502          <1> 	jne .error_j		; signature mismatch -->
   113 00000B12 837D0601            <1> 	cmp word [di + eldlUseLinkHash], 1
   114 00000B16 7603E97C02          <1> 	ja .error_j		; unknown use link hash number -->
   115 00000B1B 7201                <1> 	jb @F
   116 00000B1D 48                  <1> 	dec ax			; = -1 if hash used
   117                              <1> @@:
   118                              <1> 	lvar word, use_hash
   119 00000B1E 50                  <1> 	 push ax		; = -1 if hash used, else 0
   120                              <1> %if _ELD_IDENTICALISE && _ELD_LINKER_PASSES
   121                              <1> 	mov ax, linktable - code
   122                              <1> 	lvar word, lt
   123                              <1> 	 push ax		; -> link tables (a single reference)
   124                              <1> %endif
   125                              <1> %if _ELD_LINKER_PASSES || ELDOTHER
   126 00000B1F 31C0                <1> 	xor ax, ax
   127                              <1>  %if _ELD_LINKER_PASSES
   128                              <1> 	lvar word, pass
   129 00000B21 50                  <1> 	 push ax		; = 0 for linker itself, = 2 for application
   130                              <1> 	lvar word, amounterrors
   131 00000B22 50                  <1> 	 push ax		; how many distinct errors encountered in pass 2
   132                              <1> 	lvar word, name
   133 00000B23 50                  <1> 	 push ax		; -> name currently being sought (in our table)
   134                              <1>  %endif
   135                              <1>  %if ELDOTHER
   136                              <1> 	lvar word, other
   137                              <1> 	 push ax		; byte: 0 = own data links, -1 = other data links
   138                              <1>  %endif
   139                              <1> %endif
   140 00000B24 56                  <1> 	push si			; -> command line tail
   141 00000B25 53                  <1> 	push bx			; -> data block in ELD data area (segment ss)
   142                              <1> 
   143                              <1> 			; simple: add instance base (dx) to code
   144 00000B26 06                  <1> 	push es
   145 00000B27 1F                  <1> 	pop ds			; ds = es => ELD cs
   146                              <1> %if _ELD_LINKER_PASSES
   147                              <1> .pass:
   148 00000B28 8B5EEA              <1> 	mov bx, word [bp + ?pass]	; 0 or 2
   149 00000B2B 01D3                <1> 	add bx, dx		; -> start of the ELD instance in cs, +0 or +2
   150                              <1>  %if _ELD_IDENTICALISE
   151                              <1> 	add bx, word [bp + ?lt]	; add in single reference to linktable
   152                              <1> 	mov si, word [ltCodeToCode + bx]
   153                              <1>  %else
   154 00000B2D 8BB74C0F            <1> 	mov si, word [linktable - code + ltCodeToCode + bx]
   155                              <1>  %endif
   156                              <1> %else
   157                              <1> 	mov si, internalcodetocoderelocations - code
   158                              <1> %endif		 		; si -> table for code to code (linker or app)
   159 00000B31 01D6                <1> 	add si, dx		; relocate the table pointer itself
   160                              <1> @@:
   161 00000B33 AD                  <1> 	lodsw
   162 00000B34 85C0                <1> 	test ax, ax		; was last ?
   163 00000B36 740B                <1> 	jz @F			; yes -->
   164 00000B38 93                  <1> 	xchg bx, ax		; bx = entry
   165 00000B39 01D3                <1> 	add bx, dx		; relocate the entry itself
   166                              <1> %if _ELD_CODE_VSTART
   167 00000B3B 812F[0000]          <1> 	sub word [bx], code	; undo adjustment
   168                              <1> %endif
   169 00000B3F 0117                <1> 	add word [bx], dx	; relocate word referenced by entry
   170 00000B41 EBF0                <1> 	jmp @B
   171                              <1> 
   172                              <1> @@:
   173                              <1> 			; next, add heap data base (on stack) to code
   174                              <1> %if _ELD_LINKER_PASSES
   175 00000B43 8B5EEA              <1> 	mov bx, word [bp + ?pass]	; 0 or 2
   176 00000B46 01D3                <1> 	add bx, dx		; -> start of the ELD instance in cs, +0 or +2
   177                              <1>  %if _ELD_IDENTICALISE
   178                              <1> 	add bx, word [bp + ?lt]	; add in single reference to linktable
   179                              <1> 	mov si, word [ltCodeToData + bx]
   180                              <1>  %else
   181 00000B48 8BB7500F            <1> 	mov si, word [linktable - code + ltCodeToData + bx]
   182                              <1>  %endif
   183                              <1> %else
   184                              <1> 	mov si, internalcodetodatarelocations - code
   185                              <1> %endif				; si -> table for code to data (linker or app)
   186 00000B4C 01D6                <1> 	add si, dx		; relocate the table pointer itself
   187                              <1> @@:
   188 00000B4E AD                  <1> 	lodsw
   189 00000B4F 85C0                <1> 	test ax, ax		; was last ?
   190 00000B51 740C                <1> 	jz @F			; yes -->
   191 00000B53 93                  <1> 	xchg bx, ax		; bx = entry
   192 00000B54 01D3                <1> 	add bx, dx		; relocate the entry itself
   193                              <1> 		; ! access the offset of the data area block, topmost on stack
   194 00000B56 58                  <1> 	pop ax			; ax -> heap data
   195 00000B57 50                  <1> 	push ax
   196                              <1> %if _ELD_DATA_VSTART
   197 00000B58 2D[0000]            <1> 	sub ax, datastart	; undo adjustment
   198                              <1> %endif
   199 00000B5B 0107                <1> 	add word [bx], ax	; relocate word referenced by entry
   200 00000B5D EBEF                <1> 	jmp @B
   201                              <1> 
   202                              <1> @@:
   203                              <1> 
   204                              <1> 			; add instance base (dx) to data
   205                              <1> %if _ELD_LINKER_PASSES
   206 00000B5F 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   207 00000B62 01D3                <1> 	add bx, dx
   208                              <1>  %if _ELD_IDENTICALISE
   209                              <1> 	add bx, word [bp + ?lt]
   210                              <1> 	mov si, word [ltDataToCode + bx]
   211                              <1>  %else
   212 00000B64 8BB7540F            <1> 	mov si, word [linktable - code + ltDataToCode + bx]
   213                              <1>  %endif
   214                              <1> %else
   215                              <1> 	mov si, internaldatatocoderelocations - code
   216                              <1> %endif
   217 00000B68 01D6                <1> 	add si, dx
   218                              <1> @@:
   219 00000B6A AD                  <1> 	lodsw
   220 00000B6B 83F8FF              <1> 	cmp ax, -1		; was last ?
   221 00000B6E 740F                <1> 	je @F			; yes -->
   222 00000B70 93                  <1> 	xchg bx, ax		; bx = entry
   223                              <1> 		; ! access the offset of the data area block, topmost on stack
   224 00000B71 58                  <1> 	pop ax
   225 00000B72 50                  <1> 	push ax
   226 00000B73 01C3                <1> 	add bx, ax		; relocate the entry itself
   227                              <1> %if _ELD_CODE_VSTART
   228 00000B75 36812F[0000]        <1> 	sub word [ss:bx], code	; undo adjustment
   229                              <1> %endif
   230 00000B7A 360117              <1> 	add word [ss:bx], dx	; relocate word referenced by entry
   231 00000B7D EBEB                <1> 	jmp @B
   232                              <1> 
   233                              <1> @@:
   234                              <1> 			; next, add heap data base (on stack) to data
   235                              <1> %if _ELD_LINKER_PASSES
   236 00000B7F 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   237 00000B82 01D3                <1> 	add bx, dx
   238                              <1>  %if _ELD_IDENTICALISE
   239                              <1> 	add bx, word [bp + ?lt]
   240                              <1> 	mov si, word [ltDataToData + bx]
   241                              <1>  %else
   242 00000B84 8BB7580F            <1> 	mov si, word [linktable - code + ltDataToData + bx]
   243                              <1>  %endif
   244                              <1> %else
   245                              <1> 	mov si, internaldatatodatarelocations - code
   246                              <1> %endif
   247 00000B88 01D6                <1> 	add si, dx
   248                              <1> @@:
   249 00000B8A AD                  <1> 	lodsw
   250 00000B8B 83F8FF              <1> 	cmp ax, -1		; was last ?
   251 00000B8E 740D                <1> 	je @F			; yes -->
   252 00000B90 93                  <1> 	xchg bx, ax		; bx = entry
   253                              <1> 		; ! access the offset of the data area block, topmost on stack
   254 00000B91 58                  <1> 	pop ax			; ax -> heap data
   255 00000B92 50                  <1> 	push ax
   256 00000B93 01C3                <1> 	add bx, ax		; relocate the entry itself
   257                              <1> %if _ELD_DATA_VSTART
   258 00000B95 2D[0000]            <1> 	sub ax, datastart	; undo adjustment
   259                              <1> %endif
   260 00000B98 360107              <1> 	add word [ss:bx], ax	; relocate word referenced by entry
   261 00000B9B EBED                <1> 	jmp @B
   262                              <1> 
   263                              <1> @@:
   264 00000B9D 8B56FC              <1> 	mov dx, word [bp + ?instance]
   265                              <1> 				; reset (why??) -> ELD instance in ELD cs
   266                              <1> %if _ELD_LINKER_PASSES
   267 00000BA0 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   268 00000BA3 01D3                <1> 	add bx, dx
   269                              <1>  %if _ELD_IDENTICALISE
   270                              <1> 	add bx, word [bp + ?lt]
   271                              <1> 	add dx, word [ltLinkData + bx]
   272                              <1>  %else
   273 00000BA5 03975C0F            <1> 	add dx, word [linktable - code + ltLinkData + bx]
   274                              <1>  %endif
   275                              <1> %else
   276                              <1> 	add dx, linkerdatarelocations - code
   277                              <1> %endif
   278                              <1> .otherloop:
   279 00000BA9 8956F2              <1> 	mov word [bp + ?nextreloc], dx
   280                              <1> 				; -> data link relocation table
   281                              <1> 
   282                              <1> .datarelocloop:		; must be done before further relocs
   283 00000BAC C576F2              <1> 	lds si, [bp + ?nextreloc]
   284 00000BAF AD                  <1> 	lodsw			; ax = section indicator
   285 00000BB0 85C0                <1> 	test ax, ax		; end of table ?
   286 00000BB2 7503E94A01          <1> 	jz .donedatareloc
   287 00000BB7 48                  <1> 	dec ax			; al = 1 if data, 0 if code (NB ah may != 0)
   288                              <1> 		; ! access the offset of the data area block, topmost on stack
   289 00000BB8 5B                  <1> 	pop bx
   290 00000BB9 53                  <1> 	push bx			; bx -> ELD data block
   291 00000BBA 8946FA              <1> 	mov word [bp + ?targetsection_low_optional_high], ax
   292 00000BBD 84C0                <1> 	test al, al		; data ?
   293 00000BBF AD                  <1> 	lodsw
   294 00000BC0 7504                <1> 	jnz @F			; yes -->
   295 00000BC2 0346FC              <1> 	add ax, word [bp + ?instance]
   296                              <1> 				; relocate entry into code
   297 00000BC5 A9                  <1> 	db __TEST_IMM16		; (skip add)
   298                              <1> @@:
   299 00000BC6 01D8                <1> 	add ax, bx		; relocate entry into data
   300 00000BC8 8946EE              <1> 	mov word [bp + ?entry], ax
   301                              <1> 				; save away -> where to patch
   302 00000BCB AD                  <1> 	lodsw			; get unrelocated -> name
   303 00000BCC 8976F2              <1> 	mov word [bp + ?nextreloc], si
   304                              <1> 				; update -> behind relocation table entry
   305 00000BCF E80301              <1> 	call .build_match	; get ax = scan value, si -> counted string,
   306                              <1> 				;  dl = original value at byte [si]
   307                              <1> 				; NC if symbol already not found before
   308                              <1> 				; CY if to search for the symbol
   309                              <1> %if _ELD_LINKER_PASSES
   310 00000BD2 73D8                <1> 	jnc .datarelocloop	; if duplicate of a not found symbol -->
   311                              <1> %endif
   312 00000BD4 C45EF6              <1> 	les bx, [bp + ?linkinfo]
   313                              <1> %if ELDOTHER
   314                              <1> 	rol byte [bp + ?other], 1
   315                              <1> 	jnc @F
   316                              <1> 	les bx, [bp + ?linkinfo_other]
   317                              <1> @@:
   318                              <1> %endif				; es:bx -> link info table of the ELD host
   319 00000BD7 268B4F08            <1> 	mov cx, word [es:bx + eldlDataAmount]	; amount data link info
   320 00000BDB 268B7F0A            <1> 	mov di, word [es:bx + eldlDataPrefixes]	; -> prefixes or hashes
   321                              <1> .datarelocfind:
   322 00000BDF 83F901              <1> 	cmp cx, 1			; NZ if cx == 0
   323 00000BE2 F2AF                <1> 	repne scasw			; scan initial
   324 00000BE4 7541                <1> 	jne .datarelocnotfound
   325 00000BE6 57                  <1> 	push di
   326 00000BE7 51                  <1> 	push cx
   327 00000BE8 56                  <1> 	push si
   328 00000BE9 262B7F0A            <1> 	sub di, word [es:bx + eldlDataPrefixes]	; = double index, 1-based
   329 00000BED 4F                  <1> 	dec di
   330 00000BEE 4F                  <1> 	dec di				; 0-based
   331 00000BEF 26037F0C            <1> 	add di, word [es:bx + eldlDataEntries]	; -> entry
   332 00000BF3 268B3D              <1> 	mov di, [es:di]			; -> counted suffix/string
   333 00000BF6 B500                <1> 	mov ch, 0
   334 00000BF8 8A0C                <1> 	mov cl, byte [si]		; cx = length
   335 00000BFA 41                  <1> 	inc cx
   336                              <1> 	; cmp al, al			; ZR if length is zero
   337 00000BFB F3A6                <1> 	repe cmpsb			; match ?
   338 00000BFD 5E                  <1> 	pop si
   339 00000BFE 59                  <1> 	pop cx
   340 00000BFF 5F                  <1> 	pop di
   341 00000C00 75DD                <1> 	jne .datarelocfind		; if not found this time,
   342                              <1> 					;  scan for next initial -->
   343 00000C02 8814                <1> 	mov byte [si], dl		; restore the original byte at counter
   344 00000C04 262B7F0A            <1> 	sub di, word [es:bx + eldlDataPrefixes]	; = double index, 1-based
   345 00000C08 4F                  <1> 	dec di
   346 00000C09 4F                  <1> 	dec di				; 0-based
   347 00000C0A 26037F0E            <1> 	add di, word [es:bx + eldlDataAddresses]	; -> address (offset)
   348 00000C0E 268B05              <1> 	mov ax, word [es:di]		; get link data from the table
   349 00000C11 E80700              <1> 	call .address_data_reloc
   350                              <1> %if _ELD_RELOC_VSTART
   351 00000C14 2D[0000]            <1> 	sub ax, relocateddata		; *not* a relocation
   352                              <1> %endif
   353 00000C17 0104                <1> 	add word [si], ax		; relocate
   354 00000C19 EB91                <1> 	jmp .datarelocloop
   355                              <1> 
   356                              <1> .address_data_reloc:
   357 00000C1B C576EE              <1> 	lds si, [bp + ?entry]		; -> entry if in ELD code instance
   358 00000C1E 807EFA00            <1> 	cmp byte [bp + ?targetsection], 0
   359                              <1> 					; relocation in code ?
   360 00000C22 7402                <1> 	je @F				; yes -->
   361 00000C24 16                  <1> 	push ss
   362 00000C25 1F                  <1> 	pop ds				; => our ELD data block
   363                              <1> @@:
   364 00000C26 C3                  <1> 	retn
   365                              <1> 
   366                              <1> .datarelocnotfound:
   367 00000C27 8814                <1> 	mov byte [si], dl		; restore the original byte at counter
   368 00000C29 807EFB00            <1> 	cmp byte [bp + ?optional], 0	; is it an optional relocation ?
   369                              <1> %if _ELD_DEBUG
   370                              <1> 	jne @F
   371                              <1>  %ifn _ELD_LINKER_PASSES
   372                              <1> 	mov si, 0			; (invalid link)
   373                              <1> linkdatarelocation internalflags6
   374                              <1> 	test si, si
   375                              <1> 	jz .datanotfound
   376                              <1> 	mov si, 0			; (invalid link)
   377                              <1> linkdatarelocation options7
   378                              <1> 	test si, si
   379                              <1> 	jz .datanotfound
   380                              <1>  %else
   381                              <1> 	cmp byte [bp + ?pass], 0
   382                              <1> 	je .datanotfound
   383                              <1>  %endif
   384                              <1> 	houdini				; (the above conditions are for this)
   385                              <1> 	jmp .datanotfound
   386                              <1> @@:
   387                              <1> %else
   388 00000C2D 743B                <1> 	je .datanotfound		; no, handle as an error -->
   389                              <1> %endif
   390                              <1> 
   391                              <1> %if ELDDATA_PMREQUIRED_STATUS
   392                              <1> 	mov si, relocateddata
   393                              <1> linkdatarelocation build_option_PM
   394                              <1> 	test si, si			; is it a PM build ?
   395                              <1> 	jz @F				; no --> (treat PM required as optional)
   396                              <1> 	test byte [bp + ?optional], 2	; optional status is PM required ?
   397                              <1> 	jnz .datanotfound		; yes, handle as an error -->
   398                              <1> @@:
   399                              <1> %endif
   400                              <1> 
   401                              <1> %if _ELD_LINKER_PASSES
   402 00000C2F 36F606[0000]02      <1> 	testopt [ss:relocateddata], 2	; debug optional link ?
   403                              <1> linkdatarelocation options7, -3
   404 00000C35 7406                <1> 	jz @F				; no -->
   405 00000C37 BE[0B1C]            <1> 	mov si, lmsg.warning_data_optional
   406                              <1> internalcoderelocation
   407 00000C3A E84F00              <1> 	call .notfound			; display a warning
   408                              <1> @@:
   409                              <1> %endif
   410 00000C3D E8DBFF              <1> 	call .address_data_reloc
   411 00000C40 832400              <1> 	and word [si], 0		; indicate optional data link failed
   412 00000C43 E966FF              <1> 	jmp .datarelocloop
   413                              <1> 
   414                              <1> 
   415                              <1> %if _ELDCALL_OPTIONAL
   416                              <1> .coderelocnotfound:
   417 00000C46 8814                <1> 	mov byte [si], dl		; restore the original byte at counter
   418 00000C48 807EFB00            <1> 	cmp byte [bp + ?optional], 0	; is it an optional relocation ?
   419                              <1> %if _ELD_DEBUG
   420                              <1> 	jne @F
   421                              <1>  %ifn _ELD_LINKER_PASSES
   422                              <1> 	mov si, 0			; (invalid link)
   423                              <1> linkdatarelocation internalflags6
   424                              <1> 	test si, si
   425                              <1> 	jz .codenotfound
   426                              <1> 	mov si, 0			; (invalid link)
   427                              <1> linkdatarelocation options7
   428                              <1> 	test si, si
   429                              <1> 	jz .codenotfound
   430                              <1>  %else
   431                              <1> 	cmp byte [bp + ?pass], 0
   432                              <1> 	je .codenotfound
   433                              <1>  %endif
   434                              <1> 	houdini				; (the above conditions are for this)
   435                              <1> 	jmp .codenotfound
   436                              <1> @@:
   437                              <1> %else
   438 00000C4C 742D                <1> 	je .codenotfound		; no, handle as an error -->
   439                              <1> %endif
   440                              <1> 
   441                              <1> %if ELDCALL_PMREQUIRED_STATUS
   442                              <1>  %if _ELD_LINKER_PASSES
   443                              <1>   %assign ELDLINKER 0
   444                              <1>  %endif
   445                              <1> 	mov si, relocateddata
   446                              <1> linkdatarelocation build_option_PM
   447                              <1>  %if _ELD_LINKER_PASSES
   448                              <1>   %assign ELDLINKER 1
   449                              <1>  %endif
   450                              <1> 	test si, si			; is it a PM build ?
   451                              <1> 	jz @F				; no --> (treat PM required as optional)
   452                              <1> 	test byte [bp + ?optional], 2	; optional status is PM required ?
   453                              <1> 	jnz .codenotfound		; yes, handle as an error -->
   454                              <1> @@:
   455                              <1> %endif
   456                              <1> 
   457                              <1> %if _ELD_LINKER_PASSES
   458 00000C4E 36F606[0000]02      <1> 	testopt [ss:relocateddata], 2	; debug optional link ?
   459                              <1> linkdatarelocation options7, -3
   460 00000C54 7406                <1> 	jz @F				; no -->
   461 00000C56 BE[E91B]            <1> 	mov si, lmsg.warning_code_optional
   462                              <1> internalcoderelocation
   463 00000C59 E83000              <1> 	call .notfound			; display a warning
   464                              <1> @@:
   465                              <1> %endif
   466 00000C5C C576EE              <1> 	lds si, [bp + ?entry]		; -> code site (must be in ELD cs)
   467 00000C5F C7049090            <1> 	mov word [si], 9090h
   468 00000C63 C6440290            <1> 	mov byte [si + 2], 90h		; indicate optional code link failed
   469                              <1> 					;  (NOP out the 3-byte call near imm)
   470 00000C67 E9A600              <1> 	jmp .coderelocloop
   471                              <1> %endif
   472                              <1> 
   473                              <1> 
   474                              <1> %if _ELD_LINKER_PASSES
   475                              <1> .datanotfound:
   476 00000C6A BE[2D1C]            <1> 	mov si, lmsg.error_data
   477                              <1> internalcoderelocation
   478 00000C6D E81C00              <1> 	call .notfound			; display error
   479 00000C70 7203E92201          <1> 	jnc .error_j			; NC if in pass 0, error out now -->
   480 00000C75 FF46E8              <1> 	inc word [bp + ?amounterrors]	; count the amount of errors
   481 00000C78 E931FF              <1> 	jmp .datarelocloop		; go to next relocation entry -->
   482                              <1> 
   483                              <1> .codenotfound:
   484 00000C7B BE[461C]            <1> 	mov si, lmsg.error_code
   485                              <1> internalcoderelocation
   486 00000C7E E80B00              <1> 	call .notfound			; display error
   487 00000C81 7203E91101          <1> 	jnc .error_j			; NC if in pass 0 -->
   488 00000C86 FF46E8              <1> 	inc word [bp + ?amounterrors]	; count the amount of errors
   489 00000C89 E98400              <1> 	jmp .coderelocloop		; go to next -->
   490                              <1> 
   491                              <1> .notfound:
   492 00000C8C 807EEA00            <1> 	cmp byte [bp + ?pass], 0q	; pass 0 ?
   493 00000C90 743A                <1> 	je @F				; yes, do not try displaying --> (NC)
   494 00000C92 16                  <1> 	 push ss
   495 00000C93 07                  <1> 	 pop es
   496 00000C94 BF[0000]            <1> 	mov di, relocateddata
   497                              <1> linkdatarelocation line_out		; es:di -> line_out buffer
   498 00000C97 E83300              <1> 	call .copy			; copy prefix message
   499 00000C9A 8B76E6              <1> 	mov si, word [bp + ?name]
   500 00000C9D AD                  <1> 	lodsw				; = hash
   501 00000C9E E8[0000]EB020000    <1> 	extcall hexword			; display the hash in hex
   502 00000CA5 56                  <1> 	push si
   503 00000CA6 BE[5F1C]            <1> 	mov si, lmsg.error.2
   504                              <1> internalcoderelocation
   505 00000CA9 E82100              <1> 	call .copy			; display message fragment
   506 00000CAC 5E                  <1> 	pop si
   507                              <1> %if _ELD_LINKER_PASSES
   508 00000CAD 56                  <1> 	push si
   509 00000CAE E81C00              <1> 	call .copy			; copy over the full name
   510 00000CB1 5E                  <1> 	pop si
   511 00000CB2 C60400              <1> 	mov byte [si], 0		; mark as failed (counter byte = 0)
   512                              <1> %else
   513                              <1> 	call .copy
   514                              <1> %endif
   515 00000CB5 B022                <1> 	mov al, '"'
   516 00000CB7 AA                  <1> 	stosb				; end message with a closing quote mark
   517 00000CB8 16                  <1> 	 push ss
   518 00000CB9 1F                  <1> 	 pop ds
   519 00000CBA E8[0000]EB020000    <1> 	extcall putsline_crlf		; display diagnostic line
   520 00000CC1 B8350E              <1> 	mov ax, 0E35h
   521 00000CC4 E8[0000]EB020000    <1> 	extcall setrc
   522 00000CCB F9                  <1> 	stc				; CY, diagnostic displayed
   523                              <1> @@:
   524 00000CCC C3                  <1> 	retn
   525                              <1> 
   526                              <1> .copy:		; (cannot use extcallcall here)
   527 00000CCD E8[0000]EB020000    <1> 	extcall copy_single_counted_string
   528 00000CD4 C3                  <1> 	retn
   529                              <1> %else
   530                              <1> .datanotfound: equ .error_j
   531                              <1> .codenotfound: equ .error_j
   532                              <1> %endif
   533                              <1> 
   534                              <1> .build_match:
   535                              <1> %if _ELD_CODE_VSTART
   536 00000CD5 2D[0000]            <1> 	sub ax, code			; revert adjustment (= displacement)
   537                              <1> %endif
   538 00000CD8 0346FC              <1> 	add ax, word [bp + ?instance]	; make displacement into -> name string
   539 00000CDB 96                  <1> 	xchg si, ax			; si -> hash word, counted name string
   540                              <1> %if _ELD_LINKER_PASSES
   541 00000CDC 8976E6              <1> 	mov word [bp + ?name], si	; save away for diagnostics
   542                              <1> %endif
   543 00000CDF AD                  <1> 	lodsw			; = hash, si -> counted string
   544 00000CE0 8A14                <1> 	mov dl, byte [si]	; dl = original start byte of match
   545                              <1> %if _ELD_LINKER_PASSES
   546 00000CE2 84D2                <1> 	test dl, dl		; marked as already failed ?
   547 00000CE4 750A                <1> 	jnz @F
   548 00000CE6 837EE800            <1> 	cmp word [bp + ?amounterrors], 0
   549                              <1> 				; validate error status
   550 00000CEA 7503E9A800          <1> 	je .error_j		; no error known ?! cancel quickly -->
   551 00000CEF C3                  <1> 	retn			; (NC)
   552                              <1> 
   553                              <1> @@:
   554                              <1> %endif
   555                              <1> %if ELDOTHER
   556                              <1> 	rol byte [bp + ?other], 1
   557                              <1> 	jnc @F
   558                              <1> 	rol byte [bp + ?use_hash_other], 1
   559                              <1> 	jmp @FF
   560                              <1> 
   561                              <1> @@:
   562                              <1> %endif
   563 00000CF0 D046EC              <1> 	rol byte [bp + ?use_hash], 1
   564                              <1> @@:
   565                              <1> 		; If to use the hash, then ax = hash and si ->
   566                              <1> 		;  the entire symbol name as a counted string.
   567 00000CF3 720A                <1> 	jc @F			; if to use hash, return now -->
   568 00000CF5 AC                  <1> 	lodsb			; al = length
   569 00000CF6 91                  <1> 	xchg cx, ax		; cl = length
   570 00000CF7 AD                  <1> 	lodsw			; ax = prefix
   571 00000CF8 49                  <1> 	dec cx
   572 00000CF9 49                  <1> 	dec cx			; cl = adjusted length
   573 00000CFA 4E                  <1> 	dec si			; -> second byte of prefix
   574 00000CFB 8A14                <1> 	mov dl, byte [si]	; dl = original start byte of match
   575 00000CFD 880C                <1> 	mov byte [si], cl	; si -> counted string suffix
   576                              <1> 		; (this name entry has been edited to provide the
   577                              <1> 		;  name suffix as a counted string, as required by
   578                              <1> 		;  the old-style non-hash link info tables.
   579                              <1> 		; it will be reset later by writing dl to si -> the
   580                              <1> 		;  first byte of the match string.)
   581                              <1> @@:
   582                              <1> %if _ELD_LINKER_PASSES
   583 00000CFF F9                  <1> 	stc			; CY
   584                              <1> %endif
   585 00000D00 C3                  <1> 	retn
   586                              <1> 
   587                              <1> 
   588                              <1> .donedatareloc:
   589                              <1> %if ELDOTHER
   590                              <1> 	rol byte [bp + ?other], 1
   591                              <1> 	jc .otherdone		; other link only has data links,
   592                              <1> 				;  so at this point we're done -->
   593                              <1> %endif
   594                              <1> 
   595 00000D01 8B56FC              <1> 	mov dx, word [bp + ?instance]
   596                              <1> %if _ELD_LINKER_PASSES
   597 00000D04 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   598 00000D07 01D3                <1> 	add bx, dx
   599                              <1>  %if _ELD_IDENTICALISE
   600                              <1> 	add bx, word [bp + ?lt]
   601                              <1> 	add dx, word [ltLinkCode + bx]
   602                              <1>  %else
   603 00000D09 0397600F            <1> 	add dx, word [linktable - code + ltLinkCode + bx]
   604                              <1>  %endif
   605                              <1> %else
   606                              <1> 	add dx, linkercoderelocations - code
   607                              <1> %endif
   608 00000D0D 8956F2              <1> 	mov word [bp + ?nextreloc], dx
   609                              <1> 
   610                              <1> .coderelocloop:
   611 00000D10 C576F2              <1> 	lds si, [bp + ?nextreloc]
   612 00000D13 AD                  <1> 	lodsw
   613                              <1> %if _ELDCALL_OPTIONAL
   614 00000D14 48                  <1> 	dec ax				; optional word is 1-based, get 0-based
   615 00000D15 7903E98F00          <1> 	js .donecodereloc
   616 00000D1A 8946FA              <1> 	mov word [bp + ?targetsection_low_optional_high], ax
   617 00000D1D AD                  <1> 	lodsw
   618                              <1> %endif
   619 00000D1E 0346FC              <1> 	add ax, word [bp + ?instance]
   620 00000D21 8946EE              <1> 	mov word [bp + ?entry], ax
   621 00000D24 AD                  <1> 	lodsw
   622 00000D25 8976F2              <1> 	mov word [bp + ?nextreloc], si
   623                              <1> %ifn _ELDCALL_OPTIONAL
   624                              <1> 	test ax, ax			; if no optional word, check -> match
   625                              <1> 	jz .donecodereloc
   626                              <1> %endif
   627 00000D28 E8AAFF              <1> 	call .build_match
   628                              <1> %if _ELD_LINKER_PASSES
   629 00000D2B 73E3                <1> 	jnc .coderelocloop
   630                              <1> %endif
   631 00000D2D C45EF6              <1> 	les bx, [bp + ?linkinfo]
   632 00000D30 268B4F10            <1> 	mov cx, word [es:bx + eldlCodeAmount]	; amount code link info
   633 00000D34 268B7F12            <1> 	mov di, word [es:bx + eldlCodePrefixes]	; -> prefixes or hashes
   634                              <1> .coderelocfind:
   635 00000D38 83F901              <1> 	cmp cx, 1			; NZ if cx == 0
   636 00000D3B F2AF                <1> 	repne scasw			; scan initial
   637                              <1> %if _ELDCALL_OPTIONAL
   638 00000D3D 7403E904FF          <1> 	jne .coderelocnotfound
   639                              <1> %else
   640                              <1>  %if _ELD_DEBUG
   641                              <1> 	je @F
   642                              <1> 	houdini
   643                              <1> 	jmp .codenotfound
   644                              <1> @@:
   645                              <1>  %else
   646                              <1> 	jne .codenotfound
   647                              <1>  %endif
   648                              <1> %endif
   649 00000D42 57                  <1> 	push di
   650 00000D43 51                  <1> 	push cx
   651 00000D44 56                  <1> 	push si
   652 00000D45 262B7F12            <1> 	sub di, word [es:bx + eldlCodePrefixes]	; = double index, 1-based
   653 00000D49 4F                  <1> 	dec di
   654 00000D4A 4F                  <1> 	dec di				; 0-based
   655 00000D4B 26037F14            <1> 	add di, word [es:bx + eldlCodeEntries]	; -> entry
   656 00000D4F 268B3D              <1> 	mov di, [es:di]			; -> counted suffix/string
   657 00000D52 B500                <1> 	mov ch, 0
   658 00000D54 8A0C                <1> 	mov cl, byte [si]		; cx = length
   659 00000D56 41                  <1> 	inc cx
   660                              <1> 	; cmp al, al			; ZR if length is zero
   661 00000D57 F3A6                <1> 	repe cmpsb			; match ?
   662 00000D59 5E                  <1> 	pop si
   663 00000D5A 59                  <1> 	pop cx
   664 00000D5B 5F                  <1> 	pop di
   665 00000D5C 75DA                <1> 	jne .coderelocfind
   666 00000D5E 8814                <1> 	mov byte [si], dl
   667 00000D60 262B7F12            <1> 	sub di, word [es:bx + eldlCodePrefixes]	; = double index, 1-based
   668 00000D64 4F                  <1> 	dec di
   669 00000D65 4F                  <1> 	dec di				; 0-based
   670 00000D66 01FF                <1> 	add di, di			; quadruple index
   671 00000D68 26037F16            <1> 	add di, word [es:bx + eldlCodeAddresses]	; -> address (offset, segment)
   672 00000D6C 26FF35              <1> 	push word [es:di]
   673 00000D6F C576EE              <1> 	lds si, [bp + ?entry]
   674 00000D72 8F4405              <1> 	pop word [si + 3 + 2]		; call near imm (3), jmp short (2)
   675                              <1> 					;  patch the destination address
   676 00000D75 803CE8              <1> 	cmp byte [si], 0E8h		; is it as expected ?
   677 00000D78 751D                <1> 	jne .error_j
   678 00000D7A 268B7D02            <1> 	mov di, word [es:di + 2]
   679 00000D7E BB[0000]            <1> 	mov bx, relocateddata
   680                              <1> linkdatarelocation linkcall_table	; ss:bx -> link call table
   681 00000D81 36833F01            <1> 	cmp word [ss:bx], 1		; is it initialised to format 1 ?
   682 00000D85 7510                <1> 	jne .error_j			; no -->
   683 00000D87 368B4F02            <1> 	mov cx, word [ss:bx + 2]	; get amount of segments
   684 00000D8B E30A                <1> 	jcxz .error_j			; none -->
   685                              <1> @@:
   686 00000D8D 83C304              <1> 	add bx, 4			; -> next segment
   687 00000D90 36393F              <1> 	cmp word [ss:bx], di		; value matches ?
   688 00000D93 7405                <1> 	je @F				; yes, found -->
   689 00000D95 E2F6                <1> 	loop @B				; try remaining segments
   690                              <1> .error_j:
   691 00000D97 E98A00              <1> 	jmp .error
   692                              <1> 
   693                              <1> @@:
   694 00000D9A 368B5F02            <1> 	mov bx, word [ss:bx + 2]	; -> call destination offset
   695                              <1> 		; si + 3 + delta = bx
   696                              <1> 		; delta = bx - si - 3
   697 00000D9E 29F3                <1> 	sub bx, si
   698 00000DA0 83EB03              <1> 	sub bx, 3
   699 00000DA3 895C01              <1> 	mov word [si + 1], bx		; patch the call instruction
   700 00000DA6 E967FF              <1> 	jmp .coderelocloop
   701                              <1> 
   702                              <1> .donecodereloc:
   703                              <1> %if _ELD_LINKER_PASSES
   704 00000DA9 8B46E8              <1> 	mov ax, word [bp + ?amounterrors]
   705 00000DAC 85C0                <1> 	test ax, ax
   706 00000DAE 75E7                <1> 	jnz .error_j
   707 00000DB0 8B5EEA              <1> 	mov bx, word [bp + ?pass]
   708 00000DB3 85DB                <1> 	test bx, bx
   709 00000DB5 750B                <1> 	jnz @F
   710 00000DB7 43                  <1> 	inc bx
   711 00000DB8 43                  <1> 	inc bx
   712 00000DB9 895EEA              <1> 	mov word [bp + ?pass], bx
   713 00000DBC 8B56FC              <1> 	mov dx, word [bp + ?instance]
   714 00000DBF E966FD              <1> 	jmp .pass
   715                              <1> 
   716                              <1> @@:
   717                              <1> %endif
   718                              <1> 
   719                              <1> %ifnidni _LISTING, ""
   720                              <1> %assign ELDLINKER 0
   721                              <1> .hint:
   722 00000DC2 16                  <1> 	push ss
   723 00000DC3 1F                  <1> 	pop ds
   724 00000DC4 B02D                <1> 	mov al, 2Dh
   725 00000DC6 E8[0000]EB020000    <1> 	extcall intchk			; ZR if offset = -1 or segment = 0
   726                              <1> 					; CHG: ax, dx, bx
   727 00000DCD 7437                <1> 	jz .no_hint
   728                              <1> 
   729 00000DCF 8A26[0000]          <1> 	mov ah, byte [relocateddata]
   730                              <1> linkdatarelocation try_debugger_amis_multiplex_number
   731 00000DD3 E85500              <1> 	call plex_check
   732 00000DD6 7305                <1> 	jnc @F
   733                              <1> 
   734 00000DD8 B4FF                <1> 	mov ah, 0FFh		; start with multiplex number 0FFh
   735                              <1> .loop_hint:
   736 00000DDA E84E00              <1> 	call plex_check
   737                              <1> @@:
   738 00000DDD 7307                <1> 	jnc .end_hint		; if found --> (NC)
   739 00000DDF 80EC01              <1> 	sub ah, 1		; search is backward (to find latest installed first), from 0FFh to 00h including
   740 00000DE2 73F6                <1> 	jnc .loop_hint		; try next if we didn't check all yet -->
   741 00000DE4 EB20                <1> 	jmp .no_hint
   742                              <1> 
   743                              <1> .end_hint:
   744 00000DE6 50                  <1> 	push ax
   745 00000DE7 C446FC              <1> 	les ax, [bp + ?instance]
   746 00000DEA BF[3114]            <1> 	mov di, listmsg.hint.offset
   747                              <1> internalcoderelocation
   748 00000DED E8[0000]EB020000    <1> 	extcall hexword
   749 00000DF4 BB[1214]            <1> 	mov bx, listmsg.hint
   750                              <1> internalcoderelocation
   751 00000DF7 368B16[0000]        <1> 	mov dx, [ss:relocateddata]
   752                              <1> linkdatarelocation extseg	; must be 86 Mode segment even in PM
   753 00000DFC 58                  <1> 	pop ax
   754 00000DFD B040                <1> 	mov al, 40h		; AMIS message display service
   755 00000DFF E8[0000]EB020000    <1> 	extcall call_int2D
   756                              <1> .no_hint:
   757                              <1> %endif
   758                              <1> 
   759                              <1> %if ELDOTHER
   760                              <1> %assign ELDLINKER 0
   761                              <1> 	not byte [bp + ?other]
   762                              <1> 
   763                              <1> 	push ss
   764                              <1> 	pop ds
   765                              <1> 	mov al, 2Dh
   766                              <1> 	extcall intchk			; ZR if offset = -1 or segment = 0
   767                              <1> 					; CHG: ax, dx, bx
   768                              <1> 	jz .no_other
   769                              <1> 
   770                              <1> 	mov ah, byte [relocateddata]
   771                              <1> linkdatarelocation try_debugger_amis_multiplex_number
   772                              <1> 	call plex_check
   773                              <1> 	jnc @F
   774                              <1> 
   775                              <1> 	mov ah, 0FFh		; start with multiplex number 0FFh
   776                              <1> .loop_other:
   777                              <1> 	call plex_check
   778                              <1> @@:
   779                              <1> 	jnc .end_other		; if found --> (NC)
   780                              <1> 	sub ah, 1		; search is backward (to find latest installed first), from 0FFh to 00h including
   781                              <1> 	jnc .loop_other		; try next if we didn't check all yet -->
   782                              <1> 	jmp .no_other
   783                              <1> 
   784                              <1> .end_other:
   785                              <1> 	mov al, 42h		; AMIS get other link info service
   786                              <1> 	extcall call_int2D
   787                              <1> 	cmp al, 0FFh
   788                              <1> 	jne .no_other
   789                              <1> 
   790                              <1> 	mov ax, si		; selector => PSP
   791                              <1> 	extcall ispm
   792                              <1> 	jz @F
   793                              <1> 	mov ax, dx		; segment => PSP
   794                              <1> @@:
   795                              <1> 	 push ss
   796                              <1> 	 pop ds
   797                              <1> 	mov word [otherds], ax
   798                              <1> internaldatarelocation		; current mode sel/seg
   799                              <1> 	mov word [otherseg], dx
   800                              <1> internaldatarelocation		; remember segment
   801                              <1> 
   802                              <1> 	mov ax, cx		; selector => link info
   803                              <1> 	extcall ispm
   804                              <1> 	jz @F
   805                              <1> 	mov ax, bx		; segment => link info
   806                              <1> @@:
   807                              <1> 	mov word [bp + ?linkinfo_other], di
   808                              <1> 	mov word [bp + ?linkinfo_other + 2], ax
   809                              <1> 
   810                              <1> 	mov ds, ax		; => link info
   811                              <1> 	xor ax, ax
   812                              <1> 	cmp word [di + eldlSignature], 0E1D1h
   813                              <1> 	jne .error_other
   814                              <1> 	cmp word [di + eldlUseLinkHash], 1
   815                              <1> 	ja .error_other
   816                              <1> 	jb @F
   817                              <1> 	dec ax
   818                              <1> @@:
   819                              <1> 	mov word [bp + ?use_hash_other], ax
   820                              <1> 
   821                              <1> 	mov dx, word [bp + ?instance]
   822                              <1> 	add dx, linkerotherdatarelocations - code
   823                              <1> 	jmp .otherloop
   824                              <1> 
   825                              <1> .error_other:
   826                              <1> 	push cs
   827                              <1> 	pop ds
   828                              <1> 	mov ax, 0E33h
   829                              <1> 	extcall setrc
   830                              <1> 	mov dx, lmsg.error_other
   831                              <1> internalcoderelocation
   832                              <1> 	jmp @F
   833                              <1> 
   834                              <1> .no_other:
   835                              <1> 	push cs
   836                              <1> 	pop ds
   837                              <1> 	mov ax, 0E34h
   838                              <1> 	extcall setrc
   839                              <1> 	mov dx, lmsg.no_other
   840                              <1> internalcoderelocation
   841                              <1> @@:
   842                              <1> 	extcall putsz
   843                              <1> .error_j2:
   844                              <1> 	jmp .error
   845                              <1> 
   846                              <1> .otherdone:
   847                              <1>  %if _ELD_LINKER_PASSES
   848                              <1> 	mov ax, word [bp + ?amounterrors]
   849                              <1> 	test ax, ax
   850                              <1> 	jnz .error_j2
   851                              <1>  %endif
   852                              <1> %endif
   853                              <1> 
   854 00000E06 5B                  <1> 	pop bx				; -> our heap data
   855 00000E07 5E                  <1> 	pop si				; -> our command line tail
   856 00000E08 16                  <1> 	 push ss
   857 00000E09 1F                  <1> 	 pop ds
   858 00000E0A C47EFC              <1> 	les di, [bp + ?instance]
   859 00000E0D 268B4502            <1> 	mov ax, word [es:di + eldiEndCode]
   860                              <1> houdini
   861 00000E11 2D[000B]            <1> 	sub ax, strict word endresident + code
   862                              <1> internalcoderelocation
   863 00000E14 26C74502[000B]      <1> 	mov word [es:di + eldiEndCode], endresident + code
   864                              <1> internalcoderelocation
   865 00000E1A 2906[0000]          <1> 	sub word [relocateddata], ax
   866                              <1> linkdatarelocation extseg_used
   867                              <1> %if _DATA_SIZE == 0
   868                              <1> 	xor ax, ax
   869                              <1> 	mov word [es:di + eldiStartData], ax
   870                              <1> 	mov word [es:di + eldiEndData], ax
   871                              <1> %endif
   872 00000E1E 89EC5D              <1> 	lleave code
   873                              <1> 		; INP:	es => ELD code segment
   874                              <1> 		;	ds:si -> command line tail
   875                              <1> 		;	ds:bx -> ELD data block
   876                              <1> 		;	ss:sp -> far return address for current mode
   877                              <1> 		; STT:	ds = ss, UP, EI
   878 00000E21 E934FC              <1> 	jmp start
   879                              <1> 
   880                              <1> .error:
   881 00000E24 89EC5D              <1> 	lleave
   882 00000E27 B8FFFF              <1> 	mov ax, -1
   883 00000E2A CB                  <1> 	retf
   884                              <1> 
   885                              <1> 
   886                              <1> %ifnidni _LISTING, ""
   887                              <1>  %assign ELDHINT 1
   888                              <1> %else
   889                              <1>  %assign ELDHINT 0
   890                              <1> %endif
   891                              <1> 
   892                              <1> %if ELDOTHER || ELDHINT
   893                              <1> 		; INP:	ah = multiplex number to check
   894                              <1> 		; OUT:	CY if multiplex number unused or no signature match,
   895                              <1> 		;	 bp, ah, ds unmodified
   896                              <1> 		;	NC if match found,
   897                              <1> 		;	 ah = multiplex number (unmodified)
   898                              <1> 		; CHG:	si, di, es, cx, dx
   899                              <1> plex_check:
   900 00000E2B 16                  <1> 	push ss
   901 00000E2C 1F                  <1> 	pop ds
   902 00000E2D F606[0000]08        <1> 	testopt [relocateddata], 8
   903                              <1> linkdatarelocation internalflags4, -3
   904 00000E32 740B                <1> 	jz @F
   905 00000E34 BE[0000]            <1> 	mov si, relocateddata
   906                              <1> linkdatarelocation amis_multiplex_number, -2, optional
   907 00000E37 85F6                <1> 	test si, si
   908 00000E39 7404                <1> 	jz @F
   909 00000E3B 3A24                <1> 	cmp ah, byte [si]
   910 00000E3D 7420                <1> 	je .notfound		; do not use our own multiplexer -->
   911                              <1> @@:
   912 00000E3F B000                <1> 	mov al, 00h		; AMIS installation check
   913 00000E41 E8[0000]EB020000    <1> 	extcall call_int2D	; AMIS (or "DOS reserved" = iret if no AMIS present)
   914 00000E48 3CFF                <1> 	cmp al, 0FFh
   915 00000E4A 7513                <1> 	jne .notfound
   916 00000E4C 0E                  <1> 	push cs
   917 00000E4D 1F                  <1> 	pop ds
   918 00000E4E BE[0214]            <1> 	mov si, debuggeramissig	; ds:si -> our AMIS name strings
   919                              <1> internalcoderelocation
   920 00000E51 E8[0000]EB020000    <1> 	extcall setes2dx	; es:di -> name strings of AMIS multiplexer that just answered
   921 00000E58 B90800              <1> 	mov cx, 8		; Ignore description, only compare vendor and program name
   922 00000E5B F3A7                <1> 	repe cmpsw
   923 00000E5D 7401                <1> 	je .checkret		; ZR, NC = match -->
   924                              <1> .notfound:
   925 00000E5F F9                  <1> 	stc			; CY no match
   926                              <1> .checkret:
   927 00000E60 C3                  <1> 	retn
   928                              <1> %endif
   929                              <1> 
   930                              <1> 
   931 00000E61 00<rep 3h>          <1> 	align 4, db 0
   932                              <1> linkercoderelocations:
   933                              <1> %if _ELDCALL_OPTIONAL
   934 00000E64 01002200[3914]0100- <1> 	dw ELDCALL_CODE_RELOCATIONS_OPTIONAL, 0
   934 00000E6C A708[3914]0100AE08- <1>
   934 00000E74 [4814]0101B508-     <1>
   934 00000E7A [5C14]0101BC08-     <1>
   934 00000E80 [7014]0100C308-     <1>
   934 00000E86 [8314]0100CA08-     <1>
   934 00000E8C [9314]0100D108-     <1>
   934 00000E92 [AE14]0100B809-     <1>
   934 00000E98 [C614]0100C009-     <1>
   934 00000E9E [D214]0100C809-     <1>
   934 00000EA4 [DE14]0100D009-     <1>
   934 00000EAA [E514]0100D809-     <1>
   934 00000EB0 [EE14]0100E009-     <1>
   934 00000EB6 [F614]0100E809-     <1>
   934 00000EBC [FE14]0100F009-     <1>
   934 00000EC2 [0515]0100F809-     <1>
   934 00000EC8 [0E15]0100000A-     <1>
   934 00000ECE [1A15]0100080A-     <1>
   934 00000ED4 [2115]0100100A-     <1>
   934 00000EDA [3E15]0100180A-     <1>
   934 00000EE0 [4915]0100200A-     <1>
   934 00000EE6 [5315]0100280A-     <1>
   934 00000EEC [5D15]0100300A-     <1>
   934 00000EF2 [6815]0100380A-     <1>
   934 00000EF8 [7315]0100400A-     <1>
   934 00000EFE [9C15]0100480A-     <1>
   934 00000F04 [AC15]0100500A-     <1>
   934 00000F0A [B615]0100A90A-     <1>
   934 00000F10 [E514]0100C60D-     <1>
   934 00000F16 [BF15]0100ED0D-     <1>
   934 00000F1C [4915]0100FF0D-     <1>
   934 00000F22 [C815]0100410E-     <1>
   934 00000F28 [C815]0100510E-     <1>
   934 00000F2E [6815]0000          <1>
   935                              <1> %else
   936                              <1> 	dw ELDCALL_CODE_RELOCATIONS, 0, 0
   937                              <1> %endif
   938                              <1> 
   939                              <1> %if _ELD_LINKER_PASSES
   940                              <1> linkerlinkercoderelocations:
   941                              <1> %if _ELDCALL_OPTIONAL
   942 00000F32 01009E0C[4915]0100- <1> 	dw ELDCALL_LINKER_CODE_RELOCATIONS_OPTIONAL, 0
   942 00000F3A BA0C[9C15]0100C40C- <1>
   942 00000F42 [F614]0100CD0C-     <1>
   942 00000F48 [2115]0000          <1>
   943                              <1> %else
   944                              <1> 	dw ELDCALL_LINKER_CODE_RELOCATIONS, 0, 0
   945                              <1> %endif
   946                              <1> 
   947                              <1> 	align 2, db 0
   948                              <1> linktable:
   949                              <1> 	istruc LINKTABLE
   950                              <1> at ltCodeToCode
   951 00000F4C F013                <1> 	dw internallinkercodetocoderelocations - code
   952 00000F4E 6612                <1> 	dw internalcodetocoderelocations - code
   953                              <1> at ltCodeToData
   954 00000F50 FC13                <1> 	dw internallinkercodetodatarelocations - code
   955 00000F52 8812                <1> 	dw internalcodetodatarelocations - code
   956                              <1> at ltDataToCode
   957 00000F54 FE13                <1> 	dw internallinkerdatatocoderelocations - code
   958 00000F56 7413                <1> 	dw internaldatatocoderelocations - code
   959                              <1> at ltDataToData
   960 00000F58 0014                <1> 	dw internallinkerdatatodatarelocations - code
   961 00000F5A 9C13                <1> 	dw internaldatatodatarelocations - code
   962                              <1> at ltLinkData
   963 00000F5C D613                <1> 	dw linkerlinkerdatarelocations - code
   964 00000F5E 640F                <1> 	dw linkerdatarelocations - code
   965                              <1> at ltLinkCode
   966 00000F60 320F                <1> 	dw linkerlinkercoderelocations - code
   967 00000F62 640E                <1> 	dw linkercoderelocations - code
   968                              <1> 	iend
   969                              <1> %endif
   970                              <1> 
   971                              <1> 	align 2, db 0
   972                              <1> linkerdatarelocations:
   973 00000F64 01004700[D515]0100- <1> 	dw LINK_DATA_RELOCATIONS, 0
   973 00000F6C 4900[DF15]01004C00- <1>
   973 00000F74 [E815]01006A00-     <1>
   973 00000F7A [F815]01008E00-     <1>
   973 00000F80 [F815]0100CD00-     <1>
   973 00000F86 [0E16]0100D600-     <1>
   973 00000F8C [1916]01009001-     <1>
   973 00000F92 [2216]0100D301-     <1>
   973 00000F98 [2216]01000102-     <1>
   973 00000F9E [2216]01005F02-     <1>
   973 00000FA4 [2216]01008902-     <1>
   973 00000FAA [2D16]01019202-     <1>
   973 00000FB0 [3616]01019802-     <1>
   973 00000FB6 [4116]01013703-     <1>
   973 00000FBC [5416]01004503-     <1>
   973 00000FC2 [2216]01009103-     <1>
   973 00000FC8 [2216]01010B04-     <1>
   973 00000FCE [5416]01011404-     <1>
   973 00000FD4 [6016]01012E04-     <1>
   973 00000FDA [5416]01014804-     <1>
   973 00000FE0 [6016]01006104-     <1>
   973 00000FE6 [2216]01016704-     <1>
   973 00000FEC [6D16]01016F04-     <1>
   973 00000FF2 [0E16]01009204-     <1>
   973 00000FF8 [2216]0101A304-     <1>
   973 00000FFE [7516]0101CC04-     <1>
   973 00001004 [8516]0101CF04-     <1>
   973 0000100A [9416]0100DF04-     <1>
   973 00001010 [2216]01010505-     <1>
   973 00001016 [A416]01013005-     <1>
   973 0000101C [B716]01006B05-     <1>
   973 00001022 [2216]01016E05-     <1>
   973 00001028 [C716]01017105-     <1>
   973 0000102E [CF16]0100C105-     <1>
   973 00001034 [2216]0100C505-     <1>
   973 0000103A [DB16]0100CD05-     <1>
   973 00001040 [E916]0101E305-     <1>
   973 00001046 [0E16]0101EB05-     <1>
   973 0000104C [1916]01001206-     <1>
   973 00001052 [DB16]0100A806-     <1>
   973 00001058 [2216]0100AB06-     <1>
   973 0000105E [F716]0100AF06-     <1>
   973 00001064 [0617]0100B706-     <1>
   973 0000106A [1517]0100C406-     <1>
   973 00001070 [2216]0100CD06-     <1>
   973 00001076 [1F17]0100ED06-     <1>
   973 0000107C [3017]0100FC06-     <1>
   973 00001082 [3F17]01000307-     <1>
   973 00001088 [5017]01000607-     <1>
   973 0000108E [5A17]01003007-     <1>
   973 00001094 [5017]01003307-     <1>
   973 0000109A [5A17]01003F07-     <1>
   973 000010A0 [2216]0100FA07-     <1>
   973 000010A6 [2216]0100E808-     <1>
   973 000010AC [DB16]0100B409-     <1>
   973 000010B2 [2216]0100610A-     <1>
   973 000010B8 [8017]0100880A-     <1>
   973 000010BE [8E17]0100980A-     <1>
   973 000010C4 [DB16]0100A50A-     <1>
   973 000010CA [F716]02010200-     <1>
   973 000010D0 [2D16]02010600-     <1>
   973 000010D6 [9917]02010800-     <1>
   973 000010DC [A917]02010C00-     <1>
   973 000010E2 [B117]02011000-     <1>
   973 000010E8 [BE17]02011200-     <1>
   973 000010EE [D017]02011600-     <1>
   973 000010F4 [DD17]02011A00-     <1>
   973 000010FA [EF17]02011C00-     <1>
   973 00001100 [0618]02012000-     <1>
   973 00001106 [1918]02012400-     <1>
   973 0000110C [3318]02012600-     <1>
   973 00001112 [5218]02012A00-     <1>
   973 00001118 [3616]02012E00-     <1>
   973 0000111E [6D18]02013000-     <1>
   973 00001124 [7918]02013400-     <1>
   973 0000112A [4116]02013800-     <1>
   973 00001130 [8418]02013A00-     <1>
   973 00001136 [9818]02013E00-     <1>
   973 0000113C [AB18]02014200-     <1>
   973 00001142 [B718]02014400-     <1>
   973 00001148 [C418]02014800-     <1>
   973 0000114E [D018]02014C00-     <1>
   973 00001154 [E418]02014E00-     <1>
   973 0000115A [F918]02015200-     <1>
   973 00001160 [0D19]02015600-     <1>
   973 00001166 [1F19]02015800-     <1>
   973 0000116C [A416]02015C00-     <1>
   973 00001172 [1916]02016000-     <1>
   973 00001178 [E916]02016200-     <1>
   973 0000117E [3119]02016600-     <1>
   973 00001184 [3C19]02016A00-     <1>
   973 0000118A [4519]02007200-     <1>
   973 00001190 [F815]02007600-     <1>
   973 00001196 [5019]02007C00-     <1>
   973 0000119C [5F19]02008000-     <1>
   973 000011A2 [7819]02018800-     <1>
   973 000011A8 [8C19]02019400-     <1>
   973 000011AE [9F19]02019800-     <1>
   973 000011B4 [BF19]02019E00-     <1>
   973 000011BA [D319]0201A200-     <1>
   973 000011C0 [F219]0200AA00-     <1>
   973 000011C6 [051A]0200AE00-     <1>
   973 000011CC [181A]0200B400-     <1>
   973 000011D2 [281A]0200B800-     <1>
   973 000011D8 [461A]0200BE00-     <1>
   973 000011DE [611A]0200C200-     <1>
   973 000011E4 [7C1A]0200CA00-     <1>
   973 000011EA [941A]0201D400-     <1>
   973 000011F0 [A91A]0201DE00-     <1>
   973 000011F6 [C11A]0201E000-     <1>
   973 000011FC [D11A]0201E200-     <1>
   973 00001202 [E91A]0201E600-     <1>
   973 00001208 [FE1A]0201E800-     <1>
   973 0000120E [111B]0201EA00-     <1>
   973 00001214 [2C1B]0201EE00-     <1>
   973 0000121A [441B]0201F000-     <1>
   973 00001220 [571B]0201F200-     <1>
   973 00001226 [721B]0100BC0A-     <1>
   973 0000122C [DB16]0100C80A-     <1>
   973 00001232 [F716]0100CC0A-     <1>
   973 00001238 [F815]0100E70A-     <1>
   973 0000123E [F815]0100ED0A-     <1>
   973 00001244 [8E17]0100D10D-     <1>
   973 0000124A [9B1B]0100FA0D-     <1>
   973 00001250 [1916]01001C0E-     <1>
   973 00001256 [DB16]01002F0E-     <1>
   973 0000125C [C01B]0101350E-     <1>
   973 00001262 [D11B]0000          <1>
   974                              <1> 
   975                              <1> 	align 2, db 0
   976                              <1> internalcodetocoderelocations:
   977 00001266 6500B2008F0A940A9C- <1> 	dw INTERNAL_CODE_TO_CODE_RELOCATIONS, 0
   977 0000126F 0AA10AB80AC40ACF0A- <1>
   977 00001278 E20AE90AEB0DF50D12- <1>
   977 00001281 0E180E4F0E0000      <1>
   978                              <1> 
   979                              <1> 	align 2, db 0
   980                              <1> internalcodetodatarelocations:
   981 00001288 3400B600C700DD00DF- <1> 	dw INTERNAL_CODE_TO_DATA_RELOCATIONS, 0
   981 00001291 00E800FE003D017201- <1>
   981 0000129A 7F0183018D01D001FE- <1>
   981 000012A3 013D02450256027302- <1>
   981 000012AC 7D0285028E029D02A0- <1>
   981 000012B5 02AA02AD02B702C102- <1>
   981 000012BE C802D102D402ED0242- <1>
   981 000012C7 03650375038503A403- <1>
   981 000012D0 B303BF03CB03F90328- <1>
   981 000012D9 04350442044F047804- <1>
   981 000012E2 80049F04AA04B304BB- <1>
   981 000012EB 04C004C604DA04E204- <1>
   981 000012F4 F604FF041F052A0545- <1>
   981 000012FD 054A055E057C058105- <1>
   981 00001306 8E059905AF05B905D9- <1>
   981 0000130F 05F205500656065E06- <1>
   981 00001318 690685069606BA06C7- <1>
   981 00001321 06D506DB06E706F406- <1>
   981 0000132A 1907240742074E0761- <1>
   981 00001333 076A07820796079B07- <1>
   981 0000133C A007A507AA07B307BE- <1>
   981 00001345 07CE07D807E407EE07- <1>
   981 0000134E FE0780088B080D0916- <1>
   981 00001357 092709300935094109- <1>
   981 00001360 4C0957096A0985099D- <1>
   981 00001369 09A709690A7E0AF30A- <1>
   981 00001372 0000                <1>
   982                              <1> 
   983                              <1> 	align 2, db 0
   984                              <1> internaldatatocoderelocations:
   985 00001374 74007E009600A000AC- <1> 	dw INTERNAL_DATA_TO_CODE_RELOCATIONS, -1
   985 0000137D 00B600C00008010C01- <1>
   985 00001386 1001140118011C0120- <1>
   985 0000138F 01240128012C013001- <1>
   985 00001398 3401FFFF            <1>
   986                              <1> 
   987                              <1> 	align 2, db 0
   988                              <1> internaldatatodatarelocations:
   989 0000139C 00000A0014001E0028- <1> 	dw INTERNAL_DATA_TO_DATA_RELOCATIONS, -1
   989 000013A5 0032003C0046005000- <1>
   989 000013AE 5A00640070007A0086- <1>
   989 000013B7 0092009C00A800B200- <1>
   989 000013C0 BC00C800D200E400EC- <1>
   989 000013C9 00F400F800FC000001- <1>
   989 000013D2 0401FFFF            <1>
   990                              <1> 
   991                              <1> %if _ELD_LINKER_PASSES
   992                              <1> 	align 2, db 0
   993                              <1> linkerlinkerdatarelocations:
   994 000013D6 0100320C[8E17]0100- <1> 	dw LINK_LINKER_DATA_RELOCATIONS, 0
   994 000013DE 510C[8E17]0100950C- <1>
   994 000013E6 [2216]01007F0D-     <1>
   994 000013EC [8A1B]0000          <1>
   995                              <1> 
   996                              <1> 	align 2, db 0
   997                              <1> internallinkercodetocoderelocations:
   998 000013F0 380C570C6B0C7C0CA7- <1> 	dw INTERNAL_LINKER_CODE_TO_CODE_RELOCATIONS, 0
   998 000013F9 0C0000              <1>
   999                              <1> 
  1000                              <1> 	align 2, db 0
  1001                              <1> internallinkercodetodatarelocations:
  1002 000013FC 0000                <1> 	dw INTERNAL_LINKER_CODE_TO_DATA_RELOCATIONS, 0
  1003                              <1> 
  1004                              <1> 	align 2, db 0
  1005                              <1> internallinkerdatatocoderelocations:
  1006 000013FE FFFF                <1> 	dw INTERNAL_LINKER_DATA_TO_CODE_RELOCATIONS, -1
  1007                              <1> 
  1008                              <1> 	align 2, db 0
  1009                              <1> internallinkerdatatodatarelocations:
  1010 00001400 FFFF                <1> 	dw INTERNAL_LINKER_DATA_TO_DATA_RELOCATIONS, -1
  1011                              <1> %endif
  1012                              <1> 
  1013                              <1> %if ELDOTHER
  1014                              <1> 	align 2, db 0
  1015                              <1> linkerotherdatarelocations:
  1016                              <1> 	dw LINK_OTHER_DATA_RELOCATIONS, 0
  1017                              <1> 
  1018                              <1>  %ifnidn LINK_OTHER_LINKER_DATA_RELOCATIONS, ""
  1019                              <1>   %error Other linker data links not supported
  1020                              <1>  %endif
  1021                              <1> %endif
  1022                              <1> 
  1023                              <1> %if ELDOTHER || ELDHINT
  1024                              <1> 	align 2, db 0
  1025                              <1> debuggeramissig:
  1026 00001402 65636D20<rep 5h>    <1> 		fill 8, 32, db "ecm"
  1027 0000140A 6C446562756720-     <1> 		fill 8, 32, db "lDebug"
  1027 0000140A <rep 2h>            <1>
  1028                              <1> %endif
  1029                              <1> 
  1030                              <1> %ifnidni _LISTING, ""
  1031                              <1> listmsg:
  1032 00001412 547261634C6973742D- <1> .hint:		db "TracList-add-offset=",_LISTING,"::"
  1032 0000141B 6164642D6F66667365- <1>
  1032 00001424 743D6C646D656D2E6C- <1>
  1032 0000142D 73743A3A            <1>
  1033 00001431 2D2D2D2D680D0A00    <1> .hint.offset:	asciz "----h",13,10
  1034                              <1> %endif
  1035                              <1> 
  1036 00001439 30CD0C636D64335F6E- <1> 	eldcall_dump_names ELDCALL_CODE_NAMES
  1036 00001442 6F745F657874702A11- <1>
  1036 0000144B 636D64335F70726570- <1>
  1036 00001454 726F636573736564A8- <1>
  1036 0000145D 1B1161615F6265666F- <1>
  1036 00001466 72655F6765746C696E- <1>
  1036 0000146F 6509B91061615F6166- <1>
  1036 00001478 7465725F6765746C69- <1>
  1036 00001481 6E651AB70D70757473- <1>
  1036 0000148A 5F6578745F646F6E65- <1>
  1036 00001493 CF3F18707574735F63- <1>
  1036 0000149C 6F70796F7574707574- <1>
  1036 000014A5 5F6578745F646F6E65- <1>
  1036 000014AE 6F9D15707574735F67- <1>
  1036 000014B7 65746C696E655F6578- <1>
  1036 000014C0 745F646F6E65D55509- <1>
  1036 000014C9 736B6970636F6D6D61- <1>
  1036 000014D2 03C309697373747269- <1>
  1036 000014DB 6E673FBABD04636D64- <1>
  1036 000014E4 33DDB90663686B656F- <1>
  1036 000014ED 6C551205707574737A- <1>
  1036 000014F6 B21205736574726328- <1>
  1036 000014FF 90046973706DE83A06- <1>
  1036 00001508 6973656F6C3F29EF09- <1>
  1036 00001511 736B69707768697465- <1>
  1036 0000151A C5C60470757473D0BB- <1>
  1036 00001523 1A636F70795F73696E- <1>
  1036 0000152C 676C655F636F756E74- <1>
  1036 00001535 65645F737472696E67- <1>
  1036 0000153E 67B1087472696D7075- <1>
  1036 00001547 747384810768657877- <1>
  1036 00001550 6F7264EBA607646563- <1>
  1036 00001559 776F7264398C087075- <1>
  1036 00001562 74736C696E65B77408- <1>
  1036 0000156B 7365746573326478AB- <1>
  1036 00001574 FF26646973705F6478- <1>
  1036 0000157D 61785F74696D65735F- <1>
  1036 00001586 63785F77696474685F- <1>
  1036 0000158F 62785F73697A652E73- <1>
  1036 00001598 746F72656FA20D7075- <1>
  1036 000015A1 74736C696E655F6372- <1>
  1036 000015AA 6C66821B0768657862- <1>
  1036 000015B3 7974653DBA06686578- <1>
  1036 000015BC 6E7962986906696E74- <1>
  1036 000015C5 63686B21300A63616C- <1>
  1036 000015CE 6C5F696E743244      <1>
  1037 000015D5 C30B076C617374636D- <1> 	link_data_dump_names LINK_DATA_NAMES
  1037 000015DE 646B5D06646D79636D- <1>
  1037 000015E7 6454400D6D73672E75- <1>
  1037 000015F0 6E696E7374616C6C97- <1>
  1037 000015F9 B6136578745F636F6D- <1>
  1037 00001602 6D616E645F68616E64- <1>
  1037 0000160B 6C6572EB4208657874- <1>
  1037 00001614 647373656CD52D0665- <1>
  1037 0000161D 787473656784E3086C- <1>
  1037 00001626 696E655F6F7574FDFC- <1>
  1037 0000162F 06707370646267044A- <1>
  1037 00001638 08636F64655F736567- <1>
  1037 00001641 B30510636F64655F6D- <1>
  1037 0000164A 6F7661626C655F7365- <1>
  1037 00001653 676A5D09616C6C6F63- <1>
  1037 0000165C 5F7365678C610A616C- <1>
  1037 00001665 6C6F635F73697A650A- <1>
  1037 0000166E 0A05647373656C2AE7- <1>
  1037 00001677 0D686973746F727966- <1>
  1037 00001680 6F726D617431AA0C68- <1>
  1037 00001689 6973746F72792E6C61- <1>
  1037 00001692 737475AE0D68697374- <1>
  1037 0000169B 6F72792E6669727374- <1>
  1037 000016A4 7D4210686973746F72- <1>
  1037 000016AD 792E7365676F727365- <1>
  1037 000016B6 6C73830D686973746F- <1>
  1037 000016BF 727962756666657227- <1>
  1037 000016C8 9B05737461636BC367- <1>
  1037 000016D1 09737461636B5F656E- <1>
  1037 000016DA 64E7D30B6578747365- <1>
  1037 000016E3 675F757365642BC80B- <1>
  1037 000016EC 6578747365675F7369- <1>
  1037 000016F5 7A65B2400C65787464- <1>
  1037 000016FE 6174615F75736564F6- <1>
  1037 00001707 340C65787464617461- <1>
  1037 00001710 5F73697A652AAE0765- <1>
  1037 00001719 7874646174612E6B0E- <1>
  1037 00001722 6578745F7661725F66- <1>
  1037 0000172B 6F726D6174F8B40C65- <1>
  1037 00001734 78745F7661725F7369- <1>
  1037 0000173D 7A658FC30E6578745F- <1>
  1037 00001746 7661725F616D6F756E- <1>
  1037 0000174F 74E8B4076578745F76- <1>
  1037 00001758 6172C4E22369737661- <1>
  1037 00001761 726961626C655F6D6F- <1>
  1037 0000176A 7265627974655F6E61- <1>
  1037 00001773 6D6568656164657273- <1>
  1037 0000177C 2E6578748D710B6D73- <1>
  1037 00001785 672E696E7374616C6C- <1>
  1037 0000178E 5ABC086F7074696F6E- <1>
  1037 00001797 7337BC890D656E7472- <1>
  1037 000017A0 797365675F73697A65- <1>
  1037 000017A9 89F205637373656CAF- <1>
  1037 000017B2 9D0A6D657373616765- <1>
  1037 000017BB 73656791300F6D6573- <1>
  1037 000017C4 736167657365675F73- <1>
  1037 000017CD 697A65B49D0A6D6573- <1>
  1037 000017D6 7361676573656CEAE5- <1>
  1037 000017DF 0F617578627566665F- <1>
  1037 000017E8 7365676D656E74B0B2- <1>
  1037 000017F1 14617578627566665F- <1>
  1037 000017FA 63757272656E745F73- <1>
  1037 00001803 697A658B0010617578- <1>
  1037 0000180C 627566665F7365676F- <1>
  1037 00001815 7273656C192A176175- <1>
  1037 0000181E 78627566665F6D6F76- <1>
  1037 00001827 61626C655F7365676D- <1>
  1037 00001830 656E74E1B31C617578- <1>
  1037 00001839 627566665F6D6F7661- <1>
  1037 00001842 626C655F6375727265- <1>
  1037 0000184B 6E745F73697A653C42- <1>
  1037 00001854 18617578627566665F- <1>
  1037 0000185D 6D6F7661626C655F73- <1>
  1037 00001866 65676F7273656C3208- <1>
  1037 0000186F 09636F64655F73697A- <1>
  1037 00001878 65094A08636F64655F- <1>
  1037 00001881 73656C63C211636F64- <1>
  1037 0000188A 655F6D6F7661626C65- <1>
  1037 00001893 5F73697A65B8051063- <1>
  1037 0000189C 6F64655F6D6F766162- <1>
  1037 000018A5 6C655F73656C1AF209- <1>
  1037 000018AE 636F6465325F736567- <1>
  1037 000018B7 DC620A636F6465325F- <1>
  1037 000018C0 73697A651FF209636F- <1>
  1037 000018C9 6465325F73656CC937- <1>
  1037 000018D2 11636F6465325F6D6F- <1>
  1037 000018DB 7661626C655F736567- <1>
  1037 000018E4 0DD312636F6465325F- <1>
  1037 000018ED 6D6F7661626C655F73- <1>
  1037 000018F6 697A65CE3711636F64- <1>
  1037 000018FF 65325F6D6F7661626C- <1>
  1037 00001908 655F73656C67340F68- <1>
  1037 00001911 6973746F72795F7365- <1>
  1037 0000191A 676D656E741E380F68- <1>
  1037 00001923 6973746F7279736567- <1>
  1037 0000192C 5F73697A656A2B0865- <1>
  1037 00001935 7874637373656C892B- <1>
  1037 0000193E 06656E76736567140B- <1>
  1037 00001947 08656E765F73697A65- <1>
  1037 00001950 30CD0C636D64335F6E- <1>
  1037 00001959 6F745F657874964816- <1>
  1037 00001962 6578745F7072657072- <1>
  1037 0000196B 6F636573735F68616E- <1>
  1037 00001974 646C6572702A11636D- <1>
  1037 0000197D 64335F70726570726F- <1>
  1037 00001986 636573736564C00110- <1>
  1037 0000198F 6578745F616D69735F- <1>
  1037 00001998 68616E646C65729555- <1>
  1037 000019A1 1D6578745F61615F62- <1>
  1037 000019AA 65666F72655F676574- <1>
  1037 000019B3 6C696E655F68616E64- <1>
  1037 000019BC 6C6572A81B1161615F- <1>
  1037 000019C5 6265666F72655F6765- <1>
  1037 000019CE 746C696E65F2351C65- <1>
  1037 000019D7 78745F61615F616674- <1>
  1037 000019E0 65725F6765746C696E- <1>
  1037 000019E9 655F68616E646C6572- <1>
  1037 000019F2 09B91061615F616674- <1>
  1037 000019FB 65725F6765746C696E- <1>
  1037 00001A04 65AE24106578745F70- <1>
  1037 00001A0D 7574735F68616E646C- <1>
  1037 00001A16 65721AB70D70757473- <1>
  1037 00001A1F 5F6578745F646F6E65- <1>
  1037 00001A28 DD301B6578745F7075- <1>
  1037 00001A31 74735F636F70796F75- <1>
  1037 00001A3A 747075745F68616E64- <1>
  1037 00001A43 6C6572CF3F18707574- <1>
  1037 00001A4C 735F636F70796F7574- <1>
  1037 00001A55 7075745F6578745F64- <1>
  1037 00001A5E 6F6E65B9E118657874- <1>
  1037 00001A67 5F707574735F676574- <1>
  1037 00001A70 6C696E655F68616E64- <1>
  1037 00001A79 6C65726F9D15707574- <1>
  1037 00001A82 735F6765746C696E65- <1>
  1037 00001A8B 5F6578745F646F6E65- <1>
  1037 00001A94 3B26126578745F696E- <1>
  1037 00001A9D 6A6563745F68616E64- <1>
  1037 00001AA6 6C65729C6C15657874- <1>
  1037 00001AAF 5F61615F696E6A6563- <1>
  1037 00001AB8 745F68616E646C6572- <1>
  1037 00001AC1 C0CD0D706174636861- <1>
  1037 00001ACA 7265615F72756E05BD- <1>
  1037 00001AD3 157061746368617265- <1>
  1037 00001ADC 615F72756E2E736567- <1>
  1037 00001AE5 6D656E746FE3127061- <1>
  1037 00001AEE 746368617265615F72- <1>
  1037 00001AF7 756E2E73697A65C88C- <1>
  1037 00001B00 107061746368617265- <1>
  1037 00001B09 615F696E7472746E0D- <1>
  1037 00001B12 F41870617463686172- <1>
  1037 00001B1B 65615F696E7472746E- <1>
  1037 00001B24 2E7365676D656E7467- <1>
  1037 00001B2D 491570617463686172- <1>
  1037 00001B36 65615F696E7472746E- <1>
  1037 00001B3F 2E73697A6579A51070- <1>
  1037 00001B48 61746368617265615F- <1>
  1037 00001B51 706D5F657863BECB18- <1>
  1037 00001B5A 706174636861726561- <1>
  1037 00001B63 5F706D5F6578632E73- <1>
  1037 00001B6C 65676D656E7456F715- <1>
  1037 00001B75 706174636861726561- <1>
  1037 00001B7E 5F706D5F6578632E73- <1>
  1037 00001B87 697A6568440E6C696E- <1>
  1037 00001B90 6B63616C6C5F746162- <1>
  1037 00001B99 6C65F09E227472795F- <1>
  1037 00001BA2 64656275676765725F- <1>
  1037 00001BAB 616D69735F6D756C74- <1>
  1037 00001BB4 69706C65785F6E756D- <1>
  1037 00001BBD 626572CB510E696E74- <1>
  1037 00001BC6 65726E616C666C6167- <1>
  1037 00001BCF 7334688C15616D6973- <1>
  1037 00001BD8 5F6D756C7469706C65- <1>
  1037 00001BE1 785F6E756D626572    <1>
  1038                              <1> %if ELDOTHER
  1039                              <1> 	link_data_dump_names LINK_OTHER_DATA_NAMES
  1040                              <1> %endif
  1041                              <1> 
  1042                              <1> lmsg:
  1043                              <1> %if _ELD_LINKER_PASSES
  1044                              <1> %if _ELDCALL_OPTIONAL
  1045 00001BE9 214F7074696F6E616C- <1> .warning_code_optional:		counted "Optional code link missing, hash="
  1045 00001BF2 20636F6465206C696E- <1>
  1045 00001BFB 6B206D697373696E67- <1>
  1045 00001C04 2C20686173683D      <1>
  1046                              <1> %endif
  1047 00001C0B 214F7074696F6E616C- <1> .warning_data_optional:		counted "Optional data link missing, hash="
  1047 00001C14 2064617461206C696E- <1>
  1047 00001C1D 6B206D697373696E67- <1>
  1047 00001C26 2C20686173683D      <1>
  1048 00001C2D 1844617461206C696E- <1> .error_data:			counted "Data link missing, hash="
  1048 00001C36 6B206D697373696E67- <1>
  1048 00001C3F 2C20686173683D      <1>
  1049 00001C46 18436F6465206C696E- <1> .error_code:			counted "Code link missing, hash="
  1049 00001C4F 6B206D697373696E67- <1>
  1049 00001C58 2C20686173683D      <1>
  1050 00001C5F 0A682C206C6162656C- <1> .error.2:			counted "h, label ",'"'
  1050 00001C68 2022                <1>
  1051                              <1> %endif
  1052                              <1> %if ELDOTHER
  1053                              <1> .no_other:		asciz "ELD linker: No other link info found!",13,10
  1054                              <1> .error_other:		asciz "ELD linker: Other link info unknown format!",13,10
  1055                              <1> %endif
  1056                              <1> 
  1057 00001C6A 00<rep 6h>          <1> 	align 16, db 0
  2569                                  
  2570                                  	align 16
  2571                                  code_size equ $ - code
