=== Trace listing source: /home/evln/proj/msdos4.hg/hg/lst/instsect.lst 1 2 %if 0 3 4 instsect.asm - install boot sectors. 2018--2024 by E. C. Masloch 5 6 Usage of the works is permitted provided that this 7 instrument is retained with the works, so that any entity 8 that uses the works is notified of this instrument. 9 10 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 11 12 %endif 13 14 15 %include "lmacros3.mac" 1 <1> [list -] 14 <2> [list -] 14 <1> [list -] 16 17 numdef SYMHINTS, 1 18 %if _SYMHINTS 19 %imacro symhint_store_string 1+.nolist 20 ..@symhint_store_string_%1: 21 %endmacro 22 %imacro symhint_store_and_label 1+.nolist 23 ..@symhint_store_string_%1: 24 %1: 25 %endmacro 26 %else 27 %idefine symhint_store_string comment 28 %imacro symhint_store_and_label 1+.nolist 29 %1: 30 %endmacro 31 %endif 32 33 numdef DEBUG0 34 numdef DEBUG1 35 numdef DEBUG2 36 numdef DEBUG3 37 numdef DEBUG4 38 numdef DEBUG5 39 %idefine d5 _d 5, 40 numdef VDD, 1 ; try to load DEBXXVDD.DLL to use it for L and W sector commands 41 numdef DISPLAY_ALL_NAMES, 0 42 43 %if __NASM_VERSION_ID__ >= 2000000h + 17 * 10000h 44 numdef HAVE_NASM_NOTE, 1 45 %else 46 numdef HAVE_NASM_NOTE, 0 47 %endif 48 49 %imacro noteincbin 2.nolist 50 %strcat %%string _PAYLOAD_PREFIX_LST, %2 51 %if _HAVE_NASM_NOTE 52 %note include listing file %%string 53 %endif 54 incbin %1 55 %endmacro 56 57 58 struc BS 0 00000000 ?????? bsJump: resb 3 0 00000003 ???????????????? bsOEM: resb 8 61 bsBPB: 62 endstruc 63 64 struc EBPB ; BPB sec 0 00000000 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 0 00000002 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 0 00000003 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 0 00000005 ?? bpbNumFATs: resb 1 ; offset 05h 10h 0 00000006 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 0 00000008 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 0 0000000A ?? bpbMediaID: resb 1 ; offset 0Ah 15h 0 0000000B ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 0 0000000D ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 0 0000000F ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 0 00000011 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 0 00000015 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 77 bpbNew: ; offset 19h 24h 78 0 00000019 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 0 0000001D ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 0 0000001F ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 0 00000021 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 0 00000025 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 0 00000027 ???? ebpbBackupSector: resw 1 ; offset 27h 32h 85 00000029 ebpbReserved: resb 12 ; offset 29h 34h 86 ebpbNew: ; offset 35h 40h 87 endstruc 88 89 struc BPBN ; ofs B16 S16 B32 S32 0 00000000 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 0 00000001 ?? resb 1 ; 01h 1Ah 25h 36h 41h 0 00000002 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 0 00000003 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 94 00000007 bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00000012 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 96 endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 97 98 struc LOADSTACKVARS, -10h 0 FFFFFFF0 ???????? lsvFirstCluster: resd 1 0 FFFFFFF4 ???????? lsvFATSector: resd 1 0 FFFFFFF8 ???? lsvFATSeg: resw 1 0 FFFFFFFA ???? lsvLoadSeg: resw 1 0 FFFFFFFC ???????? lsvDataStart: resd 1 104 endstruc 105 106 struc LOADDATA, LOADSTACKVARS - 10h 0 FFFFFFE0 ???? ldMemoryTop: resw 1 0 FFFFFFE2 ???? ldLoadTop: resw 1 0 FFFFFFE4 ???? ldSectorSeg: resw 1 0 FFFFFFE6 ?? ldFATType: resb 1 0 FFFFFFE7 ?? ldHasLBA: resb 1 0 FFFFFFE8 ???? ldClusterSize: resw 1 0 FFFFFFEA ???? ldParaPerSector:resw 1 0 FFFFFFEC ???? ldLoadingSeg: resw 1 0 FFFFFFEE ???? ldLoadUntilSeg: resw 1 116 endstruc 117 118 struc LOADDATA2, LOADDATA - 10h 0 FFFFFFD0 ???????? ldRootSector: resd 1 0 FFFFFFD4 ???? ldEntriesPerSector: resw 1 0 FFFFFFD6 ???? ldLastAvailableSector: resw 1 0 FFFFFFD8 ???? ldParasLeft: resw 1 0 FFFFFFDA ???? ldParasDone: resw 1 0 FFFFFFDC ???? ldBytesPerSector: resw 1 125 endstruc 126 127 struc DIRENTRY 0 00000000 ???????????????? deName: resb 8 0 00000008 ?????? deExt: resb 3 0 0000000B ?? deAttrib: resb 1 0 0000000C ???????????????? resb 8 0 00000014 ???? deClusterHigh: resw 1 0 00000016 ???? deTime: resw 1 0 00000018 ???? deDate: resw 1 0 0000001A ???? deClusterLow: resw 1 0 0000001C ???????? deSize: resd 1 137 endstruc 138 139 ATTR_READONLY equ 1 140 ATTR_HIDDEN equ 2 141 ATTR_SYSTEM equ 4 142 ATTR_VOLLABEL equ 8 143 ATTR_DIRECTORY equ 10h 144 ATTR_ARCHIVE equ 20h 145 146 struc LBAPACKET 0 00000000 ???? lpSize: resw 1 0 00000002 ???? lpCount: resw 1 0 00000004 ???????? lpBuffer: resd 1 0 00000008 ???????????????? lpSector: resq 1 151 endstruc 152 153 struc PARTINFO 0 00000000 ?? piBoot: resb 1 0 00000001 ?????? piStartCHS: resb 3 0 00000004 ?? piType: resb 1 0 00000005 ?????? piEndCHS: resb 3 0 00000008 ???????? piStart: resd 1 0 0000000C ???????? piLength: resd 1 160 endstruc 161 162 ptEmpty: equ 0 163 ptFAT12: equ 1 164 ptFAT16_16BIT_CHS: equ 4 165 ptExtendedCHS: equ 5 166 ptFAT16_CHS: equ 6 167 ptFAT32_CHS: equ 0Bh 168 ptFAT32: equ 0Ch 169 ptFAT16: equ 0Eh 170 ptExtended: equ 0Fh 171 ptLinux: equ 83h 172 ptExtendedLinux: equ 85h 173 174 struc FSINFO ; FAT32 FSINFO sector layout 0 00000000 ???????? .signature1: resd 1 ; 41615252h ("RRaA") for valid FSINFO 176 .signature1_value: equ 41615252h 177 .reserved1: ; former unused, initialized to zero by FORMAT 178 00000004 .fsiboot: resb 480 ; now used for FSIBOOT 0 000001E4 ???????? .signature2: resd 1 ; 61417272h ("rrAa") for valid FSINFO 180 .signature2_value: equ 61417272h 0 000001E8 ???????? .numberfree: resd 1 ; FSINFO: number of free clusters or -1 0 000001EC ???????? .nextfree: resd 1 ; FSINFO: first free cluster or -1 183 000001F0 .reserved2: resd 3 ; unused, initialized to zero by FORMAT 0 000001FC ???????? .signature3: resd 1 ; AA550000h for valid FSINFO or FSIBOOT 185 .signature3_value: equ 0AA550000h 186 endstruc 187 188 struc FSIBOOTG ; FSIBOOT general layout 0 00000000 ???????????????? .signature: resq 1 ; 8 byte that identify the FSIBOOT type 190 00000008 .fsicode: resb 472 ; 472 byte FSIBOOT type specific data or code 191 endstruc 192 193 %if _VDD 194 ; standard BOPs for communication with DEBXXVDD on NT platforms 195 %macro RegisterModule 0.nolist 196 db 0C4h, 0C4h, 58h, 0 197 nop 198 %endmacro 199 %macro UnRegisterModule 0.nolist 200 db 0C4h, 0C4h, 58h, 1 201 nop 202 %endmacro 203 %macro DispatchCall 0.nolist 204 db 0C4h, 0C4h, 58h, 2 205 nop 206 %endmacro 207 %endif 208 209 210 %ifndef _MAP 211 %elifempty _MAP 212 %else ; defined non-empty, str or non-str 213 [map all _MAP] 214 %endif 215 216 cpu 8086 217 org 256 === Switch to base=-000100h -> "PROGRAM" 218 section PROGRAM align=16 === Switch to base=-000100h -> "BUFFERS" 219 section BUFFERS follows=PROGRAM align=16 220 221 numdef FAT12, 1 222 numdef FAT16, 1 223 numdef FAT32, 1 224 strdef PAYLOAD_FAT12, "boot12.bin" 225 strdef PAYLOAD_FAT16, "boot16.bin" 226 strdef PAYLOAD_FAT32, "boot32.bin" 227 strdef PAYLOAD_PREFIX_LST, "" 228 strdef PAYLOAD_FAT12_LST, "boot12.lst" 229 strdef PAYLOAD_FAT16_LST, "boot16.lst" 230 strdef PAYLOAD_FAT32_LST, "boot32.lst" 231 numdef NUM_REPLACEMENTS,4 232 numdef NUM_DETECT_NAMES,4 233 %if _NUM_REPLACEMENTS > _NUM_DETECT_NAMES 234 %error Must detect above-or-equal amount of replacement names 235 %endif 236 237 238 align 16, db 0 239 %if _FAT12 240 00000000 fat12_payload: noteincbin _PAYLOAD_FAT12, _PAYLOAD_FAT12_LST 240 ------------------ note: include listing file 'lst/boot12.lst' 1 2 %if 0 3 4 File system boot sector loader code for FAT12 or FAT16 5 6 Adapted from 2002-11-26 fatboot.zip/fat12.asm, 7 released as public domain by Chris Giese 8 9 Public domain by E. C. Masloch, 2012 10 11 %endif 12 13 14 %include "lmacros2.mac" 1 <1> [list -] 14 <1> [list -] 15 16 %ifndef _MAP 17 %elifempty _MAP 18 %else ; defined non-empty, str or non-str 19 [map all _MAP] 20 %endif 21 22 defaulting 23 24 numdef FAT16, 0 ; 0 = FAT12, 1 = FAT16 25 strdef OEM_NAME, " lDOS" 26 strdef OEM_NAME_FILL, '_' 27 strdef DEFAULT_LABEL, "lDOS" 28 numdef VOLUMEID, 0 29 30 strdef LOAD_NAME, "LDOS" 31 strdef LOAD_EXT, "COM" ; name of file to load 32 numdef LOAD_ADR, 02000h ; where to load 33 numdef LOAD_MIN_PARA, paras(4096) 34 numdef LOAD_CHECK_MAX_SIZE, 0 35 numdef LOAD_CHECK_MAX_SIZE_FATPLUS, 1 36 numdef LOAD_NON_FAT, 0, 2048 ; use FAT-less loading (value is amount bytes) 37 numdef EXEC_SEG_ADJ, 0 ; how far cs will be from _LOAD_ADR 38 numdef EXEC_OFS, 400h ; what value ip will be 39 numdef CHECKOFFSET, 1020 40 numdef CHECKVALUE, "lD" 41 numdef LOAD_STACK, 512 ; default stack size (use 256 for DR-DOS) 42 numdef LOAD_DIR_SEG, 0 ; => where to store dir entry (0 if nowhere) 43 numdef ADD_SEARCH, 0 ; whether to search second file 44 strdef ADD_NAME, "" 45 strdef ADD_EXT, "" ; name of second file to search 46 numdef ADD_DIR_SEG, 0 ; => where to store dir entry (0 if nowhere) 47 numdef CHECK_ATTRIB, 0 ; check attribute for LFN, label, directory 48 numdef ATTRIB_SAVE, _CHECK_ATTRIB 49 50 gendef _ADR_DIRBUF, end -start+7C00h ; 07E00h 51 gendef _ADR_FATBUF, end -start+7C00h ; 07E00h 52 53 numdef QUERY_GEOMETRY, 1 ; query geometry via 13.08 (for CHS access) 54 numdef QUERY_GEOMETRY_DISABLED, 0 55 numdef USE_PART_INFO, 1 ; use ds:si-> partition info from MBR, if any 56 numdef USE_PART_INFO_DISABLED, 0 57 numdef USE_AUTO_UNIT, 1 ; use unit passed from ROM-BIOS in dl 58 numdef RPL, 1 ; support RPL and do not overwrite it 59 numdef RPL_GRACE_AREA, 130 * 1024 60 ; alternative RPL support, 61 ; assume RPL fits in this area 62 numdef CHS, 1 ; support CHS (if it fits) 63 numdef LBA, 1 ; support LBA (if available) 64 numdef LBA_33_BIT, 1 ; support 33-bit LBA 65 numdef LBA_CHECK_NO_33, 1 ; else: check that LBA doesn't carry 66 67 numdef RELOCATE, 0 ; relocate the loader to top of memory 68 numdef SET_BL_UNIT, 0 ; if to pass unit in bl as well 69 numdef SET_DL_UNIT, 0 ; if to pass unit in dl 70 numdef SET_AXBX_DATA, 0 ; if to pass first data sector in ax:bx 71 numdef SET_DSSI_DPT, 0 ; if to pass DPT address in ds:si 72 numdef PUSH_DPT, 0 ; if to push DPT address 73 numdef MEMORY_CONTINUE, 1 ; if to just execute when memory full 74 numdef SET_DI_CLUSTER, 0 ; if to pass first load file cluster in di 75 numdef DIRBUF_500, 0 ; if to load root dir sector(s) to 0:500h 76 numdef DIR_ENTRY_500, 0 ; if to copy directory entry to 0:500h 77 numdef DIR_ENTRY_520, 0 ; if to copy next directory entry to 0:520h 78 numdef TURN_OFF_FLOPPY, 0 ; if to turn off floppy motor after loading 79 numdef DATASTART_HIDDEN,0 ; if to add hidden sectors to data_start 80 numdef LBA_SET_TYPE, 0 ; if to set third byte to LBA partition type 81 numdef SET_LOAD_SEG, 1 ; if to set load_seg (word [ss:bp - 6]) 82 numdef SET_FAT_SEG, 1 ; if to set fat_seg (word [ss:bp - 8]) 83 numdef SET_FAT_SEG_NORMAL, 1 ; do not use aggressive optimisation 84 numdef SET_CLUSTER, 1 ; if to set first_cluster (word [ss:bp - 16]) 85 numdef ZERO_ES, 0 ; if to set es = 0 before jump 86 numdef ZERO_DS, 0 ; if to set ds = 0 before jump 87 88 numdef FIX_SECTOR_SIZE, 0 ; fix sector size (0 = disable, else = sector size) 89 numdef FIX_SECTOR_SIZE_SKIP_CHECK, 0 ; don't check sector size 90 numdef FIX_CLUSTER_SIZE, 0 ; fix cluster size 91 numdef FIX_CLUSTER_SIZE_SKIP_CHECK, 0 ; don't check cluster size 92 numdef NO_LIMIT, 0 ; allow using more memory than a boot sector 93 ; also will not write 0AA55h signature! 94 numdef WARN_PART_SIZE, 0 95 96 numdef LBA_SKIP_CHECK, 1 ; don't use proper LBA extensions check 97 numdef LBA_WORKAROUND, 0 ; when checking for LBA set ds = 40h 98 numdef LBA_SKIP_CY, 1 ; skip check: set up CY before 13.42 99 numdef LBA_SKIP_ANY, 0 ; skip check: try CHS on any error 100 incdef _LBA_SKIP_ANY, LBA_SKIP_CY 101 numdef LBA_RETRY, 0 ; retry LBA reads one time 102 numdef CHS_RETRY, 1 ; retry CHS reads one time 103 numdef CHS_RETRY_REPEAT,16 ; retry CHS reads multiple times 104 ; (value of the def is used as count) 105 numdef CHS_RETRY_NORMAL,1 ; do not use aggressive optimisation 106 numdef RETRY_RESET, 1 ; call reset disk system 13.00 on retries 107 108 numdef MEDIAID, 0F0h ; media ID 109 numdef UNIT, 0 ; load unit in BPB 110 numdef CHS_SECTORS, 18 ; CHS geometry field for sectors 111 numdef CHS_HEADS, 2 ; CHS geometry field for heads 112 numdef HIDDEN, 0 ; number of hidden sectors 113 numdef SPI, 2880 ; sectors per image 114 numdef BPS, 512 ; bytes per sector 115 numdef SPC, 1 ; sectors per cluster 116 numdef SPF, 9 ; sectors per FAT 117 numdef NUMFATS, 2 ; number of FATs 118 numdef NUMROOT, 224 ; number of root directory entries 119 numdef NUMRESERVED, 1 ; number of reserved sectors 120 121 %if _FAT16 122 ; Unlike the 1440 KiB diskette image defaults for the FAT12 123 ; loader we just fill the FAT16 BPB with zeros by default. 124 numdef MEDIAID, 0 ; media ID 125 numdef UNIT, 0 ; load unit in BPB 126 numdef CHS_SECTORS, 0 ; CHS geometry field for sectors 127 numdef CHS_HEADS, 0 ; CHS geometry field for heads 128 numdef HIDDEN, 0 ; number of hidden sectors 129 numdef SPI, 0 ; sectors per image 130 numdef BPS, 0 ; bytes per sector 131 numdef SPC, 0 ; sectors per cluster 132 numdef SPF, 0 ; sectors per FAT 133 numdef NUMFATS, 0 ; number of FATs 134 numdef NUMROOT, 0 ; number of root directory entries 135 numdef NUMRESERVED, 0 ; number of reserved sectors 136 %endif 137 138 %if _DIRBUF_500 139 gendef _ADR_DIRBUF, 500h 140 %endif 141 142 143 numdef COMPAT_FREEDOS, 0 ; partial FreeDOS load compatibility 144 numdef COMPAT_DR, 0 ; partial DR-DOS load compatibility 145 numdef COMPAT_IBM, 0 ; partial IBMDOS load compatibility 146 numdef COMPAT_MS7, 0 ; partial MS-DOS 7 load compatibility 147 numdef COMPAT_MS6, 0 ; partial MS-DOS 6 load compatibility 148 numdef COMPAT_LDOS, 0 ; lDOS load compatibility 149 numdef COMPAT_KERNEL7E, 0 ; kernel at 0:7E00h load compatibility 150 151 %if (!!_COMPAT_FREEDOS + !!_COMPAT_IBM + !!_COMPAT_DR + !!_COMPAT_MS7 + !!_COMPAT_MS6 + !!_COMPAT_LDOS + !!_COMPAT_KERNEL7E) > 1 154 %error At most one set must be selected. 155 %endif 156 157 %if _COMPAT_FREEDOS 158 strdef LOAD_NAME, "KERNEL" 159 strdef LOAD_EXT, "SYS" 160 numdef LOAD_ADR, 00600h 161 numdef LOAD_MIN_PARA, paras(512) 162 numdef EXEC_SEG_ADJ, 0 163 numdef EXEC_OFS, 0 164 165 numdef CHECKVALUE, 0 166 numdef SET_LOAD_SEG, 0 167 numdef SET_FAT_SEG, 0 168 numdef SET_CLUSTER, 0 169 170 numdef SET_BL_UNIT, 1 171 numdef MEMORY_CONTINUE, 0 172 numdef RELOCATE, 1 173 ; The FreeDOS load protocol mandates that the entire file be loaded. 174 %endif 175 176 %if _COMPAT_IBM 177 strdef LOAD_NAME, "IBMBIO" 178 strdef LOAD_EXT, "COM" 179 numdef LOAD_ADR, 00700h 180 numdef LOAD_MIN_PARA, paras(512) 181 numdef EXEC_SEG_ADJ, 0 182 numdef EXEC_OFS, 0 183 numdef LOAD_DIR_SEG, 50h 184 numdef ADD_SEARCH, 1 185 strdef ADD_NAME, "IBMDOS" 186 strdef ADD_EXT, "COM" 187 numdef ADD_DIR_SEG, 52h 188 ; Note: The IBMBIO.COM directory entry must be stored at 189 ; 0:500h, and the IBMDOS.COM directory entry at 0:520h. 190 191 numdef CHECKVALUE, 0 192 numdef SET_LOAD_SEG, 0 193 numdef SET_FAT_SEG, 0 194 numdef SET_CLUSTER, 0 195 196 numdef SET_DL_UNIT, 1 197 numdef MEMORY_CONTINUE, 1 198 ; 3 sectors * 512 BpS should suffice. We load into 700h--7A00h, 199 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 200 numdef SET_AXBX_DATA, 1 201 numdef DATASTART_HIDDEN,1 202 numdef SET_DSSI_DPT, 1 203 numdef PUSH_DPT, 1 204 %endif 205 206 %if _COMPAT_DR 207 strdef LOAD_NAME, "IBMBIO" 208 strdef LOAD_EXT, "COM" 209 numdef LOAD_ADR, 00700h 210 numdef LOAD_STACK, 256 211 ; Shrinking the stack allows to boot a file of up to 29 KiB 212 ; given a sector size of <= 1 KiB. 213 numdef LOAD_MIN_PARA, paras(4096 - 700h) 214 ; Using a min para size that allows to compare the segment's 215 ; high byte only saves a byte. 216 numdef EXEC_SEG_ADJ, 0 217 numdef EXEC_OFS, 0 218 219 numdef CHECKVALUE, 0 220 numdef SET_LOAD_SEG, 0 221 numdef SET_FAT_SEG, 0 222 numdef SET_CLUSTER, 0 223 224 numdef SET_DL_UNIT, 1 225 numdef MEMORY_CONTINUE, 1 226 ; Memory continue must certainly be set to boot off file 227 ; systems with >= 32 KiB per cluster and may be needed 228 ; even for smaller cluster sizes that are still > 1 KiB. 229 numdef LOAD_CHECK_MAX_SIZE, 1 230 ; In conjunction with _MEMORY_CONTINUE this enables erroring 231 ; out if the actual file data is too large to load it, but 232 ; avoids the need to load the entire last cluster. 233 234 numdef SET_AXBX_DATA, 0 235 numdef DATASTART_HIDDEN,0 236 numdef SET_DSSI_DPT, 0 237 numdef PUSH_DPT, 0 238 ; None of these options seem needed for DR-DOS. Note that 239 ; disabling them will fail if we actually load our lDOS 240 ; iniload as it expects these options enabled. 241 %endif 242 243 %if _COMPAT_MS7 244 strdef LOAD_NAME, "IO" 245 strdef LOAD_EXT, "SYS" 246 numdef LOAD_ADR, 00700h 247 numdef LOAD_MIN_PARA, paras(1024) 248 numdef EXEC_SEG_ADJ, 0 249 numdef EXEC_OFS, 200h 250 251 numdef CHECKVALUE, 0 252 numdef SET_LOAD_SEG, 0 253 numdef SET_FAT_SEG, 0 254 numdef SET_CLUSTER, 0 255 256 numdef SET_DL_UNIT, 1 257 numdef SET_DSSI_DPT, 0 258 numdef PUSH_DPT, 1 259 numdef MEMORY_CONTINUE, 1 260 ; 4 sectors * 512 BpS should suffice. We load into 700h--7A00h, 261 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 262 numdef SET_DI_CLUSTER, 1 263 numdef DATASTART_HIDDEN,1 264 numdef LBA_SET_TYPE, 1 265 %endif 266 267 %if _COMPAT_MS6 268 strdef LOAD_NAME, "IO" 269 strdef LOAD_EXT, "SYS" 270 numdef LOAD_ADR, 00700h 271 numdef LOAD_MIN_PARA, paras(512) 272 numdef EXEC_SEG_ADJ, 0 273 numdef EXEC_OFS, 0 274 numdef LOAD_DIR_SEG, 50h 275 numdef ADD_SEARCH, 1 276 strdef ADD_NAME, "MSDOS" 277 strdef ADD_EXT, "SYS" 278 numdef ADD_DIR_SEG, 52h 279 ; Note: The IO.SYS directory entry must be stored at 280 ; 0:500h, and the MSDOS.SYS directory entry at 0:520h. 281 282 numdef CHECKVALUE, 0 283 numdef SET_LOAD_SEG, 0 284 numdef SET_FAT_SEG, 0 285 numdef SET_CLUSTER, 0 286 287 numdef SET_DL_UNIT, 1 288 numdef MEMORY_CONTINUE, 1 289 ; 3 sectors * 512 BpS should suffice. We load into 700h--7A00h, 290 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 291 numdef SET_AXBX_DATA, 1 292 numdef DATASTART_HIDDEN,1 293 numdef SET_DSSI_DPT, 1 294 numdef PUSH_DPT, 1 295 %endif 296 297 %if _COMPAT_LDOS 298 strdef LOAD_NAME, "LDOS" 299 strdef LOAD_EXT, "COM" 300 numdef LOAD_ADR, 02000h 301 numdef LOAD_MIN_PARA, paras(4096) 302 numdef EXEC_SEG_ADJ, 0 303 numdef EXEC_OFS, 400h 304 numdef CHECKOFFSET, 1020 305 numdef CHECKVALUE, "lD" 306 307 numdef SET_DL_UNIT, 0 308 numdef SET_CLUSTER, 1 309 numdef SET_FAT_SEG, 1 310 numdef SET_LOAD_SEG, 1 311 numdef MEMORY_CONTINUE, 1 312 numdef DATASTART_HIDDEN,0 313 %endif 314 315 %if _COMPAT_KERNEL7E 316 strdef OEM_NAME, "KERNEL7E" 317 strdef LOAD_NAME, "KERNEL7E" 318 strdef LOAD_EXT, "BIN" 319 numdef LOAD_ADR, 07E00h 320 numdef LOAD_MIN_PARA, paras(512) 321 numdef EXEC_SEG_ADJ, -7E0h 322 numdef EXEC_OFS, 7E00h 323 numdef CHECKVALUE, 0 324 325 numdef SET_DL_UNIT, 1 326 numdef SET_BL_UNIT, 0 327 numdef SET_CLUSTER, 0 328 numdef SET_FAT_SEG, 0 329 numdef SET_LOAD_SEG, 0 330 numdef MEMORY_CONTINUE, 0 331 numdef DATASTART_HIDDEN,0 332 333 gendef _ADR_FATBUF, 4000h 334 gendef _ADR_DIRBUF, 4000h 335 numdef RPL, 0 336 numdef ZERO_ES, 1 337 %endif 338 339 340 %if 0 341 342 Notes about partial load compatibilities 343 344 * FreeDOS: 345 * Relocates to an address other than 27A00h (1FE0h:7C00h) 346 * A lot of options between _USE_PART_INFO, _QUERY_GEOMETRY, _CHS, _LBA, 347 and/or _RPL need to be disabled to make the loader fit 348 * DR-DOS: 349 * Must enable _MEMORY_CONTINUE to load off file systems with cluster 350 sizes > 1 KiB (depending on file size) or >= 32 KiB (certainly) 351 * Will not load whole file if _MEMORY_CONTINUE is enabled and file 352 data exceeds 29 KiB, without erroring out. The new option called 353 _LOAD_CHECK_MAX_SIZE has been added to address this. However, it 354 won't fit without disabling some other options such as _LBA, _CHS, 355 _USE_PART_INFO, or _QUERY_GEOMETRY. 356 * Disables DPT, data start, and directory entry to 00500h options by 357 default so loading a faithful IBMDOS v4+ kernel will fail as msload 358 or lDOS iniload need these options to operate 359 * IBMDOS: 360 * MS-DOS 6: 361 * Does not actually relocate DPT, just provide its address 362 * A lot of options between _USE_PART_INFO, _QUERY_GEOMETRY, _CHS, 363 and/or _LBA need to be disabled to make the loader fit 364 * MS-DOS 7: 365 * Does not actually relocate DPT, just provide its address 366 * Does not contain message table used by loader 367 368 %endif 369 370 %if _SET_BL_UNIT && _SET_AXBX_DATA 371 %error Cannot select both of these options! 372 %endif 373 374 %if _DIR_ENTRY_520 375 %assign _DIR_ENTRY_500 1 376 %endif 377 378 %if _DIRBUF_500 && _ADD_SEARCH 379 %error Cannot select both of these options! 380 %endif 381 382 %if _ADD_SEARCH 383 %if _LOAD_DIR_SEG == 0 || _ADD_DIR_SEG == 0 384 %error Assuming dir segs should be set if add search set 385 %endif 386 %endif 387 388 %if _RPL 389 %assign _RPL_GRACE_AREA 0 390 %endif 391 392 393 %assign LOADLIMIT 0A0000h 394 %assign POSITION 07C00h 395 396 %if _FIX_SECTOR_SIZE 397 %assign i 5 398 %rep 13-5 399 %if (1 << i) != (_FIX_SECTOR_SIZE) 400 %assign i i+1 401 %endif 402 %endrep 403 %if (1 << i) != (_FIX_SECTOR_SIZE) 404 %error Invalid sector size _FIX_SECTOR_SIZE 405 %endif 406 %endif 407 408 %if _FIX_CLUSTER_SIZE 409 %if _FIX_CLUSTER_SIZE > 256 410 %error Invalid cluster size _FIX_CLUSTER_SIZE 411 %endif 412 %assign i 0 413 %rep 8-0 414 %if (1 << i) != (_FIX_CLUSTER_SIZE) 415 %assign i i+1 416 %endif 417 %endrep 418 %if (1 << i) != (_FIX_CLUSTER_SIZE) 419 %warning Non-power-of-two cluster size _FIX_CLUSTER_SIZE 420 %endif 421 %endif 422 423 424 ; Stack (default 512 Bytes minus the variables). 425 ADR_STACK_LOW equ 7C00h - _LOAD_STACK ; 07A00h (if _LOAD_STACK = 200h) 426 427 %if _DIRBUF_500 428 gendef _ADR_DIRBUF, 500h 429 %elif _RELOCATE 430 gendef _ADR_DIRBUF, _LOAD_ADR 431 %endif 432 433 ; one-sector directory buffer. Assumes sectors are no larger than 8 KiB 434 ADR_DIRBUF equ __ADR_DIRBUF 435 436 %if ! _RELOCATE 437 ; this used to be a two-sector FAT buffer -- two sectors because FAT12 438 ; entries are 12 bits and may straddle a sector boundary. 439 ; however, with the FAT12 loaded completely, the buffer only needs to hold 440 ; one 8 KiB sector, two 4 KiB sectors, three 2 KiB sectors, six 1 KiB sectors, 441 ; or twelve 512 byte sectors. 442 ; this shares its area with the directory buffer as they 443 ; are not simultaneously used. (if not _DIRBUF_500.) 444 ADR_FATBUF equ __ADR_FATBUF 445 %endif 446 447 ; start of unused memory after loader: 448 ADR_END equ end -start+7C00h 449 %if ! _RELOCATE 450 %if (ADR_FATBUF + 8192) > ADR_END 451 ADR_FREE_FROM equ (ADR_FATBUF + 8192) ; 09E00h 452 %else 453 ADR_FREE_FROM equ ADR_END ; 07E00h 454 %endif 455 456 ; end of unused memory before loader: 457 %if ADR_FATBUF < ADR_STACK_LOW 458 ADR_FREE_UNTIL equ ADR_FATBUF 459 %else 460 ADR_FREE_UNTIL equ ADR_STACK_LOW 461 %endif 462 463 %if ((ADR_FATBUF + 8192 - 1) & ~0FFFFh) != (ADR_FATBUF & ~0FFFFh) 464 %warning Possibly crossing 64 KiB boundary while reading FAT 465 %endif 466 %endif 467 468 %if ((ADR_DIRBUF + 8192 - 1) & ~0FFFFh) != (ADR_DIRBUF & ~0FFFFh) 469 %warning Possibly crossing 64 KiB boundary while reading directory 470 %endif 471 472 %if _RELOCATE 473 ADR_FREE_FROM equ 0 ; make next conditional true 474 ADR_FREE_UNTIL equ 0 475 %endif 476 %if _LOAD_ADR >= ADR_FREE_FROM 477 ; If reading on a sector size boundary, no crossing can occur. 478 ; Check for all possible sector sizes (32 B to 8 KiB). If one 479 ; of them fails display a warning, including the minimum size. 480 %assign SECSIZECHECK 32 481 %assign EXITREP 0 482 %rep 256 483 %ifn EXITREP 484 %if _LOAD_ADR & (SECSIZECHECK - 1) 485 %warning Possibly crossing 64 KiB boundary while reading file (sector size >= SECSIZECHECK) 486 %assign EXITREP 1 487 %exitrep 488 %endif 489 %if SECSIZECHECK == 8192 490 %assign EXITREP 1 491 %exitrep 492 %endif 493 %assign SECSIZECHECK SECSIZECHECK * 2 494 %endif 495 %endrep 496 %else 497 ; If loading below the boot sector, address 1_0000h is never reached. 498 %endif 499 500 501 %if (_LOAD_ADR & 0Fh) 502 %error Load address must be on a paragraph boundary 503 %endif 504 505 %if _LOAD_ADR > LOADLIMIT 506 %error Load address must be in LMA 507 %elif _LOAD_ADR < 00500h 508 %error Load address must not overlap IVT or BDA 509 %endif 510 511 %if ! _RELOCATE 512 %if _LOAD_ADR > (POSITION-512) && _LOAD_ADR < (POSITION+512) 513 %error Load address must not overlap loader 514 %endif 515 516 %if ADR_FATBUF > LOADLIMIT 517 %error FAT buffer address must be in LMA 518 %elif ADR_FATBUF < 00500h 519 %error FAT buffer address must not overlap IVT or BDA 520 %elif (ADR_FATBUF + 8192) > (POSITION-512) && ADR_FATBUF < (POSITION+512) 521 %error FAT buffer address must not overlap loader 522 %endif 523 %endif 524 525 %if ADR_DIRBUF > LOADLIMIT 526 %error Dir buffer address must be in LMA 527 %elif ADR_DIRBUF < 00500h 528 %error Dir buffer address must not overlap IVT or BDA 529 %elif (ADR_DIRBUF + 8192) > (POSITION-512) && ADR_DIRBUF < (POSITION+512) 530 %error Dir buffer address must not overlap loader at initial position 531 %endif 532 533 %if ((_EXEC_SEG_ADJ<<4)+_EXEC_OFS) < 0 534 %error Execution address must be in loaded file 535 %elif ((_EXEC_SEG_ADJ<<4)+_EXEC_OFS+_LOAD_ADR) > LOADLIMIT 536 %error Execution address must be in LMA 537 %endif 538 539 %if (_EXEC_OFS & ~0FFFFh) 540 %error Execution offset must fit into 16 bits 541 %endif 542 543 %if (_EXEC_SEG_ADJ > 0FFFFh || _EXEC_SEG_ADJ < -0FFFFh) 544 %error Execution segment adjustment must fit into 16 bits 545 %endif 546 547 548 %if !_CHS && _QUERY_GEOMETRY 549 %warning No CHS support but querying geometry anyway 550 %endif 551 552 %if !_CHS && !_LBA 553 %error Either CHS or LBA or both must be enabled 554 %endif 555 556 557 %if 0 558 559 There is some logic inside MS-DOS's hard disk partition initialisation 560 code that sets up several requirements for us to fulfil. Otherwise, 561 it will not accept the information given in the BPB (using default 562 information based on the length as specified by MBR/EPBR instead) or 563 make the whole file system inaccessible except for formatting. Both of 564 those are undesirable of course. Some/all(?) checks are documented on 565 pages 601,602 in "DOS Internals", Geoff Chappell 1994, as follows: 566 567 * First three bytes contain either "jmp sho xx\ nop" or "jmp ne xx". 568 * Media descriptor field >= 0F0h. 569 * Bytes per sector field == 512. 570 * Sectors per cluster field a power of 2 (1,2,4,8,16,32,64,128). 571 * OEM name "version" (last three to four characters) 572 * must be "20.?", "10.?" (? = wildcard), but no other with "0.?", 573 * otherwise, must be "2.0", or 574 * 2nd-to-last,3rd-to-last character codes together > "3.", or 575 * those == "3.", last character code > "0" 576 577 To stay compatible to those, display a warning here if the name 578 itself would disqualify our boot sector already. 579 580 %endif 581 582 %push 583 %strlen %$len _OEM_NAME_FILL 584 %if %$len != 1 585 %error Specified OEM name fill must be 1 character 586 %endif 587 %strlen %$len _OEM_NAME 588 %define %$nam _OEM_NAME 589 %if %$len > 8 590 %error Specified OEM name is too long 591 %else 592 %assign %$warn 0 593 %rep 8 - %$len 594 %strcat %$nam %$nam,_OEM_NAME_FILL 595 %endrep 596 %substr %$prefix %$nam 5 ; "wvxyZa.b", get "Z" 597 %substr %$major %$nam 6,7 ; "wvxyzA.b", get "A." 598 %substr %$minor %$nam 8 ; "wvxyza.B", get "B" 599 %if %$major == "0." 600 %ifn %$prefix == "1" || %$prefix == "2" 601 %assign %$warn 1 602 %endif 603 %elifn %$major == "2." && %$minor == "0" 604 %if %$major < "3." 605 %assign %$warn 1 606 %elif %$major == "3." && %$minor < "1" 607 %assign %$warn 1 608 %endif 609 %endif 610 %if %$warn 611 %warning Specified OEM name fails MS-DOS's validation 612 %endif 613 %endif 614 %pop 615 616 617 struc DIRENTRY 0 000050C0 ???????????????? deName: resb 8 0 000050C8 ?????? deExt: resb 3 0 000050CB ?? deAttrib: resb 1 0 000050CC ?? dePlusSize: resb 1 0 000050CD ?????????????? resb 7 0 000050D4 ???? deClusterHigh: resw 1 0 000050D6 ???? deTime: resw 1 0 000050D8 ???? deDate: resw 1 0 000050DA ???? deClusterLow: resw 1 0 000050DC ???????? deSize: resd 1 628 endstruc 629 630 ATTR_READONLY equ 1 631 ATTR_HIDDEN equ 2 632 ATTR_SYSTEM equ 4 633 ATTR_VOLLABEL equ 8 634 ATTR_DIRECTORY equ 10h 635 ATTR_ARCHIVE equ 20h 636 637 638 ; use byte-offset addressing from BP for smaller code 639 %define VAR(x) ((x) - start) + bp 640 641 642 cpu 8086 643 ; bootsector loaded at address 07C00h, addressable using 0000h:7C00h 644 org POSITION 645 start: 646 647 648 %define _LASTVARIABLE start 649 %macro nextvariable 2-3.nolist 650 %1 equ (_LASTVARIABLE - %2) 651 %define _LASTVARIABLE %1 652 %ifidn %3, relocatestart 653 %define _RELOCATESTART %1 654 %elifempty %3 655 %else 656 %error Invalid third parameter 657 %endif 658 %endmacro 659 660 ; Variables 661 662 ; (dword) sector where the first cluster's data starts 663 nextvariable data_start, 4 664 665 ; (word) current load segment (points behind last loaded data) 666 nextvariable load_seg, 2 667 668 ; (word) segment of FAT buffer 669 ; for FAT12 this holds the entire FAT 670 ; for FAT16 this holds the sector given by wo[fat_sector] 671 ; for FAT32 this holds the sector given by dwo[fat_sector] 672 nextvariable fat_seg, 2 673 674 ; (word for FAT16) currently loaded sector-in-FAT, -1 if none 675 nextvariable fat_sector, 4 676 677 ; (word for FAT12/FAT16) first cluster of load file 678 nextvariable first_cluster, 4, relocatestart 679 680 ADR_STACK_START equ _LASTVARIABLE -start+POSITION 681 682 %ifn _FIX_SECTOR_SIZE 683 ; (word) number of 16-byte paragraphs per sector 684 nextvariable para_per_sector, 2, relocatestart 685 %endif 686 687 %assign DIRSEARCHSTACK_CL_FIRST 0 688 %assign DIRSEARCHSTACK_CL_SECOND 0 689 %assign PLACEHOLDER 0 690 691 %if _ATTRIB_SAVE && ! (_ADD_SEARCH || _LOAD_DIR_SEG) 692 %if _LASTVARIABLE == start - 12h 693 %assign DIRSEARCHSTACK_CL_FIRST 1 694 %elif _LASTVARIABLE == start - 10h 695 %assign DIRSEARCHSTACK_CL_SECOND 1 696 %endif 697 %ifn _DIR_ENTRY_500 698 ; three words left on the stack after directory search 699 nextvariable dirsearchstack, 6, relocatestart 700 %else 701 ; two words left on the stack after directory search 702 nextvariable dirsearchstack, 4, relocatestart 703 %endif 704 %elifn !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL 705 %if _LASTVARIABLE == start - 12h 706 nextvariable cmdline_signature_placeholder, 2, relocatestart 707 %assign PLACEHOLDER 1 708 %elif _LASTVARIABLE == start - 10h 709 %if _PUSH_DPT 710 nextvariable cmdline_signature_placeholder, 4, relocatestart 711 %assign PLACEHOLDER 2 712 ; In this case, part of the original DPT pointer may 713 ; overlap the CL signature word. Therefore allocate 714 ; two placeholder words to insure no CL match. 715 %else 716 ; In this case the last_available_sector variable 717 ; will be at word [ss:bp - 12h] (or none) and the 718 ; stack pointer will be equal to bp - 12h (or - 10h) 719 ; at handover time. Thus no placeholder is needed. 720 %endif 721 %else 722 %error Placeholder not placed 723 %endif 724 ; This stack slot is used to insure that 725 ; the "CL" signature is not present at this 726 ; location. If not relocate and load address 727 ; is below loader then the next variable 728 ; (last_available_sector) will always receive 729 ; a value < 7C0h so cannot hold "CL". 730 ; If _ATTRIB_SAVE is in use and neither the 731 ; _ADD_SEARCH nor the _LOAD_DIR_SEG options 732 ; are set, the first word of dirsearchstack 733 ; will be at word [ss:bp - 14h]. 734 %endif 735 736 %ifn ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 737 ; (word) segment of last available memory for sector 738 nextvariable last_available_sector, 2 739 %else 740 %if _LASTVARIABLE == start - 12h 741 nextvariable cmdline_signature_placeholder, 2, relocatestart 742 %assign PLACEHOLDER 1 743 %elif _LASTVARIABLE == start - 10h 744 %if _PUSH_DPT 745 nextvariable cmdline_signature_placeholder, 4, relocatestart 746 %assign PLACEHOLDER 2 747 %endif 748 %endif 749 %endif 750 751 lowest_variable equ _LASTVARIABLE 752 753 0 000050C0 EB47 jmp strict short skip_bpb 755 %if !_CHS && _LBA_SET_TYPE 756 db 0Eh ; LBA-enabled FAT16 FS partition type 757 %else 0 000050C2 90 nop ; default: no LBA 759 %endif 760 761 762 ; BIOS Parameter Block (BPB) 763 ; 764 ; Installation will use the BPB already present in your file system. 765 ; These values must be initialised when installing the loader. 766 ; 767 ; The values shown here work only with 1440 KiB disks (CHS=80:2:18) 768 769 oem_id: ; offset 03h (03) - not used by this code 0 000050C3 202020206C444F53 fill 8,_OEM_NAME_FILL,db _OEM_NAME 771 bytes_per_sector: ; offset 0Bh (11) - refer to _FIX_SECTOR_SIZE ! 0 000050CB 0002 dw _BPS 773 sectors_per_cluster: ; offset 0Dh (13) - refer to _FIX_CLUSTER_SIZE ! 0 000050CD 01 db _SPC & 255 775 fat_start: 776 num_reserved_sectors: ; offset 0Eh (14) 0 000050CE 0100 dw _NUMRESERVED 778 num_fats: ; offset 10h (16) 0 000050D0 02 db _NUMFATS 780 num_root_dir_ents: ; offset 11h (17) 0 000050D1 E000 dw _NUMROOT 782 total_sectors: ; offset 13h (19) - not used by this code 783 %if _SPI < 1_0000h 0 000050D3 400B dw _SPI 785 %else 786 dw 0 787 %endif 788 media_id: ; offset 15h (21) - not used by this code 0 000050D5 F0 db _MEDIAID 790 sectors_per_fat: ; offset 16h (22) 0 000050D6 0900 dw _SPF 792 sectors_per_track: ; offset 18h (24) 0 000050D8 1200 dw _CHS_SECTORS 794 heads: ; offset 1Ah (26) 0 000050DA 0200 dw _CHS_HEADS 796 hidden_sectors: ; offset 1Ch (28) 0 000050DC 00000000 dd _HIDDEN 798 total_sectors_large: ; offset 20h (32) - not used by this code 799 %if _SPI >= 1_0000h 800 dd _SPI 801 %else 0 000050E0 00000000 dd 0 803 %endif 804 805 ; Extended BPB 806 0 000050E4 00 boot_unit: db _UNIT 0 000050E5 00 db 0 0 000050E6 29 ext_bpb_signature: db 29h 0 000050E7 00000000 serial_number: dd _VOLUMEID 0 000050EB 6C444F5320 volume_label: fill 11,32,db _DEFAULT_LABEL 0 000050F6 464154313220 filesystem_identifier: fill 8,32,db "FAT1",'2'+4*!!_FAT16 0 000050F6 813 814 815 ; Initialised data 816 817 load_name: 0 000050FE 4C444F5320 fill 8,32,db _LOAD_NAME 0 00005106 434F4D fill 3,32,db _LOAD_EXT 820 %if _ADD_SEARCH 821 add_name: 822 fill 8,32,db _ADD_NAME 823 fill 3,32,db _ADD_EXT 824 825 ; align 2 826 ; This happens to be aligned anyway. But even if 827 ; it didn't, we'd rather save that byte than use 828 ; it to align these fields. So comment this out. 829 dirseg: 830 dw _ADD_DIR_SEG 831 %endif 832 833 834 numdef TMPINC, 0 835 836 %if _TMPINC 837 [list -] 1211 %endif 1212 1213 %if _WARN_PART_SIZE 1214 %assign num $ - start 1215 %warning BPB + data size is num bytes 1216 %endif 1217 1218 1219 ; Code 1220 1221 skip_bpb: 0 00005109 FA cli 0 0000510A FC cld 0 0000510B 31C9 xor cx, cx 0 0000510D BD[0000] mov bp, start ; magic bytes - checked by instsect 0 00005110 8ED1 mov ss, cx 0 00005112 BCF07B mov sp, ADR_STACK_START 1228 %if _USE_AUTO_UNIT 0 00005115 885624 mov [VAR(boot_unit)], dl; magic bytes - checked by instsect 1230 %else 1231 mov dl, [VAR(boot_unit)]; magic bytes - checked by instsect 1232 %endif 1233 1234 ; Note: es is left uninitialised here until the first call to 1235 ; read_sector if the below conditional is false. 1236 %if _USE_PART_INFO ; +19 bytes 0 00005118 8EC1 mov es, cx 1238 ; Note: Award Medallion BIOS v6.0 (ASUS MED 2001 ACPI BIOS Revision 1009) 1239 ; loads from a floppy disk drive with ds:si = 0F000h:0A92Dh -> 1240 ; FF FF FF FF 08 00 08 01 FF FF FF FF FF FF FF FF, which was detected 1241 ; as a valid partition table entry by this handling. Therefore, we 1242 ; only accept partition information when booting from a hard disk now. 1243 1244 ; start of magic byte sequence for instsect 0 0000511A 84D2 test dl, dl ; floppy ? 0 0000511C 7911 jns @F ; don't attempt detection --> 1247 ; Check whether an MBR left us partition information. 1248 ; byte[ds:si] bit 7 means active and must be set if valid. 0 0000511E 380C cmp byte [si], cl ; flags for xx-00h (result is xx), SF = bit 7 0 00005120 790D jns @F ; xx < 80h, ie info invalid --> 1251 ; byte[ds:si+4] is the file system type. Check for valid one. 0 00005122 384C04 cmp byte [si+4], cl ; is it zero? 0 00005125 7408 je @F ; yes, info invalid --> 1254 ; Info valid, trust their hidden sectors over hardcoded. 1255 ; Assume the movsw instructions won't run with si = FFFFh. 0 00005127 BF[1C00] mov di, hidden_sectors ; -> BPB field 0 0000512A 83C608 add si, 8 ; -> partition start sector in info 1258 %if _USE_PART_INFO_DISABLED 1259 nop 1260 nop ; size has to match enabled code 1261 %else 0 0000512D A5 movsw 0 0000512E A5 movsw ; overwrite BPB field with value from info 1264 %endif 1265 @@: 1266 ; end of magic byte sequence for instsect 1267 %endif 0 0000512F 8ED9 mov ds, cx 0 00005131 FB sti 1270 1271 1272 ; Note: The int 13h function 08h call may change or 1273 ; set ax, bx, cx, dx, es, di. es is left as 1274 ; indeterminate until the first call to 1275 ; read_sector to read the root directory. 1276 %if _QUERY_GEOMETRY ; +27 bytes 1277 1278 ; start of magic byte sequence for instsect 1279 ; test dl, dl ; floppy? 1280 ; jns @F ; don't attempt query, might fail --> 1281 ; Note that while the original PC BIOS doesn't support this function 1282 ; (for its diskettes), it does properly return the error code 01h. 1283 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 00005132 B408 mov ah, 08h 1285 ; xor cx, cx ; initialise cl to 0 1286 ; Already from prologue cx = 0. 0 00005134 F9 stc ; initialise to CY 1288 %if _QUERY_GEOMETRY_DISABLED 1289 nop 1290 nop ; size has to match enabled code 1291 %else 0 00005135 CD13 int 13h ; query drive geometry 1293 %endif 0 00005137 720E jc @F ; apparently failed --> 0 00005139 83E13F and cx, 3Fh ; get sectors 0 0000513C 7409 jz @F ; invalid (S is 1-based), don't use --> 0 0000513E 894E18 mov [VAR(sectors_per_track)], cx 0 00005141 88F1 mov cl, dh ; cx = maximum head number 0 00005143 41 inc cx ; cx = number of heads (H is 0-based) 0 00005144 894E1A mov [VAR(heads)], cx 1301 @@: 1302 ; end of magic byte sequence for instsect 1303 %endif 1304 1305 %if _FIX_SECTOR_SIZE 1306 %if !_FIX_SECTOR_SIZE_SKIP_CHECK 1307 cmp word [VAR(bytes_per_sector)], _FIX_SECTOR_SIZE 1308 mov al, 'S' 1309 jne error 1310 %endif 1311 mov bx, _FIX_SECTOR_SIZE >> 5 1312 %if _FIX_CLUSTER_SIZE 1313 %if !_FIX_CLUSTER_SIZE_SKIP_CHECK 1314 cmp byte [VAR(sectors_per_cluster)], _FIX_CLUSTER_SIZE & 0FFh 1315 mov al, 'C' 1316 jne error 1317 %endif 1318 %endif 1319 mov ch, 0 ; ! ch = 0 1320 %else 1321 ; 16-byte paragraphs per sector 0 00005147 8B5E0B mov bx,[VAR(bytes_per_sector)] 0 0000514A B90400 mov cx,4 ; ! ch = 0 0 0000514D D3EB shr bx,cl 1325 %if _FIX_CLUSTER_SIZE 1326 %if !_FIX_CLUSTER_SIZE_SKIP_CHECK 1327 cmp byte [VAR(sectors_per_cluster)], _FIX_CLUSTER_SIZE & 0FFh 1328 mov al, 'C' 1329 jne error 1330 %endif 1331 %else 1332 ; ! ch = 0 1333 %endif 0 0000514F 53 push bx ; push into word [VAR(para_per_sector)] 1335 1336 ; 32-byte FAT directory entries per sector 0 00005150 D1EB shr bx, 1 ; /2 = 32-byte entries per sector 1338 %endif 1339 1340 %if _WARN_PART_SIZE 1341 %assign num $ - skip_bpb 1342 %warning init size is num bytes 1343 %endif 1344 1345 1346 dirsearch_start: 1347 1348 ; number of sectors used for root directory (store in CX) 0 00005152 8B7611 mov si, [VAR(num_root_dir_ents)] 0 00005155 89D8 mov ax, bx 1351 ; The ax value here is the last value of bx, which is set 1352 ; by the shr instruction. Therefore, it cannot be higher 1353 ; than 7FFFh, so this cwd instruction always zeros dx. 0 00005157 99 cwd 0 00005158 48 dec ax ; rounding up 0 00005159 01F0 add ax, si ; from BPB 0 0000515B 11D2 adc dx, dx ; account for overflow (dx was zero) 0 0000515D F7F3 div bx ; get number of root sectors 0 0000515F 91 xchg ax, cx ; cx = number of root secs, ! ah = 0 1360 1361 ; first sector of root directory 0 00005160 8A4610 mov al,[VAR(num_fats)] ; ! ah = 0, hence ax = number of FATs 0 00005163 F76616 mul word [VAR(sectors_per_fat)] 0 00005166 03460E add ax,[VAR(num_reserved_sectors)] 0 00005169 10F2 adc dl, dh ; account for overflow (dh was and is 0) 1366 0 0000516B 31FF xor di, di 1368 1369 ; first sector of disk data area: 0 0000516D 01C1 add cx, ax 0 0000516F 11D7 adc di, dx 0 00005171 894EFC mov [VAR(data_start)], cx 0 00005174 897EFE mov [VAR(data_start+2)], di 1374 1375 next_dir_search: 1376 %if _ADD_SEARCH 1377 push dx 1378 push ax 1379 push si 1380 %endif 1381 1382 ; Scan root directory for file. We don't bother to check for deleted 1383 ; entries (E5h) or entries that mark the end of the directory (00h). 1384 ; number of root entries in si here 1385 next_sect: 0 00005177 89D9 mov cx, bx ; entries per sector as loop counter 1387 %if ! _RELOCATE 1388 %if ADR_DIRBUF == ADR_FATBUF 0 00005179 E8AF00 call read_sector_dirbuf 1390 %else 1391 mov bx, ADR_DIRBUF>>4 1392 call read_sector 1393 %endif 1394 %else 1395 mov bx, ADR_DIRBUF>>4 1396 call read_sector 1397 %endif 0 0000517C 89CB mov bx, cx ; restore bx for next iteration later 1399 0 0000517E 31FF xor di, di ; es:di-> first entry in this sector 1401 next_ent: 1402 %if DIRSEARCHSTACK_CL_FIRST 1403 push cx ; first dirsearchstack word = entries-in-sector 1404 push si ; other: entries total 1405 %else 0 00005180 56 push si 0 00005181 51 push cx ; second dirsearchstack word = entries-in-sector 1408 %endif 0 00005182 57 push di ; dirsearchstack 1410 %if _CHECK_ATTRIB && ! _ATTRIB_SAVE 1411 test byte [es:di + deAttrib], ATTR_DIRECTORY | ATTR_VOLLABEL 1412 jnz @F ; directory, label, or LFN entry --> (NZ) 1413 %endif 1414 %if _ADD_SEARCH 1415 mov si, add_name 1416 filename equ $ - 2 ; SMC to update to load_name later 1417 %else 0 00005183 BE[3E00] mov si, load_name ; ds:si-> name to match 1419 %endif 0 00005186 B90B00 mov cx, 11 ; length of padded 8.3 FAT filename 0 00005189 F3A6 repe cmpsb ; check entry 1422 %if _ATTRIB_SAVE 1423 %if _CHECK_ATTRIB 1424 jnz @F 1425 ; deAttrib == 11, right after the 11-byte name 1426 test byte [es:di], ATTR_DIRECTORY | ATTR_VOLLABEL 1427 ; directory, label, or LFN entry ? 1428 %endif 1429 jz found_it ; found entry --> 1430 %endif 1431 @@: 0 0000518B 5F pop di 1433 %if DIRSEARCHSTACK_CL_FIRST 1434 pop si 1435 pop cx ; pop from dirsearchstack 1436 %else 0 0000518C 59 pop cx 0 0000518D 5E pop si ; pop from dirsearchstack 1439 %endif 0 0000518E 8D7D20 lea di, [di + DIRENTRY_size] 1441 %if ! _ATTRIB_SAVE 0 00005191 7409 jz found_it ; found entry --> 1443 %endif 1444 0 00005193 4E dec si ; count down entire root's entries 0 00005194 E0EA loopnz next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 0 00005196 75DF jnz next_sect ; (jumps iff si >0 && cx ==0) 1448 ; ends up here iff si ==0 1449 ; ie all root entries checked unsuccessfully 1450 %if 0 1451 1452 qemu prior to 2020-08 has a bug which affects the above 1453 conditionals. The bug is that if NZ is set (like when the 1454 branch to the label found_it is not taken) and then another 1455 instruction sets ZR (like the dec si at the end of the root 1456 directory) and then loopnz is used which sets cx to zero 1457 then after the loopnz FL will be NZ leading to the jnz branch 1458 to be taken. Eventually the entire load unit is traversed and 1459 qemu returns error 01h when trying to read past the end of 1460 the unit (at least for 1440 KiB diskettes). 1461 1462 The bug can be worked around in two ways as done by lDebug: 1463 1464 https://hg.pushbx.org/ecm/ldebug/rev/c95e2955bbca 1465 1466 https://hg.pushbx.org/ecm/ldebug/rev/c84047f15d9c 1467 1468 However, both cost a few bytes each. Therefore the proper 1469 fix is considered to be updating qemu. Error behaviour occurs 1470 when a file is not found. In an unlikely case, another sector 1471 in the data area may hold a match for the searched entry. 1472 Otherwise, the read eventually fails and the loader aborts 1473 with an R error (instead of the expected F error). 1474 1475 Reference: https://bugs.launchpad.net/qemu/+bug/1888165 1476 1477 %endif 1478 0 00005198 B046 mov al,'F' ; File not 'F'ound 0 0000519A EB7B jmp error 1481 1482 found_it: 1483 %if _ADD_SEARCH || _LOAD_DIR_SEG 1484 %if _ATTRIB_SAVE 1485 pop di ; es:di -> dir entry (pop from dirsearchstack) 1486 %endif 1487 mov cx, 32 1488 mov ax, _LOAD_DIR_SEG 1489 %if ! _ATTRIB_SAVE 1490 sub di, cx ; es:di -> dir entry 1491 %endif 1492 %if _ADD_SEARCH 1493 xchg ax, word [VAR(dirseg)] 1494 %endif 1495 push ds 1496 mov si, di 1497 push di 1498 push es 1499 pop ds ; ds:si -> dir entry 1500 mov es, ax 1501 xor di, di ; es:di -> destination 1502 rep movsb ; store dir entry 1503 push ds 1504 pop es 1505 pop di ; restore es:di -> dir entry 1506 pop ds 1507 %if _ADD_SEARCH 1508 %if ((load_name - start) & 0FF00h) == ((add_name - start) & 0FF00h) 1509 mov byte [VAR(filename)], (load_name - start + 7C00h) & 255 1510 %else 1511 mov word [VAR(filename)], load_name 1512 %endif 1513 ; update name to second iteration's 1514 %if (_LOAD_DIR_SEG & 255) != (_ADD_DIR_SEG & 255) 1515 cmp al, _ADD_DIR_SEG & 255 1516 %elif (_LOAD_DIR_SEG) != (_ADD_DIR_SEG) 1517 cmp ax, _ADD_DIR_SEG ; was first iteration ? 1518 %else 1519 %error Must not store directory entries to same segment 1520 %endif 1521 %if _ATTRIB_SAVE 1522 pop si ; discard cx/si 1523 pop si ; discard si/cx (dirsearchstack) 1524 %endif 1525 pop si 1526 pop ax 1527 pop dx ; restore root start and count 1528 ; (bx still holds entries per sector) 1529 je next_dir_search ; jump to search load file next --> 1530 %endif 1531 times PLACEHOLDER push bx 1532 ; push into cmdline_signature_placeholder 1533 %if _RELOCATE 1534 push word [es:di + deClusterLow] 1535 ; (word on stack) = first cluster number 1536 %endif 1537 %else 1538 %if _DIR_ENTRY_500 ; +24 bytes, probably 1539 mov cx, 32 1540 %if _ATTRIB_SAVE 1541 pop si ; es:si -> dir entry (pop from dirsearchstack) 1542 %else 1543 xchg si, di 1544 sub si, cx 1545 %endif 1546 push ds 1547 push es 1548 push es 1549 pop ds ; ds:si -> directory entry 1550 xor ax, ax 1551 mov es, ax 1552 mov di, 500h ; es:di -> 0:500h 1553 %if _DIR_ENTRY_520 1554 rep movsw ; move to here (two directory entries) 1555 %else 1556 rep movsb ; move to here 1557 %endif 1558 pop es 1559 pop ds 1560 xchg si, di ; es:di -> behind (second) directory entry 1561 %endif 1562 times PLACEHOLDER push bx 1563 ; push into cmdline_signature_placeholder 1564 ; Push the entries per sector value into this 1565 ; stack slot to ensure that it does not hold "CL". 1566 %if _RELOCATE 1567 %if _DIR_ENTRY_500 || !_ATTRIB_SAVE 1568 push word [es:di + deClusterLow - DIRENTRY_size - (DIRENTRY_size * !!_DIR_ENTRY_520)] 1570 ; (word on stack) = first cluster number 1571 %else 1572 push word [es:di + deClusterLow - (deName + 11)] 1573 ; (word on stack) = first cluster number 1574 %endif 1575 %endif 1576 %endif 1577 1578 %if _WARN_PART_SIZE 1579 %assign num $ - dirsearch_start 1580 %warning dirsearch size is num bytes 1581 %endif 1582 1583 1584 %if _RELOCATE || _LOAD_ADR >= ADR_FREE_FROM 1585 memory_start: 1586 ; Get conventional memory size and store it 1587 int 12h 1588 mov cl, 6 1589 shl ax, cl 1590 %if _RPL ; +31 bytes 1591 xchg dx, ax 1592 lds si, [4 * 2Fh] 1593 add si, 3 1594 lodsb 1595 cmp al, 'R' 1596 jne .no_rpl 1597 lodsb 1598 cmp al, 'P' 1599 jne .no_rpl 1600 lodsb 1601 cmp al, 'L' 1602 jne .no_rpl 1603 mov ax, 4A06h 1604 int 2Fh 1605 .no_rpl: 1606 push ss 1607 pop ds 1608 xchg ax, dx 1609 %endif 1610 %if _RELOCATE 1611 %if _LOAD_NON_FAT 1612 sub ax, (_RPL_GRACE_AREA + 20 * 1024 + 512 + 7C00h) >> 4 1614 %else 1615 sub ax, (_RPL_GRACE_AREA + 20 * 1024 + 8192 + (8192-16) + 512 + 7C00h) >> 4 1617 %endif 1618 ; RPL grace area preserved for RPL 1619 ; 20 KiB: reserved for iniload 1620 ; 8 KiB: FAT buffer 1621 ; 8 KiB - 16 B: to allow rounding down FAT buffer position 1622 ; 512: sector 1623 ; 7C00h: stack and to allow addressing with 7C00h in bp 1624 ; 1625 ; Note also that by addressing the stack and sector 1626 ; with bp at 7C00h, and insuring this subtraction doesn't 1627 ; underflow, makes sure that we do not overwrite the IVT or 1628 ; BDA. (However, we assume that ax is at least 60h or so.) 1629 ; 1630 ; The FAT buffer segment is masked so that the actual buffer 1631 ; is stored on an 8 KiB boundary. This is to ensure that 1632 ; the buffer doesn't possibly cross a 64 KiB DMA boundary. 1633 jc .error_memory_j_CY 1634 cmp ax, (end -start+7C00h - ADR_STACK_LOW + 15) >> 4 1635 ; This check is to ensure that the start of the destination 1636 ; for the relocation (stack, sector) is 1637 ; above-or-equal the end of the source for the relocation. 1638 ; That is, to avoid overwriting any of the source with the 1639 ; string move instruction (which for simplicity is always UP). 1640 .error_memory_j_CY: 1641 jb error_memory 1642 %if ! _LOAD_NON_FAT 1643 mov bx, ((8192 - 16) + 512 + 7C00h)>>4 1644 add bx, ax 1645 ; this is like calculating the following for the bx value: 1646 ; ((LMA_top - 20 KiB - 8 KiB - (8 KiB - 16 B) - 512 - 7C00h) + ; ((8 KiB - 16 B) + 512 + 7C00h))>>4 1648 ; == (LMA_top - 20 KiB - 8 KiB)>>4 1649 and bx, ~ ((8192>>4) - 1) 1650 mov word [VAR(fat_seg)], bx 1651 %endif 1652 1653 mov di, relocated 1654 push ax 1655 push di ; -> relocation target label relocated 1656 ; (We cannot use a near call here to push the target IP 1657 ; because we do not control whether the ROM-BIOS loader 1658 ; entered us at 0:7C00h or 7C0h:0. So we need to create 1659 ; the correct offset manually here.) 1660 1661 mov es, ax ; => destination 1662 mov si, sp ; ds:si = ss:_RELOCATESTART - 2 - 4 1663 mov di, si ; es:di -> destination for stack low 1664 mov cx, (end - (_RELOCATESTART - 2 - 4)) >> 1 1665 ; end is the top of used memory 1666 ; _RELOCATESTART is the lowest filled stack frame slot 1667 ; 2 is for the first cluster word on the stack 1668 ; 4 is for the additional slots taken by the return address 1669 rep movsw ; relocate stack, sector 1670 retf ; jump to relocated code 1671 1672 %if _WARN_PART_SIZE 1673 %assign num $ - memory_start 1674 %warning memory size is num bytes 1675 %endif 1676 1677 1678 readhandler 1679 1680 errorhandler 1681 1682 1683 relocated: 1684 mov ss, ax 1685 mov ds, ax ; relocate these 1686 add ax, (ADR_STACK_LOW) >> 4 ; (rounding down) => behind available 1687 1688 pop si 1689 %else 1690 sub ax, (_RPL_GRACE_AREA + 20 * 1024) >> 4 1691 ; RPL grace area, plus 1692 ; 20 KiB reserved for iniload 1693 jb error_memory 1694 %endif 1695 %elif _LOAD_ADR < ADR_FREE_UNTIL 1696 %if !_FIX_SECTOR_SIZE 0 0000519C B8A007 mov ax, ADR_FREE_UNTIL >> 4 ; rounding *down* 1698 %endif 1699 %else 1700 %error Load address within used memory 1701 %endif 1702 %if ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 1703 ; user of last_available_sector will hardcode the value! 1704 %else 1705 %if _FIX_SECTOR_SIZE 1706 sub ax, _FIX_SECTOR_SIZE >> 4 1707 %else 1708 %if _LOAD_CHECK_MAX_SIZE 1709 %if _RELOCATE 1710 %error Combination not implemented yet 1711 %else 1712 mov si, [VAR(para_per_sector)] 1713 sub ax, si 1714 %endif 1715 %else 0 0000519F 2B46EE sub ax, [VAR(para_per_sector)] 1717 %endif 1718 %endif 0 000051A2 50 push ax ; push into word [VAR(last_available_sector)] 1720 %endif 1721 %if _LOAD_CHECK_MAX_SIZE 1722 %if !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 1723 %if _LOAD_CHECK_MAX_SIZE_FATPLUS 1724 ; check FAT+ size bits 1725 test byte [es:di + dePlusSize + DIRADJUST], 0E7h 1726 ; test whether bits 7-5 and 2-0 NZ 1727 jnz error_memory 1728 %endif 1729 cmp word [es:di + deSize + 2 + DIRADJUST], 0 1730 jne error_memory 1731 cmp word [es:di + deSize + DIRADJUST], (((ADR_FREE_UNTIL >> 4) - (_LOAD_ADR >> 4)) & ~ ((_FIX_SECTOR_SIZE >> 4) - 1)) << 4 1734 ja error_memory 1735 %else 1736 %if !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL 1737 mov ax, (ADR_FREE_UNTIL >> 4) - (_LOAD_ADR >> 4) 1738 %else 1739 add ax, si 1740 sub ax, _LOAD_ADR >> 4 1741 %endif 1742 ; ax = how many paragraphs available 1743 dec si ; para per sector minus 1 1744 not si ; mask to round down to sector 1745 and ax, si ; how many paragraphs can be read 1746 mov dx, word [es:di + deSize + DIRADJUST] 1747 %if _LOAD_CHECK_MAX_SIZE_FATPLUS 1748 ; check FAT+ size bits 1749 test byte [es:di + dePlusSize + DIRADJUST], 0E7h 1750 ; test whether bits 7-5 and 2-0 NZ 1751 jnz error_memory 1752 %endif 1753 %if !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL 1754 cmp word [es:di + deSize + 2 + DIRADJUST], 0 1755 jne error_memory 1756 add dx, 15 1757 jc error_memory_CY 1758 mov cl, 4 1759 shr dx, cl 1760 %else 1761 mov si, word [es:di + deSize + 2 + DIRADJUST] 1762 add dx, 15 1763 adc si, 0 1764 jc error_memory_CY 1765 mov cx, 4 1766 @@: 1767 shr si, 1 1768 rcr dx, 1 1769 loop @B 1770 test si, si 1771 jnz error_memory 1772 %endif 1773 cmp ax, dx 1774 error_memory_CY: 1775 jb error_memory 1776 %endif 1777 %endif 1778 1779 read_fat_start: 1780 ; get starting cluster of file 1781 %if ! _RELOCATE 1782 %if _ADD_SEARCH || _LOAD_DIR_SEG 1783 DIRADJUST equ 0 1784 %elif _ATTRIB_SAVE && ! _DIR_ENTRY_500 1785 DIRADJUST equ - deAttrib 1786 %else 1787 DIRADJUST equ - DIRENTRY_size - (DIRENTRY_size * !!_DIR_ENTRY_520) 1788 %endif 0 000051A3 268B75FA mov si,[es:di + deClusterLow + DIRADJUST] 1790 %elif _LOAD_CHECK_MAX_SIZE 1791 DIRADJUST equ 0 ; placeholder to avoid confusing error 1792 %error Combination not implemented yet 1793 %endif 1794 %if _SET_CLUSTER 0 000051A7 8976F0 mov word [VAR(first_cluster)], si 1796 %endif 1797 %if _SET_DI_CLUSTER 1798 push si ; remember cluster for later 1799 %endif 1800 1801 %if !_FAT16 && !_LOAD_NON_FAT 1802 ; Load the entire FAT into memory. This is easily feasible for FAT12, 1803 ; as the FAT can only contain at most 4096 entries. 1804 ; (The exact condition should be "at most 4087 entries", or with a 1805 ; specific FF7h semantic, "at most 4088 entries"; the more reliable 1806 ; and portable alternative would be "at most 4080 entries".) 1807 ; Thus, no more than 6 KiB need to be read, even though the FAT size 1808 ; as indicated by word[sectors_per_fat] could be much higher. The 1809 ; first loop condition below is to correctly handle the latter case. 1810 ; (Sector size is assumed to be a power of two between 32 and 8192 1811 ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 1812 ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 1813 ; of memory instead of only the relevant 6 KiB. This is always true 1814 ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 1815 ; iff word[sectors_per_fat] is higher than one.) 0 000051AA BF0018 mov di, 6 << 10 ; maximum size of FAT12 to load 0 000051AD 8B4E16 mov cx, [VAR(sectors_per_fat)] 1818 ; maximum size of this FS's FAT 1819 %if ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && !_FIX_SECTOR_SIZE 1820 ; Under these conditions, ax here is 1821 ; below ADR_FREE_UNTIL >> 4 so the 1822 ; following cwd instruction zeros dx. 0 000051B0 99 cwd 1824 %else 1825 xor dx, dx 1826 %endif 0 000051B1 8B460E mov ax, [VAR(fat_start)]; = first FAT sector 1828 %if _RELOCATE 1829 ; bx already = FAT buffer segment here 1830 %else 0 000051B4 BBE007 mov bx, ADR_FATBUF>>4 1832 %if _SET_FAT_SEG 0 000051B7 895EF8 mov word [VAR(fat_seg)], bx 1834 %endif 1835 %endif 1836 @@: 0 000051BA E87100 call read_sector ; read next FAT sector 1838 %if _FIX_SECTOR_SIZE 1839 sub di, _FIX_SECTOR_SIZE 1840 %else 0 000051BD 2B7E0B sub di, [VAR(bytes_per_sector)] 1842 %endif 1843 ; di = bytes still left to read 0 000051C0 7602 jbe @F ; if none --> 1845 ; (jbe means jump if CF || ZF) 0 000051C2 E2F6 loop @B ; if any FAT sector still remains --> 1847 @@: ; one of the limits reached; FAT read 1848 %endif 1849 0 000051C4 BB0002 mov bx, _LOAD_ADR>>4 ; => load address 1851 %if _FAT16 && !_LOAD_NON_FAT 1852 mov di, -1 ; = no FAT sector read yet 1853 %if _SET_FAT_SEG && _SET_FAT_SEG_NORMAL 1854 ; This is not strictly needed because a FAT sector is 1855 ; read in any case, initialising this variable later. 1856 mov word [VAR(fat_sector)], di 1857 %endif 1858 %endif 1859 %if _LOAD_NON_FAT 1860 %if _SET_FAT_SEG 1861 %if _FAT16 1862 or word [VAR(fat_sector)], -1 1863 %else 1864 and word [VAR(fat_seg)], 0 1865 %endif 1866 %endif 1867 %endif 1868 1869 next_cluster: 1870 ; convert 16-bit cluster value (in SI) to 32-bit LBA sector value (in DX:AX) 1871 ; and get next cluster in SI 1872 1873 1874 ; Converts cluster number to sector number 1875 ; and finds next cluster in chain 1876 ; 1877 ; INP: si = valid cluster number 1878 ; (!_FAT16) [ADR_FATBUF] = entire FAT as read from FS 1879 ; (_FAT16) di = currently buffered FAT sector, -1 if none 1880 ; OUT: If unable to read a FAT sector, 1881 ; ! jumps to error instead of returning 1882 ; If everything is okay, 1883 ; si = next cluster number (or EOC value) 1884 ; dx:ax = sector number 1885 ; (_FAT16) di = currently buffered FAT sector 1886 ; CHG: cx 1887 1888 %if ! _LOAD_NON_FAT 1889 ; prepare to load entry from FAT 1890 1891 %if _FAT16 1892 push si ; preserve cluster number for later 1893 1894 ; Multiply cluster number by 2. 1895 xchg ax, si 1896 ; xor dx, dx ; dx:ax = entry to load (0..FFF6h) 1897 ; add ax, ax 1898 ; adc dx, dx ; dx:ax = byte offset into FAT (0..131052) 1899 cwd ; dx = FFFFh if ax >= 8000h, else = 0 1900 add ax, ax ; ax = (2 * ax) & FFFFh 1901 neg dx ; dx = 1 if 2 * ax overflowed, else = 0 1902 1903 ; Divide by sector size to split dx:ax into the remainder as the byte offset 1904 ; into the FAT sector, and quotient as the sector offset into the FAT. 1905 div word [VAR(bytes_per_sector)] 1906 mov si, dx ; = byte offset in sector 1907 ; dx = byte offset into sector (0..8190) 1908 ; ax = sector offset into FAT (0..4095) 1909 1910 ; quotient in AX is FAT sector. 1911 ; check the FAT buffer to see if this sector is already loaded 1912 ; (simple disk cache; speeds things up a little -- 1913 ; actually, it speeds things up a lot) 1914 cmp ax, di 1915 je @F 1916 mov di, ax 1917 %if _SET_FAT_SEG 1918 mov word [VAR(fat_sector)], ax 1919 %endif 1920 1921 ; read the target FAT sector. 1922 push bx 1923 ; As noted above, the sector offset in ax here is 1924 ; 0..4095 (ie, 4 Ki S * 32 B/S = 128 KiB of FAT data), 1925 ; therefore this cwd instruction always zeros dx. 1926 cwd 1927 add ax, [VAR(fat_start)] 1928 adc dx, dx ; (account for overflow) 1929 %if _RELOCATE 1930 mov bx, word [VAR(fat_seg)] 1931 call read_sector 1932 %else 1933 call read_sector_fatbuf 1934 %endif 1935 pop bx 1936 @@: 1937 1938 ; get 16 bits from FAT 1939 es lodsw 1940 xchg ax, si 1941 pop ax ; restore cluster number 1942 %else 1943 ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 1944 ; so multiply cluster number by 3 first, then divide by 2. 0 000051C7 89F0 mov ax, si ; = cluster number (up to 12 bits set) 1946 ; (remember cluster number in ax) 0 000051C9 D1E6 shl si, 1 ; = 2n (up to 13 bits set) 0 000051CB 01C6 add si, ax ; = 2n+n = 3n (up to 14 bits set) 0 000051CD D1EE shr si, 1 ; si = byte offset into FAT (0..6129) 1950 ; CF = whether to use high 12 bits 1951 %if _RELOCATE 1952 mov es, word [VAR(fat_seg)] 1953 ; es lodsw 1954 ; xchg ax, si 1955 mov si, word [es:si] 1956 %else 1957 ; Use the calculated byte offset as an offset into the FAT 1958 ; buffer, which holds all of the FAT's relevant data. 1959 ; lea si, [ADR_FATBUF + si] 1960 ; -> 16-bit word in FAT to load 1961 ; get 16 bits from FAT 1962 ; lodsw 1963 ; xchg ax, si 0 000051CF 8BB4007E mov si, [ADR_FATBUF + si] 1965 ; = 16-bit word in FAT to load 1966 %endif 1967 0 000051D3 B104 mov cl, 4 0 000051D5 7202 jc @F ; iff CY after shift --> 0 000051D7 D3E6 shl si, cl ; shift up iff even entry 1971 @@: 0 000051D9 D3EE shr si, cl ; shift down (clears top 4 bits) 1973 1974 ; (ax holds cluster number) 1975 %endif 1976 1977 %else ; _LOAD_NON_FAT 1978 mov di, _LOAD_NON_FAT 1979 mov al, [VAR(sectors_per_cluster)] 1980 dec ax 1981 mov ah, 0 1982 inc ax 1983 mov cx, ax 1984 mul word [VAR(bytes_per_sector)] 1985 test dx, dx 1986 jnz @F 1987 cmp ax, di 1988 mov al, 'N' 1989 jb error 1990 @@: 1991 xchg ax, si 1992 %endif 1993 ; adjust cluster number to make it 0-based 0 000051DB 48 dec ax 0 000051DC 48 dec ax 1996 1997 %if ! _LOAD_NON_FAT 1998 %if _FIX_CLUSTER_SIZE 1999 mov cx, _FIX_CLUSTER_SIZE 2000 %else 2001 ; adjusted sectors per cluster 2002 ; decode EDR-DOS's special value 0 meaning 256 0 000051DD 8A4E0D mov cl, [VAR(sectors_per_cluster)] 0 000051E0 49 dec cx 0 000051E1 B500 mov ch, 0 0 000051E3 41 inc cx 2007 %endif 2008 %endif 2009 2010 ; convert from clusters to sectors 0 000051E4 F7E1 mul cx 0 000051E6 0346FC add ax, [VAR(data_start)] 0 000051E9 1356FE adc dx, [VAR(data_start)+2] 2014 ; dx:ax = sector number 2015 2016 ; xxx - this will always load an entire cluster (e.g. 64 sectors), 2017 ; even if the file is shorter than this 2018 @@: 2019 %if ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 2020 cmp bx, (ADR_FREE_UNTIL >> 4) - (_FIX_SECTOR_SIZE >> 4) 2021 %else 0 000051EC 3B5EEC cmp bx, [VAR(last_available_sector)] 2023 %endif 2024 %if _MEMORY_CONTINUE 0 000051EF 770E ja @F 2026 %else 2027 ja error_filetoobig 2028 %endif 2029 %if _FAT16 && ! _LOAD_NON_FAT 2030 push es ; (must preserve ADR_FATBUF reference) 2031 %endif 0 000051F1 E83A00 call read_sector 2033 %if _FAT16 && ! _LOAD_NON_FAT 2034 pop es 2035 %endif 2036 %if _SET_LOAD_SEG 0 000051F4 895EFA mov [VAR(load_seg)], bx ; => after last read data 2038 %endif 2039 %if _LOAD_NON_FAT 2040 sub di, word [VAR(bytes_per_sector)] 2041 ja @B 2042 %else 0 000051F7 E2F3 loop @B 2044 2045 %if _FAT16 2046 ; FFF7h: bad cluster 2047 ; FFF8h-FFFFh: end of cluster chain 2048 cmp si, 0FFF7h 2049 %else 2050 ; 0FF7h: bad cluster 2051 ; 0FF8h-0FFFh: end of cluster chain 0 000051F9 81FEF70F cmp si, 0FF7h 2053 %endif 0 000051FD 72C8 jb next_cluster 2055 %endif ; _LOAD_NON_FAT 2056 @@: 2057 2058 %if _WARN_PART_SIZE 2059 %assign num $ - read_fat_start 2060 %warning read_fat size is num bytes 2061 %endif 2062 2063 2064 finish_start: 2065 %if _LOAD_MIN_PARA 2066 %if ((_LOAD_ADR >> 4) + _LOAD_MIN_PARA) & 255 == 0 2067 ; If the value is divisible by 256 we can compare only the 2068 ; high byte for the same CF result: NC iff bx >= limit. 0 000051FF 80FF03 cmp bh, ((_LOAD_ADR >> 4) + _LOAD_MIN_PARA) >> 8 2070 %else 2071 cmp bx, (_LOAD_ADR >> 4) + _LOAD_MIN_PARA 2072 %endif 0 00005202 B045 mov al, 'E' 0 00005204 7211 jb error 2075 %endif 2076 2077 %if _TURN_OFF_FLOPPY 2078 ; turn off floppy motor 2079 mov dx,3F2h 2080 mov al,0 2081 out dx,al 2082 %endif 2083 2084 ; Set-up registers for and jump to loaded file 2085 ; Already: ss:bp-> boot sector containing BPB 2086 %if _CHECKVALUE 2087 CHECKLINEAR equ _LOAD_ADR + _CHECKOFFSET 2088 %if ! _RELOCATE && CHECKLINEAR <= (64 * 1024 - 2) 0 00005206 813EFC236C44 cmp word [CHECKLINEAR], _CHECKVALUE 2090 %else 2091 mov ax, CHECKLINEAR >> 4 2092 mov es, ax 2093 cmp word [es:CHECKLINEAR & 15], _CHECKVALUE 2094 %endif 0 0000520C B056 mov al, 'V' ; check 'V'alue mismatch 0 0000520E 7507 jne error 2097 %endif 2098 %if _SET_DL_UNIT 2099 mov dl, [VAR(boot_unit)]; set dl to unit 2100 %endif 2101 %if _SET_DI_CLUSTER && (_PUSH_DPT || _SET_DSSI_DPT) 2102 pop cx 2103 %endif 2104 %if _DATASTART_HIDDEN 2105 mov bx, [VAR(hidden_sectors + 0)] 2106 mov ax, [VAR(hidden_sectors + 2)] 2107 add word [VAR(data_start + 0)], bx 2108 adc word [VAR(data_start + 2)], ax 2109 %endif 2110 %if _SET_BL_UNIT 2111 %if _SET_DL_UNIT 2112 mov bl, dl ; set bl to unit, too 2113 %else 2114 mov bl, [VAR(boot_unit)]; set bl to unit 2115 %endif 2116 %endif 2117 %if _PUSH_DPT || _SET_DSSI_DPT 2118 %ifn _SET_DSSI_DPT ; (implying that only _PUSH_DPT is set) 2119 %if _RELOCATE 2120 xor ax, ax 2121 mov es, ax 2122 mov di, 1Eh * 4 2123 les si, [es:di] 2124 push es 2125 push si 2126 push ax 2127 push di 2128 %else 2129 mov di, 1Eh*4 2130 les si, [di] ; -> original (also current) DPT 2131 push es 2132 push si ; original (also current) DPT address 2133 push ss 2134 push di ; 0000h:0078h (address of 1Eh IVT entry) 2135 %endif 2136 %else 2137 %if _RELOCATE 2138 xor ax, ax 2139 mov ds, ax 2140 %endif 2141 mov di, 1Eh*4 2142 lds si, [di] ; -> original (also current) DPT 2143 %if _PUSH_DPT 2144 push ds 2145 push si ; original (also current) DPT address 2146 %if _RELOCATE 2147 push ax 2148 push di 2149 %else 2150 push ss 2151 push di ; 0000h:0078h (address of 1Eh IVT entry) 2152 %endif 2153 %endif 2154 %endif 2155 %else 2156 %if _RELOCATE && (_ZERO_ES || _ZERO_DS) 2157 xor ax, ax 2158 %endif 2159 %endif 2160 %if _RELOCATE 2161 %if _ZERO_ES 2162 mov es, ax 2163 %endif 2164 %if _ZERO_DS 2165 mov ds, ax 2166 %endif 2167 %endif 2168 2169 %if _SET_AXBX_DATA 2170 mov bx, [VAR(data_start)] 2171 mov ax, [VAR(data_start+2)] 2172 %endif 2173 %if _SET_DI_CLUSTER 2174 %if _PUSH_DPT || _SET_DSSI_DPT 2175 mov di, cx 2176 %else 2177 pop di 2178 %endif 2179 %endif 2180 %if ! _RELOCATE 2181 %if _ZERO_ES 2182 push ss 2183 pop es 2184 %endif 2185 %endif 2186 ; ss:bp-> boot sector with BPB 0 00005210 EA00040002 jmp (_LOAD_ADR>>4)+_EXEC_SEG_ADJ:_EXEC_OFS 2188 2189 2190 %if _WARN_PART_SIZE 2191 %assign num $ - finish_start 2192 %warning finish size is num bytes 2193 %endif 2194 2195 2196 %if ! _RELOCATE 2197 errorhandler 840 <1> %if _TMPINC 841 <1> %include "error.tmp" 1 <2> ; Auto-generated file, do not edit. 2 <2> 3 <2> error_start: 4 <2> 5 <2> read_sector.err: 0 00005215 B052 mov al, 'R' ; Disk 'R'ead error 7 <2> %if ! _MEMORY_CONTINUE || _RELOCATE || _LOAD_ADR >= ADR_FREE_FROM || _LOAD_CHECK_MAX_SIZE 8 <2> db __TEST_IMM16 ; (skip mov) 9 <2> error_filetoobig: 10 <2> error_memory: 11 <2> mov al,'M' ; Not enough 'M'emory 12 <2> %endif 13 <2> 14 <2> error: 15 <2> %if _RELOCATE 16 <2> mov bx, 7 17 <2> mov ds, bx 18 <2> mov bh, [462h - 70h] 19 <2> %else 0 00005217 8A3E6204 mov bh, [462h] 0 0000521B B307 mov bl, 7 22 <2> %endif 0 0000521D B40E mov ah, 0Eh 0 0000521F CD10 int 10h ; display character 0 00005221 B007 mov al, 07h 0 00005223 CD10 int 10h ; beep! 27 <2> 0 00005225 31C0 xor ax, ax ; await key pressed 0 00005227 CD16 int 16h 30 <2> 0 00005229 CD19 int 19h ; re-start the boot process 32 <2> 33 <2> %if _WARN_PART_SIZE 34 <2> %assign num $ - error_start 35 <2> %warning error size is num bytes 36 <2> %endif 842 <1> [list -] 883 <1> %endif 2198 2199 readhandler 888 <1> %if _TMPINC 889 <1> %include "read.tmp" 1 <2> ; Auto-generated file, do not edit. 2 <2> 3 <2> read_sector_start: 4 <2> ; INP: dx:ax = sector 5 <2> ; OUT: only if successful 6 <2> ; dx:ax = incremented 7 <2> ; bx => behind read sector 8 <2> ; es = ADR_FATBUF>>4 = ADR_DIRBUF>>4 9 <2> ; CHG: - 10 <2> %if ! _RELOCATE 11 <2> %if ADR_DIRBUF == ADR_FATBUF 12 <2> read_sector_dirbuf: 13 <2> %endif 14 <2> %if _FAT16 && ! _LOAD_NON_FAT 15 <2> read_sector_fatbuf: 16 <2> %endif 17 <2> %if (ADR_DIRBUF == ADR_FATBUF) || (_FAT16 && ! _LOAD_NON_FAT) 0 0000522B BBE007 mov bx, ADR_FATBUF>>4 19 <2> %if _FAT16 && _SET_FAT_SEG && ! _LOAD_NON_FAT 20 <2> mov word [VAR(fat_seg)], bx 21 <2> ; Optimisation: Set FAT buffer segment here where 22 <2> ; we have it ready in a register, instead of 23 <2> ; wasting a word immediate on it. If the FAT is 24 <2> ; never read then we do not need to set the 25 <2> ; variable anyway, only the sector variable has 26 <2> ; to contain a -1 to indicate it's uninitialised. 27 <2> ; If we get here from read_sector_dirbuf we will 28 <2> ; also initialise this variable but that does not 29 <2> ; cause any problems. 30 <2> %endif 31 <2> %endif 32 <2> %endif 33 <2> 34 <2> ; Read a sector using Int13.02 or Int13.42 35 <2> ; 36 <2> ; INP: dx:ax = sector number within partition 37 <2> ; bx => buffer 38 <2> ; (_LBA) ds = ss 39 <2> ; OUT: If unable to read, 40 <2> ; ! jumps to error instead of returning 41 <2> ; If sector has been read, 42 <2> ; dx:ax = next sector number (has been incremented) 43 <2> ; bx => next buffer (bx = es+word[para_per_sector]) 44 <2> ; es = input bx 45 <2> ; CHG: - 46 <2> read_sector: 0 0000522E 52 push dx 0 0000522F 51 push cx 0 00005230 50 push ax 0 00005231 56 push si 51 <2> 0 00005232 8EC3 mov es, bx ; => buffer 53 <2> 54 <2> ; DX:AX==LBA sector number 55 <2> ; add partition start (= number of hidden sectors) 0 00005234 03461C add ax,[VAR(hidden_sectors + 0)] 0 00005237 13561E adc dx,[VAR(hidden_sectors + 2)] 58 <2> %if (!_LBA || !_LBA_33_BIT) && _LBA_CHECK_NO_33 59 <2> jc .err 60 <2> %endif 61 <2> %if _LBA ; +70 bytes (with CHS, +63 bytes without CHS) 62 <2> %if _LBA_33_BIT 0 0000523A 19F6 sbb si, si ; -1 if was CY, 0 else 0 0000523C F7DE neg si ; 1 if was CY, 0 else 65 <2> %endif 0 0000523E 31C9 xor cx, cx 0 00005240 51 push cx ; highest word = 0 68 <2> %if _LBA_33_BIT 0 00005241 56 push si ; bit 32 = 1 if operating in 33-bit space 70 <2> %else 71 <2> push cx ; second highest word = 0 72 <2> %endif 0 00005242 52 push dx 0 00005243 50 push ax ; = qword sector number 0 00005244 53 push bx 0 00005245 51 push cx ; bx => buffer 0 00005246 41 inc cx 0 00005247 51 push cx ; word number of sectors to read 0 00005248 B110 mov cl, 10h 0 0000524A 51 push cx ; word size of disk address packet 0 0000524B 89E6 mov si, sp ; ds:si -> disk address packet (on stack) 82 <2> 83 <2> %if _LBA_SKIP_CHECK ; -14 bytes 0 0000524D 8A5624 mov dl, [VAR(boot_unit)] 85 <2> %else 86 <2> %if _LBA_WORKAROUND 87 <2> push ds 88 <2> mov bx, 40h 89 <2> mov ds, bx 90 <2> ; Setting ds = 40h for the function 41h detection is a workaround 91 <2> ; for a bug in the Book8088's Xi8088 BIOS. Refer to 92 <2> ; https://www.bttr-software.de/forum/forum_entry.php?id=21275 93 <2> %endif 94 <2> mov ah, 41h 95 <2> mov dl, [VAR(boot_unit)] 96 <2> mov bx, 55AAh 97 <2> stc 98 <2> int 13h ; 13.41.bx=55AA extensions installation check 99 <2> %if _LBA_WORKAROUND 100 <2> pop ds 101 <2> %endif 102 <2> jc .no_lba 103 <2> cmp bx, 0AA55h 104 <2> jne .no_lba 105 <2> shr cl, 1 ; support bitmap bit 0 106 <2> jnc .no_lba 107 <2> %endif 108 <2> 109 <2> %if _LBA_RETRY 110 <2> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 111 <2> stc 112 <2> %endif 113 <2> mov ah, 42h 114 <2> int 13h ; 13.42 extensions read 115 <2> jnc .lba_done 116 <2> 117 <2> %if _RETRY_RESET 118 <2> xor ax, ax 119 <2> int 13h ; reset disk 120 <2> %endif 121 <2> 122 <2> ; have to reset the LBAPACKET's lpCount, as the handler may 123 <2> ; set it to "the number of blocks successfully transferred". 124 <2> ; (in any case, the high byte is still zero.) 125 <2> mov byte [si + 2], 1 126 <2> %endif 127 <2> 128 <2> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00005250 F9 stc 130 <2> %endif 0 00005251 B442 mov ah, 42h 0 00005253 CD13 int 13h 133 <2> %if _LBA_SKIP_CHECK && _CHS 134 <2> %if _LBA_SKIP_ANY 135 <2> jc .no_lba 136 <2> %else 0 00005255 7205 jc .lba_check_error_1 138 <2> %endif 139 <2> %else 140 <2> .cy_err: 141 <2> jc .lba_error 142 <2> %endif 143 <2> 144 <2> .lba_done: 145 <2> %if _CHS && _LBA_SET_TYPE 146 <2> mov byte [bp + 2], 0Eh ; LBA-enabled FAT16 FS partition type 147 <2> %endif 0 00005257 83C410 add sp, 10h 149 <2> %if _CHS 0 0000525A EB46 jmp short .done 151 <2> %endif 152 <2> 153 <2> .lba_error: equ .err 154 <2> 155 <2> %if !_CHS 156 <2> .no_lba: equ .err 157 <2> %else 158 <2> %if _LBA_SKIP_CHECK 159 <2> %if ! _LBA_SKIP_ANY 160 <2> .lba_check_error_1: 0 0000525C 80FC01 cmp ah, 1 ; invalid function? 0 0000525F 75B4 jne .lba_error ; no, other error --> 163 <2> ; try CHS instead 164 <2> %endif 165 <2> .cy_err: equ .err 166 <2> %endif 167 <2> .no_lba: 0 00005261 83C408 add sp, 8 0 00005264 59 pop cx ; cx = low word of sector 0 00005265 58 pop ax 0 00005266 5A pop dx ; dx:ax = middle two words of sector 172 <2> ; Here dx <= 1 if _LBA_33_BIT, else zero. 173 <2> ; If dx is nonzero then the CHS calculation 174 <2> ; should fail. If CHS sectors is equal to 1 175 <2> ; (very unusual) then the div may fail. Else, 176 <2> ; we will detect a cylinder > 1023 eventually. 0 00005267 5E pop si ; discard highest word of qword 178 <2> %endif 179 <2> %endif 180 <2> 181 <2> %if !_LBA 182 <2> .cy_err: equ .err 183 <2> %endif 184 <2> 185 <2> %if _CHS ; +70 bytes 186 <2> ; dx:ax = LBA sector number, (if _LBA) cx = 0 187 <2> ; divide by number of sectors per track to get sector number 188 <2> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 189 <2> ; Use two-step 32:16 divide to avoid overflow 190 <2> %if !_LBA 191 <2> xchg cx, ax ; cx = low word of sector, clobbers ax 192 <2> xchg ax, dx ; ax = high word of sector, clobbers dx 193 <2> xor dx, dx ; dx:ax = high word of sector 194 <2> %else 195 <2> ; from the .no_lba popping we already have: 196 <2> ; cx = low word of sector 197 <2> ; dx:ax = high word of sector 198 <2> %endif 0 00005268 F77618 div word [VAR(sectors_per_track)] 0 0000526B 91 xchg cx,ax 0 0000526C F77618 div word [VAR(sectors_per_track)] 0 0000526F 87CA xchg cx,dx 203 <2> 204 <2> ; DX:AX=quotient, CX=remainder=sector (S) - 1 205 <2> ; divide quotient by number of heads 0 00005271 93 xchg bx, ax ; bx = low word of quotient, clobbers ax 0 00005272 92 xchg ax, dx ; ax = high word of quotient, clobbers dx 0 00005273 31D2 xor dx, dx ; dx = 0 0 00005275 F7761A div word [VAR(heads)] 210 <2> ; ax = high / heads, dx = high % heads 0 00005278 93 xchg bx, ax ; bx = high / heads, ax = low quotient 0 00005279 F7761A div word [VAR(heads)] 213 <2> 214 <2> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 215 <2> ; move variables into registers for INT 13h AH=02h 0 0000527C 88D6 mov dh, dl ; dh = head 0 0000527E 41 inc cx ; cl5:0 = sector 0 0000527F 86E8 xchg ch, al ; ch = cylinder 7:0, al = 0 0 00005281 D1E8 shr ax, 1 0 00005283 D1E8 shr ax, 1 ; al7:6 = cylinder 9:8 221 <2> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 0 00005285 08FB or bl, bh ; collect set bits from bh 0 00005287 08C1 or cl, al ; cl7:6 = cylinder 9:8 224 <2> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 0 00005289 08E3 or bl, ah ; collect set bits from ah 0 0000528B 8A5624 mov dl,[VAR(boot_unit)] ; dl = drive 227 <2> .nz_err: 0 0000528E 7585 jnz .err ; error if cylinder >= 1024 --> 229 <2> ; ! bx = 0 (for 13.02 call) 230 <2> 231 <2> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 232 <2> ; may fail if we cross a track or 64K boundary 233 <2> %if _CHS_RETRY_REPEAT 0 00005290 BE1100 mov si, _CHS_RETRY_REPEAT + 1 235 <2> %if _CHS_RETRY_NORMAL && _RETRY_RESET 0 00005293 A9 db __TEST_IMM16 ; (skip int 13h) 237 <2> .loop_chs_retry_repeat: 0 00005294 CD13 int 13h ; reset disk 239 <2> %elif _RETRY_RESET 240 <2> .loop_chs_retry_repeat: 241 <2> xor ax, ax 242 <2> int 13h ; reset disk 243 <2> %else 244 <2> .loop_chs_retry_repeat: 245 <2> %endif 0 00005296 4E dec si ; another attempt ? 0 00005297 78F5 js .nz_err ; no --> 0 00005299 B80102 mov ax, 0201h 0 0000529C CD13 int 13h ; read one sector 250 <2> %if _CHS_RETRY_NORMAL && _RETRY_RESET 0 0000529E 89D8 mov ax, bx ; ax = 0 252 <2> %endif 0 000052A0 72F2 jc .loop_chs_retry_repeat 254 <2> ; fall through to .done 255 <2> %else 256 <2> mov ax, 0201h 257 <2> %if _CHS_RETRY 258 <2> %if _RETRY_RESET 259 <2> ; In this case we cannot store to the stack and 260 <2> ; pop the value at the right moment for both 261 <2> ; cases of the "jnc .done" branch. So use the 262 <2> ; original code to re-init ax to 0201h. 263 <2> int 13h ; read one sector 264 <2> jnc .done 265 <2> ; reset drive 266 <2> xor ax, ax 267 <2> int 13h 268 <2> mov ax, 0201h 269 <2> %else 270 <2> push ax 271 <2> int 13h ; read one sector 272 <2> pop ax ; restore ax = 0201h 273 <2> jnc .done 274 <2> %endif 275 <2> %endif 276 <2> ; try read again 277 <2> int 13h 278 <2> %if _LBA_SKIP_CHECK 279 <2> inc bx 280 <2> jc .nz_err 281 <2> %else 282 <2> jc .cy_err 283 <2> %endif 284 <2> %endif 285 <2> 286 <2> %endif ; _CHS 287 <2> 288 <2> .done: 289 <2> ; increment segment 0 000052A2 8CC3 mov bx, es 291 <2> %if _FIX_SECTOR_SIZE 292 <2> add bx, _FIX_SECTOR_SIZE >> 4 293 <2> %else 0 000052A4 035EEE add bx, [VAR(para_per_sector)] 295 <2> %endif 296 <2> 0 000052A7 5E pop si 0 000052A8 58 pop ax 0 000052A9 59 pop cx 0 000052AA 5A pop dx 301 <2> ; increment LBA sector number 0 000052AB 40 inc ax 0 000052AC 7501 jne @F 0 000052AE 42 inc dx 305 <2> @@: 306 <2> 0 000052AF C3 retn 308 <2> 309 <2> %if _WARN_PART_SIZE 310 <2> %assign num $ - read_sector_start 311 <2> %warning read_sector size is num bytes 312 <2> %endif 890 <1> [list -] 1207 <1> %endif 2200 %endif 2201 2202 2203 %if !_NO_LIMIT 2204 available: 0 000052B0 26 _fill 508,38,start 2206 2207 signatures: 0 000052BC 0000 dw 0 2209 ; 2-byte magic bootsector signature 0 000052BE 55AA dw 0AA55h 2211 2212 %assign num signatures-available 2213 %assign fatbits 12 2214 %if _FAT16 2215 %assign fatbits 16 2216 %endif 2217 %warning FAT%[fatbits]: num bytes still available. 2217 ****************** warning: FAT12: 12 bytes still available. [-w+user] 2218 %endif 2219 2220 end: 241 .end: 242 %if (fat12_payload.end - fat12_payload) != 512 243 %error "FAT12 payload isn't 512 bytes sized." 244 %endif 245 %endif 246 %if _FAT16 247 00000200 fat16_payload: noteincbin _PAYLOAD_FAT16, _PAYLOAD_FAT16_LST 247 ------------------ note: include listing file 'lst/boot16.lst' 1 2 %if 0 3 4 File system boot sector loader code for FAT12 or FAT16 5 6 Adapted from 2002-11-26 fatboot.zip/fat12.asm, 7 released as public domain by Chris Giese 8 9 Public domain by E. C. Masloch, 2012 10 11 %endif 12 13 14 %include "lmacros2.mac" 1 <1> [list -] 14 <1> [list -] 15 16 %ifndef _MAP 17 %elifempty _MAP 18 %else ; defined non-empty, str or non-str 19 [map all _MAP] 20 %endif 21 22 defaulting 23 24 numdef FAT16, 0 ; 0 = FAT12, 1 = FAT16 25 strdef OEM_NAME, " lDOS" 26 strdef OEM_NAME_FILL, '_' 27 strdef DEFAULT_LABEL, "lDOS" 28 numdef VOLUMEID, 0 29 30 strdef LOAD_NAME, "LDOS" 31 strdef LOAD_EXT, "COM" ; name of file to load 32 numdef LOAD_ADR, 02000h ; where to load 33 numdef LOAD_MIN_PARA, paras(4096) 34 numdef LOAD_CHECK_MAX_SIZE, 0 35 numdef LOAD_CHECK_MAX_SIZE_FATPLUS, 1 36 numdef LOAD_NON_FAT, 0, 2048 ; use FAT-less loading (value is amount bytes) 37 numdef EXEC_SEG_ADJ, 0 ; how far cs will be from _LOAD_ADR 38 numdef EXEC_OFS, 400h ; what value ip will be 39 numdef CHECKOFFSET, 1020 40 numdef CHECKVALUE, "lD" 41 numdef LOAD_STACK, 512 ; default stack size (use 256 for DR-DOS) 42 numdef LOAD_DIR_SEG, 0 ; => where to store dir entry (0 if nowhere) 43 numdef ADD_SEARCH, 0 ; whether to search second file 44 strdef ADD_NAME, "" 45 strdef ADD_EXT, "" ; name of second file to search 46 numdef ADD_DIR_SEG, 0 ; => where to store dir entry (0 if nowhere) 47 numdef CHECK_ATTRIB, 0 ; check attribute for LFN, label, directory 48 numdef ATTRIB_SAVE, _CHECK_ATTRIB 49 50 gendef _ADR_DIRBUF, end -start+7C00h ; 07E00h 51 gendef _ADR_FATBUF, end -start+7C00h ; 07E00h 52 53 numdef QUERY_GEOMETRY, 1 ; query geometry via 13.08 (for CHS access) 54 numdef QUERY_GEOMETRY_DISABLED, 0 55 numdef USE_PART_INFO, 1 ; use ds:si-> partition info from MBR, if any 56 numdef USE_PART_INFO_DISABLED, 0 57 numdef USE_AUTO_UNIT, 1 ; use unit passed from ROM-BIOS in dl 58 numdef RPL, 1 ; support RPL and do not overwrite it 59 numdef RPL_GRACE_AREA, 130 * 1024 60 ; alternative RPL support, 61 ; assume RPL fits in this area 62 numdef CHS, 1 ; support CHS (if it fits) 63 numdef LBA, 1 ; support LBA (if available) 64 numdef LBA_33_BIT, 1 ; support 33-bit LBA 65 numdef LBA_CHECK_NO_33, 1 ; else: check that LBA doesn't carry 66 67 numdef RELOCATE, 0 ; relocate the loader to top of memory 68 numdef SET_BL_UNIT, 0 ; if to pass unit in bl as well 69 numdef SET_DL_UNIT, 0 ; if to pass unit in dl 70 numdef SET_AXBX_DATA, 0 ; if to pass first data sector in ax:bx 71 numdef SET_DSSI_DPT, 0 ; if to pass DPT address in ds:si 72 numdef PUSH_DPT, 0 ; if to push DPT address 73 numdef MEMORY_CONTINUE, 1 ; if to just execute when memory full 74 numdef SET_DI_CLUSTER, 0 ; if to pass first load file cluster in di 75 numdef DIRBUF_500, 0 ; if to load root dir sector(s) to 0:500h 76 numdef DIR_ENTRY_500, 0 ; if to copy directory entry to 0:500h 77 numdef DIR_ENTRY_520, 0 ; if to copy next directory entry to 0:520h 78 numdef TURN_OFF_FLOPPY, 0 ; if to turn off floppy motor after loading 79 numdef DATASTART_HIDDEN,0 ; if to add hidden sectors to data_start 80 numdef LBA_SET_TYPE, 0 ; if to set third byte to LBA partition type 81 numdef SET_LOAD_SEG, 1 ; if to set load_seg (word [ss:bp - 6]) 82 numdef SET_FAT_SEG, 1 ; if to set fat_seg (word [ss:bp - 8]) 83 numdef SET_FAT_SEG_NORMAL, 1 ; do not use aggressive optimisation 84 numdef SET_CLUSTER, 1 ; if to set first_cluster (word [ss:bp - 16]) 85 numdef ZERO_ES, 0 ; if to set es = 0 before jump 86 numdef ZERO_DS, 0 ; if to set ds = 0 before jump 87 88 numdef FIX_SECTOR_SIZE, 0 ; fix sector size (0 = disable, else = sector size) 89 numdef FIX_SECTOR_SIZE_SKIP_CHECK, 0 ; don't check sector size 90 numdef FIX_CLUSTER_SIZE, 0 ; fix cluster size 91 numdef FIX_CLUSTER_SIZE_SKIP_CHECK, 0 ; don't check cluster size 92 numdef NO_LIMIT, 0 ; allow using more memory than a boot sector 93 ; also will not write 0AA55h signature! 94 numdef WARN_PART_SIZE, 0 95 96 numdef LBA_SKIP_CHECK, 1 ; don't use proper LBA extensions check 97 numdef LBA_WORKAROUND, 0 ; when checking for LBA set ds = 40h 98 numdef LBA_SKIP_CY, 1 ; skip check: set up CY before 13.42 99 numdef LBA_SKIP_ANY, 0 ; skip check: try CHS on any error 100 incdef _LBA_SKIP_ANY, LBA_SKIP_CY 101 numdef LBA_RETRY, 0 ; retry LBA reads one time 102 numdef CHS_RETRY, 1 ; retry CHS reads one time 103 numdef CHS_RETRY_REPEAT,16 ; retry CHS reads multiple times 104 ; (value of the def is used as count) 105 numdef CHS_RETRY_NORMAL,1 ; do not use aggressive optimisation 106 numdef RETRY_RESET, 1 ; call reset disk system 13.00 on retries 107 108 numdef MEDIAID, 0F0h ; media ID 109 numdef UNIT, 0 ; load unit in BPB 110 numdef CHS_SECTORS, 18 ; CHS geometry field for sectors 111 numdef CHS_HEADS, 2 ; CHS geometry field for heads 112 numdef HIDDEN, 0 ; number of hidden sectors 113 numdef SPI, 2880 ; sectors per image 114 numdef BPS, 512 ; bytes per sector 115 numdef SPC, 1 ; sectors per cluster 116 numdef SPF, 9 ; sectors per FAT 117 numdef NUMFATS, 2 ; number of FATs 118 numdef NUMROOT, 224 ; number of root directory entries 119 numdef NUMRESERVED, 1 ; number of reserved sectors 120 121 %if _FAT16 122 ; Unlike the 1440 KiB diskette image defaults for the FAT12 123 ; loader we just fill the FAT16 BPB with zeros by default. 124 numdef MEDIAID, 0 ; media ID 125 numdef UNIT, 0 ; load unit in BPB 126 numdef CHS_SECTORS, 0 ; CHS geometry field for sectors 127 numdef CHS_HEADS, 0 ; CHS geometry field for heads 128 numdef HIDDEN, 0 ; number of hidden sectors 129 numdef SPI, 0 ; sectors per image 130 numdef BPS, 0 ; bytes per sector 131 numdef SPC, 0 ; sectors per cluster 132 numdef SPF, 0 ; sectors per FAT 133 numdef NUMFATS, 0 ; number of FATs 134 numdef NUMROOT, 0 ; number of root directory entries 135 numdef NUMRESERVED, 0 ; number of reserved sectors 136 %endif 137 138 %if _DIRBUF_500 139 gendef _ADR_DIRBUF, 500h 140 %endif 141 142 143 numdef COMPAT_FREEDOS, 0 ; partial FreeDOS load compatibility 144 numdef COMPAT_DR, 0 ; partial DR-DOS load compatibility 145 numdef COMPAT_IBM, 0 ; partial IBMDOS load compatibility 146 numdef COMPAT_MS7, 0 ; partial MS-DOS 7 load compatibility 147 numdef COMPAT_MS6, 0 ; partial MS-DOS 6 load compatibility 148 numdef COMPAT_LDOS, 0 ; lDOS load compatibility 149 numdef COMPAT_KERNEL7E, 0 ; kernel at 0:7E00h load compatibility 150 151 %if (!!_COMPAT_FREEDOS + !!_COMPAT_IBM + !!_COMPAT_DR + !!_COMPAT_MS7 + !!_COMPAT_MS6 + !!_COMPAT_LDOS + !!_COMPAT_KERNEL7E) > 1 154 %error At most one set must be selected. 155 %endif 156 157 %if _COMPAT_FREEDOS 158 strdef LOAD_NAME, "KERNEL" 159 strdef LOAD_EXT, "SYS" 160 numdef LOAD_ADR, 00600h 161 numdef LOAD_MIN_PARA, paras(512) 162 numdef EXEC_SEG_ADJ, 0 163 numdef EXEC_OFS, 0 164 165 numdef CHECKVALUE, 0 166 numdef SET_LOAD_SEG, 0 167 numdef SET_FAT_SEG, 0 168 numdef SET_CLUSTER, 0 169 170 numdef SET_BL_UNIT, 1 171 numdef MEMORY_CONTINUE, 0 172 numdef RELOCATE, 1 173 ; The FreeDOS load protocol mandates that the entire file be loaded. 174 %endif 175 176 %if _COMPAT_IBM 177 strdef LOAD_NAME, "IBMBIO" 178 strdef LOAD_EXT, "COM" 179 numdef LOAD_ADR, 00700h 180 numdef LOAD_MIN_PARA, paras(512) 181 numdef EXEC_SEG_ADJ, 0 182 numdef EXEC_OFS, 0 183 numdef LOAD_DIR_SEG, 50h 184 numdef ADD_SEARCH, 1 185 strdef ADD_NAME, "IBMDOS" 186 strdef ADD_EXT, "COM" 187 numdef ADD_DIR_SEG, 52h 188 ; Note: The IBMBIO.COM directory entry must be stored at 189 ; 0:500h, and the IBMDOS.COM directory entry at 0:520h. 190 191 numdef CHECKVALUE, 0 192 numdef SET_LOAD_SEG, 0 193 numdef SET_FAT_SEG, 0 194 numdef SET_CLUSTER, 0 195 196 numdef SET_DL_UNIT, 1 197 numdef MEMORY_CONTINUE, 1 198 ; 3 sectors * 512 BpS should suffice. We load into 700h--7A00h, 199 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 200 numdef SET_AXBX_DATA, 1 201 numdef DATASTART_HIDDEN,1 202 numdef SET_DSSI_DPT, 1 203 numdef PUSH_DPT, 1 204 %endif 205 206 %if _COMPAT_DR 207 strdef LOAD_NAME, "IBMBIO" 208 strdef LOAD_EXT, "COM" 209 numdef LOAD_ADR, 00700h 210 numdef LOAD_STACK, 256 211 ; Shrinking the stack allows to boot a file of up to 29 KiB 212 ; given a sector size of <= 1 KiB. 213 numdef LOAD_MIN_PARA, paras(4096 - 700h) 214 ; Using a min para size that allows to compare the segment's 215 ; high byte only saves a byte. 216 numdef EXEC_SEG_ADJ, 0 217 numdef EXEC_OFS, 0 218 219 numdef CHECKVALUE, 0 220 numdef SET_LOAD_SEG, 0 221 numdef SET_FAT_SEG, 0 222 numdef SET_CLUSTER, 0 223 224 numdef SET_DL_UNIT, 1 225 numdef MEMORY_CONTINUE, 1 226 ; Memory continue must certainly be set to boot off file 227 ; systems with >= 32 KiB per cluster and may be needed 228 ; even for smaller cluster sizes that are still > 1 KiB. 229 numdef LOAD_CHECK_MAX_SIZE, 1 230 ; In conjunction with _MEMORY_CONTINUE this enables erroring 231 ; out if the actual file data is too large to load it, but 232 ; avoids the need to load the entire last cluster. 233 234 numdef SET_AXBX_DATA, 0 235 numdef DATASTART_HIDDEN,0 236 numdef SET_DSSI_DPT, 0 237 numdef PUSH_DPT, 0 238 ; None of these options seem needed for DR-DOS. Note that 239 ; disabling them will fail if we actually load our lDOS 240 ; iniload as it expects these options enabled. 241 %endif 242 243 %if _COMPAT_MS7 244 strdef LOAD_NAME, "IO" 245 strdef LOAD_EXT, "SYS" 246 numdef LOAD_ADR, 00700h 247 numdef LOAD_MIN_PARA, paras(1024) 248 numdef EXEC_SEG_ADJ, 0 249 numdef EXEC_OFS, 200h 250 251 numdef CHECKVALUE, 0 252 numdef SET_LOAD_SEG, 0 253 numdef SET_FAT_SEG, 0 254 numdef SET_CLUSTER, 0 255 256 numdef SET_DL_UNIT, 1 257 numdef SET_DSSI_DPT, 0 258 numdef PUSH_DPT, 1 259 numdef MEMORY_CONTINUE, 1 260 ; 4 sectors * 512 BpS should suffice. We load into 700h--7A00h, 261 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 262 numdef SET_DI_CLUSTER, 1 263 numdef DATASTART_HIDDEN,1 264 numdef LBA_SET_TYPE, 1 265 %endif 266 267 %if _COMPAT_MS6 268 strdef LOAD_NAME, "IO" 269 strdef LOAD_EXT, "SYS" 270 numdef LOAD_ADR, 00700h 271 numdef LOAD_MIN_PARA, paras(512) 272 numdef EXEC_SEG_ADJ, 0 273 numdef EXEC_OFS, 0 274 numdef LOAD_DIR_SEG, 50h 275 numdef ADD_SEARCH, 1 276 strdef ADD_NAME, "MSDOS" 277 strdef ADD_EXT, "SYS" 278 numdef ADD_DIR_SEG, 52h 279 ; Note: The IO.SYS directory entry must be stored at 280 ; 0:500h, and the MSDOS.SYS directory entry at 0:520h. 281 282 numdef CHECKVALUE, 0 283 numdef SET_LOAD_SEG, 0 284 numdef SET_FAT_SEG, 0 285 numdef SET_CLUSTER, 0 286 287 numdef SET_DL_UNIT, 1 288 numdef MEMORY_CONTINUE, 1 289 ; 3 sectors * 512 BpS should suffice. We load into 700h--7A00h, 290 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 291 numdef SET_AXBX_DATA, 1 292 numdef DATASTART_HIDDEN,1 293 numdef SET_DSSI_DPT, 1 294 numdef PUSH_DPT, 1 295 %endif 296 297 %if _COMPAT_LDOS 298 strdef LOAD_NAME, "LDOS" 299 strdef LOAD_EXT, "COM" 300 numdef LOAD_ADR, 02000h 301 numdef LOAD_MIN_PARA, paras(4096) 302 numdef EXEC_SEG_ADJ, 0 303 numdef EXEC_OFS, 400h 304 numdef CHECKOFFSET, 1020 305 numdef CHECKVALUE, "lD" 306 307 numdef SET_DL_UNIT, 0 308 numdef SET_CLUSTER, 1 309 numdef SET_FAT_SEG, 1 310 numdef SET_LOAD_SEG, 1 311 numdef MEMORY_CONTINUE, 1 312 numdef DATASTART_HIDDEN,0 313 %endif 314 315 %if _COMPAT_KERNEL7E 316 strdef OEM_NAME, "KERNEL7E" 317 strdef LOAD_NAME, "KERNEL7E" 318 strdef LOAD_EXT, "BIN" 319 numdef LOAD_ADR, 07E00h 320 numdef LOAD_MIN_PARA, paras(512) 321 numdef EXEC_SEG_ADJ, -7E0h 322 numdef EXEC_OFS, 7E00h 323 numdef CHECKVALUE, 0 324 325 numdef SET_DL_UNIT, 1 326 numdef SET_BL_UNIT, 0 327 numdef SET_CLUSTER, 0 328 numdef SET_FAT_SEG, 0 329 numdef SET_LOAD_SEG, 0 330 numdef MEMORY_CONTINUE, 0 331 numdef DATASTART_HIDDEN,0 332 333 gendef _ADR_FATBUF, 4000h 334 gendef _ADR_DIRBUF, 4000h 335 numdef RPL, 0 336 numdef ZERO_ES, 1 337 %endif 338 339 340 %if 0 341 342 Notes about partial load compatibilities 343 344 * FreeDOS: 345 * Relocates to an address other than 27A00h (1FE0h:7C00h) 346 * A lot of options between _USE_PART_INFO, _QUERY_GEOMETRY, _CHS, _LBA, 347 and/or _RPL need to be disabled to make the loader fit 348 * DR-DOS: 349 * Must enable _MEMORY_CONTINUE to load off file systems with cluster 350 sizes > 1 KiB (depending on file size) or >= 32 KiB (certainly) 351 * Will not load whole file if _MEMORY_CONTINUE is enabled and file 352 data exceeds 29 KiB, without erroring out. The new option called 353 _LOAD_CHECK_MAX_SIZE has been added to address this. However, it 354 won't fit without disabling some other options such as _LBA, _CHS, 355 _USE_PART_INFO, or _QUERY_GEOMETRY. 356 * Disables DPT, data start, and directory entry to 00500h options by 357 default so loading a faithful IBMDOS v4+ kernel will fail as msload 358 or lDOS iniload need these options to operate 359 * IBMDOS: 360 * MS-DOS 6: 361 * Does not actually relocate DPT, just provide its address 362 * A lot of options between _USE_PART_INFO, _QUERY_GEOMETRY, _CHS, 363 and/or _LBA need to be disabled to make the loader fit 364 * MS-DOS 7: 365 * Does not actually relocate DPT, just provide its address 366 * Does not contain message table used by loader 367 368 %endif 369 370 %if _SET_BL_UNIT && _SET_AXBX_DATA 371 %error Cannot select both of these options! 372 %endif 373 374 %if _DIR_ENTRY_520 375 %assign _DIR_ENTRY_500 1 376 %endif 377 378 %if _DIRBUF_500 && _ADD_SEARCH 379 %error Cannot select both of these options! 380 %endif 381 382 %if _ADD_SEARCH 383 %if _LOAD_DIR_SEG == 0 || _ADD_DIR_SEG == 0 384 %error Assuming dir segs should be set if add search set 385 %endif 386 %endif 387 388 %if _RPL 389 %assign _RPL_GRACE_AREA 0 390 %endif 391 392 393 %assign LOADLIMIT 0A0000h 394 %assign POSITION 07C00h 395 396 %if _FIX_SECTOR_SIZE 397 %assign i 5 398 %rep 13-5 399 %if (1 << i) != (_FIX_SECTOR_SIZE) 400 %assign i i+1 401 %endif 402 %endrep 403 %if (1 << i) != (_FIX_SECTOR_SIZE) 404 %error Invalid sector size _FIX_SECTOR_SIZE 405 %endif 406 %endif 407 408 %if _FIX_CLUSTER_SIZE 409 %if _FIX_CLUSTER_SIZE > 256 410 %error Invalid cluster size _FIX_CLUSTER_SIZE 411 %endif 412 %assign i 0 413 %rep 8-0 414 %if (1 << i) != (_FIX_CLUSTER_SIZE) 415 %assign i i+1 416 %endif 417 %endrep 418 %if (1 << i) != (_FIX_CLUSTER_SIZE) 419 %warning Non-power-of-two cluster size _FIX_CLUSTER_SIZE 420 %endif 421 %endif 422 423 424 ; Stack (default 512 Bytes minus the variables). 425 ADR_STACK_LOW equ 7C00h - _LOAD_STACK ; 07A00h (if _LOAD_STACK = 200h) 426 427 %if _DIRBUF_500 428 gendef _ADR_DIRBUF, 500h 429 %elif _RELOCATE 430 gendef _ADR_DIRBUF, _LOAD_ADR 431 %endif 432 433 ; one-sector directory buffer. Assumes sectors are no larger than 8 KiB 434 ADR_DIRBUF equ __ADR_DIRBUF 435 436 %if ! _RELOCATE 437 ; this used to be a two-sector FAT buffer -- two sectors because FAT12 438 ; entries are 12 bits and may straddle a sector boundary. 439 ; however, with the FAT12 loaded completely, the buffer only needs to hold 440 ; one 8 KiB sector, two 4 KiB sectors, three 2 KiB sectors, six 1 KiB sectors, 441 ; or twelve 512 byte sectors. 442 ; this shares its area with the directory buffer as they 443 ; are not simultaneously used. (if not _DIRBUF_500.) 444 ADR_FATBUF equ __ADR_FATBUF 445 %endif 446 447 ; start of unused memory after loader: 448 ADR_END equ end -start+7C00h 449 %if ! _RELOCATE 450 %if (ADR_FATBUF + 8192) > ADR_END 451 ADR_FREE_FROM equ (ADR_FATBUF + 8192) ; 09E00h 452 %else 453 ADR_FREE_FROM equ ADR_END ; 07E00h 454 %endif 455 456 ; end of unused memory before loader: 457 %if ADR_FATBUF < ADR_STACK_LOW 458 ADR_FREE_UNTIL equ ADR_FATBUF 459 %else 460 ADR_FREE_UNTIL equ ADR_STACK_LOW 461 %endif 462 463 %if ((ADR_FATBUF + 8192 - 1) & ~0FFFFh) != (ADR_FATBUF & ~0FFFFh) 464 %warning Possibly crossing 64 KiB boundary while reading FAT 465 %endif 466 %endif 467 468 %if ((ADR_DIRBUF + 8192 - 1) & ~0FFFFh) != (ADR_DIRBUF & ~0FFFFh) 469 %warning Possibly crossing 64 KiB boundary while reading directory 470 %endif 471 472 %if _RELOCATE 473 ADR_FREE_FROM equ 0 ; make next conditional true 474 ADR_FREE_UNTIL equ 0 475 %endif 476 %if _LOAD_ADR >= ADR_FREE_FROM 477 ; If reading on a sector size boundary, no crossing can occur. 478 ; Check for all possible sector sizes (32 B to 8 KiB). If one 479 ; of them fails display a warning, including the minimum size. 480 %assign SECSIZECHECK 32 481 %assign EXITREP 0 482 %rep 256 483 %ifn EXITREP 484 %if _LOAD_ADR & (SECSIZECHECK - 1) 485 %warning Possibly crossing 64 KiB boundary while reading file (sector size >= SECSIZECHECK) 486 %assign EXITREP 1 487 %exitrep 488 %endif 489 %if SECSIZECHECK == 8192 490 %assign EXITREP 1 491 %exitrep 492 %endif 493 %assign SECSIZECHECK SECSIZECHECK * 2 494 %endif 495 %endrep 496 %else 497 ; If loading below the boot sector, address 1_0000h is never reached. 498 %endif 499 500 501 %if (_LOAD_ADR & 0Fh) 502 %error Load address must be on a paragraph boundary 503 %endif 504 505 %if _LOAD_ADR > LOADLIMIT 506 %error Load address must be in LMA 507 %elif _LOAD_ADR < 00500h 508 %error Load address must not overlap IVT or BDA 509 %endif 510 511 %if ! _RELOCATE 512 %if _LOAD_ADR > (POSITION-512) && _LOAD_ADR < (POSITION+512) 513 %error Load address must not overlap loader 514 %endif 515 516 %if ADR_FATBUF > LOADLIMIT 517 %error FAT buffer address must be in LMA 518 %elif ADR_FATBUF < 00500h 519 %error FAT buffer address must not overlap IVT or BDA 520 %elif (ADR_FATBUF + 8192) > (POSITION-512) && ADR_FATBUF < (POSITION+512) 521 %error FAT buffer address must not overlap loader 522 %endif 523 %endif 524 525 %if ADR_DIRBUF > LOADLIMIT 526 %error Dir buffer address must be in LMA 527 %elif ADR_DIRBUF < 00500h 528 %error Dir buffer address must not overlap IVT or BDA 529 %elif (ADR_DIRBUF + 8192) > (POSITION-512) && ADR_DIRBUF < (POSITION+512) 530 %error Dir buffer address must not overlap loader at initial position 531 %endif 532 533 %if ((_EXEC_SEG_ADJ<<4)+_EXEC_OFS) < 0 534 %error Execution address must be in loaded file 535 %elif ((_EXEC_SEG_ADJ<<4)+_EXEC_OFS+_LOAD_ADR) > LOADLIMIT 536 %error Execution address must be in LMA 537 %endif 538 539 %if (_EXEC_OFS & ~0FFFFh) 540 %error Execution offset must fit into 16 bits 541 %endif 542 543 %if (_EXEC_SEG_ADJ > 0FFFFh || _EXEC_SEG_ADJ < -0FFFFh) 544 %error Execution segment adjustment must fit into 16 bits 545 %endif 546 547 548 %if !_CHS && _QUERY_GEOMETRY 549 %warning No CHS support but querying geometry anyway 550 %endif 551 552 %if !_CHS && !_LBA 553 %error Either CHS or LBA or both must be enabled 554 %endif 555 556 557 %if 0 558 559 There is some logic inside MS-DOS's hard disk partition initialisation 560 code that sets up several requirements for us to fulfil. Otherwise, 561 it will not accept the information given in the BPB (using default 562 information based on the length as specified by MBR/EPBR instead) or 563 make the whole file system inaccessible except for formatting. Both of 564 those are undesirable of course. Some/all(?) checks are documented on 565 pages 601,602 in "DOS Internals", Geoff Chappell 1994, as follows: 566 567 * First three bytes contain either "jmp sho xx\ nop" or "jmp ne xx". 568 * Media descriptor field >= 0F0h. 569 * Bytes per sector field == 512. 570 * Sectors per cluster field a power of 2 (1,2,4,8,16,32,64,128). 571 * OEM name "version" (last three to four characters) 572 * must be "20.?", "10.?" (? = wildcard), but no other with "0.?", 573 * otherwise, must be "2.0", or 574 * 2nd-to-last,3rd-to-last character codes together > "3.", or 575 * those == "3.", last character code > "0" 576 577 To stay compatible to those, display a warning here if the name 578 itself would disqualify our boot sector already. 579 580 %endif 581 582 %push 583 %strlen %$len _OEM_NAME_FILL 584 %if %$len != 1 585 %error Specified OEM name fill must be 1 character 586 %endif 587 %strlen %$len _OEM_NAME 588 %define %$nam _OEM_NAME 589 %if %$len > 8 590 %error Specified OEM name is too long 591 %else 592 %assign %$warn 0 593 %rep 8 - %$len 594 %strcat %$nam %$nam,_OEM_NAME_FILL 595 %endrep 596 %substr %$prefix %$nam 5 ; "wvxyZa.b", get "Z" 597 %substr %$major %$nam 6,7 ; "wvxyzA.b", get "A." 598 %substr %$minor %$nam 8 ; "wvxyza.B", get "B" 599 %if %$major == "0." 600 %ifn %$prefix == "1" || %$prefix == "2" 601 %assign %$warn 1 602 %endif 603 %elifn %$major == "2." && %$minor == "0" 604 %if %$major < "3." 605 %assign %$warn 1 606 %elif %$major == "3." && %$minor < "1" 607 %assign %$warn 1 608 %endif 609 %endif 610 %if %$warn 611 %warning Specified OEM name fails MS-DOS's validation 612 %endif 613 %endif 614 %pop 615 616 617 struc DIRENTRY 0 000052C0 ???????????????? deName: resb 8 0 000052C8 ?????? deExt: resb 3 0 000052CB ?? deAttrib: resb 1 0 000052CC ?? dePlusSize: resb 1 0 000052CD ?????????????? resb 7 0 000052D4 ???? deClusterHigh: resw 1 0 000052D6 ???? deTime: resw 1 0 000052D8 ???? deDate: resw 1 0 000052DA ???? deClusterLow: resw 1 0 000052DC ???????? deSize: resd 1 628 endstruc 629 630 ATTR_READONLY equ 1 631 ATTR_HIDDEN equ 2 632 ATTR_SYSTEM equ 4 633 ATTR_VOLLABEL equ 8 634 ATTR_DIRECTORY equ 10h 635 ATTR_ARCHIVE equ 20h 636 637 638 ; use byte-offset addressing from BP for smaller code 639 %define VAR(x) ((x) - start) + bp 640 641 642 cpu 8086 643 ; bootsector loaded at address 07C00h, addressable using 0000h:7C00h 644 org POSITION 645 start: 646 647 648 %define _LASTVARIABLE start 649 %macro nextvariable 2-3.nolist 650 %1 equ (_LASTVARIABLE - %2) 651 %define _LASTVARIABLE %1 652 %ifidn %3, relocatestart 653 %define _RELOCATESTART %1 654 %elifempty %3 655 %else 656 %error Invalid third parameter 657 %endif 658 %endmacro 659 660 ; Variables 661 662 ; (dword) sector where the first cluster's data starts 663 nextvariable data_start, 4 664 665 ; (word) current load segment (points behind last loaded data) 666 nextvariable load_seg, 2 667 668 ; (word) segment of FAT buffer 669 ; for FAT12 this holds the entire FAT 670 ; for FAT16 this holds the sector given by wo[fat_sector] 671 ; for FAT32 this holds the sector given by dwo[fat_sector] 672 nextvariable fat_seg, 2 673 674 ; (word for FAT16) currently loaded sector-in-FAT, -1 if none 675 nextvariable fat_sector, 4 676 677 ; (word for FAT12/FAT16) first cluster of load file 678 nextvariable first_cluster, 4, relocatestart 679 680 ADR_STACK_START equ _LASTVARIABLE -start+POSITION 681 682 %ifn _FIX_SECTOR_SIZE 683 ; (word) number of 16-byte paragraphs per sector 684 nextvariable para_per_sector, 2, relocatestart 685 %endif 686 687 %assign DIRSEARCHSTACK_CL_FIRST 0 688 %assign DIRSEARCHSTACK_CL_SECOND 0 689 %assign PLACEHOLDER 0 690 691 %if _ATTRIB_SAVE && ! (_ADD_SEARCH || _LOAD_DIR_SEG) 692 %if _LASTVARIABLE == start - 12h 693 %assign DIRSEARCHSTACK_CL_FIRST 1 694 %elif _LASTVARIABLE == start - 10h 695 %assign DIRSEARCHSTACK_CL_SECOND 1 696 %endif 697 %ifn _DIR_ENTRY_500 698 ; three words left on the stack after directory search 699 nextvariable dirsearchstack, 6, relocatestart 700 %else 701 ; two words left on the stack after directory search 702 nextvariable dirsearchstack, 4, relocatestart 703 %endif 704 %elifn !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL 705 %if _LASTVARIABLE == start - 12h 706 nextvariable cmdline_signature_placeholder, 2, relocatestart 707 %assign PLACEHOLDER 1 708 %elif _LASTVARIABLE == start - 10h 709 %if _PUSH_DPT 710 nextvariable cmdline_signature_placeholder, 4, relocatestart 711 %assign PLACEHOLDER 2 712 ; In this case, part of the original DPT pointer may 713 ; overlap the CL signature word. Therefore allocate 714 ; two placeholder words to insure no CL match. 715 %else 716 ; In this case the last_available_sector variable 717 ; will be at word [ss:bp - 12h] (or none) and the 718 ; stack pointer will be equal to bp - 12h (or - 10h) 719 ; at handover time. Thus no placeholder is needed. 720 %endif 721 %else 722 %error Placeholder not placed 723 %endif 724 ; This stack slot is used to insure that 725 ; the "CL" signature is not present at this 726 ; location. If not relocate and load address 727 ; is below loader then the next variable 728 ; (last_available_sector) will always receive 729 ; a value < 7C0h so cannot hold "CL". 730 ; If _ATTRIB_SAVE is in use and neither the 731 ; _ADD_SEARCH nor the _LOAD_DIR_SEG options 732 ; are set, the first word of dirsearchstack 733 ; will be at word [ss:bp - 14h]. 734 %endif 735 736 %ifn ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 737 ; (word) segment of last available memory for sector 738 nextvariable last_available_sector, 2 739 %else 740 %if _LASTVARIABLE == start - 12h 741 nextvariable cmdline_signature_placeholder, 2, relocatestart 742 %assign PLACEHOLDER 1 743 %elif _LASTVARIABLE == start - 10h 744 %if _PUSH_DPT 745 nextvariable cmdline_signature_placeholder, 4, relocatestart 746 %assign PLACEHOLDER 2 747 %endif 748 %endif 749 %endif 750 751 lowest_variable equ _LASTVARIABLE 752 753 0 000052C0 EB47 jmp strict short skip_bpb 755 %if !_CHS && _LBA_SET_TYPE 756 db 0Eh ; LBA-enabled FAT16 FS partition type 757 %else 0 000052C2 90 nop ; default: no LBA 759 %endif 760 761 762 ; BIOS Parameter Block (BPB) 763 ; 764 ; Installation will use the BPB already present in your file system. 765 ; These values must be initialised when installing the loader. 766 ; 767 ; The values shown here work only with 1440 KiB disks (CHS=80:2:18) 768 769 oem_id: ; offset 03h (03) - not used by this code 0 000052C3 202020206C444F53 fill 8,_OEM_NAME_FILL,db _OEM_NAME 771 bytes_per_sector: ; offset 0Bh (11) - refer to _FIX_SECTOR_SIZE ! 0 000052CB 0000 dw _BPS 773 sectors_per_cluster: ; offset 0Dh (13) - refer to _FIX_CLUSTER_SIZE ! 0 000052CD 00 db _SPC & 255 775 fat_start: 776 num_reserved_sectors: ; offset 0Eh (14) 0 000052CE 0000 dw _NUMRESERVED 778 num_fats: ; offset 10h (16) 0 000052D0 00 db _NUMFATS 780 num_root_dir_ents: ; offset 11h (17) 0 000052D1 0000 dw _NUMROOT 782 total_sectors: ; offset 13h (19) - not used by this code 783 %if _SPI < 1_0000h 0 000052D3 0000 dw _SPI 785 %else 786 dw 0 787 %endif 788 media_id: ; offset 15h (21) - not used by this code 0 000052D5 00 db _MEDIAID 790 sectors_per_fat: ; offset 16h (22) 0 000052D6 0000 dw _SPF 792 sectors_per_track: ; offset 18h (24) 0 000052D8 0000 dw _CHS_SECTORS 794 heads: ; offset 1Ah (26) 0 000052DA 0000 dw _CHS_HEADS 796 hidden_sectors: ; offset 1Ch (28) 0 000052DC 00000000 dd _HIDDEN 798 total_sectors_large: ; offset 20h (32) - not used by this code 799 %if _SPI >= 1_0000h 800 dd _SPI 801 %else 0 000052E0 00000000 dd 0 803 %endif 804 805 ; Extended BPB 806 0 000052E4 00 boot_unit: db _UNIT 0 000052E5 00 db 0 0 000052E6 29 ext_bpb_signature: db 29h 0 000052E7 00000000 serial_number: dd _VOLUMEID 0 000052EB 6C444F5320 volume_label: fill 11,32,db _DEFAULT_LABEL 0 000052F6 464154313620 filesystem_identifier: fill 8,32,db "FAT1",'2'+4*!!_FAT16 0 000052F6 813 814 815 ; Initialised data 816 817 load_name: 0 000052FE 4C444F5320 fill 8,32,db _LOAD_NAME 0 00005306 434F4D fill 3,32,db _LOAD_EXT 820 %if _ADD_SEARCH 821 add_name: 822 fill 8,32,db _ADD_NAME 823 fill 3,32,db _ADD_EXT 824 825 ; align 2 826 ; This happens to be aligned anyway. But even if 827 ; it didn't, we'd rather save that byte than use 828 ; it to align these fields. So comment this out. 829 dirseg: 830 dw _ADD_DIR_SEG 831 %endif 832 833 834 numdef TMPINC, 0 835 836 %if _TMPINC 837 [list -] 1211 %endif 1212 1213 %if _WARN_PART_SIZE 1214 %assign num $ - start 1215 %warning BPB + data size is num bytes 1216 %endif 1217 1218 1219 ; Code 1220 1221 skip_bpb: 0 00005309 FA cli 0 0000530A FC cld 0 0000530B 31C9 xor cx, cx 0 0000530D BD[0000] mov bp, start ; magic bytes - checked by instsect 0 00005310 8ED1 mov ss, cx 0 00005312 BCF07B mov sp, ADR_STACK_START 1228 %if _USE_AUTO_UNIT 0 00005315 885624 mov [VAR(boot_unit)], dl; magic bytes - checked by instsect 1230 %else 1231 mov dl, [VAR(boot_unit)]; magic bytes - checked by instsect 1232 %endif 1233 1234 ; Note: es is left uninitialised here until the first call to 1235 ; read_sector if the below conditional is false. 1236 %if _USE_PART_INFO ; +19 bytes 0 00005318 8EC1 mov es, cx 1238 ; Note: Award Medallion BIOS v6.0 (ASUS MED 2001 ACPI BIOS Revision 1009) 1239 ; loads from a floppy disk drive with ds:si = 0F000h:0A92Dh -> 1240 ; FF FF FF FF 08 00 08 01 FF FF FF FF FF FF FF FF, which was detected 1241 ; as a valid partition table entry by this handling. Therefore, we 1242 ; only accept partition information when booting from a hard disk now. 1243 1244 ; start of magic byte sequence for instsect 0 0000531A 84D2 test dl, dl ; floppy ? 0 0000531C 7911 jns @F ; don't attempt detection --> 1247 ; Check whether an MBR left us partition information. 1248 ; byte[ds:si] bit 7 means active and must be set if valid. 0 0000531E 380C cmp byte [si], cl ; flags for xx-00h (result is xx), SF = bit 7 0 00005320 790D jns @F ; xx < 80h, ie info invalid --> 1251 ; byte[ds:si+4] is the file system type. Check for valid one. 0 00005322 384C04 cmp byte [si+4], cl ; is it zero? 0 00005325 7408 je @F ; yes, info invalid --> 1254 ; Info valid, trust their hidden sectors over hardcoded. 1255 ; Assume the movsw instructions won't run with si = FFFFh. 0 00005327 BF[1C00] mov di, hidden_sectors ; -> BPB field 0 0000532A 83C608 add si, 8 ; -> partition start sector in info 1258 %if _USE_PART_INFO_DISABLED 1259 nop 1260 nop ; size has to match enabled code 1261 %else 0 0000532D A5 movsw 0 0000532E A5 movsw ; overwrite BPB field with value from info 1264 %endif 1265 @@: 1266 ; end of magic byte sequence for instsect 1267 %endif 0 0000532F 8ED9 mov ds, cx 0 00005331 FB sti 1270 1271 1272 ; Note: The int 13h function 08h call may change or 1273 ; set ax, bx, cx, dx, es, di. es is left as 1274 ; indeterminate until the first call to 1275 ; read_sector to read the root directory. 1276 %if _QUERY_GEOMETRY ; +27 bytes 1277 1278 ; start of magic byte sequence for instsect 1279 ; test dl, dl ; floppy? 1280 ; jns @F ; don't attempt query, might fail --> 1281 ; Note that while the original PC BIOS doesn't support this function 1282 ; (for its diskettes), it does properly return the error code 01h. 1283 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 00005332 B408 mov ah, 08h 1285 ; xor cx, cx ; initialise cl to 0 1286 ; Already from prologue cx = 0. 0 00005334 F9 stc ; initialise to CY 1288 %if _QUERY_GEOMETRY_DISABLED 1289 nop 1290 nop ; size has to match enabled code 1291 %else 0 00005335 CD13 int 13h ; query drive geometry 1293 %endif 0 00005337 720E jc @F ; apparently failed --> 0 00005339 83E13F and cx, 3Fh ; get sectors 0 0000533C 7409 jz @F ; invalid (S is 1-based), don't use --> 0 0000533E 894E18 mov [VAR(sectors_per_track)], cx 0 00005341 88F1 mov cl, dh ; cx = maximum head number 0 00005343 41 inc cx ; cx = number of heads (H is 0-based) 0 00005344 894E1A mov [VAR(heads)], cx 1301 @@: 1302 ; end of magic byte sequence for instsect 1303 %endif 1304 1305 %if _FIX_SECTOR_SIZE 1306 %if !_FIX_SECTOR_SIZE_SKIP_CHECK 1307 cmp word [VAR(bytes_per_sector)], _FIX_SECTOR_SIZE 1308 mov al, 'S' 1309 jne error 1310 %endif 1311 mov bx, _FIX_SECTOR_SIZE >> 5 1312 %if _FIX_CLUSTER_SIZE 1313 %if !_FIX_CLUSTER_SIZE_SKIP_CHECK 1314 cmp byte [VAR(sectors_per_cluster)], _FIX_CLUSTER_SIZE & 0FFh 1315 mov al, 'C' 1316 jne error 1317 %endif 1318 %endif 1319 mov ch, 0 ; ! ch = 0 1320 %else 1321 ; 16-byte paragraphs per sector 0 00005347 8B5E0B mov bx,[VAR(bytes_per_sector)] 0 0000534A B90400 mov cx,4 ; ! ch = 0 0 0000534D D3EB shr bx,cl 1325 %if _FIX_CLUSTER_SIZE 1326 %if !_FIX_CLUSTER_SIZE_SKIP_CHECK 1327 cmp byte [VAR(sectors_per_cluster)], _FIX_CLUSTER_SIZE & 0FFh 1328 mov al, 'C' 1329 jne error 1330 %endif 1331 %else 1332 ; ! ch = 0 1333 %endif 0 0000534F 53 push bx ; push into word [VAR(para_per_sector)] 1335 1336 ; 32-byte FAT directory entries per sector 0 00005350 D1EB shr bx, 1 ; /2 = 32-byte entries per sector 1338 %endif 1339 1340 %if _WARN_PART_SIZE 1341 %assign num $ - skip_bpb 1342 %warning init size is num bytes 1343 %endif 1344 1345 1346 dirsearch_start: 1347 1348 ; number of sectors used for root directory (store in CX) 0 00005352 8B7611 mov si, [VAR(num_root_dir_ents)] 0 00005355 89D8 mov ax, bx 1351 ; The ax value here is the last value of bx, which is set 1352 ; by the shr instruction. Therefore, it cannot be higher 1353 ; than 7FFFh, so this cwd instruction always zeros dx. 0 00005357 99 cwd 0 00005358 48 dec ax ; rounding up 0 00005359 01F0 add ax, si ; from BPB 0 0000535B 11D2 adc dx, dx ; account for overflow (dx was zero) 0 0000535D F7F3 div bx ; get number of root sectors 0 0000535F 91 xchg ax, cx ; cx = number of root secs, ! ah = 0 1360 1361 ; first sector of root directory 0 00005360 8A4610 mov al,[VAR(num_fats)] ; ! ah = 0, hence ax = number of FATs 0 00005363 F76616 mul word [VAR(sectors_per_fat)] 0 00005366 03460E add ax,[VAR(num_reserved_sectors)] 0 00005369 10F2 adc dl, dh ; account for overflow (dh was and is 0) 1366 0 0000536B 31FF xor di, di 1368 1369 ; first sector of disk data area: 0 0000536D 01C1 add cx, ax 0 0000536F 11D7 adc di, dx 0 00005371 894EFC mov [VAR(data_start)], cx 0 00005374 897EFE mov [VAR(data_start+2)], di 1374 1375 next_dir_search: 1376 %if _ADD_SEARCH 1377 push dx 1378 push ax 1379 push si 1380 %endif 1381 1382 ; Scan root directory for file. We don't bother to check for deleted 1383 ; entries (E5h) or entries that mark the end of the directory (00h). 1384 ; number of root entries in si here 1385 next_sect: 0 00005377 89D9 mov cx, bx ; entries per sector as loop counter 1387 %if ! _RELOCATE 1388 %if ADR_DIRBUF == ADR_FATBUF 0 00005379 E8AC00 call read_sector_dirbuf 1390 %else 1391 mov bx, ADR_DIRBUF>>4 1392 call read_sector 1393 %endif 1394 %else 1395 mov bx, ADR_DIRBUF>>4 1396 call read_sector 1397 %endif 0 0000537C 89CB mov bx, cx ; restore bx for next iteration later 1399 0 0000537E 31FF xor di, di ; es:di-> first entry in this sector 1401 next_ent: 1402 %if DIRSEARCHSTACK_CL_FIRST 1403 push cx ; first dirsearchstack word = entries-in-sector 1404 push si ; other: entries total 1405 %else 0 00005380 56 push si 0 00005381 51 push cx ; second dirsearchstack word = entries-in-sector 1408 %endif 0 00005382 57 push di ; dirsearchstack 1410 %if _CHECK_ATTRIB && ! _ATTRIB_SAVE 1411 test byte [es:di + deAttrib], ATTR_DIRECTORY | ATTR_VOLLABEL 1412 jnz @F ; directory, label, or LFN entry --> (NZ) 1413 %endif 1414 %if _ADD_SEARCH 1415 mov si, add_name 1416 filename equ $ - 2 ; SMC to update to load_name later 1417 %else 0 00005383 BE[3E00] mov si, load_name ; ds:si-> name to match 1419 %endif 0 00005386 B90B00 mov cx, 11 ; length of padded 8.3 FAT filename 0 00005389 F3A6 repe cmpsb ; check entry 1422 %if _ATTRIB_SAVE 1423 %if _CHECK_ATTRIB 1424 jnz @F 1425 ; deAttrib == 11, right after the 11-byte name 1426 test byte [es:di], ATTR_DIRECTORY | ATTR_VOLLABEL 1427 ; directory, label, or LFN entry ? 1428 %endif 1429 jz found_it ; found entry --> 1430 %endif 1431 @@: 0 0000538B 5F pop di 1433 %if DIRSEARCHSTACK_CL_FIRST 1434 pop si 1435 pop cx ; pop from dirsearchstack 1436 %else 0 0000538C 59 pop cx 0 0000538D 5E pop si ; pop from dirsearchstack 1439 %endif 0 0000538E 8D7D20 lea di, [di + DIRENTRY_size] 1441 %if ! _ATTRIB_SAVE 0 00005391 7409 jz found_it ; found entry --> 1443 %endif 1444 0 00005393 4E dec si ; count down entire root's entries 0 00005394 E0EA loopnz next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 0 00005396 75DF jnz next_sect ; (jumps iff si >0 && cx ==0) 1448 ; ends up here iff si ==0 1449 ; ie all root entries checked unsuccessfully 1450 %if 0 1451 1452 qemu prior to 2020-08 has a bug which affects the above 1453 conditionals. The bug is that if NZ is set (like when the 1454 branch to the label found_it is not taken) and then another 1455 instruction sets ZR (like the dec si at the end of the root 1456 directory) and then loopnz is used which sets cx to zero 1457 then after the loopnz FL will be NZ leading to the jnz branch 1458 to be taken. Eventually the entire load unit is traversed and 1459 qemu returns error 01h when trying to read past the end of 1460 the unit (at least for 1440 KiB diskettes). 1461 1462 The bug can be worked around in two ways as done by lDebug: 1463 1464 https://hg.pushbx.org/ecm/ldebug/rev/c95e2955bbca 1465 1466 https://hg.pushbx.org/ecm/ldebug/rev/c84047f15d9c 1467 1468 However, both cost a few bytes each. Therefore the proper 1469 fix is considered to be updating qemu. Error behaviour occurs 1470 when a file is not found. In an unlikely case, another sector 1471 in the data area may hold a match for the searched entry. 1472 Otherwise, the read eventually fails and the loader aborts 1473 with an R error (instead of the expected F error). 1474 1475 Reference: https://bugs.launchpad.net/qemu/+bug/1888165 1476 1477 %endif 1478 0 00005398 B046 mov al,'F' ; File not 'F'ound 0 0000539A EB78 jmp error 1481 1482 found_it: 1483 %if _ADD_SEARCH || _LOAD_DIR_SEG 1484 %if _ATTRIB_SAVE 1485 pop di ; es:di -> dir entry (pop from dirsearchstack) 1486 %endif 1487 mov cx, 32 1488 mov ax, _LOAD_DIR_SEG 1489 %if ! _ATTRIB_SAVE 1490 sub di, cx ; es:di -> dir entry 1491 %endif 1492 %if _ADD_SEARCH 1493 xchg ax, word [VAR(dirseg)] 1494 %endif 1495 push ds 1496 mov si, di 1497 push di 1498 push es 1499 pop ds ; ds:si -> dir entry 1500 mov es, ax 1501 xor di, di ; es:di -> destination 1502 rep movsb ; store dir entry 1503 push ds 1504 pop es 1505 pop di ; restore es:di -> dir entry 1506 pop ds 1507 %if _ADD_SEARCH 1508 %if ((load_name - start) & 0FF00h) == ((add_name - start) & 0FF00h) 1509 mov byte [VAR(filename)], (load_name - start + 7C00h) & 255 1510 %else 1511 mov word [VAR(filename)], load_name 1512 %endif 1513 ; update name to second iteration's 1514 %if (_LOAD_DIR_SEG & 255) != (_ADD_DIR_SEG & 255) 1515 cmp al, _ADD_DIR_SEG & 255 1516 %elif (_LOAD_DIR_SEG) != (_ADD_DIR_SEG) 1517 cmp ax, _ADD_DIR_SEG ; was first iteration ? 1518 %else 1519 %error Must not store directory entries to same segment 1520 %endif 1521 %if _ATTRIB_SAVE 1522 pop si ; discard cx/si 1523 pop si ; discard si/cx (dirsearchstack) 1524 %endif 1525 pop si 1526 pop ax 1527 pop dx ; restore root start and count 1528 ; (bx still holds entries per sector) 1529 je next_dir_search ; jump to search load file next --> 1530 %endif 1531 times PLACEHOLDER push bx 1532 ; push into cmdline_signature_placeholder 1533 %if _RELOCATE 1534 push word [es:di + deClusterLow] 1535 ; (word on stack) = first cluster number 1536 %endif 1537 %else 1538 %if _DIR_ENTRY_500 ; +24 bytes, probably 1539 mov cx, 32 1540 %if _ATTRIB_SAVE 1541 pop si ; es:si -> dir entry (pop from dirsearchstack) 1542 %else 1543 xchg si, di 1544 sub si, cx 1545 %endif 1546 push ds 1547 push es 1548 push es 1549 pop ds ; ds:si -> directory entry 1550 xor ax, ax 1551 mov es, ax 1552 mov di, 500h ; es:di -> 0:500h 1553 %if _DIR_ENTRY_520 1554 rep movsw ; move to here (two directory entries) 1555 %else 1556 rep movsb ; move to here 1557 %endif 1558 pop es 1559 pop ds 1560 xchg si, di ; es:di -> behind (second) directory entry 1561 %endif 1562 times PLACEHOLDER push bx 1563 ; push into cmdline_signature_placeholder 1564 ; Push the entries per sector value into this 1565 ; stack slot to ensure that it does not hold "CL". 1566 %if _RELOCATE 1567 %if _DIR_ENTRY_500 || !_ATTRIB_SAVE 1568 push word [es:di + deClusterLow - DIRENTRY_size - (DIRENTRY_size * !!_DIR_ENTRY_520)] 1570 ; (word on stack) = first cluster number 1571 %else 1572 push word [es:di + deClusterLow - (deName + 11)] 1573 ; (word on stack) = first cluster number 1574 %endif 1575 %endif 1576 %endif 1577 1578 %if _WARN_PART_SIZE 1579 %assign num $ - dirsearch_start 1580 %warning dirsearch size is num bytes 1581 %endif 1582 1583 1584 %if _RELOCATE || _LOAD_ADR >= ADR_FREE_FROM 1585 memory_start: 1586 ; Get conventional memory size and store it 1587 int 12h 1588 mov cl, 6 1589 shl ax, cl 1590 %if _RPL ; +31 bytes 1591 xchg dx, ax 1592 lds si, [4 * 2Fh] 1593 add si, 3 1594 lodsb 1595 cmp al, 'R' 1596 jne .no_rpl 1597 lodsb 1598 cmp al, 'P' 1599 jne .no_rpl 1600 lodsb 1601 cmp al, 'L' 1602 jne .no_rpl 1603 mov ax, 4A06h 1604 int 2Fh 1605 .no_rpl: 1606 push ss 1607 pop ds 1608 xchg ax, dx 1609 %endif 1610 %if _RELOCATE 1611 %if _LOAD_NON_FAT 1612 sub ax, (_RPL_GRACE_AREA + 20 * 1024 + 512 + 7C00h) >> 4 1614 %else 1615 sub ax, (_RPL_GRACE_AREA + 20 * 1024 + 8192 + (8192-16) + 512 + 7C00h) >> 4 1617 %endif 1618 ; RPL grace area preserved for RPL 1619 ; 20 KiB: reserved for iniload 1620 ; 8 KiB: FAT buffer 1621 ; 8 KiB - 16 B: to allow rounding down FAT buffer position 1622 ; 512: sector 1623 ; 7C00h: stack and to allow addressing with 7C00h in bp 1624 ; 1625 ; Note also that by addressing the stack and sector 1626 ; with bp at 7C00h, and insuring this subtraction doesn't 1627 ; underflow, makes sure that we do not overwrite the IVT or 1628 ; BDA. (However, we assume that ax is at least 60h or so.) 1629 ; 1630 ; The FAT buffer segment is masked so that the actual buffer 1631 ; is stored on an 8 KiB boundary. This is to ensure that 1632 ; the buffer doesn't possibly cross a 64 KiB DMA boundary. 1633 jc .error_memory_j_CY 1634 cmp ax, (end -start+7C00h - ADR_STACK_LOW + 15) >> 4 1635 ; This check is to ensure that the start of the destination 1636 ; for the relocation (stack, sector) is 1637 ; above-or-equal the end of the source for the relocation. 1638 ; That is, to avoid overwriting any of the source with the 1639 ; string move instruction (which for simplicity is always UP). 1640 .error_memory_j_CY: 1641 jb error_memory 1642 %if ! _LOAD_NON_FAT 1643 mov bx, ((8192 - 16) + 512 + 7C00h)>>4 1644 add bx, ax 1645 ; this is like calculating the following for the bx value: 1646 ; ((LMA_top - 20 KiB - 8 KiB - (8 KiB - 16 B) - 512 - 7C00h) + ; ((8 KiB - 16 B) + 512 + 7C00h))>>4 1648 ; == (LMA_top - 20 KiB - 8 KiB)>>4 1649 and bx, ~ ((8192>>4) - 1) 1650 mov word [VAR(fat_seg)], bx 1651 %endif 1652 1653 mov di, relocated 1654 push ax 1655 push di ; -> relocation target label relocated 1656 ; (We cannot use a near call here to push the target IP 1657 ; because we do not control whether the ROM-BIOS loader 1658 ; entered us at 0:7C00h or 7C0h:0. So we need to create 1659 ; the correct offset manually here.) 1660 1661 mov es, ax ; => destination 1662 mov si, sp ; ds:si = ss:_RELOCATESTART - 2 - 4 1663 mov di, si ; es:di -> destination for stack low 1664 mov cx, (end - (_RELOCATESTART - 2 - 4)) >> 1 1665 ; end is the top of used memory 1666 ; _RELOCATESTART is the lowest filled stack frame slot 1667 ; 2 is for the first cluster word on the stack 1668 ; 4 is for the additional slots taken by the return address 1669 rep movsw ; relocate stack, sector 1670 retf ; jump to relocated code 1671 1672 %if _WARN_PART_SIZE 1673 %assign num $ - memory_start 1674 %warning memory size is num bytes 1675 %endif 1676 1677 1678 readhandler 1679 1680 errorhandler 1681 1682 1683 relocated: 1684 mov ss, ax 1685 mov ds, ax ; relocate these 1686 add ax, (ADR_STACK_LOW) >> 4 ; (rounding down) => behind available 1687 1688 pop si 1689 %else 1690 sub ax, (_RPL_GRACE_AREA + 20 * 1024) >> 4 1691 ; RPL grace area, plus 1692 ; 20 KiB reserved for iniload 1693 jb error_memory 1694 %endif 1695 %elif _LOAD_ADR < ADR_FREE_UNTIL 1696 %if !_FIX_SECTOR_SIZE 0 0000539C B8A007 mov ax, ADR_FREE_UNTIL >> 4 ; rounding *down* 1698 %endif 1699 %else 1700 %error Load address within used memory 1701 %endif 1702 %if ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 1703 ; user of last_available_sector will hardcode the value! 1704 %else 1705 %if _FIX_SECTOR_SIZE 1706 sub ax, _FIX_SECTOR_SIZE >> 4 1707 %else 1708 %if _LOAD_CHECK_MAX_SIZE 1709 %if _RELOCATE 1710 %error Combination not implemented yet 1711 %else 1712 mov si, [VAR(para_per_sector)] 1713 sub ax, si 1714 %endif 1715 %else 0 0000539F 2B46EE sub ax, [VAR(para_per_sector)] 1717 %endif 1718 %endif 0 000053A2 50 push ax ; push into word [VAR(last_available_sector)] 1720 %endif 1721 %if _LOAD_CHECK_MAX_SIZE 1722 %if !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 1723 %if _LOAD_CHECK_MAX_SIZE_FATPLUS 1724 ; check FAT+ size bits 1725 test byte [es:di + dePlusSize + DIRADJUST], 0E7h 1726 ; test whether bits 7-5 and 2-0 NZ 1727 jnz error_memory 1728 %endif 1729 cmp word [es:di + deSize + 2 + DIRADJUST], 0 1730 jne error_memory 1731 cmp word [es:di + deSize + DIRADJUST], (((ADR_FREE_UNTIL >> 4) - (_LOAD_ADR >> 4)) & ~ ((_FIX_SECTOR_SIZE >> 4) - 1)) << 4 1734 ja error_memory 1735 %else 1736 %if !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL 1737 mov ax, (ADR_FREE_UNTIL >> 4) - (_LOAD_ADR >> 4) 1738 %else 1739 add ax, si 1740 sub ax, _LOAD_ADR >> 4 1741 %endif 1742 ; ax = how many paragraphs available 1743 dec si ; para per sector minus 1 1744 not si ; mask to round down to sector 1745 and ax, si ; how many paragraphs can be read 1746 mov dx, word [es:di + deSize + DIRADJUST] 1747 %if _LOAD_CHECK_MAX_SIZE_FATPLUS 1748 ; check FAT+ size bits 1749 test byte [es:di + dePlusSize + DIRADJUST], 0E7h 1750 ; test whether bits 7-5 and 2-0 NZ 1751 jnz error_memory 1752 %endif 1753 %if !_RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL 1754 cmp word [es:di + deSize + 2 + DIRADJUST], 0 1755 jne error_memory 1756 add dx, 15 1757 jc error_memory_CY 1758 mov cl, 4 1759 shr dx, cl 1760 %else 1761 mov si, word [es:di + deSize + 2 + DIRADJUST] 1762 add dx, 15 1763 adc si, 0 1764 jc error_memory_CY 1765 mov cx, 4 1766 @@: 1767 shr si, 1 1768 rcr dx, 1 1769 loop @B 1770 test si, si 1771 jnz error_memory 1772 %endif 1773 cmp ax, dx 1774 error_memory_CY: 1775 jb error_memory 1776 %endif 1777 %endif 1778 1779 read_fat_start: 1780 ; get starting cluster of file 1781 %if ! _RELOCATE 1782 %if _ADD_SEARCH || _LOAD_DIR_SEG 1783 DIRADJUST equ 0 1784 %elif _ATTRIB_SAVE && ! _DIR_ENTRY_500 1785 DIRADJUST equ - deAttrib 1786 %else 1787 DIRADJUST equ - DIRENTRY_size - (DIRENTRY_size * !!_DIR_ENTRY_520) 1788 %endif 0 000053A3 268B75FA mov si,[es:di + deClusterLow + DIRADJUST] 1790 %elif _LOAD_CHECK_MAX_SIZE 1791 DIRADJUST equ 0 ; placeholder to avoid confusing error 1792 %error Combination not implemented yet 1793 %endif 1794 %if _SET_CLUSTER 0 000053A7 8976F0 mov word [VAR(first_cluster)], si 1796 %endif 1797 %if _SET_DI_CLUSTER 1798 push si ; remember cluster for later 1799 %endif 1800 1801 %if !_FAT16 && !_LOAD_NON_FAT 1802 ; Load the entire FAT into memory. This is easily feasible for FAT12, 1803 ; as the FAT can only contain at most 4096 entries. 1804 ; (The exact condition should be "at most 4087 entries", or with a 1805 ; specific FF7h semantic, "at most 4088 entries"; the more reliable 1806 ; and portable alternative would be "at most 4080 entries".) 1807 ; Thus, no more than 6 KiB need to be read, even though the FAT size 1808 ; as indicated by word[sectors_per_fat] could be much higher. The 1809 ; first loop condition below is to correctly handle the latter case. 1810 ; (Sector size is assumed to be a power of two between 32 and 8192 1811 ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 1812 ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 1813 ; of memory instead of only the relevant 6 KiB. This is always true 1814 ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 1815 ; iff word[sectors_per_fat] is higher than one.) 1816 mov di, 6 << 10 ; maximum size of FAT12 to load 1817 mov cx, [VAR(sectors_per_fat)] 1818 ; maximum size of this FS's FAT 1819 %if ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && !_FIX_SECTOR_SIZE 1820 ; Under these conditions, ax here is 1821 ; below ADR_FREE_UNTIL >> 4 so the 1822 ; following cwd instruction zeros dx. 1823 cwd 1824 %else 1825 xor dx, dx 1826 %endif 1827 mov ax, [VAR(fat_start)]; = first FAT sector 1828 %if _RELOCATE 1829 ; bx already = FAT buffer segment here 1830 %else 1831 mov bx, ADR_FATBUF>>4 1832 %if _SET_FAT_SEG 1833 mov word [VAR(fat_seg)], bx 1834 %endif 1835 %endif 1836 @@: 1837 call read_sector ; read next FAT sector 1838 %if _FIX_SECTOR_SIZE 1839 sub di, _FIX_SECTOR_SIZE 1840 %else 1841 sub di, [VAR(bytes_per_sector)] 1842 %endif 1843 ; di = bytes still left to read 1844 jbe @F ; if none --> 1845 ; (jbe means jump if CF || ZF) 1846 loop @B ; if any FAT sector still remains --> 1847 @@: ; one of the limits reached; FAT read 1848 %endif 1849 0 000053AA BB0002 mov bx, _LOAD_ADR>>4 ; => load address 1851 %if _FAT16 && !_LOAD_NON_FAT 0 000053AD BFFFFF mov di, -1 ; = no FAT sector read yet 1853 %if _SET_FAT_SEG && _SET_FAT_SEG_NORMAL 1854 ; This is not strictly needed because a FAT sector is 1855 ; read in any case, initialising this variable later. 0 000053B0 897EF4 mov word [VAR(fat_sector)], di 1857 %endif 1858 %endif 1859 %if _LOAD_NON_FAT 1860 %if _SET_FAT_SEG 1861 %if _FAT16 1862 or word [VAR(fat_sector)], -1 1863 %else 1864 and word [VAR(fat_seg)], 0 1865 %endif 1866 %endif 1867 %endif 1868 1869 next_cluster: 1870 ; convert 16-bit cluster value (in SI) to 32-bit LBA sector value (in DX:AX) 1871 ; and get next cluster in SI 1872 1873 1874 ; Converts cluster number to sector number 1875 ; and finds next cluster in chain 1876 ; 1877 ; INP: si = valid cluster number 1878 ; (!_FAT16) [ADR_FATBUF] = entire FAT as read from FS 1879 ; (_FAT16) di = currently buffered FAT sector, -1 if none 1880 ; OUT: If unable to read a FAT sector, 1881 ; ! jumps to error instead of returning 1882 ; If everything is okay, 1883 ; si = next cluster number (or EOC value) 1884 ; dx:ax = sector number 1885 ; (_FAT16) di = currently buffered FAT sector 1886 ; CHG: cx 1887 1888 %if ! _LOAD_NON_FAT 1889 ; prepare to load entry from FAT 1890 1891 %if _FAT16 0 000053B3 56 push si ; preserve cluster number for later 1893 1894 ; Multiply cluster number by 2. 0 000053B4 96 xchg ax, si 1896 ; xor dx, dx ; dx:ax = entry to load (0..FFF6h) 1897 ; add ax, ax 1898 ; adc dx, dx ; dx:ax = byte offset into FAT (0..131052) 0 000053B5 99 cwd ; dx = FFFFh if ax >= 8000h, else = 0 0 000053B6 01C0 add ax, ax ; ax = (2 * ax) & FFFFh 0 000053B8 F7DA neg dx ; dx = 1 if 2 * ax overflowed, else = 0 1902 1903 ; Divide by sector size to split dx:ax into the remainder as the byte offset 1904 ; into the FAT sector, and quotient as the sector offset into the FAT. 0 000053BA F7760B div word [VAR(bytes_per_sector)] 0 000053BD 89D6 mov si, dx ; = byte offset in sector 1907 ; dx = byte offset into sector (0..8190) 1908 ; ax = sector offset into FAT (0..4095) 1909 1910 ; quotient in AX is FAT sector. 1911 ; check the FAT buffer to see if this sector is already loaded 1912 ; (simple disk cache; speeds things up a little -- 1913 ; actually, it speeds things up a lot) 0 000053BF 39F8 cmp ax, di 0 000053C1 7410 je @F 0 000053C3 89C7 mov di, ax 1917 %if _SET_FAT_SEG 0 000053C5 8946F4 mov word [VAR(fat_sector)], ax 1919 %endif 1920 1921 ; read the target FAT sector. 0 000053C8 53 push bx 1923 ; As noted above, the sector offset in ax here is 1924 ; 0..4095 (ie, 4 Ki S * 32 B/S = 128 KiB of FAT data), 1925 ; therefore this cwd instruction always zeros dx. 0 000053C9 99 cwd 0 000053CA 03460E add ax, [VAR(fat_start)] 0 000053CD 11D2 adc dx, dx ; (account for overflow) 1929 %if _RELOCATE 1930 mov bx, word [VAR(fat_seg)] 1931 call read_sector 1932 %else 0 000053CF E85600 call read_sector_fatbuf 1934 %endif 0 000053D2 5B pop bx 1936 @@: 1937 1938 ; get 16 bits from FAT 0 000053D3 26AD es lodsw 0 000053D5 96 xchg ax, si 0 000053D6 58 pop ax ; restore cluster number 1942 %else 1943 ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 1944 ; so multiply cluster number by 3 first, then divide by 2. 1945 mov ax, si ; = cluster number (up to 12 bits set) 1946 ; (remember cluster number in ax) 1947 shl si, 1 ; = 2n (up to 13 bits set) 1948 add si, ax ; = 2n+n = 3n (up to 14 bits set) 1949 shr si, 1 ; si = byte offset into FAT (0..6129) 1950 ; CF = whether to use high 12 bits 1951 %if _RELOCATE 1952 mov es, word [VAR(fat_seg)] 1953 ; es lodsw 1954 ; xchg ax, si 1955 mov si, word [es:si] 1956 %else 1957 ; Use the calculated byte offset as an offset into the FAT 1958 ; buffer, which holds all of the FAT's relevant data. 1959 ; lea si, [ADR_FATBUF + si] 1960 ; -> 16-bit word in FAT to load 1961 ; get 16 bits from FAT 1962 ; lodsw 1963 ; xchg ax, si 1964 mov si, [ADR_FATBUF + si] 1965 ; = 16-bit word in FAT to load 1966 %endif 1967 1968 mov cl, 4 1969 jc @F ; iff CY after shift --> 1970 shl si, cl ; shift up iff even entry 1971 @@: 1972 shr si, cl ; shift down (clears top 4 bits) 1973 1974 ; (ax holds cluster number) 1975 %endif 1976 1977 %else ; _LOAD_NON_FAT 1978 mov di, _LOAD_NON_FAT 1979 mov al, [VAR(sectors_per_cluster)] 1980 dec ax 1981 mov ah, 0 1982 inc ax 1983 mov cx, ax 1984 mul word [VAR(bytes_per_sector)] 1985 test dx, dx 1986 jnz @F 1987 cmp ax, di 1988 mov al, 'N' 1989 jb error 1990 @@: 1991 xchg ax, si 1992 %endif 1993 ; adjust cluster number to make it 0-based 0 000053D7 48 dec ax 0 000053D8 48 dec ax 1996 1997 %if ! _LOAD_NON_FAT 1998 %if _FIX_CLUSTER_SIZE 1999 mov cx, _FIX_CLUSTER_SIZE 2000 %else 2001 ; adjusted sectors per cluster 2002 ; decode EDR-DOS's special value 0 meaning 256 0 000053D9 8A4E0D mov cl, [VAR(sectors_per_cluster)] 0 000053DC 49 dec cx 0 000053DD B500 mov ch, 0 0 000053DF 41 inc cx 2007 %endif 2008 %endif 2009 2010 ; convert from clusters to sectors 0 000053E0 F7E1 mul cx 0 000053E2 0346FC add ax, [VAR(data_start)] 0 000053E5 1356FE adc dx, [VAR(data_start)+2] 2014 ; dx:ax = sector number 2015 2016 ; xxx - this will always load an entire cluster (e.g. 64 sectors), 2017 ; even if the file is shorter than this 2018 @@: 2019 %if ! _RELOCATE && _LOAD_ADR < ADR_FREE_UNTIL && _FIX_SECTOR_SIZE 2020 cmp bx, (ADR_FREE_UNTIL >> 4) - (_FIX_SECTOR_SIZE >> 4) 2021 %else 0 000053E8 3B5EEC cmp bx, [VAR(last_available_sector)] 2023 %endif 2024 %if _MEMORY_CONTINUE 0 000053EB 770F ja @F 2026 %else 2027 ja error_filetoobig 2028 %endif 2029 %if _FAT16 && ! _LOAD_NON_FAT 0 000053ED 06 push es ; (must preserve ADR_FATBUF reference) 2031 %endif 0 000053EE E83D00 call read_sector 2033 %if _FAT16 && ! _LOAD_NON_FAT 0 000053F1 07 pop es 2035 %endif 2036 %if _SET_LOAD_SEG 0 000053F2 895EFA mov [VAR(load_seg)], bx ; => after last read data 2038 %endif 2039 %if _LOAD_NON_FAT 2040 sub di, word [VAR(bytes_per_sector)] 2041 ja @B 2042 %else 0 000053F5 E2F1 loop @B 2044 2045 %if _FAT16 2046 ; FFF7h: bad cluster 2047 ; FFF8h-FFFFh: end of cluster chain 0 000053F7 83FEF7 cmp si, 0FFF7h 2049 %else 2050 ; 0FF7h: bad cluster 2051 ; 0FF8h-0FFFh: end of cluster chain 2052 cmp si, 0FF7h 2053 %endif 0 000053FA 72B7 jb next_cluster 2055 %endif ; _LOAD_NON_FAT 2056 @@: 2057 2058 %if _WARN_PART_SIZE 2059 %assign num $ - read_fat_start 2060 %warning read_fat size is num bytes 2061 %endif 2062 2063 2064 finish_start: 2065 %if _LOAD_MIN_PARA 2066 %if ((_LOAD_ADR >> 4) + _LOAD_MIN_PARA) & 255 == 0 2067 ; If the value is divisible by 256 we can compare only the 2068 ; high byte for the same CF result: NC iff bx >= limit. 0 000053FC 80FF03 cmp bh, ((_LOAD_ADR >> 4) + _LOAD_MIN_PARA) >> 8 2070 %else 2071 cmp bx, (_LOAD_ADR >> 4) + _LOAD_MIN_PARA 2072 %endif 0 000053FF B045 mov al, 'E' 0 00005401 7211 jb error 2075 %endif 2076 2077 %if _TURN_OFF_FLOPPY 2078 ; turn off floppy motor 2079 mov dx,3F2h 2080 mov al,0 2081 out dx,al 2082 %endif 2083 2084 ; Set-up registers for and jump to loaded file 2085 ; Already: ss:bp-> boot sector containing BPB 2086 %if _CHECKVALUE 2087 CHECKLINEAR equ _LOAD_ADR + _CHECKOFFSET 2088 %if ! _RELOCATE && CHECKLINEAR <= (64 * 1024 - 2) 0 00005403 813EFC236C44 cmp word [CHECKLINEAR], _CHECKVALUE 2090 %else 2091 mov ax, CHECKLINEAR >> 4 2092 mov es, ax 2093 cmp word [es:CHECKLINEAR & 15], _CHECKVALUE 2094 %endif 0 00005409 B056 mov al, 'V' ; check 'V'alue mismatch 0 0000540B 7507 jne error 2097 %endif 2098 %if _SET_DL_UNIT 2099 mov dl, [VAR(boot_unit)]; set dl to unit 2100 %endif 2101 %if _SET_DI_CLUSTER && (_PUSH_DPT || _SET_DSSI_DPT) 2102 pop cx 2103 %endif 2104 %if _DATASTART_HIDDEN 2105 mov bx, [VAR(hidden_sectors + 0)] 2106 mov ax, [VAR(hidden_sectors + 2)] 2107 add word [VAR(data_start + 0)], bx 2108 adc word [VAR(data_start + 2)], ax 2109 %endif 2110 %if _SET_BL_UNIT 2111 %if _SET_DL_UNIT 2112 mov bl, dl ; set bl to unit, too 2113 %else 2114 mov bl, [VAR(boot_unit)]; set bl to unit 2115 %endif 2116 %endif 2117 %if _PUSH_DPT || _SET_DSSI_DPT 2118 %ifn _SET_DSSI_DPT ; (implying that only _PUSH_DPT is set) 2119 %if _RELOCATE 2120 xor ax, ax 2121 mov es, ax 2122 mov di, 1Eh * 4 2123 les si, [es:di] 2124 push es 2125 push si 2126 push ax 2127 push di 2128 %else 2129 mov di, 1Eh*4 2130 les si, [di] ; -> original (also current) DPT 2131 push es 2132 push si ; original (also current) DPT address 2133 push ss 2134 push di ; 0000h:0078h (address of 1Eh IVT entry) 2135 %endif 2136 %else 2137 %if _RELOCATE 2138 xor ax, ax 2139 mov ds, ax 2140 %endif 2141 mov di, 1Eh*4 2142 lds si, [di] ; -> original (also current) DPT 2143 %if _PUSH_DPT 2144 push ds 2145 push si ; original (also current) DPT address 2146 %if _RELOCATE 2147 push ax 2148 push di 2149 %else 2150 push ss 2151 push di ; 0000h:0078h (address of 1Eh IVT entry) 2152 %endif 2153 %endif 2154 %endif 2155 %else 2156 %if _RELOCATE && (_ZERO_ES || _ZERO_DS) 2157 xor ax, ax 2158 %endif 2159 %endif 2160 %if _RELOCATE 2161 %if _ZERO_ES 2162 mov es, ax 2163 %endif 2164 %if _ZERO_DS 2165 mov ds, ax 2166 %endif 2167 %endif 2168 2169 %if _SET_AXBX_DATA 2170 mov bx, [VAR(data_start)] 2171 mov ax, [VAR(data_start+2)] 2172 %endif 2173 %if _SET_DI_CLUSTER 2174 %if _PUSH_DPT || _SET_DSSI_DPT 2175 mov di, cx 2176 %else 2177 pop di 2178 %endif 2179 %endif 2180 %if ! _RELOCATE 2181 %if _ZERO_ES 2182 push ss 2183 pop es 2184 %endif 2185 %endif 2186 ; ss:bp-> boot sector with BPB 0 0000540D EA00040002 jmp (_LOAD_ADR>>4)+_EXEC_SEG_ADJ:_EXEC_OFS 2188 2189 2190 %if _WARN_PART_SIZE 2191 %assign num $ - finish_start 2192 %warning finish size is num bytes 2193 %endif 2194 2195 2196 %if ! _RELOCATE 2197 errorhandler 840 <1> %if _TMPINC 841 <1> %include "error.tmp" 1 <2> ; Auto-generated file, do not edit. 2 <2> 3 <2> error_start: 4 <2> 5 <2> read_sector.err: 0 00005412 B052 mov al, 'R' ; Disk 'R'ead error 7 <2> %if ! _MEMORY_CONTINUE || _RELOCATE || _LOAD_ADR >= ADR_FREE_FROM || _LOAD_CHECK_MAX_SIZE 8 <2> db __TEST_IMM16 ; (skip mov) 9 <2> error_filetoobig: 10 <2> error_memory: 11 <2> mov al,'M' ; Not enough 'M'emory 12 <2> %endif 13 <2> 14 <2> error: 15 <2> %if _RELOCATE 16 <2> mov bx, 7 17 <2> mov ds, bx 18 <2> mov bh, [462h - 70h] 19 <2> %else 0 00005414 8A3E6204 mov bh, [462h] 0 00005418 B307 mov bl, 7 22 <2> %endif 0 0000541A B40E mov ah, 0Eh 0 0000541C CD10 int 10h ; display character 0 0000541E B007 mov al, 07h 0 00005420 CD10 int 10h ; beep! 27 <2> 0 00005422 31C0 xor ax, ax ; await key pressed 0 00005424 CD16 int 16h 30 <2> 0 00005426 CD19 int 19h ; re-start the boot process 32 <2> 33 <2> %if _WARN_PART_SIZE 34 <2> %assign num $ - error_start 35 <2> %warning error size is num bytes 36 <2> %endif 842 <1> [list -] 883 <1> %endif 2198 2199 readhandler 888 <1> %if _TMPINC 889 <1> %include "read.tmp" 1 <2> ; Auto-generated file, do not edit. 2 <2> 3 <2> read_sector_start: 4 <2> ; INP: dx:ax = sector 5 <2> ; OUT: only if successful 6 <2> ; dx:ax = incremented 7 <2> ; bx => behind read sector 8 <2> ; es = ADR_FATBUF>>4 = ADR_DIRBUF>>4 9 <2> ; CHG: - 10 <2> %if ! _RELOCATE 11 <2> %if ADR_DIRBUF == ADR_FATBUF 12 <2> read_sector_dirbuf: 13 <2> %endif 14 <2> %if _FAT16 && ! _LOAD_NON_FAT 15 <2> read_sector_fatbuf: 16 <2> %endif 17 <2> %if (ADR_DIRBUF == ADR_FATBUF) || (_FAT16 && ! _LOAD_NON_FAT) 0 00005428 BBE007 mov bx, ADR_FATBUF>>4 19 <2> %if _FAT16 && _SET_FAT_SEG && ! _LOAD_NON_FAT 0 0000542B 895EF8 mov word [VAR(fat_seg)], bx 21 <2> ; Optimisation: Set FAT buffer segment here where 22 <2> ; we have it ready in a register, instead of 23 <2> ; wasting a word immediate on it. If the FAT is 24 <2> ; never read then we do not need to set the 25 <2> ; variable anyway, only the sector variable has 26 <2> ; to contain a -1 to indicate it's uninitialised. 27 <2> ; If we get here from read_sector_dirbuf we will 28 <2> ; also initialise this variable but that does not 29 <2> ; cause any problems. 30 <2> %endif 31 <2> %endif 32 <2> %endif 33 <2> 34 <2> ; Read a sector using Int13.02 or Int13.42 35 <2> ; 36 <2> ; INP: dx:ax = sector number within partition 37 <2> ; bx => buffer 38 <2> ; (_LBA) ds = ss 39 <2> ; OUT: If unable to read, 40 <2> ; ! jumps to error instead of returning 41 <2> ; If sector has been read, 42 <2> ; dx:ax = next sector number (has been incremented) 43 <2> ; bx => next buffer (bx = es+word[para_per_sector]) 44 <2> ; es = input bx 45 <2> ; CHG: - 46 <2> read_sector: 0 0000542E 52 push dx 0 0000542F 51 push cx 0 00005430 50 push ax 0 00005431 56 push si 51 <2> 0 00005432 8EC3 mov es, bx ; => buffer 53 <2> 54 <2> ; DX:AX==LBA sector number 55 <2> ; add partition start (= number of hidden sectors) 0 00005434 03461C add ax,[VAR(hidden_sectors + 0)] 0 00005437 13561E adc dx,[VAR(hidden_sectors + 2)] 58 <2> %if (!_LBA || !_LBA_33_BIT) && _LBA_CHECK_NO_33 59 <2> jc .err 60 <2> %endif 61 <2> %if _LBA ; +70 bytes (with CHS, +63 bytes without CHS) 62 <2> %if _LBA_33_BIT 0 0000543A 19F6 sbb si, si ; -1 if was CY, 0 else 0 0000543C F7DE neg si ; 1 if was CY, 0 else 65 <2> %endif 0 0000543E 31C9 xor cx, cx 0 00005440 51 push cx ; highest word = 0 68 <2> %if _LBA_33_BIT 0 00005441 56 push si ; bit 32 = 1 if operating in 33-bit space 70 <2> %else 71 <2> push cx ; second highest word = 0 72 <2> %endif 0 00005442 52 push dx 0 00005443 50 push ax ; = qword sector number 0 00005444 53 push bx 0 00005445 51 push cx ; bx => buffer 0 00005446 41 inc cx 0 00005447 51 push cx ; word number of sectors to read 0 00005448 B110 mov cl, 10h 0 0000544A 51 push cx ; word size of disk address packet 0 0000544B 89E6 mov si, sp ; ds:si -> disk address packet (on stack) 82 <2> 83 <2> %if _LBA_SKIP_CHECK ; -14 bytes 0 0000544D 8A5624 mov dl, [VAR(boot_unit)] 85 <2> %else 86 <2> %if _LBA_WORKAROUND 87 <2> push ds 88 <2> mov bx, 40h 89 <2> mov ds, bx 90 <2> ; Setting ds = 40h for the function 41h detection is a workaround 91 <2> ; for a bug in the Book8088's Xi8088 BIOS. Refer to 92 <2> ; https://www.bttr-software.de/forum/forum_entry.php?id=21275 93 <2> %endif 94 <2> mov ah, 41h 95 <2> mov dl, [VAR(boot_unit)] 96 <2> mov bx, 55AAh 97 <2> stc 98 <2> int 13h ; 13.41.bx=55AA extensions installation check 99 <2> %if _LBA_WORKAROUND 100 <2> pop ds 101 <2> %endif 102 <2> jc .no_lba 103 <2> cmp bx, 0AA55h 104 <2> jne .no_lba 105 <2> shr cl, 1 ; support bitmap bit 0 106 <2> jnc .no_lba 107 <2> %endif 108 <2> 109 <2> %if _LBA_RETRY 110 <2> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 111 <2> stc 112 <2> %endif 113 <2> mov ah, 42h 114 <2> int 13h ; 13.42 extensions read 115 <2> jnc .lba_done 116 <2> 117 <2> %if _RETRY_RESET 118 <2> xor ax, ax 119 <2> int 13h ; reset disk 120 <2> %endif 121 <2> 122 <2> ; have to reset the LBAPACKET's lpCount, as the handler may 123 <2> ; set it to "the number of blocks successfully transferred". 124 <2> ; (in any case, the high byte is still zero.) 125 <2> mov byte [si + 2], 1 126 <2> %endif 127 <2> 128 <2> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00005450 F9 stc 130 <2> %endif 0 00005451 B442 mov ah, 42h 0 00005453 CD13 int 13h 133 <2> %if _LBA_SKIP_CHECK && _CHS 134 <2> %if _LBA_SKIP_ANY 135 <2> jc .no_lba 136 <2> %else 0 00005455 7205 jc .lba_check_error_1 138 <2> %endif 139 <2> %else 140 <2> .cy_err: 141 <2> jc .lba_error 142 <2> %endif 143 <2> 144 <2> .lba_done: 145 <2> %if _CHS && _LBA_SET_TYPE 146 <2> mov byte [bp + 2], 0Eh ; LBA-enabled FAT16 FS partition type 147 <2> %endif 0 00005457 83C410 add sp, 10h 149 <2> %if _CHS 0 0000545A EB46 jmp short .done 151 <2> %endif 152 <2> 153 <2> .lba_error: equ .err 154 <2> 155 <2> %if !_CHS 156 <2> .no_lba: equ .err 157 <2> %else 158 <2> %if _LBA_SKIP_CHECK 159 <2> %if ! _LBA_SKIP_ANY 160 <2> .lba_check_error_1: 0 0000545C 80FC01 cmp ah, 1 ; invalid function? 0 0000545F 75B1 jne .lba_error ; no, other error --> 163 <2> ; try CHS instead 164 <2> %endif 165 <2> .cy_err: equ .err 166 <2> %endif 167 <2> .no_lba: 0 00005461 83C408 add sp, 8 0 00005464 59 pop cx ; cx = low word of sector 0 00005465 58 pop ax 0 00005466 5A pop dx ; dx:ax = middle two words of sector 172 <2> ; Here dx <= 1 if _LBA_33_BIT, else zero. 173 <2> ; If dx is nonzero then the CHS calculation 174 <2> ; should fail. If CHS sectors is equal to 1 175 <2> ; (very unusual) then the div may fail. Else, 176 <2> ; we will detect a cylinder > 1023 eventually. 0 00005467 5E pop si ; discard highest word of qword 178 <2> %endif 179 <2> %endif 180 <2> 181 <2> %if !_LBA 182 <2> .cy_err: equ .err 183 <2> %endif 184 <2> 185 <2> %if _CHS ; +70 bytes 186 <2> ; dx:ax = LBA sector number, (if _LBA) cx = 0 187 <2> ; divide by number of sectors per track to get sector number 188 <2> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 189 <2> ; Use two-step 32:16 divide to avoid overflow 190 <2> %if !_LBA 191 <2> xchg cx, ax ; cx = low word of sector, clobbers ax 192 <2> xchg ax, dx ; ax = high word of sector, clobbers dx 193 <2> xor dx, dx ; dx:ax = high word of sector 194 <2> %else 195 <2> ; from the .no_lba popping we already have: 196 <2> ; cx = low word of sector 197 <2> ; dx:ax = high word of sector 198 <2> %endif 0 00005468 F77618 div word [VAR(sectors_per_track)] 0 0000546B 91 xchg cx,ax 0 0000546C F77618 div word [VAR(sectors_per_track)] 0 0000546F 87CA xchg cx,dx 203 <2> 204 <2> ; DX:AX=quotient, CX=remainder=sector (S) - 1 205 <2> ; divide quotient by number of heads 0 00005471 93 xchg bx, ax ; bx = low word of quotient, clobbers ax 0 00005472 92 xchg ax, dx ; ax = high word of quotient, clobbers dx 0 00005473 31D2 xor dx, dx ; dx = 0 0 00005475 F7761A div word [VAR(heads)] 210 <2> ; ax = high / heads, dx = high % heads 0 00005478 93 xchg bx, ax ; bx = high / heads, ax = low quotient 0 00005479 F7761A div word [VAR(heads)] 213 <2> 214 <2> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 215 <2> ; move variables into registers for INT 13h AH=02h 0 0000547C 88D6 mov dh, dl ; dh = head 0 0000547E 41 inc cx ; cl5:0 = sector 0 0000547F 86E8 xchg ch, al ; ch = cylinder 7:0, al = 0 0 00005481 D1E8 shr ax, 1 0 00005483 D1E8 shr ax, 1 ; al7:6 = cylinder 9:8 221 <2> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 0 00005485 08FB or bl, bh ; collect set bits from bh 0 00005487 08C1 or cl, al ; cl7:6 = cylinder 9:8 224 <2> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 0 00005489 08E3 or bl, ah ; collect set bits from ah 0 0000548B 8A5624 mov dl,[VAR(boot_unit)] ; dl = drive 227 <2> .nz_err: 0 0000548E 7582 jnz .err ; error if cylinder >= 1024 --> 229 <2> ; ! bx = 0 (for 13.02 call) 230 <2> 231 <2> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 232 <2> ; may fail if we cross a track or 64K boundary 233 <2> %if _CHS_RETRY_REPEAT 0 00005490 BE1100 mov si, _CHS_RETRY_REPEAT + 1 235 <2> %if _CHS_RETRY_NORMAL && _RETRY_RESET 0 00005493 A9 db __TEST_IMM16 ; (skip int 13h) 237 <2> .loop_chs_retry_repeat: 0 00005494 CD13 int 13h ; reset disk 239 <2> %elif _RETRY_RESET 240 <2> .loop_chs_retry_repeat: 241 <2> xor ax, ax 242 <2> int 13h ; reset disk 243 <2> %else 244 <2> .loop_chs_retry_repeat: 245 <2> %endif 0 00005496 4E dec si ; another attempt ? 0 00005497 78F5 js .nz_err ; no --> 0 00005499 B80102 mov ax, 0201h 0 0000549C CD13 int 13h ; read one sector 250 <2> %if _CHS_RETRY_NORMAL && _RETRY_RESET 0 0000549E 89D8 mov ax, bx ; ax = 0 252 <2> %endif 0 000054A0 72F2 jc .loop_chs_retry_repeat 254 <2> ; fall through to .done 255 <2> %else 256 <2> mov ax, 0201h 257 <2> %if _CHS_RETRY 258 <2> %if _RETRY_RESET 259 <2> ; In this case we cannot store to the stack and 260 <2> ; pop the value at the right moment for both 261 <2> ; cases of the "jnc .done" branch. So use the 262 <2> ; original code to re-init ax to 0201h. 263 <2> int 13h ; read one sector 264 <2> jnc .done 265 <2> ; reset drive 266 <2> xor ax, ax 267 <2> int 13h 268 <2> mov ax, 0201h 269 <2> %else 270 <2> push ax 271 <2> int 13h ; read one sector 272 <2> pop ax ; restore ax = 0201h 273 <2> jnc .done 274 <2> %endif 275 <2> %endif 276 <2> ; try read again 277 <2> int 13h 278 <2> %if _LBA_SKIP_CHECK 279 <2> inc bx 280 <2> jc .nz_err 281 <2> %else 282 <2> jc .cy_err 283 <2> %endif 284 <2> %endif 285 <2> 286 <2> %endif ; _CHS 287 <2> 288 <2> .done: 289 <2> ; increment segment 0 000054A2 8CC3 mov bx, es 291 <2> %if _FIX_SECTOR_SIZE 292 <2> add bx, _FIX_SECTOR_SIZE >> 4 293 <2> %else 0 000054A4 035EEE add bx, [VAR(para_per_sector)] 295 <2> %endif 296 <2> 0 000054A7 5E pop si 0 000054A8 58 pop ax 0 000054A9 59 pop cx 0 000054AA 5A pop dx 301 <2> ; increment LBA sector number 0 000054AB 40 inc ax 0 000054AC 7501 jne @F 0 000054AE 42 inc dx 305 <2> @@: 306 <2> 0 000054AF C3 retn 308 <2> 309 <2> %if _WARN_PART_SIZE 310 <2> %assign num $ - read_sector_start 311 <2> %warning read_sector size is num bytes 312 <2> %endif 890 <1> [list -] 1207 <1> %endif 2200 %endif 2201 2202 2203 %if !_NO_LIMIT 2204 available: 0 000054B0 26 _fill 508,38,start 2206 2207 signatures: 0 000054BC 0000 dw 0 2209 ; 2-byte magic bootsector signature 0 000054BE 55AA dw 0AA55h 2211 2212 %assign num signatures-available 2213 %assign fatbits 12 2214 %if _FAT16 2215 %assign fatbits 16 2216 %endif 2217 %warning FAT%[fatbits]: num bytes still available. 2217 ****************** warning: FAT16: 12 bytes still available. [-w+user] 2218 %endif 2219 2220 end: 248 .end: 249 %if (fat16_payload.end - fat16_payload) != 512 250 %error "FAT16 payload isn't 512 bytes sized." 251 %endif 252 %endif 253 %if _FAT32 254 00000400 fat32_payload: noteincbin _PAYLOAD_FAT32, _PAYLOAD_FAT32_LST 254 ------------------ note: include listing file 'lst/boot32.lst' 1 2 %if 0 3 4 File system boot sector loader code for FAT32 5 6 Adapted from 2002-11-26 fatboot.zip/fat12.asm, 7 released as public domain by Chris Giese 8 9 Public domain by E. C. Masloch, 2012--2024 10 11 %endif 12 13 14 %include "lmacros2.mac" 1 <1> [list -] 14 <1> [list -] 15 16 %ifndef _MAP 17 %elifempty _MAP 18 %else ; defined non-empty, str or non-str 19 [map all _MAP] 20 %endif 21 22 defaulting 23 24 strdef OEM_NAME, " lDOS" 25 strdef OEM_NAME_FILL, '_' 26 strdef DEFAULT_LABEL, "lDOS" 27 numdef VOLUMEID, 0 28 strdef FSIBOOTNAME, "FSIBOOT5" 29 ; used to set experimental name 30 ; strdef FSIBOOTNAME, "FSIBEX05" 31 32 strdef LOAD_NAME, "LDOS" 33 strdef LOAD_EXT, "COM" ; name of file to load 34 numdef LOAD_ADR, 02000h ; where to load 35 numdef LOAD_MIN_PARA, paras(1536) 36 numdef LOAD_CHECK_MAX_SIZE, 0 37 numdef LOAD_CHECK_MAX_SIZE_FATPLUS, 1 38 numdef EXEC_SEG_ADJ, 0 ; how far cs will be from _LOAD_ADR 39 numdef EXEC_OFS, 400h ; what value ip will be 40 numdef CHECKOFFSET, 1020 41 numdef CHECKVALUE, "lD" 42 numdef LOAD_STACK, 512 ; default stack size (use 256 for DR-DOS) 43 numdef LOAD_DIR_SEG, 0 ; => where to store dir entry (0 if nowhere) 44 numdef ADD_SEARCH, 0 ; whether to search second file 45 strdef ADD_NAME, "" 46 strdef ADD_EXT, "" ; name of second file to search 47 numdef ADD_DIR_SEG, 0 ; => where to store dir entry (0 if nowhere) 48 49 numdef QUERY_GEOMETRY, 1 ; query geometry via 13.08 (for CHS access) 50 numdef QUERY_GEOMETRY_DISABLED, 0 51 numdef USE_PART_INFO, 1 ; use ds:si-> partition info from MBR, if any 52 numdef USE_PART_INFO_DISABLED, 0 53 numdef USE_AUTO_UNIT, 1 ; use unit passed from ROM-BIOS in dl 54 numdef RPL, 1 ; support RPL and do not overwrite it 55 numdef CHS, 1 ; support CHS (if it fits) 56 numdef LBA, 1 ; support LBA (if available) 57 numdef LBA_33_BIT, 1 ; support 33-bit LBA 58 numdef LBA_CHECK_NO_33, 1 ; else: check that LBA doesn't carry 59 60 numdef RELOCATE, 0 ; relocate the loader to top of memory 61 numdef SET_DL_UNIT, 0 ; if to pass unit in dl 62 numdef SET_BL_UNIT, 0 ; if to pass unit in bl as well 63 numdef SET_AXBX_DATA, 0 ; if to pass first data sector in ax:bx 64 numdef SET_DSSI_DPT, 0 ; if to pass DPT address in ds:si 65 numdef PUSH_DPT, 0 ; if to push DPT address 66 numdef MEMORY_CONTINUE, 1 ; if to just execute when memory full 67 numdef SET_SIDI_CLUSTER,0 ; if to pass first load file cluster in si:di 68 numdef TURN_OFF_FLOPPY, 0 ; if to turn off floppy motor after loading 69 numdef DATASTART_HIDDEN,0 ; if to add hidden sectors to data_start 70 numdef LBA_SET_TYPE, 0 ; if to set third byte to LBA partition type 71 numdef SET_LOAD_SEG, 1 ; if to set load_seg (word [ss:bp - 6]) 72 numdef SET_FAT_SEG, 1 ; if to set fat_seg (word [ss:bp - 8]) 73 numdef SET_CLUSTER, 1 ; if to set first_cluster (dword [ss:bp - 16]) 74 numdef ZERO_ES, 0 ; if to set es = 0 before jump 75 numdef ZERO_DS, 0 ; if to set ds = 0 before jump 76 77 numdef FIX_SECTOR_SIZE, 0 ; fix sector size (0 = disable, else = sector size) 78 numdef FIX_SECTOR_SIZE_SKIP_CHECK, 0 ; don't check sector size 79 numdef FIX_CLUSTER_SIZE, 0 ; fix cluster size 80 numdef FIX_CLUSTER_SIZE_SKIP_CHECK, 0 ; don't check cluster size 81 numdef NO_LIMIT, 0 ; allow using more memory than a boot sector 82 ; also will not write 0AA55h signature! 83 numdef WARN_PART_SIZE, 0 84 85 numdef LBA_SKIP_CHECK, 0 ; don't use proper LBA extensions check 86 numdef LBA_WORKAROUND, 1 ; when checking for LBA set ds = 40h 87 numdef LBA_SKIP_CY, 1 ; skip check: set up CY before 13.42 88 numdef LBA_SKIP_ANY, 0 ; skip check: try CHS on any error 89 incdef _LBA_SKIP_ANY, LBA_SKIP_CY 90 numdef LBA_RETRY, 0 ; retry LBA reads one time 91 numdef CHS_RETRY, 1 ; retry CHS reads one time 92 numdef CHS_RETRY_REPEAT,16 ; retry CHS reads multiple times 93 ; (value of the def is used as count) 94 numdef CHS_RETRY_NORMAL,1 ; do not use aggressive optimisation 95 numdef RETRY_RESET, 1 ; call reset disk system 13.00 on retries 96 97 ; Unlike the 1440 KiB diskette image defaults for the FAT12 98 ; loader we just fill the BPB with zeros by default. 99 numdef MEDIAID, 0 ; media ID 100 numdef UNIT, 0 ; load unit in BPB 101 numdef CHS_SECTORS, 0 ; CHS geometry field for sectors 102 numdef CHS_HEADS, 0 ; CHS geometry field for heads 103 numdef HIDDEN, 0 ; number of hidden sectors 104 numdef SPI, 0 ; sectors per image 105 numdef BPS, 0 ; bytes per sector 106 numdef SPC, 0 ; sectors per cluster 107 numdef SPF, 0 ; sectors per FAT 108 numdef SECTOR_FSINFO, 0 ; FSINFO sector 109 numdef SECTOR_BACKUP, 0 ; backup boot sector 110 numdef CLUSTER_ROOT, 0 ; root directory first cluster 111 numdef NUMFATS, 0 ; number of FATs 112 numdef NUMRESERVED, 0 ; number of reserved sectors 113 114 numdef COMPAT_FREEDOS, 0 ; partial FreeDOS load compatibility 115 numdef COMPAT_DR, 0 ; partial DR-DOS load compatibility 116 numdef COMPAT_IBM, 0 ; partial IBMDOS load compatibility 117 numdef COMPAT_MS7, 0 ; partial MS-DOS 7 load compatibility 118 numdef COMPAT_LDOS, 0 ; lDOS load compatibility 119 120 %if (!!_COMPAT_FREEDOS + !!_COMPAT_DR + !!_COMPAT_IBM + !!_COMPAT_MS7 + !!_COMPAT_LDOS) > 1 122 %error At most one set must be selected. 123 %endif 124 125 %if _COMPAT_FREEDOS 126 strdef LOAD_NAME, "KERNEL" 127 strdef LOAD_EXT, "SYS" 128 numdef LOAD_ADR, 00600h 129 numdef LOAD_MIN_PARA, paras(512) 130 numdef EXEC_SEG_ADJ, 0 131 numdef EXEC_OFS, 0 132 numdef CHECKVALUE, 0 133 134 numdef SET_BL_UNIT, 1 135 numdef MEMORY_CONTINUE, 0 136 numdef RELOCATE, 1 137 ; The FreeDOS load protocol mandates that the entire file be loaded. 138 %endif 139 140 %if _COMPAT_IBM 141 strdef LOAD_NAME, "IBMBIO" 142 strdef LOAD_EXT, "COM" 143 numdef LOAD_ADR, 00700h 144 numdef LOAD_MIN_PARA, paras(512) 145 numdef EXEC_SEG_ADJ, 0 146 numdef EXEC_OFS, 0 147 numdef CHECKVALUE, 0 148 numdef LOAD_DIR_SEG, 50h 149 numdef ADD_SEARCH, 1 150 strdef ADD_NAME, "IBMDOS" 151 strdef ADD_EXT, "COM" 152 numdef ADD_DIR_SEG, 52h 153 ; Note: The IBMBIO.COM directory entry must be stored at 154 ; 0:500h, and the IBMDOS.COM directory entry at 0:520h. 155 156 numdef SET_DL_UNIT, 1 157 numdef MEMORY_CONTINUE, 1 158 ; 3 sectors * 512 BpS should suffice. We load into 700h--7A00h, 159 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 160 numdef SET_AXBX_DATA, 1 161 numdef DATASTART_HIDDEN,1 162 numdef SET_DSSI_DPT, 1 163 numdef PUSH_DPT, 1 164 %endif 165 166 %if _COMPAT_DR 167 strdef LOAD_NAME, "IBMBIO" 168 strdef LOAD_EXT, "COM" 169 numdef LOAD_ADR, 00700h 170 numdef LOAD_STACK, 256 171 ; Shrinking the stack allows to boot a file of up to 29 KiB 172 ; given a sector size of <= 1 KiB. 173 numdef LOAD_MIN_PARA, paras(512) 174 numdef EXEC_SEG_ADJ, 0 175 numdef EXEC_OFS, 0 176 numdef CHECKVALUE, 0 177 178 numdef SET_DL_UNIT, 1 179 numdef MEMORY_CONTINUE, 1 180 ; Memory continue must certainly be set to boot off file 181 ; systems with >= 32 KiB per cluster and may be needed 182 ; even for smaller cluster sizes that are still > 1 KiB. 183 numdef LOAD_CHECK_MAX_SIZE, 1 184 ; In conjunction with _MEMORY_CONTINUE this enables erroring 185 ; out if the actual file data is too large to load it, but 186 ; avoids the need to load the entire last cluster. 187 188 numdef SET_AXBX_DATA, 0 189 numdef DATASTART_HIDDEN,0 190 numdef SET_DSSI_DPT, 0 191 numdef PUSH_DPT, 0 192 ; None of these options seem needed for DR-DOS. Note that 193 ; disabling them will fail if we actually load our lDOS 194 ; iniload as it expects these options enabled. 195 %endif 196 197 %if _COMPAT_MS7 198 strdef LOAD_NAME, "IO" 199 strdef LOAD_EXT, "SYS" 200 numdef LOAD_ADR, 00700h 201 numdef LOAD_MIN_PARA, paras(1024) 202 numdef EXEC_SEG_ADJ, 0 203 numdef EXEC_OFS, 200h 204 numdef CHECKVALUE, 0 205 206 numdef SET_DL_UNIT, 1 207 numdef SET_DSSI_DPT, 0 208 numdef PUSH_DPT, 1 209 numdef MEMORY_CONTINUE, 1 210 ; 4 sectors * 512 BpS should suffice. We load into 700h--7A00h, 211 ; ie >= 6000h bytes (24 KiB), <= 7300h bytes (28.75 KiB). 212 numdef SET_SIDI_CLUSTER,1 213 numdef DATASTART_HIDDEN,1 214 numdef LBA_SET_TYPE, 1 215 %endif 216 217 %if _COMPAT_LDOS 218 strdef LOAD_NAME, "LDOS" 219 strdef LOAD_EXT, "COM" 220 numdef LOAD_ADR, 02000h 221 numdef LOAD_MIN_PARA, paras(1536) 222 numdef EXEC_SEG_ADJ, 0 223 numdef EXEC_OFS, 400h 224 numdef CHECKOFFSET, 1020 225 numdef CHECKVALUE, "lD" 226 227 numdef SET_DL_UNIT, 0 228 numdef SET_CLUSTER, 1 229 numdef SET_FAT_SEG, 1 230 numdef SET_LOAD_SEG, 1 231 numdef MEMORY_CONTINUE, 1 232 numdef DATASTART_HIDDEN,0 233 %endif 234 235 %if 0 236 237 Notes about partial load compatibilities 238 239 * FreeDOS: 240 * Relocates to an address other than 27A00h (1FE0h:7C00h) 241 * DR-DOS: 242 * Must enable _MEMORY_CONTINUE to load off file systems with cluster 243 sizes > 1 KiB (depending on file size) or >= 32 KiB (certainly) 244 * Will not load whole file if _MEMORY_CONTINUE is enabled and file 245 data exceeds 29 KiB, without erroring out. The new option called 246 _LOAD_CHECK_MAX_SIZE has been added to address this. 247 * Disables DPT, data start, and directory entry to 00500h options by 248 default so loading a faithful IBMDOS v4+ kernel will fail as msload 249 or lDOS iniload need these options to operate 250 * IBMDOS: 251 * Does not actually relocate DPT, just provide its address 252 * MS-DOS 7: 253 * Does not actually relocate DPT, just provide its address 254 * Does not contain message table used by loader 255 256 %endif 257 258 %if _SET_BL_UNIT && _SET_AXBX_DATA 259 %error Cannot select both of these options! 260 %endif 261 262 263 %assign LOADLIMIT 0A0000h 264 %assign POSITION 07C00h 265 266 %if _FIX_SECTOR_SIZE 267 %assign i 5 268 %rep 13-5 269 %if (1 << i) != (_FIX_SECTOR_SIZE) 270 %assign i i+1 271 %endif 272 %endrep 273 %if (1 << i) != (_FIX_SECTOR_SIZE) 274 %error Invalid sector size _FIX_SECTOR_SIZE 275 %endif 276 %endif 277 278 %if _FIX_CLUSTER_SIZE 279 %if _FIX_CLUSTER_SIZE > 256 280 %error Invalid cluster size _FIX_CLUSTER_SIZE 281 %endif 282 %assign i 0 283 %rep 8-0 284 %if (1 << i) != (_FIX_CLUSTER_SIZE) 285 %assign i i+1 286 %endif 287 %endrep 288 %if (1 << i) != (_FIX_CLUSTER_SIZE) 289 %warning Non-power-of-two cluster size _FIX_CLUSTER_SIZE 290 %endif 291 %endif 292 293 294 %if (_LOAD_ADR & 0Fh) 295 %error Load address must be on a paragraph boundary 296 %endif 297 298 %if _LOAD_ADR > LOADLIMIT 299 %error Load address must be in LMA 300 %elif _LOAD_ADR < 00500h 301 %error Load address must not overlap IVT or BDA 302 %endif 303 %if ! _RELOCATE 304 %if _LOAD_ADR > (POSITION-512) && _LOAD_ADR < (POSITION+1024) 305 %error Load address must not overlap loader 306 %endif 307 %endif 308 309 %if ((_EXEC_SEG_ADJ<<4)+_EXEC_OFS) < 0 310 %error Execution address must be in loaded file 311 %elif ((_EXEC_SEG_ADJ<<4)+_EXEC_OFS+_LOAD_ADR) > LOADLIMIT 312 %error Execution address must be in LMA 313 %endif 314 315 %if (_EXEC_OFS & ~0FFFFh) 316 %error Execution offset must fit into 16 bits 317 %endif 318 319 %if (_EXEC_SEG_ADJ > 0FFFFh || _EXEC_SEG_ADJ < -0FFFFh) 320 %error Execution segment adjustment must fit into 16 bits 321 %endif 322 323 324 %if !_CHS && _QUERY_GEOMETRY 325 %warning No CHS support but querying geometry anyway 326 %endif 327 328 %if !_CHS && !_LBA 329 %error Either CHS or LBA or both must be enabled 330 %endif 331 332 333 %if 0 334 335 There is some logic inside MS-DOS's hard disk partition initialisation 336 code that sets up several requirements for us to fulfil. Otherwise, 337 it will not accept the information given in the BPB (using default 338 information based on the length as specified by MBR/EPBR instead) or 339 make the whole file system inaccessible except for formatting. Both of 340 those are undesirable of course. Some/all(?) checks are documented on 341 pages 601,602 in "DOS Internals", Geoff Chappell 1994, as follows: 342 343 * First three bytes contain either "jmp sho xx\ nop" or "jmp ne xx". 344 * Media descriptor field >= 0F0h. 345 * Bytes per sector field == 512. 346 * Sectors per cluster field a power of 2 (1,2,4,8,16,32,64,128). 347 * OEM name "version" (last three to four characters) 348 * must be "20.?", "10.?" (? = wildcard), but no other with "0.?", 349 * otherwise, must be "2.0", or 350 * 2nd-to-last,3rd-to-last character codes together > "3.", or 351 * those == "3.", last character code > "0" 352 353 To stay compatible to those, display a warning here if the name 354 itself would disqualify our boot sector already. 355 356 %endif 357 358 %push 359 %strlen %$len _OEM_NAME_FILL 360 %if %$len != 1 361 %error Specified OEM name fill must be 1 character 362 %endif 363 %strlen %$len _OEM_NAME 364 %define %$nam _OEM_NAME 365 %if %$len > 8 366 %error Specified OEM name is too long 367 %else 368 %assign %$warn 0 369 %rep 8 - %$len 370 %strcat %$nam %$nam,_OEM_NAME_FILL 371 %endrep 372 %substr %$prefix %$nam 5 ; "wvxyZa.b", get "Z" 373 %substr %$major %$nam 6,7 ; "wvxyzA.b", get "A." 374 %substr %$minor %$nam 8 ; "wvxyza.B", get "B" 375 %if %$major == "0." 376 %ifn %$prefix == "1" || %$prefix == "2" 377 %assign %$warn 1 378 %endif 379 %elifn %$major == "2." && %$minor == "0" 380 %if %$major < "3." 381 %assign %$warn 1 382 %elif %$major == "3." && %$minor < "1" 383 %assign %$warn 1 384 %endif 385 %endif 386 %if %$warn 387 %warning Specified OEM name fails MS-DOS's validation 388 %endif 389 %endif 390 %pop 391 392 ; Stack (default 512 Bytes minus the variables). 393 ADR_STACK_LOW equ 7C00h - _LOAD_STACK ; 07A00h (if _LOAD_STACK = 200h) 394 395 ADR_FSIBOOT equ end -start+7C00h ; 07E00h 396 397 %define _AFTER (ADR_FSIBOOT + 512) 398 %if _RELOCATE 399 ; dynamic allocation of FAT buffer 400 %else 401 %if _LOAD_ADR < 7C00h 402 ADR_FATBUF equ _AFTER 403 %define _AFTER (ADR_FATBUF + 8192) 404 %else 405 ADR_FATBUF equ 2000h 406 %endif 407 %endif 408 409 %if _ADD_SEARCH 410 %if _RELOCATE 411 ; dynamic allocation of dir buffer 412 %elif _LOAD_ADR < 7C00h 413 ADR_DIRBUF equ _AFTER 414 %define _AFTER (ADR_DIRBUF + 8192) 415 %else 416 ADR_DIRBUF equ 4000h 417 %endif 418 %else 419 %if _RELOCATE 420 ADR_DIRBUF equ _LOAD_ADR ; 00600h 421 %elif _LOAD_ADR < 7C00h 422 ; one-sector directory buffer. Assumes sectors are no larger than 8 KiB 423 ADR_DIRBUF equ _AFTER ; 0A000h 424 %define _AFTER (ADR_DIRBUF + 8192) 425 %else 426 ADR_DIRBUF equ 4000h 427 %endif 428 %endif 429 ADR_FREE equ _AFTER ; 08000h 430 431 %if ! _RELOCATE 432 %if ((ADR_FATBUF + 8192 - 1) & ~0FFFFh) != (ADR_FATBUF & ~0FFFFh) 433 %warning Possibly crossing 64 KiB boundary while reading FAT 434 %endif 435 %endif 436 437 %ifn _RELOCATE && _ADD_SEARCH 438 %if ((ADR_DIRBUF + 8192 - 1) & ~0FFFFh) != (ADR_DIRBUF & ~0FFFFh) 439 %warning Possibly crossing 64 KiB boundary while reading directory 440 %endif 441 %endif 442 443 %if _LOAD_ADR >= ADR_FREE || _RELOCATE 444 ; If reading on a sector size boundary, no crossing can occur. 445 ; Check for all possible sector sizes (32 B to 8 KiB). If one 446 ; of them fails display a warning, including the minimum size. 447 %assign SECSIZECHECK 32 448 %assign EXITREP 0 449 %rep 256 450 %ifn EXITREP 451 %if _LOAD_ADR & (SECSIZECHECK - 1) 452 %warning Possibly crossing 64 KiB boundary while reading file (sector size >= SECSIZECHECK) 453 %assign EXITREP 1 454 %exitrep 455 %endif 456 %if SECSIZECHECK == 8192 457 %assign EXITREP 1 458 %exitrep 459 %endif 460 %assign SECSIZECHECK SECSIZECHECK * 2 461 %endif 462 %endrep 463 %else 464 ; If loading below the boot sector, address 1_0000h is never reached. 465 %endif 466 467 468 struc FSINFO ; FAT32 FSINFO sector layout 0 000054C0 ???????? .signature1: resd 1 ; 41615252h ("RRaA") for valid FSINFO 470 .reserved1: ; former unused, initialized to zero by FORMAT 471 00000004 .fsiboot: resb 480 ; now used for FSIBOOT 0 000056A4 ???????? .signature2: resd 1 ; 61417272h ("rrAa") for valid FSINFO 0 000056A8 ???????? .numberfree: resd 1 ; FSINFO: number of free clusters or -1 0 000056AC ???????? .nextfree: resd 1 ; FSINFO: first free cluster or -1 475 000001F0 .reserved2: resd 3 ; unused, initialized to zero by FORMAT 0 000056BC ???????? .signature3: resd 1 ; AA550000h for valid FSINFO or FSIBOOT 477 endstruc 478 479 struc FSIBOOTG ; FSIBOOT general layout 0 000054C0 ???????????????? .signature: resq 1 ; 8 bytes that identify the FSIBOOT type 481 00000008 .fsicode: resb 466 ; 466 bytes FSIBOOT type specific data or code 0 0000569A ???? .reserved: resw 1 ; 1 word -> reserved entrypoint (retn) 0 0000569C ???? .memorysize: resw 1 ; 1 word -> memory size entrypoint (or retn) 0 0000569E ???? .dirsearch: resw 1 ; 1 word -> directory search entrypoint 485 endstruc 486 487 %if FSIBOOTG_size != 480 488 %error Unexpected layout 489 %endif 490 491 struc DIRENTRY 0 000054C0 ???????????????? deName: resb 8 0 000054C8 ?????? deExt: resb 3 0 000054CB ?? deAttrib: resb 1 0 000054CC ?? dePlusSize: resb 1 0 000054CD ?????????????? resb 7 0 000054D4 ???? deClusterHigh: resw 1 0 000054D6 ???? deTime: resw 1 0 000054D8 ???? deDate: resw 1 0 000054DA ???? deClusterLow: resw 1 0 000054DC ???????? deSize: resd 1 502 endstruc 503 504 ATTR_READONLY equ 1 505 ATTR_HIDDEN equ 2 506 ATTR_SYSTEM equ 4 507 ATTR_VOLLABEL equ 8 508 ATTR_DIRECTORY equ 10h 509 ATTR_ARCHIVE equ 20h 510 511 512 ; use byte-offset addressing from BP for smaller code 513 %define VAR(x) ((x) - start) + bp 514 515 516 cpu 8086 517 ; bootsector loaded at address 07C00h, addressable using 0000h:7C00h 518 org POSITION 519 start: 520 521 522 %define _LASTVARIABLE start 523 %macro nextvariable 2.nolist 524 %1 equ (_LASTVARIABLE - %2) 525 %define _LASTVARIABLE %1 526 %endmacro 527 528 ; Variables 529 530 ; (dword) sector where the first cluster's data starts 531 nextvariable data_start, 4 532 533 ; (word) current load segment (points behind last loaded data) 534 nextvariable load_seg, 2 535 536 ; (word) segment of FAT buffer 537 ; for FAT12 this holds the entire FAT 538 ; for FAT16 this holds the sector given by wo[fat_sector] 539 ; for FAT32 this holds the sector given by dwo[fat_sector] 540 nextvariable fat_seg, 2 541 542 ; (dword for FAT32) currently loaded sector-in-FAT, -1 if none 543 nextvariable fat_sector, 4 544 545 ; (dword for FAT32) first cluster of load file 546 nextvariable first_cluster, 4 547 548 ADR_STACK_START equ _LASTVARIABLE -start+POSITION 549 550 ; (word) number of 16-byte paragraphs per sector 551 nextvariable para_per_sector, 2 552 553 ; (word) number of 32-byte directory entries per sector 554 nextvariable entries_per_sector, 2 555 556 ; (word) segment of last available memory for sector 557 nextvariable last_available_sector, 2 558 559 ; (word) actual sectors per cluster 560 nextvariable adj_sectors_per_cluster, 2 561 562 ; (word) paragraphs left to read 563 nextvariable paras_left, 2 564 565 lowest_variable equ _LASTVARIABLE 566 567 0 000054C0 EB7D jmp strict short skip_bpb 569 %if !_CHS && _LBA_SET_TYPE 570 db 0Ch ; LBA-enabled FAT32 FS partition type 571 %else 0 000054C2 90 nop ; default: no LBA 573 %endif 574 575 576 ; BIOS Parameter Block (BPB) 577 ; 578 ; Installation will use the BPB already present in your file system. 579 ; These values must be initialised when installing the loader. 580 581 oem_id: ; offset 03h (03) - not used by this code 0 000054C3 202020206C444F53 fill 8,_OEM_NAME_FILL,db _OEM_NAME 583 bytes_per_sector: ; offset 0Bh (11) - refer to _FIX_SECTOR_SIZE ! 0 000054CB 0000 dw _BPS 585 sectors_per_cluster: ; offset 0Dh (13) - refer to _FIX_CLUSTER_SIZE ! 0 000054CD 00 db _SPC & 255 587 fat_start: 588 num_reserved_sectors: ; offset 0Eh (14) 0 000054CE 0000 dw _NUMRESERVED 590 num_fats: ; offset 10h (16) 0 000054D0 00 db _NUMFATS 592 num_root_dir_ents: ; offset 11h (17) 0 000054D1 0000 dw 0 594 total_sectors: ; offset 13h (19) - not used by this code 595 %if _SPI < 1_0000h 0 000054D3 0000 dw _SPI 597 %else 598 dw 0 599 %endif 600 media_id: ; offset 15h (21) - not used by this code 0 000054D5 00 db _MEDIAID 602 sectors_per_fat: ; offset 16h (22) 0 000054D6 0000 dw 0 604 sectors_per_track: ; offset 18h (24) 0 000054D8 0000 dw _CHS_SECTORS 606 heads: ; offset 1Ah (26) 0 000054DA 0000 dw _CHS_HEADS 608 hidden_sectors: ; offset 1Ch (28) 0 000054DC 00000000 dd _HIDDEN 610 total_sectors_large: ; offset 20h (32) - not used by this code 611 %if _SPI >= 1_0000h 612 dd _SPI 613 %else 0 000054E0 00000000 dd 0 615 %endif 616 617 sectors_per_fat_large: ; offset 24h (36) 0 000054E4 00000000 dd _SPF 619 fsflags: ; offset 28h (40) 0 000054E8 0000 dw 0 621 fsversion: ; offset 2Ah (42) 0 000054EA 0000 dw 0 623 root_cluster: ; offset 2Ch (44) 0 000054EC 00000000 dd _CLUSTER_ROOT 625 fsinfo_sector: ; offset 30h (48) 0 000054F0 0000 dw _SECTOR_FSINFO 627 backup_sector: ; offset 32h (50) 0 000054F2 0000 dw _SECTOR_BACKUP 629 0 000054F4 00 times 12 db 0 ; offset 34h (52) reserved 631 632 ; Extended BPB ; offset 40h (64) 633 0 00005500 00 boot_unit: db _UNIT 0 00005501 00 db 0 0 00005502 29 ext_bpb_signature: db 29h 0 00005503 00000000 serial_number: dd _VOLUMEID 0 00005507 6C444F5320 volume_label: fill 11,32,db _DEFAULT_LABEL 0 00005512 464154333220 filesystem_identifier: fill 8,32,db "FAT32" 0 00005512 640 641 642 ; Initialised data 643 644 align 2 645 fsiboot_table: ; this table is used by the FSIBOOT stage 0 0000551A [1601] .error: dw error 647 ; INP: al = error condition letter 648 ; ('B' = bad chain / FS error, 'F' = file not found, 649 ; 'R' = disk read error, 'M' = not enough memory, 650 ; 'E' = not enough data in file) 0 0000551C [0201] .success: dw load_finish 652 ; INP: dword [ss:sp] = first cluster 653 ; Note: The first cluster dword is always filled in 654 ; by FSIBOOT; the option _SET_SIDI_CLUSTER only 655 ; affects usage in the primary loader. 656 %if _MEMORY_CONTINUE 0 0000551E [0001] .memory_full: dw load_finish_mc 658 ; INP: al = error condition letter ('M'), 659 ; dword [ss:sp] = current cluster number, 660 ; dword [ss:sp + 4] = first cluster, refer to .success 661 %else 662 .memory_full: dw error 663 ; refer to previous .memory_full comment 664 %endif 0 00005520 [2A01] .read_sector: dw read_sector 666 ; INP: dx:ax = sector number within partition, 667 ; bx => buffer, (_LBA) ds = ss 668 ; OUT: dx:ax incremented, bx => incremented, 669 ; es = input bx, does not return if error occurred 670 ; CHG: none 671 %if _RELOCATE && _ADD_SEARCH 672 .dirbuf: dw 8192 >> 4 673 ; initialised to segment displacement from FAT buffer 674 %else 0 00005522 000A .dirbuf: dw ADR_DIRBUF>>4 676 ; => directory sector buffer (one sector) 677 %endif 0 00005524 [C301] .writedirentry: dw writedirentry.loaddir 679 ; INP: ds:bx == es:bx -> found dir entry in dir sector buffer 680 ; si:di = loaded sector-in-FAT 681 ; CHG: ax, cx, dx 682 ; STT: ss:bp -> boot sector 683 ; UP 684 ; OUT: directory entry copied if so desired 685 ; (is a no-op if not to copy dir entry) 0 00005526 [6C00] .filename: dw .load_name 687 ; -> name to search 0 00005528 6000 .minpara: dw _LOAD_MIN_PARA 0 0000552A 0002 .loadseg: dw _LOAD_ADR>>4 690 ; => where to load 691 692 .load_name: ; = blank-padded 11-byte filename to search for 0 0000552C 4C444F5320 fill 8,32,db _LOAD_NAME 0 00005534 434F4D fill 3,32,db _LOAD_EXT 695 696 fsiboot_name: 0 00005537 465349424F4F5435 fill 8, 32, db _FSIBOOTNAME 698 699 %if _WARN_PART_SIZE 700 %assign num $ - start 701 %warning BPB + data size is num bytes 702 %endif 703 704 705 ; Code 706 707 ; Note that this may be entered with cs:ip = 07C0h:0 ! 708 skip_bpb: 0 0000553F FA cli 0 00005540 FC cld 0 00005541 31C9 xor cx, cx 0 00005543 BD[0000] mov bp, start ; magic bytes - checked by instsect 0 00005546 8ED1 mov ss, cx 0 00005548 BCF07B mov sp, ADR_STACK_START 715 %if _USE_AUTO_UNIT 0 0000554B 885640 mov [VAR(boot_unit)], dl; magic bytes - checked by instsect 717 %else 718 mov dl, [VAR(boot_unit)]; magic bytes - checked by instsect 719 %endif 720 721 ; Note: es is left uninitialised here until the first call to 722 ; read_sector if the below conditional is false. 723 %if _USE_PART_INFO ; +19 bytes 0 0000554E 8EC1 mov es, cx 725 ; Note: Award Medallion BIOS v6.0 (ASUS MED 2001 ACPI BIOS Revision 1009) 726 ; loads from a floppy disk drive with ds:si = 0F000h:0A92Dh -> 727 ; FF FF FF FF 08 00 08 01 FF FF FF FF FF FF FF FF, which was detected 728 ; as a valid partition table entry by this handling. Therefore, we 729 ; only accept partition information when booting from a hard disk now. 730 731 ; start of magic byte sequence for instsect 0 00005550 84D2 test dl, dl ; floppy ? 0 00005552 7911 jns @F ; don't attempt detection --> 734 ; Check whether an MBR left us partition information. 735 ; byte[ds:si] bit 7 means active and must be set if valid. 0 00005554 380C cmp byte [si], cl ; flags for xx-00h (result is xx), SF = bit 7 0 00005556 790D jns @F ; xx < 80h, ie info invalid --> 738 ; byte[ds:si+4] is the file system type. Check for valid one. 0 00005558 384C04 cmp byte [si+4], cl ; is it zero? 0 0000555B 7408 je @F ; yes, info invalid --> 741 ; Info valid, trust their hidden sectors over hardcoded. 742 ; Assume the movsw instructions won't run with si = FFFFh. 0 0000555D BF[1C00] mov di, hidden_sectors ; -> BPB field 0 00005560 83C608 add si, 8 ; -> partition start sector in info 745 %if _USE_PART_INFO_DISABLED 746 nop 747 nop ; size has to match enabled code 748 %else 0 00005563 A5 movsw 0 00005564 A5 movsw ; overwrite BPB field with value from info 751 %endif 752 @@: 753 ; end of magic byte sequence for instsect 754 %endif 0 00005565 8ED9 mov ds, cx 0 00005567 FB sti 757 758 759 ; Note: The int 13h function 08h call may change or 760 ; set ax, bx, cx, dx, es, di. es is left as 761 ; indeterminate until the first call to 762 ; read_sector, or it is set later in 763 ; load_fsiboot.loaded (set equal to ds). 764 %if _QUERY_GEOMETRY ; +27 bytes 765 766 ; start of magic byte sequence for instsect 767 ; test dl, dl ; floppy? 768 ; jns @F ; don't attempt query, might fail --> 769 ; Note that while the original PC BIOS doesn't support this function 770 ; (for its diskettes), it does properly return the error code 01h. 771 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 00005568 B408 mov ah, 08h 773 ; xor cx, cx ; initialise cl to 0 774 ; Already from prologue cx = 0. 0 0000556A F9 stc ; initialise to CY 776 %if _QUERY_GEOMETRY_DISABLED 777 nop 778 nop ; size has to match enabled code 779 %else 0 0000556B CD13 int 13h ; query drive geometry 781 %endif 0 0000556D 720E jc @F ; apparently failed --> 0 0000556F 83E13F and cx, 3Fh ; get sectors 0 00005572 7409 jz @F ; invalid (S is 1-based), don't use --> 0 00005574 894E18 mov [VAR(sectors_per_track)], cx 0 00005577 88F1 mov cl, dh ; cx = maximum head number 0 00005579 41 inc cx ; cx = number of heads (H is 0-based) 0 0000557A 894E1A mov [VAR(heads)], cx 789 @@: 790 ; end of magic byte sequence for instsect 791 %endif 792 793 794 ; 16-byte paragraphs per sector 0 0000557D 8B460B mov ax, [VAR(bytes_per_sector)] 0 00005580 B104 mov cl, 4 0 00005582 D3E8 shr ax, cl 0 00005584 50 push ax ; push into word [VAR(para_per_sector)] 799 800 ; 32-byte FAT directory entries per sector 0 00005585 D1E8 shr ax, 1 ; /2 = 32-byte entries per sector 0 00005587 50 push ax ; push into word [VAR(entries_per_sector)] 803 804 load_fsiboot: 0 00005588 83F820 cmp ax, 1024 >> 5 ; sector size is at least 1 KiB (large) ? 0 0000558B 731B jae .loaded ; already loaded as part of the boot sector --> 807 808 ; If this code runs, then ax was below 1024 >> 5, 809 ; therefore this cwd instruction always zeros dx. 0 0000558D 99 cwd 811 0 0000558E 8B4630 mov ax, [VAR(fsinfo_sector)] 813 ; inc ax 814 ; jz error_fsiboot ; was FFFFh, invalid --> 815 ; dec ax 816 ; FFFFh always fails the < num_reserved_sectors check 0 00005591 85C0 test ax, ax 0 00005593 7403 jz @F ; is 0 ? invalid --> (ZR, NC) 0 00005595 3B460E cmp ax, [VAR(num_reserved_sectors)] 820 @@: ; (ZR, NC if ax == 0) 0 00005598 7337 jae error_fsiboot ; (jump if NC) 822 ; dx:ax = FSINFO sector (dx = 0 from cwd) 0 0000559A B90002 mov cx, 512 0 0000559D BBE007 mov bx, ADR_FSIBOOT >> 4 825 @@: 0 000055A0 E84700 call read_sector 0 000055A3 2B4E0B sub cx, [VAR(bytes_per_sector)] 0 000055A6 77F8 ja @B ; read 512 bytes --> 829 830 .loaded: 0 000055A8 1E push ds 0 000055A9 07 pop es 0 000055AA BF[0402] mov di, fsiboot.signature 0 000055AD BE[7700] mov si, fsiboot_name 0 000055B0 B90400 mov cx, 4 ; size of fsiboot_name 0 000055B3 F3A7 repe cmpsw 0 000055B5 751A jne error_fsiboot 838 ; Note that now es:di -> fsiboot.start 839 840 %if _LOAD_ADR >= ADR_FREE || _RELOCATE 841 jmp 0:.next ; make sure cs is 0 842 843 .next: 844 xor ax, ax ; = 0, harden against unsupported function 845 call near word [memorysize_entrypoint] 846 847 %if _RELOCATE 848 %if _ADD_SEARCH 849 sub ax, (20 * 1024 + 8192 + 8192 + (8192-16) + 1024 + 7C00h) >> 4 850 %else 851 sub ax, (20 * 1024 + 8192 + (8192-16) + 1024 + 7C00h) >> 4 852 %endif 853 ; 20 KiB: reserved for iniload 854 ; 8 KiB: dir buffer (only if _ADD_SEARCH) 855 ; 8 KiB: FAT buffer 856 ; 8 KiB - 16 B: to allow rounding down position of buffers 857 ; 1 KiB: sector + FSIBOOT 858 ; 7C00h: stack and to allow addressing with 7C00h in bp 859 ; 860 ; Note also that by addressing the stack and sector and FSIBOOT 861 ; with bp at 7C00h, and insuring this subtraction doesn't 862 ; underflow, makes sure that we do not overwrite the IVT or 863 ; BDA. (However, we assume that ax is at least 60h or so.) 864 ; 865 ; The FAT buffer segment is masked so that the actual buffer 866 ; is stored on an 8 KiB boundary. This is to ensure that 867 ; the buffer doesn't possibly cross a 64 KiB DMA boundary. 868 jc @F 869 cmp ax, (end_after_fsiboot -start+7C00h - ADR_STACK_LOW + 15) >> 4 870 ; This check is to ensure that the start of the destination 871 ; for the relocation (stack, sector, FSIBOOT) is 872 ; above-or-equal the end of the source for the relocation. 873 ; That is, to avoid overwriting any of the source with the 874 ; string move instruction (which for simplicity is always UP). 875 @@: 876 jb error_fsiboot 877 878 ; With _RELOCATE enabled, the FAT buffer segment 879 ; is fixed up by the primary loader here before 880 ; FSIBOOT is executed. 881 mov bx, ((8192 - 16) + 1024 + 7C00h)>>4 882 ; bx is initialised to the value 883 ; ((8192 - 16) + 1024 + 7C00h)>>4 884 ; so this is like calculating the following for its value: 885 ; ((LMA_top - 20 KiB - 8 KiB - 8 KiB{AS} - (8 KiB - 16 B) - 1 KiB - 7C00h) + ; ((8 KiB - 16 B) + 1 KiB + 7C00h))>>4 887 ; == (LMA_top - 20 KiB - 8 KiB - 8 KiB{AS})>>4 888 ; {AS} = only if _ADD_SEARCH 889 add bx, ax 890 and bx, ~ ((8192>>4) - 1) ; => FAT sector buffer (one sector) 891 %if _ADD_SEARCH 892 ; .dirbuf is initialised to 8192 >> 4 893 add word [VAR(fsiboot_table.dirbuf)], bx 894 ; => dir sector buffer (one sector) 895 %endif 896 897 push ax 898 push di ; -> reloc destination of fsiboot.start 899 900 mov es, ax ; => destination 901 mov si, sp ; ds:si = ss:entries_per_sector - 4 902 mov di, si ; es:di -> destination for stack low 903 mov cx, (end_after_fsiboot - (entries_per_sector - 4)) >> 1 904 ; end_after_fsiboot is the top of used memory 905 ; entries_per_sector is the lowest filled stack frame slot 906 ; 4 is for the additional slots taken by the return address 907 rep movsw ; relocate stack, sector, and FSIBOOT 908 mov ss, ax 909 mov ds, ax ; relocate these 910 add ax, (ADR_STACK_LOW) >> 4 ; (rounding down) => behind available 911 912 retf ; jump to relocated FSIBOOT 913 %else 914 sub ax, (20 * 1024) >> 4 ; 20 KiB reserved for iniload 915 jc error_fsiboot 916 mov bx, ADR_FATBUF >> 4 ; => FAT sector buffer (one sector) 917 push es 918 push di ; -> fsiboot.start 919 retf 920 ; Do a far return here to ensure that cs is zero. 921 %endif 922 %elif _LOAD_ADR < ADR_STACK_LOW 0 000055B7 B8A007 mov ax, (ADR_STACK_LOW >> 4) 0 000055BA BB0008 mov bx, ADR_FATBUF >> 4 ; => FAT sector buffer (one sector) 0 000055BD 06 push es 0 000055BE 57 push di ; -> fsiboot.start 0 000055BF CB retf 928 ; Do a far return here to ensure that cs is zero. 929 %else 930 %error Load address within used memory 931 %endif 932 933 934 %if _WARN_PART_SIZE 935 %assign num $ - skip_bpb 936 %warning init size is num bytes 937 %endif 938 939 940 finish_start: 941 ; INP: ds:bx == es:bx -> found dir entry in dir sector buffer 942 ; si:di = loaded sector-in-FAT 943 ; CHG: ax, cx, dx 944 ; STT: ss:bp -> boot sector 945 ; UP 946 ; OUT: directory entry copied if so desired 947 ; (is a no-op if not to copy dir entry) 948 writedirentry: 949 %if _LOAD_DIR_SEG || _LOAD_CHECK_MAX_SIZE 950 .loaddir: 951 %else 952 .loaddir: equ read_sector.retn 953 %endif 954 %if _LOAD_CHECK_MAX_SIZE 955 mov dx, word [VAR(para_per_sector)] 956 ; dx = para per sector 957 mov ax, word [VAR(last_available_sector)] 958 add ax, dx ; ax => behind memory 959 sub ax, word [VAR(fsiboot_table.loadseg)] 960 ; ax = how many paragraphs 961 dec dx ; para per sector - 1 962 not dx ; mask to round down to full sector 963 and ax, dx ; = how many paragraphs loadable 964 xor dx, dx ; dx:ax = how many paragraphs loadable 965 mov cx, 4 966 @@: 967 shl ax, 1 968 rcl dx, 1 969 loop @B ; dx:ax = how many bytes loadable 970 %if _LOAD_CHECK_MAX_SIZE_FATPLUS 971 ; check FAT+ size bits 972 test byte [bx + dePlusSize], 0E7h 973 ; test whether bits 7-5 and 2-0 NZ 974 jnz @F ; --> (NZ, NC) 975 %endif 976 cmp word [bx + deSize + 2], dx 977 jne @F 978 cmp word [bx + deSize], ax 979 @@: 980 mov al, 'M' ; error condition letter if too large 981 jna @F ; (jbe) jump if ZR || CY 982 push ss 983 pop ds ; error expects ds == ss 984 jmp error 985 ; ja error ; jump if ! (ZR || CY) 986 ; ie jump if NZ && NC 987 @@: 988 %endif 989 %if _LOAD_DIR_SEG 990 mov ax, _LOAD_DIR_SEG 991 %elif _LOAD_CHECK_MAX_SIZE 992 retn 993 %endif 994 %if _LOAD_DIR_SEG || (_ADD_DIR_SEG && _ADD_SEARCH) 995 ; INP: ax => where to store directory entry 996 .ax: 997 push si 998 push di 999 mov si, bx ; ds:si -> directory entry 1000 mov cx, DIRENTRY_size >> 1 1001 mov es, ax 1002 xor di, di ; es:di -> where to store directory entry 1003 rep movsw ; move to here (one directory entry) 1004 push ds 1005 pop es ; es:bx -> dir entry in dir sector buffer 1006 pop di 1007 pop si 1008 retn 1009 %endif 1010 1011 1012 %if _MEMORY_CONTINUE 1013 load_finish_mc: 0 000055C0 5B pop bx 0 000055C1 59 pop cx 1016 %endif 1017 load_finish: 1018 1019 %if _ADD_SEARCH 1020 mov word [VAR(fsiboot_table.filename)], add_name 1021 call near word [dirsearch_entrypoint] 1022 ; es = ds => dirbuf 1023 %if _ADD_DIR_SEG 1024 mov ax, _ADD_DIR_SEG 1025 call writedirentry.ax 1026 %endif 1027 push ss 1028 pop ds 1029 %endif 1030 1031 %if _TURN_OFF_FLOPPY 1032 ; turn off floppy motor 1033 mov dx,3F2h 1034 mov al,0 1035 out dx,al 1036 %endif 1037 1038 ; Set-up registers for and jump to loaded file 1039 ; Already: ss:bp-> boot sector containing BPB 1040 %if _CHECKVALUE 1041 CHECKLINEAR equ _LOAD_ADR + _CHECKOFFSET 1042 %if CHECKLINEAR <= (64 * 1024 - 2) && ! _RELOCATE 0 000055C2 813EFC236C44 cmp word [CHECKLINEAR], _CHECKVALUE 1044 %else 1045 mov ax, CHECKLINEAR >> 4 1046 mov es, ax 1047 cmp word [es:CHECKLINEAR & 15], _CHECKVALUE 1048 %endif 0 000055C8 B056 mov al, 'V' ; check 'V'alue mismatch 0 000055CA 750A jne error 1051 %endif 1052 %if _SET_SIDI_CLUSTER && (_PUSH_DPT || _SET_DSSI_DPT) 1053 pop cx 1054 pop dx 1055 %endif 1056 %if _PUSH_DPT || _SET_DSSI_DPT 1057 %ifn _SET_DSSI_DPT ; (implying that only _PUSH_DPT is set) 1058 %if _RELOCATE 1059 xor ax, ax 1060 mov es, ax ; => IVT 1061 mov di, 1Eh*4 1062 les si, [es:di] ; -> original (also current) DPT 1063 push es 1064 push si ; original (also current) DPT address 1065 push ax 1066 push di ; 0000h:0078h (address of 1Eh IVT entry) 1067 %else 1068 ; If not _RELOCATE, ds = 0000h (=> IVT) 1069 mov di, 1Eh*4 1070 les si, [di] ; -> original (also current) DPT 1071 push es 1072 push si ; original (also current) DPT address 1073 ; If not _RELOCATE, ss = 0000h (=> IVT) 1074 push ss 1075 push di ; 0000h:0078h (address of 1Eh IVT entry) 1076 %endif 1077 %else 1078 %if _RELOCATE 1079 xor ax, ax 1080 mov ds, ax ; => IVT 1081 %endif 1082 ; If not _RELOCATE, ds = 0000h (=> IVT) 1083 mov di, 1Eh*4 1084 lds si, [di] ; -> original (also current) DPT 1085 %if _PUSH_DPT 1086 push ds 1087 push si ; original (also current) DPT address 1088 %if _RELOCATE 1089 push ax 1090 push di ; 0000h:0078h (address of 1Eh IVT entry) 1091 %else 1092 ; If not _RELOCATE, ss = 0000h (=> IVT) 1093 push ss 1094 push di ; 0000h:0078h (address of 1Eh IVT entry) 1095 %endif 1096 %endif 1097 %endif 1098 %endif 1099 %if _ZERO_ES || _ZERO_DS 1100 %if _RELOCATE 1101 %ifn _PUSH_DPT || _SET_DSSI_DPT 1102 xor ax, ax 1103 %endif 1104 %if _ZERO_ES 1105 mov es, ax 1106 %endif 1107 %if _ZERO_DS 1108 mov ds, ax 1109 %endif 1110 %else 1111 %if _ZERO_ES 1112 push ss 1113 pop es 1114 %endif 1115 %if _ZERO_DS && _SET_DSSI_DPT 1116 push ss 1117 pop ds 1118 %endif 1119 %endif 1120 %endif 1121 %if _DATASTART_HIDDEN 1122 mov bx, [VAR(hidden_sectors + 0)] 1123 mov ax, [VAR(hidden_sectors + 2)] 1124 add word [VAR(data_start + 0)], bx 1125 adc word [VAR(data_start + 2)], ax 1126 %endif 1127 %if _SET_AXBX_DATA 1128 mov bx, [VAR(data_start)] 1129 mov ax, [VAR(data_start+2)] 1130 %endif 1131 %if _SET_SIDI_CLUSTER 1132 %if _SET_DSSI_DPT 1133 %error Cannot select both of these. 1134 %endif 1135 %if _PUSH_DPT || _SET_DSSI_DPT 1136 mov di, cx 1137 mov si, dx 1138 %else 1139 pop di 1140 pop si 1141 %endif 1142 %endif 1143 %if _SET_DL_UNIT 1144 mov dl, [VAR(boot_unit)]; set dl to unit 1145 %if _SET_BL_UNIT 1146 mov bl, dl ; set bl to unit, too 1147 %endif 1148 %elif _SET_BL_UNIT 1149 mov bl, [VAR(boot_unit)]; set bl to unit 1150 %endif 1151 ; ss:bp-> boot sector with BPB 0 000055CC EA00040002 jmp (_LOAD_ADR>>4)+_EXEC_SEG_ADJ:_EXEC_OFS 1153 1154 %if _WARN_PART_SIZE 1155 %assign num $ - finish_start 1156 %warning finish size is num bytes 1157 %endif 1158 1159 1160 error_start: 1161 1162 error_fsiboot: 0 000055D1 B049 mov al,'I' 1164 0 000055D3 A9 db __TEST_IMM16 ; (skip mov) 1166 read_sector.err: 0 000055D4 B052 mov al, 'R' ; Disk 'R'ead error 1168 1169 error: 1170 %if _RELOCATE 1171 mov bx, 7 1172 mov ds, bx 1173 mov bh, [462h - 70h] 1174 %else 0 000055D6 8A3E6204 mov bh, [462h] 0 000055DA B307 mov bl, 7 1177 %endif 0 000055DC B40E mov ah, 0Eh 0 000055DE CD10 int 10h ; display character 0 000055E0 B007 mov al, 07h 0 000055E2 CD10 int 10h ; beep! 1182 0 000055E4 31C0 xor ax, ax ; await key pressed 0 000055E6 CD16 int 16h 1185 0 000055E8 CD19 int 19h ; re-start the boot process 1187 1188 %if _WARN_PART_SIZE 1189 %assign num $ - error_start 1190 %warning error size is num bytes 1191 %endif 1192 1193 1194 ; Read a sector using Int13.02 or Int13.42 1195 ; 1196 ; INP: dx:ax = sector number within partition 1197 ; bx => buffer 1198 ; (_LBA) ds = ss 1199 ; OUT: If unable to read, 1200 ; ! jumps to error instead of returning 1201 ; If sector has been read, 1202 ; dx:ax = next sector number (has been incremented) 1203 ; bx => next buffer (bx = es+word[para_per_sector]) 1204 ; es = input bx 1205 ; CHG: - 1206 read_sector: 0 000055EA 52 push dx 0 000055EB 51 push cx 0 000055EC 50 push ax 0 000055ED 56 push si 1211 0 000055EE 8EC3 mov es, bx ; => buffer 1213 1214 ; DX:AX==LBA sector number 1215 ; add partition start (= number of hidden sectors) 0 000055F0 03461C add ax,[VAR(hidden_sectors + 0)] 0 000055F3 13561E adc dx,[VAR(hidden_sectors + 2)] 1218 %if (!_LBA || !_LBA_33_BIT) && _LBA_CHECK_NO_33 1219 jc .err 1220 %endif 1221 %if _LBA ; +70 bytes (with CHS, +63 bytes without CHS) 1222 %if _LBA_33_BIT 0 000055F6 19F6 sbb si, si ; -1 if was CY, 0 else 0 000055F8 F7DE neg si ; 1 if was CY, 0 else 1225 %endif 0 000055FA 31C9 xor cx, cx 0 000055FC 51 push cx ; highest word = 0 1228 %if _LBA_33_BIT 0 000055FD 56 push si ; bit 32 = 1 if operating in 33-bit space 1230 %else 1231 push cx ; second highest word = 0 1232 %endif 0 000055FE 52 push dx 0 000055FF 50 push ax ; = qword sector number 0 00005600 53 push bx 0 00005601 51 push cx ; bx => buffer 0 00005602 41 inc cx 0 00005603 51 push cx ; word number of sectors to read 0 00005604 B110 mov cl, 10h 0 00005606 51 push cx ; word size of disk address packet 0 00005607 89E6 mov si, sp ; ds:si -> disk address packet (on stack) 1242 1243 %if _LBA_SKIP_CHECK ; -14 bytes 1244 mov dl, [VAR(boot_unit)] 1245 %else 1246 %if _LBA_WORKAROUND 0 00005609 1E push ds 0 0000560A BB4000 mov bx, 40h 0 0000560D 8EDB mov ds, bx 1250 ; Setting ds = 40h for the function 41h detection is a workaround 1251 ; for a bug in the Book8088's Xi8088 BIOS. Refer to 1252 ; https://www.bttr-software.de/forum/forum_entry.php?id=21275 1253 %endif 0 0000560F B441 mov ah, 41h 0 00005611 8A5640 mov dl, [VAR(boot_unit)] 0 00005614 BBAA55 mov bx, 55AAh 0 00005617 F9 stc 0 00005618 CD13 int 13h ; 13.41.bx=55AA extensions installation check 1259 %if _LBA_WORKAROUND 0 0000561A 1F pop ds 1261 %endif 0 0000561B 7215 jc .no_lba 0 0000561D 81FB55AA cmp bx, 0AA55h 0 00005621 750F jne .no_lba 0 00005623 D0E9 shr cl, 1 ; support bitmap bit 0 0 00005625 730B jnc .no_lba 1267 %endif 1268 1269 %if _LBA_RETRY 1270 %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 1271 stc 1272 %endif 1273 mov ah, 42h 1274 int 13h ; 13.42 extensions read 1275 jnc .lba_done 1276 1277 %if _RETRY_RESET 1278 xor ax, ax 1279 int 13h ; reset disk 1280 %endif 1281 1282 ; have to reset the LBAPACKET's lpCount, as the handler may 1283 ; set it to "the number of blocks successfully transferred". 1284 ; (in any case, the high byte is still zero.) 1285 mov byte [si + 2], 1 1286 %endif 1287 1288 %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 1289 stc 1290 %endif 0 00005627 B442 mov ah, 42h 0 00005629 CD13 int 13h 1293 %if _LBA_SKIP_CHECK && _CHS 1294 %if _LBA_SKIP_ANY 1295 jc .no_lba 1296 .err_CY: equ .err 1297 .err_2: equ .err 1298 %else 1299 jnc .lba_done 1300 cmp ah, 1 ; invalid function? 1301 je .no_lba ; try CHS instead --> 1302 .err_CY: 1303 .err_2: 1304 jmp .lba_error 1305 %endif 1306 %else 1307 .err_CY: 0 0000562B 72A7 jc .lba_error 1309 .err_2: equ .err 1310 %endif 1311 1312 .lba_done: 1313 %if _CHS && _LBA_SET_TYPE 1314 mov byte [bp + 2], 0Ch ; LBA-enabled FAT32 FS partition type 1315 %endif 0 0000562D 83C410 add sp, 10h 1317 %if _CHS 0 00005630 EB44 jmp short .done 1319 %endif 1320 1321 .lba_error: equ .err 1322 1323 %if !_CHS 1324 .no_lba: equ .err 1325 %else 1326 .no_lba: 0 00005632 83C408 add sp, 8 0 00005635 59 pop cx ; cx = low word of sector 0 00005636 58 pop ax 0 00005637 5A pop dx ; dx:ax = middle two words of sector 1331 ; Here dx <= 1 if _LBA_33_BIT, else zero. 1332 ; If dx is nonzero then the CHS calculation 1333 ; should fail. If CHS sectors is equal to 1 1334 ; (very unusual) then the div may fail. Else, 1335 ; we will detect a cylinder > 1023 eventually. 0 00005638 5E pop si ; discard highest word of qword 1337 %endif 1338 %else 1339 .err_2: equ .err 1340 %endif 1341 1342 %if _CHS ; +70 bytes 1343 ; dx:ax = LBA sector number, (if _LBA) cx = 0 1344 ; divide by number of sectors per track to get sector number 1345 ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 1346 ; Use two-step 32:16 divide to avoid overflow 1347 %if !_LBA 1348 xchg cx, ax ; cx = low word of sector, clobbers ax 1349 xchg ax, dx ; ax = high word of sector, clobbers dx 1350 xor dx, dx ; dx:ax = high word of sector 1351 %else 1352 ; from the .no_lba popping we already have: 1353 ; cx = low word of sector 1354 ; dx:ax = high word of sector 1355 %endif 0 00005639 F77618 div word [VAR(sectors_per_track)] 0 0000563C 91 xchg cx,ax 0 0000563D F77618 div word [VAR(sectors_per_track)] 0 00005640 87CA xchg cx,dx 1360 1361 ; DX:AX=quotient, CX=remainder=sector (S) - 1 1362 ; divide quotient by number of heads 0 00005642 93 xchg bx, ax ; bx = low word of quotient, clobbers ax 0 00005643 92 xchg ax, dx ; ax = high word of quotient, clobbers dx 0 00005644 31D2 xor dx, dx ; dx = 0 0 00005646 F7761A div word [VAR(heads)] 1367 ; ax = high / heads, dx = high % heads 0 00005649 93 xchg bx, ax ; bx = high / heads, ax = low quotient 0 0000564A F7761A div word [VAR(heads)] 1370 1371 ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 1372 ; move variables into registers for INT 13h AH=02h 0 0000564D 88D6 mov dh, dl ; dh = head 0 0000564F 41 inc cx ; cl5:0 = sector 0 00005650 86E8 xchg ch, al ; ch = cylinder 7:0, al = 0 0 00005652 D1E8 shr ax, 1 0 00005654 D1E8 shr ax, 1 ; al7:6 = cylinder 9:8 1378 ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 0 00005656 08FB or bl, bh ; collect set bits from bh 0 00005658 08C1 or cl, al ; cl7:6 = cylinder 9:8 1381 ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 0 0000565A 08E3 or bl, ah ; collect set bits from ah 0 0000565C 8A5640 mov dl,[VAR(boot_unit)] ; dl = drive 1384 .nz_err: 0 0000565F 7403E970FF jnz .err_2 ; error if cylinder >= 1024 --> 1386 ; ! bx = 0 (for 13.02 call) 1387 1388 ; we call INT 13h AH=02h once for each sector. Multi-sector reads 1389 ; may fail if we cross a track or 64K boundary 1390 %if _CHS_RETRY_REPEAT 0 00005664 BE1100 mov si, _CHS_RETRY_REPEAT + 1 1392 %if _CHS_RETRY_NORMAL && _RETRY_RESET 0 00005667 A9 db __TEST_IMM16 ; (skip int 13h) 1394 .loop_chs_retry_repeat: 0 00005668 CD13 int 13h ; reset disk 1396 %elif _RETRY_RESET 1397 .loop_chs_retry_repeat: 1398 xor ax, ax 1399 int 13h ; reset disk 1400 %else 1401 .loop_chs_retry_repeat: 1402 %endif 0 0000566A 4E dec si ; another attempt ? 0 0000566B 78F2 js .nz_err ; no --> 0 0000566D B80102 mov ax, 0201h 0 00005670 CD13 int 13h ; read one sector 1407 %if _CHS_RETRY_NORMAL && _RETRY_RESET 0 00005672 89D8 mov ax, bx ; ax = 0 1409 %endif 0 00005674 72F2 jc .loop_chs_retry_repeat 1411 ; fall through to .done 1412 %else 1413 mov ax, 0201h 1414 %if _CHS_RETRY 1415 %if _RETRY_RESET 1416 ; In this case we cannot store to the stack and 1417 ; pop the value at the right moment for both 1418 ; cases of the "jnc .done" branch. So use the 1419 ; original code to re-init ax to 0201h. 1420 int 13h ; read one sector 1421 jnc .done 1422 ; reset drive 1423 xor ax, ax 1424 int 13h 1425 mov ax, 0201h 1426 %else 1427 push ax 1428 int 13h ; read one sector 1429 pop ax ; restore ax = 0201h 1430 jnc .done 1431 %endif 1432 %endif 1433 ; try read again 1434 int 13h 1435 jc .err_CY 1436 %endif 1437 %if ! _LBA 1438 .err_CY: equ .err 1439 %endif 1440 1441 %endif ; _CHS 1442 1443 .done: 1444 ; increment segment 0 00005676 8CC3 mov bx, es 1446 %if _FIX_SECTOR_SIZE 1447 add bx, _FIX_SECTOR_SIZE >> 4 1448 %else 0 00005678 035EEE add bx, [VAR(para_per_sector)] 1450 %endif 1451 0 0000567B 5E pop si 0 0000567C 58 pop ax 0 0000567D 59 pop cx 0 0000567E 5A pop dx 1456 ; increment LBA sector number 0 0000567F 40 inc ax 0 00005680 7501 jne @F 0 00005682 42 inc dx 1460 @@: 1461 1462 .retn: 0 00005683 C3 retn 1464 1465 %if _WARN_PART_SIZE 1466 %assign num $ - read_sector 1467 %warning read_sector size is num bytes 1468 %endif 1469 1470 1471 %if _ADD_SEARCH 1472 add_name: ; = blank-padded 11-byte filename to search for 1473 fill 8,32,db _ADD_NAME 1474 fill 3,32,db _ADD_EXT 1475 %endif 1476 1477 1478 %if !_NO_LIMIT 1479 available: 0 00005684 26 _fill 508,38,start 1481 1482 signatures: 0 000056BC 0000 dw 0 1484 ; 2-byte magic bootsector signature 0 000056BE 55AA dw 0AA55h 1486 1487 %assign num signatures-available 1488 %warning FAT32: num bytes still available. 1488 ****************** warning: FAT32: 56 bytes still available. [-w+user] 1489 %else ; for testing 1490 align 4 1491 signatures: 1492 dw 0 1493 ; 2-byte magic bootsector signature 1494 dw 0AA55h 1495 %endif 1496 1497 align 16, nop 1498 end: 1499 1500 fsiboot: 0 000056C0 52526141 dd "RRaA" 1502 .signature: 0 000056C4 465349424F4F5435 fill 8, 32, db _FSIBOOTNAME 1504 1505 %if ($ - .signature) != 8 1506 %error Unexpected name size 1507 %endif 1508 .start: 1509 ; INP: ax => after last segment to be used for loading 1510 ; bx => FAT buffer (8 KiB) 1511 ; ss:bp -> boot sector, with EBPB 1512 ; dwo [ss:bp - 4] = data_start (uninit) 1513 ; wo [ss:bp - 6] = load_seg (uninit) 1514 ; wo [ss:bp - 8] = fat_seg (uninit) 1515 ; dwo [ss:bp - 12] = fat_sector (uninit) 1516 ; dwo [ss:bp - 16] = first_cluster (uninit) 1517 ; wo [ss:bp - 18] = para_per_sector 1518 ; wo [ss:bp - 20] = entries_per_sector 1519 ; ss:sp = ss:bp - 20 1520 ; (Note: The following stack frame entries are currently 1521 ; only used by FSIBOOT itself, so they may be 1522 ; considered implementation detail instead of 1523 ; part of the FSIBOOT protocol.) 1524 ; wo [ss:bp - 22] = last_available_sector (uninit) 1525 ; wo [ss:bp - 24] = adj_sectors_per_cluster (uninit) 1526 ; wo [ss:bp - 26] = paras_left (uninit) 1527 ; Stack layout has to match! 1528 ; ss = ds 1529 ; ss:bp + ((11 + ebpbNew + BPBN_size + 1) & ~1) 1530 ; = ss:fsiboot_table, refer to its comments 1531 ; cs set to address jump table offsets in fsiboot_table 1532 ; ds set to address fsiboot_table.load_name 1533 ; OUT: Jumps to fsiboot_table.error if error occurs: 1534 ; al = error condition letter 1535 ; Else: 1536 ; data_start (within partition) initialised 1537 ; load_seg => behind last loaded data 1538 ; fat_seg initialised (from bx) 1539 ; fat_sector initialised 1540 ; (-1 initially, loaded sector-in-FAT later) 1541 ; first_cluster initialised 1542 ; last_available_sector initialised 1543 ; (from input ax minus word [para_per_sector]) 1544 ; adj_sectors_per_cluster initialised (from BPB) 1545 ; paras_left initialised 1546 ; Jumps to fsiboot_table.success if loaded entirely: 1547 ; dword [ss:sp] = first cluster 1548 ; Jumps to fsiboot_table.memory_full if loaded partially: 1549 ; al = error condition letter ('M') 1550 ; dword [ss:sp] = current cluster number 1551 ; dword [ss:sp + 4] = first cluster 1552 0 000056CC 895EF8 mov word [VAR(fat_seg)], bx ; initialise => FAT buffer 1554 0 000056CF 2B46EE sub ax, word [VAR(para_per_sector)] 0 000056D2 7232 jc .CY_fsiboot_error_badchain 0 000056D4 50 push ax ; push into word [VAR(last_available_sector)] 1558 0 000056D5 8B5E6A mov bx, word [VAR(fsiboot_table.loadseg)] 0 000056D8 895EFA mov word [VAR(load_seg)], bx ; initialise => load address 0 000056DB 39D8 cmp ax, bx 0 000056DD 7227 jb .CY_fsiboot_error_badchain 1563 1564 ; adjusted sectors per cluster (store in a word, 1565 ; and decode EDR-DOS's special value 0 meaning 256) 0 000056DF 8A460D mov al, [VAR(sectors_per_cluster)] 0 000056E2 48 dec ax 0 000056E3 B400 mov ah, 0 0 000056E5 40 inc ax 0 000056E6 50 push ax ; push into word [VAR(adj_sectors_per_cluster)] 0 000056E7 48 dec ax ; ! ah = 0 0 000056E8 8A4610 mov al,[VAR(num_fats)] ; ! ah = 0, hence ax = number of FATs 0 000056EB 50 push ax 0 000056EC F76624 mul word [VAR(sectors_per_fat_large)] 1575 ; ax = low word SpF*nF 1576 ; dx = high word 0 000056EF 93 xchg bx, ax 0 000056F0 87CA xchg cx, dx 1579 ; cx:bx = first mul 0 000056F2 58 pop ax 0 000056F3 F76626 mul word [VAR(sectors_per_fat_large + 2)] 1582 ; ax = high word adjust 1583 ; dx = third word 0 000056F6 85D2 test dx, dx 0 000056F8 F9 stc 0 000056F9 750B jnz .CY_fsiboot_error_badchain 1587 ; dx = zero 0 000056FB 92 xchg dx, ax 1589 ; dx = high word adjust 1590 ; ax = zero 0 000056FC 01CA add dx, cx 0 000056FE 7206 jc .CY_fsiboot_error_badchain 1593 ; dx:bx = result 0 00005700 93 xchg ax, bx 1595 ; dx:ax = result 1596 ; bx = zero 1597 0 00005701 03460E add ax,[VAR(num_reserved_sectors)] 0 00005704 11DA adc dx, bx ; bx is zero here 1600 .CY_fsiboot_error_badchain: 0 00005706 7256 jc ..@CY_2_fsiboot_error_badchain 1602 1603 ; first sector of disk data area: 0 00005708 8946FC mov [VAR(data_start)], ax 0 0000570B 8956FE mov [VAR(data_start+2)], dx 1606 0 0000570E BFFFFF mov di, -1 0 00005711 89FE mov si, di 0 00005713 8976F6 mov word [VAR(fat_sector + 2)], si 0 00005716 897EF4 mov word [VAR(fat_sector + 0)], di 0 00005719 E87F00 call dirsearch ; sets up ds == es, es:bx -> dir entry 1612 1613 found_load_file: 0 0000571C FF5664 call near word [VAR(fsiboot_table.writedirentry)] 1615 1616 ; get starting cluster of file 0 0000571F FF7714 push word [bx + deClusterHigh] 0 00005722 FF771A push word [bx + deClusterLow] 1619 1620 ; check FAT+ size bits 0 00005725 F6470CE7 test byte [bx + dePlusSize], 0E7h 1622 ; test whether bits 7-5 and 2-0 NZ 1623 ; https://web.archive.org/web/20150219123449/http://www.fdos.org/kernel/fatplus.txt 1624 0 00005729 8B571E mov dx, [bx + deSize + 2] 0 0000572C 8B5F1C mov bx, [bx + deSize] ; dx:bx = file size (non-FAT+) 0 0000572F 16 push ss 0 00005730 1F pop ds ; (reset ds) 0 00005731 751A jnz .large_file ; FAT+ NZ, clamp to maximum paras --> 1630 0 00005733 53 push bx ; stack & 15 = nonzero if to round up 0 00005734 B90400 mov cx, 4 1633 @@: 0 00005737 D1EA shr dx, 1 0 00005739 D1DB rcr bx, 1 0 0000573B E2FA loop @B ; convert to paragraphs, rounding down 0 0000573D 59 pop cx 1638 ; dx:bx = size in paragraphs, rounded down, if not FAT+ 1639 ; bx = size in paragraphs, rounded down, if < 1_0000h 1640 ; cx & 15 = nonzero if to round up 1641 0 0000573E 85D2 test dx, dx ; > 0FFFFh paras ? 0 00005740 750B jnz .large_file ; yes, large file --> 1644 ; no, take actual size 1645 ; bx = size in paragraphs, rounded down 0 00005742 E8C700 call check_enough.in_bx ; (CHG ax) 1647 1648 ; cx & 15 = nonzero if to round up 0 00005745 F6C10F test cl, 15 ; NZ if to round up 0 00005748 7406 jz @F ; ZR, do not round up --> 0 0000574A 43 inc bx ; round up for last partial paragraph 0 0000574B 7503 jnz @F ; ! natch. do saturating increment 1653 ; ZR here means we had 0FFFFh. 1654 ; reset the register to same value. 1655 .large_file: 1656 ; if we *branch* here then file is >= 10_0000h bytes so >= 1_0000h paragraphs. 1657 ; that means we do not need to call check_enough because its jb could not 1658 ; possibly branch to the error handler (0FFFFh is never below anything). 0 0000574D BBFFFF mov bx, 0FFFFh ; set bx for large file case 1660 @@: 1661 0 00005750 58 pop ax 0 00005751 5A pop dx ; dx:ax = first cluster 1664 0 00005752 53 push bx ; push into word [VAR(paras_left)] 1666 0 00005753 8946F0 mov word [VAR(first_cluster + 0)], ax 0 00005756 8956F2 mov word [VAR(first_cluster + 2)], dx 0 00005759 52 push dx 0 0000575A 50 push ax ; remember cluster for later 1671 0 0000575B E80501 call check_clust 1673 ..@CY_2_fsiboot_error_badchain: 0 0000575E 7244 jc ..@CY_3_fsiboot_error_badchain 1675 1676 next_load_cluster: 0 00005760 52 push dx 0 00005761 50 push ax ; preserve cluster number for later 0 00005762 E88200 call clust_to_first_sector 1680 ; dx:ax = first sector of cluster 1681 ; cx = adjusted sectors per cluster 1682 1683 ; xxx - this will always load an entire cluster (e.g. 64 sectors), 1684 ; even if the file is shorter than this 1685 @@: 0 00005765 8B5EFA mov bx, [VAR(load_seg)] ; => where to read next sector 0 00005768 3B5EEA cmp bx, [VAR(last_available_sector)] 0 0000576B 7608 jbe @F 0 0000576D E89600 call check_enough 0 00005770 B04D mov al, 'M' ; (! _MEMORY_CONTINUE: error code) 0 00005772 FF665E jmp near word [VAR(fsiboot_table.memory_full)] 1692 1693 @@: 0 00005775 FF5660 call near word [VAR(fsiboot_table.read_sector)] 0 00005778 895EFA mov [VAR(load_seg)], bx ; => after last read data 1696 0 0000577B 8B5EEE mov bx, [VAR(para_per_sector)] 0 0000577E 295EE6 sub word [VAR(paras_left)], bx 0 00005781 7610 jbe @F ; read enough --> 1700 0 00005783 E2E0 loop @BB 0 00005785 58 pop ax 0 00005786 5A pop dx 1704 0 00005787 E89300 call clust_next 0 0000578A 73D4 jnc next_load_cluster 0 0000578C 40 inc ax 0 0000578D 40 inc ax 0 0000578E A808 test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 1710 ; clear in 0, 1, and 0FFF_FFF7h 0 00005790 7450 jz fsiboot_error_badchain 0 00005792 A9 db __TEST_IMM16 ; skip pop bx and pop cx 1713 @@: 0 00005793 5B pop bx 0 00005794 59 pop cx 0 00005795 E86E00 call check_enough 0 00005798 FF665C jmp near word [VAR(fsiboot_table.success)] 1718 1719 1720 dirsearch: 0 0000579B 8B462C mov ax, [VAR(root_cluster)] 0 0000579E 8B562E mov dx, [VAR(root_cluster + 2)] 0 000057A1 E8BF00 call check_clust 1724 ..@CY_3_fsiboot_error_badchain: 0 000057A4 723C jc fsiboot_error_badchain 1726 1727 next_root_clust: 0 000057A6 52 push dx 0 000057A7 50 push ax 0 000057A8 E83C00 call clust_to_first_sector 1731 ; dx:ax = first sector of cluster 1732 ; cx = adjusted sectors per cluster 1733 next_root_sect: 0 000057AB 51 push cx 0 000057AC 8B4EEC mov cx, [VAR(entries_per_sector)] 1736 1737 ; Scan root directory for file. We don't bother to check for deleted 1738 ; entries (E5h) or entries that mark the end of the directory (00h). 0 000057AF 8B5E62 mov bx, [VAR(fsiboot_table.dirbuf)] 0 000057B2 FF5660 call near word [VAR(fsiboot_table.read_sector)] 1741 0 000057B5 57 push di 0 000057B6 31FF xor di, di ; es:di-> first entry in this sector 1744 next_ent: 0 000057B8 26F6450B18 test byte [es:di + deAttrib], ATTR_DIRECTORY | ATTR_VOLLABEL 0 000057BD 750E jnz @F ; directory, label, or LFN entry --> (NZ) 0 000057BF 56 push si 0 000057C0 57 push di 0 000057C1 51 push cx 0 000057C2 8B7666 mov si, [VAR(fsiboot_table.filename)] 1751 ; ds:si-> name to match 0 000057C5 B90B00 mov cx, 11 ; length of padded 8.3 FAT filename 0 000057C8 F3A6 repe cmpsb ; check entry 0 000057CA 59 pop cx 0 000057CB 5F pop di 0 000057CC 5E pop si 1757 @@: ; ZR = match, NZ = mismatch 0 000057CD 7445 je found_it ; found entry --> 0 000057CF 8D7D20 lea di, [di + DIRENTRY_size] 1760 0 000057D2 E2E4 loop next_ent ; count down sector's entries (jumps iff cx >0) 0 000057D4 5F pop di 0 000057D5 59 pop cx 0 000057D6 E2D3 loop next_root_sect 0 000057D8 58 pop ax 0 000057D9 5A pop dx 0 000057DA E84000 call clust_next 0 000057DD 73C7 jnc next_root_clust 1769 file_not_found: 0 000057DF B046 mov al, 'F' 0 000057E1 A9 db __TEST_IMM16 ; skip mov al 1772 fsiboot_error_badchain: 0 000057E2 B042 mov al, 'B' 1774 1775 fsiboot_error: 0 000057E4 FF665A jmp near word [VAR(fsiboot_table.error)] 1777 1778 1779 ; INP: dx:ax = cluster - 2 (0-based cluster) 1780 ; OUT: dx:ax = first sector of that cluster 1781 ; cx = adjusted sectors per cluster 1782 ; CHG: bx 1783 clust_to_first_sector: 0 000057E7 8B4EE8 mov cx, word [VAR(adj_sectors_per_cluster)] 0 000057EA 52 push dx 0 000057EB F7E1 mul cx 0 000057ED 93 xchg bx, ax 0 000057EE 58 pop ax 0 000057EF 52 push dx 0 000057F0 F7E1 mul cx 0 000057F2 85D2 test dx, dx 0 000057F4 75EC jnz fsiboot_error_badchain 0 000057F6 92 xchg dx, ax 0 000057F7 58 pop ax 0 000057F8 01C2 add dx, ax 0 000057FA 7207 jc ..@CY_fsiboot_error_badchain 0 000057FC 93 xchg ax, bx 1798 0 000057FD 0346FC add ax, [VAR(data_start)] 0 00005800 1356FE adc dx, [VAR(data_start + 2)] 1801 ..@CY_fsiboot_error_badchain: 0 00005803 72DD jc fsiboot_error_badchain 1803 ; dx:ax = first sector in cluster 0 00005805 C3 retn 1805 1806 1807 check_enough: 0 00005806 8B5EFA mov bx, [VAR(load_seg)] 1809 ; => behind last read sector 0 00005809 2B5E6A sub bx, word [VAR(fsiboot_table.loadseg)] 1811 .in_bx: 0 0000580C 3B5E68 cmp bx, word [VAR(fsiboot_table.minpara)] 0 0000580F B045 mov al, 'E' 0 00005811 72D1 jb fsiboot_error 0 00005813 C3 retn 1816 1817 1818 found_it: 1819 ; es:di -> dir entry in dir sector buffer 0 00005814 89FB mov bx, di 0 00005816 5F pop di ; restore si:di = loaded FAT sector 0 00005817 59 pop cx ; (discard sectors per cluster counter) 0 00005818 59 pop cx 0 00005819 59 pop cx ; (discard current cluster number) 1825 ; es:bx -> dir entry 0 0000581A 06 push es 0 0000581B 1F pop ds ; ds:bx -> directory entry 0 0000581C C3 retn 1829 1830 1831 ; INP: dx:ax = cluster (0-based) 1832 ; si:di = loaded FAT sector, -1 if none 1833 ; OUT: CY if no next cluster 1834 ; NC if next cluster found 1835 ; dx:ax = next cluster value (0-based) 1836 ; si:di = loaded FAT sector 1837 ; CHG: cx, bx, es 1838 clust_next: 0 0000581D 83C002 add ax, 2 0 00005820 83D200 adc dx, 0 1841 0 00005823 01C0 add ax, ax 0 00005825 11D2 adc dx, dx 0 00005827 01C0 add ax, ax 0 00005829 11D2 adc dx, dx ; * 4 = byte offset into FAT (0--4000_0000h) 0 0000582B 50 push ax 0 0000582C 92 xchg ax, dx 0 0000582D 31D2 xor dx, dx ; dx:ax = high word 0 0000582F F7760B div word [VAR(bytes_per_sector)] 0 00005832 93 xchg bx, ax ; bx = result high word, clobbers ax 0 00005833 58 pop ax ; dx = remainder, ax = low word 0 00005834 F7760B div word [VAR(bytes_per_sector)] 0 00005837 87D3 xchg dx, bx ; dx:ax = result, bx = remainder 1854 ; dx:ax = sector offset into FAT (0--200_0000h) 1855 ; bx = byte offset into FAT sector (0--8190) 0 00005839 39F2 cmp dx, si 0 0000583B 7504 jne @F ; read sector 0 0000583D 39F8 cmp ax, di 0 0000583F 7418 je @FF ; sector is already buffered 1860 @@: 0 00005841 89D6 mov si, dx 0 00005843 89C7 mov di, ax 0 00005845 8956F6 mov word [VAR(fat_sector + 2)], dx 0 00005848 8946F4 mov word [VAR(fat_sector + 0)], ax 1865 0 0000584B 53 push bx 0 0000584C 03460E add ax, [VAR(fat_start)] 0 0000584F 83D200 adc dx, 0 0 00005852 8B5EF8 mov bx, [VAR(fat_seg)] 0 00005855 FF5660 call near word [VAR(fsiboot_table.read_sector)] 0 00005858 5B pop bx 1872 @@: 0 00005859 8E46F8 mov es, [VAR(fat_seg)] 0 0000585C 268B07 mov ax, [es:bx] 0 0000585F 268B5702 mov dx, [es:bx + 2] 1876 1877 ; INP: dx:ax = cluster value, 2-based 1878 ; OUT: dx:ax -= 2 (makes it 0-based) 1879 ; CY iff invalid cluster 1880 check_clust: 0 00005863 80E60F and dh, 0Fh 0 00005866 83E802 sub ax, 2 0 00005869 83DA00 sbb dx, 0 0 0000586C 81FAFF0F cmp dx, 0FFFh 0 00005870 7203 jb @F ; CY here means valid ...- 0 00005872 83F8F5 cmp ax, 0FFF7h - 2 1887 @@: ; -... or if NC first, CY here also 0 00005875 F5 cmc ; NC if valid 0 00005876 C3 retn 1890 1891 1892 ; INP: ax = 0 1893 ; cs = 0, cs:7C00h -> loaded first stage and FSIBOOT 1894 ; OUT: if supported, 1895 ; ax => TOM 1896 ; else, 1897 ; ax = 0 1898 ; CHG: cx, dx, si 1899 ; STT: ds => 0, ds == ss 1900 fsiboot_memorysize: 1901 ; Get conventional memory size and store it 0 00005877 CD12 int 12h 0 00005879 B106 mov cl, 6 0 0000587B D3E0 shl ax, cl 1905 %if 1 || _RPL ; +33 bytes 0 0000587D 92 xchg dx, ax 0 0000587E C536BC00 lds si, [4 * 2Fh] 0 00005882 83C603 add si, 3 0 00005885 AC lodsb 0 00005886 3C52 cmp al, 'R' 0 00005888 750F jne .no_rpl 0 0000588A AC lodsb 0 0000588B 3C50 cmp al, 'P' 0 0000588D 750A jne .no_rpl 0 0000588F AC lodsb 0 00005890 3C4C cmp al, 'L' 0 00005892 7505 jne .no_rpl 0 00005894 B8064A mov ax, 4A06h 0 00005897 CD2F int 2Fh 1920 .no_rpl: 0 00005899 16 push ss 0 0000589A 1F pop ds 0 0000589B 92 xchg ax, dx 1924 %endif 1925 fsiboot_reserved: 0 0000589C C3 retn 1927 1928 1929 fsinfo_available: 0 0000589D 26 _fill 480 + 4 - 2 - 2 - 2,38,fsiboot 1931 1932 %assign num $-fsinfo_available 1933 %warning FSINFO: num bytes still available. 1933 ****************** warning: FSINFO: 1 bytes still available. [-w+user] 1934 1935 1936 ; INP: - 1937 ; OUT: - 1938 ; CHG: any 1939 ; REM: Reserved for future expansion. 1940 reserved_entrypoint: 0 0000589E [DC03] dw fsiboot_reserved 1942 1943 ; INP: ax = 0 1944 ; cs = 0, cs:7C00h -> loaded first stage and FSIBOOT 1945 ; OUT: if supported, 1946 ; ax => TOM 1947 ; else, 1948 ; ax = 0 1949 ; CHG: cx, dx, si 1950 ; STT: ds => 0, ds == ss 1951 memorysize_entrypoint: 0 000058A0 [B703] dw fsiboot_memorysize 1953 1954 ; INP: si:di = loaded sector-in-FAT 1955 ; ds = ss 1956 ; ds:word [fsiboot_table.filename] -> 8.3 filename 1957 ; CHG: ax, cx, dx 1958 ; OUT: si:di updated, if so 1959 ; ds == es 1960 ; ds:bx == es:bx -> found directory entry 1961 ; jumps to error handler if an error occurs, 1962 ; ds = ss 1963 ; STT: stack variables as set up by main FSIBOOT entry 1964 dirsearch_entrypoint: 0 000058A2 [DB02] dw dirsearch 1966 0 000058A4 72724161 dd "rrAa" 0 000058A8 FFFFFFFF dd -1 ; number of free clusters 0 000058AC FFFFFFFF dd -1 ; first free cluster 0 000058B0 00000000 times 3 dd 0 ; FSINFO.reserved2 0 000058BC 000055AA dd 0_AA55_0000h ; FSINFO.signature3 1972 1973 end_after_fsiboot: 1974 %if $ - fsiboot != 512 1975 %error Wrong FSIBOOT layout 1976 %endif 255 .end: 256 %assign fat32_payload.size (fat32_payload.end - fat32_payload) 257 %assign _FAT32_TWO_SECTORS 0 258 %if fat32_payload.size == 512 259 %elif fat32_payload.size == 1024 260 %assign _FAT32_TWO_SECTORS 1 261 %else 262 %error "FAT32 payload isn't 512 or 1024 bytes sized." 263 %endif 264 %else 265 %assign _FAT32_TWO_SECTORS 0 266 %endif 267 268 === Switch to base=-000100h -> "PROGRAM" 269 section PROGRAM 270 start: 271 ; This is a simple MS-DOS 1.x detection (8 Byte). 0 00000100 B44D mov ah, 4Dh ; the only function I found that doesn't need much setup or cleanup 0 00000102 F9 stc ; but that uses MS-DOS 2.x error reporting. clears CF (Int21.30 does not) 0 00000103 CD21 int 21h 0 00000105 7301 jnc .dosgood ; it is MS-DOS 2.x+ or compatible --> 0 00000107 C3 retn ; it isn't so simply terminate 277 278 .dosgood: 0 00000108 FC cld 0 00000109 81FC[A05A] cmp sp, stack_end 0 0000010D 730B jae .stackgood 0 0000010F BA[8338] mov dx, msg.out_of_memory 0 00000112 E89E26 call disp_msg_asciz 0 00000115 B8FF4C mov ax, 4CFFh 0 00000118 CD21 int 21h 286 287 .stackgood: 0 0000011A BA[9526] mov dx, i23 0 0000011D B82325 mov ax, 2523h 0 00000120 CD21 int 21h ; set Int23 so that we restore on Ctrl-C as well 0 00000122 BA[9226] mov dx, i24 0 00000125 B82425 mov ax, 2524h 0 00000128 CD21 int 21h ; set Int24 so all hard errors are changed to the soft error 294 0 0000012A C606[EE29]FF mov byte [drivenumber], -1 296 0 0000012F BE8100 mov si, 81h 298 .loop: 0 00000132 AC lodsb 300 .loop_got_byte: 0 00000133 3C09 cmp al, 9 0 00000135 74FB je .loop 0 00000137 3C20 cmp al, 32 0 00000139 74F7 je .loop 0 0000013B 7303E91508 jb cmd_line_end 306 0 00000140 3C2D cmp al, '-' 0 00000142 7428 je .switch 0 00000144 3C2F cmp al, '/' 0 00000146 7424 je .switch 311 0 00000148 803C3A cmp byte [si], ':' 0 0000014B 7403E9BB07 jne .error 0 00000150 E88525 call uppercase 0 00000153 2C41 sub al, 'A' 0 00000155 3C20 cmp al, 32 0 00000157 7203E9AF07 jae .error 0 0000015C 803E[EE29]FF cmp byte [drivenumber], -1 0 00000161 7403E99F07 jne .error_multiple_drives 0 00000166 A2[EE29] mov byte [drivenumber], al 0 00000169 46 inc si 0 0000016A EBC6 jmp .loop 323 324 .switch: 0 0000016C AC lodsb 0 0000016D E86825 call uppercase 327 %if _NUM_REPLACEMENTS 0 00000170 3C46 cmp al, 'F' 0 00000172 7467 je .switch_f 330 %endif 0 00000174 3C4F cmp al, 'O' 0 00000176 7503E9DD00 je .switch_o 0 0000017B 3C55 cmp al, 'U' 0 0000017D 7503E9B801 je .switch_u 0 00000182 3C50 cmp al, 'P' 0 00000184 7503E9F601 je .switch_p 0 00000189 3C51 cmp al, 'Q' 0 0000018B 7503E92B02 je .switch_q 0 00000190 3C4C cmp al, 'L' 0 00000192 7503E96002 je .switch_l 0 00000197 3C49 cmp al, 'I' 0 00000199 7503E9A002 je .switch_i 0 0000019E 3C42 cmp al, 'B' 0 000001A0 7503E94803 je .switch_b 0 000001A5 3C43 cmp al, 'C' 0 000001A7 7503E9BA03 je .switch_c 0 000001AC 3C53 cmp al, 'S' 0 000001AE 7503E93204 je .switch_s 0 000001B3 3C4D cmp al, 'M' 0 000001B5 7503E96F05 je .switch_m 0 000001BA 3C47 cmp al, 'G' 0 000001BC 7503E94606 je .switch_g 353 0 000001C1 3C48 cmp al, 'H' 0 000001C3 740D je .switch_h 0 000001C5 3C3F cmp al, '?' 0 000001C7 7409 je .switch_h 358 359 .switch_not_supported: 0 000001C9 BA[9438] mov dx, msg.switch_not_supported 361 disp_error: equ $ 0 000001CC E8E425 call disp_msg_asciz 0 000001CF E9DA15 jmp exit_error 364 365 366 .switch_h: 0 000001D2 BA[2C2A] mov dx, msg.help 0 000001D5 E8DB25 call disp_msg_asciz 0 000001D8 E9DC15 jmp exit_normal 370 371 372 %if _NUM_REPLACEMENTS 373 .switch_f: 374 375 @@: 0 000001DB AC lodsb 0 000001DC 3C20 cmp al, 32 0 000001DE 74FB je @B 0 000001E0 3C09 cmp al, 9 0 000001E2 74F7 je @B 0 000001E4 3C3D cmp al, '=' 0 000001E6 742F je @FF 0 000001E8 3C3A cmp al, ':' 0 000001EA 742B je @FF 0 000001EC E80B25 call get_decimal_literal 0 000001EF 85DB test bx, bx 0 000001F1 7403E91507 jnz .error 0 000001F6 85D2 test dx, dx 0 000001F8 7503E90E07 jz .error 0 000001FD 83FA04 cmp dx, _NUM_REPLACEMENTS 0 00000200 7603E90607 ja .error 0 00000205 4A dec dx 0 00000206 3C3D cmp al, '=' 0 00000208 7407 je @F 0 0000020A 3C3A cmp al, ':' 0 0000020C 7403E9FA06 jne .error 397 @@: 0 00000211 B80C00 mov ax, 12 0 00000214 F7E2 mul dx ; ax = 0, 12, 24, 36 0 00000216 A9 db __TEST_IMM16 ; (skip xor) 401 @@: 0 00000217 31C0 xor ax, ax ; if empty number field (al was colon) 0 00000219 05[783C] add ax, msg.name_replacements ; -> name replacement buffer 0 0000021C 97 xchg ax, di ; -> buffer 405 0 0000021D AC lodsb 0 0000021E 4E dec si 0 0000021F 3C20 cmp al, 32 0 00000221 742F je @F 0 00000223 3C09 cmp al, 9 0 00000225 742B je @F 0 00000227 E87124 call iseol? 0 0000022A 7426 je @F 414 0 0000022C 57 push di 0 0000022D E8E723 call boot_parse_fn ; parse 0 00000230 5F pop di 0 00000231 7303E9D506 jc .error ; error out --> 0 00000236 3C2F cmp al, '/' 0 00000238 7503E9CE06 je .error 0 0000023D 3C5C cmp al, '\' 0 0000023F 7503E9C706 je .error ; invalid --> 0 00000244 4E dec si 0 00000245 56 push si 0 00000246 BE[6C3C] mov si, load_kernel_name 0 00000249 B90600 mov cx, 12 >> 1 0 0000024C F3A5 rep movsw ; write to buffer 0 0000024E 5E pop si 0 0000024F E9E0FE jmp .loop 430 431 @@: 0 00000252 C60500 mov byte [di], 0 ; delete replacement name 0 00000255 E9DAFE jmp .loop 434 %endif 435 436 437 .switch_o: 0 00000258 AC lodsb 0 00000259 E87C24 call uppercase 0 0000025C 3C4E cmp al, 'N' 0 0000025E 7508 jne @F 0 00000260 8026[2308]FC clropt [cmd_line_flags], clfSetOEMName | clfPreserveOEMName 0 00000265 E9CAFE jmp .loop 444 445 @@: 0 00000268 3C50 cmp al, 'P' 0 0000026A 750D jne @F 0 0000026C 800E[2308]02 setopt [cmd_line_flags], clfPreserveOEMName 0 00000271 8026[2308]FE clropt [cmd_line_flags], clfSetOEMName 0 00000276 E9B9FE jmp .loop 451 452 @@: 0 00000279 3C3D cmp al, '=' 0 0000027B 7407 je @F 0 0000027D 3C3A cmp al, ':' 0 0000027F 7403 je @F 0 00000281 E945FF jmp .switch_not_supported 458 459 @@: 0 00000284 8026[2308]FD clropt [cmd_line_flags], clfPreserveOEMName 0 00000289 800E[2308]01 setopt [cmd_line_flags], clfSetOEMName 0 0000028E BF[DC29] mov di, oemname 0 00000291 AC lodsb 0 00000292 88C4 mov ah, al 0 00000294 3C22 cmp al, '"' 0 00000296 7407 je .o_quoted 0 00000298 3C27 cmp al, "'" 0 0000029A 7403 je .o_quoted 0 0000029C B400 mov ah, 0 0 0000029E A8 db __TEST_IMM8 471 .o_quoted: 472 .o_loop: 0 0000029F AC lodsb 0 000002A0 38E0 cmp al, ah 0 000002A2 742E je .o_end_lod 0 000002A4 84E4 test ah, ah 0 000002A6 750C jnz @F 0 000002A8 3C09 cmp al, 9 0 000002AA 7427 je .o_end 0 000002AC 3C20 cmp al, 32 0 000002AE 7423 je .o_end 0 000002B0 3C0D cmp al, 13 0 000002B2 741F je .o_end 484 @@: 0 000002B4 3C0D cmp al, 13 0 000002B6 7448 je .o_error 0 000002B8 81FF[E429] cmp di, oemname + 8 0 000002BC 7342 jae .o_error 0 000002BE 3C5C cmp al, '\' 0 000002C0 750D jne .o_store 0 000002C2 AC lodsb 0 000002C3 3C0D cmp al, 13 0 000002C5 7439 je .o_error 0 000002C7 3C78 cmp al, 'x' 0 000002C9 743B je .o_x 0 000002CB 3C58 cmp al, 'X' 0 000002CD 7437 je .o_x 498 .o_store: 0 000002CF AA stosb 0 000002D0 EBCD jmp .o_loop 501 502 .o_end_lod: 0 000002D2 AC lodsb 504 .o_end: 0 000002D3 89F9 mov cx, di 0 000002D5 81E9[DC29] sub cx, oemname 0 000002D9 83F908 cmp cx, 8 0 000002DC 731F jae .o_done 0 000002DE 56 push si 0 000002DF 50 push ax 0 000002E0 BF[E329] mov di, oemname + 7 0 000002E3 BE[DC29] mov si, oemname 0 000002E6 01CE add si, cx 0 000002E8 4E dec si 0 000002E9 FD std ; AMD erratum 109 workaround below 0 000002EA E303 jcxz @FF 517 @@: 0 000002EC A4 movsb 0 000002ED E2FD loop @B 520 @@: 521 ; rep movsb 522 @@: 0 000002EF 81FF[DC29] cmp di, oemname 0 000002F3 7205 jb @F 0 000002F5 B020 mov al, 32 0 000002F7 AA stosb 0 000002F8 EBF5 jmp @B 528 @@: 0 000002FA FC cld 0 000002FB 58 pop ax 0 000002FC 5E pop si 532 .o_done: 0 000002FD E933FE jmp .loop_got_byte 534 535 .o_error: 0 00000300 BA[AC38] mov dx, msg.o_error 0 00000303 E9C6FE jmp disp_error 538 539 .o_x: 0 00000306 AC lodsb 0 00000307 E84E24 call getexpression.lit_ishexdigit? 0 0000030A 72F4 jc .o_error 0 0000030C E8C923 call uppercase 0 0000030F 2C30 sub al, '0' 0 00000311 3C09 cmp al, 9 ; was decimal digit ? 0 00000313 7602 jbe @F ; yes --> 0 00000315 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 548 @@: 0 00000317 88C3 mov bl, al 0 00000319 AC lodsb 0 0000031A E83B24 call getexpression.lit_ishexdigit? 0 0000031D 7216 jc .o_store_bl_dec_si 0 0000031F E8B623 call uppercase 0 00000322 2C30 sub al, '0' 0 00000324 3C09 cmp al, 9 ; was decimal digit ? 0 00000326 7602 jbe @F ; yes --> 0 00000328 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 558 @@: 0 0000032A 00DB add bl, bl 0 0000032C 00DB add bl, bl 0 0000032E 00DB add bl, bl 0 00000330 00DB add bl, bl 0 00000332 00C3 add bl, al 0 00000334 46 inc si 565 .o_store_bl_dec_si: 0 00000335 4E dec si 0 00000336 88D8 mov al, bl 0 00000338 EB95 jmp .o_store 569 570 .switch_u: 571 @@: 0 0000033A AC lodsb 0 0000033B 3C20 cmp al, 32 0 0000033D 74FB je @B 0 0000033F 3C09 cmp al, 9 0 00000341 74F7 je @B 0 00000343 3C3D cmp al, '=' 0 00000345 74F3 je @B 0 00000347 3C3A cmp al, ':' 0 00000349 74EF je @B 581 0 0000034B BA[333E] mov dx, msg.keep 0 0000034E 4E dec si 0 0000034F E85023 call isstring? 0 00000352 B8FFFF mov ax, 0FFFFh 0 00000355 7422 je @F 0 00000357 BA[383E] mov dx, msg.auto 0 0000035A E84523 call isstring? 0 0000035D B800FF mov ax, 0FF00h 0 00000360 7417 je @F 0 00000362 AC lodsb 0 00000363 E89C23 call get_hexadecimal_literal 0 00000366 85DB test bx, bx 0 00000368 7403E99E05 jnz .error 0 0000036D 81FA0001 cmp dx, 256 0 00000371 7203E99505 jae .error 0 00000376 89D0 mov ax, dx 0 00000378 4E dec si 599 @@: 0 00000379 A3[E629] mov word [load_unit], ax 0 0000037C E9B3FD jmp .loop 602 603 604 .switch_p: 605 @@: 0 0000037F AC lodsb 0 00000380 3C20 cmp al, 32 0 00000382 74FB je @B 0 00000384 3C09 cmp al, 9 0 00000386 74F7 je @B 0 00000388 3C3D cmp al, '=' 0 0000038A 74F3 je @B 0 0000038C 3C3A cmp al, ':' 0 0000038E 74EF je @B 615 0 00000390 BA[333E] mov dx, msg.keep 0 00000393 4E dec si 0 00000394 E80B23 call isstring? 0 00000397 B8FFFF mov ax, 0FFFFh 0 0000039A 7419 je @F 0 0000039C BA[383E] mov dx, msg.auto 0 0000039F E80023 call isstring? 0 000003A2 B800FF mov ax, 0FF00h 0 000003A5 740E je @F 0 000003A7 BA[453E] mov dx, msg.none 0 000003AA E8F522 call isstring? 0 000003AD B8FF00 mov ax, 00FFh 0 000003B0 7403 je @F 0 000003B2 E95605 jmp .error 630 @@: 0 000003B5 A3[E829] mov word [load_use_partinfo], ax 0 000003B8 E977FD jmp .loop 633 634 635 .switch_q: 636 @@: 0 000003BB AC lodsb 0 000003BC 3C20 cmp al, 32 0 000003BE 74FB je @B 0 000003C0 3C09 cmp al, 9 0 000003C2 74F7 je @B 0 000003C4 3C3D cmp al, '=' 0 000003C6 74F3 je @B 0 000003C8 3C3A cmp al, ':' 0 000003CA 74EF je @B 646 0 000003CC BA[333E] mov dx, msg.keep 0 000003CF 4E dec si 0 000003D0 E8CF22 call isstring? 0 000003D3 B8FFFF mov ax, 0FFFFh 0 000003D6 7419 je @F 0 000003D8 BA[383E] mov dx, msg.auto 0 000003DB E8C422 call isstring? 0 000003DE B800FF mov ax, 0FF00h 0 000003E1 740E je @F 0 000003E3 BA[453E] mov dx, msg.none 0 000003E6 E8B922 call isstring? 0 000003E9 B8FF00 mov ax, 00FFh 0 000003EC 7403 je @F 0 000003EE E91A05 jmp .error 661 @@: 0 000003F1 A3[EA29] mov word [load_use_query_geometry], ax 0 000003F4 E93BFD jmp .loop 664 665 666 .switch_l: 667 @@: 0 000003F7 AC lodsb 0 000003F8 3C20 cmp al, 32 0 000003FA 74FB je @B 0 000003FC 3C09 cmp al, 9 0 000003FE 74F7 je @B 0 00000400 3C3D cmp al, '=' 0 00000402 74F3 je @B 0 00000404 3C3A cmp al, ':' 0 00000406 74EF je @B 677 0 00000408 BA[333E] mov dx, msg.keep 0 0000040B 4E dec si 0 0000040C E89322 call isstring? 0 0000040F B8FFFF mov ax, 0FFFFh 0 00000412 7424 je @F 0 00000414 BA[383E] mov dx, msg.auto 0 00000417 E88822 call isstring? 0 0000041A B800FF mov ax, 0FF00h 0 0000041D 7419 je @F 0 0000041F BA[3D3E] mov dx, msg.autohdd 0 00000422 E87D22 call isstring? 0 00000425 B80001 mov ax, 0100h 0 00000428 740E je @F 0 0000042A BA[453E] mov dx, msg.none 0 0000042D E87222 call isstring? 0 00000430 B8FF00 mov ax, 00FFh 0 00000433 7403 je @F 0 00000435 E9D304 jmp .error 696 @@: 0 00000438 A3[EC29] mov word [load_use_lba], ax 0 0000043B E9F4FC jmp .loop 699 700 701 .switch_i: 0 0000043E AC lodsb 0 0000043F E89622 call uppercase 0 00000442 3C4F cmp al, 'O' 0 00000444 750D jne @F 0 00000446 8026[2208]9F clropt [cmd_line_flags], clfZeroInfo | clfInfoFromCopy 0 0000044B 800E[2208]10 setopt [cmd_line_flags], clfLeaveInfo 708 .loop_1: 0 00000450 E9DFFC jmp .loop 710 711 @@: 0 00000453 3C52 cmp al, 'R' 0 00000455 7507 jne @F 0 00000457 8026[2208]8F clropt [cmd_line_flags], clfLeaveInfo | clfZeroInfo | clfInfoFromCopy 0 0000045C EBF2 jmp .loop_1 716 717 @@: 0 0000045E 3C5A cmp al, 'Z' 0 00000460 750C jne @F 0 00000462 8026[2208]CF clropt [cmd_line_flags], clfLeaveInfo | clfInfoFromCopy 0 00000467 800E[2208]40 setopt [cmd_line_flags], clfZeroInfo 0 0000046C EBE2 jmp .loop_1 723 724 @@: 0 0000046E 3C43 cmp al, 'C' 0 00000470 750C jne @F 0 00000472 8026[2208]AF clropt [cmd_line_flags], clfLeaveInfo | clfZeroInfo 0 00000477 800E[2208]20 setopt [cmd_line_flags], clfInfoFromCopy 0 0000047C EBD2 jmp .loop_1 730 731 @@: 0 0000047E 3C49 cmp al, 'I' 0 00000480 7507 jne @F 0 00000482 800E[2108]08 setopt [cmd_line_flags], clfAllowInvalidInfo 0 00000487 EBC7 jmp .loop_1 736 737 @@: 0 00000489 3C56 cmp al, 'V' 0 0000048B 7507 jne @F 0 0000048D 8026[2108]F7 clropt [cmd_line_flags], clfAllowInvalidInfo 0 00000492 EBBC jmp .loop_1 742 743 @@: 0 00000494 3C53 cmp al, 'S' 0 00000496 750C jne @F 0 00000498 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 0 0000049D 800E[2008]20 setopt [cmd_line_flags], clfWriteInfoToSector 0 000004A2 EBAC jmp .loop_1 749 750 @@: 0 000004A4 3C4E cmp al, 'N' 0 000004A6 750C jne @F 0 000004A8 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 0 000004AD 800E[2008]08 setopt [cmd_line_flags], clfDontWriteInfo 755 .loop_2: 0 000004B2 EB9C jmp .loop_1 757 758 @@: 0 000004B4 3C3A cmp al, ':' 0 000004B6 740B je @F 0 000004B8 3C3D cmp al, '=' 0 000004BA 7407 je @F 0 000004BC 3C42 cmp al, 'B' 0 000004BE 7421 je .switch_i_b 0 000004C0 E906FD jmp .switch_not_supported 766 767 @@: 0 000004C3 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 0 000004C8 800E[2008]10 setopt [cmd_line_flags], clfWriteInfoToFile 770 @@: 0 000004CD AC lodsb 0 000004CE 3C20 cmp al, 32 0 000004D0 74FB je @B 0 000004D2 3C09 cmp al, 9 0 000004D4 74F7 je @B 776 0 000004D6 4E dec si 0 000004D7 8936[3408] mov word [cmd_line_info_file.name], si 0 000004DB E83304 call process_switch_filename 0 000004DE E952FC jmp .loop_got_byte 781 782 .switch_i_b: 0 000004E1 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 0 000004E6 800E[2008]40 setopt [cmd_line_flags], clfWriteInfoToSectorFile 0 000004EB EBC5 jmp .loop_2 786 787 788 .switch_b: 0 000004ED AC lodsb 0 000004EE E8E721 call uppercase 0 000004F1 3C4F cmp al, 'O' 0 000004F3 750C jne @F 0 000004F5 8026[2208]FD clropt [cmd_line_flags], clfSectorFromCopy 0 000004FA 800E[2208]01 setopt [cmd_line_flags], clfLeaveSector 0 000004FF EBB1 jmp .loop_2 796 797 @@: 0 00000501 3C52 cmp al, 'R' 0 00000503 7507 jne @F 0 00000505 8026[2208]FC clropt [cmd_line_flags], clfLeaveSector | clfSectorFromCopy 0 0000050A EBA6 jmp .loop_2 802 803 @@: 0 0000050C 3C43 cmp al, 'C' 0 0000050E 750C jne @F 0 00000510 8026[2208]FE clropt [cmd_line_flags], clfLeaveSector 0 00000515 800E[2208]02 setopt [cmd_line_flags], clfSectorFromCopy 0 0000051A EB96 jmp .loop_2 809 810 @@: 0 0000051C 3C53 cmp al, 'S' 0 0000051E 750C jne @F 0 00000520 8026[2008]F8 clropt [cmd_line_flags], clfWriteSectorMask 0 00000525 800E[2008]02 setopt [cmd_line_flags], clfWriteSectorToSector 0 0000052A EB86 jmp .loop_2 816 817 @@: 0 0000052C 3C4E cmp al, 'N' 0 0000052E 750D jne @F 0 00000530 8026[2008]F8 clropt [cmd_line_flags], clfWriteSectorMask 0 00000535 800E[2008]04 setopt [cmd_line_flags], clfDontWriteSector 0 0000053A E975FF jmp .loop_2 823 824 @@: 0 0000053D 3C3A cmp al, ':' 0 0000053F 7407 je @F 0 00000541 3C3D cmp al, '=' 0 00000543 7403 je @F 0 00000545 E981FC jmp .switch_not_supported 830 831 @@: 0 00000548 8026[2008]F8 clropt [cmd_line_flags], clfWriteSectorMask 0 0000054D 800E[2008]01 setopt [cmd_line_flags], clfWriteSectorToFile 834 @@: 0 00000552 AC lodsb 0 00000553 3C20 cmp al, 32 0 00000555 74FB je @B 0 00000557 3C09 cmp al, 9 0 00000559 74F7 je @B 840 0 0000055B 4E dec si 0 0000055C 8936[3008] mov word [cmd_line_sector_file.name], si 0 00000560 E8AE03 call process_switch_filename 0 00000563 E9CDFB jmp .loop_got_byte 845 846 847 .switch_c: 0 00000566 AC lodsb 0 00000567 E86E21 call uppercase 0 0000056A 3C42 cmp al, 'B' 0 0000056C 750D jne @F 0 0000056E 8026[2108]DF clropt [cmd_line_flags], clfWriteCopySectorIfSector 0 00000573 800E[2108]10 setopt [cmd_line_flags], clfWriteCopySector 0 00000578 E937FF jmp .loop_2 855 856 @@: 0 0000057B 3C49 cmp al, 'I' 0 0000057D 750D jne @F 0 0000057F 8026[2108]7F clropt [cmd_line_flags], clfWriteCopyInfoIfSector 0 00000584 800E[2108]40 setopt [cmd_line_flags], clfWriteCopyInfo 0 00000589 E926FF jmp .loop_2 862 863 @@: 0 0000058C 3C4E cmp al, 'N' 0 0000058E 751D jne @F 0 00000590 AC lodsb 0 00000591 E84421 call uppercase 0 00000594 3C49 cmp al, 'I' 0 00000596 740D je .switch_cni 0 00000598 8026[2108]CF clropt [cmd_line_flags], clfWriteCopySectorIfSector | clfWriteCopySector 0 0000059D 3C42 cmp al, 'B' 0 0000059F 7503E90EFF je .loop_2 0 000005A4 4E dec si 875 .switch_cn: 876 .switch_cni: 0 000005A5 8026[2108]3F clropt [cmd_line_flags], clfWriteCopyInfoIfSector | clfWriteCopyInfo 0 000005AA E905FF jmp .loop_2 880 881 @@: 0 000005AD 3C53 cmp al, 'S' 0 000005AF 7527 jne @F 0 000005B1 AC lodsb 0 000005B2 E82321 call uppercase 0 000005B5 3C49 cmp al, 'I' 0 000005B7 7412 je .switch_csi 0 000005B9 8026[2108]EF clropt [cmd_line_flags], clfWriteCopySector 0 000005BE 800E[2108]20 setopt [cmd_line_flags], clfWriteCopySectorIfSector 0 000005C3 3C42 cmp al, 'B' 0 000005C5 7503E9E8FE je .loop_2 0 000005CA 4E dec si 893 .switch_cs: 894 .switch_csi: 0 000005CB 8026[2108]BF clropt [cmd_line_flags], clfWriteCopyInfo 0 000005D0 800E[2108]80 setopt [cmd_line_flags], clfWriteCopyInfoIfSector 0 000005D5 E9DAFE jmp .loop_2 898 899 @@: 0 000005D8 8026[2108]5F clropt [cmd_line_flags], clfWriteCopySectorIfSector | clfWriteCopyInfoIfSector 0 000005DD 800E[2108]50 setopt [cmd_line_flags], clfWriteCopySector | clfWriteCopyInfo 0 000005E2 E9CDFE jmp .loop_2 903 904 905 .switch_s: 0 000005E5 AC lodsb 0 000005E6 E8EF20 call uppercase 908 0 000005E9 3C47 cmp al, 'G' 0 000005EB 7403E98200 jne @FF 911 0 000005F0 800E[2308]08 setopt [cmd_line_flags], clfCheckFSI 913 0 000005F5 B82020 mov ax, 2020h 0 000005F8 BF[5008] mov di, fsi_check 0 000005FB B90400 mov cx, 4 0 000005FE 57 push di 0 000005FF F3AB rep stosw 0 00000601 5F pop di 0 00000602 B400 mov ah, 0 921 @@: 0 00000604 AC lodsb 0 00000605 3C20 cmp al, 32 0 00000607 74FB je @B 0 00000609 3C09 cmp al, 9 0 0000060B 74F7 je @B 0 0000060D 3C3D cmp al, '=' 0 0000060F 74F3 je @B 0 00000611 3C3A cmp al, ':' 0 00000613 74EF je @B 0 00000615 3C22 cmp al, '"' 0 00000617 7503 jne .sg_no_quote 0 00000619 88C4 mov ah, al 0 0000061B AC lodsb 935 .sg_no_quote: 936 0 0000061C 31DB xor bx, bx 938 .sg_loop: 0 0000061E 3C20 cmp al, 32 0 00000620 7307 jae .sg_not_eol 0 00000622 84E4 test ah, ah 0 00000624 7449 jz .sg_done_dec 943 .switch_not_supported_j1: 0 00000626 E9A0FB jmp .switch_not_supported 945 946 .sg_not_eol: 0 00000629 7504 jne .sg_not_quoted_blank 0 0000062B 84E4 test ah, ah 0 0000062D 7440 jz .sg_done_dec 950 .sg_not_quoted_blank: 0 0000062F 38E0 cmp al, ah 0 00000631 7439 je .sg_done 0 00000633 80FB08 cmp bl, 8 0 00000636 73EE jae .switch_not_supported_j1 0 00000638 3C5C cmp al, '\' 0 0000063A 752B jne .sg_next 0 0000063C AC lodsb 0 0000063D 3C0D cmp al, 13 0 0000063F 74E5 je .switch_not_supported_j1 0 00000641 3C78 cmp al, 'x' 0 00000643 7404 je .sg_escape_x 0 00000645 3C58 cmp al, 'X' 0 00000647 751E jne .sg_next 964 .sg_escape_x: 0 00000649 AC lodsb 0 0000064A 31C9 xor cx, cx 0 0000064C E89420 call get_hexit 0 0000064F 72D5 jc .switch_not_supported_j1 0 00000651 88C1 mov cl, al 0 00000653 AC lodsb 0 00000654 E88C20 call get_hexit 0 00000657 720B jc .sg_store_cl 0 00000659 01C9 add cx, cx 0 0000065B 01C9 add cx, cx 0 0000065D 01C9 add cx, cx 0 0000065F 01C9 add cx, cx 0 00000661 00C1 add cl, al 0 00000663 A8 db __TEST_IMM8 ; skip dec si 979 .sg_store_cl: 0 00000664 4E dec si 0 00000665 88C8 mov al, cl 982 .sg_next: 0 00000667 AA stosb 0 00000668 43 inc bx 0 00000669 AC lodsb 0 0000066A EBB2 jmp .sg_loop 987 988 .sg_done: 0 0000066C E9C3FA jmp .loop 990 991 .sg_done_dec: 0 0000066F E9C1FA jmp .loop_got_byte 993 994 @@: 0 00000672 3C49 cmp al, 'I' 0 00000674 7508 jne @F 0 00000676 8026[2308]FB clropt [cmd_line_flags], clfAllowInvalidFSI 0 0000067B E934FE jmp .loop_2 999 1000 @@: 0 0000067E 3C4A cmp al, 'J' 0 00000680 7508 jne @F 0 00000682 800E[2308]04 setopt [cmd_line_flags], clfAllowInvalidFSI 0 00000687 E928FE jmp .loop_2 1005 1006 @@: 0 0000068A 3C56 cmp al, 'V' 0 0000068C 7508 jne @F 0 0000068E 8026[2108]FB clropt [cmd_line_flags], clfAllowInvalidSector 0 00000693 E91CFE jmp .loop_2 1011 1012 @@: 0 00000696 3C4E cmp al, 'N' 0 00000698 7508 jne @F 0 0000069A 800E[2108]04 setopt [cmd_line_flags], clfAllowInvalidSector 0 0000069F E910FE jmp .loop_2 1017 1018 @@: 0 000006A2 3C52 cmp al, 'R' 0 000006A4 7509 jne @F 0 000006A6 8126[2008]7FFC clropt [cmd_line_flags], clfReadSectorFile12 | clfReadSectorFile16 | clfReadSectorFile32, 1 0 000006AC E903FE jmp .loop_2 1023 1024 @@: 0 000006AF 31FF xor di, di 0 000006B1 BA8003 mov dx, clfReadSectorFile12 | clfReadSectorFile16 | clfReadSectorFile32 0 000006B4 3C3A cmp al, ':' 0 000006B6 7449 je @F 0 000006B8 3C3D cmp al, '=' 0 000006BA 7445 je @F 1031 0 000006BC 86C4 xchg al, ah 0 000006BE AC lodsb 0 000006BF 86C4 xchg al, ah 0 000006C1 BF[2408] mov di, cmd_line_readsector12_file.name 0 000006C4 BA8000 mov dx, clfReadSectorFile12 0 000006C7 3D3132 cmp ax, "12" 0 000006CA 7422 je .switch_s_check_equals 0 000006CC BF[2808] mov di, cmd_line_readsector16_file.name 0 000006CF BA0001 mov dx, clfReadSectorFile16 0 000006D2 3D3136 cmp ax, "16" 0 000006D5 7417 je .switch_s_check_equals 0 000006D7 BF[2C08] mov di, cmd_line_readsector32_file.name 0 000006DA BA0002 mov dx, clfReadSectorFile32 0 000006DD 3D3332 cmp ax, "32" 0 000006E0 740C je .switch_s_check_equals 1047 0 000006E2 E9E4FA jmp .switch_not_supported 1049 1050 1051 .switch_s_r_type: 0 000006E5 F7D2 not dx 0 000006E7 2116[2008] and [cmd_line_flags], dx 0 000006EB E9C4FD jmp .loop_2 1055 1056 1057 .switch_s_check_equals: 0 000006EE AC lodsb 0 000006EF E8E61F call uppercase 0 000006F2 3C52 cmp al, 'R' 0 000006F4 74EF je .switch_s_r_type 0 000006F6 3C3A cmp al, ':' 0 000006F8 7407 je @F 0 000006FA 3C3D cmp al, '=' 0 000006FC 7403 je @F 1066 0 000006FE E9C8FA jmp .switch_not_supported 1068 1069 1070 @@: 0 00000701 0916[2008] or word [cmd_line_flags], dx 1072 @@: 0 00000705 AC lodsb 0 00000706 3C20 cmp al, 32 0 00000708 74FB je @B 0 0000070A 3C09 cmp al, 9 0 0000070C 74F7 je @B 1078 0 0000070E 4E dec si 0 0000070F 85FF test di, di 0 00000711 7404 jz @F 0 00000713 8935 mov word [di], si 0 00000715 EB0C jmp @FF 1084 1085 @@: 0 00000717 8936[2408] mov word [cmd_line_readsector12_file.name], si 0 0000071B 8936[2808] mov word [cmd_line_readsector16_file.name], si 0 0000071F 8936[2C08] mov word [cmd_line_readsector32_file.name], si 1089 @@: 0 00000723 E8EB01 call process_switch_filename 0 00000726 E90AFA jmp .loop_got_byte 1092 1093 1094 .switch_m: 0 00000729 AC lodsb 0 0000072A E8AB1F call uppercase 0 0000072D 3C4E cmp al, 'N' 0 0000072F 7427 je .switch_mn 0 00000731 3C53 cmp al, 'S' 0 00000733 742B je .switch_ms 0 00000735 3C4F cmp al, 'O' 0 00000737 747C je .switch_mo 0 00000739 3C3A cmp al, ':' 0 0000073B 7407 je @F 0 0000073D 3C3D cmp al, '=' 0 0000073F 7403 je @F 0 00000741 E985FA jmp .switch_not_supported 1108 1109 @@: 0 00000744 AC lodsb 0 00000745 3C20 cmp al, 32 0 00000747 74FB je @B 0 00000749 3C09 cmp al, 9 0 0000074B 74F7 je @B 0 0000074D 4E dec si 0 0000074E 8936[3808] mov word [cmd_line_image_file.name], si 0 00000752 E8BC01 call process_switch_filename 0 00000755 E9DBF9 jmp .loop_got_byte 1119 1120 .switch_mn: 0 00000758 8326[3808]00 and word [cmd_line_image_file.name], 0 0 0000075D E9D2F9 jmp .loop 1123 1124 .switch_ms: 0 00000760 AC lodsb 0 00000761 3C3A cmp al, ':' 0 00000763 7407 je @F 0 00000765 3C3D cmp al, '=' 0 00000767 7403 je @F 0 00000769 E99F01 jmp .error 1131 1132 @@: 0 0000076C AC lodsb 0 0000076D 3C30 cmp al, '0' 0 0000076F 750B jne @F 0 00000771 AC lodsb 0 00000772 E8631F call uppercase 0 00000775 3C58 cmp al, 'X' 0 00000777 7408 je .switch_ms.hex 0 00000779 4E dec si 0 0000077A 4E dec si 0 0000077B AC lodsb 1143 @@: 0 0000077C E87B1F call get_decimal_literal 0 0000077F EB04 jmp @F 1146 1147 .switch_ms.hex: 0 00000781 AC lodsb 0 00000782 E87D1F call get_hexadecimal_literal 1150 @@: 0 00000785 85DB test bx, bx 0 00000787 7403E97F01 jnz .error 0 0000078C 81FA0020 cmp dx, 8192 0 00000790 7603E97601 ja .error 0 00000795 BB2000 mov bx, 32 0 00000798 39DA cmp dx, bx 0 0000079A 7303E96C01 jb .error 1158 @@: 0 0000079F 39DA cmp dx, bx 0 000007A1 740B je @F 0 000007A3 01DB add bx, bx 0 000007A5 81FB0020 cmp bx, 8192 0 000007A9 76F4 jbe @B 0 000007AB E95D01 jmp .error 1165 1166 @@: 0 000007AE 8916[1008] mov word [m_sector_size], dx 0 000007B2 E97DF9 jmp .loop 1169 1170 1171 .switch_mo: 0 000007B5 AC lodsb 0 000007B6 E81F1F call uppercase 0 000007B9 3C53 cmp al, 'S' 0 000007BB BF[1008] mov di, m_sector_size 0 000007BE 7412 je @F 0 000007C0 3C4B cmp al, 'K' 0 000007C2 BF[1808] mov di, m_1024 0 000007C5 740B je @F 0 000007C7 3C4D cmp al, 'M' 0 000007C9 BF[1C08] mov di, m_1024_times_1024 0 000007CC 7404 je @F 0 000007CE BF[1408] mov di, m_1 0 000007D1 A8 db __TEST_IMM8 1185 @@: 0 000007D2 AC lodsb 0 000007D3 3C3A cmp al, ':' 0 000007D5 7407 je @F 0 000007D7 3C3D cmp al, '=' 0 000007D9 7403 je @F 0 000007DB E92D01 jmp .error 1192 1193 @@: 0 000007DE 57 push di 0 000007DF AC lodsb 0 000007E0 3C30 cmp al, '0' 0 000007E2 750B jne @F 0 000007E4 AC lodsb 0 000007E5 E8F01E call uppercase 0 000007E8 3C58 cmp al, 'X' 0 000007EA 7408 je .switch_mo.hex 0 000007EC 4E dec si 0 000007ED 4E dec si 0 000007EE AC lodsb 1205 @@: 0 000007EF E8081F call get_decimal_literal 0 000007F2 EB04 jmp @F 1208 1209 .switch_mo.hex: 0 000007F4 AC lodsb 0 000007F5 E80A1F call get_hexadecimal_literal 1212 @@: 0 000007F8 5F pop di 0 000007F9 56 push si 0 000007FA BE[0808] mov si, m_offset 0 000007FD 87D3 xchg dx, bx 0 000007FF 93 xchg ax, bx 0 00000800 E8C800 call multiply_dxax_dword_di_to_qword_si 0 00000803 5E pop si 0 00000804 E92BF9 jmp .loop 1221 1222 1223 .switch_g: 1224 @@: 0 00000807 AC lodsb 0 00000808 3C20 cmp al, 32 0 0000080A 74FB je @B 0 0000080C 3C09 cmp al, 9 0 0000080E 74F7 je @B 0 00000810 3C3D cmp al, '=' 0 00000812 74F3 je @B 0 00000814 3C3A cmp al, ':' 0 00000816 74EF je @B 1234 0 00000818 BA[383E] mov dx, msg.auto 0 0000081B 4E dec si 0 0000081C E8831E call isstring? 0 0000081F 742C je .switch_g_all_auto 0 00000821 BA[333E] mov dx, msg.keep 0 00000824 E87B1E call isstring? 0 00000827 7433 je .switch_g_all_keep 0 00000829 BA[4A3E] mov dx, msg.heads 0 0000082C BB[0E2A] mov bx, g_heads 0 0000082F E8701E call isstring? 0 00000832 7436 je .switch_g_single 0 00000834 BA[503E] mov dx, msg.sectors 0 00000837 BB[182A] mov bx, g_sectors 0 0000083A E8651E call isstring? 0 0000083D 742B je .switch_g_single 0 0000083F BA[583E] mov dx, msg.hidden 0 00000842 BB[222A] mov bx, g_hidden 0 00000845 E85A1E call isstring? 0 00000848 7420 je .switch_g_single 0 0000084A E9BE00 jmp .error 1255 1256 .switch_g_all_auto: 0 0000084D B8FF00 mov ax, 00FFh 0 00000850 A3[0E2A] mov word [g_heads.auto_low_single_high], ax 0 00000853 A3[182A] mov word [g_sectors.auto_low_single_high], ax 0 00000856 A3[222A] mov word [g_hidden.auto_low_single_high], ax 0 00000859 E9D6F8 jmp .loop 1262 1263 .switch_g_all_keep: 0 0000085C 31C0 xor ax, ax 0 0000085E A3[0E2A] mov word [g_heads.auto_low_single_high], ax 0 00000861 A3[182A] mov word [g_sectors.auto_low_single_high], ax 0 00000864 A3[222A] mov word [g_hidden.auto_low_single_high], ax 0 00000867 E9C8F8 jmp .loop 1269 1270 .switch_g_single: 1271 @@: 0 0000086A AC lodsb 0 0000086B 3C20 cmp al, 32 0 0000086D 74FB je @B 0 0000086F 3C09 cmp al, 9 0 00000871 74F7 je @B 0 00000873 3C3D cmp al, '=' 0 00000875 74F3 je @B 0 00000877 3C3A cmp al, ':' 0 00000879 74EF je @B 0 0000087B 4E dec si 0 0000087C BA[383E] mov dx, msg.auto 0 0000087F E8201E call isstring? 0 00000882 7507 jne @F 0 00000884 C707FF00 mov word [bx + giAutoLowSingleHigh], 00FFh 0 00000888 E9A7F8 jmp .loop 1287 1288 @@: 0 0000088B BA[333E] mov dx, msg.keep 0 0000088E E8111E call isstring? 0 00000891 7506 jne @F 0 00000893 832700 and word [bx + giAutoLowSingleHigh], 0 0 00000896 E999F8 jmp .loop 1294 1295 @@: 0 00000899 AC lodsb 0 0000089A 53 push bx 0 0000089B 3C30 cmp al, '0' 0 0000089D 750B jne @F 0 0000089F AC lodsb 0 000008A0 E8351E call uppercase 0 000008A3 3C58 cmp al, 'X' 0 000008A5 7408 je .switch_g_single.hex 0 000008A7 4E dec si 0 000008A8 4E dec si 0 000008A9 AC lodsb 1307 @@: 0 000008AA E84D1E call get_decimal_literal 0 000008AD EB04 jmp @F 1310 1311 .switch_g_single.hex: 0 000008AF AC lodsb 0 000008B0 E84F1E call get_hexadecimal_literal 1314 @@: 0 000008B3 5F pop di 0 000008B4 807D0602 cmp byte [di + giLength], 2 0 000008B8 7704 ja @F 0 000008BA 85DB test bx, bx 0 000008BC 754D jnz .error 1320 @@: 0 000008BE C70500FF mov word [di + giAutoLowSingleHigh], 0FF00h 0 000008C2 895502 mov word [di + giValue], dx 0 000008C5 895D04 mov word [di + giValue + 2], bx 0 000008C8 E967F8 jmp .loop 1325 1326 1327 multiply_dxax_dword_di_to_qword_si: equ $ 0 000008CB 50 push ax 0 000008CC 89D0 mov ax, dx 0 000008CE 52 push dx 0 000008CF F76502 mul word [di + 2] ; high times high 0 000008D2 894404 mov word [si + 4], ax 0 000008D5 895406 mov word [si + 6], dx 0 000008D8 58 pop ax 0 000008D9 F725 mul word [di] ; high times low 0 000008DB 894402 mov word [si + 2], ax 0 000008DE 015404 add word [si + 4], dx 0 000008E1 83540600 adc word [si + 6], 0 ; (NC) 0 000008E5 58 pop ax 0 000008E6 50 push ax 0 000008E7 F76502 mul word [di + 2] ; low times high 0 000008EA 014402 add word [si + 2], ax 0 000008ED 115404 adc word [si + 4], dx 0 000008F0 83540600 adc word [si + 6], 0 ; (NC) 0 000008F4 58 pop ax 0 000008F5 F725 mul word [di] ; low times low 0 000008F7 8904 mov word [si], ax 0 000008F9 015402 add word [si + 2], dx 0 000008FC 83540400 adc word [si + 4], 0 0 00000900 83540600 adc word [si + 6], 0 ; (NC) 0 00000904 C3 retn 1352 1353 1354 .error_multiple_drives: 0 00000905 BA[F338] mov dx, msg.error_multiple_drives 0 00000908 E9C1F8 jmp disp_error 1357 1358 .error: 0 0000090B BA[C938] mov dx, msg.invalid_argument 0 0000090E E9BBF8 jmp disp_error 1361 1362 1363 process_switch_filename: 0 00000911 89F3 mov bx, si ; -> start of name 0 00000913 89F7 mov di, si ; -> start of name 0 00000915 AC lodsb ; load character 0 00000916 E8821D call iseol? 0 00000919 7506 jne @F 0 0000091B BA[4D44] mov dx, msg.switch_requires_filename 1370 .disp_error_1: 0 0000091E E9ABF8 jmp disp_error 1372 1373 @@: 1374 .unquoted_loop: 0 00000921 3C20 cmp al, 32 ; blank or EOL outside quoted part ? 0 00000923 7411 je .blank 0 00000925 3C09 cmp al, 9 0 00000927 740D je .blank 0 00000929 E86F1D call iseol? 0 0000092C 7408 je .blank ; yes --> 0 0000092E 3C22 cmp al, '"' ; starting quote mark ? 0 00000930 7416 je .quoted ; yes --> 0 00000932 AA stosb ; store character 1384 .unquote: 0 00000933 AC lodsb ; load character 0 00000934 EBEB jmp .unquoted_loop ; continue in not-quoted loop --> 1387 1388 .blank: 1389 ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 0 00000936 C60500 mov byte [di], 0 ; terminate 0 00000939 39FB cmp bx, di ; empty ? 0 0000093B 740E je .empty ; yes --> 0 0000093D C3 retn ; done 1394 1395 .quoted_loop: 0 0000093E E85A1D call iseol? ; EOL inside quoted part ? 0 00000941 740D je .quoted_eol ; if yes, error --> 0 00000943 3C22 cmp al, '"' ; ending quote mark ? 0 00000945 74EC je .unquote ; yes --> 0 00000947 AA stosb ; store character 1401 .quoted: 0 00000948 AC lodsb ; load character 0 00000949 EBF3 jmp .quoted_loop ; continue in quoted loop --> 1404 1405 .empty: 0 0000094B BA[9344] mov dx, msg.switch_filename_empty 0 0000094E EBCE jmp .disp_error_1 1408 1409 .quoted_eol: 0 00000950 BA[6B44] mov dx, msg.switch_filename_missing_unquote 0 00000953 EBC9 jmp .disp_error_1 1412 1413 1414 cmd_line_end: 0 00000955 803E[EE29]FF cmp byte [drivenumber], -1 0 0000095A 750D jne @F 0 0000095C 833E[3808]00 cmp word [cmd_line_image_file.name], 0 0 00000961 7513 jne @FF 0 00000963 BA[DD38] mov dx, msg.no_drive_specified 0 00000966 E963F8 jmp disp_error 1421 1422 @@: 0 00000969 833E[3808]00 cmp word [cmd_line_image_file.name], 0 0 0000096E 7406 je @F 0 00000970 BA[1039] mov dx, msg.drive_and_image_specified 0 00000973 E956F8 jmp disp_error 1427 1428 @@: 0 00000976 F606[2008]40 testopt [cmd_line_flags], clfWriteInfoToSectorFile 0 0000097B 740D jz @F 0 0000097D F606[2008]01 testopt [cmd_line_flags], clfWriteSectorToFile 0 00000982 7506 jnz @F 1433 0 00000984 BA[3039] mov dx, msg.no_sector_file_specified 0 00000987 E942F8 jmp disp_error 1436 1437 @@: 1438 1439 detect_fat_type: 0 0000098A BB[A028] mov bx, second_sector_buffer ; will be used for ld/lsv/bpb 0 0000098D 89DD mov bp, bx 0 0000098F 53 push bx 1443 0 00000990 E83046 call initialise ; uses first_sector_buffer 1445 ; for size detection 0 00000993 7303E9140E jc exit_error 1447 0 00000998 5B pop bx 0 00000999 31C0 xor ax, ax 0 0000099B 31D2 xor dx, dx 0 0000099D 8A0E[EE29] mov cl, [drivenumber] 0 000009A1 E8CE20 call read_ae_512_bytes ; load partition boot sector 0 000009A4 7303E9030E jc exit_error 1454 ; 2nd buffer = boot sector original 1455 0 000009A9 BA[6039] mov dx, msg.bootfail_sig 0 000009AC 81BEFE0155AA cmp word [bp + 510], 0AA55h 0 000009B2 751A jne .disp_error_1 1459 0 000009B4 8B5EDC mov bx, [bp + ldBytesPerSector] 0 000009B7 3B5E0B cmp bx, [bp + bsBPB + bpbBytesPerSector] 0 000009BA BA[F339] mov dx, msg.bootfail_secsizediffer 0 000009BD 750F jne .disp_error_1 1464 0 000009BF 81FB0002 cmp bx, 512 0 000009C3 7618 jbe @FF 0 000009C5 81FB0004 cmp bx, 1024 0 000009C9 7306 jae @F 0 000009CB BA[C439] mov dx, msg.bootfail_secsizeinvalid 1470 .disp_error_1: 0 000009CE E9FBF7 jmp disp_error 1472 @@: 0 000009D1 89DF mov di, bx 0 000009D3 817BFE55AA cmp word [bp + di - 2], 0AA55h 0 000009D8 BA[9039] mov dx, msg.bootfail_sig2 0 000009DB 75F1 jne .disp_error_1 1477 @@: 1478 0 000009DD BE[A028] mov si, second_sector_buffer 0 000009E0 BF[A048] mov di, third_sector_buffer_512_bytes 0 000009E3 B90001 mov cx, 512 >> 1 0 000009E6 F3A5 rep movsw 1483 ; 3rd buffer = copy of first 512 B of 2nd buffer 1484 ; (boot sector original) prior to BPBN move 1485 0 000009E8 31C0 xor ax, ax 0 000009EA 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 0 000009ED 740B je @F ; is FAT32 --> 0 000009EF BE[C428] mov si, second_sector_buffer + bsBPB + bpbNew 0 000009F2 BF[E028] mov di, second_sector_buffer + bsBPB + ebpbNew 0 000009F5 B91A00 mov cx, BPBN_size 0 000009F8 F3A4 rep movsb ; clone the FAT16 / FAT12 BPBN 1493 ; to where the FAT32 BPBN lives 1494 @@: 1495 ; 2nd buffer = ld/lsv/bpb with BPBN moved 1496 1497 1498 ; (boot.asm code starts here) 1499 0 000009FA 31C0 xor ax, ax 1501 ; calculate some values that we need: 1502 ; adjusted sectors per cluster (store in a word, 1503 ; and decode EDR-DOS's special value 0 meaning 256) 0 000009FC 8A460D mov al, [bp + bsBPB + bpbSectorsPerCluster] 0 000009FF FEC8 dec al 0 00000A01 40 inc ax 0 00000A02 8946E8 mov [bp + ldClusterSize], ax 1508 0 00000A05 8B46D4 mov ax, [bp + ldEntriesPerSector] 1510 1511 ; number of sectors used for root directory (store in CX) 0 00000A08 31D2 xor dx, dx 0 00000A0A 89C3 mov bx, ax 0 00000A0C 48 dec ax ; rounding up 0 00000A0D 034611 add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 0 00000A10 11D2 adc dx, dx ; account for overflow (dx was zero) 0 00000A12 F7F3 div bx ; get number of root sectors 0 00000A14 91 xchg ax, cx ; cx = number of root secs 1519 1520 1521 ; (iniload.asm code starts here) 1522 0 00000A15 51 push cx ; number of root secs 0 00000A16 31C0 xor ax, ax 1525 ; first sector of root directory 0 00000A18 8A4610 mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 0 00000A1B 8B4E16 mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 0 00000A1E 31FF xor di, di ; di:cx = sectors per FAT 1529 ; iff FAT12, FAT16 0 00000A20 85C9 test cx, cx ; is FAT32 ? 0 00000A22 7506 jnz @F ; no --> 0 00000A24 8B4E24 mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 0 00000A27 8B7E26 mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 1534 @@: 0 00000A2A 50 push ax 0 00000A2B F7E1 mul cx 1537 ; ax = low word SpF*nF 1538 ; dx = high word 0 00000A2D 93 xchg bx, ax 0 00000A2E 87CA xchg cx, dx 1541 ; cx:bx = first mul 0 00000A30 58 pop ax 0 00000A31 F7E7 mul di 1544 ; ax = high word adjust 1545 ; dx = third word 0 00000A33 85D2 test dx, dx 0 00000A35 7406 jz @F 1548 error_badchain: equ $ 0 00000A37 BA[383A] mov dx, msg.boot_badchain 0 00000A3A E98FF7 jmp disp_error 1551 1552 @@: 0 00000A3D 92 xchg dx, ax 1554 ; dx = high word adjust 0 00000A3E 01CA add dx, cx 1556 ; dx:bx = result 0 00000A40 72F5 jc error_badchain 0 00000A42 93 xchg ax, bx 1559 ; dx:ax = result 0 00000A43 72F2 jc error_badchain 1561 0 00000A45 03460E add ax, [bp + bsBPB + bpbReservedSectors] 0 00000A48 83D200 adc dx, byte 0 0 00000A4B 72EA jc error_badchain 1565 0 00000A4D 59 pop cx ; number of root sectors 0 00000A4E 31FF xor di, di 1568 1569 ; first sector of disk data area: 0 00000A50 01C1 add cx, ax 0 00000A52 11D7 adc di, dx 0 00000A54 72E1 jc error_badchain 0 00000A56 894EFC mov [bp + lsvDataStart], cx 0 00000A59 897EFE mov [bp + lsvDataStart + 2], di 1575 0 00000A5C 8946D0 mov [bp + ldRootSector], ax 0 00000A5F 8956D2 mov [bp + ldRootSector + 2], dx 1578 1579 ; total sectors 0 00000A62 31D2 xor dx, dx 0 00000A64 8B4613 mov ax, [bp + bsBPB + bpbTotalSectors] 0 00000A67 85C0 test ax, ax 0 00000A69 7506 jnz @F 0 00000A6B 8B5622 mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 0 00000A6E 8B4620 mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 1586 1587 ; fall through and let it overwrite the field with the 1588 ; already current contents. saves a jump. 1589 @@: 1590 ; mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 1591 ; mov [bp + bsBPB + bpbTotalSectorsLarge], ax 1592 ; Do not modify BPB, as we initialise the 1593 ; sector with this copy eventually. 1594 ; It is arguably more correct for this to 1595 ; read zero when not in use. By preserving 1596 ; the original value this is enabled. 1597 1598 ; dx:ax = total sectors 1599 0 00000A71 8B5E16 mov bx, [bp + bsBPB + bpbSectorsPerFAT] 0 00000A74 C646E620 mov byte [bp + ldFATType], 32 0 00000A78 85DB test bx, bx 0 00000A7A 7439 jz .gotfattype 1604 0 00000A7C 31C9 xor cx, cx 1606 0 00000A7E 895E24 mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 0 00000A81 894E26 mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 0 00000A84 894E28 mov word [bp + bsBPB + ebpbFSFlags], cx 1610 ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 1611 ; uninitialised here (initialised by loaded_all later) 1612 1613 ; dx:ax = total amount of sectors 0 00000A87 2B46FC sub ax, word [bp + lsvDataStart] 0 00000A8A 1B56FE sbb dx, word [bp + lsvDataStart + 2] 1616 1617 ; dx:ax = total amount of data sectors 0 00000A8D 89C3 mov bx, ax 0 00000A8F 92 xchg ax, dx 0 00000A90 31D2 xor dx, dx 0 00000A92 F776E8 div word [bp + ldClusterSize] 0 00000A95 93 xchg bx, ax 0 00000A96 F776E8 div word [bp + ldClusterSize] 1624 ; bx:ax = quotient, dx = remainder 1625 ; bx:ax = number of clusters 0 00000A99 85DB test bx, bx 0 00000A9B 7406 jz @F 1628 .badclusters: 0 00000A9D BA[1E3A] mov dx, msg.boot_badclusters 0 00000AA0 E929F7 jmp disp_error 1631 1632 @@: 0 00000AA3 83F8F5 cmp ax, 0FFF7h - 2 0 00000AA6 77F5 ja .badclusters 0 00000AA8 C646E610 mov byte [bp + ldFATType], 16 0 00000AAC 3DF50F cmp ax, 0FF7h - 2 0 00000AAF 7704 ja .gotfattype 1638 0 00000AB1 C646E60C mov byte [bp + ldFATType], 12 1640 .gotfattype: 1641 0 00000AB5 BA[3F3C] mov dx, msg.is_fat16 1643 %if _FAT16 0 00000AB8 BE[0002] mov si, fat16_payload 1645 %else 1646 mov si, 0 ; (preserve flags) 1647 %endif 0 00000ABB 807EE610 cmp byte [bp + ldFATType], 16 0 00000ABF 740E je @F 0 00000AC1 BA[2A3C] mov dx, msg.is_fat12 1651 %if _FAT12 0 00000AC4 BE[0000] mov si, fat12_payload 1653 %else 1654 mov si, 0 ; (preserve flags) 1655 %endif 0 00000AC7 7206 jb @F 0 00000AC9 BA[543C] mov dx, msg.is_fat32 1658 %if _FAT32 0 00000ACC BE[0004] mov si, fat32_payload 1660 %else 1661 mov si, 0 ; (preserve flags) 1662 %endif 1663 @@: 0 00000ACF E8E11C call disp_msg_asciz 1665 1666 %if !_FAT32 || !_FAT16 || !_FAT12 1667 test si, si 1668 jnz @FF 1669 1670 testopt [cmd_line_flags], clfLeaveSector | clfSectorFromCopy 1671 jnz @FF 1672 1673 mov dx, clfReadSectorFile12 1674 cmp byte [bp + ldFATType], 16 1675 jb @F 1676 mov dx, clfReadSectorFile16 1677 je @F 1678 mov dx, clfReadSectorFile32 1679 @@: 1680 test word [cmd_line_flags], dx 1681 jnz @F 1682 1683 mov dx, msg.not_supported_fat_type 1684 jmp disp_error 1685 1686 @@: 1687 %endif 1688 1689 1690 detect_fsinfo_sector_replace: 0 00000AD2 C646E700 mov byte [bp + ldHasLBA], 0 ; 2 clear: not FSINFO 1692 %if _FAT32_TWO_SECTORS 0 00000AD6 81FE[0004] cmp si, fat32_payload 0 00000ADA 7528 jne .not_fat32 1695 0 00000ADC 804EE704 or byte [bp + ldHasLBA], 4 ; 4 set: large sector 1697 0 00000AE0 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 00000AE5 731D jae .fat32_larger_sector 1700 ; Because we checked that the sector size is a power of two, 1701 ; we can assume here that sectors are 512 bytes or less. 1702 0 00000AE7 BA[783B] mov dx, msg.not_yet_non_fsinfo 1704 0 00000AEA 81BC00025252 cmp word [si + 512 + FSINFO.signature1], "RR" 0 00000AF0 7403E9D7F6 jne disp_error 0 00000AF5 81BC02026141 cmp word [si + 512 + FSINFO.signature1 + 2], "aA" 0 00000AFB 7403E9CCF6 jne disp_error 1709 0 00000B00 804EE702 or byte [bp + ldHasLBA], 2 ; 2 set: FSINFO 1711 %endif 1712 .not_fat32: 1713 .fat32_larger_sector: 1714 1715 1716 detect_backup: 0 00000B04 807EE620 cmp byte [bp + ldFATType], 32 0 00000B08 722E jb .none 0 00000B0A BA[4246] mov dx, msg.no_backup 0 00000B0D 31DB xor bx, bx 0 00000B0F 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 0 00000B12 85C0 test ax, ax 0 00000B14 741B jz .done 0 00000B16 3B460E cmp ax, word [bp + bsBPB + bpbReservedSectors] 0 00000B19 7316 jae .done 1726 0 00000B1B BA[5D46] mov dx, msg.backup_no_info 0 00000B1E BB1000 mov bx, detectedcopysector 0 00000B21 034630 add ax, word [bp + bsBPB + ebpbFSINFOSector] 0 00000B24 720B jc .done 0 00000B26 3B460E cmp ax, word [bp + bsBPB + bpbReservedSectors] 0 00000B29 7306 jae .done 1733 0 00000B2B BA[2A46] mov dx, msg.backup 0 00000B2E BB3000 mov bx, detectedcopysector | detectedcopyinfo 1736 .done: 0 00000B31 E87F1C call disp_msg_asciz 0 00000B34 091E[D829] or word [internalflags], bx 1739 1740 .none: 1741 1742 1743 prepare_sector: 0 00000B38 F606[2208]02 testopt [cmd_line_flags], clfSectorFromCopy 0 00000B3D 742A jz @F 1746 0 00000B3F F606[D829]10 testopt [internalflags], detectedcopysector 0 00000B44 7506 jnz .sector_from_copy 0 00000B46 BA[7947] mov dx, msg.missing_backup_sector 0 00000B49 E980F6 jmp disp_error 1751 1752 .sector_from_copy: 0 00000B4C BA[DD47] mov dx, msg.copy_sector 0 00000B4F E8611C call disp_msg_asciz 0 00000B52 31D2 xor dx, dx 0 00000B54 BB[6008] mov bx, first_sector_buffer 0 00000B57 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 0 00000B5A 8A0E[EE29] mov cl, [drivenumber] 0 00000B5E E8111F call read_ae_512_bytes ; load boot sector from backup copy 0 00000B61 7303E9460C jc exit_error 0 00000B66 E91501 jmp .got_sector_buffer 1762 1763 @@: 0 00000B69 F606[2208]01 testopt [cmd_line_flags], clfLeaveSector 0 00000B6E 743C jz @F 1766 0 00000B70 F646E702 test byte [bp + ldHasLBA], 2 0 00000B74 740C jz .no_leave_fsinfo 0 00000B76 81C60002 add si, 512 0 00000B7A B90001 mov cx, 512 >> 1 0 00000B7D BF[600A] mov di, first_sector_buffer + 512 0 00000B80 F3A5 rep movsw 1773 .no_leave_fsinfo: 1774 0 00000B82 BA[0748] mov dx, msg.leave_sector 0 00000B85 E82B1C call disp_msg_asciz 1777 ; Copy over original 512-byte sector buffer content. 0 00000B88 B90002 mov cx, 512 0 00000B8B BF[6008] mov di, first_sector_buffer 0 00000B8E BE[A048] mov si, third_sector_buffer_512_bytes 0 00000B91 B90001 mov cx, 512 >> 1 0 00000B94 F3A5 rep movsw 1783 ; 1st buffer = copy of 3rd buffer 1784 ; (first 512 B of boot sector original) 1785 1786 ; Copy over big sector excess from buffer. 0 00000B96 BE[A02A] mov si, second_sector_buffer + 512 0 00000B99 8B4EDC mov cx, [bp + ldBytesPerSector] 0 00000B9C 81E90002 sub cx, 512 0 00000BA0 7703E9D900 jbe .got_sector_buffer 0 00000BA5 D1E9 shr cx, 1 0 00000BA7 F3A5 rep movsw 1793 ; 1st buffer = boot sector original 0 00000BA9 E9D200 jmp .got_sector_buffer 1795 1796 @@: 0 00000BAC BF[2408] mov di, cmd_line_readsector12_file 0 00000BAF BA8000 mov dx, clfReadSectorFile12 0 00000BB2 807EE610 cmp byte [bp + ldFATType], 16 0 00000BB6 720E jb @F 0 00000BB8 BF[2808] mov di, cmd_line_readsector16_file 0 00000BBB BA0001 mov dx, clfReadSectorFile16 0 00000BBE 7406 je @F 0 00000BC0 BF[2C08] mov di, cmd_line_readsector32_file 0 00000BC3 BA0002 mov dx, clfReadSectorFile32 1806 @@: 0 00000BC6 8516[2008] test word [cmd_line_flags], dx 0 00000BCA 7503E9A100 jz .replace_internal 0 00000BCF BA[4448] mov dx, msg.replace_sector_file 0 00000BD2 E8DE1B call disp_msg_asciz 1811 1812 ; di -> file structure 0 00000BD5 E8EA0B call open_file_read 0 00000BD8 7303E9CF0B jc exit_error 1815 0 00000BDD B80242 mov ax, 4202h 0 00000BE0 31C9 xor cx, cx 0 00000BE2 31D2 xor dx, dx 0 00000BE4 CD21 int 21h 0 00000BE6 7309 jnc @F 0 00000BE8 BA[8649] mov dx, msg.error_file_seek 0 00000BEB E8B70C call disp_dos_error 0 00000BEE E9BB0B jmp exit_error 1824 1825 @@: 0 00000BF1 85D2 test dx, dx 0 00000BF3 7510 jnz .wrong_size 0 00000BF5 3D0002 cmp ax, 512 0 00000BF8 7411 je .ok_size 0 00000BFA 3D0004 cmp ax, 1024 0 00000BFD 7506 jne .wrong_size 0 00000BFF 807EE620 cmp byte [bp + ldFATType], 32 0 00000C03 7406 je .ok_size 1834 1835 .wrong_size: 0 00000C05 BA[B33B] mov dx, msg.wrong_size 0 00000C08 E9C1F5 jmp disp_error 1838 1839 1840 .ok_size: 0 00000C0B 50 push ax 1842 0 00000C0C B80042 mov ax, 4200h 0 00000C0F 31C9 xor cx, cx 0 00000C11 31D2 xor dx, dx 0 00000C13 CD21 int 21h 0 00000C15 7309 jnc @F 0 00000C17 BA[8649] mov dx, msg.error_file_seek 0 00000C1A E8880C call disp_dos_error 0 00000C1D E98C0B jmp exit_error 1851 1852 @@: 0 00000C20 59 pop cx 0 00000C21 BA[6008] mov dx, first_sector_buffer 0 00000C24 89D6 mov si, dx 0 00000C26 B43F mov ah, 3Fh 0 00000C28 CD21 int 21h ; read file 0 00000C2A 7207 jc @F 0 00000C2C 39C8 cmp ax, cx 0 00000C2E B8FFFF mov ax, -1 0 00000C31 7409 je @FF ; (NC) --> 1862 @@: 0 00000C33 BA[7149] mov dx, msg.error_file_read 0 00000C36 E86C0C call disp_dos_error 0 00000C39 E9700B jmp exit_error 1866 1867 @@: 0 00000C3C C646E700 mov byte [bp + ldHasLBA], 0 ; 2 and 4 clear: not FSINFO, no large 1869 0 00000C40 81F90004 cmp cx, 1024 0 00000C44 7228 jb .not_fat32_two_sectors 1872 0 00000C46 804EE704 or byte [bp + ldHasLBA], 4 ; 4 set: large sector 1874 0 00000C4A 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 00000C4F 731D jae .fat32_larger_sector 1877 ; Because we checked that the sector size is a power of two, 1878 ; we can assume here that sectors are 512 bytes or less. 1879 0 00000C51 BA[783B] mov dx, msg.not_yet_non_fsinfo 1881 0 00000C54 81BC00025252 cmp word [si + 512 + FSINFO.signature1], "RR" 0 00000C5A 7403E96DF5 jne disp_error 0 00000C5F 81BC02026141 cmp word [si + 512 + FSINFO.signature1 + 2], "aA" 0 00000C65 7403E962F5 jne disp_error 1886 0 00000C6A 804EE702 or byte [bp + ldHasLBA], 2 ; 2 set: FSINFO 1888 1889 .fat32_larger_sector: 1890 .not_fat32_two_sectors: 0 00000C6E EB0E jmp .replace_common 1892 1893 1894 ; Copy over two sectors into the first_sector_buffer, 1895 ; for the case of FAT32 with two-sector loader and 1896 ; a sector size >= 1 KiB. 1897 .replace_internal: 0 00000C70 BA[2948] mov dx, msg.replace_sector 0 00000C73 E83D1B call disp_msg_asciz 1900 0 00000C76 B90002 mov cx, 1024 >> 1 0 00000C79 BF[6008] mov di, first_sector_buffer 0 00000C7C F3A5 rep movsw 1904 ; 1st buffer = 1024 bytes from internal replacement 1905 1906 .replace_common: 1907 .got_sector_buffer: 1908 1909 1910 check_valid_sector: 0 00000C7E BA[F73D] mov dx, msg.sector_invalid_no_id 0 00000C81 BE[483D] mov si, msg.fat12sig 0 00000C84 BF[9608] mov di, first_sector_buffer + bsBPB + bpbNew + bpbnFilesystemID 0 00000C87 807EE610 cmp byte [bp + ldFATType], 16 0 00000C8B 720B jb @F 0 00000C8D BE[503D] mov si, msg.fat16sig 0 00000C90 7406 je @F 0 00000C92 BE[583D] mov si, msg.fat32sig 0 00000C95 BF[B208] mov di, first_sector_buffer + bsBPB + ebpbNew + bpbnFilesystemID 1920 @@: 0 00000C98 B90400 mov cx, 4 0 00000C9B F3A7 repe cmpsw 0 00000C9D 7540 jne .invalid 1924 0 00000C9F BA[603D] mov dx, msg.sector_invalid_no_jump 0 00000CA2 BF[6008] mov di, first_sector_buffer 0 00000CA5 8B4501 mov ax, word [di + 1] 0 00000CA8 8D5D03 lea bx, [di + 3] 0 00000CAB 803DE9 cmp byte [di], 0E9h 0 00000CAE 740C je .rel16 0 00000CB0 803DE8 cmp byte [di], 0E8h 0 00000CB3 7407 je .rel16 0 00000CB5 803DEB cmp byte [di], 0EBh 0 00000CB8 7525 jne .invalid 1935 .rel8: 0 00000CBA 4B dec bx 0 00000CBB 98 cbw 1938 .rel16: 0 00000CBC 01C3 add bx, ax 0 00000CBE BF[9E08] mov di, first_sector_buffer + bsBPB + bpbNew + BPBN_size 0 00000CC1 807EE610 cmp byte [bp + ldFATType], 16 0 00000CC5 7603 jbe @F 0 00000CC7 BF[BA08] mov di, first_sector_buffer + bsBPB + ebpbNew + BPBN_size 1944 @@: 0 00000CCA BA[873D] mov dx, msg.sector_invalid_too_short_jump 0 00000CCD 39FB cmp bx, di 0 00000CCF 720E jb .invalid 0 00000CD1 BA[A93D] mov dx, msg.sector_invalid_too_long_jump 0 00000CD4 81FB[5E0A] cmp bx, first_sector_buffer + 510 0 00000CD8 7305 jae .invalid 1951 0 00000CDA BA[CA3D] mov dx, msg.sector_valid 0 00000CDD EB12 jmp .valid 1954 1955 .invalid: 0 00000CDF F606[2108]04 testopt [cmd_line_flags], clfAllowInvalidSector 0 00000CE4 7503E9E3F4 jz disp_error 1958 0 00000CE9 52 push dx 0 00000CEA BA[193E] mov dx, msg.allowing_sector_invalid 0 00000CED E8C31A call disp_msg_asciz 0 00000CF0 5A pop dx 1963 1964 .valid: 0 00000CF1 E8BF1A call disp_msg_asciz 1966 1967 1968 write_sector_oem: 0 00000CF4 BE[DC29] mov si, oemname 0 00000CF7 BF[6308] mov di, first_sector_buffer + bsOEM 0 00000CFA B90400 mov cx, 4 0 00000CFD F606[2308]01 testopt [cmd_line_flags], clfSetOEMName 0 00000D02 750B jnz @F 0 00000D04 BE[A328] mov si, second_sector_buffer + bsOEM 0 00000D07 F606[2308]02 testopt [cmd_line_flags], clfPreserveOEMName 0 00000D0C 7501 jnz @F 0 00000D0E A9 db __TEST_IMM16 ; skip rep movsw 1978 @@: 0 00000D0F F3A5 rep movsw 1980 1981 1982 write_sector_bpb: 0 00000D11 BE[AB28] mov si, second_sector_buffer + bsBPB 0 00000D14 BF[6B08] mov di, first_sector_buffer + bsBPB 0 00000D17 807EE610 cmp byte [bp + ldFATType], 16 0 00000D1B 7607 jbe @F ; if FAT12/FAT16 --> 0 00000D1D B93500 mov cx, ebpbNew 0 00000D20 F3A4 rep movsb ; move EBPB (minus BPBN) 0 00000D22 EB08 jmp @FF ; si -> BPBN 1990 @@: 0 00000D24 B91900 mov cx, bpbNew ; move BPB 0 00000D27 F3A4 rep movsb 0 00000D29 83C61C add si, ebpbNew - bpbNew ; si -> BPBN 1994 @@: 0 00000D2C B91A00 mov cx, BPBN_size 0 00000D2F F3A4 rep movsb 1997 ; 1st buffer = sector from whatever source plus 1998 ; the (E)BPB and BPBN from fs 1999 2000 2001 prepare_fsinfo: 0 00000D31 807EE610 cmp byte [bp + ldFATType], 16 0 00000D35 7703E90301 jbe .no_fsinfo 2004 0 00000D3A 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 00000D3F 7203E9F900 jae .no_fsinfo 2007 0 00000D44 8B4630 mov ax, word [bp + bsBPB + ebpbFSINFOSector] 2009 0 00000D47 BA[5E3B] mov dx, msg.no_fsinfo 0 00000D4A 85C0 test ax, ax 0 00000D4C 7405 jz .fsinfo_doesnt_exist 0 00000D4E 3B460E cmp ax, word [bp + bsBPB + bpbReservedSectors] 0 00000D51 7216 jb .fsinfo_exists 2015 .fsinfo_doesnt_exist: 0 00000D53 F606[2008]58 testopt [cmd_line_flags], clfDontWriteInfo | clfWriteInfoToSectorFile | clfWriteInfoToFile 0 00000D58 7509 jnz @F 0 00000D5A F646E702 test byte [bp + ldHasLBA], 2 0 00000D5E 7403E969F4 jnz disp_error 2021 @@: 0 00000D63 E84D1A call disp_msg_asciz 0 00000D66 E9D400 jmp .no_fsinfo 2024 2025 .fsinfo_exists: 0 00000D69 31D2 xor dx, dx 0 00000D6B BB[A02A] mov bx, second_sector_buffer + 512 0 00000D6E 8A0E[EE29] mov cl, [drivenumber] 0 00000D72 E8FD1C call read_ae_512_bytes ; load FSINFO sector 0 00000D75 7303E9320A jc exit_error 2031 ; 2nd buffer 2nd 512 B has original FSINFO 2032 0 00000D7A 800E[D829]40 setopt [internalflags], detectedinfo 2034 0 00000D7F F606[2208]20 testopt [cmd_line_flags], clfInfoFromCopy 0 00000D84 742D jz @F 2037 0 00000D86 F606[D829]20 testopt [internalflags], detectedcopyinfo 0 00000D8B 7506 jnz .info_from_copy 0 00000D8D BA[AB47] mov dx, msg.missing_backup_info 0 00000D90 E939F4 jmp disp_error 2042 2043 .info_from_copy: 0 00000D93 BA[6948] mov dx, msg.copy_info 0 00000D96 E81A1A call disp_msg_asciz 0 00000D99 31D2 xor dx, dx 0 00000D9B BB[600A] mov bx, first_sector_buffer + 512 0 00000D9E 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 0 00000DA1 034630 add ax, word [bp + bsBPB + ebpbFSINFOSector] 0 00000DA4 8A0E[EE29] mov cl, [drivenumber] 0 00000DA8 E8C71C call read_ae_512_bytes ; load FSINFO sector from backup copy 0 00000DAB 7303E9FC09 jc exit_error 0 00000DB0 E98A00 jmp .no_fsinfo 2054 2055 @@: 2056 0 00000DB3 F606[2208]40 testopt [cmd_line_flags], clfZeroInfo 0 00000DB8 7433 jz @F 2059 0 00000DBA BA[8C48] mov dx, msg.zero_info 0 00000DBD E8F319 call disp_msg_asciz 2062 0 00000DC0 BF[600A] mov di, first_sector_buffer + 512 0 00000DC3 B90001 mov cx, 512 >> 1 0 00000DC6 31C0 xor ax, ax 0 00000DC8 F3AB rep stosw ; zero entire sector 2067 0 00000DCA BE[A02A] mov si, second_sector_buffer + 512 + FSINFO.signature1 0 00000DCD B90200 mov cx, 4 >> 1 0 00000DD0 BF[600A] mov di, first_sector_buffer + 512 0 00000DD3 F3A5 rep movsw ; copy over first signature 2072 0 00000DD5 BE[842C] mov si, second_sector_buffer + 512 + FSINFO.signature2 0 00000DD8 BF[440C] mov di, first_sector_buffer + 512 + FSINFO.signature2 0 00000DDB B90600 mov cx, (FSINFO.reserved2 - FSINFO.signature2) >> 1 0 00000DDE F3A5 rep movsw ; copy signature and entries 2077 0 00000DE0 BE[9C2C] mov si, second_sector_buffer + 512 + FSINFO.signature3 0 00000DE3 BF[5C0C] mov di, first_sector_buffer + 512 + FSINFO.signature3 0 00000DE6 B90200 mov cx, 4 >> 1 0 00000DE9 F3A5 rep movsw ; copy final signature 0 00000DEB EB50 jmp .no_fsinfo 2083 2084 @@: 2085 0 00000DED F646E702 test byte [bp + ldHasLBA], 2 0 00000DF1 7505 jnz @F 0 00000DF3 800E[2208]10 setopt [cmd_line_flags], clfLeaveInfo 2089 @@: 2090 0 00000DF8 F606[2208]10 testopt [cmd_line_flags], clfLeaveInfo 0 00000DFD 7413 jz @F 2093 0 00000DFF BA[AE48] mov dx, msg.leave_info 0 00000E02 E8AE19 call disp_msg_asciz 2096 2097 ; Copy over original FSINFO sector content. 0 00000E05 BE[A02A] mov si, second_sector_buffer + 512 0 00000E08 BF[600A] mov di, first_sector_buffer + 512 0 00000E0B B90001 mov cx, 512 >> 1 0 00000E0E F3A5 rep movsw 0 00000E10 EB2B jmp .no_fsinfo 2103 2104 @@: 0 00000E12 BA8000 mov dx, clfReadSectorFile12 0 00000E15 807EE610 cmp byte [bp + ldFATType], 16 0 00000E19 7208 jb @F 0 00000E1B BA0001 mov dx, clfReadSectorFile16 0 00000E1E 7403 je @F 0 00000E20 BA0002 mov dx, clfReadSectorFile32 2111 @@: 0 00000E23 8516[2008] test word [cmd_line_flags], dx 0 00000E27 BA[C948] mov dx, msg.replace_info 0 00000E2A 7403 jz @F 0 00000E2C BA[DE48] mov dx, msg.replace_info_file 2116 @@: 0 00000E2F E88119 call disp_msg_asciz 2118 2119 ; Copy over actual FSINFO structure from original. 2120 ; (Leaves FSIBOOT as written from our image.) 0 00000E32 BE[842C] mov si, second_sector_buffer + 512 + FSINFO.signature2 0 00000E35 BF[440C] mov di, first_sector_buffer + 512 + FSINFO.signature2 0 00000E38 B90E00 mov cx, (FSINFO_size - FSINFO.signature2) >> 1 0 00000E3B F3A5 rep movsw ; copy over FSINFO 2125 .no_fsinfo: 2126 ; 1st buffer second 512 B = FSINFO with FSIBOOT 2127 2128 2129 prepare_sector_final: 0 00000E3D BE[9E2A] mov si, second_sector_buffer + 510 0 00000E40 BF[5E0A] mov di, first_sector_buffer + 510 0 00000E43 A5 movsw 2133 ; 1st buffer signature set from original 2134 0 00000E44 8B4EDC mov cx, word [bp + ldBytesPerSector] 0 00000E47 F646E706 test byte [bp + ldHasLBA], 2 | 4 0 00000E4B 740E jz @F 0 00000E4D 81C60002 add si, 512 ; -> second_sector_buffer +1024 0 00000E51 81C70002 add di, 512 ; -> behind buffer for FSIBOOT 0 00000E55 81E90002 sub cx, 512 0 00000E59 7608 jbe @FF 2142 @@: 0 00000E5B 81E90002 sub cx, 512 0 00000E5F 7602 jbe @F 0 00000E61 F3A4 rep movsb 2146 @@: 2147 ; 1st buffer = up to 8 KiB for us to write 2148 ; (for FAT32 either 1024+ bytes including 2149 ; our FSIBOOT or 512 B primary plus another 2150 ; 512 B of FSINFO) 2151 2152 2153 detect_type: 0 00000E63 BB[5621] mov bx, type_search_metadata 2155 2156 .looppattern: 0 00000E66 BE[6008] mov si, first_sector_buffer 0 00000E69 BA0002 mov dx, 512 0 00000E6C 8B3F mov di, [bx] 0 00000E6E 85FF test di, di 0 00000E70 7437 jz .notfound 0 00000E72 8B4F02 mov cx, [bx + 2] 0 00000E75 83C308 add bx, 8 2164 2165 2166 @@: 0 00000E78 8A05 mov al, byte [di] ; get first byte 0 00000E7A 87F7 xchg si, di ; es:di -> to search 0 00000E7C 87D1 xchg dx, cx ; cx = count remaining, at least 1 0 00000E7E F2AE repne scasb ; scan for byte 0 00000E80 87D1 xchg dx, cx 0 00000E82 87F7 xchg si, di ; restore register setup 0 00000E84 7519 jne .nextpattern 2174 0 00000E86 4E dec si ; scasb left a pointer behind match 0 00000E87 42 inc dx ; also fix counter 0 00000E88 53 push bx 0 00000E89 56 push si 0 00000E8A 57 push di 0 00000E8B 51 push cx 0 00000E8C 39D1 cmp cx, dx 0 00000E8E 7705 ja .mismatchpattern ; (NZ) if doesn't fit in 512 bytes 0 00000E90 E83305 call .patchwildcards ; patch potential match candidate's wildcards 0 00000E93 F3A6 repe cmpsb 2185 .mismatchpattern: 0 00000E95 59 pop cx 0 00000E96 5F pop di 0 00000E97 5E pop si 0 00000E98 5B pop bx 0 00000E99 7413 je .foundpattern 0 00000E9B 46 inc si 0 00000E9C 4A dec dx 0 00000E9D 75D9 jnz @B 2194 2195 .nextpattern: 2196 %if 1 2197 @@: 0 00000E9F 833F00 cmp word [bx], 0 0 00000EA2 8D5F02 lea bx, [bx + 2] 0 00000EA5 75F8 jne @B 2201 %else 2202 ; With the repne scasb optimisation we may get 2203 ; al = first byte, and .patchwildcards may have 2204 ; never run for this pattern. So don't use this. 2205 xchg bx, ax ; get .patchwildcards return 2206 %endif 0 00000EA7 EBBD jmp .looppattern 2208 2209 2210 ; INP: bx -> wildcard displacement list, zero-terminated 2211 ; si -> candidate match or match in our loader 2212 ; di -> pattern to patch with wildcard contents 2213 ; OUT: ax -> behind zero terminator of list 2214 ; CHG: none 2215 .patchwildcards: equ set_lba.patchwildcards 2216 2217 .notfound: 0 00000EA9 BA[1544] mov dx, msg.type_not_found 0 00000EAC EB0F jmp .done_msg 2220 2221 2222 .foundpattern: 0 00000EAE BA[3544] mov dx, msg.type_found.1 0 00000EB1 E8FF18 call disp_msg_asciz 0 00000EB4 8B57FC mov dx, word [bx - 8 + 4] 0 00000EB7 E8F918 call disp_msg_asciz ; display what we found 0 00000EBA BA[4944] mov dx, msg.type_found.2 2228 2229 .done_msg: 0 00000EBD E8F318 call disp_msg_asciz 2231 .done: 2232 2233 2234 detect_fsi: 0 00000EC0 807EE610 cmp byte [bp + ldFATType], 16 0 00000EC4 7703E95101 jbe .done 2237 0 00000EC9 BB[C221] mov bx, fsi_search_metadata 2239 2240 .looppattern: 0 00000ECC BE[6008] mov si, first_sector_buffer 0 00000ECF BA0002 mov dx, 512 0 00000ED2 8B3F mov di, [bx] 0 00000ED4 85FF test di, di 0 00000ED6 7437 jz .notfound 0 00000ED8 8B4F02 mov cx, [bx + 2] 0 00000EDB 83C308 add bx, 8 2248 2249 2250 @@: 0 00000EDE 8A05 mov al, byte [di] ; get first byte 0 00000EE0 87F7 xchg si, di ; es:di -> to search 0 00000EE2 87D1 xchg dx, cx ; cx = count remaining, at least 1 0 00000EE4 F2AE repne scasb ; scan for byte 0 00000EE6 87D1 xchg dx, cx 0 00000EE8 87F7 xchg si, di ; restore register setup 0 00000EEA 7519 jne .nextpattern 2258 0 00000EEC 4E dec si ; scasb left a pointer behind match 0 00000EED 42 inc dx ; also fix counter 0 00000EEE 53 push bx 0 00000EEF 56 push si 0 00000EF0 57 push di 0 00000EF1 51 push cx 0 00000EF2 39D1 cmp cx, dx 0 00000EF4 7705 ja .mismatchpattern ; (NZ) if doesn't fit in 512 bytes 0 00000EF6 E8CD04 call .patchwildcards ; patch potential match candidate's wildcards 0 00000EF9 F3A6 repe cmpsb 2269 .mismatchpattern: 0 00000EFB 59 pop cx 0 00000EFC 5F pop di 0 00000EFD 5E pop si 0 00000EFE 5B pop bx 0 00000EFF 7414 je .foundpattern 0 00000F01 46 inc si 0 00000F02 4A dec dx 0 00000F03 75D9 jnz @B 2278 2279 .nextpattern: 2280 %if 1 2281 @@: 0 00000F05 833F00 cmp word [bx], 0 0 00000F08 8D5F02 lea bx, [bx + 2] 0 00000F0B 75F8 jne @B 2285 %else 2286 ; With the repne scasb optimisation we may get 2287 ; al = first byte, and .patchwildcards may have 2288 ; never run for this pattern. So don't use this. 2289 xchg bx, ax ; get .patchwildcards return 2290 %endif 0 00000F0D EBBD jmp .looppattern 2292 2293 2294 ; INP: bx -> wildcard displacement list, zero-terminated 2295 ; si -> candidate match or match in our loader 2296 ; di -> pattern to patch with wildcard contents 2297 ; OUT: ax -> behind zero terminator of list 2298 ; CHG: none 2299 .patchwildcards: equ set_lba.patchwildcards 2300 2301 .notfound: 0 00000F0F BA[A142] mov dx, msg.fsi_not_found 0 00000F12 E90201 jmp .done_msg 2304 2305 2306 .foundpattern: 0 00000F15 8B36[BA21] mov si, word [..@fsi_search_signature_offset] 0 00000F19 81EE007C sub si, 7C00h 0 00000F1D 72F0 jb .notfound 0 00000F1F 81FEF601 cmp si, 512 - 10 0 00000F23 77EA ja .notfound 0 00000F25 81C6[6008] add si, first_sector_buffer 0 00000F29 89F2 mov dx, si 0 00000F2B B90800 mov cx, 8 2315 @@: 0 00000F2E AC lodsb 0 00000F2F 3C20 cmp al, 32 0 00000F31 7309 jae .notzero 2319 ; Hack for first FSIBOOT: Last byte may be NUL 0 00000F33 83F901 cmp cx, 1 0 00000F36 75D7 jne .notfound 0 00000F38 84C0 test al, al 0 00000F3A 75D3 jnz .notfound 2324 2325 .notzero: 0 00000F3C 3C7F cmp al, 127 0 00000F3E 73CF jae .notfound 0 00000F40 E2EC loop @B 2329 0 00000F42 800E[D829]80 setopt [internalflags], detectedfsineeded 2331 0 00000F47 89D6 mov si, dx 0 00000F49 BF[3C08] mov di, fsi_needed 0 00000F4C 57 push di 0 00000F4D B90400 mov cx, 4 0 00000F50 F3A5 rep movsw 0 00000F52 5F pop di 0 00000F53 BA[BF42] mov dx, msg.fsi_found.1 0 00000F56 E80300 call disp_fsi 0 00000F59 E9BE00 jmp .done 2341 2342 disp_fsi: equ $ 0 00000F5C E85418 call disp_msg_asciz 0 00000F5F 89FE mov si, di 0 00000F61 B90400 mov cx, 4 0 00000F64 31DB xor bx, bx 2347 @@: 0 00000F66 AD lodsw 0 00000F67 09C3 or bx, ax 0 00000F69 E2FB loop @B 0 00000F6B 7506 jnz @F 0 00000F6D BA[AF42] mov dx, msg.none_found 0 00000F70 E9A100 jmp .display_done_msg 2354 2355 @@: 0 00000F73 B022 mov al, '"' 0 00000F75 E89118 call disp_al 0 00000F78 89FE mov si, di 0 00000F7A B108 mov cl, 8 2360 .displayloop: 0 00000F7C AC lodsb 0 00000F7D 3C20 cmp al, 32 0 00000F7F 7204 jb .nonprintable 0 00000F81 3C7F cmp al, 127 0 00000F83 7211 jb .printable 2366 .nonprintable: 0 00000F85 50 push ax 0 00000F86 B05C mov al, '\' 0 00000F88 E87E18 call disp_al 0 00000F8B B078 mov al, 'x' 0 00000F8D E87918 call disp_al 0 00000F90 58 pop ax 0 00000F91 E85E18 call disp_al_hex 0 00000F94 EB12 jmp .displaynext 2375 2376 .printable: 0 00000F96 3C5C cmp al, '\' 0 00000F98 7404 je .escape 0 00000F9A 3C22 cmp al, '"' 0 00000F9C 7507 jne .plain 2381 .escape: 0 00000F9E 50 push ax 0 00000F9F B05C mov al, '\' 0 00000FA1 E86518 call disp_al 0 00000FA4 58 pop ax 2386 .plain: 0 00000FA5 E86118 call disp_al 2388 .displaynext: 0 00000FA8 E2D2 loop .displayloop 2390 0 00000FAA BA[4744] mov dx, msg.fsi_found.2 0 00000FAD E80318 call disp_msg_asciz 2393 0 00000FB0 BE[D421] mov si, fsi_known_revisions 2395 .loop: 0 00000FB3 AD lodsw 0 00000FB4 85C0 test ax, ax 0 00000FB6 741D jz .unknown 0 00000FB8 57 push di 0 00000FB9 56 push si 0 00000FBA B90400 mov cx, 4 0 00000FBD F3A7 repe cmpsw 0 00000FBF 5E pop si 0 00000FC0 5F pop di 0 00000FC1 8D7408 lea si, [si + 8] 0 00000FC4 75ED jne .loop 2407 .known: 0 00000FC6 BA[BB43] mov dx, msg.fsi_known.1 0 00000FC9 E8E717 call disp_msg_asciz 0 00000FCC 92 xchg dx, ax 0 00000FCD E8E317 call disp_msg_asciz 0 00000FD0 BA[BD43] mov dx, msg.fsi_known.2 0 00000FD3 EB3F jmp .display_done_msg 2414 2415 .unknown: 0 00000FD5 89FB mov bx, di 0 00000FD7 BE[C043] mov si, msg.signature.fsiboot 0 00000FDA B90700 mov cx, 7 0 00000FDD F3A6 repe cmpsb 0 00000FDF 750F jne .checkexp 0 00000FE1 8A05 mov al, [di] 0 00000FE3 A2[E643] mov byte [msg.future_fsiboot.revision], al 0 00000FE6 E8E717 call is_alphanumeric 0 00000FE9 7526 jne .unknown2 0 00000FEB BA[CD43] mov dx, msg.future_fsiboot 0 00000FEE EB24 jmp .display_done_msg 2427 2428 .checkexp: 0 00000FF0 89DF mov di, bx 0 00000FF2 BE[C743] mov si, msg.signature.fsibex 0 00000FF5 B106 mov cl, 6 0 00000FF7 F3A6 repe cmpsb 0 00000FF9 7516 jne .unknown2 0 00000FFB 8B05 mov ax, [di] 0 00000FFD A3[1044] mov word [msg.future_fsibex.revision], ax 0 00001000 E8CD17 call is_alphanumeric 0 00001003 750C jne .unknown2 0 00001005 86C4 xchg al, ah 0 00001007 E8C617 call is_alphanumeric 0 0000100A 7505 jne .unknown2 0 0000100C BA[EA43] mov dx, msg.future_fsibex 0 0000100F EB03 jmp .display_done_msg 2443 2444 .unknown2: 0 00001011 BA[9E43] mov dx, msg.fsi_unknown 2446 .display_done_msg: 0 00001014 E99C17 jmp disp_msg_asciz 2448 2449 .done_msg: 0 00001017 E89917 call disp_msg_asciz 2451 .done: 2452 2453 2454 check_fsi_provided: 0 0000101A 807EE610 cmp byte [bp + ldFATType], 16 0 0000101E 7703E99A00 jbe .done 2457 0 00001023 BF[4608] mov di, fsi_provided 0 00001026 BE[640A] mov si, first_sector_buffer + 512 + FSINFO.fsiboot 2460 0 00001029 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 0000102E 7311 jae .first 2463 0 00001030 F606[D829]40 testopt [internalflags], detectedinfo 0 00001035 7411 jz .none 2466 0 00001037 F606[2008]58 testopt [cmd_line_flags], clfDontWriteInfo | clfWriteInfoToSectorFile | clfWriteInfoToFile 0 0000103C 7403 jz .first 2470 0 0000103E BE[A42A] mov si, second_sector_buffer + 512 + FSINFO.fsiboot 2472 2473 .second: 2474 2475 .first: 0 00001041 B90400 mov cx, 4 0 00001044 57 push di 0 00001045 F3A5 rep movsw 0 00001047 5F pop di 2480 .none: 2481 0 00001048 BA[CE42] mov dx, msg.fsi_provided.1 0 0000104B E80EFF call disp_fsi 2484 0 0000104E F606[D829]80 testopt [internalflags], detectedfsineeded 0 00001053 744B jz .done_check_sg 0 00001055 F606[2008]04 testopt [cmd_line_flags], clfDontWriteSector 0 0000105A 7544 jnz .done_check_sg 2489 0 0000105C BF[4608] mov di, fsi_provided 0 0000105F BE[3C08] mov si, fsi_needed 0 00001062 B90400 mov cx, 4 0 00001065 F3A7 repe cmpsw 0 00001067 7437 je .done_check_sg 2495 0 00001069 BA[DD42] mov dx, msg.fsi_mismatch.1 0 0000106C E80200 call .disp_error 0 0000106F EB28 jmp .handle_needed 2499 2500 .disp_error: 0 00001071 B8[1843] mov ax, msg.fsi_mismatch.2.big 0 00001074 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 00001079 7317 jae @F 0 0000107B B8[3B43] mov ax, msg.fsi_mismatch.2.none 0 0000107E F606[D829]40 testopt [internalflags], detectedinfo 0 00001083 740D jz @F 0 00001085 B8[5B43] mov ax, msg.fsi_mismatch.2.found 0 00001088 F606[2008]58 testopt [cmd_line_flags], clfDontWriteInfo | clfWriteInfoToSectorFile | clfWriteInfoToFile 0 0000108D 7503 jnz @F 0 0000108F B8[7D43] mov ax, msg.fsi_mismatch.2.install 2512 @@: 2513 0 00001092 E81E17 call disp_msg_asciz 0 00001095 92 xchg dx, ax 0 00001096 E91A17 jmp disp_msg_asciz 2517 2518 .handle_needed: 0 00001099 F606[2308]04 testopt [cmd_line_flags], clfAllowInvalidFSI 0 0000109E 741A jz .exit_error 2521 2522 .done_check_sg: 0 000010A0 F606[2308]08 testopt [cmd_line_flags], clfCheckFSI 0 000010A5 7416 jz .done 2525 0 000010A7 BF[4608] mov di, fsi_provided 0 000010AA BE[5008] mov si, fsi_check 0 000010AD B90400 mov cx, 4 0 000010B0 F3A7 repe cmpsw 0 000010B2 7409 je .done 2531 0 000010B4 BA[FB42] mov dx, msg.fsi_mismatch.3 0 000010B7 E8B7FF call .disp_error 2534 .exit_error: 0 000010BA E9EF06 jmp exit_error 2536 2537 .done: 2538 2539 2540 %if _NUM_DETECT_NAMES 2541 listnames: 0 000010BD BB[C03C] mov bx, msg.names 0 000010C0 BE[9E08] mov si, first_sector_buffer + bsBPB + bpbNew + BPBN_size 0 000010C3 B9C001 mov cx, 512 - (bsBPB + bpbNew + BPBN_size) - 2 2545 ; -2 = AA55h sig 0 000010C6 807EE610 cmp byte [bp + ldFATType], 16 0 000010CA 7606 jbe @F 0 000010CC BE[BA08] mov si, first_sector_buffer + bsBPB + ebpbNew + BPBN_size 0 000010CF B9A401 mov cx, 512 - (bsBPB + ebpbNew + BPBN_size) - 2 2550 @@: 2551 2552 %if _DISPLAY_ALL_NAMES 2553 .nextname: 2554 call findname 2555 lahf 2556 mov dx, [bx] 2557 call disp_msg_asciz 2558 mov dx, msg.name_before 2559 call disp_msg_asciz 2560 sahf 2561 jc @F ; skip quote if no name --> 2562 mov dx, msg.name_quote 2563 call disp_msg_asciz 2564 @@: 2565 mov dx, msg.foundname 2566 call disp_msg_asciz 2567 sahf 2568 jc @F ; skip quote if no name --> 2569 mov dx, msg.name_quote 2570 call disp_msg_asciz 2571 @@: 2572 mov dx, msg.name_after 2573 call disp_msg_asciz 2574 sahf 2575 mov ax, 0 2576 jc @F ; set to zero if no name --> 2577 lea ax, [si - 11] ; -> name in buffer 2578 @@: 2579 mov word [bx + 2], ax ; -> name in buffer, or 0 2580 add bx, 4 2581 cmp word [bx], 0 2582 jne .nextname 2583 %else 2584 ; First name: Special, if none found display a message. 0 000010D2 E88114 call findname 0 000010D5 730D jnc @F 0 000010D7 BA[FE3C] mov dx, msg.name_none 0 000010DA E8D616 call disp_msg_asciz 0 000010DD EB36 jmp @FF 2590 2591 .nextname: 0 000010DF E87414 call findname 0 000010E2 7231 jc @FF 2594 @@: 0 000010E4 8B17 mov dx, [bx] 0 000010E6 E8CA16 call disp_msg_asciz 0 000010E9 BA[F63C] mov dx, msg.name_before 0 000010EC E8C416 call disp_msg_asciz 0 000010EF BA[F93C] mov dx, msg.name_quote 0 000010F2 E8BE16 call disp_msg_asciz 0 000010F5 BA[A83C] mov dx, msg.foundname 0 000010F8 E8B816 call disp_msg_asciz 0 000010FB BA[F93C] mov dx, msg.name_quote 0 000010FE E8B216 call disp_msg_asciz 0 00001101 BA[FB3C] mov dx, msg.name_after 0 00001104 E8AC16 call disp_msg_asciz 0 00001107 8D44F5 lea ax, [si - 11] ; -> name in buffer 0 0000110A 894702 mov word [bx + 2], ax ; -> name in buffer, or 0 0 0000110D 83C304 add bx, 4 0 00001110 833F00 cmp word [bx], 0 0 00001113 75CA jne .nextname 2612 @@: 2613 %endif 2614 2615 2616 %if _NUM_REPLACEMENTS 0 00001115 BE[783C] mov si, msg.name_replacements 0 00001118 BB[C03C] mov bx, msg.names 0 0000111B B90400 mov cx, _NUM_REPLACEMENTS 2620 .loop: 0 0000111E 803C00 cmp byte [si], 0 0 00001121 7448 je .next 0 00001123 8B7F02 mov di, word [bx + 2] 0 00001126 85FF test di, di 0 00001128 7514 jnz .replace 0 0000112A BA[123D] mov dx, msg.no_name_found_before 0 0000112D E88316 call disp_msg_asciz 0 00001130 8B17 mov dx, [bx] 0 00001132 E87E16 call disp_msg_asciz 0 00001135 BA[163D] mov dx, msg.no_name_found_after 0 00001138 E87816 call disp_msg_asciz 0 0000113B E96E06 jmp exit_error 2633 2634 .replace: 0 0000113E BA[303D] mov dx, msg.replacing_before 0 00001141 E86F16 call disp_msg_asciz 0 00001144 8B17 mov dx, [bx] 0 00001146 E86A16 call disp_msg_asciz 0 00001149 BA[3B3D] mov dx, msg.replacing_between 0 0000114C E86416 call disp_msg_asciz 0 0000114F 51 push cx 0 00001150 56 push si 0 00001151 56 push si 0 00001152 57 push di 0 00001153 E88D14 call convert_name_to_asciz 0 00001156 5F pop di 0 00001157 5E pop si 0 00001158 BA[A83C] mov dx, msg.foundname 0 0000115B E85516 call disp_msg_asciz 0 0000115E BA[433D] mov dx, msg.replacing_after 0 00001161 E84F16 call disp_msg_asciz 0 00001164 B90B00 mov cx, 11 0 00001167 F3A4 rep movsb 0 00001169 5E pop si 0 0000116A 59 pop cx 2656 2657 .next: 0 0000116B 83C304 add bx, 4 0 0000116E 83C60C add si, 12 0 00001171 833F00 cmp word [bx], 0 0 00001174 E0A8 loopnz .loop 2662 %endif 2663 %endif 2664 2665 2666 set_unit: 0 00001176 BE[6008] mov si, first_sector_buffer 0 00001179 AC lodsb 0 0000117A 3CE9 cmp al, 0E9h 0 0000117C 741B je .nearjmp 0 0000117E 3CE8 cmp al, 0E8h 0 00001180 7417 je .nearjmp 0 00001182 3CEB cmp al, 0EBh 0 00001184 7415 je .shortjmp 2675 2676 .notfound: 0 00001186 BA[D93E] mov dx, msg.unit_not_found 0 00001189 833E[E629]FF cmp word [load_unit], -1 0 0000118E 7403E939F0 jne disp_error 0 00001193 BA[0B3F] mov dx, msg.unit_not_found.keep 0 00001196 E9C400 jmp .done_msg 2682 2683 2684 .nearjmp: 0 00001199 AD lodsw 0 0000119A A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2687 .shortjmp: 0 0000119B AC lodsb 0 0000119C 98 cbw 0 0000119D 01C6 add si, ax 2691 0 0000119F BA1000 mov dx, 16 0 000011A2 BF[F117] mov di, unit_search_strings.mov 0 000011A5 B90300 mov cx, unit_search_strings.mov_length 2695 @@: 0 000011A8 56 push si 0 000011A9 57 push di 0 000011AA 51 push cx 0 000011AB F3A6 repe cmpsb 0 000011AD 59 pop cx 0 000011AE 5F pop di 0 000011AF 5E pop si 0 000011B0 7406 je .found_mov 0 000011B2 46 inc si 0 000011B3 4A dec dx 0 000011B4 75F2 jnz @B 2707 0 000011B6 EBCE jmp .notfound 2709 2710 .found_mov: 0 000011B8 01CE add si, cx 2712 0 000011BA BA3000 mov dx, 48 0 000011BD BB[F717] mov bx, unit_search_strings.1612_set_dl 0 000011C0 BF[F417] mov di, unit_search_strings.1612_set_bpbn 0 000011C3 B90300 mov cx, unit_search_strings.1612_set_bpbn_length 0 000011C6 807EE610 cmp byte [bp + ldFATType], 16 0 000011CA 7609 jbe @F 0 000011CC BB[FD17] mov bx, unit_search_strings.32_set_dl 0 000011CF BF[FA17] mov di, unit_search_strings.32_set_bpbn 0 000011D2 B90300 mov cx, unit_search_strings.32_set_bpbn_length 2722 2723 @@: 0 000011D5 56 push si 0 000011D6 57 push di 0 000011D7 51 push cx 0 000011D8 F3A6 repe cmpsb 0 000011DA 59 pop cx 0 000011DB 5F pop di 0 000011DC 5E pop si 0 000011DD 7435 je .found_set_bpbn 0 000011DF 87DF xchg bx, di 0 000011E1 56 push si 0 000011E2 57 push di 0 000011E3 51 push cx 0 000011E4 F3A6 repe cmpsb 0 000011E6 59 pop cx 0 000011E7 5F pop di 0 000011E8 5E pop si 0 000011E9 87DF xchg bx, di 0 000011EB 742F je .found_set_dl 0 000011ED 46 inc si 0 000011EE 4A dec dx 0 000011EF 75E4 jnz @B 2745 0 000011F1 EB93 jmp .notfound 2747 2748 .setup_pointers: 0 000011F3 807EE610 cmp byte [bp + ldFATType], 16 0 000011F7 760E jbe .1612 2751 .32: 0 000011F9 BB[A008] mov bx, first_sector_buffer + bsBPB + ebpbNew + bpbnBootUnit 0 000011FC B8[FA17] mov ax, unit_search_strings.32_set_bpbn 0 000011FF BF[FD17] mov di, unit_search_strings.32_set_dl 0 00001202 B90300 mov cx, unit_search_strings.32_set_dl_length 0 00001205 EB0C jmp @F 2757 2758 .1612: 0 00001207 BB[8408] mov bx, first_sector_buffer + bsBPB + bpbNew + bpbnBootUnit 0 0000120A B8[F417] mov ax, unit_search_strings.1612_set_bpbn 0 0000120D BF[F717] mov di, unit_search_strings.1612_set_dl 0 00001210 B90300 mov cx, unit_search_strings.1612_set_dl_length 2763 @@: 0 00001213 C3 retn 2765 2766 2767 .found_set_bpbn: 0 00001214 E8DCFF call .setup_pointers 0 00001217 BA[453F] mov dx, msg.unit_found.set_bpbn 0 0000121A EB13 jmp @F 2771 2772 .found_set_dl: 0 0000121C E8D4FF call .setup_pointers 0 0000121F BA[6A3F] mov dx, msg.unit_found.set_dl 0 00001222 E88E15 call disp_msg_asciz 2776 0 00001225 50 push ax 0 00001226 8A07 mov al, [bx] 0 00001228 E8C715 call disp_al_hex 0 0000122B 58 pop ax 2781 0 0000122C BA[963F] mov dx, msg.unit_found.set_dl.after 2783 @@: 0 0000122F E88115 call disp_msg_asciz 2785 0 00001232 BA[993F] mov dx, msg.unit_found.keeping 0 00001235 833E[E629]FF cmp word [load_unit], -1 0 0000123A 7421 je .done_msg 2789 0 0000123C 50 push ax 0 0000123D A1[E629] mov ax, [load_unit] 2792 0 00001240 84E4 test ah, ah 0 00001242 7511 jnz @F ; if to set auto unit --> 2795 0 00001244 BA[BE3E] mov dx, msg.using_fix_unit 0 00001247 E86915 call disp_msg_asciz 2798 0 0000124A E8A515 call disp_al_hex 0 0000124D 8807 mov byte [bx], al 2801 0 0000124F BA[D43E] mov dx, msg.using_fix_unit_after 0 00001252 58 pop ax 0 00001253 EB04 jmp @FF ; di -> set dl 2805 2806 @@: 0 00001255 5F pop di ; di -> set bpbn 0 00001256 BA[AB3F] mov dx, msg.using_auto_unit 2809 @@: 2810 0 00001259 87F7 xchg si, di 0 0000125B F3A4 rep movsb ; write to there 2813 2814 .done_msg: 0 0000125D E85315 call disp_msg_asciz 2816 .done: 2817 2818 2819 set_partinfo: 0 00001260 BE[6008] mov si, first_sector_buffer 0 00001263 AC lodsb 0 00001264 3CE9 cmp al, 0E9h 0 00001266 741A je .nearjmp 0 00001268 3CE8 cmp al, 0E8h 0 0000126A 7416 je .nearjmp 0 0000126C 3CEB cmp al, 0EBh 0 0000126E 7414 je .shortjmp 2828 2829 .notfound: 0 00001270 BA[D93F] mov dx, msg.partinfo_not_found 0 00001273 833E[E829]FF cmp word [load_use_partinfo], -1 0 00001278 7403E94FEF jne disp_error 0 0000127D BA[0640] mov dx, msg.partinfo_not_found.keep 0 00001280 EB6B jmp .done_msg 2835 2836 2837 .nearjmp: 0 00001282 AD lodsw 0 00001283 A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2840 .shortjmp: 0 00001284 AC lodsb 0 00001285 98 cbw 0 00001286 01C6 add si, ax 2844 0 00001288 BA8000 mov dx, 128 0 0000128B BB[1518] mov bx, partinfo_search_strings.keep 0 0000128E BF[0018] mov di, partinfo_search_strings.mov 0 00001291 B91500 mov cx, partinfo_search_strings.mov_length 2849 2850 @@: 0 00001294 56 push si 0 00001295 57 push di 0 00001296 51 push cx 0 00001297 F3A6 repe cmpsb 0 00001299 59 pop cx 0 0000129A 5F pop di 0 0000129B 5E pop si 0 0000129C 741E je .found_mov 0 0000129E 87DF xchg bx, di 0 000012A0 56 push si 0 000012A1 57 push di 0 000012A2 51 push cx 0 000012A3 F3A6 repe cmpsb 0 000012A5 59 pop cx 0 000012A6 5F pop di 0 000012A7 5E pop si 0 000012A8 87DF xchg bx, di 0 000012AA 7418 je .found_keep 0 000012AC 46 inc si 0 000012AD 4A dec dx 0 000012AE 75E4 jnz @B 2872 0 000012B0 EBBE jmp .notfound 2874 2875 .setup_pointers: 0 000012B2 B8[0018] mov ax, partinfo_search_strings.mov 0 000012B5 BF[1518] mov di, partinfo_search_strings.keep 0 000012B8 B91500 mov cx, partinfo_search_strings.keep_length 0 000012BB C3 retn 2880 2881 2882 .found_mov: 0 000012BC E8F3FF call .setup_pointers 0 000012BF BA[3B40] mov dx, msg.partinfo_found.mov 0 000012C2 EB06 jmp @F 2886 2887 .found_keep: 0 000012C4 E8EBFF call .setup_pointers 0 000012C7 BA[5B40] mov dx, msg.partinfo_found.keep 2890 %if 0 2891 call disp_msg_asciz 2892 2893 push ax 2894 mov al, [bx] 2895 call disp_al_hex 2896 pop ax 2897 2898 mov dx, msg.partinfo_found.keep.after 2899 %endif 2900 @@: 0 000012CA E8E614 call disp_msg_asciz 2902 0 000012CD BA[993F] mov dx, msg.partinfo_found.keeping 0 000012D0 833E[E829]FF cmp word [load_use_partinfo], -1 0 000012D5 7416 je .done_msg 2906 0 000012D7 50 push ax 0 000012D8 A1[E829] mov ax, [load_use_partinfo] 2909 0 000012DB 84E4 test ah, ah 0 000012DD 7506 jnz @F ; if to set auto partinfo --> 2912 0 000012DF BA[BF3F] mov dx, msg.using_fix_partinfo 2914 %if 0 2915 call disp_msg_asciz 2916 2917 call disp_al_hex 2918 mov byte [bx], al 2919 2920 mov dx, msg.using_fix_partinfo_after 2921 %endif 0 000012E2 58 pop ax 0 000012E3 EB04 jmp @FF ; di -> keep 2924 2925 @@: 0 000012E5 5F pop di ; di -> mov 0 000012E6 BA[7C40] mov dx, msg.using_auto_partinfo 2928 @@: 2929 0 000012E9 87F7 xchg si, di 0 000012EB F3A4 rep movsb ; write to there 2932 2933 .done_msg: 0 000012ED E8C314 call disp_msg_asciz 2935 .done: 2936 2937 2938 set_query: 0 000012F0 BE[6008] mov si, first_sector_buffer 0 000012F3 AC lodsb 0 000012F4 3CE9 cmp al, 0E9h 0 000012F6 741A je .nearjmp 0 000012F8 3CE8 cmp al, 0E8h 0 000012FA 7416 je .nearjmp 0 000012FC 3CEB cmp al, 0EBh 0 000012FE 7414 je .shortjmp 2947 2948 .notfound: 0 00001300 BA[AE40] mov dx, msg.query_not_found 0 00001303 833E[EA29]FF cmp word [load_use_query_geometry], -1 0 00001308 7403E9BFEE jne disp_error 0 0000130D BA[E040] mov dx, msg.query_not_found.keep 0 00001310 EB6B jmp .done_msg 2954 2955 2956 .nearjmp: 0 00001312 AD lodsw 0 00001313 A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2959 .shortjmp: 0 00001314 AC lodsb 0 00001315 98 cbw 0 00001316 01C6 add si, ax 2963 0 00001318 BA8000 mov dx, 128 0 0000131B BB[3F18] mov bx, query_search_strings.keep 0 0000131E BF[2A18] mov di, query_search_strings.query 0 00001321 B91500 mov cx, query_search_strings.query_length 2968 2969 @@: 0 00001324 56 push si 0 00001325 57 push di 0 00001326 51 push cx 0 00001327 F3A6 repe cmpsb 0 00001329 59 pop cx 0 0000132A 5F pop di 0 0000132B 5E pop si 0 0000132C 741E je .found_query 0 0000132E 87DF xchg bx, di 0 00001330 56 push si 0 00001331 57 push di 0 00001332 51 push cx 0 00001333 F3A6 repe cmpsb 0 00001335 59 pop cx 0 00001336 5F pop di 0 00001337 5E pop si 0 00001338 87DF xchg bx, di 0 0000133A 7418 je .found_keep 0 0000133C 46 inc si 0 0000133D 4A dec dx 0 0000133E 75E4 jnz @B 2991 0 00001340 EBBE jmp .notfound 2993 2994 .setup_pointers: 0 00001342 B8[2A18] mov ax, query_search_strings.query 0 00001345 BF[3F18] mov di, query_search_strings.keep 0 00001348 B91500 mov cx, query_search_strings.keep_length 0 0000134B C3 retn 2999 3000 3001 .found_query: 0 0000134C E8F3FF call .setup_pointers 0 0000134F BA[1A41] mov dx, msg.query_found.query 0 00001352 EB06 jmp @F 3005 3006 .found_keep: 0 00001354 E8EBFF call .setup_pointers 0 00001357 BA[3F41] mov dx, msg.query_found.keep 3009 %if 0 3010 call disp_msg_asciz 3011 3012 push ax 3013 mov al, [bx] 3014 call disp_al_hex 3015 pop ax 3016 3017 mov dx, msg.query_found.keep.after 3018 %endif 3019 @@: 0 0000135A E85614 call disp_msg_asciz 3021 0 0000135D BA[993F] mov dx, msg.query_found.keeping 0 00001360 833E[EA29]FF cmp word [load_use_query_geometry], -1 0 00001365 7416 je .done_msg 3025 0 00001367 50 push ax 0 00001368 A1[EA29] mov ax, [load_use_query_geometry] 3028 0 0000136B 84E4 test ah, ah 0 0000136D 7506 jnz @F ; if to set auto query --> 3031 0 0000136F BA[9540] mov dx, msg.using_fix_query 3033 %if 0 3034 call disp_msg_asciz 3035 3036 call disp_al_hex 3037 mov byte [bx], al 3038 3039 mov dx, msg.using_fix_query_after 3040 %endif 0 00001372 58 pop ax 0 00001373 EB04 jmp @FF ; di -> keep 3043 3044 @@: 0 00001375 5F pop di ; di -> query 0 00001376 BA[7041] mov dx, msg.using_auto_query 3047 @@: 3048 0 00001379 87F7 xchg si, di 0 0000137B F3A4 rep movsb ; write to there 3051 3052 .done_msg: 0 0000137D E83314 call disp_msg_asciz 3054 .done: 3055 3056 set_lba: 0 00001380 BB[7E1D] mov bx, lba_search_metadata 3058 3059 .looppattern: 0 00001383 BE[6008] mov si, first_sector_buffer 0 00001386 BA0002 mov dx, 512 0 00001389 8B3F mov di, [bx] 0 0000138B 85FF test di, di 0 0000138D 744E jz .notfound 0 0000138F 8B4F02 mov cx, [bx + 2] 0 00001392 83C308 add bx, 8 3067 3068 3069 @@: 0 00001395 8A05 mov al, byte [di] ; get first byte 0 00001397 87F7 xchg si, di ; es:di -> to search 0 00001399 87D1 xchg dx, cx ; cx = count remaining, at least 1 0 0000139B F2AE repne scasb ; scan for byte 0 0000139D 87D1 xchg dx, cx 0 0000139F 87F7 xchg si, di ; restore register setup 0 000013A1 7519 jne .nextpattern 3077 0 000013A3 4E dec si ; scasb left a pointer behind match 0 000013A4 42 inc dx ; also fix counter 0 000013A5 53 push bx 0 000013A6 56 push si 0 000013A7 57 push di 0 000013A8 51 push cx 0 000013A9 39D1 cmp cx, dx 0 000013AB 7705 ja .mismatchpattern ; (NZ) if doesn't fit in 512 bytes 0 000013AD E81600 call .patchwildcards ; patch potential match candidate's wildcards 0 000013B0 F3A6 repe cmpsb 3088 .mismatchpattern: 0 000013B2 59 pop cx 0 000013B3 5F pop di 0 000013B4 5E pop si 0 000013B5 5B pop bx 0 000013B6 7438 je .foundpattern 0 000013B8 46 inc si 0 000013B9 4A dec dx 0 000013BA 75D9 jnz @B 3097 3098 .nextpattern: 3099 %if 1 3100 @@: 0 000013BC 833F00 cmp word [bx], 0 0 000013BF 8D5F02 lea bx, [bx + 2] 0 000013C2 75F8 jne @B 3104 %else 3105 ; With the repne scasb optimisation we may get 3106 ; al = first byte, and .patchwildcards may have 3107 ; never run for this pattern. So don't use this. 3108 xchg bx, ax ; get .patchwildcards return 3109 %endif 0 000013C4 EBBD jmp .looppattern 3111 3112 3113 ; INP: bx -> wildcard displacement list, zero-terminated 3114 ; si -> candidate match or match in our loader 3115 ; di -> pattern to patch with wildcard contents 3116 ; OUT: ax -> behind zero terminator of list 3117 ; CHG: none 3118 .patchwildcards: 0 000013C6 53 push bx 3120 .loopwildcard: 0 000013C7 53 push bx 0 000013C8 8B1F mov bx, [bx] ; = displacement to wildcard byte 0 000013CA 85DB test bx, bx ; zero ? 0 000013CC 7409 jz .donewildcard ; yes, done --> 0 000013CE 8A00 mov al, byte [si + bx] ; get actual value 0 000013D0 8801 mov byte [di + bx], al ; store it in wildcard position 0 000013D2 5B pop bx 0 000013D3 43 inc bx 0 000013D4 43 inc bx ; -> next wildcard displacement 0 000013D5 EBF0 jmp .loopwildcard 3131 .donewildcard: 0 000013D7 5B pop bx 0 000013D8 8D4702 lea ax, [bx + 2] 0 000013DB 5B pop bx ; restore -> start of displacement list 0 000013DC C3 retn 3136 3137 3138 .notfound: 0 000013DD BA[BC41] mov dx, msg.lba_not_found 0 000013E0 833E[EC29]FF cmp word [load_use_lba], -1 0 000013E5 7403E9E2ED jne disp_error 0 000013EA BA[E841] mov dx, msg.lba_not_found.keep 0 000013ED E9C900 jmp .done_msg 3144 3145 3146 .foundpattern: 0 000013F0 8B57FC mov dx, word [bx - 8 + 4] 0 000013F3 E8BD13 call disp_msg_asciz ; display what we found 3149 0 000013F6 BA[1C42] mov dx, msg.lba_found_suffix 0 000013F9 E8B713 call disp_msg_asciz 3152 0 000013FC BA[993F] mov dx, msg.lba_found.keeping 0 000013FF 833E[EC29]FF cmp word [load_use_lba], -1 0 00001404 7503E9B000 je .done_msg ; done, no change --> 3156 0 00001409 8B7FF8 mov di, word [bx - 8] ; -> what we matched (eg LBA) 3158 0 0000140C 81FF[1F1D] cmp di, lba_search_strings_hdd 0 00001410 7242 jb .nothddmatch 3161 0 00001412 803E[ED29]01 cmp byte [load_use_lba + 1], 1 0 00001417 7503E99D00 je .done_msg 3164 0 0000141C 8B5FFE mov bx, word [bx - 8 + 6] 0 0000141F 53 push bx 0 00001420 8B5F02 mov bx, word [bx + 2] 0 00001423 8B3F mov di, word [bx] ; -> the other code 0 00001425 83C308 add bx, 8 0 00001428 E89BFF call .patchwildcards 0 0000142B 5B pop bx 0 0000142C 53 push bx 0 0000142D 8B5F04 mov bx, word [bx + 4] 0 00001430 8B3F mov di, word [bx] ; -> the other code 0 00001432 83C308 add bx, 8 0 00001435 E88EFF call .patchwildcards 0 00001438 5B pop bx 0 00001439 803E[ED29]00 cmp byte [load_use_lba + 1], 0 0 0000143E 750A jne .hddsetauto 3180 .hddsetnone: 0 00001440 8B5F02 mov bx, word [bx + 2] 0 00001443 8B3F mov di, word [bx] 0 00001445 BA[8E41] mov dx, msg.using_none_lba 0 00001448 EB6B jmp .do_patch 3185 3186 .hddsetauto: 0 0000144A 8B5F04 mov bx, word [bx + 4] 0 0000144D 8B3F mov di, word [bx] 0 0000144F BA[9F41] mov dx, msg.using_auto_lba 0 00001452 EB61 jmp .do_patch 3191 3192 .nothddmatch: 0 00001454 803E[ED29]01 cmp byte [load_use_lba + 1], 1 0 00001459 752F jne .nothddreplace 0 0000145B 83EB08 sub bx, 8 0 0000145E BF[6C1D] mov di, label_hdd_special 3197 @@: 0 00001461 833D00 cmp word [di], 0 0 00001464 741E je .hddreplacenotfound 0 00001466 395D02 cmp word [di + 2], bx 0 00001469 740A je @F 0 0000146B 395D04 cmp word [di + 4], bx 0 0000146E 7405 je @F 0 00001470 83C706 add di, 6 0 00001473 EBEC jmp @B 3206 3207 @@: 0 00001475 8B1D mov bx, word [di] 0 00001477 8B3F mov di, word [bx] 0 00001479 83C308 add bx, 8 0 0000147C E847FF call .patchwildcards 0 0000147F BA[7942] mov dx, msg.using_autohdd_lba 0 00001482 EB31 jmp .do_patch 3214 3215 .hddreplacenotfound: 0 00001484 BA[2E42] mov dx, msg.lba_autohdd_not_found 0 00001487 E942ED jmp disp_error 3218 3219 3220 .nothddreplace: 0 0000148A 57 push di 0 0000148B 8B5FFE mov bx, word [bx - 8 + 6] 0 0000148E 8B3F mov di, word [bx] ; -> the other code 0 00001490 83C308 add bx, 8 0 00001493 E830FF call .patchwildcards ; patch other code in case we use it 0 00001496 89F8 mov ax, di ; ax -> the other code 0 00001498 5B pop bx 0 00001499 89DF mov di, bx ; bx = di -> what we matched 0 0000149B 50 push ax 0 0000149C A1[EC29] mov ax, [load_use_lba] 3231 0 0000149F 84E4 test ah, ah 0 000014A1 7507 jnz @F ; if to set auto LBA --> 3234 0 000014A3 BA[8E41] mov dx, msg.using_none_lba 0 000014A6 58 pop ax 0 000014A7 97 xchg ax, di ; di -> what we didn't match (eg CHS) 0 000014A8 EB04 jmp @FF 3239 3240 @@: 0 000014AA 58 pop ax 3242 ; di -> what we matched (eg LBA) 0 000014AB BA[9F41] mov dx, msg.using_auto_lba 3244 @@: 3245 0 000014AE 81FB[EB1A] cmp bx, lba_search_strings_chs 3247 ; matched CHS ? (this checks what we matched) 0 000014B2 7201 jb @F ; no --> 0 000014B4 97 xchg ax, di ; reverse (we matched CHS instead) 3250 @@: 3251 3252 .do_patch: 0 000014B5 87F7 xchg si, di 0 000014B7 F3A4 rep movsb ; write to there 3255 3256 .done_msg: 0 000014B9 E8F712 call disp_msg_asciz 3258 .done: 3259 3260 3261 set_geometry: 0 000014BC BE[0E2A] mov si, g_table 0 000014BF BA[853E] mov dx, msg.g_previous 3264 .loop_display: 0 000014C2 E8EE12 call disp_msg_asciz 0 000014C5 31DB xor bx, bx 0 000014C7 8A5C07 mov bl, byte [si + giOffset] 0 000014CA 31D2 xor dx, dx 0 000014CC 8B87[6B08] mov ax, word [first_sector_buffer + bsBPB + bx] 0 000014D0 807C0602 cmp byte [si + giLength], 2 0 000014D4 7604 jbe @F 0 000014D6 8B97[6D08] mov dx, word [first_sector_buffer + bsBPB + bx + 2] 3273 @@: 0 000014DA E83E13 call decdword 0 000014DD 8B5408 mov dx, word [si + giName] 0 000014E0 E8D012 call disp_msg_asciz 0 000014E3 BA[823E] mov dx, msg.comma 0 000014E6 83C60A add si, GINFO_size 0 000014E9 81FE[2C2A] cmp si, g_table_end 0 000014ED 72D3 jb .loop_display 0 000014EF BA[7F3E] mov dx, msg.linebreak 0 000014F2 E8BE12 call disp_msg_asciz 3283 0 000014F5 BE[0E2A] mov si, g_table 3285 .loop_check: 0 000014F8 D004 rol byte [si + giAuto], 1 0 000014FA 720B jc .auto 0 000014FC 83C60A add si, GINFO_size 0 000014FF 81FE[2C2A] cmp si, g_table_end 0 00001503 72F3 jb .loop_check 0 00001505 EB6B jmp .no_auto 3292 3293 .auto: 0 00001507 833E[3808]00 cmp word [cmd_line_image_file.name], 0 0 0000150C 7409 je @F 0 0000150E BA[753A] mov dx, msg.g_no_auto_image 0 00001511 E89F12 call disp_msg_asciz 0 00001514 E99502 jmp exit_error 3299 3300 @@: 0 00001517 B80D44 mov ax, 440Dh 0 0000151A 8A1E[EE29] mov bl, byte [drivenumber] 0 0000151E 43 inc bx 0 0000151F B96008 mov cx, 0860h 0 00001522 807EE610 cmp byte [bp + ldFATType], 16 0 00001526 7602 jbe @F 0 00001528 B548 mov ch, 48h 3308 @@: 0 0000152A 83EC5A sub sp, 5Ch - 2 0 0000152D BA0400 mov dx, 4 ; init "special functions" 0 00001530 52 push dx 0 00001531 89E2 mov dx, sp 0 00001533 F9 stc 0 00001534 CD21 int 21h 0 00001536 7309 jnc @F 0 00001538 BA[4D3A] mov dx, msg.g_auto_failed 0 0000153B E87512 call disp_msg_asciz 0 0000153E E96B02 jmp exit_error 3319 3320 @@: 0 00001541 89E7 mov di, sp 0 00001543 83C707 add di, 7 3323 3324 .loop_auto: 0 00001546 D004 rol byte [si + giAuto], 1 0 00001548 731C jnc .skip_auto 3327 0 0000154A 31DB xor bx, bx 0 0000154C 8A5C07 mov bl, byte [si + giOffset] 0 0000154F 31D2 xor dx, dx 0 00001551 8B01 mov ax, word [di + bx] 0 00001553 807C0602 cmp byte [si + giLength], 2 0 00001557 7603 jbe @F 0 00001559 8B5102 mov dx, word [di + bx + 2] 3335 @@: 0 0000155C 895404 mov word [si + giValue + 2], dx 0 0000155F 894402 mov word [si + giValue], ax 0 00001562 C64401FF mov byte [si + giSingle], 0FFh 3339 3340 .skip_auto: 0 00001566 83C60A add si, GINFO_size 0 00001569 81FE[2C2A] cmp si, g_table_end 0 0000156D 72D7 jb .loop_auto 0 0000156F 83C45C add sp, 5Ch 3345 3346 .no_auto: 0 00001572 BE[0E2A] mov si, g_table 0 00001575 BA[993E] mov dx, msg.g_updated 3349 .loop_update: 0 00001578 D04401 rol byte [si + giSingle], 1 0 0000157B 7328 jnc .no_update 0 0000157D E83312 call disp_msg_asciz 0 00001580 31DB xor bx, bx 0 00001582 8A5C07 mov bl, byte [si + giOffset] 0 00001585 8B5404 mov dx, word [si + giValue + 2] 0 00001588 8B4402 mov ax, word [si + giValue] 0 0000158B 8987[6B08] mov word [first_sector_buffer + bsBPB + bx], ax 0 0000158F 807C0602 cmp byte [si + giLength], 2 0 00001593 7604 jbe @F 0 00001595 8997[6D08] mov word [first_sector_buffer + bsBPB + bx + 2], dx 3361 @@: 0 00001599 E87F12 call decdword 0 0000159C 8B5408 mov dx, word [si + giName] 0 0000159F E81112 call disp_msg_asciz 0 000015A2 BA[823E] mov dx, msg.comma 3366 .no_update: 0 000015A5 83C60A add si, GINFO_size 0 000015A8 81FE[2C2A] cmp si, g_table_end 0 000015AC 72CA jb .loop_update 0 000015AE 81FA[823E] cmp dx, msg.comma 0 000015B2 7506 jne @F 0 000015B4 BA[7F3E] mov dx, msg.linebreak 0 000015B7 E8F911 call disp_msg_asciz 3374 @@: 3375 3376 3377 validate_fsinfo: 0 000015BA F646E702 test byte [bp + ldHasLBA], 2 0 000015BE 7458 jz .no_fsinfo 3380 0 000015C0 BF[600A] mov di, first_sector_buffer + 512 0 000015C3 BA[AF44] mov dx, msg.info_valid 3383 0 000015C6 813D5252 cmp word [di + FSINFO.signature1], FSINFO.signature1_value & 0FFFFh 0 000015CA 7526 jne @F 0 000015CC 817D026141 cmp word [di + FSINFO.signature1 + 2], FSINFO.signature1_value >> 16 0 000015D1 751F jne @F 0 000015D3 81BDE4017272 cmp word [di + FSINFO.signature2], FSINFO.signature2_value & 0FFFFh 0 000015D9 7517 jne @F 0 000015DB 81BDE6014161 cmp word [di + FSINFO.signature2 + 2], FSINFO.signature2_value >> 16 0 000015E1 750F jne @F 0 000015E3 83BDFC0100 cmp word [di + FSINFO.signature3], FSINFO.signature3_value & 0FFFFh 0 000015E8 7508 jne @F 0 000015EA 81BDFE0155AA cmp word [di + FSINFO.signature3 + 2], FSINFO.signature3_value >> 16 0 000015F0 7423 je .end 3396 3397 @@: 0 000015F2 BA[D044] mov dx, msg.info_invalid_allowing 0 000015F5 F606[2108]08 testopt [cmd_line_flags], clfAllowInvalidInfo 0 000015FA 7519 jnz .end 3401 0 000015FC BA[FD44] mov dx, msg.info_invalid_resetting 0 000015FF BE[F029] mov si, info_reset_struc 0 00001602 B90200 mov cx, info_reset_struc.signature1_size >> 1 0 00001605 F3A5 rep movsw 0 00001607 B106 mov cl, info_reset_struc.signature2_plus_entries_size >> 1 0 00001609 BF[440C] mov di, first_sector_buffer + 512 + FSINFO.signature2 0 0000160C F3A5 rep movsw 0 0000160E B102 mov cl, info_reset_struc.signature3_size >> 1 0 00001610 BF[5C0C] mov di, first_sector_buffer + 512 + FSINFO.signature3 0 00001613 F3A5 rep movsw 3412 3413 .end: 0 00001615 E89B11 call disp_msg_asciz 3415 3416 .no_fsinfo: 3417 3418 3419 write: 3420 3421 ; If the sector size is <= 512 bytes and there is a second 3422 ; FAT32 sector which is an FSINFO sector, write it here. 0 00001618 F646E702 test byte [bp + ldHasLBA], 2 0 0000161C 7503E9CA00 jz .no_fsinfo 0 00001621 F606[2008]08 testopt [cmd_line_flags], clfDontWriteInfo 0 00001626 7408 jz .write_fsinfo 3427 0 00001628 BA[2145] mov dx, msg.info_writing_not 0 0000162B E88511 call disp_msg_asciz 3430 0 0000162E EB47 jmp .write_info_copy_if_forced 3432 3433 3434 .write_fsinfo: 0 00001630 F606[2008]40 testopt [cmd_line_flags], clfWriteInfoToSectorFile 0 00001635 741D jz .not_info_to_sector_file 3437 0 00001637 BA[3745] mov dx, msg.info_writing_sector_file 0 0000163A E87611 call disp_msg_asciz 0 0000163D BF[3008] mov di, cmd_line_sector_file 0 00001640 E88201 call open_file_write 0 00001643 7303E96401 jc exit_error 3443 0 00001648 B80042 mov ax, 4200h 0 0000164B 31C9 xor cx, cx 0 0000164D BA0002 mov dx, 512 ; seek offset 512 0 00001650 CD21 int 21h 3448 0 00001652 EB18 jmp @F 3450 3451 3452 .not_info_to_sector_file: 0 00001654 F606[2008]10 testopt [cmd_line_flags], clfWriteInfoToFile 0 00001659 7425 jz .not_info_to_file 3455 0 0000165B BA[5D45] mov dx, msg.info_writing_file 0 0000165E E85211 call disp_msg_asciz 0 00001661 BF[3408] mov di, cmd_line_info_file 0 00001664 E85E01 call open_file_write 0 00001667 7303E94001 jc exit_error 3461 3462 @@: 0 0000166C BA[600A] mov dx, first_sector_buffer + 512 0 0000166F E85E02 call write_file_ae_512_bytes 0 00001672 7303E93501 jc exit_error 3466 3467 .write_info_copy_if_forced: 0 00001677 F606[2108]40 testopt [cmd_line_flags], clfWriteCopyInfo 0 0000167C 7460 jz .not_writing_fsinfo_copy 0 0000167E EB21 jmp .write_copy_info 3471 3472 3473 .not_info_to_file: 0 00001680 BA[7745] mov dx, msg.info_writing_sector 0 00001683 E82D11 call disp_msg_asciz 0 00001686 BB[600A] mov bx, first_sector_buffer + 512 0 00001689 8B4630 mov ax, word [bp + bsBPB + ebpbFSINFOSector] 0 0000168C 31D2 xor dx, dx 0 0000168E 8A0E[EE29] mov cl, [drivenumber] 0 00001692 E8CC13 call write_ae_512_bytes 0 00001695 7303E91201 jc exit_error 0 0000169A F606[2108]C0 testopt [cmd_line_flags], clfWriteCopyInfo | clfWriteCopyInfoIfSector 0 0000169F 743D jz .not_writing_fsinfo_copy 3484 3485 .write_copy_info: 0 000016A1 F606[D829]20 testopt [internalflags], detectedcopyinfo 0 000016A6 7443 jz .no_fsinfo 3488 0 000016A8 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 0 000016AB 034630 add ax, word [bp + bsBPB + ebpbFSINFOSector] 0 000016AE BA[AA46] mov dx, msg.backup_writing_info 0 000016B1 E8FF10 call disp_msg_asciz 3493 3494 ; Invalidate FSINFO entries. 0 000016B4 830E[480C]FF or word [first_sector_buffer + 512 + FSINFO.numberfree], -1 0 000016B9 830E[4A0C]FF or word [first_sector_buffer + 512 + FSINFO.numberfree + 2], -1 0 000016BE 830E[4C0C]FF or word [first_sector_buffer + 512 + FSINFO.nextfree], -1 0 000016C3 830E[4E0C]FF or word [first_sector_buffer + 512 + FSINFO.nextfree + 2], -1 3499 0 000016C8 BB[600A] mov bx, first_sector_buffer + 512 0 000016CB 31D2 xor dx, dx 0 000016CD 8A0E[EE29] mov cl, [drivenumber] 0 000016D1 E88D13 call write_ae_512_bytes 0 000016D4 7315 jnc .no_fsinfo 0 000016D6 BA[4C47] mov dx, msg.backup_error_info 0 000016D9 E8D710 call disp_msg_asciz 0 000016DC EB0D jmp .no_fsinfo 3508 3509 .not_writing_fsinfo_copy: 0 000016DE F606[D829]20 testopt [internalflags], detectedcopyinfo 0 000016E3 7406 jz .no_fsinfo 0 000016E5 BA[F546] mov dx, msg.backup_not_writing_info 3513 @@: 0 000016E8 E8C810 call disp_msg_asciz 3515 3516 .no_fsinfo: 3517 3518 0 000016EB F606[2008]04 testopt [cmd_line_flags], clfDontWriteSector 0 000016F0 7408 jz .write_sector 3521 0 000016F2 BA[9345] mov dx, msg.sector_writing_not 0 000016F5 E8BB10 call disp_msg_asciz 0 000016F8 EB26 jmp .write_sector_copy_if_forced 3525 3526 .write_sector: 0 000016FA F606[2008]01 testopt [cmd_line_flags], clfWriteSectorToFile 0 000016FF 7428 jz .not_sector_to_file 3529 0 00001701 BA[AE45] mov dx, msg.sector_writing_file 0 00001704 E8AC10 call disp_msg_asciz 0 00001707 BF[3008] mov di, cmd_line_sector_file 0 0000170A E8B800 call open_file_write 0 0000170D 726C jc exit_error_restore_fsinfo 3535 0 0000170F B80042 mov ax, 4200h ; seek from start of file 0 00001712 31C9 xor cx, cx 0 00001714 31D2 xor dx, dx ; seek offset 0 0 00001716 CD21 int 21h ; seek to start of file 3540 0 00001718 BA[6008] mov dx, first_sector_buffer 3542 ; -> buffer 0 0000171B E8B201 call write_file_ae_512_bytes 0 0000171E 725B jc exit_error_restore_fsinfo 3545 3546 .write_sector_copy_if_forced: 0 00001720 F606[2108]10 testopt [cmd_line_flags], clfWriteCopySector 0 00001725 7445 jz .not_writing_sector_copy 0 00001727 EB1D jmp .write_copy_sector 3550 3551 3552 .not_sector_to_file: 0 00001729 BA[CD45] mov dx, msg.sector_writing_sector 0 0000172C E88410 call disp_msg_asciz 0 0000172F BB[6008] mov bx, first_sector_buffer 0 00001732 31C0 xor ax, ax 0 00001734 31D2 xor dx, dx 0 00001736 8A0E[EE29] mov cl, [drivenumber] 3559 ; If sector size is >= 1 KiB, this writes both sectors for 3560 ; the FAT32 two-sector case. 0 0000173A E82413 call write_ae_512_bytes 0 0000173D 723C jc exit_error_restore_fsinfo 3563 0 0000173F F606[2108]30 testopt [cmd_line_flags], clfWriteCopySector | clfWriteCopySectorIfSector 0 00001744 7426 jz .not_writing_sector_copy 3566 3567 .write_copy_sector: 0 00001746 F606[D829]10 testopt [internalflags], detectedcopysector 0 0000174B 746A jz exit_normal 3570 0 0000174D BA[8446] mov dx, msg.backup_writing_sector 0 00001750 E86010 call disp_msg_asciz 3573 0 00001753 BB[6008] mov bx, first_sector_buffer 0 00001756 31D2 xor dx, dx 0 00001758 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 0 0000175B 8A0E[EE29] mov cl, [drivenumber] 0 0000175F E8FF12 call write_ae_512_bytes 0 00001762 7353 jnc exit_normal 0 00001764 BA[1A47] mov dx, msg.backup_error_sector 0 00001767 E84910 call disp_msg_asciz 0 0000176A EB4B jmp exit_normal 3583 3584 .not_writing_sector_copy: 0 0000176C F606[D829]10 testopt [internalflags], detectedcopysector 0 00001771 7444 jz exit_normal 0 00001773 BA[CB46] mov dx, msg.backup_not_writing_sector 0 00001776 E83A10 call disp_msg_asciz 0 00001779 EB3C jmp exit_normal 3590 3591 3592 exit_error_restore_fsinfo: 3593 ; If the boot sector failed to write after FSINFO was 3594 ; already written, try to restore FSINFO. 0 0000177B F646E702 test byte [bp + ldHasLBA], 2 0 0000177F 742B jz @F 3597 ; If haven't written, do not restore. 0 00001781 F606[2008]08 testopt [cmd_line_flags], clfDontWriteInfo 0 00001786 7524 jnz @F 3600 ; If have written to a file, do not restore. 0 00001788 F606[2008]50 testopt [cmd_line_flags], clfWriteInfoToFile | clfWriteInfoToSectorFile 0 0000178D 751D jnz @F 3603 0 0000178F BA[EE45] mov dx, msg.info_restoring_sector 0 00001792 E81E10 call disp_msg_asciz 3606 0 00001795 BB[A02A] mov bx, second_sector_buffer + 512 0 00001798 8B4630 mov ax, word [bp + bsBPB + ebpbFSINFOSector] 0 0000179B 31D2 xor dx, dx 0 0000179D 8A0E[EE29] mov cl, [drivenumber] 0 000017A1 E8BD12 call write_ae_512_bytes 0 000017A4 7306 jnc @F 3613 0 000017A6 BA[013C] mov dx, msg.critical_fail_fsinfo_changed 0 000017A9 E80710 call disp_msg_asciz 3616 @@: 3617 3618 3619 exit_error: 0 000017AC E8F20F call restorestate 0 000017AF B8014C mov ax, 4C01h 0 000017B2 CD21 int 21h 3623 3624 3625 exit_normal_message: 0 000017B4 E8FC0F call disp_msg_asciz 3627 3628 exit_normal: 0 000017B7 E8E70F call restorestate 0 000017BA B8004C mov ax, 4C00h 0 000017BD CD21 int 21h 3632 3633 3634 ; INP: ds:di -> cmd_line_file structure 3635 ; (word pointer to name, word handle) 3636 ; OUT: NC if success, file opened, 3637 ; bx = file handle 3638 ; CY if error, called disp_dos_error 3639 ; CHG: ax, bx, cx, dx, si 3640 ; Note: We never close our files, instead relying on the 3641 ; process termination to close them. 3642 open_file_readwrite: 0 000017BF B002 mov al, 2 0 000017C1 A9 db __TEST_IMM16 ; (skip mov al) 3645 open_file_read: 0 000017C2 B000 mov al, 0 0 000017C4 A9 db __TEST_IMM16 ; (skip mov al) 3648 open_file_write: 0 000017C5 B001 mov al, 1 3650 lframe near 0 000017C7 5589E5 lenter 3652 lvar word, bit0_wo_bit1_rw 0 000017CA 50 push ax 3654 3655 ; Is it already open ? 0 000017CB 8B5D02 mov bx, word [di + cmd_line_file_handle_ofs] 0 000017CE 83FBFF cmp bx, -1 0 000017D1 7405 je @F 0 000017D3 F8 clc 3660 .return: 0 000017D4 89EC5D lleave code 0 000017D7 C3 retn 3663 3664 @@: 3665 0 000017D8 E8A900 call .setup_opencreate ; ds:si -> pathname 0 000017DB B86C71 mov ax, 716Ch ; LFN open-create 0 000017DE 57 push di 0 000017DF 31FF xor di, di ; alias hint 0 000017E1 F9 stc 0 000017E2 CD21 int 21h 0 000017E4 5F pop di 0 000017E5 7378 jnc .got ; LFN call succeeded --> 3674 3675 ; Early case for no-LFN-interface available. 3676 ; cmp ax, 1 3677 ; je .try_sfn 0 000017E7 3D0071 cmp ax, 7100h 0 000017EA 744B je .try_sfn 3680 3681 ; Only now, we check whether the used drive supports LFNs. 3682 ; If it does, then we treat the error received as an 3683 ; actual error and cancel here. If not, the SFN function 3684 ; is called next as a fallback. 3685 ; 3686 ; We cannot rely on specific error returns like the 3687 ; expected 7100h CY (or 7100h CF-unchanged) or the similar 3688 ; 0001h CY (Invalid function) because no one agrees on what 3689 ; error code to use. 3690 ; 3691 ; dosemu returns 0003h (Path not found) on FATFS and 3692 ; redirected-non-dosemu drives. But may be changed so as to 3693 ; return 0059h (Function not supported on network). 3694 ; MSWindows 98SE returns 0002h (File not found) on 3695 ; DOS-redirected drives. 3696 ; DOSLFN with Fallback mode enabled supports the call (albeit 3697 ; limited to SFNs). 3698 ; 3699 ; To suss out what the error means, check LFN availability. 3700 ; 3701 ; Refer to https://github.com/stsp/dosemu2/issues/770 0 000017EC 1E push ds 0 000017ED 06 push es 0 000017EE 57 push di 0 000017EF 50 push ax 3706 lframe none, nested 3707 lvar 34, fstype_buffer 3708 lvar 4, pathname_buffer 0 000017F0 5589E58D66DA lenter 3710 0 000017F6 AD lodsw ; load first two bytes of pathname 3712 0 000017F7 16 push ss 0 000017F8 1F pop ds 0 000017F9 89E2 mov dx, sp ; ds:dx -> ?pathname_buffer 0 000017FB 16 push ss 0 000017FC 07 pop es 0 000017FD 89E7 mov di, sp ; es:di -> ?pathname_buffer 3719 0 000017FF 80FC3A cmp ah, ':' ; starts with drive specifier ? 0 00001802 7408 je @F ; yes --> 3722 0 00001804 B419 mov ah, 19h 0 00001806 CD21 int 21h ; get current default drive 0 00001808 0441 add al, 'A' ; A: = 0, convert to drive letter 0 0000180A B43A mov ah, ':' ; drive specifier 3727 @@: 0 0000180C AB stosw 0 0000180D B85C00 mov ax, '\' ; backslash and zero terminator 0 00001810 AB stosw ; es:di -> ?fstype_buffer 3731 0 00001811 31C0 xor ax, ax 0 00001813 B91100 mov cx, 34 >> 1 0 00001816 57 push di 0 00001817 F3AB rep stosw ; initialise ?fstype_buffer to all zeros 0 00001819 5F pop di ; -> ?fstype_buffer 3737 0 0000181A B92000 mov cx, 32 ; size of ?fstype_buffer 0 0000181D 31DB xor bx, bx ; harden, initialise this 0 0000181F B8A071 mov ax, 71A0h ; get volume information 0 00001822 F9 stc 0 00001823 CD21 int 21h 3743 0 00001825 7207 jc @F ; if call not supported --> 3745 ; bx = FS flags 0 00001827 F6C740 test bh, 0100_0000b ; LFN interface available ? 0 0000182A F9 stc ; if no 0 0000182B 7401 jz @F ; no --> 3749 0 0000182D F8 clc ; is available 3751 @@: 3752 0 0000182E 89EC5D lleave 0 00001831 58 pop ax ; (restore error code) 0 00001832 5F pop di 0 00001833 07 pop es 0 00001834 1F pop ds 0 00001835 7331 jnc .error ; if LFN interface is available, actual error 3759 ; if LFN interface is not available, try SFN 3760 3761 .try_sfn: 0 00001837 E84A00 call .setup_opencreate 0 0000183A B8006C mov ax, 6C00h ; Open-create 0 0000183D F9 stc 0 0000183E CD21 int 21h 0 00001840 731D jnc .got 3767 0 00001842 83F801 cmp ax, 1 0 00001845 7405 je .try_old_open_or_create 0 00001847 3D006C cmp ax, 6C00h 0 0000184A 751C jne .error 3772 3773 .try_old_open_or_create: 0 0000184C B43C mov ah, 3Ch ; Create (Create/Truncate) 0 0000184E F646FE01 test byte [bp + ?bit0_wo_bit1_rw], 1 0 00001852 7504 jnz @F ; setup for write --> 0 00001854 88D8 mov al, bl 0 00001856 B43D mov ah, 3Dh ; Open 3779 @@: 0 00001858 89F2 mov dx, si ; -> filename 3781 ; cx = create attribute 0 0000185A F9 stc 0 0000185B CD21 int 21h 0 0000185D 7209 jc .error 3785 3786 .got: 0 0000185F 89C3 mov bx, ax 0 00001861 895D02 mov word [di + cmd_line_file_handle_ofs], bx 0 00001864 F8 clc 0 00001865 E96CFF jmp .return 3791 3792 .error: 0 00001868 BA[FD48] mov dx, msg.error_file_open_write 0 0000186B F646FE01 test byte [bp + ?bit0_wo_bit1_rw], 1 0 0000186F 750C jnz @F ; setup for write --> 0 00001871 BA[3F49] mov dx, msg.error_file_open_readwrite 0 00001874 F646FE02 test byte [bp + ?bit0_wo_bit1_rw], 2 0 00001878 7503 jnz @F ; setup for rw --> 0 0000187A BA[1E49] mov dx, msg.error_file_open_read 3800 @@: 0 0000187D E82500 call disp_dos_error 0 00001880 F9 stc 0 00001881 E950FF jmp .return 3804 3805 .setup_opencreate: 0 00001884 8B35 mov si, word [di + cmd_line_file_name_ofs] 3807 ; -> filename 0 00001886 31C9 xor cx, cx ; create attribute 0 00001888 F646FE01 test byte [bp + ?bit0_wo_bit1_rw], 1 0 0000188C 750D jnz @F ; setup for write --> 0 0000188E BB2060 mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 3812 ; DENY WRITE, Read-only 0 00001891 BA0100 mov dx, 0000_0000_0000_0001b ; open 0 00001894 F646FE02 test byte [bp + ?bit0_wo_bit1_rw], 2 0 00001898 7508 jnz @FF ; setup for rw --> 0 0000189A C3 retn 3817 3818 @@: 0 0000189B BB2160 mov bx, 0110_0000_0010_0001b ; Auto-commit, no int 24h 3820 ; DENY WRITE, Write-only 0 0000189E BA1200 mov dx, 0000_0000_0001_0010b ; create / open-truncate 0 000018A1 C3 retn 3823 3824 @@: 0 000018A2 B322 mov bl, 0010_0010b ; DENY WRITE, Read-write 0 000018A4 C3 retn 3827 3828 lleave ctx 3829 3830 3831 disp_dos_error: 0 000018A5 E80B0F call disp_msg_asciz 0 000018A8 BA[9B49] mov dx, msg.dos_error_msg_1 0 000018AB E8050F call disp_msg_asciz 0 000018AE E83A0F call disp_ax_hex 0 000018B1 BA[A649] mov dx, msg.dos_error_msg_2 0 000018B4 E8FC0E call disp_msg_asciz 0 000018B7 BA[624C] mov dx, msg.dos_error_unknown 0 000018BA 83F828 cmp ax, dos_error_table.after_last 0 000018BD 7308 jae @F 0 000018BF 89C3 mov bx, ax 0 000018C1 D1E3 shl bx, 1 0 000018C3 8B97[704C] mov dx, word [dos_error_table + bx] 3844 @@: 0 000018C7 E8E90E call disp_msg_asciz 0 000018CA BA[AA49] mov dx, msg.dos_error_msg_3 0 000018CD E9E30E jmp disp_msg_asciz 3848 3849 3850 ; INP: ds:dx -> buffer 3851 ; bx = handle 3852 ; OUT: NC if success 3853 ; CY if error, disp_dos_error called 3854 write_file_ae_512_bytes: 0 000018D0 8B4EDC mov cx, word [bp + ldBytesPerSector] 0 000018D3 81F90002 cmp cx, 512 ; more than 512 bytes ? 0 000018D7 7703 ja @F ; yes --> 0 000018D9 B90002 mov cx, 512 ; fix sector size 3859 @@: 0 000018DC B440 mov ah, 40h 0 000018DE CD21 int 21h ; write file 0 000018E0 7207 jc @F 0 000018E2 39C8 cmp ax, cx 0 000018E4 B8FFFF mov ax, -1 0 000018E7 7407 je @FF ; (NC) --> 3866 @@: 0 000018E9 BA[5C49] mov dx, msg.error_file_write 0 000018EC E8B6FF call disp_dos_error 0 000018EF F9 stc 3870 @@: 0 000018F0 C3 retn 3872 3873 3874 unit_search_strings: 0 000018F1 BD007C .mov: mov bp, 7C00h 3876 .mov_length: equ $ - .mov 0 000018F4 885624 .1612_set_bpbn: mov byte [bp + bsBPB + bpbNew + bpbnBootUnit], dl 3878 .1612_set_bpbn_length: equ $ - .1612_set_bpbn 0 000018F7 8A5624 .1612_set_dl: mov dl, byte [bp + bsBPB + bpbNew + bpbnBootUnit] 3880 .1612_set_dl_length: equ $ - .1612_set_dl 3881 %if .1612_set_bpbn_length != .1612_set_dl_length 3882 %error Unit fixing replacement string not same length! 3883 %endif 3884 0 000018FA 885640 .32_set_bpbn: mov byte [bp + bsBPB + ebpbNew + bpbnBootUnit], dl 3886 .32_set_bpbn_length: equ $ - .32_set_bpbn 0 000018FD 8A5640 .32_set_dl: mov dl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 3888 .32_set_dl_length: equ $ - .32_set_dl 3889 %if .32_set_bpbn_length != .32_set_dl_length 3890 %error Unit fixing replacement string not same length! 3891 %endif 3892 3893 3894 partinfo_search_strings: 3895 .mov: 0 00001900 84D2 test dl, dl ; floppy ? 0 00001902 7911 jns @F ; don't attempt detection --> 3898 ; Check whether an MBR left us partition information. 3899 ; byte[ds:si] bit 7 means active and must be set if valid. 0 00001904 380C cmp byte [si], cl ; flags for xx-00h (result is xx), SF = bit 7 0 00001906 790D jns @F ; xx < 80h, ie info invalid --> 3902 ; byte[ds:si+4] is the file system type. Check for valid one. 0 00001908 384C04 cmp byte [si+4], cl ; is it zero? 0 0000190B 7408 je @F ; yes, info invalid --> 3905 ; Info valid, trust their hidden sectors over hardcoded. 3906 ; Assume the movsw instructions won't run with si = FFFFh. 0 0000190D BF1C7C mov di, 7C00h + bsBPB + bpbHiddenSectors 3908 ; -> BPB field 0 00001910 83C608 add si, 8 ; -> partition start sector in info 0 00001913 A5 movsw 0 00001914 A5 movsw ; overwrite BPB field with value from info 3912 @@: 3913 .mov_length: equ $ - .mov 3914 .keep: 0 00001915 84D2 test dl, dl ; floppy ? 0 00001917 7911 jns @F ; don't attempt detection --> 3917 ; Check whether an MBR left us partition information. 3918 ; byte[ds:si] bit 7 means active and must be set if valid. 0 00001919 380C cmp byte [si], cl ; flags for xx-00h (result is xx), SF = bit 7 0 0000191B 790D jns @F ; xx < 80h, ie info invalid --> 3921 ; byte[ds:si+4] is the file system type. Check for valid one. 0 0000191D 384C04 cmp byte [si+4], cl ; is it zero? 0 00001920 7408 je @F ; yes, info invalid --> 3924 ; Info valid, trust their hidden sectors over hardcoded. 3925 ; Assume the movsw instructions won't run with si = FFFFh. 0 00001922 BF1C7C mov di, 7C00h + bsBPB + bpbHiddenSectors 3927 ; -> BPB field 0 00001925 83C608 add si, 8 ; -> partition start sector in info 3929 3930 ; Patched out movsw twice 0 00001928 90 nop 0 00001929 90 nop ; overwrite BPB field with value from info 3933 @@: 3934 .keep_length: equ $ - .keep 3935 %if .mov_length != .keep_length 3936 %error Partinfo fixing replacement string not same length! 3937 %endif 3938 3939 3940 query_search_strings: 3941 .query: 3942 ; test dl, dl ; floppy? 3943 ; jns @F ; don't attempt query, might fail --> 3944 ; Note that while the original PC BIOS doesn't support this function 3945 ; (for its diskettes), it does properly return the error code 01h. 3946 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 0000192A B408 mov ah, 08h 3948 ; xor cx, cx ; initialise cl to 0 3949 ; Already from prologue cx = 0. 0 0000192C F9 stc ; initialise to CY 0 0000192D CD13 int 13h ; query drive geometry 0 0000192F 720E jc @F ; apparently failed --> 0 00001931 83E13F and cx, 3Fh ; get sectors 0 00001934 7409 jz @F ; invalid (S is 1-based), don't use --> 0 00001936 894E18 mov [bp + bsBPB + bpbCHSSectors], cx 0 00001939 88F1 mov cl, dh ; cx = maximum head number 0 0000193B 41 inc cx ; cx = number of heads (H is 0-based) 0 0000193C 894E1A mov [bp + bsBPB + bpbCHSHeads], cx 3959 @@: 3960 .query_length: equ $ - .query 3961 .keep: 3962 ; test dl, dl ; floppy? 3963 ; jns @F ; don't attempt query, might fail --> 3964 ; Note that while the original PC BIOS doesn't support this function 3965 ; (for its diskettes), it does properly return the error code 01h. 3966 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 0000193F B408 mov ah, 08h 3968 ; xor cx, cx ; initialise cl to 0 3969 ; Already from prologue cx = 0. 0 00001941 F9 stc ; initialise to CY 3971 3972 ; Patched out int 13h 0 00001942 90 nop 0 00001943 90 nop 3975 0 00001944 720E jc @F ; apparently failed --> 0 00001946 83E13F and cx, 3Fh ; get sectors 0 00001949 7409 jz @F ; invalid (S is 1-based), don't use --> 0 0000194B 894E18 mov [bp + bsBPB + bpbCHSSectors], cx 0 0000194E 88F1 mov cl, dh ; cx = maximum head number 0 00001950 41 inc cx ; cx = number of heads (H is 0-based) 0 00001951 894E1A mov [bp + bsBPB + bpbCHSHeads], cx 3983 @@: 3984 .keep_length: equ $ - .keep 3985 %if .query_length != .keep_length 3986 %error Query geometry fixing replacement string not same length! 3987 %endif 3988 3989 3990 %assign ALL 0 3991 %define PREFIX 3992 %include "lbasuch.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lbasuch.asm - LBA search strings for instsect 5 <1> 2024 by 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> 16 <1> %unmacro searchflag 3 17 <1> %unmacro search_wildcard 1-2 0 18 <1> %unmacro ldosboot_lba_search_string 10 19 <1> %unmacro freedos_lba_search_string 4 20 <1> %unmacro dumpsearches 1-* 21 <1> 22 <1> 23 <1> %define SEARCHES dw "" 24 <1> %define METASEARCHES dw "" 25 <1> %define METASTRINGS dw "" 26 <1> %define SEARCHFLAGS dw "" 27 <1> %assign any_SET 0 28 <1> %assign ldos_SET 0 29 <1> %assign freedos_SET 0 30 <1> 31 <1> %macro searchflag 3 32 <1> %ifn %1_SET 33 <1> %assign %1_SET 1 34 <1> %if any_SET 35 <1> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <1> %else 37 <1> %assign any_SET 1 38 <1> %endif 39 <1> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <1> %endif 41 <1> 42 <1> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <1> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 44 <1> %endmacro 45 <1> 46 <1> 47 <1> %macro search_wildcard 1-2 0 48 <1> %assign %%wc $ + %2 - %1 49 <1> %if %%wc == 0 50 <1> %error Wildcard at beginning of search string is not allowed 51 <1> %endif 52 <1> %xdefine WILDCARDS WILDCARDS, dw %%wc 53 <1> %endmacro 54 <1> 55 <1> %macro ldosboot_lba_search_string 10 56 <1> %define WILDCARDS dw "" 57 <1> %assign _FORCE_CHS %2 58 <1> %assign _LBA_SKIP_CHECK %3 59 <1> %assign _LBA_SKIP_CY %4 60 <1> %assign _LBA_SKIP_LBA_RETRY %5 61 <1> %assign _LBA_SKIP_ANY %6 62 <1> %assign _RETRY_RESET %7 63 <1> %assign _LBA_RETRY %8 64 <1> %assign _LBA_WORKAROUND %9 65 <1> %assign _CHS 1 66 <1> %assign _LDOSBOOT32 %10 67 <1> 68 <1> 69 <1> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <1> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <1> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <1> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <1> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <1> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <1> %else 89 <1> 90 <1> %if _FORCE_CHS 91 <1> %define %%identifier %[PREFIX]label_%1_chs 92 <1> %define %%identifierminusall label_%1_chs 93 <1> %define %%other %[PREFIX]label_%1_lba 94 <1> %else 95 <1> %define %%identifier %[PREFIX]label_%1_lba 96 <1> %define %%identifierminusall label_%1_lba 97 <1> %define %%other %[PREFIX]label_%1_chs 98 <1> %endif 99 <1> 100 <1> %%start: 101 <1> %[%%identifier %+ _search_string]: 102 <1> 103 <1> %if _LBA_SKIP_CHECK ; -14 bytes 104 <1> mov dl, [bp + 127] 105 <1> search_wildcard %%start, -1 106 <1> %else 107 <1> %if _LBA_WORKAROUND 108 <1> push ds 109 <1> mov bx, 40h 110 <1> mov ds, bx 111 <1> ; Setting ds = 40h for the function 41h detection is a workaround 112 <1> ; for a bug in the Book8088's Xi8088 BIOS. Refer to 113 <1> ; https://www.bttr-software.de/forum/forum_entry.php?id=21275 114 <1> %endif 115 <1> mov ah, 41h 116 <1> mov dl, [bp + 127] 117 <1> search_wildcard %%start, -1 118 <1> mov bx, 55AAh 119 <1> stc 120 <1> %if _FORCE_CHS 121 <1> nop 122 <1> nop 123 <1> %else 124 <1> int 13h ; 13.41.bx=55AA extensions installation check 125 <1> %endif 126 <1> %if _LBA_WORKAROUND 127 <1> pop ds 128 <1> %endif 129 <1> jc .no_lba 130 <1> search_wildcard %%start, -1 131 <1> cmp bx, 0AA55h 132 <1> jne .no_lba 133 <1> search_wildcard %%start, -1 134 <1> shr cl, 1 ; support bitmap bit 0 135 <1> jnc .no_lba 136 <1> search_wildcard %%start, -1 137 <1> %endif 138 <1> 139 <1> %if _LBA_RETRY 140 <1> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <1> stc 142 <1> %endif 143 <1> mov ah, 42h 144 <1> %if _FORCE_CHS 145 <1> nop 146 <1> stc 147 <1> %else 148 <1> int 13h ; 13.42 extensions read 149 <1> %endif 150 <1> jnc .lba_done 151 <1> search_wildcard %%start, -1 152 <1> 153 <1> %if _RETRY_RESET 154 <1> xor ax, ax 155 <1> int 13h ; reset disk 156 <1> %endif 157 <1> 158 <1> ; have to reset the LBAPACKET's lpCount, as the handler may 159 <1> ; set it to "the number of blocks successfully transferred". 160 <1> ; (in any case, the high byte is still zero.) 161 <1> mov byte [si + 2], 1 162 <1> %endif 163 <1> 164 <1> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <1> stc 166 <1> %endif 167 <1> %if _FORCE_CHS 168 <1> mov ah, 01h 169 <1> nop 170 <1> stc 171 <1> %else 172 <1> mov ah, 42h 173 <1> int 13h 174 <1> %endif 175 <1> %if _LBA_SKIP_CHECK && _CHS 176 <1> %if _LDOSBOOT32 177 <1> %if _LBA_SKIP_ANY 178 <1> jc .no_lba 179 <1> search_wildcard %%start, -1 180 <1> %else 181 <1> jnc .lba_done 182 <1> search_wildcard %%start, -1 183 <1> cmp ah, 1 ; invalid function? 184 <1> je .no_lba ; try CHS instead --> 185 <1> search_wildcard %%start, -1 186 <1> %endif 187 <1> %else 188 <1> %if _LBA_SKIP_ANY 189 <1> jc .no_lba 190 <1> search_wildcard %%start, -1 191 <1> %else 192 <1> jc .lba_check_error_1 193 <1> search_wildcard %%start, -1 194 <1> %endif 195 <1> %endif 196 <1> %else 197 <1> .cy_err: 198 <1> jc .lba_error 199 <1> search_wildcard %%start, -1 200 <1> %endif 201 <1> 202 <1> .lba_error: 203 <1> .lba_check_error_1: 204 <1> .lba_done: 205 <1> .no_lba: 206 <1> %%end: 207 <1> 208 <1> %if _FORCE_CHS 209 <1> %define %%message lba_search_msg.forcechs 210 <1> %else 211 <1> %if _LBA_SKIP_CHECK 212 <1> %define %%message lba_search_msg.autoskip 213 <1> %else 214 <1> %define %%message lba_search_msg.auto 215 <1> %endif 216 <1> %endif 217 <1> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <1> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <1> %defstr %%name %%identifierminusall 221 <1> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <1> %[%%identifier %+ _length]: equ %%end - %%start 223 <1> %if _FORCE_CHS 224 <1> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <1> %error Expected same length of replacement 226 <1> %endif 227 <1> %endif 228 <1> 229 <1> %endif 230 <1> %endmacro 231 <1> 232 <1> %macro freedos_lba_search_string 4 233 <1> %define WILDCARDS dw "" 234 <1> %assign _FORCE_CHS %2 235 <1> %assign _OEM_BOOT %3 236 <1> %assign _FORCE_CHS_DISKETTE %4 237 <1> 238 <1> 239 <1> %if _FORCE_CHS_DISKETTE 240 <1> %define %%identifier %[PREFIX]label_%1_chs_diskette 241 <1> %define %%identifierminusall label_%1_chs_diskette 242 <1> %define %%other %[PREFIX]label_%1_special 243 <1> %elif _FORCE_CHS 244 <1> %define %%identifier %[PREFIX]label_%1_chs 245 <1> %define %%identifierminusall label_%1_chs 246 <1> %define %%other %[PREFIX]label_%1_lba 247 <1> %else 248 <1> %define %%identifier %[PREFIX]label_%1_lba 249 <1> %define %%identifierminusall label_%1_lba 250 <1> %define %%other %[PREFIX]label_%1_chs 251 <1> %endif 252 <1> 253 <1> %%start: 254 <1> %[%%identifier %+ _search_string]: 255 <1> 256 <1> mov ah, 41h 257 <1> mov bx, 55AAh 258 <1> mov dl, [bp + 127] 259 <1> search_wildcard %%start, -1 260 <1> 261 <1> %if _FORCE_CHS 262 <1> xor dl, dl 263 <1> jz @F 264 <1> %elif _FORCE_CHS_DISKETTE 265 <1> test dl, dl 266 <1> jz @F 267 <1> %else 268 <1> test dl, dl 269 <1> nop 270 <1> nop 271 <1> %endif 272 <1> int 13h 273 <1> jc @F 274 <1> shr cx, 1 275 <1> sbb bx, 0AA55h - 1 276 <1> jne @F 277 <1> 278 <1> %if _OEM_BOOT 279 <1> lea si, [bp + 1023] 280 <1> search_wildcard %%start, -2 281 <1> search_wildcard %%start, -1 282 <1> mov word [bp + 1023], bx 283 <1> search_wildcard %%start, -2 284 <1> search_wildcard %%start, -1 285 <1> mov word [bp + 1023], bx 286 <1> search_wildcard %%start, -2 287 <1> search_wildcard %%start, -1 288 <1> %else 289 <1> lea si, [bp - 128] 290 <1> search_wildcard %%start, -1 291 <1> mov word [bp - 128], bx 292 <1> search_wildcard %%start, -1 293 <1> mov word [bp - 128], bx 294 <1> search_wildcard %%start, -1 295 <1> %endif 296 <1> mov ah, 42h 297 <1> jmp strict short @F 298 <1> search_wildcard %%start, -1 299 <1> @@: 300 <1> %%end: 301 <1> 302 <1> 303 <1> %if _FORCE_CHS 304 <1> %define %%message lba_search_msg.forcechs 305 <1> %else 306 <1> %if _FORCE_CHS_DISKETTE 307 <1> %define %%message lba_search_msg.autohdd 308 <1> %else 309 <1> %define %%message lba_search_msg.auto 310 <1> %endif 311 <1> %endif 312 <1> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 314 <1> %xdefine METASEARCHES METASEARCHES, dw %%metaname 315 <1> %xdefine METASEARCHES METASEARCHES, dw 32*1024 + !!%2 * 1 + !!%3 * 2 + !!%4 * 4 316 <1> %defstr %%name %%identifierminusall 317 <1> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 318 <1> %[%%identifier %+ _length]: equ %%end - %%start 319 <1> %if _FORCE_CHS 320 <1> %if %[%%identifier %+ _length] != %[%%other %+ _length] 321 <1> %error Expected same length of replacement 322 <1> %endif 323 <1> %endif 324 <1> %endmacro 325 <1> 326 <1> searchflag freedos, "_FORCE_CHS", 1 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 327 <1> searchflag freedos, "_OEM_BOOT", 2 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 328 <1> searchflag freedos, "_FORCE_CHS_DISKETTE", 4 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 329 <1> 330 <1> 331 <1> %[PREFIX]lba_search_msg: 0 00001954 4175746F204C424120 .auto: asciz "Auto LBA detection" 0 0000195D 646574656374696F6E 0 00001966 00 0 00001967 4175746F204C424120 .autohdd: asciz "Auto LBA detection (HDD only)" 0 00001970 646574656374696F6E 0 00001979 2028484444206F6E6C 0 00001982 792900 0 00001985 4175746F204C424120 .autoskip: asciz "Auto LBA detection (skip check)" 0 0000198E 646574656374696F6E 0 00001997 2028736B6970206368 0 000019A0 65636B2900 0 000019A5 466F72636564204348 .forcechs: asciz "Forced CHS access" 0 000019AE 532061636365737300 336 <1> 337 <1> %[PREFIX]lba_search_strings_lba: 338 <1> freedos_lba_search_string freedos, 0, 0, 0 233 <2> %define WILDCARDS dw "" 234 <2> %assign _FORCE_CHS %2 235 <2> %assign _OEM_BOOT %3 236 <2> %assign _FORCE_CHS_DISKETTE %4 237 <2> 238 <2> 239 <2> %if _FORCE_CHS_DISKETTE 240 <2> %define %%identifier %[PREFIX]label_%1_chs_diskette 241 <2> %define %%identifierminusall label_%1_chs_diskette 242 <2> %define %%other %[PREFIX]label_%1_special 243 <2> %elif _FORCE_CHS 244 <2> %define %%identifier %[PREFIX]label_%1_chs 245 <2> %define %%identifierminusall label_%1_chs 246 <2> %define %%other %[PREFIX]label_%1_lba 247 <2> %else 248 <2> %define %%identifier %[PREFIX]label_%1_lba 249 <2> %define %%identifierminusall label_%1_lba 250 <2> %define %%other %[PREFIX]label_%1_chs 251 <2> %endif 252 <2> 253 <2> %%start: 254 <2> %[%%identifier %+ _search_string]: 255 <2> 0 000019B7 B441 mov ah, 41h 0 000019B9 BBAA55 mov bx, 55AAh 0 000019BC 8A567F mov dl, [bp + 127] 259 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 260 <2> 261 <2> %if _FORCE_CHS 262 <2> xor dl, dl 263 <2> jz @F 264 <2> %elif _FORCE_CHS_DISKETTE 265 <2> test dl, dl 266 <2> jz @F 267 <2> %else 0 000019BF 84D2 test dl, dl 0 000019C1 90 nop 0 000019C2 90 nop 271 <2> %endif 0 000019C3 CD13 int 13h 0 000019C5 7215 jc @F 0 000019C7 D1E9 shr cx, 1 0 000019C9 81DB54AA sbb bx, 0AA55h - 1 0 000019CD 750D jne @F 277 <2> 278 <2> %if _OEM_BOOT 279 <2> lea si, [bp + 1023] 280 <2> search_wildcard %%start, -2 281 <2> search_wildcard %%start, -1 282 <2> mov word [bp + 1023], bx 283 <2> search_wildcard %%start, -2 284 <2> search_wildcard %%start, -1 285 <2> mov word [bp + 1023], bx 286 <2> search_wildcard %%start, -2 287 <2> search_wildcard %%start, -1 288 <2> %else 0 000019CF 8D7680 lea si, [bp - 128] 290 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 000019D2 895E80 mov word [bp - 128], bx 292 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 000019D5 895E80 mov word [bp - 128], bx 294 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 295 <2> %endif 0 000019D8 B442 mov ah, 42h 0 000019DA EB00 jmp strict short @F 298 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 299 <2> @@: 300 <2> %%end: 301 <2> 302 <2> 303 <2> %if _FORCE_CHS 304 <2> %define %%message lba_search_msg.forcechs 305 <2> %else 306 <2> %if _FORCE_CHS_DISKETTE 307 <2> %define %%message lba_search_msg.autohdd 308 <2> %else 309 <2> %define %%message lba_search_msg.auto 310 <2> %endif 311 <2> %endif 312 <2> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 314 <2> %xdefine METASEARCHES METASEARCHES, dw %%metaname 315 <2> %xdefine METASEARCHES METASEARCHES, dw 32*1024 + !!%2 * 1 + !!%3 * 2 + !!%4 * 4 316 <2> %defstr %%name %%identifierminusall 317 <2> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 318 <2> %[%%identifier %+ _length]: equ %%end - %%start 319 <2> %if _FORCE_CHS 320 <2> %if %[%%identifier %+ _length] != %[%%other %+ _length] 321 <2> %error Expected same length of replacement 322 <2> %endif 323 <2> %endif 339 <1> freedos_lba_search_string freedos_oem, 0, 1, 0 233 <2> %define WILDCARDS dw "" 234 <2> %assign _FORCE_CHS %2 235 <2> %assign _OEM_BOOT %3 236 <2> %assign _FORCE_CHS_DISKETTE %4 237 <2> 238 <2> 239 <2> %if _FORCE_CHS_DISKETTE 240 <2> %define %%identifier %[PREFIX]label_%1_chs_diskette 241 <2> %define %%identifierminusall label_%1_chs_diskette 242 <2> %define %%other %[PREFIX]label_%1_special 243 <2> %elif _FORCE_CHS 244 <2> %define %%identifier %[PREFIX]label_%1_chs 245 <2> %define %%identifierminusall label_%1_chs 246 <2> %define %%other %[PREFIX]label_%1_lba 247 <2> %else 248 <2> %define %%identifier %[PREFIX]label_%1_lba 249 <2> %define %%identifierminusall label_%1_lba 250 <2> %define %%other %[PREFIX]label_%1_chs 251 <2> %endif 252 <2> 253 <2> %%start: 254 <2> %[%%identifier %+ _search_string]: 255 <2> 0 000019DC B441 mov ah, 41h 0 000019DE BBAA55 mov bx, 55AAh 0 000019E1 8A567F mov dl, [bp + 127] 259 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 260 <2> 261 <2> %if _FORCE_CHS 262 <2> xor dl, dl 263 <2> jz @F 264 <2> %elif _FORCE_CHS_DISKETTE 265 <2> test dl, dl 266 <2> jz @F 267 <2> %else 0 000019E4 84D2 test dl, dl 0 000019E6 90 nop 0 000019E7 90 nop 271 <2> %endif 0 000019E8 CD13 int 13h 0 000019EA 7218 jc @F 0 000019EC D1E9 shr cx, 1 0 000019EE 81DB54AA sbb bx, 0AA55h - 1 0 000019F2 7510 jne @F 277 <2> 278 <2> %if _OEM_BOOT 0 000019F4 8DB6FF03 lea si, [bp + 1023] 280 <2> search_wildcard %%start, -2 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 281 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 000019F8 899EFF03 mov word [bp + 1023], bx 283 <2> search_wildcard %%start, -2 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 284 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 000019FC 899EFF03 mov word [bp + 1023], bx 286 <2> search_wildcard %%start, -2 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 287 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 288 <2> %else 289 <2> lea si, [bp - 128] 290 <2> search_wildcard %%start, -1 291 <2> mov word [bp - 128], bx 292 <2> search_wildcard %%start, -1 293 <2> mov word [bp - 128], bx 294 <2> search_wildcard %%start, -1 295 <2> %endif 0 00001A00 B442 mov ah, 42h 0 00001A02 EB00 jmp strict short @F 298 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 299 <2> @@: 300 <2> %%end: 301 <2> 302 <2> 303 <2> %if _FORCE_CHS 304 <2> %define %%message lba_search_msg.forcechs 305 <2> %else 306 <2> %if _FORCE_CHS_DISKETTE 307 <2> %define %%message lba_search_msg.autohdd 308 <2> %else 309 <2> %define %%message lba_search_msg.auto 310 <2> %endif 311 <2> %endif 312 <2> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 314 <2> %xdefine METASEARCHES METASEARCHES, dw %%metaname 315 <2> %xdefine METASEARCHES METASEARCHES, dw 32*1024 + !!%2 * 1 + !!%3 * 2 + !!%4 * 4 316 <2> %defstr %%name %%identifierminusall 317 <2> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 318 <2> %[%%identifier %+ _length]: equ %%end - %%start 319 <2> %if _FORCE_CHS 320 <2> %if %[%%identifier %+ _length] != %[%%other %+ _length] 321 <2> %error Expected same length of replacement 322 <2> %endif 323 <2> %endif 340 <1> %assign variant 0 341 <1> %rep 512 342 <1> %if variant == 256 343 <1> %[PREFIX]lba_search_strings_chs: 344 <1> freedos_lba_search_string freedos, 1, 0, 0 345 <1> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <1> %endif 347 <1> %assign identifier variant & ~256 348 <1> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 359 <1> %assign variant variant + 1 360 <1> %endrep 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001A04 B441 mov ah, 41h 0 00001A06 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A09 BBAA55 mov bx, 55AAh 0 00001A0C F9 stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 0 00001A0D CD13 int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 0 00001A0F 7210 jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A11 81FB55AA cmp bx, 0AA55h 0 00001A15 750A jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A17 D0E9 shr cl, 1 0 00001A19 7306 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001A1B B442 mov ah, 42h 0 00001A1D CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001A1F 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001A21 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001A24 B442 mov ah, 42h 0 00001A26 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001A28 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001A2A 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001A2D F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001A2E B442 mov ah, 42h 0 00001A30 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001A32 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001A34 B441 mov ah, 41h 0 00001A36 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A39 BBAA55 mov bx, 55AAh 0 00001A3C F9 stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 0 00001A3D CD13 int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 0 00001A3F 721A jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A41 81FB55AA cmp bx, 0AA55h 0 00001A45 7514 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A47 D0E9 shr cl, 1 0 00001A49 7310 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001A4B B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001A4D CD13 int 13h 149 <3> %endif 0 00001A4F 730A jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001A51 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001A55 B442 mov ah, 42h 0 00001A57 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001A59 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001A5B 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001A5E B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001A60 CD13 int 13h 149 <3> %endif 0 00001A62 730A jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001A64 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001A68 B442 mov ah, 42h 0 00001A6A CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001A6C 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001A6E 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001A71 F9 stc 142 <3> %endif 0 00001A72 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001A74 CD13 int 13h 149 <3> %endif 0 00001A76 730B jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001A78 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001A7C F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001A7D B442 mov ah, 42h 0 00001A7F CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001A81 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001A83 B441 mov ah, 41h 0 00001A85 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A88 BBAA55 mov bx, 55AAh 0 00001A8B F9 stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 0 00001A8C CD13 int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 0 00001A8E 721E jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A90 81FB55AA cmp bx, 0AA55h 0 00001A94 7518 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001A96 D0E9 shr cl, 1 0 00001A98 7314 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001A9A B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001A9C CD13 int 13h 149 <3> %endif 0 00001A9E 730E jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001AA0 31C0 xor ax, ax 0 00001AA2 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001AA4 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001AA8 B442 mov ah, 42h 0 00001AAA CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001AAC 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001AAE 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001AB1 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001AB3 CD13 int 13h 149 <3> %endif 0 00001AB5 730E jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001AB7 31C0 xor ax, ax 0 00001AB9 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001ABB C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001ABF B442 mov ah, 42h 0 00001AC1 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001AC3 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001AC5 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001AC8 F9 stc 142 <3> %endif 0 00001AC9 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001ACB CD13 int 13h 149 <3> %endif 0 00001ACD 730F jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001ACF 31C0 xor ax, ax 0 00001AD1 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001AD3 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001AD7 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001AD8 B442 mov ah, 42h 0 00001ADA CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001ADC 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 0 00001ADE 1E push ds 0 00001ADF BB4000 mov bx, 40h 0 00001AE2 8EDB mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001AE4 B441 mov ah, 41h 0 00001AE6 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001AE9 BBAA55 mov bx, 55AAh 0 00001AEC F9 stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 0 00001AED CD13 int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 0 00001AEF 1F pop ds 128 <3> %endif 0 00001AF0 7210 jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001AF2 81FB55AA cmp bx, 0AA55h 0 00001AF6 750A jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001AF8 D0E9 shr cl, 1 0 00001AFA 7306 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001AFC B442 mov ah, 42h 0 00001AFE CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001B00 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 0 00001B02 1E push ds 0 00001B03 BB4000 mov bx, 40h 0 00001B06 8EDB mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001B08 B441 mov ah, 41h 0 00001B0A 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B0D BBAA55 mov bx, 55AAh 0 00001B10 F9 stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 0 00001B11 CD13 int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 0 00001B13 1F pop ds 128 <3> %endif 0 00001B14 721A jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B16 81FB55AA cmp bx, 0AA55h 0 00001B1A 7514 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B1C D0E9 shr cl, 1 0 00001B1E 7310 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001B20 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001B22 CD13 int 13h 149 <3> %endif 0 00001B24 730A jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001B26 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001B2A B442 mov ah, 42h 0 00001B2C CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001B2E 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 0 00001B30 1E push ds 0 00001B31 BB4000 mov bx, 40h 0 00001B34 8EDB mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001B36 B441 mov ah, 41h 0 00001B38 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B3B BBAA55 mov bx, 55AAh 0 00001B3E F9 stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 0 00001B3F CD13 int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 0 00001B41 1F pop ds 128 <3> %endif 0 00001B42 721E jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B44 81FB55AA cmp bx, 0AA55h 0 00001B48 7518 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B4A D0E9 shr cl, 1 0 00001B4C 7314 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001B4E B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001B50 CD13 int 13h 149 <3> %endif 0 00001B52 730E jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001B54 31C0 xor ax, ax 0 00001B56 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001B58 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001B5C B442 mov ah, 42h 0 00001B5E CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001B60 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001B62 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001B65 B442 mov ah, 42h 0 00001B67 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001B69 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B6B 80FC01 cmp ah, 1 0 00001B6E 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001B70 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001B73 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001B74 B442 mov ah, 42h 0 00001B76 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001B78 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B7A 80FC01 cmp ah, 1 0 00001B7D 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001B7F 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001B82 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001B84 CD13 int 13h 149 <3> %endif 0 00001B86 730F jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001B88 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001B8C B442 mov ah, 42h 0 00001B8E CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001B90 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001B92 80FC01 cmp ah, 1 0 00001B95 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001B97 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001B9A F9 stc 142 <3> %endif 0 00001B9B B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001B9D CD13 int 13h 149 <3> %endif 0 00001B9F 7310 jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001BA1 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001BA5 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001BA6 B442 mov ah, 42h 0 00001BA8 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001BAA 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001BAC 80FC01 cmp ah, 1 0 00001BAF 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001BB1 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001BB4 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001BB6 CD13 int 13h 149 <3> %endif 0 00001BB8 7313 jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001BBA 31C0 xor ax, ax 0 00001BBC CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001BBE C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001BC2 B442 mov ah, 42h 0 00001BC4 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001BC6 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001BC8 80FC01 cmp ah, 1 0 00001BCB 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001BCD 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001BD0 F9 stc 142 <3> %endif 0 00001BD1 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 0 00001BD3 CD13 int 13h 149 <3> %endif 0 00001BD5 7314 jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001BD7 31C0 xor ax, ax 0 00001BD9 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001BDB C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001BDF F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 0 00001BE0 B442 mov ah, 42h 0 00001BE2 CD13 int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001BE4 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001BE6 80FC01 cmp ah, 1 0 00001BE9 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 233 <3> %define WILDCARDS dw "" 234 <3> %assign _FORCE_CHS %2 235 <3> %assign _OEM_BOOT %3 236 <3> %assign _FORCE_CHS_DISKETTE %4 237 <3> 238 <3> 239 <3> %if _FORCE_CHS_DISKETTE 240 <3> %define %%identifier %[PREFIX]label_%1_chs_diskette 241 <3> %define %%identifierminusall label_%1_chs_diskette 242 <3> %define %%other %[PREFIX]label_%1_special 243 <3> %elif _FORCE_CHS 244 <3> %define %%identifier %[PREFIX]label_%1_chs 245 <3> %define %%identifierminusall label_%1_chs 246 <3> %define %%other %[PREFIX]label_%1_lba 247 <3> %else 248 <3> %define %%identifier %[PREFIX]label_%1_lba 249 <3> %define %%identifierminusall label_%1_lba 250 <3> %define %%other %[PREFIX]label_%1_chs 251 <3> %endif 252 <3> 253 <3> %%start: 254 <3> %[%%identifier %+ _search_string]: 255 <3> 0 00001BEB B441 mov ah, 41h 0 00001BED BBAA55 mov bx, 55AAh 0 00001BF0 8A567F mov dl, [bp + 127] 259 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 260 <3> 261 <3> %if _FORCE_CHS 0 00001BF3 30D2 xor dl, dl 0 00001BF5 7419 jz @F 264 <3> %elif _FORCE_CHS_DISKETTE 265 <3> test dl, dl 266 <3> jz @F 267 <3> %else 268 <3> test dl, dl 269 <3> nop 270 <3> nop 271 <3> %endif 0 00001BF7 CD13 int 13h 0 00001BF9 7215 jc @F 0 00001BFB D1E9 shr cx, 1 0 00001BFD 81DB54AA sbb bx, 0AA55h - 1 0 00001C01 750D jne @F 277 <3> 278 <3> %if _OEM_BOOT 279 <3> lea si, [bp + 1023] 280 <3> search_wildcard %%start, -2 281 <3> search_wildcard %%start, -1 282 <3> mov word [bp + 1023], bx 283 <3> search_wildcard %%start, -2 284 <3> search_wildcard %%start, -1 285 <3> mov word [bp + 1023], bx 286 <3> search_wildcard %%start, -2 287 <3> search_wildcard %%start, -1 288 <3> %else 0 00001C03 8D7680 lea si, [bp - 128] 290 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C06 895E80 mov word [bp - 128], bx 292 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C09 895E80 mov word [bp - 128], bx 294 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 295 <3> %endif 0 00001C0C B442 mov ah, 42h 0 00001C0E EB00 jmp strict short @F 298 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 299 <3> @@: 300 <3> %%end: 301 <3> 302 <3> 303 <3> %if _FORCE_CHS 304 <3> %define %%message lba_search_msg.forcechs 305 <3> %else 306 <3> %if _FORCE_CHS_DISKETTE 307 <3> %define %%message lba_search_msg.autohdd 308 <3> %else 309 <3> %define %%message lba_search_msg.auto 310 <3> %endif 311 <3> %endif 312 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 314 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname 315 <3> %xdefine METASEARCHES METASEARCHES, dw 32*1024 + !!%2 * 1 + !!%3 * 2 + !!%4 * 4 316 <3> %defstr %%name %%identifierminusall 317 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 318 <3> %[%%identifier %+ _length]: equ %%end - %%start 319 <3> %if _FORCE_CHS 320 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 321 <3> %error Expected same length of replacement 322 <3> %endif 323 <3> %endif 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 233 <3> %define WILDCARDS dw "" 234 <3> %assign _FORCE_CHS %2 235 <3> %assign _OEM_BOOT %3 236 <3> %assign _FORCE_CHS_DISKETTE %4 237 <3> 238 <3> 239 <3> %if _FORCE_CHS_DISKETTE 240 <3> %define %%identifier %[PREFIX]label_%1_chs_diskette 241 <3> %define %%identifierminusall label_%1_chs_diskette 242 <3> %define %%other %[PREFIX]label_%1_special 243 <3> %elif _FORCE_CHS 244 <3> %define %%identifier %[PREFIX]label_%1_chs 245 <3> %define %%identifierminusall label_%1_chs 246 <3> %define %%other %[PREFIX]label_%1_lba 247 <3> %else 248 <3> %define %%identifier %[PREFIX]label_%1_lba 249 <3> %define %%identifierminusall label_%1_lba 250 <3> %define %%other %[PREFIX]label_%1_chs 251 <3> %endif 252 <3> 253 <3> %%start: 254 <3> %[%%identifier %+ _search_string]: 255 <3> 0 00001C10 B441 mov ah, 41h 0 00001C12 BBAA55 mov bx, 55AAh 0 00001C15 8A567F mov dl, [bp + 127] 259 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 260 <3> 261 <3> %if _FORCE_CHS 0 00001C18 30D2 xor dl, dl 0 00001C1A 741C jz @F 264 <3> %elif _FORCE_CHS_DISKETTE 265 <3> test dl, dl 266 <3> jz @F 267 <3> %else 268 <3> test dl, dl 269 <3> nop 270 <3> nop 271 <3> %endif 0 00001C1C CD13 int 13h 0 00001C1E 7218 jc @F 0 00001C20 D1E9 shr cx, 1 0 00001C22 81DB54AA sbb bx, 0AA55h - 1 0 00001C26 7510 jne @F 277 <3> 278 <3> %if _OEM_BOOT 0 00001C28 8DB6FF03 lea si, [bp + 1023] 280 <3> search_wildcard %%start, -2 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 281 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C2C 899EFF03 mov word [bp + 1023], bx 283 <3> search_wildcard %%start, -2 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 284 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C30 899EFF03 mov word [bp + 1023], bx 286 <3> search_wildcard %%start, -2 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 287 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 288 <3> %else 289 <3> lea si, [bp - 128] 290 <3> search_wildcard %%start, -1 291 <3> mov word [bp - 128], bx 292 <3> search_wildcard %%start, -1 293 <3> mov word [bp - 128], bx 294 <3> search_wildcard %%start, -1 295 <3> %endif 0 00001C34 B442 mov ah, 42h 0 00001C36 EB00 jmp strict short @F 298 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 299 <3> @@: 300 <3> %%end: 301 <3> 302 <3> 303 <3> %if _FORCE_CHS 304 <3> %define %%message lba_search_msg.forcechs 305 <3> %else 306 <3> %if _FORCE_CHS_DISKETTE 307 <3> %define %%message lba_search_msg.autohdd 308 <3> %else 309 <3> %define %%message lba_search_msg.auto 310 <3> %endif 311 <3> %endif 312 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 314 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname 315 <3> %xdefine METASEARCHES METASEARCHES, dw 32*1024 + !!%2 * 1 + !!%3 * 2 + !!%4 * 4 316 <3> %defstr %%name %%identifierminusall 317 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 318 <3> %[%%identifier %+ _length]: equ %%end - %%start 319 <3> %if _FORCE_CHS 320 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 321 <3> %error Expected same length of replacement 322 <3> %endif 323 <3> %endif 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001C38 B441 mov ah, 41h 0 00001C3A 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C3D BBAA55 mov bx, 55AAh 0 00001C40 F9 stc 120 <3> %if _FORCE_CHS 0 00001C41 90 nop 0 00001C42 90 nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 0 00001C43 7210 jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C45 81FB55AA cmp bx, 0AA55h 0 00001C49 750A jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C4B D0E9 shr cl, 1 0 00001C4D 7306 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001C4F B401 mov ah, 01h 0 00001C51 90 nop 0 00001C52 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001C53 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001C55 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001C58 B401 mov ah, 01h 0 00001C5A 90 nop 0 00001C5B F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001C5C 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001C5E 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001C61 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001C62 B401 mov ah, 01h 0 00001C64 90 nop 0 00001C65 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001C66 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001C68 B441 mov ah, 41h 0 00001C6A 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C6D BBAA55 mov bx, 55AAh 0 00001C70 F9 stc 120 <3> %if _FORCE_CHS 0 00001C71 90 nop 0 00001C72 90 nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 0 00001C73 721A jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C75 81FB55AA cmp bx, 0AA55h 0 00001C79 7514 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001C7B D0E9 shr cl, 1 0 00001C7D 7310 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001C7F B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001C81 90 nop 0 00001C82 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001C83 730A jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001C85 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001C89 B401 mov ah, 01h 0 00001C8B 90 nop 0 00001C8C F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001C8D 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001C8F 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001C92 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001C94 90 nop 0 00001C95 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001C96 730A jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001C98 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001C9C B401 mov ah, 01h 0 00001C9E 90 nop 0 00001C9F F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001CA0 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001CA2 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001CA5 F9 stc 142 <3> %endif 0 00001CA6 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001CA8 90 nop 0 00001CA9 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001CAA 730B jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001CAC C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001CB0 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001CB1 B401 mov ah, 01h 0 00001CB3 90 nop 0 00001CB4 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001CB5 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001CB7 B441 mov ah, 41h 0 00001CB9 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001CBC BBAA55 mov bx, 55AAh 0 00001CBF F9 stc 120 <3> %if _FORCE_CHS 0 00001CC0 90 nop 0 00001CC1 90 nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 0 00001CC2 721E jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001CC4 81FB55AA cmp bx, 0AA55h 0 00001CC8 7518 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001CCA D0E9 shr cl, 1 0 00001CCC 7314 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001CCE B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001CD0 90 nop 0 00001CD1 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001CD2 730E jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001CD4 31C0 xor ax, ax 0 00001CD6 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001CD8 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001CDC B401 mov ah, 01h 0 00001CDE 90 nop 0 00001CDF F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001CE0 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001CE2 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001CE5 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001CE7 90 nop 0 00001CE8 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001CE9 730E jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001CEB 31C0 xor ax, ax 0 00001CED CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001CEF C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001CF3 B401 mov ah, 01h 0 00001CF5 90 nop 0 00001CF6 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001CF7 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001CF9 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001CFC F9 stc 142 <3> %endif 0 00001CFD B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001CFF 90 nop 0 00001D00 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001D01 730F jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001D03 31C0 xor ax, ax 0 00001D05 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001D07 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001D0B F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001D0C B401 mov ah, 01h 0 00001D0E 90 nop 0 00001D0F F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 0 00001D10 7200 jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 0 00001D12 1E push ds 0 00001D13 BB4000 mov bx, 40h 0 00001D16 8EDB mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001D18 B441 mov ah, 41h 0 00001D1A 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D1D BBAA55 mov bx, 55AAh 0 00001D20 F9 stc 120 <3> %if _FORCE_CHS 0 00001D21 90 nop 0 00001D22 90 nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 0 00001D23 1F pop ds 128 <3> %endif 0 00001D24 7210 jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D26 81FB55AA cmp bx, 0AA55h 0 00001D2A 750A jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D2C D0E9 shr cl, 1 0 00001D2E 7306 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001D30 B401 mov ah, 01h 0 00001D32 90 nop 0 00001D33 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001D34 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 0 00001D36 1E push ds 0 00001D37 BB4000 mov bx, 40h 0 00001D3A 8EDB mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001D3C B441 mov ah, 41h 0 00001D3E 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D41 BBAA55 mov bx, 55AAh 0 00001D44 F9 stc 120 <3> %if _FORCE_CHS 0 00001D45 90 nop 0 00001D46 90 nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 0 00001D47 1F pop ds 128 <3> %endif 0 00001D48 721A jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D4A 81FB55AA cmp bx, 0AA55h 0 00001D4E 7514 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D50 D0E9 shr cl, 1 0 00001D52 7310 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001D54 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001D56 90 nop 0 00001D57 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001D58 730A jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001D5A C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001D5E B401 mov ah, 01h 0 00001D60 90 nop 0 00001D61 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001D62 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 0 00001D64 1E push ds 0 00001D65 BB4000 mov bx, 40h 0 00001D68 8EDB mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 0 00001D6A B441 mov ah, 41h 0 00001D6C 8A567F mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D6F BBAA55 mov bx, 55AAh 0 00001D72 F9 stc 120 <3> %if _FORCE_CHS 0 00001D73 90 nop 0 00001D74 90 nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 0 00001D75 1F pop ds 128 <3> %endif 0 00001D76 721E jc .no_lba 130 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D78 81FB55AA cmp bx, 0AA55h 0 00001D7C 7518 jne .no_lba 133 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D7E D0E9 shr cl, 1 0 00001D80 7314 jnc .no_lba 136 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001D82 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001D84 90 nop 0 00001D85 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001D86 730E jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001D88 31C0 xor ax, ax 0 00001D8A CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001D8C C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001D90 B401 mov ah, 01h 0 00001D92 90 nop 0 00001D93 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 0 00001D94 7200 jc .lba_error 199 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001D96 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001D99 B401 mov ah, 01h 0 00001D9B 90 nop 0 00001D9C F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001D9D 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001D9F 80FC01 cmp ah, 1 0 00001DA2 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001DA4 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001DA7 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001DA8 B401 mov ah, 01h 0 00001DAA 90 nop 0 00001DAB F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001DAC 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001DAE 80FC01 cmp ah, 1 0 00001DB1 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001DB3 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001DB6 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001DB8 90 nop 0 00001DB9 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001DBA 730F jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001DBC C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001DC0 B401 mov ah, 01h 0 00001DC2 90 nop 0 00001DC3 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001DC4 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001DC6 80FC01 cmp ah, 1 0 00001DC9 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001DCB 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001DCE F9 stc 142 <3> %endif 0 00001DCF B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001DD1 90 nop 0 00001DD2 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001DD3 7310 jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001DD5 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001DD9 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001DDA B401 mov ah, 01h 0 00001DDC 90 nop 0 00001DDD F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001DDE 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001DE0 80FC01 cmp ah, 1 0 00001DE3 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001DE5 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 0 00001DE8 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001DEA 90 nop 0 00001DEB F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001DEC 7313 jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001DEE 31C0 xor ax, ax 0 00001DF0 CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001DF2 C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001DF6 B401 mov ah, 01h 0 00001DF8 90 nop 0 00001DF9 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001DFA 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001DFC 80FC01 cmp ah, 1 0 00001DFF 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 0 00001E01 8A567F mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001E04 F9 stc 142 <3> %endif 0 00001E05 B442 mov ah, 42h 144 <3> %if _FORCE_CHS 0 00001E07 90 nop 0 00001E08 F9 stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 0 00001E09 7314 jnc .lba_done 151 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 152 <3> 153 <3> %if _RETRY_RESET 0 00001E0B 31C0 xor ax, ax 0 00001E0D CD13 int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 0 00001E0F C6440201 mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 0 00001E13 F9 stc 166 <3> %endif 167 <3> %if _FORCE_CHS 0 00001E14 B401 mov ah, 01h 0 00001E16 90 nop 0 00001E17 F9 stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 0 00001E18 7305 jnc .lba_done 182 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001E1A 80FC01 cmp ah, 1 0 00001E1D 7400 je .no_lba 185 <3> search_wildcard %%start, -1 48 <4> %assign %%wc $ + %2 - %1 49 <4> %if %%wc == 0 50 <4> %error Wildcard at beginning of search string is not allowed 51 <4> %endif 52 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 342 <2> %if variant == 256 343 <2> %[PREFIX]lba_search_strings_chs: 344 <2> freedos_lba_search_string freedos, 1, 0, 0 345 <2> freedos_lba_search_string freedos_oem, 1, 1, 0 346 <2> %endif 347 <2> %assign identifier variant & ~256 348 <2> ldosboot_lba_search_string identifier, variant & 256, variant & 1, variant & 2, variant & 4, variant & 8, variant & 16, variant & 32, variant & 64, variant & 128 56 <3> %define WILDCARDS dw "" 57 <3> %assign _FORCE_CHS %2 58 <3> %assign _LBA_SKIP_CHECK %3 59 <3> %assign _LBA_SKIP_CY %4 60 <3> %assign _LBA_SKIP_LBA_RETRY %5 61 <3> %assign _LBA_SKIP_ANY %6 62 <3> %assign _RETRY_RESET %7 63 <3> %assign _LBA_RETRY %8 64 <3> %assign _LBA_WORKAROUND %9 65 <3> %assign _CHS 1 66 <3> %assign _LDOSBOOT32 %10 67 <3> 68 <3> 69 <3> %if !ALL && ! _LBA_SKIP_CHECK && (_LBA_SKIP_CY || _LBA_SKIP_LBA_RETRY || _LBA_SKIP_ANY || _LDOSBOOT32) 72 <3> %elif !ALL && _LBA_SKIP_CHECK && (_LBA_WORKAROUND) 75 <3> %elif !ALL && _LBA_SKIP_CHECK && _LBA_SKIP_ANY && (_LDOSBOOT32) 79 <3> %elif !ALL && _LBA_SKIP_CHECK && ! _LDOSBOOT32 && (_LBA_SKIP_ANY) 83 <3> %elif !ALL && ! _LBA_RETRY && (_RETRY_RESET) 86 <3> %elif !ALL && (_LBA_SKIP_LBA_RETRY) 88 <3> %else 89 <3> 90 <3> %if _FORCE_CHS 91 <3> %define %%identifier %[PREFIX]label_%1_chs 92 <3> %define %%identifierminusall label_%1_chs 93 <3> %define %%other %[PREFIX]label_%1_lba 94 <3> %else 95 <3> %define %%identifier %[PREFIX]label_%1_lba 96 <3> %define %%identifierminusall label_%1_lba 97 <3> %define %%other %[PREFIX]label_%1_chs 98 <3> %endif 99 <3> 100 <3> %%start: 101 <3> %[%%identifier %+ _search_string]: 102 <3> 103 <3> %if _LBA_SKIP_CHECK 104 <3> mov dl, [bp + 127] 105 <3> search_wildcard %%start, -1 106 <3> %else 107 <3> %if _LBA_WORKAROUND 108 <3> push ds 109 <3> mov bx, 40h 110 <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 <3> mov ah, 41h 116 <3> mov dl, [bp + 127] 117 <3> search_wildcard %%start, -1 118 <3> mov bx, 55AAh 119 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 <3> jc .no_lba 130 <3> search_wildcard %%start, -1 131 <3> cmp bx, 0AA55h 132 <3> jne .no_lba 133 <3> search_wildcard %%start, -1 134 <3> shr cl, 1 135 <3> jnc .no_lba 136 <3> search_wildcard %%start, -1 137 <3> %endif 138 <3> 139 <3> %if _LBA_RETRY 140 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 141 <3> stc 142 <3> %endif 143 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 <3> jnc .lba_done 151 <3> search_wildcard %%start, -1 152 <3> 153 <3> %if _RETRY_RESET 154 <3> xor ax, ax 155 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 <3> jc .lba_error 199 <3> search_wildcard %%start, -1 200 <3> %endif 201 <3> 202 <3> .lba_error: 203 <3> .lba_check_error_1: 204 <3> .lba_done: 205 <3> .no_lba: 206 <3> %%end: 207 <3> 208 <3> %if _FORCE_CHS 209 <3> %define %%message lba_search_msg.forcechs 210 <3> %else 211 <3> %if _LBA_SKIP_CHECK 212 <3> %define %%message lba_search_msg.autoskip 213 <3> %else 214 <3> %define %%message lba_search_msg.auto 215 <3> %endif 216 <3> %endif 217 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 219 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 220 <3> %defstr %%name %%identifierminusall 221 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 222 <3> %[%%identifier %+ _length]: equ %%end - %%start 223 <3> %if _FORCE_CHS 224 <3> %if %[%%identifier %+ _length] != %[%%other %+ _length] 225 <3> %error Expected same length of replacement 226 <3> %endif 227 <3> %endif 228 <3> 229 <3> %endif 359 <2> %assign variant variant + 1 361 <1> 362 <1> searchflag ldos, "_FORCE_CHS", 256 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 363 <1> searchflag ldos, "_LBA_SKIP_CHECK", 1 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 364 <1> searchflag ldos, "_LBA_SKIP_CY", 2 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 365 <1> searchflag ldos, "_LBA_SKIP_LBA_RETRY", 4 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 366 <1> searchflag ldos, "_LBA_SKIP_ANY", 8 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 367 <1> searchflag ldos, "_RETRY_RESET", 16 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 368 <1> searchflag ldos, "_LBA_RETRY", 32 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 369 <1> searchflag ldos, "_LBA_WORKAROUND", 64 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 370 <1> searchflag ldos, "_LDOSBOOT32", 128 32 <2> %ifn %1_SET 33 <2> %assign %1_SET 1 34 <2> %if any_SET 35 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw 0 36 <2> %else 37 <2> %assign any_SET 1 38 <2> %endif 39 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, %1_searchflags: 40 <2> %endif 41 <2> 42 <2> %xdefine SEARCHFLAGS SEARCHFLAGS, dw %3, dw %%name 43 <2> %xdefine METASTRINGS METASTRINGS, %%name:, {asciz %2} 371 <1> 372 <1> 373 <1> %[PREFIX]lba_search_strings_hdd: 374 <1> freedos_lba_search_string freedos_hdd, 0, 0, 1 233 <2> %define WILDCARDS dw "" 234 <2> %assign _FORCE_CHS %2 235 <2> %assign _OEM_BOOT %3 236 <2> %assign _FORCE_CHS_DISKETTE %4 237 <2> 238 <2> 239 <2> %if _FORCE_CHS_DISKETTE 240 <2> %define %%identifier %[PREFIX]label_%1_chs_diskette 241 <2> %define %%identifierminusall label_%1_chs_diskette 242 <2> %define %%other %[PREFIX]label_%1_special 243 <2> %elif _FORCE_CHS 244 <2> %define %%identifier %[PREFIX]label_%1_chs 245 <2> %define %%identifierminusall label_%1_chs 246 <2> %define %%other %[PREFIX]label_%1_lba 247 <2> %else 248 <2> %define %%identifier %[PREFIX]label_%1_lba 249 <2> %define %%identifierminusall label_%1_lba 250 <2> %define %%other %[PREFIX]label_%1_chs 251 <2> %endif 252 <2> 253 <2> %%start: 254 <2> %[%%identifier %+ _search_string]: 255 <2> 0 00001E1F B441 mov ah, 41h 0 00001E21 BBAA55 mov bx, 55AAh 0 00001E24 8A567F mov dl, [bp + 127] 259 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 260 <2> 261 <2> %if _FORCE_CHS 262 <2> xor dl, dl 263 <2> jz @F 264 <2> %elif _FORCE_CHS_DISKETTE 0 00001E27 84D2 test dl, dl 0 00001E29 7419 jz @F 267 <2> %else 268 <2> test dl, dl 269 <2> nop 270 <2> nop 271 <2> %endif 0 00001E2B CD13 int 13h 0 00001E2D 7215 jc @F 0 00001E2F D1E9 shr cx, 1 0 00001E31 81DB54AA sbb bx, 0AA55h - 1 0 00001E35 750D jne @F 277 <2> 278 <2> %if _OEM_BOOT 279 <2> lea si, [bp + 1023] 280 <2> search_wildcard %%start, -2 281 <2> search_wildcard %%start, -1 282 <2> mov word [bp + 1023], bx 283 <2> search_wildcard %%start, -2 284 <2> search_wildcard %%start, -1 285 <2> mov word [bp + 1023], bx 286 <2> search_wildcard %%start, -2 287 <2> search_wildcard %%start, -1 288 <2> %else 0 00001E37 8D7680 lea si, [bp - 128] 290 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001E3A 895E80 mov word [bp - 128], bx 292 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001E3D 895E80 mov word [bp - 128], bx 294 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 295 <2> %endif 0 00001E40 B442 mov ah, 42h 0 00001E42 EB00 jmp strict short @F 298 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 299 <2> @@: 300 <2> %%end: 301 <2> 302 <2> 303 <2> %if _FORCE_CHS 304 <2> %define %%message lba_search_msg.forcechs 305 <2> %else 306 <2> %if _FORCE_CHS_DISKETTE 307 <2> %define %%message lba_search_msg.autohdd 308 <2> %else 309 <2> %define %%message lba_search_msg.auto 310 <2> %endif 311 <2> %endif 312 <2> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 314 <2> %xdefine METASEARCHES METASEARCHES, dw %%metaname 315 <2> %xdefine METASEARCHES METASEARCHES, dw 32*1024 + !!%2 * 1 + !!%3 * 2 + !!%4 * 4 316 <2> %defstr %%name %%identifierminusall 317 <2> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 318 <2> %[%%identifier %+ _length]: equ %%end - %%start 319 <2> %if _FORCE_CHS 320 <2> %if %[%%identifier %+ _length] != %[%%other %+ _length] 321 <2> %error Expected same length of replacement 322 <2> %endif 323 <2> %endif 375 <1> freedos_lba_search_string freedos_hdd_oem, 0, 1, 1 233 <2> %define WILDCARDS dw "" 234 <2> %assign _FORCE_CHS %2 235 <2> %assign _OEM_BOOT %3 236 <2> %assign _FORCE_CHS_DISKETTE %4 237 <2> 238 <2> 239 <2> %if _FORCE_CHS_DISKETTE 240 <2> %define %%identifier %[PREFIX]label_%1_chs_diskette 241 <2> %define %%identifierminusall label_%1_chs_diskette 242 <2> %define %%other %[PREFIX]label_%1_special 243 <2> %elif _FORCE_CHS 244 <2> %define %%identifier %[PREFIX]label_%1_chs 245 <2> %define %%identifierminusall label_%1_chs 246 <2> %define %%other %[PREFIX]label_%1_lba 247 <2> %else 248 <2> %define %%identifier %[PREFIX]label_%1_lba 249 <2> %define %%identifierminusall label_%1_lba 250 <2> %define %%other %[PREFIX]label_%1_chs 251 <2> %endif 252 <2> 253 <2> %%start: 254 <2> %[%%identifier %+ _search_string]: 255 <2> 0 00001E44 B441 mov ah, 41h 0 00001E46 BBAA55 mov bx, 55AAh 0 00001E49 8A567F mov dl, [bp + 127] 259 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 260 <2> 261 <2> %if _FORCE_CHS 262 <2> xor dl, dl 263 <2> jz @F 264 <2> %elif _FORCE_CHS_DISKETTE 0 00001E4C 84D2 test dl, dl 0 00001E4E 741C jz @F 267 <2> %else 268 <2> test dl, dl 269 <2> nop 270 <2> nop 271 <2> %endif 0 00001E50 CD13 int 13h 0 00001E52 7218 jc @F 0 00001E54 D1E9 shr cx, 1 0 00001E56 81DB54AA sbb bx, 0AA55h - 1 0 00001E5A 7510 jne @F 277 <2> 278 <2> %if _OEM_BOOT 0 00001E5C 8DB6FF03 lea si, [bp + 1023] 280 <2> search_wildcard %%start, -2 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 281 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001E60 899EFF03 mov word [bp + 1023], bx 283 <2> search_wildcard %%start, -2 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 284 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 00001E64 899EFF03 mov word [bp + 1023], bx 286 <2> search_wildcard %%start, -2 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 287 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 288 <2> %else 289 <2> lea si, [bp - 128] 290 <2> search_wildcard %%start, -1 291 <2> mov word [bp - 128], bx 292 <2> search_wildcard %%start, -1 293 <2> mov word [bp - 128], bx 294 <2> search_wildcard %%start, -1 295 <2> %endif 0 00001E68 B442 mov ah, 42h 0 00001E6A EB00 jmp strict short @F 298 <2> search_wildcard %%start, -1 48 <3> %assign %%wc $ + %2 - %1 49 <3> %if %%wc == 0 50 <3> %error Wildcard at beginning of search string is not allowed 51 <3> %endif 52 <3> %xdefine WILDCARDS WILDCARDS, dw %%wc 299 <2> @@: 300 <2> %%end: 301 <2> 302 <2> 303 <2> %if _FORCE_CHS 304 <2> %define %%message lba_search_msg.forcechs 305 <2> %else 306 <2> %if _FORCE_CHS_DISKETTE 307 <2> %define %%message lba_search_msg.autohdd 308 <2> %else 309 <2> %define %%message lba_search_msg.auto 310 <2> %endif 311 <2> %endif 312 <2> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%other, WILDCARDS, dw 0 314 <2> %xdefine METASEARCHES METASEARCHES, dw %%metaname 315 <2> %xdefine METASEARCHES METASEARCHES, dw 32*1024 + !!%2 * 1 + !!%3 * 2 + !!%4 * 4 316 <2> %defstr %%name %%identifierminusall 317 <2> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 318 <2> %[%%identifier %+ _length]: equ %%end - %%start 319 <2> %if _FORCE_CHS 320 <2> %if %[%%identifier %+ _length] != %[%%other %+ _length] 321 <2> %error Expected same length of replacement 322 <2> %endif 323 <2> %endif 376 <1> %[PREFIX]lba_search_strings_end: 377 <1> 378 <1> %ifn %[PREFIX]label_freedos_chs_length == %[PREFIX]label_freedos_hdd_chs_diskette_length 379 <1> %error Expected same length of replacement 380 <1> %endif 381 <1> %ifn %[PREFIX]label_freedos_lba_length == %[PREFIX]label_freedos_hdd_chs_diskette_length 382 <1> %error Expected same length of replacement 383 <1> %endif 384 <1> %ifn %[PREFIX]label_freedos_oem_chs_length == %[PREFIX]label_freedos_hdd_oem_chs_diskette_length 385 <1> %error Expected same length of replacement 386 <1> %endif 387 <1> %ifn %[PREFIX]label_freedos_oem_lba_length == %[PREFIX]label_freedos_hdd_oem_chs_diskette_length 388 <1> %error Expected same length of replacement 389 <1> %endif 390 <1> 391 <1> 392 <1> align 2, db 0 393 <1> %[PREFIX]label_hdd_special: 394 <1> 395 <1> %[PREFIX]label_freedos_hdd_special: 0 00001E6C [6220] dw %[PREFIX]label_freedos_hdd_chs_diskette 0 00001E6E [F01E] dw %[PREFIX]label_freedos_chs 0 00001E70 [7E1D] dw %[PREFIX]label_freedos_lba 399 <1> 400 <1> %[PREFIX]label_freedos_hdd_oem_special: 0 00001E72 [7620] dw %[PREFIX]label_freedos_hdd_oem_chs_diskette 0 00001E74 [041F] dw %[PREFIX]label_freedos_oem_chs 0 00001E76 [921D] dw %[PREFIX]label_freedos_oem_lba 404 <1> 0 00001E78 000000000000 dw 0,0,0 406 <1> 407 <1> 408 <1> %macro dumpsearches 1-* 409 <1> %rep %0 410 <1> %1 411 <1> %rotate 1 412 <1> %endrep 413 <1> %endmacro 414 <1> 415 <1> align 2, db 0 416 <1> %[PREFIX]lba_search_metadata: 417 <1> dumpsearches SEARCHES 409 <2> %rep %0 410 <2> %1 411 <2> %rotate 1 412 <2> %endrep 410 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001E7E [B718] %1 411 <3> %rotate 1 0 00001E80 2500 %1 411 <3> %rotate 1 0 00001E82 [5418] %1 411 <3> %rotate 1 0 00001E84 [F01E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001E86 0700 %1 411 <3> %rotate 1 0 00001E88 1A00 %1 411 <3> %rotate 1 0 00001E8A 1D00 %1 411 <3> %rotate 1 0 00001E8C 2000 %1 411 <3> %rotate 1 0 00001E8E 2400 %1 411 <3> %rotate 1 0 00001E90 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001E92 [DC18] %1 411 <3> %rotate 1 0 00001E94 2800 %1 411 <3> %rotate 1 0 00001E96 [5418] %1 411 <3> %rotate 1 0 00001E98 [041F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001E9A 0700 %1 411 <3> %rotate 1 0 00001E9C 1A00 %1 411 <3> %rotate 1 0 00001E9E 1B00 %1 411 <3> %rotate 1 0 00001EA0 1E00 %1 411 <3> %rotate 1 0 00001EA2 1F00 %1 411 <3> %rotate 1 0 00001EA4 2200 %1 411 <3> %rotate 1 0 00001EA6 2300 %1 411 <3> %rotate 1 0 00001EA8 2700 %1 411 <3> %rotate 1 0 00001EAA 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EAC [0419] %1 411 <3> %rotate 1 0 00001EAE 1D00 %1 411 <3> %rotate 1 0 00001EB0 [5418] %1 411 <3> %rotate 1 0 00001EB2 [1E1F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EB4 0400 %1 411 <3> %rotate 1 0 00001EB6 0C00 %1 411 <3> %rotate 1 0 00001EB8 1200 %1 411 <3> %rotate 1 0 00001EBA 1600 %1 411 <3> %rotate 1 0 00001EBC 1C00 %1 411 <3> %rotate 1 0 00001EBE 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EC0 [2119] %1 411 <3> %rotate 1 0 00001EC2 0900 %1 411 <3> %rotate 1 0 00001EC4 [8518] %1 411 <3> %rotate 1 0 00001EC6 [321F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EC8 0200 %1 411 <3> %rotate 1 0 00001ECA 0800 %1 411 <3> %rotate 1 0 00001ECC 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001ECE [2A19] %1 411 <3> %rotate 1 0 00001ED0 0A00 %1 411 <3> %rotate 1 0 00001ED2 [8518] %1 411 <3> %rotate 1 0 00001ED4 [401F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001ED6 0200 %1 411 <3> %rotate 1 0 00001ED8 0900 %1 411 <3> %rotate 1 0 00001EDA 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EDC [3419] %1 411 <3> %rotate 1 0 00001EDE 2700 %1 411 <3> %rotate 1 0 00001EE0 [5418] %1 411 <3> %rotate 1 0 00001EE2 [4E1F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EE4 0400 %1 411 <3> %rotate 1 0 00001EE6 0C00 %1 411 <3> %rotate 1 0 00001EE8 1200 %1 411 <3> %rotate 1 0 00001EEA 1600 %1 411 <3> %rotate 1 0 00001EEC 1C00 %1 411 <3> %rotate 1 0 00001EEE 2600 %1 411 <3> %rotate 1 0 00001EF0 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EF2 [5B19] %1 411 <3> %rotate 1 0 00001EF4 1300 %1 411 <3> %rotate 1 0 00001EF6 [8518] %1 411 <3> %rotate 1 0 00001EF8 [641F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001EFA 0200 %1 411 <3> %rotate 1 0 00001EFC 0800 %1 411 <3> %rotate 1 0 00001EFE 1200 %1 411 <3> %rotate 1 0 00001F00 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F02 [6E19] %1 411 <3> %rotate 1 0 00001F04 1500 %1 411 <3> %rotate 1 0 00001F06 [8518] %1 411 <3> %rotate 1 0 00001F08 [741F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F0A 0200 %1 411 <3> %rotate 1 0 00001F0C 0900 %1 411 <3> %rotate 1 0 00001F0E 1400 %1 411 <3> %rotate 1 0 00001F10 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F12 [8319] %1 411 <3> %rotate 1 0 00001F14 2B00 %1 411 <3> %rotate 1 0 00001F16 [5418] %1 411 <3> %rotate 1 0 00001F18 [841F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F1A 0400 %1 411 <3> %rotate 1 0 00001F1C 0C00 %1 411 <3> %rotate 1 0 00001F1E 1200 %1 411 <3> %rotate 1 0 00001F20 1600 %1 411 <3> %rotate 1 0 00001F22 1C00 %1 411 <3> %rotate 1 0 00001F24 2A00 %1 411 <3> %rotate 1 0 00001F26 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F28 [AE19] %1 411 <3> %rotate 1 0 00001F2A 1700 %1 411 <3> %rotate 1 0 00001F2C [8518] %1 411 <3> %rotate 1 0 00001F2E [9A1F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F30 0200 %1 411 <3> %rotate 1 0 00001F32 0800 %1 411 <3> %rotate 1 0 00001F34 1600 %1 411 <3> %rotate 1 0 00001F36 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F38 [C519] %1 411 <3> %rotate 1 0 00001F3A 1900 %1 411 <3> %rotate 1 0 00001F3C [8518] %1 411 <3> %rotate 1 0 00001F3E [AA1F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F40 0200 %1 411 <3> %rotate 1 0 00001F42 0900 %1 411 <3> %rotate 1 0 00001F44 1800 %1 411 <3> %rotate 1 0 00001F46 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F48 [DE19] %1 411 <3> %rotate 1 0 00001F4A 2400 %1 411 <3> %rotate 1 0 00001F4C [5418] %1 411 <3> %rotate 1 0 00001F4E [BA1F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F50 0A00 %1 411 <3> %rotate 1 0 00001F52 1300 %1 411 <3> %rotate 1 0 00001F54 1900 %1 411 <3> %rotate 1 0 00001F56 1D00 %1 411 <3> %rotate 1 0 00001F58 2300 %1 411 <3> %rotate 1 0 00001F5A 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F5C [021A] %1 411 <3> %rotate 1 0 00001F5E 2E00 %1 411 <3> %rotate 1 0 00001F60 [5418] %1 411 <3> %rotate 1 0 00001F62 [CE1F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F64 0A00 %1 411 <3> %rotate 1 0 00001F66 1300 %1 411 <3> %rotate 1 0 00001F68 1900 %1 411 <3> %rotate 1 0 00001F6A 1D00 %1 411 <3> %rotate 1 0 00001F6C 2300 %1 411 <3> %rotate 1 0 00001F6E 2D00 %1 411 <3> %rotate 1 0 00001F70 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F72 [301A] %1 411 <3> %rotate 1 0 00001F74 3200 %1 411 <3> %rotate 1 0 00001F76 [5418] %1 411 <3> %rotate 1 0 00001F78 [E41F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F7A 0A00 %1 411 <3> %rotate 1 0 00001F7C 1300 %1 411 <3> %rotate 1 0 00001F7E 1900 %1 411 <3> %rotate 1 0 00001F80 1D00 %1 411 <3> %rotate 1 0 00001F82 2300 %1 411 <3> %rotate 1 0 00001F84 3100 %1 411 <3> %rotate 1 0 00001F86 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F88 [621A] %1 411 <3> %rotate 1 0 00001F8A 0E00 %1 411 <3> %rotate 1 0 00001F8C [8518] %1 411 <3> %rotate 1 0 00001F8E [FA1F] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F90 0200 %1 411 <3> %rotate 1 0 00001F92 0800 %1 411 <3> %rotate 1 0 00001F94 0D00 %1 411 <3> %rotate 1 0 00001F96 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001F98 [701A] %1 411 <3> %rotate 1 0 00001F9A 0F00 %1 411 <3> %rotate 1 0 00001F9C [8518] %1 411 <3> %rotate 1 0 00001F9E [0A20] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FA0 0200 %1 411 <3> %rotate 1 0 00001FA2 0900 %1 411 <3> %rotate 1 0 00001FA4 0E00 %1 411 <3> %rotate 1 0 00001FA6 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FA8 [7F1A] %1 411 <3> %rotate 1 0 00001FAA 1800 %1 411 <3> %rotate 1 0 00001FAC [8518] %1 411 <3> %rotate 1 0 00001FAE [1A20] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FB0 0200 %1 411 <3> %rotate 1 0 00001FB2 0800 %1 411 <3> %rotate 1 0 00001FB4 1200 %1 411 <3> %rotate 1 0 00001FB6 1700 %1 411 <3> %rotate 1 0 00001FB8 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FBA [971A] %1 411 <3> %rotate 1 0 00001FBC 1A00 %1 411 <3> %rotate 1 0 00001FBE [8518] %1 411 <3> %rotate 1 0 00001FC0 [2C20] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FC2 0200 %1 411 <3> %rotate 1 0 00001FC4 0900 %1 411 <3> %rotate 1 0 00001FC6 1400 %1 411 <3> %rotate 1 0 00001FC8 1900 %1 411 <3> %rotate 1 0 00001FCA 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FCC [B11A] %1 411 <3> %rotate 1 0 00001FCE 1C00 %1 411 <3> %rotate 1 0 00001FD0 [8518] %1 411 <3> %rotate 1 0 00001FD2 [3E20] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FD4 0200 %1 411 <3> %rotate 1 0 00001FD6 0800 %1 411 <3> %rotate 1 0 00001FD8 1600 %1 411 <3> %rotate 1 0 00001FDA 1B00 %1 411 <3> %rotate 1 0 00001FDC 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FDE [CD1A] %1 411 <3> %rotate 1 0 00001FE0 1E00 %1 411 <3> %rotate 1 0 00001FE2 [8518] %1 411 <3> %rotate 1 0 00001FE4 [5020] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FE6 0200 %1 411 <3> %rotate 1 0 00001FE8 0900 %1 411 <3> %rotate 1 0 00001FEA 1800 %1 411 <3> %rotate 1 0 00001FEC 1D00 %1 411 <3> %rotate 1 0 00001FEE 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FF0 [EB1A] %1 411 <3> %rotate 1 0 00001FF2 2500 %1 411 <3> %rotate 1 0 00001FF4 [A518] %1 411 <3> %rotate 1 0 00001FF6 [7E1D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00001FF8 0700 %1 411 <3> %rotate 1 0 00001FFA 1A00 %1 411 <3> %rotate 1 0 00001FFC 1D00 %1 411 <3> %rotate 1 0 00001FFE 2000 %1 411 <3> %rotate 1 0 00002000 2400 %1 411 <3> %rotate 1 0 00002002 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002004 [101B] %1 411 <3> %rotate 1 0 00002006 2800 %1 411 <3> %rotate 1 0 00002008 [A518] %1 411 <3> %rotate 1 0 0000200A [921D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000200C 0700 %1 411 <3> %rotate 1 0 0000200E 1A00 %1 411 <3> %rotate 1 0 00002010 1B00 %1 411 <3> %rotate 1 0 00002012 1E00 %1 411 <3> %rotate 1 0 00002014 1F00 %1 411 <3> %rotate 1 0 00002016 2200 %1 411 <3> %rotate 1 0 00002018 2300 %1 411 <3> %rotate 1 0 0000201A 2700 %1 411 <3> %rotate 1 0 0000201C 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000201E [381B] %1 411 <3> %rotate 1 0 00002020 1D00 %1 411 <3> %rotate 1 0 00002022 [A518] %1 411 <3> %rotate 1 0 00002024 [AC1D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002026 0400 %1 411 <3> %rotate 1 0 00002028 0C00 %1 411 <3> %rotate 1 0 0000202A 1200 %1 411 <3> %rotate 1 0 0000202C 1600 %1 411 <3> %rotate 1 0 0000202E 1C00 %1 411 <3> %rotate 1 0 00002030 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002032 [551B] %1 411 <3> %rotate 1 0 00002034 0900 %1 411 <3> %rotate 1 0 00002036 [A518] %1 411 <3> %rotate 1 0 00002038 [C01D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000203A 0200 %1 411 <3> %rotate 1 0 0000203C 0800 %1 411 <3> %rotate 1 0 0000203E 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002040 [5E1B] %1 411 <3> %rotate 1 0 00002042 0A00 %1 411 <3> %rotate 1 0 00002044 [A518] %1 411 <3> %rotate 1 0 00002046 [CE1D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002048 0200 %1 411 <3> %rotate 1 0 0000204A 0900 %1 411 <3> %rotate 1 0 0000204C 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000204E [681B] %1 411 <3> %rotate 1 0 00002050 2700 %1 411 <3> %rotate 1 0 00002052 [A518] %1 411 <3> %rotate 1 0 00002054 [DC1D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002056 0400 %1 411 <3> %rotate 1 0 00002058 0C00 %1 411 <3> %rotate 1 0 0000205A 1200 %1 411 <3> %rotate 1 0 0000205C 1600 %1 411 <3> %rotate 1 0 0000205E 1C00 %1 411 <3> %rotate 1 0 00002060 2600 %1 411 <3> %rotate 1 0 00002062 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002064 [8F1B] %1 411 <3> %rotate 1 0 00002066 1300 %1 411 <3> %rotate 1 0 00002068 [A518] %1 411 <3> %rotate 1 0 0000206A [F21D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000206C 0200 %1 411 <3> %rotate 1 0 0000206E 0800 %1 411 <3> %rotate 1 0 00002070 1200 %1 411 <3> %rotate 1 0 00002072 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002074 [A21B] %1 411 <3> %rotate 1 0 00002076 1500 %1 411 <3> %rotate 1 0 00002078 [A518] %1 411 <3> %rotate 1 0 0000207A [021E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000207C 0200 %1 411 <3> %rotate 1 0 0000207E 0900 %1 411 <3> %rotate 1 0 00002080 1400 %1 411 <3> %rotate 1 0 00002082 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002084 [B71B] %1 411 <3> %rotate 1 0 00002086 2B00 %1 411 <3> %rotate 1 0 00002088 [A518] %1 411 <3> %rotate 1 0 0000208A [121E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000208C 0400 %1 411 <3> %rotate 1 0 0000208E 0C00 %1 411 <3> %rotate 1 0 00002090 1200 %1 411 <3> %rotate 1 0 00002092 1600 %1 411 <3> %rotate 1 0 00002094 1C00 %1 411 <3> %rotate 1 0 00002096 2A00 %1 411 <3> %rotate 1 0 00002098 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000209A [E21B] %1 411 <3> %rotate 1 0 0000209C 1700 %1 411 <3> %rotate 1 0 0000209E [A518] %1 411 <3> %rotate 1 0 000020A0 [281E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020A2 0200 %1 411 <3> %rotate 1 0 000020A4 0800 %1 411 <3> %rotate 1 0 000020A6 1600 %1 411 <3> %rotate 1 0 000020A8 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020AA [F91B] %1 411 <3> %rotate 1 0 000020AC 1900 %1 411 <3> %rotate 1 0 000020AE [A518] %1 411 <3> %rotate 1 0 000020B0 [381E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020B2 0200 %1 411 <3> %rotate 1 0 000020B4 0900 %1 411 <3> %rotate 1 0 000020B6 1800 %1 411 <3> %rotate 1 0 000020B8 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020BA [121C] %1 411 <3> %rotate 1 0 000020BC 2400 %1 411 <3> %rotate 1 0 000020BE [A518] %1 411 <3> %rotate 1 0 000020C0 [481E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020C2 0A00 %1 411 <3> %rotate 1 0 000020C4 1300 %1 411 <3> %rotate 1 0 000020C6 1900 %1 411 <3> %rotate 1 0 000020C8 1D00 %1 411 <3> %rotate 1 0 000020CA 2300 %1 411 <3> %rotate 1 0 000020CC 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020CE [361C] %1 411 <3> %rotate 1 0 000020D0 2E00 %1 411 <3> %rotate 1 0 000020D2 [A518] %1 411 <3> %rotate 1 0 000020D4 [5C1E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020D6 0A00 %1 411 <3> %rotate 1 0 000020D8 1300 %1 411 <3> %rotate 1 0 000020DA 1900 %1 411 <3> %rotate 1 0 000020DC 1D00 %1 411 <3> %rotate 1 0 000020DE 2300 %1 411 <3> %rotate 1 0 000020E0 2D00 %1 411 <3> %rotate 1 0 000020E2 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020E4 [641C] %1 411 <3> %rotate 1 0 000020E6 3200 %1 411 <3> %rotate 1 0 000020E8 [A518] %1 411 <3> %rotate 1 0 000020EA [721E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020EC 0A00 %1 411 <3> %rotate 1 0 000020EE 1300 %1 411 <3> %rotate 1 0 000020F0 1900 %1 411 <3> %rotate 1 0 000020F2 1D00 %1 411 <3> %rotate 1 0 000020F4 2300 %1 411 <3> %rotate 1 0 000020F6 3100 %1 411 <3> %rotate 1 0 000020F8 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 000020FA [961C] %1 411 <3> %rotate 1 0 000020FC 0E00 %1 411 <3> %rotate 1 0 000020FE [A518] %1 411 <3> %rotate 1 0 00002100 [881E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002102 0200 %1 411 <3> %rotate 1 0 00002104 0800 %1 411 <3> %rotate 1 0 00002106 0D00 %1 411 <3> %rotate 1 0 00002108 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000210A [A41C] %1 411 <3> %rotate 1 0 0000210C 0F00 %1 411 <3> %rotate 1 0 0000210E [A518] %1 411 <3> %rotate 1 0 00002110 [981E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002112 0200 %1 411 <3> %rotate 1 0 00002114 0900 %1 411 <3> %rotate 1 0 00002116 0E00 %1 411 <3> %rotate 1 0 00002118 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000211A [B31C] %1 411 <3> %rotate 1 0 0000211C 1800 %1 411 <3> %rotate 1 0 0000211E [A518] %1 411 <3> %rotate 1 0 00002120 [A81E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002122 0200 %1 411 <3> %rotate 1 0 00002124 0800 %1 411 <3> %rotate 1 0 00002126 1200 %1 411 <3> %rotate 1 0 00002128 1700 %1 411 <3> %rotate 1 0 0000212A 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000212C [CB1C] %1 411 <3> %rotate 1 0 0000212E 1A00 %1 411 <3> %rotate 1 0 00002130 [A518] %1 411 <3> %rotate 1 0 00002132 [BA1E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002134 0200 %1 411 <3> %rotate 1 0 00002136 0900 %1 411 <3> %rotate 1 0 00002138 1400 %1 411 <3> %rotate 1 0 0000213A 1900 %1 411 <3> %rotate 1 0 0000213C 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000213E [E51C] %1 411 <3> %rotate 1 0 00002140 1C00 %1 411 <3> %rotate 1 0 00002142 [A518] %1 411 <3> %rotate 1 0 00002144 [CC1E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002146 0200 %1 411 <3> %rotate 1 0 00002148 0800 %1 411 <3> %rotate 1 0 0000214A 1600 %1 411 <3> %rotate 1 0 0000214C 1B00 %1 411 <3> %rotate 1 0 0000214E 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002150 [011D] %1 411 <3> %rotate 1 0 00002152 1E00 %1 411 <3> %rotate 1 0 00002154 [A518] %1 411 <3> %rotate 1 0 00002156 [DE1E] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002158 0200 %1 411 <3> %rotate 1 0 0000215A 0900 %1 411 <3> %rotate 1 0 0000215C 1800 %1 411 <3> %rotate 1 0 0000215E 1D00 %1 411 <3> %rotate 1 0 00002160 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002162 [1F1D] %1 411 <3> %rotate 1 0 00002164 2500 %1 411 <3> %rotate 1 0 00002166 [6718] %1 411 <3> %rotate 1 0 00002168 [6C1D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000216A 0700 %1 411 <3> %rotate 1 0 0000216C 1A00 %1 411 <3> %rotate 1 0 0000216E 1D00 %1 411 <3> %rotate 1 0 00002170 2000 %1 411 <3> %rotate 1 0 00002172 2400 %1 411 <3> %rotate 1 0 00002174 0000 %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 00002176 [441D] %1 411 <3> %rotate 1 0 00002178 2800 %1 411 <3> %rotate 1 0 0000217A [6718] %1 411 <3> %rotate 1 0 0000217C [721D] %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 0 0000217E 0700 %1 411 <3> %rotate 1 0 00002180 1A00 %1 411 <3> %rotate 1 0 00002182 1B00 %1 411 <3> %rotate 1 0 00002184 1E00 %1 411 <3> %rotate 1 0 00002186 1F00 %1 411 <3> %rotate 1 0 00002188 2200 %1 411 <3> %rotate 1 0 0000218A 2300 %1 411 <3> %rotate 1 0 0000218C 2700 %1 411 <3> %rotate 1 0 0000218E 0000 %1 411 <3> %rotate 1 0 00002190 00000000 dw 0,0 3993 3994 3995 %assign ALL 0 3996 %define PREFIX 3997 %include "typesuch.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> typesuch.asm - Type search strings for instsect 5 <1> 2024 by 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> 16 <1> %unmacro searchflag 3 17 <1> %unmacro search_wildcard 1-2 0 18 <1> %unmacro type_search_string 2 19 <1> %unmacro dumpsearches 1-* 20 <1> 21 <1> 22 <1> %define SEARCHES dw "" 23 <1> %define STRINGS db "" 24 <1> %define METASEARCHES dw "" 25 <1> %define METASTRINGS dw "" 26 <1> %define SEARCHFLAGS dw "" 27 <1> 28 <1> 29 <1> %macro search_wildcard 1-2 0 30 <1> %assign %%wc $ + %2 - %1 31 <1> %if %%wc == 0 32 <1> %error Wildcard at beginning of search string is not allowed 33 <1> %endif 34 <1> %xdefine WILDCARDS WILDCARDS, dw %%wc 35 <1> %endmacro 36 <1> 37 <1> %macro type_search_string 2 38 <1> %define WILDCARDS dw "" 39 <1> 40 <1> %define %%identifier %[PREFIX]label_%1_type 41 <1> %define %%identifierminusall label_%1_type 42 <1> 43 <1> %define %%extra 0 44 <1> 45 <1> %%start: 46 <1> %[%%identifier %+ _search_string]: 47 <1> 48 <1> %if %2 == 0 49 <1> jmp 200h:400h 50 <1> %define %%messagestring "lDOS (new)" 51 <1> %elif %2 == 1 52 <1> jmp 70h:400h 53 <1> %define %%messagestring "lDOS (old)" 54 <1> %elif %2 == 2 55 <1> jmp 70h:200h 56 <1> %define %%messagestring "MS-DOS v7" 57 <1> %elif %2 == 3 58 <1> jmp 70h:0 59 <1> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <1> %elif %2 == 4 61 <1> jmp 1FE0h:0 62 <1> search_wildcard %%start, -4 63 <1> search_wildcard %%start, -3 64 <1> dw 0 65 <1> dw 60h 66 <1> %define %%messagestring "FreeDOS (FreeDOS)" 67 <1> %elif %2 == 5 68 <1> jmp 1FE0h:0 69 <1> search_wildcard %%start, -4 70 <1> search_wildcard %%start, -3 71 <1> dw 0 72 <1> dw 70h 73 <1> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <1> %elif %2 == 6 75 <1> jmp 1FE0h:0 76 <1> search_wildcard %%start, -4 77 <1> search_wildcard %%start, -3 78 <1> dw 0 79 <1> %define %%messagestring "FreeDOS (other)" 80 <1> %elif %2 == 7 81 <1> jmp 60h:0 82 <1> %define %%messagestring "lDOS (FreeDOS)" 83 <1> %else 84 <1> %error Unexpected parameter 85 <1> %endif 86 <1> %%end: 87 <1> 88 <1> 89 <1> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <1> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <1> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <1> %defstr %%name %%identifierminusall 94 <1> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <1> %[%%identifier %+ _length]: equ %%end - %%start 96 <1> 97 <1> %endmacro 98 <1> 99 <1> 100 <1> %assign variant 0 101 <1> %rep 8 102 <1> %assign identifier variant 103 <1> type_search_string identifier, variant 104 <1> %assign variant variant + 1 105 <1> %endrep 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 0 00002194 EA00040002 jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 <3> jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 63 <3> search_wildcard %%start, -3 64 <3> dw 0 65 <3> dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 68 <3> jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 70 <3> search_wildcard %%start, -3 71 <3> dw 0 72 <3> dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 75 <3> jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 77 <3> search_wildcard %%start, -3 78 <3> dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 81 <3> jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 49 <3> jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 0 00002199 EA00047000 jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 <3> jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 63 <3> search_wildcard %%start, -3 64 <3> dw 0 65 <3> dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 68 <3> jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 70 <3> search_wildcard %%start, -3 71 <3> dw 0 72 <3> dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 75 <3> jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 77 <3> search_wildcard %%start, -3 78 <3> dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 81 <3> jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 49 <3> jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 0 0000219E EA00027000 jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 <3> jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 63 <3> search_wildcard %%start, -3 64 <3> dw 0 65 <3> dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 68 <3> jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 70 <3> search_wildcard %%start, -3 71 <3> dw 0 72 <3> dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 75 <3> jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 77 <3> search_wildcard %%start, -3 78 <3> dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 81 <3> jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 49 <3> jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 0 000021A3 EA00007000 jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 <3> jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 63 <3> search_wildcard %%start, -3 64 <3> dw 0 65 <3> dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 68 <3> jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 70 <3> search_wildcard %%start, -3 71 <3> dw 0 72 <3> dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 75 <3> jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 77 <3> search_wildcard %%start, -3 78 <3> dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 81 <3> jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 49 <3> jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 0 000021A8 EA0000E01F jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 30 <4> %assign %%wc $ + %2 - %1 31 <4> %if %%wc == 0 32 <4> %error Wildcard at beginning of search string is not allowed 33 <4> %endif 34 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 63 <3> search_wildcard %%start, -3 30 <4> %assign %%wc $ + %2 - %1 31 <4> %if %%wc == 0 32 <4> %error Wildcard at beginning of search string is not allowed 33 <4> %endif 34 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 000021AD 0000 dw 0 0 000021AF 6000 dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 68 <3> jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 70 <3> search_wildcard %%start, -3 71 <3> dw 0 72 <3> dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 75 <3> jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 77 <3> search_wildcard %%start, -3 78 <3> dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 81 <3> jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 49 <3> jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 <3> jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 63 <3> search_wildcard %%start, -3 64 <3> dw 0 65 <3> dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 0 000021B1 EA0000E01F jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 30 <4> %assign %%wc $ + %2 - %1 31 <4> %if %%wc == 0 32 <4> %error Wildcard at beginning of search string is not allowed 33 <4> %endif 34 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 70 <3> search_wildcard %%start, -3 30 <4> %assign %%wc $ + %2 - %1 31 <4> %if %%wc == 0 32 <4> %error Wildcard at beginning of search string is not allowed 33 <4> %endif 34 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 000021B6 0000 dw 0 0 000021B8 7000 dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 75 <3> jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 77 <3> search_wildcard %%start, -3 78 <3> dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 81 <3> jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 49 <3> jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 <3> jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 63 <3> search_wildcard %%start, -3 64 <3> dw 0 65 <3> dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 68 <3> jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 70 <3> search_wildcard %%start, -3 71 <3> dw 0 72 <3> dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 0 000021BA EA0000E01F jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 30 <4> %assign %%wc $ + %2 - %1 31 <4> %if %%wc == 0 32 <4> %error Wildcard at beginning of search string is not allowed 33 <4> %endif 34 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 77 <3> search_wildcard %%start, -3 30 <4> %assign %%wc $ + %2 - %1 31 <4> %if %%wc == 0 32 <4> %error Wildcard at beginning of search string is not allowed 33 <4> %endif 34 <4> %xdefine WILDCARDS WILDCARDS, dw %%wc 0 000021BF 0000 dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 81 <3> jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 102 <2> %assign identifier variant 103 <2> type_search_string identifier, variant 38 <3> %define WILDCARDS dw "" 39 <3> 40 <3> %define %%identifier %[PREFIX]label_%1_type 41 <3> %define %%identifierminusall label_%1_type 42 <3> 43 <3> %define %%extra 0 44 <3> 45 <3> %%start: 46 <3> %[%%identifier %+ _search_string]: 47 <3> 48 <3> %if %2 == 0 49 <3> jmp 200h:400h 50 <3> %define %%messagestring "lDOS (new)" 51 <3> %elif %2 == 1 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 <3> jmp 1FE0h:0 62 <3> search_wildcard %%start, -4 63 <3> search_wildcard %%start, -3 64 <3> dw 0 65 <3> dw 60h 66 <3> %define %%messagestring "FreeDOS (FreeDOS)" 67 <3> %elif %2 == 5 68 <3> jmp 1FE0h:0 69 <3> search_wildcard %%start, -4 70 <3> search_wildcard %%start, -3 71 <3> dw 0 72 <3> dw 70h 73 <3> %define %%messagestring "FreeDOS (Enhanced DR-DOS)" 74 <3> %elif %2 == 6 75 <3> jmp 1FE0h:0 76 <3> search_wildcard %%start, -4 77 <3> search_wildcard %%start, -3 78 <3> dw 0 79 <3> %define %%messagestring "FreeDOS (other)" 80 <3> %elif %2 == 7 0 000021C1 EA00006000 jmp 60h:0 82 <3> %define %%messagestring "lDOS (FreeDOS)" 83 <3> %else 84 <3> %error Unexpected parameter 85 <3> %endif 86 <3> %%end: 87 <3> 88 <3> 89 <3> %xdefine STRINGS STRINGS, %%message:, {asciz %%messagestring} 90 <3> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw %%message, dw %%extra, WILDCARDS, dw 0 92 <3> %xdefine METASEARCHES METASEARCHES, dw %%metaname, dw variant 93 <3> %defstr %%name %%identifierminusall 94 <3> %xdefine METASTRINGS METASTRINGS, %%metaname:, {asciz %%name} 95 <3> %[%%identifier %+ _length]: equ %%end - %%start 96 <3> 104 <2> %assign variant variant + 1 106 <1> 107 <1> 108 <1> %macro dumpsearches 1-* 109 <1> %rep %0 110 <1> %1 111 <1> %rotate 1 112 <1> %endrep 113 <1> %endmacro 114 <1> 115 <1> dumpsearches STRINGS 109 <2> %rep %0 110 <2> %1 111 <2> %rotate 1 112 <2> %endrep 110 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 000021C6 6C444F5320286E6577 %1 0 000021CF 2900 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 000021D1 6C444F5320286F6C64 %1 0 000021DA 2900 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 000021DC 4D532D444F53207637 %1 0 000021E5 00 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 000021E6 4D532D444F53207636 %1 0 000021EF 202F2049424D2D444F 0 000021F8 53202F206C444F5320 0 00002201 284544522D444F5329 0 0000220A 00 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000220B 46726565444F532028 %1 0 00002214 46726565444F532900 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000221D 46726565444F532028 %1 0 00002226 456E68616E63656420 0 0000222F 44522D444F532900 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002237 46726565444F532028 %1 0 00002240 6F746865722900 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002247 6C444F532028467265 %1 0 00002250 65444F532900 111 <3> %rotate 1 116 <1> 117 <1> align 2, db 0 118 <1> %[PREFIX]type_search_metadata: 119 <1> dumpsearches SEARCHES 109 <2> %rep %0 110 <2> %1 111 <2> %rotate 1 112 <2> %endrep 110 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002256 [9420] %1 111 <3> %rotate 1 0 00002258 0500 %1 111 <3> %rotate 1 0 0000225A [C620] %1 111 <3> %rotate 1 0 0000225C 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000225E 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002260 [9920] %1 111 <3> %rotate 1 0 00002262 0500 %1 111 <3> %rotate 1 0 00002264 [D120] %1 111 <3> %rotate 1 0 00002266 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002268 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000226A [9E20] %1 111 <3> %rotate 1 0 0000226C 0500 %1 111 <3> %rotate 1 0 0000226E [DC20] %1 111 <3> %rotate 1 0 00002270 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002272 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002274 [A320] %1 111 <3> %rotate 1 0 00002276 0500 %1 111 <3> %rotate 1 0 00002278 [E620] %1 111 <3> %rotate 1 0 0000227A 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000227C 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000227E [A820] %1 111 <3> %rotate 1 0 00002280 0900 %1 111 <3> %rotate 1 0 00002282 [0B21] %1 111 <3> %rotate 1 0 00002284 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002286 0100 %1 111 <3> %rotate 1 0 00002288 0200 %1 111 <3> %rotate 1 0 0000228A 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000228C [B120] %1 111 <3> %rotate 1 0 0000228E 0900 %1 111 <3> %rotate 1 0 00002290 [1D21] %1 111 <3> %rotate 1 0 00002292 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 00002294 0100 %1 111 <3> %rotate 1 0 00002296 0200 %1 111 <3> %rotate 1 0 00002298 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 0000229A [BA20] %1 111 <3> %rotate 1 0 0000229C 0700 %1 111 <3> %rotate 1 0 0000229E [3721] %1 111 <3> %rotate 1 0 000022A0 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 000022A2 0100 %1 111 <3> %rotate 1 0 000022A4 0200 %1 111 <3> %rotate 1 0 000022A6 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 000022A8 [C120] %1 111 <3> %rotate 1 0 000022AA 0500 %1 111 <3> %rotate 1 0 000022AC [4721] %1 111 <3> %rotate 1 0 000022AE 0000 %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 0 000022B0 0000 %1 111 <3> %rotate 1 0 000022B2 00000000 dw 0,0 3998 3999 4000 %unmacro search_wildcard 1-2 0 4001 %unmacro fsi_search_string 2 4002 %unmacro dumpsearches 1-* 4003 4004 4005 %define SEARCHES dw "" 4006 4007 4008 %macro search_wildcard 1-2 0 4009 %assign %%wc $ + %2 - %1 4010 %if %%wc == 0 4011 %error Wildcard at beginning of search string is not allowed 4012 %endif 4013 %xdefine WILDCARDS WILDCARDS, dw %%wc 4014 %endmacro 4015 4016 %macro fsi_search_string 2 4017 %define WILDCARDS dw "" 4018 4019 %define %%identifier label_%1_fsi 4020 4021 %define %%extra 0 4022 4023 %%start: 4024 %[%%identifier %+ _search_string]: 4025 4026 mov di, 7C00h + 512 + 4 4027 mov si, 0 4028 search_wildcard %%start, -2 4029 search_wildcard %%start, -1 4030 ..@fsi_search_signature_offset: equ $ - 2 4031 mov cx, 4 4032 repe cmpsw 4033 %%end: 4034 4035 %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw 0, dw %%extra, WILDCARDS, dw 0 4037 %[%%identifier %+ _length]: equ %%end - %%start 4038 4039 %endmacro 4040 4041 4042 %assign variant 0 4043 %assign identifier variant 4044 fsi_search_string identifier, variant 4017 <1> %define WILDCARDS dw "" 4018 <1> 4019 <1> %define %%identifier label_%1_fsi 4020 <1> 4021 <1> %define %%extra 0 4022 <1> 4023 <1> %%start: 4024 <1> %[%%identifier %+ _search_string]: 4025 <1> 0 000022B6 BF047E mov di, 7C00h + 512 + 4 0 000022B9 BE0000 mov si, 0 4028 <1> search_wildcard %%start, -2 4009 <2> %assign %%wc $ + %2 - %1 4010 <2> %if %%wc == 0 4011 <2> %error Wildcard at beginning of search string is not allowed 4012 <2> %endif 4013 <2> %xdefine WILDCARDS WILDCARDS, dw %%wc 4029 <1> search_wildcard %%start, -1 4009 <2> %assign %%wc $ + %2 - %1 4010 <2> %if %%wc == 0 4011 <2> %error Wildcard at beginning of search string is not allowed 4012 <2> %endif 4013 <2> %xdefine WILDCARDS WILDCARDS, dw %%wc 4030 <1> ..@fsi_search_signature_offset: equ $ - 2 0 000022BC B90400 mov cx, 4 0 000022BF F3A7 repe cmpsw 4033 <1> %%end: 4034 <1> 4035 <1> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw 0, dw %%extra, WILDCARDS, dw 0 4037 <1> %[%%identifier %+ _length]: equ %%end - %%start 4038 <1> 4045 4046 4047 %macro dumpsearches 1-* 4048 %rep %0 4049 %1 4050 %rotate 1 4051 %endrep 4052 %endmacro 4053 0 000022C1 00 align 2, db 0 4055 %[PREFIX]fsi_search_metadata: 4056 dumpsearches SEARCHES 4048 <1> %rep %0 4049 <1> %1 4050 <1> %rotate 1 4051 <1> %endrep 4049 <2> %1 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 000022C2 [B621] %1 4050 <2> %rotate 1 0 000022C4 0B00 %1 4050 <2> %rotate 1 0 000022C6 0000 %1 4050 <2> %rotate 1 0 000022C8 0000 %1 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 000022CA 0400 %1 4050 <2> %rotate 1 0 000022CC 0500 %1 4050 <2> %rotate 1 0 000022CE 0000 %1 4050 <2> %rotate 1 0 000022D0 00000000 dw 0,0 4058 4059 4060 %define STRINGS db "" 4061 4062 %macro fsi_revision 2.nolist 4063 %xdefine STRINGS STRINGS, %%message:, {asciz %2} 4064 dw %%message 4065 db %1 4066 %endmacro 4067 4068 align 2, db 0 4069 fsi_known_revisions: 4070 ; fsi_revision {0,0,0,0,0,0,0,0}, "None" 4071 %include "fsiboot.mac" 1 <1> 2 <1> %if 0 3 <1> 4 <1> fsiboot.mac - FSIBOOT revision history for instsect 5 <1> 2024 by 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> 0 000022D4 [5822]465349424F4F fsi_revision {"FSIBOOT",0}, "Initial revs of lDOS FSIBOOT (2017-09-13)" 0 000022DC 5400 17 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/f8698897b208 18 <1> 0 000022DE [8222]465349424F4F fsi_revision "FSIBOOT0", "lDOS FSIBOOT rev 0 (2018-09-20)" 0 000022E6 5430 20 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/07a99b9f6f7d 21 <1> 0 000022E8 [A222]465349424F4F fsi_revision "FSIBOOT1", "lDOS FSIBOOT rev 1 (2018-09-21)" 0 000022F0 5431 23 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/af54529e9f46 24 <1> 0 000022F2 [C222]465349424F4F fsi_revision "FSIBOOT2", "lDOS FSIBOOT rev 2 (2018-09-23)" 0 000022FA 5432 26 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/dae7de41a043 27 <1> ; Used for RxDOS v7.24, 2020-02-03 28 <1> 0 000022FC [E222]465349424F4F fsi_revision "FSIBOOT3", "lDOS FSIBOOT rev 3 (2020-09-30)" 0 00002304 5433 30 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/76c52f61072c 31 <1> 32 <1> ; strdef FSIBOOTNAME, "FSIBOOT3" 33 <1> ; ; strdef FSIBOOTNAME, "FSIBEX00" 34 <1> ; 2020-10-12 35 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/aa15fd7bc58e 36 <1> 0 00002306 [0223]465349424558 fsi_revision "FSIBEX00", "lDOS FSIBOOT experimental rev 00 (2020-10-12)" 0 0000230E 3030 38 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/143c764757a7 39 <1> 0 00002310 [3023]465349424558 fsi_revision "FSIBEX01", "lDOS FSIBOOT experimental rev 01 (2020-10-25)" 0 00002318 3031 41 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/72d74cdd7a3c 42 <1> 0 0000231A [5E23]465349424558 fsi_revision "FSIBEX02", "lDOS FSIBOOT experimental rev 02 (2020-11-17)" 0 00002322 3032 44 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/5a5ccfb311ef 45 <1> 0 00002324 [8C23]465349424F4F fsi_revision "FSIBOOT4", "lDOS FSIBOOT rev 4 (2021-01-12)" 0 0000232C 5434 47 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/b235cf86c77c 48 <1> ; Used for lDebug releases 1 to 8: 49 <1> ; lDebug release 1, 2021-02-15 50 <1> ; lDebug release 2, 2021-05-05 51 <1> ; lDebug release 3, 2021-08-15 52 <1> ; lDebug release 4, 2022-03-08 53 <1> ; lDebug release 5, 2023-03-08 54 <1> ; lDebug release 6, 2023-08-26 55 <1> ; lDebug release 7, 2024-02-16 56 <1> ; lDebug release 8, 2024-03-08 57 <1> 0 0000232E [AC23]465349424558 fsi_revision "FSIBEX03", "lDOS FSIBOOT experimental rev 03 (2024-08-18)" 0 00002336 3033 59 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/fb5f0cb6ced4 60 <1> 0 00002338 [DA23]465349424558 fsi_revision "FSIBEX04", "lDOS FSIBOOT experimental rev 04 (2024-08-19)" 0 00002340 3034 62 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/88c097107c86 63 <1> 0 00002342 [0824]465349424558 fsi_revision "FSIBEX05", "lDOS FSIBOOT experimental rev 05 (2024-10-04)" 0 0000234A 3035 65 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/aae8332780e8 66 <1> 0 0000234C [3624]465349424F4F fsi_revision "FSIBOOT5", "lDOS FSIBOOT rev 5 (2024-10-11)" 0 00002354 5435 68 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/dec4786efc0a 69 <1> ; Used for lDebug release 9: 70 <1> ; lDebug release 9, (future) 71 <1> 72 <1> %if 0 73 <1> 74 <1> hg grep FSIBOOTNAME --all | 75 <1> sed -re 's/^boot32.asm:([0-9]+):.*$/\1/' | 76 <1> LC_ALL=C sort | LC_ALL=C uniq | xargs -r bash -c ' 77 <1> for rev; 78 <1> do 79 <1> hg diff -r "rev($rev)^:rev($rev)" | grep -Ei "^\+.*FSIBOOTNAME"; 80 <1> hg log -r "rev($rev)" --template="{date|isodate}\n; https://hg.pushbx.org/ecm/ldosboot.exp/rev/{node|short}\n"; 82 <1> done' scriptlet 83 <1> 84 <1> for file in ~/wwwecm/download/ldebug/ldebug?.tlz; 85 <1> do 86 <1> base="${file##*/}"; 87 <1> rel="${base%.tlz}"; 88 <1> tar -xf "$file" "$rel"/bin/instsect.com; 89 <1> grep --binary-files=text -Eo 'FSIBOOT.' "$rel"/bin/instsect.com | 90 <1> LC_ALL=C sort | LC_ALL=C uniq; 91 <1> ls -lgG --full-time "$rel"/bin/instsect.com; 92 <1> done 93 <1> 94 <1> %endif 0 00002356 0000 dw 0 4073 4074 dumpsearches STRINGS 4048 <1> %rep %0 4049 <1> %1 4050 <1> %rotate 1 4051 <1> %endrep 4049 <2> %1 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 00002358 496E697469616C2072 %1 0 00002361 657673206F66206C44 0 0000236A 4F5320465349424F4F 0 00002373 542028323031372D30 0 0000237C 392D31332900 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 00002382 6C444F532046534942 %1 0 0000238B 4F4F54207265762030 0 00002394 2028323031382D3039 0 0000239D 2D32302900 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 000023A2 6C444F532046534942 %1 0 000023AB 4F4F54207265762031 0 000023B4 2028323031382D3039 0 000023BD 2D32312900 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 000023C2 6C444F532046534942 %1 0 000023CB 4F4F54207265762032 0 000023D4 2028323031382D3039 0 000023DD 2D32332900 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 000023E2 6C444F532046534942 %1 0 000023EB 4F4F54207265762033 0 000023F4 2028323032302D3039 0 000023FD 2D33302900 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 00002402 6C444F532046534942 %1 0 0000240B 4F4F54206578706572 0 00002414 696D656E74616C2072 0 0000241D 657620303020283230 0 00002426 32302D31302D313229 0 0000242F 00 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 00002430 6C444F532046534942 %1 0 00002439 4F4F54206578706572 0 00002442 696D656E74616C2072 0 0000244B 657620303120283230 0 00002454 32302D31302D323529 0 0000245D 00 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 0000245E 6C444F532046534942 %1 0 00002467 4F4F54206578706572 0 00002470 696D656E74616C2072 0 00002479 657620303220283230 0 00002482 32302D31312D313729 0 0000248B 00 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 0000248C 6C444F532046534942 %1 0 00002495 4F4F54207265762034 0 0000249E 2028323032312D3031 0 000024A7 2D31322900 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 000024AC 6C444F532046534942 %1 0 000024B5 4F4F54206578706572 0 000024BE 696D656E74616C2072 0 000024C7 657620303320283230 0 000024D0 32342D30382D313829 0 000024D9 00 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 000024DA 6C444F532046534942 %1 0 000024E3 4F4F54206578706572 0 000024EC 696D656E74616C2072 0 000024F5 657620303420283230 0 000024FE 32342D30382D313929 0 00002507 00 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 00002508 6C444F532046534942 %1 0 00002511 4F4F54206578706572 0 0000251A 696D656E74616C2072 0 00002523 657620303520283230 0 0000252C 32342D31302D303429 0 00002535 00 4050 <2> %rotate 1 4049 <2> %1 4050 <2> %rotate 1 0 00002536 6C444F532046534942 %1 0 0000253F 4F4F54207265762035 0 00002548 2028323032342D3130 0 00002551 2D31312900 4050 <2> %rotate 1 4075 4076 4077 %if _NUM_DETECT_NAMES 4078 ; INP: ds:si -> first byte to check for name 4079 ; cx = number of bytes left 4080 ; OUT: (8+1+3+1)bytes[msg.foundname] = found name, 4081 ; converted to 8.3 ASCIZ format, 4082 ; "(None)" if none 4083 ; CY if no filename found, 4084 ; si = INP:si + INP:cx 4085 ; cx = 0 4086 ; NC if filename found, 4087 ; si -> byte behind the name, thus (si-11)-> name 4088 ; cx = number of bytes left 4089 ; CHG: di, ax 4090 ; STT: ds = es 4091 findname: 4092 .: 0 00002556 83F90B cmp cx, 11 ; enough for another name ? 0 00002559 7275 jb .none ; no --> 4095 ; (cx == 0 jumps here too) 4096 .check: 0 0000255B 51 push cx 0 0000255C 56 push si 0 0000255D B90B00 mov cx, 11 0 00002560 AC lodsb 0 00002561 88C4 mov ah, al ; check for same char in all 11 places 0 00002563 3C20 cmp al, 32 ; first character must not be blank 0 00002565 740D je .check_fail ; if it is --> 4104 ; cmp al, 5 ; first character may be 05h to indicate 0E5h 4105 ; je .check_pass 0 00002567 A8 db __TEST_IMM8 ; (skip lodsb) 4107 .check_loop_same: 0 00002568 AC lodsb 0 00002569 38C4 cmp ah, al 0 0000256B 752E jne .check_loop_differs 0 0000256D E80A00 call .check_character 0 00002570 7202 jc .check_fail 0 00002572 E2F4 loop .check_loop_same 4114 ; if we arrive here, all characters (while valid) are the 4115 ; same character repeated 11 times. we disallow this in case 4116 ; that the padding character is an allowed one (eg '&' 26h). 4117 .check_fail: 0 00002574 5E pop si 0 00002575 59 pop cx 0 00002576 49 dec cx ; lessen the counter 0 00002577 46 inc si ; -> next position to check 0 00002578 EBDC jmp . 4123 4124 .check_character: 0 0000257A 3C20 cmp al, 32 0 0000257C 7218 jb .check_character_fail 0 0000257E 3C7F cmp al, 127 4128 ; je .check_character_fail 0 00002580 7314 jae .check_character_fail 4130 ; note: with all characters >= 128 allowed, 4131 ; we get false positives in our sectors. 0 00002582 3C2E cmp al, '.' 0 00002584 7410 je .check_character_fail 0 00002586 3C2F cmp al, '/' 0 00002588 740C je .check_character_fail 0 0000258A 3C5C cmp al, '\' 0 0000258C 7408 je .check_character_fail 0 0000258E 3C61 cmp al, 'a' 0 00002590 7206 jb .check_character_pass 0 00002592 3C7A cmp al, 'z' 0 00002594 7702 ja .check_character_pass 4142 .check_character_fail: 0 00002596 F9 stc 0 00002597 C3 retn 4145 4146 .check_character_pass: 0 00002598 F8 clc 0 00002599 C3 retn 4149 4150 .check_loop: 0 0000259A AC lodsb 4152 .check_loop_differs: 0 0000259B E8DCFF call .check_character 0 0000259E 72D4 jc .check_fail 0 000025A0 3C20 cmp al, 32 0 000025A2 740F je .check_loop_is_blank 4157 .check_pass: 0 000025A4 E2F4 loop .check_loop 4159 0 000025A6 58 pop ax ; (discard si) 0 000025A7 83EE0B sub si, 11 ; -> at name 4162 0 000025AA E83600 call convert_name_to_asciz 4164 ; si -> behind name 0 000025AD 59 pop cx 0 000025AE 83E90B sub cx, 11 ; lessen the counter 0 000025B1 F8 clc 0 000025B2 C3 retn 4169 4170 .check_loop_is_blank: 0 000025B3 88CC mov ah, cl ; = how many remaining in ext (1 to 3) 4172 ; or name+ext (1 to 10, cannot be 11) 0 000025B5 80FC03 cmp ah, 3 ; in ext ? 0 000025B8 7605 jbe @F ; yes --> 0 000025BA 80EC03 sub ah, 3 ; 1 to 7 name field remaining 0 000025BD A8 db __TEST_IMM8 ; (skip lodsb) 4177 .check_loop_blank: 0 000025BE AC lodsb 4179 @@: 0 000025BF E8B8FF call .check_character ; general check 0 000025C2 72B0 jc .check_fail 0 000025C4 3C20 cmp al, 32 ; non-blank ? 0 000025C6 75AC jne .check_fail ; yes, fails --> 0 000025C8 FECC dec ah ; at end of field ? 0 000025CA 74D8 jz .check_pass ; yes --> 4186 ; no, still in field after blank. 4187 ; check that next trail is all blanks too. 0 000025CC E2F0 loop .check_loop_blank 0 000025CE EBA4 jmp .check_fail ; (never reached) 4190 4191 .none: 0 000025D0 01CE add si, cx 0 000025D2 BF[A83C] mov di, msg.foundname 0 000025D5 56 push si 0 000025D6 BE[B63C] mov si, msg.foundname_none 0 000025D9 B90400 mov cx, (msg.foundname_none_size + 1) >> 1 0 000025DC F3A5 rep movsw 0 000025DE 5E pop si 0 000025DF 31C9 xor cx, cx 0 000025E1 F9 stc 0 000025E2 C3 retn 4202 4203 4204 ; INP: si -> 11-byte blank-padded name 4205 ; msg.foundname -> (8+1+3+1)-byte buffer 4206 ; OUT: si -> behind 11-byte blank-padded name 4207 ; msg.foundname filled 4208 ; CHG: cx, di, ax 4209 convert_name_to_asciz: 0 000025E3 BF[A83C] mov di, msg.foundname 0 000025E6 B90800 mov cx, 8 0 000025E9 F3A4 rep movsb ; copy over base name, si -> extension 0 000025EB 807DF805 cmp byte [di - 8], 05h ; is it 05h ? 0 000025EF 7504 jne @F ; no --> 0 000025F1 C645F8E5 mov byte [di - 8], 0E5h ; yes, convert to 0E5h 4216 @@: 4217 0 000025F5 A8 db __TEST_IMM8 ; (skip dec) 4219 @@: 0 000025F6 4F dec di ; decrement -> at previous trailing blank 0 000025F7 807DFF20 cmp byte [di - 1], 32 ; trailing blank ? 0 000025FB 74F9 je @B ; yes --> 4223 0 000025FD B02E mov al, '.' 0 000025FF AA stosb ; store dot (if needed) 0 00002600 B103 mov cl, 3 0 00002602 F3A4 rep movsb ; copy over extension, si -> behind name 4228 0 00002604 A8 db __TEST_IMM8 ; (skip dec) 4230 @@: 0 00002605 4F dec di ; decrement -> at previous trailing blank 0 00002606 807DFF20 cmp byte [di - 1], 32 ; trailing blank ? 0 0000260A 74F9 je @B ; yes --> 4234 0 0000260C 807DFF2E cmp byte [di - 1], '.' ; trailing dot ? (only occurs if all-blank ext) 0 00002610 7501 jne @F ; no --> 0 00002612 4F dec di ; -> at the dot 4238 @@: 0 00002613 B000 mov al, 0 0 00002615 AA stosb ; store filename terminator 0 00002616 C3 retn 4242 4243 4244 ; INP: ds:si-> first letter of name 4245 ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 4246 ; CHG: ax, cx, di 4247 ; OUT: NC if valid name, 4248 ; al = first character after name (EOL, blank, or slash) 4249 ; si -> next character 4250 ; CY else 4251 ; STT: es = ds 4252 boot_parse_fn: 0 00002617 B020 mov al, 32 0 00002619 BF[6C3C] mov di, load_kernel_name 0 0000261C B90B00 mov cx, 11 0 0000261F F3AA rep stosb ; initialise to empty 4257 0 00002621 BF[6C3C] mov di, load_kernel_name 0 00002624 B90900 mov cx, 9 4260 .loop_name: 0 00002627 AC lodsb 0 00002628 E8AD00 call uppercase 0 0000262B 3C22 cmp al, '"' 0 0000262D 741C je .invalid 0 0000262F E86900 call iseol? 0 00002632 744F je .loop_name_done 0 00002634 3C20 cmp al, 32 0 00002636 744B je .loop_name_done 0 00002638 3C09 cmp al, 9 0 0000263A 7447 je .loop_name_done 0 0000263C 3C2F cmp al, '/' 0 0000263E 7443 je .loop_name_done 0 00002640 3C5C cmp al, '\' 0 00002642 743F je .loop_name_done 0 00002644 3C2E cmp al, '.' 0 00002646 7405 je .loop_name_ext 0 00002648 AA stosb 0 00002649 E2DC loop .loop_name 4279 .invalid: 0 0000264B F9 stc 0 0000264C C3 retn 4282 4283 .loop_name_ext: 0 0000264D 83F909 cmp cx, 9 0 00002650 74F9 je .invalid 0 00002652 B90400 mov cx, 4 0 00002655 BF[743C] mov di, load_kernel_name + 8 4288 .loop_ext: 0 00002658 AC lodsb 0 00002659 E87C00 call uppercase 0 0000265C 3C22 cmp al, '"' 0 0000265E 74EB je .invalid 0 00002660 E83800 call iseol? 0 00002663 7419 je .loop_ext_done 0 00002665 3C20 cmp al, 32 0 00002667 7415 je .loop_ext_done 0 00002669 3C09 cmp al, 9 0 0000266B 7411 je .loop_ext_done 0 0000266D 3C2F cmp al, '/' 0 0000266F 740D je .loop_ext_done 0 00002671 3C5C cmp al, '\' 0 00002673 7409 je .loop_ext_done 0 00002675 3C2E cmp al, '.' 0 00002677 74D2 je .invalid 0 00002679 AA stosb 0 0000267A E2DC loop .loop_ext 0 0000267C EBCD jmp .invalid 4308 4309 .loop_ext_done: 0 0000267E 83F904 cmp cx, 4 0 00002681 74C8 je .invalid 4312 .loop_name_done: 0 00002683 83F909 cmp cx, 9 0 00002686 74C3 je .invalid 0 00002688 C606[773C]00 mov byte [load_kernel_name + 11], 0 0 0000268D 803E[6C3C]E5 cmp byte [load_kernel_name], 0E5h 0 00002692 7505 jne @F 0 00002694 C606[6C3C]05 mov byte [load_kernel_name], 05h 4319 @@: 0 00002699 F8 clc 0 0000269A C3 retn 4322 %endif 4323 4324 4325 iseol?: 0 0000269B 3C0D cmp al, 13 0 0000269D 7402 je .ret 4328 ; cmp al, ';' 4329 ; je .ret 0 0000269F 3C00 cmp al, 0 4331 .ret: 0 000026A1 C3 retn 4333 4334 4335 ; Check for given string (cap-insensitive) 4336 ; 4337 ; INP: si-> input string to check (either cap), 4338 ; terminated by CR (13), space, tab, comma 4339 ; dx-> ASCIZ string to check (all-caps) 4340 ; OUT: Iff string matches, 4341 ; si-> at separator that terminates the keyword 4342 ; else, 4343 ; si = input si 4344 ; STT: ds = es = ss 4345 ; CHG: dx, ax 4346 isstring?: 0 000026A2 56 push si 0 000026A3 87D7 xchg dx, di 4349 .loop: 0 000026A5 AC lodsb 0 000026A6 E82F00 call uppercase 0 000026A9 AE scasb 0 000026AA 7506 jne .mismatch 0 000026AC 84C0 test al, al 0 000026AE 75F5 jne .loop 0 000026B0 EB20 jmp .matched_zr 4357 4358 .mismatch: 0 000026B2 E8E6FF call iseol? 0 000026B5 7414 je .checkend 0 000026B7 3C20 cmp al, 32 0 000026B9 7410 je .checkend 0 000026BB 3C09 cmp al, 9 0 000026BD 740C je .checkend 0 000026BF 3C2C cmp al, ',' 0 000026C1 7408 je .checkend 0 000026C3 3C3D cmp al, '=' 0 000026C5 7404 je .checkend 4369 .ret_nz: 4370 ; NZ 0 000026C7 5E pop si 4372 .ret: 0 000026C8 87D7 xchg dx, di 0 000026CA C3 retn 4375 4376 .checkend: 0 000026CB 26807DFF00 cmp byte [es:di - 1], 0 0 000026D0 75F5 jne .ret_nz 4379 .matched_zr: ; ZR 0 000026D2 58 pop ax ; (discard) 0 000026D3 8D74FF lea si, [si - 1] ; -> separator 0 000026D6 EBF0 jmp .ret 4383 4384 4385 uppercase: 0 000026D8 3C61 cmp al, 'a' 0 000026DA 7206 jb @F 0 000026DC 3C7A cmp al, 'z' 0 000026DE 7702 ja @F 0 000026E0 24DF and al, ~20h 4391 @@: 0 000026E2 C3 retn 4393 4394 4395 get_hexit: 0 000026E3 51 push cx 0 000026E4 B93946 mov cx, '9' | (('A'-10-1 + 16) << 8) 0 000026E7 E87100 call getexpression.lit_isdigit? ; first character must be a digit 0 000026EA 59 pop cx 0 000026EB 720C jc .ret 0 000026ED E8E8FF call uppercase 0 000026F0 2C30 sub al, '0' 0 000026F2 3C09 cmp al, 9 ; was decimal digit ? 0 000026F4 7602 jbe .lit_decimaldigit ; yes --> 0 000026F6 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4406 .lit_decimaldigit: 0 000026F8 F8 clc 4408 .ret: 0 000026F9 C3 retn 4410 4411 4412 ; INP: al = first character 4413 ; si -> next 4414 ; OUT: doesn't return if error 4415 ; bx:dx = number read 4416 ; al = character after the number 4417 ; si -> next 4418 ; CHG: cx, ax, di 4419 get_decimal_literal: 0 000026FA BA0A00 mov dx, 10 ; set base: decimal 4421 %if 1 0 000026FD B93940 mov cx, '9' | (('A'-10-1 + 10) << 8) 4423 %else 4424 mov cl, dl 4425 add cl, '0'-1 4426 cmp cl, '9' 4427 jbe .lit_basebelow11 4428 mov cl, '9' 4429 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 4430 mov ch, dl 4431 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 4432 %endif 0 00002700 EB06 jmp @F 4434 4435 4436 get_hexadecimal_literal: 0 00002702 BA1000 mov dx, 16 ; set base: hexadecimal 4438 %if 1 0 00002705 B93946 mov cx, '9' | (('A'-10-1 + 16) << 8) 4440 %else 4441 mov cl, dl 4442 add cl, '0'-1 4443 cmp cl, '9' 4444 jbe .lit_basebelow11 4445 mov cl, '9' 4446 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 4447 mov ch, dl 4448 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 4449 %endif 4450 4451 @@: 0 00002708 B400 mov ah, 0 0 0000270A 31DB xor bx, bx 0 0000270C 89D7 mov di, dx ; di = base 4455 0 0000270E E84A00 call getexpression.lit_isdigit? ; first character must be a digit 0 00002711 723F jc .err2 0 00002713 31D2 xor dx, dx ; initialize value 4459 .lit_loopdigit: 0 00002715 3C5F cmp al, '_' 0 00002717 7430 je .lit_skip 0 00002719 E83F00 call getexpression.lit_isdigit? ; was last character ? 0 0000271C 722E jc .lit_end ; yes --> 0 0000271E E8B7FF call uppercase 0 00002721 2C30 sub al, '0' 0 00002723 3C09 cmp al, 9 ; was decimal digit ? 0 00002725 7602 jbe .lit_decimaldigit ; yes --> 0 00002727 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4469 .lit_decimaldigit: 0 00002729 50 push ax 0 0000272A 89D0 mov ax, dx 0 0000272C 53 push bx 0 0000272D F7E7 mul di ; multiply low word with base 0 0000272F 89D3 mov bx, dx 0 00002731 89C2 mov dx, ax 0 00002733 58 pop ax 0 00002734 52 push dx 0 00002735 F7E7 mul di ; multiply high word with base 0 00002737 85D2 test dx, dx 0 00002739 5A pop dx 0 0000273A 7516 jnz .err2 ; overflow --> 0 0000273C 01C3 add bx, ax ; add them 0 0000273E 58 pop ax 0 0000273F 7211 jc .err2 ; overflow --> 0 00002741 00C2 add dl, al ; add in the new digit 0 00002743 80D600 adc dh, 0 0 00002746 83D300 adc bx, byte 0 4488 .lit_skip: 0 00002749 AC lodsb 0 0000274A EBC9 jmp short .lit_loopdigit 4491 4492 .lit_end: 0 0000274C E82600 call isseparator? ; after the number, there must be a separator 0 0000274F 7501 jne .err2 ; none here --> 0 00002751 C3 retn 4496 4497 .err2: 0 00002752 BA[AC3E] mov dx, msg.error_invalid_number 0 00002755 E974DA jmp disp_error 4500 4501 4502 symhint_store_string getexpression 4503 getexpression.lit_ishexdigit?: 0 00002758 B93946 mov cx, "9F" 4505 getexpression.lit_isdigit?: 0 0000275B 3C30 cmp al, '0' 0 0000275D 7214 jb .no 0 0000275F 38C8 cmp al, cl 0 00002761 760D jbe .yes 0 00002763 50 push ax 0 00002764 E871FF call uppercase 0 00002767 38E8 cmp al, ch 0 00002769 7707 ja .no_p 0 0000276B 3C41 cmp al, 'A' 0 0000276D 7203 jb .no_p 0 0000276F 58 pop ax 4517 .yes: 0 00002770 F8 clc 0 00002771 C3 retn 4520 4521 .no_p: 0 00002772 58 pop ax 4523 .no: 0 00002773 F9 stc 0 00002774 C3 retn 4526 4527 4528 ; INP: al = character 4529 ; OUT: al = capitalised character 4530 ; ZR, NC if a separator 4531 ; NZ if no separator 4532 isseparator?: 0 00002775 E860FF call uppercase 0 00002778 51 push cx 4535 %if 0 ; _EXPRESSIONS 4536 call isoperator? ; normal operators are separators (also handles equality sign) 4537 je .yes ; if match --> (ZR, NC) 4538 %endif 0 00002779 57 push di 0 0000277A BF[8626] mov di, separators 0 0000277D 8B0D mov cx, word [di] 0 0000277F AF scasw 0 00002780 F2AE repne scasb ; ZR, NC on match, NZ else 0 00002782 5F pop di 4545 .yes: 0 00002783 59 pop cx 0 00002784 C3 retn 4548 0 00002785 00 align 2, db 0 4550 %if 0 ; _EXPRESSIONS 4551 separators: countedw 32,9,13,",L;]:=)",0 4552 %else 0 00002786 0A0020090D2C4C3B5D separators: countedw 32,9,13,",L;]:=",0 0 0000278F 3A3D00 4554 %endif 4555 4556 4557 i24: 0 00002792 B003 mov al, 3 ; always return fail, to handle the error as a soft one 0 00002794 CF iret 4560 4561 i23: 0 00002795 2EC706[9526]EB08 mov word [ cs:$ ], (__JMP_REL8|__REL16__(.return)<<8) ; don't reenter 0 0000279C E80200 call restorestate 4564 .return: 0 0000279F F9 stc ; always abort program (what default DOS handler also does) 0 000027A0 CB retf 4567 4568 ; Restore modified DOS data 4569 ; 4570 ; CHG: - 4571 restorestate: 0 000027A1 50 push ax 4573 %if _VDD 4574 ; Release the registered VDD. 0 000027A2 F606[D829]04 testopt [internalflags], ntpacket 0 000027A7 7408 jz .novdd 0 000027A9 A1[E429] mov ax, word [hVdd] 0 000027AC C4C4580190 UnRegisterModule 4579 .novdd: 4580 %endif 0 000027B1 58 pop ax 0 000027B2 C3 retn 4583 4584 4585 ; INP: es:dx = ds:dx -> 0-terminated message 4586 disp_msg_asciz: 0 000027B3 50 push ax 0 000027B4 53 push bx 0 000027B5 51 push cx 0 000027B6 57 push di 0 000027B7 BB0100 mov bx, 1 0 000027BA B80040 mov ax, 4000h 0 000027BD 89D7 mov di, dx 0 000027BF B9FFFF mov cx, -1 0 000027C2 F2AE repne scasb ; -> after nul 0 000027C4 4F dec di ; -> at nul 0 000027C5 29D7 sub di, dx ; size 0 000027C7 89F9 mov cx, di 0 000027C9 CD21 int 21h 0 000027CB 5F pop di 0 000027CC 59 pop cx 0 000027CD 5B pop bx 0 000027CE 58 pop ax 0 000027CF C3 retn 4605 4606 4607 is_alphanumeric: 0 000027D0 3C30 cmp al, '0' 0 000027D2 7216 jb .ret 0 000027D4 3C39 cmp al, '9' 0 000027D6 7610 jbe .ZR 0 000027D8 3C41 cmp al, 'A' 0 000027DA 720E jb .ret 0 000027DC 3C5A cmp al, 'Z' 0 000027DE 7608 jbe .ZR 0 000027E0 3C61 cmp al, 'a' 0 000027E2 7206 jb .ret 0 000027E4 3C7A cmp al, 'z' 0 000027E6 7702 ja .ret 4620 .ZR: 0 000027E8 38C0 cmp al, al 4622 .ret: 0 000027EA C3 retn 4624 4625 4626 disp_ax_hex: 0 000027EB 86C4 xchg al, ah 0 000027ED E80200 call disp_al_hex 0 000027F0 86C4 xchg al, ah 4630 disp_al_hex: 0 000027F2 51 push cx 0 000027F3 B104 mov cl, 4 0 000027F5 D2C8 ror al, cl 0 000027F7 E80300 call .nibble 0 000027FA D2C8 ror al, cl 0 000027FC 59 pop cx 4637 .nibble: 0 000027FD 50 push ax 0 000027FE 240F and al, 0Fh 0 00002800 0430 add al, '0' 0 00002802 3C39 cmp al, '9' 0 00002804 7602 jbe .isdigit 0 00002806 0407 add al, 'A'-('9'+1) 4644 .isdigit: 0 00002808 A8 db __TEST_IMM8 ; (skip push) 4646 4647 disp_al: 0 00002809 50 push ax 0 0000280A 52 push dx 0 0000280B 92 xchg dx, ax 0 0000280C B402 mov ah, 02h 0 0000280E CD21 int 21h 0 00002810 5A pop dx 0 00002811 58 pop ax 0 00002812 C3 retn 4656 4657 4658 disp_ax_dec: 4659 decword: 0 00002813 52 push dx 0 00002814 31D2 xor dx, dx 0 00002816 E80200 call decdword 0 00002819 5A pop dx 0 0000281A C3 retn 4665 4666 4667 decdword: 0 0000281B 51 push cx 0 0000281C 31C9 xor cx, cx 0 0000281E E80200 call dec_dword_minwidth 0 00002821 59 pop cx 0 00002822 C3 retn 4673 4674 4675 ; Dump dword as decimal number string 4676 ; 4677 ; INP: dx:ax = dword 4678 ; cx = minimum width (<= 1 for none, must be < 10) 4679 ; es:di -> where to store 4680 ; OUT: es:di -> behind variable-length string 4681 ; CHG: - 4682 ; STT: UP 4683 dec_dword_minwidth: 4684 lframe near 4685 lequ 12, bufferlen 4686 lvar ?bufferlen,buffer 0 00002823 5589E58D66F4 lenter 4688 lvar dword, dividend 0 00002829 52 push dx 0 0000282A 50 push ax 0 0000282B 49 dec cx 4692 lvar word, minwidth 0 0000282C 51 push cx 0 0000282D 41 inc cx 4695 0 0000282E 50 push ax 0 0000282F 53 push bx 0 00002830 51 push cx 0 00002831 52 push dx 0 00002832 56 push si 0 00002833 57 push di 0 00002834 06 push es 4703 0 00002835 16 push ss 0 00002836 07 pop es 4706 0 00002837 8D7EFF lea di, [bp + ?buffer + ?bufferlen - 1] 0 0000283A 89FB mov bx, di 0 0000283C FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 0000283D B024 mov al, '$' 0 0000283F AA stosb ; 21.09 dollar terminator 4712 4713 ; dword [bp + ?dividend] = number to display 0 00002840 B90A00 mov cx, 10 ; divisor 4715 .loop_write: 4716 0 00002843 31D2 xor dx, dx 0 00002845 57 push di 0 00002846 BF0400 mov di, 4 4720 .loop_divide: 0 00002849 8B43EE mov ax, [bp + ?dividend - 2 + di] 0 0000284C F7F1 div cx 0 0000284E 8943EE mov word [bp + ?dividend - 2 + di], ax 0 00002851 4F dec di 0 00002852 4F dec di 0 00002853 75F4 jnz .loop_divide 4727 ; dx = last remainder 0 00002855 5F pop di 0 00002856 92 xchg ax, dx ; ax = remainder (next digit) 4730 ; dword [bp + ?dividend] = result of div 0 00002857 0430 add al, '0' 0 00002859 AA stosb 0 0000285A FF4EEE dec word [bp + ?minwidth] 0 0000285D 79E4 jns .loop_write 4735 0 0000285F 837EF200 cmp word [bp + ?dividend + 2], 0 0 00002863 75DE jnz .loop_write 0 00002865 837EF000 cmp word [bp + ?dividend], 0 4739 ; any more ? 0 00002869 75D8 jnz .loop_write ; loop --> 4741 0 0000286B FC cld 4743 0 0000286C 29FB sub bx, di 0 0000286E 89D9 mov cx, bx 0 00002870 89FA mov dx, di 0 00002872 42 inc dx 0 00002873 1E push ds 0 00002874 16 push ss 0 00002875 1F pop ds 0 00002876 B409 mov ah, 09h 0 00002878 CD21 int 21h ; display to stdout 0 0000287A 1F pop ds 4754 0 0000287B 07 pop es 0 0000287C 5F pop di 0 0000287D 5E pop si 0 0000287E 5A pop dx 0 0000287F 59 pop cx 0 00002880 5B pop bx 0 00002881 58 pop ax 4762 0 00002882 89EC5D lleave 0 00002885 C3 retn 4765 4766 4767 ; INP: dx:ax = sector to write 4768 ; cl = drive to write to (0 = A:) 4769 ; ds:bx -> buffer 4770 ; STT: ds = ss 4771 ; OUT: CY if failure, error message displayed to stdout 4772 ; NC if success 4773 ; dx:ax = incremented 4774 ; ds:bx -> behind buffer 4775 ; (bx += word[bp + ldBytesPerSector] 4776 symhint_store_and_label write_sector 0 00002886 50 push ax 0 00002887 52 push dx 0 00002888 53 push bx 0 00002889 51 push cx 0 0000288A 56 push si 4782 .plw1: 0 0000288B 833E[3808]00 cmp word [cmd_line_image_file.name], 0 0 00002890 7432 je .drive 4785 0 00002892 57 push di 0 00002893 53 push bx 0 00002894 E87E01 call image_seek 0 00002897 5A pop dx 0 00002898 5F pop di 0 00002899 7220 jc .image_fail_seek 4792 0 0000289B 8B0E[1008] mov cx, word [m_sector_size] 0 0000289F B440 mov ah, 40h 0 000028A1 F9 stc 0 000028A2 CD21 int 21h 0 000028A4 7309 jnc @F 0 000028A6 BA[A93A] mov dx, msg.image_fail.write 0 000028A9 E8F9EF call disp_dos_error 0 000028AC E9A600 jmp write_sector.ww3_error 4801 4802 @@: 0 000028AF 39C8 cmp ax, cx 0 000028B1 7503E9A000 je write_sector.ww3 ; (NC) 0 000028B6 BA[C43A] mov dx, msg.image_fail_enough.write 0 000028B9 EB03 jmp @F 4807 4808 .image_fail_seek: 0 000028BB BA[F13A] mov dx, msg.image_fail_seek.write 4810 @@: 0 000028BE E8F2FE call disp_msg_asciz 0 000028C1 E99100 jmp write_sector.ww3_error 4813 4814 .drive: 0 000028C4 51 push cx 0 000028C5 80C141 add cl, 'A' 0 000028C8 880E[9F4D] mov byte [driveno], cl 0 000028CC 59 pop cx 0 000028CD F606[D829]07 testopt [internalflags], oldpacket| newpacket| ntpacket 0 000028D2 7513 jnz .plw3 ; if using a packet --> 0 000028D4 85D2 test dx, dx 0 000028D6 7556 jnz .error_sector_not_found 0 000028D8 92 xchg ax, dx ; dx = sector to write 0 000028D9 91 xchg ax, cx ; al = drive number 0 000028DA B90100 mov cx, 1 4826 .oldint: 0 000028DD 55 push bp 0 000028DE 57 push di 0 000028DF CD26 int 26h 0 000028E1 44 inc sp 0 000028E2 44 inc sp 0 000028E3 5F pop di 0 000028E4 5D pop bp 0 000028E5 EB49 jmp .done 4835 4836 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 4837 .plw3: 0 000028E7 53 push bx 0 000028E8 BB[042A] mov bx, packet 0 000028EB 8907 mov word [bx+0], ax ; LoWord sector number 0 000028ED 895702 mov word [bx+2], dx ; HiWord sector number 0 000028F0 C747040100 mov word [bx+4], 1 ; number of sectors 0 000028F5 88C8 mov al, cl 0 000028F7 8F4706 pop word [bx+6] ; transfer address ofs 0 000028FA 8C5F08 mov word [bx+8], ds ; transfer address seg 0 000028FD B9FFFF mov cx, -1 4847 0 00002900 E88001 call lockdrive 4849 0 00002903 36F606[D829]06 testopt [ss:internalflags], newpacket| ntpacket 0 00002909 74D2 jz .oldint 0 0000290B 88C2 mov dl, al ; A: = 0, ... 0 0000290D BE0100 mov si, 0001h ; write, assume "unknown data" 4854 %if _VDD 0 00002910 F606[D829]04 testopt [internalflags], ntpacket 0 00002915 750A jnz .vdd 4857 %endif 0 00002917 FEC2 inc dl ; A: = 1, ... 0 00002919 B80573 mov ax, 7305h ; ds:(e)bx-> packet 0 0000291C F9 stc 0 0000291D CD21 int 21h 0 0000291F EB0F jmp short .done 4863 %if _VDD 4864 .vdd: 0 00002921 A1[E429] mov ax, word [hVdd] 0 00002924 B90500 mov cx, 5 0 00002927 C4C4580290 DispatchCall 0 0000292C EB02 jmp short .done 4869 %endif 4870 .error_sector_not_found: 0 0000292E B008 mov al, 8 ; "sector not found" 4872 .done: 0 00002930 9C pushf 0 00002931 E87401 call unlockdrive 0 00002934 9D popf 0 00002935 BA[8F4D] mov dx, writing 4877 .ww1: 0 00002938 731C jnc .ww3 ; if no error 0 0000293A 3C0C cmp al, dskerrs.after_last - 1 0 0000293C 7602 jbe .ww2 ; if in range 0 0000293E B00C mov al, dskerrs.after_last - 1 4882 .ww2: 0 00002940 98 cbw ; ah = 0 0 00002941 BB[C04C] mov bx, dskerrs ; -> byte table 0 00002944 D7 xlatb ; get offset from dskerrs 0 00002945 01D8 add ax, bx ; -> message 0 00002947 92 xchg ax, dx ; dx-> diskerrs message 0 00002948 E868FE call disp_msg_asciz 0 0000294B 92 xchg ax, dx ; dx-> writing/reading 0 0000294C E864FE call disp_msg_asciz 0 0000294F BA[954D] mov dx, drive ; dx-> "ing drive _" 0 00002952 E85EFE call disp_msg_asciz 4893 .ww3_error: 0 00002955 F9 stc 4895 .ww3: 0 00002956 5E pop si 0 00002957 59 pop cx 0 00002958 5B pop bx 0 00002959 5A pop dx 0 0000295A 58 pop ax 0 0000295B 9C pushf 0 0000295C 40 inc ax 0 0000295D 7501 jnz @F 0 0000295F 42 inc dx 4905 @@: 0 00002960 035EDC add bx, word [bp + ldBytesPerSector] 0 00002963 9D popf 0 00002964 C3 retn 4909 4910 4911 ; INP: dx:ax = sector to read 4912 ; cl = drive to read from (0 = A:) 4913 ; ds:bx -> buffer 4914 ; STT: ds = ss 4915 ; OUT: CY if failure, error message displayed to stdout 4916 ; NC if success 4917 ; dx:ax = incremented 4918 ; ds:bx -> behind buffer 4919 ; (bx += word[bp + ldBytesPerSector] 4920 read_sector: 0 00002965 50 push ax 0 00002966 52 push dx 0 00002967 53 push bx 0 00002968 51 push cx 0 00002969 56 push si 4926 .plw1: 0 0000296A 833E[3808]00 cmp word [cmd_line_image_file.name], 0 0 0000296F 742D je .drive 4929 0 00002971 57 push di 0 00002972 53 push bx 0 00002973 E89F00 call image_seek 0 00002976 5A pop dx 0 00002977 5F pop di 0 00002978 721C jc .image_fail_seek 4936 0 0000297A 8B0E[1008] mov cx, word [m_sector_size] 0 0000297E B43F mov ah, 3Fh 0 00002980 F9 stc 0 00002981 CD21 int 21h 0 00002983 7308 jnc @F 0 00002985 BA[153B] mov dx, msg.image_fail.read 0 00002988 E81AEF call disp_dos_error 0 0000298B EBC8 jmp write_sector.ww3_error 4945 4946 @@: 0 0000298D 39C8 cmp ax, cx 0 0000298F 74C5 je write_sector.ww3 ; (NC) 0 00002991 BA[303B] mov dx, msg.image_fail_enough.read 0 00002994 EB03 jmp @F 4951 4952 .image_fail_seek: 0 00002996 BA[F13A] mov dx, msg.image_fail_seek.read 4954 @@: 0 00002999 E817FE call disp_msg_asciz 0 0000299C EBB7 jmp write_sector.ww3_error 4957 4958 .drive: 0 0000299E 51 push cx 0 0000299F 80C141 add cl, 'A' 0 000029A2 880E[9F4D] mov byte [driveno], cl 0 000029A6 59 pop cx 0 000029A7 F606[D829]07 testopt [internalflags], oldpacket| newpacket| ntpacket 0 000029AC 7513 jnz .plw3 ; if using a packet --> 0 000029AE 85D2 test dx, dx 0 000029B0 7556 jnz .error_sector_not_found 0 000029B2 92 xchg ax, dx ; dx = sector to read 0 000029B3 91 xchg ax, cx ; al = drive number 0 000029B4 B90100 mov cx, 1 4970 .oldint: 0 000029B7 55 push bp 0 000029B8 57 push di 0 000029B9 CD25 int 25h 0 000029BB 44 inc sp 0 000029BC 44 inc sp 0 000029BD 5F pop di 0 000029BE 5D pop bp 0 000029BF EB49 jmp .done 4979 4980 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 4981 .plw3: 0 000029C1 53 push bx 0 000029C2 BB[042A] mov bx, packet 0 000029C5 8907 mov word [bx+0], ax ; LoWord sector number 0 000029C7 895702 mov word [bx+2], dx ; HiWord sector number 0 000029CA C747040100 mov word [bx+4], 1 ; number of sectors 0 000029CF 88C8 mov al, cl 0 000029D1 8F4706 pop word [bx+6] ; transfer address ofs 0 000029D4 8C5F08 mov word [bx+8], ds ; transfer address seg 0 000029D7 B9FFFF mov cx, -1 4991 0 000029DA E8A600 call lockdrive 4993 0 000029DD 36F606[D829]06 testopt [ss:internalflags], newpacket| ntpacket 0 000029E3 74D2 jz .oldint 0 000029E5 88C2 mov dl, al ; A: = 0, ... 0 000029E7 BE0000 mov si, 0000h ; read, assume "unknown data" 4998 %if _VDD 0 000029EA F606[D829]04 testopt [internalflags], ntpacket 0 000029EF 750A jnz .vdd 5001 %endif 0 000029F1 FEC2 inc dl ; A: = 1, ... 0 000029F3 B80573 mov ax, 7305h ; ds:(e)bx-> packet 0 000029F6 F9 stc 0 000029F7 CD21 int 21h 0 000029F9 EB0F jmp short .done 5007 %if _VDD 5008 .vdd: 0 000029FB A1[E429] mov ax, word [hVdd] 0 000029FE B90500 mov cx, 5 0 00002A01 C4C4580290 DispatchCall 0 00002A06 EB02 jmp short .done 5013 %endif 5014 .error_sector_not_found: 0 00002A08 B008 mov al, 8 ; "sector not found" 5016 .done: 0 00002A0A 9C pushf 0 00002A0B E89A00 call unlockdrive 0 00002A0E 9D popf 0 00002A0F BA[894D] mov dx, reading 0 00002A12 E923FF jmp write_sector.ww1 5022 5023 5024 image_seek: 0 00002A15 BE[0008] mov si, m_seek 0 00002A18 BF[1008] mov di, m_sector_size 0 00002A1B E8ADDE call multiply_dxax_dword_di_to_qword_si 0 00002A1E BFF8FF mov di, -8 0 00002A21 F8 clc 5030 @@: 0 00002A22 8B85[1008] mov ax, word [m_offset + 8 + di] 0 00002A26 1185[0808] adc word [m_seek + 8 + di], ax 0 00002A2A 47 inc di 0 00002A2B 47 inc di 0 00002A2C 75F4 jnz @B 0 00002A2E 722F jc .image_fail_seek 5037 0 00002A30 BF[3808] mov di, cmd_line_image_file 0 00002A33 56 push si 0 00002A34 E888ED call open_file_readwrite 0 00002A37 5E pop si 0 00002A38 7225 jc .image_fail_seek 5043 0 00002A3A B84271 mov ax, 7142h 0 00002A3D 89F2 mov dx, si 0 00002A3F B100 mov cl, 0 0 00002A41 F9 stc 0 00002A42 CD21 int 21h 0 00002A44 7318 jnc .image_seek_done 0 00002A46 837C0400 cmp word [si + 4], 0 0 00002A4A 7513 jnz .image_fail_seek 0 00002A4C 837C0600 cmp word [si + 6], 0 0 00002A50 750D jnz .image_fail_seek 0 00002A52 8B14 mov dx, word [si] 0 00002A54 8B4C02 mov cx, word [si + 2] 0 00002A57 B80042 mov ax, 4200h 0 00002A5A CD21 int 21h 0 00002A5C 7201 jc .image_fail_seek 5059 .image_seek_done: 0 00002A5E A8 db __TEST_IMM8 ; (NC, skip stc) 5061 .image_fail_seek: 0 00002A5F F9 stc 0 00002A60 C3 retn 5064 5065 5066 ; INP: dx:ax = first sector 5067 ; ds:bx -> buffer 5068 ; cl = drive number 5069 ; OUT: dx:ax = sector number after last written 5070 ; ds:bx -> buffer after last read 5071 ; CHG: - 5072 ; STT: ds = ss 5073 symhint_store_and_label write_ae_512_bytes 0 00002A61 57 push di 0 00002A62 BF0002 mov di, 512 5076 .loop: 0 00002A65 E81EFE call write_sector 0 00002A68 7206 jc .error 0 00002A6A 2B7EDC sub di, word [bp + ldBytesPerSector] 0 00002A6D 77F6 ja .loop 0 00002A6F F8 clc 5082 .error: 0 00002A70 5F pop di 0 00002A71 C3 retn 5085 5086 ; INP: dx:ax = first sector 5087 ; ds:bx -> buffer 5088 ; cl = drive number 5089 ; OUT: dx:ax = sector number after last read 5090 ; ds:bx -> buffer after last written 5091 ; CHG: - 5092 ; STT: ds = ss 5093 read_ae_512_bytes: 0 00002A72 57 push di 0 00002A73 BF0002 mov di, 512 5096 .loop: 0 00002A76 E8ECFE call read_sector 0 00002A79 7206 jc .error 0 00002A7B 2B7EDC sub di, word [bp + ldBytesPerSector] 0 00002A7E 77F6 ja .loop 0 00002A80 F8 clc 5102 .error: 0 00002A81 5F pop di 0 00002A82 C3 retn 5105 5106 5107 ; INP: byte [ss:drivenumber] = 0-based drive number 5108 ; OUT: CF 5109 ; byte [ss:internalflags] & locked 5110 ; CHG: - 5111 lockdrive: 0 00002A83 50 push ax 0 00002A84 53 push bx 0 00002A85 51 push cx 0 00002A86 52 push dx 0 00002A87 368A1E[EE29] mov bl, byte [ss:drivenumber] 0 00002A8C FEC3 inc bl 0 00002A8E B700 mov bh, 0 0 00002A90 B94A08 mov cx, 084Ah 0 00002A93 BA0100 mov dx, 0001h 0 00002A96 B80D44 mov ax, 440Dh 0 00002A99 CD21 int 21h 0 00002A9B 7206 jc @F 0 00002A9D 36800E[D829]08 setopt [ss:internalflags], locked 5125 ; NC 5126 @@: 0 00002AA3 5A pop dx 0 00002AA4 59 pop cx 0 00002AA5 5B pop bx 0 00002AA6 58 pop ax 0 00002AA7 C3 retn 5132 5133 5134 ; INP: byte [ss:drivenumber] = 0-based drive number 5135 ; byte [ss:internalflags] & locked 5136 ; OUT: CF 5137 ; CHG: - 5138 unlockdrive: 0 00002AA8 50 push ax 0 00002AA9 53 push bx 0 00002AAA 51 push cx 0 00002AAB 52 push dx 0 00002AAC 36F606[D829]08 testopt [ss:internalflags], locked 0 00002AB2 741C jz @F ; --> (NC) 0 00002AB4 368A1E[EE29] mov bl, byte [ss:drivenumber] 0 00002AB9 FEC3 inc bl 0 00002ABB B700 mov bh, 0 0 00002ABD B96A08 mov cx, 086Ah 0 00002AC0 BA0100 mov dx, 0001h 0 00002AC3 B80D44 mov ax, 440Dh 0 00002AC6 CD21 int 21h 0 00002AC8 7206 jc @F 0 00002ACA 368026[D829]F7 clropt [ss:internalflags], locked 5154 ; NC 5155 @@: 0 00002AD0 5A pop dx 0 00002AD1 59 pop cx 0 00002AD2 5B pop bx 0 00002AD3 58 pop ax 0 00002AD4 C3 retn 5161 5162 0 00002AD5 00 align 4, db 0 0 00002AD8 00000000 internalflags: dd 0 5165 oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 5166 newpacket equ 2 ; Int21.7305 packet method available (L, W) 5167 ntpacket equ 4 ; VDD registered and usable (L, W) 5168 locked equ 8 ; locked drive 5169 runningnt equ 20000h ; running in NTVDM 5170 detectedcopysector equ 10h 5171 detectedcopyinfo equ 20h 5172 detectedinfo equ 40h 5173 detectedfsineeded equ 80h 5174 5175 align 2, db 0 0 00002ADC 00 oemname: times 8 db 0 0 00002AE4 0000 hVdd: dw 0 0 00002AE6 FFFF load_unit: dw -1 0 00002AE8 FFFF load_use_partinfo: dw -1 0 00002AEA FFFF load_use_query_geometry:dw -1 0 00002AEC FFFF load_use_lba: dw -1 0 00002AEE 00 drivenumber: db 0 5183 0 00002AEF 00 align 4, db 0 5185 info_reset_struc: 5186 .signature1: 0 00002AF0 52526141 dd FSINFO.signature1_value 5188 .signature1_size: equ $ - .signature1 5189 .signature2_plus_entries: 0 00002AF4 72724161 dd FSINFO.signature2_value 0 00002AF8 FFFFFFFF dd -1 0 00002AFC FFFFFFFF dd -1 5193 .signature2_plus_entries_size: equ $ - .signature2_plus_entries 5194 .signature3: 0 00002B00 000055AA dd FSINFO.signature3_value 5196 .signature3_size: equ $ - .signature3 5197 5198 align 4, db 0 0 00002B04 00000000 packet: dd 0 ; sector number 0 00002B08 0000 dw 0 ; number of sectors to read 0 00002B0A 00000000 dd 0 ; transfer address Segm:OOOO 5202 5203 struc GINFO 5204 giAutoLowSingleHigh: 0 00000100 ?? giAuto: resb 1 0 00000101 ?? giSingle: resb 1 0 00000102 ???????? giValue: resd 1 0 00000106 ?? giLength: resb 1 0 00000107 ?? giOffset: resb 1 0 00000108 ???? giName: resw 1 5211 endstruc 5212 5213 g_table: 5214 5215 g_heads: 0 00002B0E 0000 .auto_low_single_high: dw 0 0 00002B10 00000000 .value: dd 0 0 00002B14 02 .length: db 2 0 00002B15 0F .offset: db bpbCHSHeads 0 00002B16 [5F3E] .name: dw msg.g_heads 5221 5222 g_sectors: 0 00002B18 0000 .auto_low_single_high: dw 0 0 00002B1A 00000000 .value: dd 0 0 00002B1E 02 .length: db 2 0 00002B1F 0D .offset: db bpbCHSSectors 0 00002B20 [6A3E] .name: dw msg.g_sectors 5228 5229 g_hidden: 0 00002B22 0000 .auto_low_single_high: dw 0 0 00002B24 00000000 .value: dd 0 0 00002B28 04 .length: db 4 0 00002B29 11 .offset: db bpbHiddenSectors 0 00002B2A [773E] .name: dw msg.g_hidden 5235 5236 g_table_end: 5237 5238 5239 msg: 0 00002B2C 494E5354534543543A .help: db "INSTSECT: Install boot sectors. 2018--2024 by E. C. Masloch",13,10 0 00002B35 20496E7374616C6C20 0 00002B3E 626F6F742073656374 0 00002B47 6F72732E2032303138 0 00002B50 2D2D32303234206279 0 00002B59 20452E20432E204D61 0 00002B62 736C6F63680D0A 0 00002B69 0D0A db 13,10 0 00002B6B 5573616765206F6620 db "Usage of the works is permitted provided that this",13,10 0 00002B74 74686520776F726B73 0 00002B7D 206973207065726D69 0 00002B86 747465642070726F76 0 00002B8F 696465642074686174 0 00002B98 20746869730D0A 0 00002B9F 696E737472756D656E db "instrument is retained with the works, so that any entity",13,10 0 00002BA8 742069732072657461 0 00002BB1 696E65642077697468 0 00002BBA 2074686520776F726B 0 00002BC3 732C20736F20746861 0 00002BCC 7420616E7920656E74 0 00002BD5 6974790D0A 0 00002BDA 746861742075736573 db "that uses the works is notified of this instrument.",13,10 0 00002BE3 2074686520776F726B 0 00002BEC 73206973206E6F7469 0 00002BF5 66696564206F662074 0 00002BFE 68697320696E737472 0 00002C07 756D656E742E0D0A 0 00002C0F 0D0A db 13,10 0 00002C11 444953434C41494D45 db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 0 00002C1A 523A2054484520574F 0 00002C23 524B53204152452057 0 00002C2C 4954484F5554205741 0 00002C35 5252414E54592E0D0A 0 00002C3E 0D0A db 13,10 0 00002C40 4F7074696F6E733A0D db "Options:",13,10 0 00002C49 0A 0 00002C4A 09613A09096C6F6164 db 9,"a:",9,9,"load or update boot sectors of specified drive",13,10 0 00002C53 206F72207570646174 0 00002C5C 6520626F6F74207365 0 00002C65 63746F7273206F6620 0 00002C6E 737065636966696564 0 00002C77 2064726976650D0A 0 00002C7F 092F4D3D66696C656E db 9,"/M=filename",9,"operate on FS image file instead of drive",13,10 0 00002C88 616D65096F70657261 0 00002C91 7465206F6E20465320 0 00002C9A 696D6167652066696C 0 00002CA3 6520696E7374656164 0 00002CAC 206F66206472697665 0 00002CB5 0D0A 0 00002CB7 092F4D4E09096F7065 db 9,"/MN",9,9,"operate on drive instead of image file (default)",13,10 0 00002CC0 72617465206F6E2064 0 00002CC9 7269766520696E7374 0 00002CD2 656164206F6620696D 0 00002CDB 6167652066696C6520 0 00002CE4 2864656661756C7429 0 00002CED 0D0A 0 00002CEF 092F4D533D6E756D62 db 9,"/MS=number",9,"set sector size of FS image file (default 512)",13,10 0 00002CF8 657209736574207365 0 00002D01 63746F722073697A65 0 00002D0A 206F6620465320696D 0 00002D13 6167652066696C6520 0 00002D1C 2864656661756C7420 0 00002D25 353132290D0A 0 00002D2B 092F4D4F3D6E756D62 db 9,"/MO=number",9,"set offset in image file in bytes (default 0)",13,10 0 00002D34 657209736574206F66 0 00002D3D 6673657420696E2069 0 00002D46 6D6167652066696C65 0 00002D4F 20696E206279746573 0 00002D58 202864656661756C74 0 00002D61 2030290D0A 0 00002D66 092F4D4F783D6E756D db 9,"/MOx=number",9,"set offset (x = S sectors, K 1024, M 1024 * 1024)",13,10 0 00002D6F 62657209736574206F 0 00002D78 666673657420287820 0 00002D81 3D205320736563746F 0 00002D8A 72732C204B20313032 0 00002D93 342C204D2031303234 0 00002D9C 202A2031303234290D 0 00002DA5 0A 0 00002DA6 0D0A db 13,10 5256 %if _NUM_REPLACEMENTS 5257 _autodigitsstrdef DEF, _NUM_REPLACEMENTS 0 00002DA8 092F46783D66696C65 db 9,"/Fx=filename",9,"replace Xth name in the boot sector, X = 1 to ",_DEF,13,10 0 00002DB1 6E616D65097265706C 0 00002DBA 61636520587468206E 0 00002DC3 616D6520696E207468 0 00002DCC 6520626F6F74207365 0 00002DD5 63746F722C2058203D 0 00002DDE 203120746F20340D0A 0 00002DE7 092F463D66696C656E db 9,"/F=filename",9,"alias to /F1=filename",13,10 0 00002DF0 616D6509616C696173 0 00002DF9 20746F202F46313D66 0 00002E02 696C656E616D650D0A 0 00002E0B 0D0A db 13,10 5261 %endif 0 00002E0D 092F55204B45455009 db 9,"/U KEEP",9,9,"keep default/current boot unit handling (default)",13,10 0 00002E16 096B65657020646566 0 00002E1F 61756C742F63757272 0 00002E28 656E7420626F6F7420 0 00002E31 756E69742068616E64 0 00002E3A 6C696E672028646566 0 00002E43 61756C74290D0A 0 00002E4A 092F55204155544F09 db 9,"/U AUTO",9,9,"patch boot loader to use auto boot unit handling",13,10 0 00002E53 09706174636820626F 0 00002E5C 6F74206C6F61646572 0 00002E65 20746F207573652061 0 00002E6E 75746F20626F6F7420 0 00002E77 756E69742068616E64 0 00002E80 6C696E670D0A 0 00002E86 092F55207878090970 db 9,"/U xx",9,9,"patch boot loader to use XXh as a fixed unit",13,10 0 00002E8F 6174636820626F6F74 0 00002E98 206C6F616465722074 0 00002EA1 6F2075736520585868 0 00002EAA 206173206120666978 0 00002EB3 656420756E69740D0A 0 00002EBC 0D0A db 13,10 0 00002EBE 092F50204B45455009 db 9,"/P KEEP",9,9,"keep default/current part info handling (default)",13,10 0 00002EC7 096B65657020646566 0 00002ED0 61756C742F63757272 0 00002ED9 656E74207061727420 0 00002EE2 696E666F2068616E64 0 00002EEB 6C696E672028646566 0 00002EF4 61756C74290D0A 0 00002EFB 092F50204155544F09 db 9,"/P AUTO",9,9,"patch boot loader to use auto part info handling",13,10 0 00002F04 09706174636820626F 0 00002F0D 6F74206C6F61646572 0 00002F16 20746F207573652061 0 00002F1F 75746F207061727420 0 00002F28 696E666F2068616E64 0 00002F31 6C696E670D0A 0 00002F37 092F50204E4F4E4509 db 9,"/P NONE",9,9,"patch boot loader to use fixed part info",13,10 0 00002F40 09706174636820626F 0 00002F49 6F74206C6F61646572 0 00002F52 20746F207573652066 0 00002F5B 697865642070617274 0 00002F64 20696E666F0D0A 0 00002F6B 0D0A db 13,10 0 00002F6D 092F51204B45455009 db 9,"/Q KEEP",9,9,"keep default/current query geometry handling (default)",13,10 0 00002F76 096B65657020646566 0 00002F7F 61756C742F63757272 0 00002F88 656E74207175657279 0 00002F91 2067656F6D65747279 0 00002F9A 2068616E646C696E67 0 00002FA3 202864656661756C74 0 00002FAC 290D0A 0 00002FAF 092F51204155544F09 db 9,"/Q AUTO",9,9,"patch boot loader to use auto query geometry handling",13,10 0 00002FB8 09706174636820626F 0 00002FC1 6F74206C6F61646572 0 00002FCA 20746F207573652061 0 00002FD3 75746F207175657279 0 00002FDC 2067656F6D65747279 0 00002FE5 2068616E646C696E67 0 00002FEE 0D0A 0 00002FF0 092F51204E4F4E4509 db 9,"/Q NONE",9,9,"patch boot loader to use fixed geometry",13,10 0 00002FF9 09706174636820626F 0 00003002 6F74206C6F61646572 0 0000300B 20746F207573652066 0 00003014 697865642067656F6D 0 0000301D 657472790D0A 0 00003023 0D0A db 13,10 0 00003025 092F4C204B45455009 db 9,"/L KEEP",9,9,"keep default/current LBA handling (default)",13,10 0 0000302E 096B65657020646566 0 00003037 61756C742F63757272 0 00003040 656E74204C42412068 0 00003049 616E646C696E672028 0 00003052 64656661756C74290D 0 0000305B 0A 0 0000305C 092F4C204155544F09 db 9,"/L AUTO",9,9,"patch boot loader to use auto LBA handling",13,10 0 00003065 09706174636820626F 0 0000306E 6F74206C6F61646572 0 00003077 20746F207573652061 0 00003080 75746F204C42412068 0 00003089 616E646C696E670D0A 0 00003092 092F4C204155544F48 db 9,"/L AUTOHDD",9,"patch boot loader to use auto LBA (HDD-only) handling",13,10 0 0000309B 444409706174636820 0 000030A4 626F6F74206C6F6164 0 000030AD 657220746F20757365 0 000030B6 206175746F204C4241 0 000030BF 20284844442D6F6E6C 0 000030C8 79292068616E646C69 0 000030D1 6E670D0A 0 000030D5 092F4C204E4F4E4509 db 9,"/L NONE",9,9,"patch boot loader to use only CHS",13,10 0 000030DE 09706174636820626F 0 000030E7 6F74206C6F61646572 0 000030F0 20746F20757365206F 0 000030F9 6E6C79204348530D0A 0 00003102 0D0A db 13,10 0 00003104 092F47204B45455009 db 9,"/G KEEP",9,9,"keep all current geometry (default)",13,10 0 0000310D 096B65657020616C6C 0 00003116 2063757272656E7420 0 0000311F 67656F6D6574727920 0 00003128 2864656661756C7429 0 00003131 0D0A 0 00003133 092F47204155544F09 db 9,"/G AUTO",9,9,"read all auto geometry from DOS",13,10 0 0000313C 097265616420616C6C 0 00003145 206175746F2067656F 0 0000314E 6D657472792066726F 0 00003157 6D20444F530D0A 0 0000315E 092F47204845414453 db 9,"/G HEADS=x",9,"set geometry CHS heads (x = KEEP, AUTO, numeric)",13,10 0 00003167 3D7809736574206765 0 00003170 6F6D65747279204348 0 00003179 532068656164732028 0 00003182 78203D204B4545502C 0 0000318B 204155544F2C206E75 0 00003194 6D65726963290D0A 0 0000319C 092F4720534543544F db 9,"/G SECTORS=x",9,"set geometry CHS sectors (x = KEEP, AUTO, numeric)",13,10 0 000031A5 52533D780973657420 0 000031AE 67656F6D6574727920 0 000031B7 43485320736563746F 0 000031C0 7273202878203D204B 0 000031C9 4545502C204155544F 0 000031D2 2C206E756D65726963 0 000031DB 290D0A 0 000031DE 092F47204849444445 db 9,"/G HIDDEN=x",9,"set geometry hidden (x = KEEP, AUTO, numeric)",13,10 0 000031E7 4E3D78097365742067 0 000031F0 656F6D657472792068 0 000031F9 696464656E20287820 0 00003202 3D204B4545502C2041 0 0000320B 55544F2C206E756D65 0 00003214 726963290D0A 0 0000321A 0D0A db 13,10 0 0000321C 092F53520909646F20 db 9,"/SR",9,9,"do not read boot sector from source file (default)",13,10 0 00003225 6E6F74207265616420 0 0000322E 626F6F742073656374 0 00003237 6F722066726F6D2073 0 00003240 6F757263652066696C 0 00003249 65202864656661756C 0 00003252 74290D0A 0 00003256 092F533D66696C656E db 9,"/S=filename",9,"read boot sector loader from source file",13,10 0 0000325F 616D65097265616420 0 00003268 626F6F742073656374 0 00003271 6F72206C6F61646572 0 0000327A 2066726F6D20736F75 0 00003283 7263652066696C650D 0 0000328C 0A 0 0000328D 092F5331323D66696C db 9,"/S12=filename",9,"as /S=filename but only for FAT12 (also /S16, /S32)",13,10 0 00003296 656E616D6509617320 0 0000329F 2F533D66696C656E61 0 000032A8 6D6520627574206F6E 0 000032B1 6C7920666F72204641 0 000032BA 5431322028616C736F 0 000032C3 202F5331362C202F53 0 000032CC 3332290D0A 0 000032D1 092F5356090976616C db 9,"/SV",9,9,"validate boot sector jump and FS ID (default)",13,10 0 000032DA 696461746520626F6F 0 000032E3 7420736563746F7220 0 000032EC 6A756D7020616E6420 0 000032F5 465320494420286465 0 000032FE 6661756C74290D0A 0 00003306 092F534E0909646F20 db 9,"/SN",9,9,"do not validate boot sector jump and FS ID",13,10 0 0000330F 6E6F742076616C6964 0 00003318 61746520626F6F7420 0 00003321 736563746F72206A75 0 0000332A 6D7020616E64204653 0 00003333 2049440D0A 5290 %if _FAT32 0 00003338 092F5349090976616C db 9,"/SI",9,9,"validate FAT32 FSIBOOT compatibility (default)",13,10 0 00003341 696461746520464154 0 0000334A 333220465349424F4F 0 00003353 5420636F6D70617469 0 0000335C 62696C697479202864 0 00003365 656661756C74290D0A 0 0000336E 092F534A0909646F20 db 9,"/SJ",9,9,"do not validate FAT32 FSIBOOT compatiblity",13,10 0 00003377 6E6F742076616C6964 0 00003380 617465204641543332 0 00003389 20465349424F4F5420 0 00003392 636F6D70617469626C 0 0000339B 6974790D0A 0 000033A0 092F53473D7369676E db 9,"/SG=sign",9,"check for FAT32 FSIBOOT exact signature match",13,10 0 000033A9 09636865636B20666F 0 000033B2 722046415433322046 0 000033BB 5349424F4F54206578 0 000033C4 616374207369676E61 0 000033CD 74757265206D617463 0 000033D6 680D0A 5294 %endif 0 000033D9 0D0A db 13,10 0 000033DB 092F42530909777269 db 9,"/BS",9,9,"write boot sector to drive's boot sector (default)",13,10 0 000033E4 746520626F6F742073 0 000033ED 6563746F7220746F20 0 000033F6 647269766527732062 0 000033FF 6F6F7420736563746F 0 00003408 72202864656661756C 0 00003411 74290D0A 0 00003415 092F423D66696C656E db 9,"/B=filename",9,"write boot sector to file, not to drive",13,10 0 0000341E 616D65097772697465 0 00003427 20626F6F7420736563 0 00003430 746F7220746F206669 0 00003439 6C652C206E6F742074 0 00003442 6F2064726976650D0A 0 0000344B 092F424E0909646F20 db 9,"/BN",9,9,"do not write boot sector",13,10 0 00003454 6E6F74207772697465 0 0000345D 20626F6F7420736563 0 00003466 746F720D0A 0 0000346B 092F42520909726570 db 9,"/BR",9,9,"replace boot sector loader with built-in one (default)",13,10 0 00003474 6C61636520626F6F74 0 0000347D 20736563746F72206C 0 00003486 6F6164657220776974 0 0000348F 68206275696C742D69 0 00003498 6E206F6E6520286465 0 000034A1 6661756C74290D0A 0 000034A9 092F424F09096B6565 db 9,"/BO",9,9,"keep original boot sector",13,10 0 000034B2 70206F726967696E61 0 000034BB 6C20626F6F74207365 0 000034C4 63746F720D0A 5301 %if _FAT32 0 000034CA 092F42430909726573 db 9,"/BC",9,9,"restore boot sector from backup copy",13,10 0 000034D3 746F726520626F6F74 0 000034DC 20736563746F722066 0 000034E5 726F6D206261636B75 0 000034EE 7020636F70790D0A 0 000034F6 0D0A db 13,10 0 000034F8 4F6E6C79206170706C db "Only applicable for FAT32 with sector size below or equal to 512 bytes:",13,10 0 00003501 696361626C6520666F 0 0000350A 722046415433322077 0 00003513 69746820736563746F 0 0000351C 722073697A65206265 0 00003525 6C6F77206F72206571 0 0000352E 75616C20746F203531 0 00003537 322062797465733A0D 0 00003540 0A 0 00003541 092F49530909777269 db 9,"/IS",9,9,"write FSIBOOT to drive's FSINFO sector (default)",13,10 0 0000354A 746520465349424F4F 0 00003553 5420746F2064726976 0 0000355C 652773204653494E46 0 00003565 4F20736563746F7220 0 0000356E 2864656661756C7429 0 00003577 0D0A 0 00003579 092F493D66696C656E db 9,"/I=filename",9,"write FSIBOOT to file, not to drive",13,10 0 00003582 616D65097772697465 0 0000358B 20465349424F4F5420 0 00003594 746F2066696C652C20 0 0000359D 6E6F7420746F206472 0 000035A6 6976650D0A 0 000035AB 092F49420909777269 db 9,"/IB",9,9,"write FSIBOOT to boot sector file (see /B=filename)",13,10 0 000035B4 746520465349424F4F 0 000035BD 5420746F20626F6F74 0 000035C6 20736563746F722066 0 000035CF 696C65202873656520 0 000035D8 2F423D66696C656E61 0 000035E1 6D65290D0A 0 000035E6 092F494E0909646F20 db 9,"/IN",9,9,"do not write FSIBOOT",13,10 0 000035EF 6E6F74207772697465 0 000035F8 20465349424F4F540D 0 00003601 0A 0 00003602 092F49520909726570 db 9,"/IR",9,9,"replace reserved field with built-in FSIBOOT (default)",13,10 0 0000360B 6C6163652072657365 0 00003614 72766564206669656C 0 0000361D 642077697468206275 0 00003626 696C742D696E204653 0 0000362F 49424F4F5420286465 0 00003638 6661756C74290D0A 0 00003640 092F494F09096B6565 db 9,"/IO",9,9,"keep original reserved fields (including FSIBOOT area)",13,10 0 00003649 70206F726967696E61 0 00003652 6C2072657365727665 0 0000365B 64206669656C647320 0 00003664 28696E636C7564696E 0 0000366D 6720465349424F4F54 0 00003676 2061726561290D0A 0 0000367E 092F49430909726573 db 9,"/IC",9,9,"restore FSINFO from backup copy",13,10 0 00003687 746F7265204653494E 0 00003690 464F2066726F6D2062 0 00003699 61636B757020636F70 0 000036A2 790D0A 0 000036A5 092F495A09097A6572 db 9,"/IZ",9,9,"zero out reserved fields (including FSIBOOT area)",13,10 0 000036AE 6F206F757420726573 0 000036B7 657276656420666965 0 000036C0 6C64732028696E636C 0 000036C9 7564696E6720465349 0 000036D2 424F4F542061726561 0 000036DB 290D0A 0 000036DE 092F494909096C6561 db 9,"/II",9,9,"leave invalid FSINFO structure",13,10 0 000036E7 766520696E76616C69 0 000036F0 64204653494E464F20 0 000036F9 737472756374757265 0 00003702 0D0A 0 00003704 092F495609096D616B db 9,"/IV",9,9,"make valid FSINFO if there is none (default)",13,10 0 0000370D 652076616C69642046 0 00003716 53494E464F20696620 0 0000371F 746865726520697320 0 00003728 6E6F6E652028646566 0 00003731 61756C74290D0A 0 00003738 0D0A db 13,10 0 0000373A 4F6E6C79206170706C db "Only applicable for FAT32:",13,10 0 00003743 696361626C6520666F 0 0000374C 722046415433323A0D 0 00003755 0A 0 00003756 092F430909666F7263 db 9,"/C",9,9,"force writing to backup copies",13,10 0 0000375F 652077726974696E67 0 00003768 20746F206261636B75 0 00003771 7020636F706965730D 0 0000377A 0A 0 0000377B 092F43420909666F72 db 9,"/CB",9,9,"force writing sector to backup copy",13,10 0 00003784 63652077726974696E 0 0000378D 6720736563746F7220 0 00003796 746F206261636B7570 0 0000379F 20636F70790D0A 0 000037A6 092F43490909666F72 db 9,"/CI",9,9,"force writing info to backup copy",13,10 0 000037AF 63652077726974696E 0 000037B8 6720696E666F20746F 0 000037C1 206261636B75702063 0 000037CA 6F70790D0A 0 000037CF 092F434E0909646973 db 9,"/CN",9,9,"disable writing to backup copies",13,10 0 000037D8 61626C652077726974 0 000037E1 696E6720746F206261 0 000037EA 636B757020636F7069 0 000037F3 65730D0A 0 000037F7 092F434E4209096469 db 9,"/CNB",9,9,"disable writing sector to backup copy",13,10 0 00003800 7361626C6520777269 0 00003809 74696E672073656374 0 00003812 6F7220746F20626163 0 0000381B 6B757020636F70790D 0 00003824 0A 0 00003825 092F434E4909096469 db 9,"/CNI",9,9,"disable writing info to backup copy",13,10 0 0000382E 7361626C6520777269 0 00003837 74696E6720696E666F 0 00003840 20746F206261636B75 0 00003849 7020636F70790D0A 0 00003851 092F435309096F6E6C db 9,"/CS",9,9,"only write backup copies if writing sectors (default)",13,10 0 0000385A 792077726974652062 0 00003863 61636B757020636F70 0 0000386C 696573206966207772 0 00003875 6974696E6720736563 0 0000387E 746F72732028646566 0 00003887 61756C74290D0A 0 0000388E 092F43534209096F6E db 9,"/CSB",9,9,"only write sector to backup copy if writing sector",13,10 0 00003897 6C7920777269746520 0 000038A0 736563746F7220746F 0 000038A9 206261636B75702063 0 000038B2 6F7079206966207772 0 000038BB 6974696E6720736563 0 000038C4 746F720D0A 0 000038C9 092F43534909096F6E db 9,"/CSI",9,9,"only write info to backup copy if writing sector",13,10 0 000038D2 6C7920777269746520 0 000038DB 696E666F20746F2062 0 000038E4 61636B757020636F70 0 000038ED 792069662077726974 0 000038F6 696E6720736563746F 0 000038FF 720D0A 5326 %endif 0 00003902 00 asciz 5328 0 00003903 416363657373206572 .boot_access_error: asciz "Access error.", 13,10 0 0000390C 726F722E0D0A00 0 00003913 536563746F72207369 .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 0 0000391C 7A6520746F6F20736D 0 00003925 616C6C20283C203332 0 0000392E 206279746573292E0D 0 00003937 0A00 0 00003939 536563746F72207369 .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 0 00003942 7A6520746F6F206C61 0 0000394B 72676520283E203831 0 00003954 393220627974657329 0 0000395D 2E0D0A00 0 00003961 536563746F72207369 .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 0 0000396A 7A65206E6F74206120 0 00003973 706F776572206F6620 0 0000397C 74776F2E0D0A00 0 00003983 4F7574206F66206D65 .out_of_memory: asciz "Out of memory.",13,10 0 0000398C 6D6F72792E0D0A00 0 00003994 537769746368206E6F .switch_not_supported: asciz "Switch not supported.",13,10 0 0000399D 7420737570706F7274 0 000039A6 65642E0D0A00 0 000039AC 537769746368202F4F .o_error: asciz "Switch /O invalid content.",13,10 0 000039B5 20696E76616C696420 0 000039BE 636F6E74656E742E0D 0 000039C7 0A00 0 000039C9 496E76616C69642061 .invalid_argument: asciz "Invalid argument.",13,10 0 000039D2 7267756D656E742E0D 0 000039DB 0A00 0 000039DD 4E6F20647269766520 .no_drive_specified: asciz "No drive specified.",13,10 0 000039E6 737065636966696564 0 000039EF 2E0D0A00 0 000039F3 4D756C7469706C6520 .error_multiple_drives: asciz "Multiple drives specified.",13,10 0 000039FC 647269766573207370 0 00003A05 656369666965642E0D 0 00003A0E 0A00 5339 .drive_and_image_specified: 0 00003A10 447269766520616E64 asciz "Drive and FS image specified.",13,10 0 00003A19 20465320696D616765 0 00003A22 207370656369666965 0 00003A2B 642E0D0A00 5341 .no_sector_file_specified: 0 00003A30 4E6F20626F6F742073 asciz "No boot sector file specified for /IB switch.",13,10 0 00003A39 6563746F722066696C 0 00003A42 652073706563696669 0 00003A4B 656420666F72202F49 0 00003A54 42207377697463682E 0 00003A5D 0D0A00 0 00003A60 426F6F742073656374 .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 0 00003A69 6F72207369676E6174 0 00003A72 757265206D69737369 0 00003A7B 6E6720286973206E6F 0 00003A84 74204141353568292E 0 00003A8D 0D0A00 0 00003A90 42696720626F6F7420 .bootfail_sig2: asciz "Big boot sector signature missing (is not AA55h).",13,10 0 00003A99 736563746F72207369 0 00003AA2 676E6174757265206D 0 00003AAB 697373696E67202869 0 00003AB4 73206E6F7420414135 0 00003ABD 3568292E0D0A00 5345 .bootfail_secsizeinvalid: 0 00003AC4 536563746F72207369 asciz "Sector size is invalid (not a power of two).",13,10 0 00003ACD 7A6520697320696E76 0 00003AD6 616C696420286E6F74 0 00003ADF 206120706F77657220 0 00003AE8 6F662074776F292E0D 0 00003AF1 0A00 5347 .bootfail_secsizediffer: 0 00003AF3 425042204270532064 asciz "BPB BpS differs from actual sector size.",13,10 0 00003AFC 696666657273206672 0 00003B05 6F6D2061637475616C 0 00003B0E 20736563746F722073 0 00003B17 697A652E0D0A00 0 00003B1E 42616420616D6F756E .boot_badclusters: asciz "Bad amount of clusters.",13,10 0 00003B27 74206F6620636C7573 0 00003B30 746572732E0D0A00 0 00003B38 42616420636C757374 .boot_badchain: asciz "Bad cluster chain.",13,10 0 00003B41 657220636861696E2E 0 00003B4A 0D0A00 5351 0 00003B4D 4572726F723A204175 .g_auto_failed: asciz "Error: Auto geometry DOS call failed.",13,10 0 00003B56 746F2067656F6D6574 0 00003B5F 727920444F53206361 0 00003B68 6C6C206661696C6564 0 00003B71 2E0D0A00 0 00003B75 4572726F723A204175 .g_no_auto_image: asciz "Error: Auto geometry on image file not supported.",13,10 0 00003B7E 746F2067656F6D6574 0 00003B87 7279206F6E20696D61 0 00003B90 67652066696C65206E 0 00003B99 6F7420737570706F72 0 00003BA2 7465642E0D0A00 0 00003BA9 4572726F7220777269 .image_fail.write: asciz "Error writing image file, " 0 00003BB2 74696E6720696D6167 0 00003BBB 652066696C652C2000 5355 .image_fail_enough.write: 0 00003BC4 4572726F723A204469 asciz "Error: Did not write enough to image file.",13,10 0 00003BCD 64206E6F7420777269 0 00003BD6 746520656E6F756768 0 00003BDF 20746F20696D616765 0 00003BE8 2066696C652E0D0A00 5357 .image_fail_seek.read: 0 00003BF1 4572726F723A204661 .image_fail_seek.write: asciz "Error: Failed to seek image file.",13,10 0 00003BFA 696C656420746F2073 0 00003C03 65656B20696D616765 0 00003C0C 2066696C652E0D0A00 0 00003C15 4572726F7220726561 .image_fail.read: asciz "Error reading image file, " 0 00003C1E 64696E6720696D6167 0 00003C27 652066696C652C2000 5360 .image_fail_enough.read: 0 00003C30 4572726F723A204469 asciz "Error: Did not read enough from image file.",13,10 0 00003C39 64206E6F7420726561 0 00003C42 6420656E6F75676820 0 00003C4B 66726F6D20696D6167 0 00003C54 652066696C652E0D0A 0 00003C5D 00 0 00003C5E 4E6F204653494E464F .no_fsinfo: asciz "No FSINFO sector found.",13,10 0 00003C67 20736563746F722066 0 00003C70 6F756E642E0D0A00 5363 .not_yet_non_fsinfo: 0 00003C78 464154333220776974 asciz "FAT32 with two sectors and not FSINFO not yet supported.",13,10 0 00003C81 682074776F20736563 0 00003C8A 746F727320616E6420 0 00003C93 6E6F74204653494E46 0 00003C9C 4F206E6F7420796574 0 00003CA5 20737570706F727465 0 00003CAE 642E0D0A00 0 00003CB3 4572726F723A20536F .wrong_size: asciz "Error: Source file has wrong size, expected 512 or (FAT32-only) 1024 bytes.",13,10 0 00003CBC 757263652066696C65 0 00003CC5 206861732077726F6E 0 00003CCE 672073697A652C2065 0 00003CD7 787065637465642035 0 00003CE0 3132206F7220284641 0 00003CE9 5433322D6F6E6C7929 0 00003CF2 203130323420627974 0 00003CFB 65732E0D0A00 5366 .critical_fail_fsinfo_changed: 0 00003D01 4661696C7572652074 asciz "Failure to write back original FSINFO!",13,10 0 00003D0A 6F2077726974652062 0 00003D13 61636B206F72696769 0 00003D1C 6E616C204653494E46 0 00003D25 4F210D0A00 0 00003D2A 446574656374656420 .is_fat12: asciz "Detected FAT12 FS.",13,10 0 00003D33 46415431322046532E 0 00003D3C 0D0A00 0 00003D3F 446574656374656420 .is_fat16: asciz "Detected FAT16 FS.",13,10 0 00003D48 46415431362046532E 0 00003D51 0D0A00 0 00003D54 446574656374656420 .is_fat32: asciz "Detected FAT32 FS.",13,10 0 00003D5D 46415433322046532E 0 00003D66 0D0A00 5371 %if !_FAT32 || !_FAT16 || !_FAT12 5372 .not_supported_fat_type: 5373 asciz "This FAT type is not supported in this build.",13,10 5374 %endif 5375 5376 %if _NUM_DETECT_NAMES 0 00003D69 00 align 4, db 0 5378 load_kernel_name: equ $ 0 00003D6C 00 times 12 db 0 5380 ; buffer for base name (8) + ext (3) + NUL (1) = 12 5381 %if _NUM_REPLACEMENTS 5382 .name_replacements: 0 00003D78 00 times 12 * _NUM_REPLACEMENTS db 0 5384 ; name replacement buffers, 4 times same as load_kernel_name 5385 %endif 5386 align 4, db 0 5387 .foundname: 0 00003DA8 00 times 8+1+3+1 db 0 5389 ; buffer for base name (8) + dot (1) + ext (3) + NUL (1) 0 00003DB5 00 align 2, db 0 5391 .foundname_none: 0 00003DB6 284E6F6E652900 asciz "(None)" 5393 .foundname_none_size: equ $ - .foundname_none 0 00003DBD 00 align 4, db 0 5395 .names: 5396 %assign ii 1 5397 %rep _NUM_DETECT_NAMES 5398 dw .name_ %+ ii, 0 5399 %assign ii ii + 1 5400 %endrep 0 00003DC0 [D23C]0000 dw .name_ %+ ii, 0 5399 <1> %assign ii ii + 1 0 00003DC4 [DB3C]0000 dw .name_ %+ ii, 0 5399 <1> %assign ii ii + 1 0 00003DC8 [E43C]0000 dw .name_ %+ ii, 0 5399 <1> %assign ii ii + 1 0 00003DCC [ED3C]0000 dw .name_ %+ ii, 0 5399 <1> %assign ii ii + 1 0 00003DD0 0000 dw 0 5402 %assign ii 1 5403 %rep _NUM_DETECT_NAMES 5404 _autodigitsstrdef DEF, ii 5405 %strcat string _DEF 5406 %strlen ll string 5407 %substr ones string ll 5408 %if ll >= 2 5409 %substr tens string ll - 1 5410 %else 5411 %define tens "0" 5412 %endif 5413 %deftok tokenones ones 5414 %deftok tokentens tens 5415 %if tokentens != 1 && tokenones == 1 5416 %define suffix "st" 5417 %elif tokentens != 1 && tokenones == 2 5418 %define suffix "nd" 5419 %elif tokentens != 1 && tokenones == 3 5420 %define suffix "rd" 5421 %else 5422 %define suffix "th" 5423 %endif 5424 .name_ %+ ii: asciz _DEF,suffix," name" 5425 %assign ii ii + 1 5426 %endrep 5404 <1> _autodigitsstrdef DEF, ii 5405 <1> %strcat string _DEF 5406 <1> %strlen ll string 5407 <1> %substr ones string ll 5408 <1> %if ll >= 2 5409 <1> %substr tens string ll - 1 5410 <1> %else 5411 <1> %define tens "0" 5412 <1> %endif 5413 <1> %deftok tokenones ones 5414 <1> %deftok tokentens tens 5415 <1> %if tokentens != 1 && tokenones == 1 5416 <1> %define suffix "st" 5417 <1> %elif tokentens != 1 && tokenones == 2 5418 <1> %define suffix "nd" 5419 <1> %elif tokentens != 1 && tokenones == 3 5420 <1> %define suffix "rd" 5421 <1> %else 5422 <1> %define suffix "th" 5423 <1> %endif 0 00003DD2 317374206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5425 <1> %assign ii ii + 1 5404 <1> _autodigitsstrdef DEF, ii 5405 <1> %strcat string _DEF 5406 <1> %strlen ll string 5407 <1> %substr ones string ll 5408 <1> %if ll >= 2 5409 <1> %substr tens string ll - 1 5410 <1> %else 5411 <1> %define tens "0" 5412 <1> %endif 5413 <1> %deftok tokenones ones 5414 <1> %deftok tokentens tens 5415 <1> %if tokentens != 1 && tokenones == 1 5416 <1> %define suffix "st" 5417 <1> %elif tokentens != 1 && tokenones == 2 5418 <1> %define suffix "nd" 5419 <1> %elif tokentens != 1 && tokenones == 3 5420 <1> %define suffix "rd" 5421 <1> %else 5422 <1> %define suffix "th" 5423 <1> %endif 0 00003DDB 326E64206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5425 <1> %assign ii ii + 1 5404 <1> _autodigitsstrdef DEF, ii 5405 <1> %strcat string _DEF 5406 <1> %strlen ll string 5407 <1> %substr ones string ll 5408 <1> %if ll >= 2 5409 <1> %substr tens string ll - 1 5410 <1> %else 5411 <1> %define tens "0" 5412 <1> %endif 5413 <1> %deftok tokenones ones 5414 <1> %deftok tokentens tens 5415 <1> %if tokentens != 1 && tokenones == 1 5416 <1> %define suffix "st" 5417 <1> %elif tokentens != 1 && tokenones == 2 5418 <1> %define suffix "nd" 5419 <1> %elif tokentens != 1 && tokenones == 3 5420 <1> %define suffix "rd" 5421 <1> %else 5422 <1> %define suffix "th" 5423 <1> %endif 0 00003DE4 337264206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5425 <1> %assign ii ii + 1 5404 <1> _autodigitsstrdef DEF, ii 5405 <1> %strcat string _DEF 5406 <1> %strlen ll string 5407 <1> %substr ones string ll 5408 <1> %if ll >= 2 5409 <1> %substr tens string ll - 1 5410 <1> %else 5411 <1> %define tens "0" 5412 <1> %endif 5413 <1> %deftok tokenones ones 5414 <1> %deftok tokentens tens 5415 <1> %if tokentens != 1 && tokenones == 1 5416 <1> %define suffix "st" 5417 <1> %elif tokentens != 1 && tokenones == 2 5418 <1> %define suffix "nd" 5419 <1> %elif tokentens != 1 && tokenones == 3 5420 <1> %define suffix "rd" 5421 <1> %else 5422 <1> %define suffix "th" 5423 <1> %endif 0 00003DED 347468206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5425 <1> %assign ii ii + 1 0 00003DF6 3A2000 .name_before: asciz ": " 0 00003DF9 2200 .name_quote: asciz '"' 0 00003DFB 0D0A00 .name_after: asciz 13,10 0 00003DFE 4E6F206E616D652064 .name_none: asciz "No name detected.",13,10 0 00003E07 657465637465642E0D 0 00003E10 0A00 5431 5432 %if _NUM_REPLACEMENTS 0 00003E12 4E6F2000 .no_name_found_before: asciz "No " 0 00003E16 20666F72207265706C .no_name_found_after: asciz " for replacement found!",13,10 0 00003E1F 6163656D656E742066 0 00003E28 6F756E64210D0A00 5435 0 00003E30 5265706C6163696E67 .replacing_before: asciz "Replacing " 0 00003E39 2000 0 00003E3B 2077697468202200 .replacing_between: asciz " with ",'"' 0 00003E43 222E0D0A00 .replacing_after: asciz '".',13,10 5439 %endif 5440 %endif 5441 5442 align 2, db 0 0 00003E48 464154313220 .fat12sig: fill 8, 32, db "FAT12" 0 00003E48 0 00003E50 464154313620 .fat16sig: fill 8, 32, db "FAT16" 0 00003E50 0 00003E58 464154333220 .fat32sig: fill 8, 32, db "FAT32" 0 00003E58 5446 .sector_invalid_no_jump: 0 00003E60 536563746F7220696E asciz "Sector invalid, no jump instruction.",13,10 0 00003E69 76616C69642C206E6F 0 00003E72 206A756D7020696E73 0 00003E7B 7472756374696F6E2E 0 00003E84 0D0A00 5448 .sector_invalid_too_short_jump: 0 00003E87 536563746F7220696E asciz "Sector invalid, too short jump.",13,10 0 00003E90 76616C69642C20746F 0 00003E99 6F2073686F7274206A 0 00003EA2 756D702E0D0A00 5450 .sector_invalid_too_long_jump: 0 00003EA9 536563746F7220696E asciz "Sector invalid, too long jump.",13,10 0 00003EB2 76616C69642C20746F 0 00003EBB 6F206C6F6E67206A75 0 00003EC4 6D702E0D0A00 5452 .sector_valid: 0 00003ECA 536563746F72207661 asciz "Sector valid, FS ID match and proper jump.",13,10 0 00003ED3 6C69642C2046532049 0 00003EDC 44206D617463682061 0 00003EE5 6E642070726F706572 0 00003EEE 206A756D702E0D0A00 5454 .sector_invalid_no_id: 0 00003EF7 536563746F7220696E asciz "Sector invalid, no FS ID match.",13,10 0 00003F00 76616C69642C206E6F 0 00003F09 204653204944206D61 0 00003F12 7463682E0D0A00 5456 .allowing_sector_invalid: 0 00003F19 416C6C6F77696E6720 asciz "Allowing invalid sector: " 0 00003F22 696E76616C69642073 0 00003F2B 6563746F723A2000 5458 0 00003F33 4B45455000 .keep: asciz "KEEP" 0 00003F38 4155544F00 .auto: asciz "AUTO" 0 00003F3D 4155544F48444400 .autohdd: asciz "AUTOHDD" 0 00003F45 4E4F4E4500 .none: asciz "NONE" 0 00003F4A 484541445300 .heads: asciz "HEADS" 0 00003F50 534543544F525300 .sectors: asciz "SECTORS" 0 00003F58 48494444454E00 .hidden: asciz "HIDDEN" 0 00003F5F 204348532048656164 .g_heads: asciz " CHS Heads" 0 00003F68 7300 0 00003F6A 204348532053656374 .g_sectors: asciz " CHS Sectors" 0 00003F73 6F727300 0 00003F77 2048696464656E00 .g_hidden: asciz " Hidden" 0 00003F7F 0D0A00 .linebreak: asciz 13,10 0 00003F82 2C2000 .comma: asciz ", " 0 00003F85 50726576696F757320 .g_previous: asciz "Previous geometry: " 0 00003F8E 67656F6D657472793A 0 00003F97 2000 0 00003F99 557064617465642067 .g_updated: asciz "Updated geometry: " 0 00003FA2 656F6D657472793A20 0 00003FAB 00 0 00003FAC 496E76616C6964206E .error_invalid_number: asciz "Invalid number.",13,10 0 00003FB5 756D6265722E0D0A00 0 00003FBE 205573696E67206669 .using_fix_unit: asciz " Using fixed unit of " 0 00003FC7 78656420756E697420 0 00003FD0 6F662000 0 00003FD4 682E0D0A00 .using_fix_unit_after: asciz "h.",13,10 0 00003FD9 4572726F723A20556E .unit_not_found: asciz "Error: Unit selection code not found in sector.",13,10 0 00003FE2 69742073656C656374 0 00003FEB 696F6E20636F646520 0 00003FF4 6E6F7420666F756E64 0 00003FFD 20696E20736563746F 0 00004006 722E0D0A00 0 0000400B 556E69742073656C65 .unit_not_found.keep: asciz "Unit selection code not found in sector. Keeping as is.",13,10 0 00004014 6374696F6E20636F64 0 0000401D 65206E6F7420666F75 0 00004026 6E6420696E20736563 0 0000402F 746F722E204B656570 0 00004038 696E67206173206973 0 00004041 2E0D0A00 0 00004045 4175746F20756E6974 .unit_found.set_bpbn: asciz "Auto unit selection found in sector." 0 0000404E 2073656C656374696F 0 00004057 6E20666F756E642069 0 00004060 6E20736563746F722E 0 00004069 00 0 0000406A 466978656420756E69 .unit_found.set_dl: asciz "Fixed unit selection found in sector, unit " 0 00004073 742073656C65637469 0 0000407C 6F6E20666F756E6420 0 00004085 696E20736563746F72 0 0000408E 2C20756E69742000 5480 .unit_found.set_dl.after: 0 00004096 682E00 asciz "h." 5482 .lba_found.keeping: 5483 .query_found.keeping: 5484 .partinfo_found.keeping: 0 00004099 204B656570696E6720 .unit_found.keeping: asciz " Keeping as is.",13,10 0 000040A2 61732069732E0D0A00 0 000040AB 205573696E67206175 .using_auto_unit: asciz " Using auto unit.",13,10 0 000040B4 746F20756E69742E0D 0 000040BD 0A00 5487 0 000040BF 205573696E67206669 .using_fix_partinfo: asciz " Using fixed part info.",13,10 0 000040C8 786564207061727420 0 000040D1 696E666F2E0D0A00 0 000040D9 4572726F723A205061 .partinfo_not_found: asciz "Error: Part info code not found in sector.",13,10 0 000040E2 727420696E666F2063 0 000040EB 6F6465206E6F742066 0 000040F4 6F756E6420696E2073 0 000040FD 6563746F722E0D0A00 0 00004106 5061727420696E666F .partinfo_not_found.keep:asciz "Part info code not found in sector. Keeping as is.",13,10 0 0000410F 20636F6465206E6F74 0 00004118 20666F756E6420696E 0 00004121 20736563746F722E20 0 0000412A 4B656570696E672061 0 00004133 732069732E0D0A00 0 0000413B 4175746F2070617274 .partinfo_found.mov: asciz "Auto part info found in sector." 0 00004144 20696E666F20666F75 0 0000414D 6E6420696E20736563 0 00004156 746F722E00 0 0000415B 466978656420706172 .partinfo_found.keep: asciz "Fixed part info found in sector." 0 00004164 7420696E666F20666F 0 0000416D 756E6420696E207365 0 00004176 63746F722E00 0 0000417C 205573696E67206175 .using_auto_partinfo: asciz " Using auto part info.",13,10 0 00004185 746F20706172742069 0 0000418E 6E666F2E0D0A00 5494 0 00004195 205573696E67206669 .using_fix_query: asciz " Using fixed geometry.",13,10 0 0000419E 7865642067656F6D65 0 000041A7 7472792E0D0A00 0 000041AE 4572726F723A205175 .query_not_found: asciz "Error: Query geometry code not found in sector.",13,10 0 000041B7 6572792067656F6D65 0 000041C0 74727920636F646520 0 000041C9 6E6F7420666F756E64 0 000041D2 20696E20736563746F 0 000041DB 722E0D0A00 0 000041E0 51756572792067656F .query_not_found.keep: asciz "Query geometry code not found in sector. Keeping as is.",13,10 0 000041E9 6D6574727920636F64 0 000041F2 65206E6F7420666F75 0 000041FB 6E6420696E20736563 0 00004204 746F722E204B656570 0 0000420D 696E67206173206973 0 00004216 2E0D0A00 0 0000421A 4175746F2071756572 .query_found.query: asciz "Auto query geometry found in sector." 0 00004223 792067656F6D657472 0 0000422C 7920666F756E642069 0 00004235 6E20736563746F722E 0 0000423E 00 0 0000423F 46697865642067656F .query_found.keep: asciz "Fixed geometry (disabled query) found in sector." 0 00004248 6D6574727920286469 0 00004251 7361626C6564207175 0 0000425A 6572792920666F756E 0 00004263 6420696E2073656374 0 0000426C 6F722E00 0 00004270 205573696E67206175 .using_auto_query: asciz " Using auto query geometry.",13,10 0 00004279 746F20717565727920 0 00004282 67656F6D657472792E 0 0000428B 0D0A00 5501 0 0000428E 205573696E67206E6F .using_none_lba: asciz " Using no LBA.",13,10 0 00004297 204C42412E0D0A00 0 0000429F 205573696E67206175 .using_auto_lba: asciz " Using auto LBA detection.",13,10 0 000042A8 746F204C4241206465 0 000042B1 74656374696F6E2E0D 0 000042BA 0A00 0 000042BC 4572726F723A204C42 .lba_not_found: asciz "Error: LBA detection not found in sector.",13,10 0 000042C5 412064657465637469 0 000042CE 6F6E206E6F7420666F 0 000042D7 756E6420696E207365 0 000042E0 63746F722E0D0A00 0 000042E8 4C4241206465746563 .lba_not_found.keep: asciz "LBA detection not found in sector. Keeping as is.",13,10 0 000042F1 74696F6E206E6F7420 0 000042FA 666F756E6420696E20 0 00004303 736563746F722E204B 0 0000430C 656570696E67206173 0 00004315 2069732E0D0A00 0 0000431C 20666F756E6420696E .lba_found_suffix: asciz " found in sector." 0 00004325 20736563746F722E00 0 0000432E 0D0A4572726F723A20 .lba_autohdd_not_found: asciz 13,10,"Error: Cannot patch this LBA detection to auto detection for HDD only.",13,10 0 00004337 43616E6E6F74207061 0 00004340 746368207468697320 0 00004349 4C4241206465746563 0 00004352 74696F6E20746F2061 0 0000435B 75746F206465746563 0 00004364 74696F6E20666F7220 0 0000436D 484444206F6E6C792E 0 00004376 0D0A00 0 00004379 205573696E67206175 .using_autohdd_lba: asciz " Using auto LBA detection (HDD only).",13,10 0 00004382 746F204C4241206465 0 0000438B 74656374696F6E2028 0 00004394 484444206F6E6C7929 0 0000439D 2E0D0A00 5509 0 000043A1 4E6565642046534942 .fsi_not_found: db "Need FSIBOOT: " 0 000043AA 4F4F543A20 0 000043AF 284E6F6E6520666F75 .none_found: asciz "(None found.)",13,10 0 000043B8 6E642E290D0A00 0 000043BF 4E6565642046534942 .fsi_found.1: asciz "Need FSIBOOT: " 0 000043C8 4F4F543A2000 0 000043CE 486176652046534942 .fsi_provided.1: asciz "Have FSIBOOT: " 0 000043D7 4F4F543A2000 0 000043DD 4E6565646564204653 .fsi_mismatch.1: asciz "Needed FSIBOOT doesn't match " 0 000043E6 49424F4F5420646F65 0 000043EF 736E2774206D617463 0 000043F8 682000 0 000043FB 436865636B20465349 .fsi_mismatch.3: asciz "Check FSIBOOT doesn't match " 0 00004404 424F4F5420646F6573 0 0000440D 6E2774206D61746368 0 00004416 2000 0 00004418 776861742069732066 .fsi_mismatch.2.big: asciz "what is found in the big sector.",13,10 0 00004421 6F756E6420696E2074 0 0000442A 686520626967207365 0 00004433 63746F722E0D0A00 0 0000443B 617320746865726520 .fsi_mismatch.2.none: asciz "as there is no FSINFO sector.",13,10 0 00004444 6973206E6F20465349 0 0000444D 4E464F20736563746F 0 00004456 722E0D0A00 0 0000445B 776861742069732066 .fsi_mismatch.2.found: asciz "what is found in FSINFO sector.",13,10 0 00004464 6F756E6420696E2046 0 0000446D 53494E464F20736563 0 00004476 746F722E0D0A00 0 0000447D 776861742069732061 .fsi_mismatch.2.install:asciz "what is about to be installed.",13,10 0 00004486 626F757420746F2062 0 0000448F 6520696E7374616C6C 0 00004498 65642E0D0A00 0 0000449E 20556E6B6E6F776E20 .fsi_unknown: asciz " Unknown FSIBOOT revision.",13,10 0 000044A7 465349424F4F542072 0 000044B0 65766973696F6E2E0D 0 000044B9 0A00 0 000044BB 2000 .fsi_known.1: asciz " " 0 000044BD 0D0A00 .fsi_known.2: asciz 13,10 0 000044C0 465349424F4F54 .signature.fsiboot: db "FSIBOOT" 0 000044C7 465349424558 .signature.fsibex: db "FSIBEX" 0 000044CD 206C444F5320667574 .future_fsiboot: db " lDOS future FSIBOOT rev " 0 000044D6 75726520465349424F 0 000044DF 4F542072657620 0 000044E6 580D0A00 .future_fsiboot.revision:asciz "X",13,10 0 000044EA 206C444F5320667574 .future_fsibex: db " lDOS future FSIBOOT experimental rev " 0 000044F3 75726520465349424F 0 000044FC 4F5420657870657269 0 00004505 6D656E74616C207265 0 0000450E 7620 0 00004510 58580D0A00 .future_fsibex.revision:asciz "XX",13,10 0 00004515 547970652068657572 .type_not_found: asciz "Type heuristic: (None found.)",13,10 0 0000451E 69737469633A20284E 0 00004527 6F6E6520666F756E64 0 00004530 2E290D0A00 0 00004535 547970652068657572 .type_found.1: asciz "Type heuristic: ",22h 0 0000453E 69737469633A202200 0 00004547 2200 .fsi_found.2: asciz 22h 0 00004549 220D0A00 .type_found.2: asciz 22h,13,10 5533 5534 .switch_requires_filename: 0 0000454D 537769746368207265 asciz "Switch requires a filename.",13,10 0 00004556 717569726573206120 0 0000455F 66696C656E616D652E 0 00004568 0D0A00 5536 .switch_filename_missing_unquote: 0 0000456B 537769746368206669 asciz "Switch filename missing ending quote.",13,10 0 00004574 6C656E616D65206D69 0 0000457D 7373696E6720656E64 0 00004586 696E672071756F7465 0 0000458F 2E0D0A00 5538 .switch_filename_empty: 0 00004593 537769746368206669 asciz "Switch filename is empty.",13,10 0 0000459C 6C656E616D65206973 0 000045A5 20656D7074792E0D0A 0 000045AE 00 5540 0 000045AF 56616C696420465349 .info_valid: asciz "Valid FSINFO entries detected.",13,10 0 000045B8 4E464F20656E747269 0 000045C1 657320646574656374 0 000045CA 65642E0D0A00 0 000045D0 5761726E696E673A20 .info_invalid_allowing: asciz "Warning: Invalid FSINFO entries, allowing.",13,10 0 000045D9 496E76616C69642046 0 000045E2 53494E464F20656E74 0 000045EB 726965732C20616C6C 0 000045F4 6F77696E672E0D0A00 0 000045FD 526573657474696E67 .info_invalid_resetting:asciz "Resetting invalid FSINFO entries.",13,10 0 00004606 20696E76616C696420 0 0000460F 4653494E464F20656E 0 00004618 74726965732E0D0A00 0 00004621 4E6F74207772697469 .info_writing_not: asciz "Not writing FSINFO.",13,10 0 0000462A 6E67204653494E464F 0 00004633 2E0D0A00 5545 .info_writing_sector_file: 0 00004637 57726974696E672046 asciz "Writing FSINFO to boot sector file.",13,10 0 00004640 53494E464F20746F20 0 00004649 626F6F742073656374 0 00004652 6F722066696C652E0D 0 0000465B 0A00 0 0000465D 57726974696E672046 .info_writing_file: asciz "Writing FSINFO to file.",13,10 0 00004666 53494E464F20746F20 0 0000466F 66696C652E0D0A00 0 00004677 57726974696E672046 .info_writing_sector: asciz "Writing FSINFO to sector.",13,10 0 00004680 53494E464F20746F20 0 00004689 736563746F722E0D0A 0 00004692 00 0 00004693 4E6F74207772697469 .sector_writing_not: asciz "Not writing boot sector.",13,10 0 0000469C 6E6720626F6F742073 0 000046A5 6563746F722E0D0A00 0 000046AE 57726974696E672062 .sector_writing_file: asciz "Writing boot sector to file.",13,10 0 000046B7 6F6F7420736563746F 0 000046C0 7220746F2066696C65 0 000046C9 2E0D0A00 0 000046CD 57726974696E672062 .sector_writing_sector: asciz "Writing boot sector to sector.",13,10 0 000046D6 6F6F7420736563746F 0 000046DF 7220746F2073656374 0 000046E8 6F722E0D0A00 0 000046EE 4572726F7220776869 .info_restoring_sector: db "Error while writing boot sector," 0 000046F7 6C652077726974696E 0 00004700 6720626F6F74207365 0 00004709 63746F722C 0 0000470E 20726573746F72696E asciz " restoring FSINFO sector.",13,10 0 00004717 67204653494E464F20 0 00004720 736563746F722E0D0A 0 00004729 00 0 0000472A 446574656374656420 .backup: asciz "Detected backup copy.",13,10 0 00004733 6261636B757020636F 0 0000473C 70792E0D0A00 0 00004742 446574656374656420 .no_backup: asciz "Detected no backup copy.",13,10 0 0000474B 6E6F206261636B7570 0 00004754 20636F70792E0D0A00 0 0000475D 446574656374656420 .backup_no_info: asciz "Detected backup copy without FSINFO.",13,10 0 00004766 6261636B757020636F 0 0000476F 707920776974686F75 0 00004778 74204653494E464F2E 0 00004781 0D0A00 0 00004784 57726974696E672062 .backup_writing_sector: asciz "Writing boot sector to backup copy.",13,10 0 0000478D 6F6F7420736563746F 0 00004796 7220746F206261636B 0 0000479F 757020636F70792E0D 0 000047A8 0A00 0 000047AA 57726974696E672046 .backup_writing_info: asciz "Writing FSINFO to backup copy.",13,10 0 000047B3 53494E464F20746F20 0 000047BC 6261636B757020636F 0 000047C5 70792E0D0A00 5559 .backup_not_writing_sector: 0 000047CB 4E6F74207772697469 asciz "Not writing boot sector to backup copy.",13,10 0 000047D4 6E6720626F6F742073 0 000047DD 6563746F7220746F20 0 000047E6 6261636B757020636F 0 000047EF 70792E0D0A00 5561 .backup_not_writing_info: 0 000047F5 4E6F74207772697469 asciz "Not writing FSINFO to backup copy.",13,10 0 000047FE 6E67204653494E464F 0 00004807 20746F206261636B75 0 00004810 7020636F70792E0D0A 0 00004819 00 0 0000481A 4572726F7220776869 .backup_error_sector: asciz "Error while writing boot sector to backup copy.",13,10 0 00004823 6C652077726974696E 0 0000482C 6720626F6F74207365 0 00004835 63746F7220746F2062 0 0000483E 61636B757020636F70 0 00004847 792E0D0A00 0 0000484C 4572726F7220776869 .backup_error_info: asciz "Error while writing FSINFO to backup copy.",13,10 0 00004855 6C652077726974696E 0 0000485E 67204653494E464F20 0 00004867 746F206261636B7570 0 00004870 20636F70792E0D0A00 0 00004879 4572726F723A204E6F .missing_backup_sector: asciz "Error: No backup copy of boot sector available.",13,10 0 00004882 206261636B75702063 0 0000488B 6F7079206F6620626F 0 00004894 6F7420736563746F72 0 0000489D 20617661696C61626C 0 000048A6 652E0D0A00 0 000048AB 4572726F723A204E6F .missing_backup_info: asciz "Error: No backup copy of info sector available.",13,10 0 000048B4 206261636B75702063 0 000048BD 6F7079206F6620696E 0 000048C6 666F20736563746F72 0 000048CF 20617661696C61626C 0 000048D8 652E0D0A00 0 000048DD 436F7079696E672073 .copy_sector: asciz "Copying sector loader from backup copy.",13,10 0 000048E6 6563746F72206C6F61 0 000048EF 6465722066726F6D20 0 000048F8 6261636B757020636F 0 00004901 70792E0D0A00 0 00004907 4B656570696E67206F .leave_sector: asciz "Keeping original sector loader.",13,10 0 00004910 726967696E616C2073 0 00004919 6563746F72206C6F61 0 00004922 6465722E0D0A00 0 00004929 5265706C6163696E67 .replace_sector: asciz "Replacing sector loader.",13,10 0 00004932 20736563746F72206C 0 0000493B 6F616465722E0D0A00 0 00004944 5265706C6163696E67 .replace_sector_file: asciz "Replacing sector loader from file.",13,10 0 0000494D 20736563746F72206C 0 00004956 6F616465722066726F 0 0000495F 6D2066696C652E0D0A 0 00004968 00 0 00004969 436F7079696E672046 .copy_info: asciz "Copying FSINFO from backup copy.",13,10 0 00004972 53494E464F2066726F 0 0000497B 6D206261636B757020 0 00004984 636F70792E0D0A00 0 0000498C 5A65726F696E672046 .zero_info: asciz "Zeroing FSINFO reserved fields.",13,10 0 00004995 53494E464F20726573 0 0000499E 657276656420666965 0 000049A7 6C64732E0D0A00 0 000049AE 4B656570696E67206F .leave_info: asciz "Keeping original FSINFO.",13,10 0 000049B7 726967696E616C2046 0 000049C0 53494E464F2E0D0A00 0 000049C9 5265706C6163696E67 .replace_info: asciz "Replacing FSIBOOT.",13,10 0 000049D2 20465349424F4F542E 0 000049DB 0D0A00 0 000049DE 5265706C6163696E67 .replace_info_file: asciz "Replacing FSIBOOT from file.",13,10 0 000049E7 20465349424F4F5420 0 000049F0 66726F6D2066696C65 0 000049F9 2E0D0A00 5576 0 000049FD 4572726F72206F7065 .error_file_open_write: asciz "Error opening file for writing, " 0 00004A06 6E696E672066696C65 0 00004A0F 20666F722077726974 0 00004A18 696E672C2000 0 00004A1E 4572726F72206F7065 .error_file_open_read: asciz "Error opening file for reading, " 0 00004A27 6E696E672066696C65 0 00004A30 20666F722072656164 0 00004A39 696E672C2000 5579 .error_file_open_readwrite: 0 00004A3F 4572726F72206F7065 asciz "Error opening file for R/W, " 0 00004A48 6E696E672066696C65 0 00004A51 20666F7220522F572C 0 00004A5A 2000 0 00004A5C 4572726F7220777269 .error_file_write: asciz "Error writing file, " 0 00004A65 74696E672066696C65 0 00004A6E 2C2000 0 00004A71 4572726F7220726561 .error_file_read: asciz "Error reading file, " 0 00004A7A 64696E672066696C65 0 00004A83 2C2000 0 00004A86 4572726F7220736565 .error_file_seek: asciz "Error seeking file, " 0 00004A8F 6B696E672066696C65 0 00004A98 2C2000 5584 symhint_store_string msg.dos_error_ 0 00004A9B 444F53206572726F72 .dos_error_msg_1: asciz "DOS error " 0 00004AA4 2000 0 00004AA6 68202800 .dos_error_msg_2: asciz "h (" 0 00004AAA 292E0D0A00 .dos_error_msg_3: asciz ").",13,10 5588 0 00004AAF 4E6F206572726F7200 .dos_error_0: asciz "No error" 0 00004AB8 496E76616C69642066 .dos_error_1: asciz "Invalid function" 0 00004AC1 756E6374696F6E00 0 00004AC9 46696C65206E6F7420 .dos_error_2: asciz "File not found" 0 00004AD2 666F756E6400 0 00004AD8 50617468206E6F7420 .dos_error_3: asciz "Path not found" 0 00004AE1 666F756E6400 0 00004AE7 4E6F2068616E646C65 .dos_error_4: asciz "No handles available" 0 00004AF0 7320617661696C6162 0 00004AF9 6C6500 0 00004AFC 416363657373206465 .dos_error_5: asciz "Access denied" 0 00004B05 6E69656400 0 00004B0A 496E76616C69642068 .dos_error_6: asciz "Invalid handle" 0 00004B13 616E646C6500 0 00004B19 4D4342206465737472 .dos_error_7: asciz "MCB destroyed" 0 00004B22 6F79656400 0 00004B27 4F7574206F66206D65 .dos_error_8: asciz "Out of memory" 0 00004B30 6D6F727900 0 00004B35 4D434220696E76616C .dos_error_9: asciz "MCB invalid" 0 00004B3E 696400 0 00004B41 456E7669726F6E6D65 .dos_error_10: asciz "Environment invalid" 0 00004B4A 6E7420696E76616C69 0 00004B53 6400 0 00004B55 466F726D617420696E .dos_error_11: asciz "Format invalid" 0 00004B5E 76616C696400 0 00004B64 41636365737320636F .dos_error_12: asciz "Access code invalid" 0 00004B6D 646520696E76616C69 0 00004B76 6400 0 00004B78 4461746120696E7661 .dos_error_13: asciz "Data invalid" 0 00004B81 6C696400 0 00004B85 4669787570206F7665 .dos_error_14: asciz "Fixup overflow" 0 00004B8E 72666C6F7700 0 00004B94 496E76616C69642064 .dos_error_15: asciz "Invalid drive" 0 00004B9D 7269766500 0 00004BA2 417474656D70746564 .dos_error_16: asciz "Attempted to remove current directory" 0 00004BAB 20746F2072656D6F76 0 00004BB4 652063757272656E74 0 00004BBD 206469726563746F72 0 00004BC6 7900 0 00004BC8 4E6F742073616D6520 .dos_error_17: asciz "Not same device" 0 00004BD1 64657669636500 0 00004BD8 4E6F206D6F72652066 .dos_error_18: asciz "No more files" 0 00004BE1 696C657300 0 00004BE6 4469736B2077726974 .dos_error_19: asciz "Disk write protected" 0 00004BEF 652070726F74656374 0 00004BF8 656400 0 00004BFB 556E6B6E6F776E2075 .dos_error_20: asciz "Unknown unit" 0 00004C04 6E697400 0 00004C08 4472697665206E6F74 .dos_error_21: asciz "Drive not ready" 0 00004C11 20726561647900 0 00004C18 556E6B6E6F776E2063 .dos_error_22: asciz "Unknown command" 0 00004C21 6F6D6D616E6400 0 00004C28 44617461206572726F .dos_error_23: asciz "Data error" 0 00004C31 7200 0 00004C33 426164207265717565 .dos_error_24: asciz "Bad request structure length" 0 00004C3C 737420737472756374 0 00004C45 757265206C656E6774 0 00004C4E 6800 0 00004C50 5365656B206572726F .dos_error_25: asciz "Seek error" 0 00004C59 7200 0 00004C5B 556E6B6E6F776E206D .dos_error_26: asciz "Unknown media type" 0 00004C64 656469612074797065 0 00004C6D 00 0 00004C6E 536563746F72206E6F .dos_error_27: asciz "Sector not found" 0 00004C77 7420666F756E6400 0 00004C7F 5072696E746572206F .dos_error_28: asciz "Printer out of paper" 0 00004C88 7574206F6620706170 0 00004C91 657200 0 00004C94 577269746520666175 .dos_error_29: asciz "Write fault" 0 00004C9D 6C7400 0 00004CA0 52656164206661756C .dos_error_30: asciz "Read fault" 0 00004CA9 7400 0 00004CAB 47656E6572616C2066 .dos_error_31: asciz "General failure" 0 00004CB4 61696C75726500 0 00004CBB 53686172696E672076 .dos_error_32: asciz "Sharing violation" 0 00004CC4 696F6C6174696F6E00 0 00004CCD 4C6F636B2076696F6C .dos_error_33: asciz "Lock violation" 0 00004CD6 6174696F6E00 0 00004CDC 4469736B206368616E .dos_error_34: asciz "Disk change invalid" 0 00004CE5 676520696E76616C69 0 00004CEE 6400 0 00004CF0 46434220756E617661 .dos_error_35: asciz "FCB unavailable" 0 00004CF9 696C61626C6500 0 00004D00 53686172696E672062 .dos_error_36: asciz "Sharing buffer overflow" 0 00004D09 7566666572206F7665 0 00004D12 72666C6F7700 0 00004D18 436F64652070616765 .dos_error_37: asciz "Code page mismatch" 0 00004D21 206D69736D61746368 0 00004D2A 00 0 00004D2B 43616E6E6F7420636F .dos_error_38: asciz "Cannot complete file operation" 0 00004D34 6D706C657465206669 0 00004D3D 6C65206F7065726174 0 00004D46 696F6E00 0 00004D4A 496E73756666696369 .dos_error_39: asciz "Insufficient disk space" 0 00004D53 656E74206469736B20 0 00004D5C 737061636500 0 00004D62 556E6B6E6F776E2065 .dos_error_unknown: asciz "Unknown error" 0 00004D6B 72726F7200 5630 5631 5632 align 2, db 0 5633 dos_error_table: 5634 .: 5635 %assign ii 0 5636 %rep 40 5637 _autodigitsstrdef NUMBER, ii 5638 %deftok _NUMBER _NUMBER 5639 dw msg.dos_error_ %+ _NUMBER 5640 %assign ii ii + 1 5641 %endrep 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D70 [AF49] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D72 [B849] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D74 [C949] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D76 [D849] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D78 [E749] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D7A [FC49] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D7C [0A4A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D7E [194A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D80 [274A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D82 [354A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D84 [414A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D86 [554A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D88 [644A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D8A [784A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D8C [854A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D8E [944A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D90 [A24A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D92 [C84A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D94 [D84A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D96 [E64A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D98 [FB4A] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D9A [084B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D9C [184B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004D9E [284B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DA0 [334B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DA2 [504B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DA4 [5B4B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DA6 [6E4B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DA8 [7F4B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DAA [944B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DAC [A04B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DAE [AB4B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DB0 [BB4B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DB2 [CD4B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DB4 [DC4B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DB6 [F04B] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DB8 [004C] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DBA [184C] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DBC [2B4C] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5637 <1> _autodigitsstrdef NUMBER, ii 5638 <1> %deftok _NUMBER _NUMBER 0 00004DBE [4A4C] dw msg.dos_error_ %+ _NUMBER 5640 <1> %assign ii ii + 1 5642 .after_last: equ ($ - .) >> 1 5643 5644 5645 symhint_store_string dskerr 5646 dskerrs: 5647 .: 5648 %assign ii 0 5649 %rep 0Dh 5650 _autohexitsstrdef NUMBER, ii 5651 %strcat _NUMBER "dskerr",_NUMBER 5652 %deftok _NUMBER _NUMBER 5653 db _NUMBER - dskerrs 5654 %assign ii ii + 1 5655 %endrep 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC0 0D db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC1 21 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC2 34 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC3 44 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC4 54 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC5 94 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC6 65 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC7 70 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC8 83 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DC9 94 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DCA A2 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DCB AE db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5650 <1> _autohexitsstrdef NUMBER, ii 5651 <1> %strcat _NUMBER "dskerr",_NUMBER 5652 <1> %deftok _NUMBER _NUMBER 0 00004DCC B9 db _NUMBER - dskerrs 5654 <1> %assign ii ii + 1 5656 .after_last: equ ($ - .) 0 00004DCD 57726974652070726F dskerr0: asciz "Write protect error" 0 00004DD6 74656374206572726F 0 00004DDF 7200 0 00004DE1 556E6B6E6F776E2075 dskerr1: asciz "Unknown unit error" 0 00004DEA 6E6974206572726F72 0 00004DF3 00 0 00004DF4 4472697665206E6F74 dskerr2: asciz "Drive not ready" 0 00004DFD 20726561647900 0 00004E04 556E6B6E6F776E2063 dskerr3: asciz "Unknown command" 0 00004E0D 6F6D6D616E6400 0 00004E14 44617461206572726F dskerr4: asciz "Data error (CRC)" 0 00004E1D 7220284352432900 0 00004E25 5365656B206572726F dskerr6: asciz "Seek error" 0 00004E2E 7200 0 00004E30 556E6B6E6F776E206D dskerr7: asciz "Unknown media type" 0 00004E39 656469612074797065 0 00004E42 00 0 00004E43 536563746F72206E6F dskerr8: asciz "Sector not found" 0 00004E4C 7420666F756E6400 5665 dskerr5: 0 00004E54 556E6B6E6F776E2065 dskerr9: asciz "Unknown error" 0 00004E5D 72726F7200 0 00004E62 577269746520666175 dskerrA: asciz "Write fault" 0 00004E6B 6C7400 0 00004E6E 52656164206661756C dskerrB: asciz "Read fault" 0 00004E77 7400 0 00004E79 47656E6572616C2066 dskerrC: asciz "General failure" 0 00004E82 61696C75726500 0 00004E89 207265616400 reading: asciz " read" 0 00004E8F 207772697400 writing: asciz " writ" 0 00004E95 696E67206472697665 drive: db "ing drive " 0 00004E9E 20 0 00004E9F 5F0D0A00 driveno: asciz "_",13,10 5674 5675 5676 imsg: 5677 %if _VDD 0 00004EA3 44454258585644442E .vdd: asciz "DEBXXVDD.DLL" 0 00004EAC 444C4C00 0 00004EB0 446973706174636800 .dispatch: asciz "Dispatch" 0 00004EB9 496E697400 .init: asciz "Init" 5681 align 2, db 0 0 00004EBE 4D4F555345202020 .mouse: db "MOUSE",32,32,32 ; Looks like a device name 0 00004EC6 416E64792057617473 .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 0 00004ECF 6F6E 5684 endarea .andy 0 00004ED1 57696E646F7773204E .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 0 00004EDA 54204D532D444F5320 0 00004EE3 73756273797374656D 0 00004EEC 204D6F757365204472 0 00004EF5 69766572 5686 endarea .ntdos 5687 5688 ; INP: - 5689 ; OUT: CY if not NTVDM 5690 ; NC if NTVDM 5691 ; ds = es = cs 5692 ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 5693 isnt: 0 00004EF9 B80258 mov ax, 5802h ; Get UMB link state 0 00004EFC CD21 int 21h 0 00004EFE 30E4 xor ah, ah 0 00004F00 50 push ax ; Save UMB link state 0 00004F01 B80358 mov ax, 5803h ; Set UMB link state: 0 00004F04 BB0100 mov bx, 1 ; Add UMBs to memory chain 0 00004F07 CD21 int 21h 0 00004F09 B452 mov ah, 52h 0 00004F0B BBFFFF mov bx, -1 0 00004F0E CD21 int 21h ; Get list of lists 0 00004F10 43 inc bx ; 0FFFFh ? 0 00004F11 7503E98600 jz .notnt ; invalid --> 0 00004F16 268B47FD mov ax, word [es:bx-3] ; First MCB 0 00004F1A 0E push cs 0 00004F1B 07 pop es ; reset es 5709 .loop: 0 00004F1C 8ED8 mov ds, ax ; ds = MCB 0 00004F1E 40 inc ax ; Now segment of memory block itself 0 00004F1F 31D2 xor dx, dx 0 00004F21 31DB xor bx, bx 0 00004F23 803F5A cmp byte [bx], 'Z' ; End of MCB chain? 0 00004F26 7503 jne .notlast 0 00004F28 42 inc dx 0 00004F29 EB05 jmp short .notchain 5718 .notlast: 0 00004F2B 803F4D cmp byte [bx], 'M' ; Valid MCB chain? 0 00004F2E 756C jne .error 5721 .notchain: 0 00004F30 8B4F03 mov cx, [bx+3] ; MCB size in paragraphs 5723 ; ax = current memory block 5724 ; cx = size of current memory block in paragraphs 5725 ; dx = flag whether this is the last MCB 5726 ; ds = current MCB (before memory block) 0 00004F33 837F0108 cmp word [bx+1], 8 ; MCB owner DOS? 0 00004F37 755D jne .notfound_1 0 00004F39 817F085344 cmp word [bx+8], "SD" ; MCB name "SD"? 0 00004F3E 7556 jne .notfound_1 5731 .loopsub: 0 00004F40 8ED8 mov ds, ax ; SD sub-segment inside memory block 0 00004F42 40 inc ax 0 00004F43 49 dec cx 0 00004F44 8B6F03 mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 5736 ; ax = current SD sub-segment 5737 ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 5738 ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 5739 ; bp = current SD sub-segment size in paragraphs 0 00004F47 39E9 cmp cx, bp 0 00004F49 724B jb .notfound_1 ; Goes beyond memory block, invalid --> 0 00004F4B 803F51 cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 0 00004F4E 753C jne .notfound_2 ; no --> 0 00004F50 BE0800 mov si, 8 ; Offset of device name (if SD device driver sub-segment) 0 00004F53 BF[BE4D] mov di, imsg.mouse 0 00004F56 51 push cx 0 00004F57 89F1 mov cx, si ; length of name 0 00004F59 F3A6 repe cmpsb ; blank-padded device name "MOUSE" ? 0 00004F5B 59 pop cx 0 00004F5C 752E jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 0 00004F5E 8CD8 mov ax, ds 0 00004F60 40 inc ax 0 00004F61 8ED8 mov ds, ax ; Segment of SD sub-segment 5754 ; ds = current SD sub-segment 0 00004F63 89E8 mov ax, bp ; Leave paragraph value in bp 0 00004F65 A900F0 test ax, 0F000h ; Would *16 cause an overflow? 0 00004F68 7520 jnz .notfound_3 ; Then too large --> 0 00004F6A 51 push cx 0 00004F6B B104 mov cl, 4 0 00004F6D D3E0 shl ax, cl ; *16 0 00004F6F 59 pop cx 5762 ; ax = current SD sub-segment size in byte 5763 .andy: 0 00004F70 BF[C64D] mov di, imsg.andy 0 00004F73 51 push cx 0 00004F74 B90B00 mov cx, imsg.andy_size 0 00004F77 E82E00 call findstring ; String "Andy Watson"? 0 00004F7A 59 pop cx 0 00004F7B 720D jc .notfound_3 5770 .ntdos: 0 00004F7D BF[D14D] mov di, imsg.ntdos 0 00004F80 51 push cx 0 00004F81 B92800 mov cx, imsg.ntdos_size 0 00004F84 E82100 call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 0 00004F87 59 pop cx 0 00004F88 7313 jnc .found ; (NC) 5777 .notfound_3: 0 00004F8A 8CD8 mov ax, ds 5779 .notfound_2: 0 00004F8C 39E9 cmp cx, bp 0 00004F8E 7406 je .notfound_1 ; End of SD memory block, get next MCB 0 00004F90 01E8 add ax, bp ; Address next SD sub-MCB 0 00004F92 29E9 sub cx, bp 0 00004F94 EBAA jmp short .loopsub ; Try next SD sub-segment 5785 .notfound_1: 0 00004F96 01C8 add ax, cx ; Address next MCB 0 00004F98 85D2 test dx, dx ; Non-zero if 'Z' MCB 0 00004F9A 7480 jz .loop ; If not at end of MCB chain, try next 5789 ; jmp short .notnt ; Otherwise, not found 5790 .error: 5791 .notnt: 0 00004F9C F9 stc 5793 .found: 0 00004F9D 0E push cs 0 00004F9E 1F pop ds ; restore ds 5796 0 00004F9F 5B pop bx ; saved UMB link state 0 00004FA0 B80358 mov ax, 5803h 0 00004FA3 9C pushf 0 00004FA4 CD21 int 21h ; Set UMB link state 0 00004FA6 9D popf 0 00004FA7 C3 retn 5803 5804 findstring: 0 00004FA8 31F6 xor si, si 5806 .loop: 0 00004FAA 56 push si 0 00004FAB 01CE add si, cx 0 00004FAD 7203 jc .notfound_c 0 00004FAF 4E dec si ; The largest offset we need for this compare 0 00004FB0 39F0 cmp ax, si 5812 .notfound_c: 0 00004FB2 5E pop si 0 00004FB3 720D jb .return ; Not found if at top of memory block --> 0 00004FB5 57 push di 0 00004FB6 56 push si 0 00004FB7 51 push cx 0 00004FB8 F3A6 repe cmpsb ; String somewhere inside program? 0 00004FBA 59 pop cx 0 00004FBB 5E pop si 0 00004FBC 5F pop di 0 00004FBD 7403 je .return ; Yes, proceed --> (if ZR, NC) 0 00004FBF 46 inc si ; Increase pointer by one 0 00004FC0 EBE8 jmp short .loop ; Try next address 5825 .return: 0 00004FC2 C3 retn 5827 %endif 5828 5829 5830 initialise: 5831 ; Check DOS version 5832 %if _VDD 0 00004FC3 55 push bp 0 00004FC4 E832FF call isnt ; NTVDM ? 0 00004FC7 5D pop bp 0 00004FC8 7205 jc .isnotnt ; no --> 0 00004FCA 800E[DA29]02 setopt [internalflags], runningnt 5838 .isnotnt: 5839 %endif 5840 0 00004FCF B80030 mov ax, 3000h ; check DOS version 0 00004FD2 CD21 int 21h 0 00004FD4 86C4 xchg al, ah 0 00004FD6 3D1F03 cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 0 00004FD9 7205 jb .notoldpacket ; no --> 0 00004FDB 800E[D829]01 setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 5847 .notoldpacket: 0 00004FE0 50 push ax 0 00004FE1 31DB xor bx, bx ; preset to invalid value 0 00004FE3 B80633 mov ax, 3306h 0 00004FE6 CD21 int 21h 0 00004FE8 08C0 or al, al ; invalid, DOS 1.x error --> 0 00004FEA 7402 jz .213306invalid 0 00004FEC 3CFF cmp al, -1 ; invalid 5855 .213306invalid: 0 00004FEE 58 pop ax 0 00004FEF 7407 je .useoldver 0 00004FF1 85DB test bx, bx ; 0.0 ? 0 00004FF3 7403 jz .useoldver ; assume invalid --> 0 00004FF5 93 xchg ax, bx ; get version to ax 0 00004FF6 86C4 xchg al, ah ; strange Microsoft version format 5862 .useoldver: 0 00004FF8 3D0107 cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 0 00004FFB 7205 jb .notnewpacket ; no --> 0 00004FFD 800E[D829]03 setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 5866 .notnewpacket: 5867 %if _VDD 0 00005002 F606[DA29]02 testopt [internalflags], runningnt 0 00005007 7419 jz .novdd 0 00005009 BE[A34D] mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 0 0000500C BB[B04D] mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 0 0000500F BF[B94D] mov di, imsg.init ; es:di-> ASCIZ init entry 0 00005012 F8 clc ; ! 0 00005013 C4C4580090 RegisterModule ; register VDD 0 00005018 7208 jc .novdd ; error ? --> 0 0000501A A3[E429] mov word [hVdd], ax 0 0000501D 800E[D829]05 setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 5878 .novdd: 5879 %endif 5880 0 00005022 31C0 xor ax, ax 0 00005024 BB[6008] mov bx, first_sector_buffer ; ds:bx -> sector buffer 0 00005027 89DF mov di, bx ; es:di -> sector buffer 0 00005029 B90110 mov cx, (8192 + 2) >> 1 0 0000502C F3AB rep stosw ; fill buffer, di -> behind (first_sector_buffer+8192+2) 0 0000502E 31D2 xor dx, dx 0 00005030 8A0E[EE29] mov cl, [drivenumber] 0 00005034 53 push bx 0 00005035 E82DD9 call read_sector 0 00005038 5B pop bx 0 00005039 726D jc .access_error 5892 0 0000503B FD std ; AMD erratum 109 handling not needed 0 0000503C 26C747FE5E5E mov word [es:bx - 2], 5E5Eh ; writes to unused word (1) 0 00005042 AF scasw ; -> first_sector_buffer+8192 (at last word to sca) 0 00005043 B90110 mov cx, (8192 + 2) >> 1 0 00005046 31C0 xor ax, ax 0 00005048 F3AF repe scasw 0 0000504A 83C704 add di, 4 ; di -> first differing byte (from top) 0 0000504D FC cld 0 0000504E 57 push di 5902 0 0000504F 89DF mov di, bx 0 00005051 B90110 mov cx, (8192 + 2) >> 1 0 00005054 48 dec ax ; = FFFFh 0 00005055 F3AB rep stosw 5907 0 00005057 31C0 xor ax, ax 0 00005059 31D2 xor dx, dx 0 0000505B 8A0E[EE29] mov cl, [drivenumber] 0 0000505F 53 push bx 0 00005060 E802D9 call read_sector 0 00005063 5B pop bx 0 00005064 5A pop dx 0 00005065 7241 jc .access_error 5916 0 00005067 FD std ; AMD erratum 109 handling not needed 0 00005068 AF scasw ; di -> first_sector_buffer+8192 (last word to sca) 0 00005069 B8FFFF mov ax, -1 0 0000506C B90110 mov cx, (8192 + 2) >> 1 0 0000506F F3AF repe scasw 5922 %if 0 5923 AAAB 5924 ^ 5925 sca B, match 5926 ^ 5927 sca B, mismatch 5928 ^ 5929 stop 5930 %endif 0 00005071 83C704 add di, 4 ; di -> first differing byte (from top) 0 00005074 FC cld 5933 5934 %if 0 5935 0000000000000 5936 AAAAAAAA00000 5937 ^ 5938 FFFFFFFFFFFFF 5939 AAAAAAAA00FFF 5940 ^ 5941 %endif 0 00005075 39FA cmp dx, di ; choose the higher one 0 00005077 7302 jae @F 0 00005079 89FA mov dx, di 5945 @@: 0 0000507B 29DA sub dx, bx ; dx = sector size 5947 0 0000507D 81FA0220 cmp dx, 8192 + 2 0 00005081 732A jae .sector_too_large 0 00005083 B82000 mov ax, 32 0 00005086 39C2 cmp dx, ax 0 00005088 7228 jb .sector_too_small 5953 @@: 0 0000508A 39C2 cmp dx, ax 0 0000508C 7409 je .got_match 0 0000508E 3D0020 cmp ax, 8192 0 00005091 7324 jae .sector_not_power 0 00005093 D1E0 shl ax, 1 0 00005095 EBF3 jmp @B 5960 5961 .got_match: 0 00005097 8946DC mov word [bp + ldBytesPerSector], ax 0 0000509A B104 mov cl, 4 0 0000509C D3E8 shr ax, cl 0 0000509E 8946EA mov word [bp + ldParaPerSector], ax 0 000050A1 D1E8 shr ax, 1 0 000050A3 8946D4 mov word [bp + ldEntriesPerSector], ax 0 000050A6 F8 clc 0 000050A7 C3 retn 5970 5971 5972 .access_error: 0 000050A8 BA[0338] mov dx, msg.boot_access_error 0 000050AB EB0D jmp .error_common_j 5975 .sector_too_large: 0 000050AD BA[1338] mov dx, msg.boot_sector_too_large 0 000050B0 EB08 jmp .error_common_j 5978 .sector_too_small: 0 000050B2 BA[3938] mov dx, msg.boot_sector_too_small 0 000050B5 EB03 jmp .error_common_j 5981 .sector_not_power: 0 000050B7 BA[6138] mov dx, msg.boot_sector_not_power 5983 .error_common_j: 0 000050BA E8F6D6 call disp_msg_asciz 0 000050BD F9 stc 0 000050BE C3 retn 5987 0 000050BF 00 align 16, db 0 === Switch to base=-000100h -> "BUFFERS" 5989 section BUFFERS 5990 5991 align 8, db 0 5992 m_seek: 0 000058C0 FFFFFFFFFFFFFFFF dq -1 5994 m_offset: 0 000058C8 0000000000000000 dq 0 5996 m_sector_size: 0 000058D0 00020000 dd 512 5998 m_1: 0 000058D4 01000000 dd 1 6000 m_1024: 0 000058D8 00040000 dd 1024 6002 m_1024_times_1024: 0 000058DC 00001000 dd 1024 * 1024 6004 6005 align 4, db 0 0 000058E0 22A00000 cmd_line_flags: dd clfWriteSectorToSector | clfWriteInfoToSector | clfWriteCopySectorIfSector | clfWriteCopyInfoIfSector 6008 clfWriteSectorToFile: equ 1 6009 clfWriteSectorToSector: equ 2 6010 clfDontWriteSector: equ 4 6011 clfWriteSectorMask: equ clfWriteSectorToFile | clfWriteSectorToSector | clfDontWriteSector 6013 clfDontWriteInfo: equ 8 6014 clfWriteInfoToFile: equ 10h 6015 clfWriteInfoToSector: equ 20h 6016 clfWriteInfoToSectorFile: equ 40h 6017 clfWriteInfoMask: equ clfWriteInfoToFile | clfWriteInfoToSector | clfWriteInfoToSectorFile | clfDontWriteInfo 6020 clfReadSectorFile12: equ 80h 6021 clfReadSectorFile16: equ 100h 6022 clfReadSectorFile32: equ 200h 6023 clfAllowInvalidSector: equ 400h 6024 clfAllowInvalidInfo: equ 800h 6025 clfWriteCopySector: equ 1000h 6026 clfWriteCopySectorIfSector: equ 2000h 6027 clfWriteCopyInfo: equ 4000h 6028 clfWriteCopyInfoIfSector: equ 8000h 6029 clfLeaveSector: equ 1_0000h 6030 clfSectorFromCopy: equ 2_0000h 6031 clfLeaveInfo: equ 10_0000h 6032 clfInfoFromCopy: equ 20_0000h 6033 clfZeroInfo: equ 40_0000h 6034 clfSetOEMName: equ 100_0000h 6035 clfPreserveOEMName: equ 200_0000h 6036 clfAllowInvalidFSI: equ 400_0000h 6037 clfCheckFSI: equ 800_0000h 6038 6039 align 4, db 0 6040 cmd_line_readsector12_file: 0 000058E4 0000 .name: dw 0 0 000058E6 FFFF .handle: dw -1 6043 cmd_line_readsector16_file: 0 000058E8 0000 .name: dw 0 0 000058EA FFFF .handle: dw -1 6046 cmd_line_readsector32_file: 0 000058EC 0000 .name: dw 0 0 000058EE FFFF .handle: dw -1 6049 cmd_line_sector_file: 0 000058F0 0000 .name: dw 0 0 000058F2 FFFF .handle: dw -1 6052 cmd_line_info_file: 0 000058F4 0000 .name: dw 0 0 000058F6 FFFF .handle: dw -1 6055 cmd_line_image_file: 0 000058F8 0000 .name: dw 0 0 000058FA FFFF .handle: dw -1 6058 cmd_line_file_name_ofs: equ 0 6059 cmd_line_file_handle_ofs: equ 2 6060 6061 align 2, db 0 0 000058FC 00 fsi_needed: times 9 db 0 0 00005905 00 align 2, db 0 0 00005906 00 fsi_provided: times 9 db 0 0 0000590F 00 align 2, db 0 0 00005910 00 fsi_check: times 9 db 0 6067 0 00005919 0000 dw 0 ; insure there's an unused word in front of this (1) 0 0000591B 00 align 16, db 0 6070 first_sector_buffer: 6071 second_sector_buffer: equ first_sector_buffer - LOADDATA2 + 16 + 8192 6072 third_sector_buffer_512_bytes: equ second_sector_buffer + 8192 6074 end: equ third_sector_buffer_512_bytes + 512 6075 stack_start: equ end 6076 stack_end: equ stack_start + 4096 6077