=== Trace listing source: 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 44 struc BS 0 00000000 ?????? bsJump: resb 3 0 00000003 ???????????????? bsOEM: resb 8 47 bsBPB: 48 endstruc 49 50 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 63 bpbNew: ; offset 19h 24h 64 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 71 00000029 ebpbReserved: resb 12 ; offset 29h 34h 72 ebpbNew: ; offset 35h 40h 73 endstruc 74 75 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 80 00000007 bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 0 00000012 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 82 endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 83 84 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 90 endstruc 91 92 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 102 endstruc 103 104 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 111 endstruc 112 113 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 123 endstruc 124 125 ATTR_READONLY equ 1 126 ATTR_HIDDEN equ 2 127 ATTR_SYSTEM equ 4 128 ATTR_VOLLABEL equ 8 129 ATTR_DIRECTORY equ 10h 130 ATTR_ARCHIVE equ 20h 131 132 struc LBAPACKET 0 00000000 ???? lpSize: resw 1 0 00000002 ???? lpCount: resw 1 0 00000004 ???????? lpBuffer: resd 1 0 00000008 ???????????????? lpSector: resq 1 137 endstruc 138 139 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 146 endstruc 147 148 ptEmpty: equ 0 149 ptFAT12: equ 1 150 ptFAT16_16BIT_CHS: equ 4 151 ptExtendedCHS: equ 5 152 ptFAT16_CHS: equ 6 153 ptFAT32_CHS: equ 0Bh 154 ptFAT32: equ 0Ch 155 ptFAT16: equ 0Eh 156 ptExtended: equ 0Fh 157 ptLinux: equ 83h 158 ptExtendedLinux: equ 85h 159 160 struc FSINFO ; FAT32 FSINFO sector layout 0 00000000 ???????? .signature1: resd 1 ; 41615252h ("RRaA") for valid FSINFO 162 .signature1_value: equ 41615252h 163 .reserved1: ; former unused, initialized to zero by FORMAT 164 00000004 .fsiboot: resb 480 ; now used for FSIBOOT 0 000001E4 ???????? .signature2: resd 1 ; 61417272h ("rrAa") for valid FSINFO 166 .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 169 000001F0 .reserved2: resd 3 ; unused, initialized to zero by FORMAT 0 000001FC ???????? .signature3: resd 1 ; AA550000h for valid FSINFO or FSIBOOT 171 .signature3_value: equ 0AA550000h 172 endstruc 173 174 struc FSIBOOTG ; FSIBOOT general layout 0 00000000 ???????????????? .signature: resq 1 ; 8 byte that identify the FSIBOOT type 176 00000008 .fsicode: resb 472 ; 472 byte FSIBOOT type specific data or code 177 endstruc 178 179 %if _VDD 180 ; standard BOPs for communication with DEBXXVDD on NT platforms 181 %macro RegisterModule 0.nolist 182 db 0C4h, 0C4h, 58h, 0 183 nop 184 %endmacro 185 %macro UnRegisterModule 0.nolist 186 db 0C4h, 0C4h, 58h, 1 187 nop 188 %endmacro 189 %macro DispatchCall 0.nolist 190 db 0C4h, 0C4h, 58h, 2 191 nop 192 %endmacro 193 %endif 194 195 196 %ifndef _MAP 197 %elifempty _MAP 198 %else ; defined non-empty, str or non-str 199 [map all _MAP] 200 %endif 201 202 cpu 8086 203 org 256 === Switch to base=-000100h -> "PROGRAM" 204 section PROGRAM align=16 === Switch to base=-000100h -> "BUFFERS" 205 section BUFFERS follows=PROGRAM align=16 206 207 numdef FAT12, 1 208 numdef FAT16, 1 209 numdef FAT32, 1 210 strdef PAYLOAD_FAT12, "boot12.bin" 211 strdef PAYLOAD_FAT16, "boot16.bin" 212 strdef PAYLOAD_FAT32, "boot32.bin" 213 numdef NUM_REPLACEMENTS,4 214 numdef NUM_DETECT_NAMES,4 215 %if _NUM_REPLACEMENTS > _NUM_DETECT_NAMES 216 %error Must detect above-or-equal amount of replacement names 217 %endif 218 219 220 align 16, db 0 221 %if _FAT12 222 00000000 fat12_payload: incbin _PAYLOAD_FAT12 223 .end: 224 %if (fat12_payload.end - fat12_payload) != 512 225 %error "FAT12 payload isn't 512 bytes sized." 226 %endif 227 %endif 228 %if _FAT16 229 00000200 fat16_payload: incbin _PAYLOAD_FAT16 230 .end: 231 %if (fat16_payload.end - fat16_payload) != 512 232 %error "FAT16 payload isn't 512 bytes sized." 233 %endif 234 %endif 235 %if _FAT32 236 00000400 fat32_payload: incbin _PAYLOAD_FAT32 237 .end: 238 %assign fat32_payload.size (fat32_payload.end - fat32_payload) 239 %assign _FAT32_TWO_SECTORS 0 240 %if fat32_payload.size == 512 241 %elif fat32_payload.size == 1024 242 %assign _FAT32_TWO_SECTORS 1 243 %else 244 %error "FAT32 payload isn't 512 or 1024 bytes sized." 245 %endif 246 %else 247 %assign _FAT32_TWO_SECTORS 0 248 %endif 249 250 === Switch to base=-000100h -> "PROGRAM" 251 section PROGRAM 252 start: 253 ; 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 259 260 .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 268 269 .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 276 0 0000012A C606[EE29]FF mov byte [drivenumber], -1 278 0 0000012F BE8100 mov si, 81h 280 .loop: 0 00000132 AC lodsb 282 .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 288 0 00000140 3C2D cmp al, '-' 0 00000142 7428 je .switch 0 00000144 3C2F cmp al, '/' 0 00000146 7424 je .switch 293 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 305 306 .switch: 0 0000016C AC lodsb 0 0000016D E86825 call uppercase 309 %if _NUM_REPLACEMENTS 0 00000170 3C46 cmp al, 'F' 0 00000172 7467 je .switch_f 312 %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 335 0 000001C1 3C48 cmp al, 'H' 0 000001C3 740D je .switch_h 0 000001C5 3C3F cmp al, '?' 0 000001C7 7409 je .switch_h 340 341 .switch_not_supported: 0 000001C9 BA[9438] mov dx, msg.switch_not_supported 343 disp_error: equ $ 0 000001CC E8E425 call disp_msg_asciz 0 000001CF E9DA15 jmp exit_error 346 347 348 .switch_h: 0 000001D2 BA[2C2A] mov dx, msg.help 0 000001D5 E8DB25 call disp_msg_asciz 0 000001D8 E9DC15 jmp exit_normal 352 353 354 %if _NUM_REPLACEMENTS 355 .switch_f: 356 357 @@: 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 379 @@: 0 00000211 B80C00 mov ax, 12 0 00000214 F7E2 mul dx ; ax = 0, 12, 24, 36 0 00000216 A9 db __TEST_IMM16 ; (skip xor) 383 @@: 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 387 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 396 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 412 413 @@: 0 00000252 C60500 mov byte [di], 0 ; delete replacement name 0 00000255 E9DAFE jmp .loop 416 %endif 417 418 419 .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 426 427 @@: 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 433 434 @@: 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 440 441 @@: 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 453 .o_quoted: 454 .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 466 @@: 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 480 .o_store: 0 000002CF AA stosb 0 000002D0 EBCD jmp .o_loop 483 484 .o_end_lod: 0 000002D2 AC lodsb 486 .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 499 @@: 0 000002EC A4 movsb 0 000002ED E2FD loop @B 502 @@: 503 ; rep movsb 504 @@: 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 510 @@: 0 000002FA FC cld 0 000002FB 58 pop ax 0 000002FC 5E pop si 514 .o_done: 0 000002FD E933FE jmp .loop_got_byte 516 517 .o_error: 0 00000300 BA[AC38] mov dx, msg.o_error 0 00000303 E9C6FE jmp disp_error 520 521 .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 530 @@: 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 540 @@: 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 547 .o_store_bl_dec_si: 0 00000335 4E dec si 0 00000336 88D8 mov al, bl 0 00000338 EB95 jmp .o_store 551 552 .switch_u: 553 @@: 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 563 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 581 @@: 0 00000379 A3[E629] mov word [load_unit], ax 0 0000037C E9B3FD jmp .loop 584 585 586 .switch_p: 587 @@: 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 597 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 612 @@: 0 000003B5 A3[E829] mov word [load_use_partinfo], ax 0 000003B8 E977FD jmp .loop 615 616 617 .switch_q: 618 @@: 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 628 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 643 @@: 0 000003F1 A3[EA29] mov word [load_use_query_geometry], ax 0 000003F4 E93BFD jmp .loop 646 647 648 .switch_l: 649 @@: 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 659 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 678 @@: 0 00000438 A3[EC29] mov word [load_use_lba], ax 0 0000043B E9F4FC jmp .loop 681 682 683 .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 690 .loop_1: 0 00000450 E9DFFC jmp .loop 692 693 @@: 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 698 699 @@: 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 705 706 @@: 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 712 713 @@: 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 718 719 @@: 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 724 725 @@: 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 731 732 @@: 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 737 .loop_2: 0 000004B2 EB9C jmp .loop_1 739 740 @@: 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 748 749 @@: 0 000004C3 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 0 000004C8 800E[2008]10 setopt [cmd_line_flags], clfWriteInfoToFile 752 @@: 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 758 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 763 764 .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 768 769 770 .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 778 779 @@: 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 784 785 @@: 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 791 792 @@: 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 798 799 @@: 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 805 806 @@: 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 812 813 @@: 0 00000548 8026[2008]F8 clropt [cmd_line_flags], clfWriteSectorMask 0 0000054D 800E[2008]01 setopt [cmd_line_flags], clfWriteSectorToFile 816 @@: 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 822 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 827 828 829 .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 837 838 @@: 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 844 845 @@: 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 857 .switch_cn: 858 .switch_cni: 0 000005A5 8026[2108]3F clropt [cmd_line_flags], clfWriteCopyInfoIfSector | clfWriteCopyInfo 0 000005AA E905FF jmp .loop_2 862 863 @@: 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 875 .switch_cs: 876 .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 880 881 @@: 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 885 886 887 .switch_s: 0 000005E5 AC lodsb 0 000005E6 E8EF20 call uppercase 890 0 000005E9 3C47 cmp al, 'G' 0 000005EB 7403E98200 jne @FF 893 0 000005F0 800E[2308]08 setopt [cmd_line_flags], clfCheckFSI 895 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 903 @@: 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 917 .sg_no_quote: 918 0 0000061C 31DB xor bx, bx 920 .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 925 .switch_not_supported_j1: 0 00000626 E9A0FB jmp .switch_not_supported 927 928 .sg_not_eol: 0 00000629 7504 jne .sg_not_quoted_blank 0 0000062B 84E4 test ah, ah 0 0000062D 7440 jz .sg_done_dec 932 .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 946 .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 961 .sg_store_cl: 0 00000664 4E dec si 0 00000665 88C8 mov al, cl 964 .sg_next: 0 00000667 AA stosb 0 00000668 43 inc bx 0 00000669 AC lodsb 0 0000066A EBB2 jmp .sg_loop 969 970 .sg_done: 0 0000066C E9C3FA jmp .loop 972 973 .sg_done_dec: 0 0000066F E9C1FA jmp .loop_got_byte 975 976 @@: 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 981 982 @@: 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 987 988 @@: 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 993 994 @@: 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 999 1000 @@: 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 1005 1006 @@: 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 1013 0 000006BC 86E0 xchg al, ah 0 000006BE AC lodsb 0 000006BF 86E0 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 1029 0 000006E2 E9E4FA jmp .switch_not_supported 1031 1032 1033 .switch_s_r_type: 0 000006E5 F7D2 not dx 0 000006E7 2116[2008] and [cmd_line_flags], dx 0 000006EB E9C4FD jmp .loop_2 1037 1038 1039 .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 1048 0 000006FE E9C8FA jmp .switch_not_supported 1050 1051 1052 @@: 0 00000701 0916[2008] or word [cmd_line_flags], dx 1054 @@: 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 1060 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 1066 1067 @@: 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 1071 @@: 0 00000723 E8EB01 call process_switch_filename 0 00000726 E90AFA jmp .loop_got_byte 1074 1075 1076 .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 1090 1091 @@: 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 1101 1102 .switch_mn: 0 00000758 8326[3808]00 and word [cmd_line_image_file.name], 0 0 0000075D E9D2F9 jmp .loop 1105 1106 .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 1113 1114 @@: 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 1125 @@: 0 0000077C E87B1F call get_decimal_literal 0 0000077F EB04 jmp @F 1128 1129 .switch_ms.hex: 0 00000781 AC lodsb 0 00000782 E87D1F call get_hexadecimal_literal 1132 @@: 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 1140 @@: 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 1147 1148 @@: 0 000007AE 8916[1008] mov word [m_sector_size], dx 0 000007B2 E97DF9 jmp .loop 1151 1152 1153 .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 1167 @@: 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 1174 1175 @@: 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 1187 @@: 0 000007EF E8081F call get_decimal_literal 0 000007F2 EB04 jmp @F 1190 1191 .switch_mo.hex: 0 000007F4 AC lodsb 0 000007F5 E80A1F call get_hexadecimal_literal 1194 @@: 0 000007F8 5F pop di 0 000007F9 56 push si 0 000007FA BE[0808] mov si, m_offset 0 000007FD 87DA 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 1203 1204 1205 .switch_g: 1206 @@: 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 1216 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 1237 1238 .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 1244 1245 .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 1251 1252 .switch_g_single: 1253 @@: 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 1269 1270 @@: 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 1276 1277 @@: 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 1289 @@: 0 000008AA E84D1E call get_decimal_literal 0 000008AD EB04 jmp @F 1292 1293 .switch_g_single.hex: 0 000008AF AC lodsb 0 000008B0 E84F1E call get_hexadecimal_literal 1296 @@: 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 1302 @@: 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 1307 1308 1309 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 1334 1335 1336 .error_multiple_drives: 0 00000905 BA[F338] mov dx, msg.error_multiple_drives 0 00000908 E9C1F8 jmp disp_error 1339 1340 .error: 0 0000090B BA[C938] mov dx, msg.invalid_argument 0 0000090E E9BBF8 jmp disp_error 1343 1344 1345 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 1352 .disp_error_1: 0 0000091E E9ABF8 jmp disp_error 1354 1355 @@: 1356 .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 1366 .unquote: 0 00000933 AC lodsb ; load character 0 00000934 EBEB jmp .unquoted_loop ; continue in not-quoted loop --> 1369 1370 .blank: 1371 ; 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 1376 1377 .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 1383 .quoted: 0 00000948 AC lodsb ; load character 0 00000949 EBF3 jmp .quoted_loop ; continue in quoted loop --> 1386 1387 .empty: 0 0000094B BA[9344] mov dx, msg.switch_filename_empty 0 0000094E EBCE jmp .disp_error_1 1390 1391 .quoted_eol: 0 00000950 BA[6B44] mov dx, msg.switch_filename_missing_unquote 0 00000953 EBC9 jmp .disp_error_1 1394 1395 1396 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 1403 1404 @@: 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 1409 1410 @@: 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 1415 0 00000984 BA[3039] mov dx, msg.no_sector_file_specified 0 00000987 E942F8 jmp disp_error 1418 1419 @@: 1420 1421 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 1425 0 00000990 E83046 call initialise ; uses first_sector_buffer 1427 ; for size detection 0 00000993 7303E9140E jc exit_error 1429 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 1436 ; 2nd buffer = boot sector original 1437 0 000009A9 BA[6039] mov dx, msg.bootfail_sig 0 000009AC 81BEFE0155AA cmp word [bp + 510], 0AA55h 0 000009B2 751A jne .disp_error_1 1441 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 1446 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 1452 .disp_error_1: 0 000009CE E9FBF7 jmp disp_error 1454 @@: 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 1459 @@: 1460 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 1465 ; 3rd buffer = copy of first 512 B of 2nd buffer 1466 ; (boot sector original) prior to BPBN move 1467 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 1475 ; to where the FAT32 BPBN lives 1476 @@: 1477 ; 2nd buffer = ld/lsv/bpb with BPBN moved 1478 1479 1480 ; (boot.asm code starts here) 1481 0 000009FA 31C0 xor ax, ax 1483 ; calculate some values that we need: 1484 ; adjusted sectors per cluster (store in a word, 1485 ; 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 1490 0 00000A05 8B46D4 mov ax, [bp + ldEntriesPerSector] 1492 1493 ; 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 1501 1502 1503 ; (iniload.asm code starts here) 1504 0 00000A15 51 push cx ; number of root secs 0 00000A16 31C0 xor ax, ax 1507 ; 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 1511 ; 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 1516 @@: 0 00000A2A 50 push ax 0 00000A2B F7E1 mul cx 1519 ; ax = low word SpF*nF 1520 ; dx = high word 0 00000A2D 93 xchg bx, ax 0 00000A2E 87D1 xchg cx, dx 1523 ; cx:bx = first mul 0 00000A30 58 pop ax 0 00000A31 F7E7 mul di 1526 ; ax = high word adjust 1527 ; dx = third word 0 00000A33 85D2 test dx, dx 0 00000A35 7406 jz @F 1530 error_badchain: equ $ 0 00000A37 BA[383A] mov dx, msg.boot_badchain 0 00000A3A E98FF7 jmp disp_error 1533 1534 @@: 0 00000A3D 92 xchg dx, ax 1536 ; dx = high word adjust 0 00000A3E 01CA add dx, cx 1538 ; dx:bx = result 0 00000A40 72F5 jc error_badchain 0 00000A42 93 xchg ax, bx 1541 ; dx:ax = result 0 00000A43 72F2 jc error_badchain 1543 0 00000A45 03460E add ax, [bp + bsBPB + bpbReservedSectors] 0 00000A48 83D200 adc dx, byte 0 0 00000A4B 72EA jc error_badchain 1547 0 00000A4D 59 pop cx ; number of root sectors 0 00000A4E 31FF xor di, di 1550 1551 ; 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 1557 0 00000A5C 8946D0 mov [bp + ldRootSector], ax 0 00000A5F 8956D2 mov [bp + ldRootSector + 2], dx 1560 1561 ; 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] 1568 1569 ; fall through and let it overwrite the field with the 1570 ; already current contents. saves a jump. 1571 @@: 1572 ; mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 1573 ; mov [bp + bsBPB + bpbTotalSectorsLarge], ax 1574 ; Do not modify BPB, as we initialise the 1575 ; sector with this copy eventually. 1576 ; It is arguably more correct for this to 1577 ; read zero when not in use. By preserving 1578 ; the original value this is enabled. 1579 1580 ; dx:ax = total sectors 1581 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 1586 0 00000A7C 31C9 xor cx, cx 1588 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 1592 ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 1593 ; uninitialised here (initialised by loaded_all later) 1594 1595 ; dx:ax = total amount of sectors 0 00000A87 2B46FC sub ax, word [bp + lsvDataStart] 0 00000A8A 1B56FE sbb dx, word [bp + lsvDataStart + 2] 1598 1599 ; 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] 1606 ; bx:ax = quotient, dx = remainder 1607 ; bx:ax = number of clusters 0 00000A99 85DB test bx, bx 0 00000A9B 7406 jz @F 1610 .badclusters: 0 00000A9D BA[1E3A] mov dx, msg.boot_badclusters 0 00000AA0 E929F7 jmp disp_error 1613 1614 @@: 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 1620 0 00000AB1 C646E60C mov byte [bp + ldFATType], 12 1622 .gotfattype: 1623 0 00000AB5 BA[3F3C] mov dx, msg.is_fat16 1625 %if _FAT16 0 00000AB8 BE[0002] mov si, fat16_payload 1627 %else 1628 mov si, 0 ; (preserve flags) 1629 %endif 0 00000ABB 807EE610 cmp byte [bp + ldFATType], 16 0 00000ABF 740E je @F 0 00000AC1 BA[2A3C] mov dx, msg.is_fat12 1633 %if _FAT12 0 00000AC4 BE[0000] mov si, fat12_payload 1635 %else 1636 mov si, 0 ; (preserve flags) 1637 %endif 0 00000AC7 7206 jb @F 0 00000AC9 BA[543C] mov dx, msg.is_fat32 1640 %if _FAT32 0 00000ACC BE[0004] mov si, fat32_payload 1642 %else 1643 mov si, 0 ; (preserve flags) 1644 %endif 1645 @@: 0 00000ACF E8E11C call disp_msg_asciz 1647 1648 %if !_FAT32 || !_FAT16 || !_FAT12 1649 test si, si 1650 jnz @FF 1651 1652 testopt [cmd_line_flags], clfLeaveSector | clfSectorFromCopy 1653 jnz @FF 1654 1655 mov dx, clfReadSectorFile12 1656 cmp byte [bp + ldFATType], 16 1657 jb @F 1658 mov dx, clfReadSectorFile16 1659 je @F 1660 mov dx, clfReadSectorFile32 1661 @@: 1662 test word [cmd_line_flags], dx 1663 jnz @F 1664 1665 mov dx, msg.not_supported_fat_type 1666 jmp disp_error 1667 1668 @@: 1669 %endif 1670 1671 1672 detect_fsinfo_sector_replace: 0 00000AD2 C646E700 mov byte [bp + ldHasLBA], 0 ; 2 clear: not FSINFO 1674 %if _FAT32_TWO_SECTORS 0 00000AD6 81FE[0004] cmp si, fat32_payload 0 00000ADA 7528 jne .not_fat32 1677 0 00000ADC 804EE704 or byte [bp + ldHasLBA], 4 ; 4 set: large sector 1679 0 00000AE0 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 00000AE5 731D jae .fat32_larger_sector 1682 ; Because we checked that the sector size is a power of two, 1683 ; we can assume here that sectors are 512 bytes or less. 1684 0 00000AE7 BA[783B] mov dx, msg.not_yet_non_fsinfo 1686 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 1691 0 00000B00 804EE702 or byte [bp + ldHasLBA], 2 ; 2 set: FSINFO 1693 %endif 1694 .not_fat32: 1695 .fat32_larger_sector: 1696 1697 1698 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 1708 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 1715 0 00000B2B BA[2A46] mov dx, msg.backup 0 00000B2E BB3000 mov bx, detectedcopysector | detectedcopyinfo 1718 .done: 0 00000B31 E87F1C call disp_msg_asciz 0 00000B34 091E[D829] or word [internalflags], bx 1721 1722 .none: 1723 1724 1725 prepare_sector: 0 00000B38 F606[2208]02 testopt [cmd_line_flags], clfSectorFromCopy 0 00000B3D 742A jz @F 1728 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 1733 1734 .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 1744 1745 @@: 0 00000B69 F606[2208]01 testopt [cmd_line_flags], clfLeaveSector 0 00000B6E 743C jz @F 1748 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 1755 .no_leave_fsinfo: 1756 0 00000B82 BA[0748] mov dx, msg.leave_sector 0 00000B85 E82B1C call disp_msg_asciz 1759 ; 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 1765 ; 1st buffer = copy of 3rd buffer 1766 ; (first 512 B of boot sector original) 1767 1768 ; 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 1775 ; 1st buffer = boot sector original 0 00000BA9 E9D200 jmp .got_sector_buffer 1777 1778 @@: 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 1788 @@: 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 1793 1794 ; di -> file structure 0 00000BD5 E8EA0B call open_file_read 0 00000BD8 7303E9CF0B jc exit_error 1797 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 1806 1807 @@: 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 1816 1817 .wrong_size: 0 00000C05 BA[B33B] mov dx, msg.wrong_size 0 00000C08 E9C1F5 jmp disp_error 1820 1821 1822 .ok_size: 0 00000C0B 50 push ax 1824 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 1833 1834 @@: 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) --> 1844 @@: 0 00000C33 BA[7149] mov dx, msg.error_file_read 0 00000C36 E86C0C call disp_dos_error 0 00000C39 E9700B jmp exit_error 1848 1849 @@: 0 00000C3C C646E700 mov byte [bp + ldHasLBA], 0 ; 2 and 4 clear: not FSINFO, no large 1851 0 00000C40 81F90004 cmp cx, 1024 0 00000C44 7228 jb .not_fat32_two_sectors 1854 0 00000C46 804EE704 or byte [bp + ldHasLBA], 4 ; 4 set: large sector 1856 0 00000C4A 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 00000C4F 731D jae .fat32_larger_sector 1859 ; Because we checked that the sector size is a power of two, 1860 ; we can assume here that sectors are 512 bytes or less. 1861 0 00000C51 BA[783B] mov dx, msg.not_yet_non_fsinfo 1863 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 1868 0 00000C6A 804EE702 or byte [bp + ldHasLBA], 2 ; 2 set: FSINFO 1870 1871 .fat32_larger_sector: 1872 .not_fat32_two_sectors: 0 00000C6E EB0E jmp .replace_common 1874 1875 1876 ; Copy over two sectors into the first_sector_buffer, 1877 ; for the case of FAT32 with two-sector loader and 1878 ; a sector size >= 1 KiB. 1879 .replace_internal: 0 00000C70 BA[2948] mov dx, msg.replace_sector 0 00000C73 E83D1B call disp_msg_asciz 1882 0 00000C76 B90002 mov cx, 1024 >> 1 0 00000C79 BF[6008] mov di, first_sector_buffer 0 00000C7C F3A5 rep movsw 1886 ; 1st buffer = 1024 bytes from internal replacement 1887 1888 .replace_common: 1889 .got_sector_buffer: 1890 1891 1892 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 1902 @@: 0 00000C98 B90400 mov cx, 4 0 00000C9B F3A7 repe cmpsw 0 00000C9D 7540 jne .invalid 1906 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 1917 .rel8: 0 00000CBA 4B dec bx 0 00000CBB 98 cbw 1920 .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 1926 @@: 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 1933 0 00000CDA BA[CA3D] mov dx, msg.sector_valid 0 00000CDD EB12 jmp .valid 1936 1937 .invalid: 0 00000CDF F606[2108]04 testopt [cmd_line_flags], clfAllowInvalidSector 0 00000CE4 7503E9E3F4 jz disp_error 1940 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 1945 1946 .valid: 0 00000CF1 E8BF1A call disp_msg_asciz 1948 1949 1950 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 1960 @@: 0 00000D0F F3A5 rep movsw 1962 1963 1964 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 1972 @@: 0 00000D24 B91900 mov cx, bpbNew ; move BPB 0 00000D27 F3A4 rep movsb 0 00000D29 83C61C add si, ebpbNew - bpbNew ; si -> BPBN 1976 @@: 0 00000D2C B91A00 mov cx, BPBN_size 0 00000D2F F3A4 rep movsb 1979 ; 1st buffer = sector from whatever source plus 1980 ; the (E)BPB and BPBN from fs 1981 1982 1983 prepare_fsinfo: 0 00000D31 807EE610 cmp byte [bp + ldFATType], 16 0 00000D35 7703E90301 jbe .no_fsinfo 1986 0 00000D3A 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 00000D3F 7203E9F900 jae .no_fsinfo 1989 0 00000D44 8B4630 mov ax, word [bp + bsBPB + ebpbFSINFOSector] 1991 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 1997 .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 2003 @@: 0 00000D63 E84D1A call disp_msg_asciz 0 00000D66 E9D400 jmp .no_fsinfo 2006 2007 .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 2013 ; 2nd buffer 2nd 512 B has original FSINFO 2014 0 00000D7A 800E[D829]40 setopt [internalflags], detectedinfo 2016 0 00000D7F F606[2208]20 testopt [cmd_line_flags], clfInfoFromCopy 0 00000D84 742D jz @F 2019 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 2024 2025 .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 2036 2037 @@: 2038 0 00000DB3 F606[2208]40 testopt [cmd_line_flags], clfZeroInfo 0 00000DB8 7433 jz @F 2041 0 00000DBA BA[8C48] mov dx, msg.zero_info 0 00000DBD E8F319 call disp_msg_asciz 2044 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 2049 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 2054 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 2059 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 2065 2066 @@: 2067 0 00000DED F646E702 test byte [bp + ldHasLBA], 2 0 00000DF1 7505 jnz @F 0 00000DF3 800E[2208]10 setopt [cmd_line_flags], clfLeaveInfo 2071 @@: 2072 0 00000DF8 F606[2208]10 testopt [cmd_line_flags], clfLeaveInfo 0 00000DFD 7413 jz @F 2075 0 00000DFF BA[AE48] mov dx, msg.leave_info 0 00000E02 E8AE19 call disp_msg_asciz 2078 2079 ; 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 2085 2086 @@: 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 2093 @@: 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 2098 @@: 0 00000E2F E88119 call disp_msg_asciz 2100 2101 ; Copy over actual FSINFO structure from original. 2102 ; (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 2107 .no_fsinfo: 2108 ; 1st buffer second 512 B = FSINFO with FSIBOOT 2109 2110 2111 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 2115 ; 1st buffer signature set from original 2116 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 2124 @@: 0 00000E5B 81E90002 sub cx, 512 0 00000E5F 7602 jbe @F 0 00000E61 F3A4 rep movsb 2128 @@: 2129 ; 1st buffer = up to 8 KiB for us to write 2130 ; (for FAT32 either 1024+ bytes including 2131 ; our FSIBOOT or 512 B primary plus another 2132 ; 512 B of FSINFO) 2133 2134 2135 detect_type: 0 00000E63 BB[5621] mov bx, type_search_metadata 2137 2138 .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 2146 2147 2148 @@: 0 00000E78 8A05 mov al, byte [di] ; get first byte 0 00000E7A 87FE xchg si, di ; es:di -> to search 0 00000E7C 87CA xchg dx, cx ; cx = count remaining, at least 1 0 00000E7E F2AE repne scasb ; scan for byte 0 00000E80 87CA xchg dx, cx 0 00000E82 87FE xchg si, di ; restore register setup 0 00000E84 7519 jne .nextpattern 2156 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 2167 .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 2176 2177 .nextpattern: 2178 %if 1 2179 @@: 0 00000E9F 833F00 cmp word [bx], 0 0 00000EA2 8D5F02 lea bx, [bx + 2] 0 00000EA5 75F8 jne @B 2183 %else 2184 ; With the repne scasb optimisation we may get 2185 ; al = first byte, and .patchwildcards may have 2186 ; never run for this pattern. So don't use this. 2187 xchg bx, ax ; get .patchwildcards return 2188 %endif 0 00000EA7 EBBD jmp .looppattern 2190 2191 2192 ; INP: bx -> wildcard displacement list, zero-terminated 2193 ; si -> candidate match or match in our loader 2194 ; di -> pattern to patch with wildcard contents 2195 ; OUT: ax -> behind zero terminator of list 2196 ; CHG: none 2197 .patchwildcards: equ set_lba.patchwildcards 2198 2199 .notfound: 0 00000EA9 BA[1544] mov dx, msg.type_not_found 0 00000EAC EB0F jmp .done_msg 2202 2203 2204 .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 2210 2211 .done_msg: 0 00000EBD E8F318 call disp_msg_asciz 2213 .done: 2214 2215 2216 detect_fsi: 0 00000EC0 807EE610 cmp byte [bp + ldFATType], 16 0 00000EC4 7703E95101 jbe .done 2219 0 00000EC9 BB[C221] mov bx, fsi_search_metadata 2221 2222 .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 2230 2231 2232 @@: 0 00000EDE 8A05 mov al, byte [di] ; get first byte 0 00000EE0 87FE xchg si, di ; es:di -> to search 0 00000EE2 87CA xchg dx, cx ; cx = count remaining, at least 1 0 00000EE4 F2AE repne scasb ; scan for byte 0 00000EE6 87CA xchg dx, cx 0 00000EE8 87FE xchg si, di ; restore register setup 0 00000EEA 7519 jne .nextpattern 2240 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 2251 .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 2260 2261 .nextpattern: 2262 %if 1 2263 @@: 0 00000F05 833F00 cmp word [bx], 0 0 00000F08 8D5F02 lea bx, [bx + 2] 0 00000F0B 75F8 jne @B 2267 %else 2268 ; With the repne scasb optimisation we may get 2269 ; al = first byte, and .patchwildcards may have 2270 ; never run for this pattern. So don't use this. 2271 xchg bx, ax ; get .patchwildcards return 2272 %endif 0 00000F0D EBBD jmp .looppattern 2274 2275 2276 ; INP: bx -> wildcard displacement list, zero-terminated 2277 ; si -> candidate match or match in our loader 2278 ; di -> pattern to patch with wildcard contents 2279 ; OUT: ax -> behind zero terminator of list 2280 ; CHG: none 2281 .patchwildcards: equ set_lba.patchwildcards 2282 2283 .notfound: 0 00000F0F BA[A142] mov dx, msg.fsi_not_found 0 00000F12 E90201 jmp .done_msg 2286 2287 2288 .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 2297 @@: 0 00000F2E AC lodsb 0 00000F2F 3C20 cmp al, 32 0 00000F31 7309 jae .notzero 2301 ; 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 2306 2307 .notzero: 0 00000F3C 3C7F cmp al, 127 0 00000F3E 73CF jae .notfound 0 00000F40 E2EC loop @B 2311 0 00000F42 800E[D829]80 setopt [internalflags], detectedfsineeded 2313 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 2323 2324 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 2329 @@: 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 2336 2337 @@: 0 00000F73 B022 mov al, '"' 0 00000F75 E89118 call disp_al 0 00000F78 89FE mov si, di 0 00000F7A B108 mov cl, 8 2342 .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 2348 .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 2357 2358 .printable: 0 00000F96 3C5C cmp al, '\' 0 00000F98 7404 je .escape 0 00000F9A 3C22 cmp al, '"' 0 00000F9C 7507 jne .plain 2363 .escape: 0 00000F9E 50 push ax 0 00000F9F B05C mov al, '\' 0 00000FA1 E86518 call disp_al 0 00000FA4 58 pop ax 2368 .plain: 0 00000FA5 E86118 call disp_al 2370 .displaynext: 0 00000FA8 E2D2 loop .displayloop 2372 0 00000FAA BA[4744] mov dx, msg.fsi_found.2 0 00000FAD E80318 call disp_msg_asciz 2375 0 00000FB0 BE[D421] mov si, fsi_known_revisions 2377 .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 2389 .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 2396 2397 .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 2409 2410 .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 86E0 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 2425 2426 .unknown2: 0 00001011 BA[9E43] mov dx, msg.fsi_unknown 2428 .display_done_msg: 0 00001014 E99C17 jmp disp_msg_asciz 2430 2431 .done_msg: 0 00001017 E89917 call disp_msg_asciz 2433 .done: 2434 2435 2436 check_fsi_provided: 0 0000101A 807EE610 cmp byte [bp + ldFATType], 16 0 0000101E 7703E99A00 jbe .done 2439 0 00001023 BF[4608] mov di, fsi_provided 0 00001026 BE[640A] mov si, first_sector_buffer + 512 + FSINFO.fsiboot 2442 0 00001029 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 0 0000102E 7311 jae .first 2445 0 00001030 F606[D829]40 testopt [internalflags], detectedinfo 0 00001035 7411 jz .none 2448 0 00001037 F606[2008]58 testopt [cmd_line_flags], clfDontWriteInfo | clfWriteInfoToSectorFile | clfWriteInfoToFile 0 0000103C 7403 jz .first 2452 0 0000103E BE[A42A] mov si, second_sector_buffer + 512 + FSINFO.fsiboot 2454 2455 .second: 2456 2457 .first: 0 00001041 B90400 mov cx, 4 0 00001044 57 push di 0 00001045 F3A5 rep movsw 0 00001047 5F pop di 2462 .none: 2463 0 00001048 BA[CE42] mov dx, msg.fsi_provided.1 0 0000104B E80EFF call disp_fsi 2466 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 2471 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 2477 0 00001069 BA[DD42] mov dx, msg.fsi_mismatch.1 0 0000106C E80200 call .disp_error 0 0000106F EB28 jmp .handle_needed 2481 2482 .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 2494 @@: 2495 0 00001092 E81E17 call disp_msg_asciz 0 00001095 92 xchg dx, ax 0 00001096 E91A17 jmp disp_msg_asciz 2499 2500 .handle_needed: 0 00001099 F606[2308]04 testopt [cmd_line_flags], clfAllowInvalidFSI 0 0000109E 741A jz .exit_error 2503 2504 .done_check_sg: 0 000010A0 F606[2308]08 testopt [cmd_line_flags], clfCheckFSI 0 000010A5 7416 jz .done 2507 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 2513 0 000010B4 BA[FB42] mov dx, msg.fsi_mismatch.3 0 000010B7 E8B7FF call .disp_error 2516 .exit_error: 0 000010BA E9EF06 jmp exit_error 2518 2519 .done: 2520 2521 2522 %if _NUM_DETECT_NAMES 2523 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 2527 ; -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 2532 @@: 2533 2534 %if _DISPLAY_ALL_NAMES 2535 .nextname: 2536 call findname 2537 lahf 2538 mov dx, [bx] 2539 call disp_msg_asciz 2540 mov dx, msg.name_before 2541 call disp_msg_asciz 2542 sahf 2543 jc @F ; skip quote if no name --> 2544 mov dx, msg.name_quote 2545 call disp_msg_asciz 2546 @@: 2547 mov dx, msg.foundname 2548 call disp_msg_asciz 2549 sahf 2550 jc @F ; skip quote if no name --> 2551 mov dx, msg.name_quote 2552 call disp_msg_asciz 2553 @@: 2554 mov dx, msg.name_after 2555 call disp_msg_asciz 2556 sahf 2557 mov ax, 0 2558 jc @F ; set to zero if no name --> 2559 lea ax, [si - 11] ; -> name in buffer 2560 @@: 2561 mov word [bx + 2], ax ; -> name in buffer, or 0 2562 add bx, 4 2563 cmp word [bx], 0 2564 jne .nextname 2565 %else 2566 ; 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 2572 2573 .nextname: 0 000010DF E87414 call findname 0 000010E2 7231 jc @FF 2576 @@: 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 2594 @@: 2595 %endif 2596 2597 2598 %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 2602 .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 2615 2616 .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 2638 2639 .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 2644 %endif 2645 %endif 2646 2647 2648 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 2657 2658 .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 2664 2665 2666 .nearjmp: 0 00001199 AD lodsw 0 0000119A A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2669 .shortjmp: 0 0000119B AC lodsb 0 0000119C 98 cbw 0 0000119D 01C6 add si, ax 2673 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 2677 @@: 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 2689 0 000011B6 EBCE jmp .notfound 2691 2692 .found_mov: 0 000011B8 01CE add si, cx 2694 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 2704 2705 @@: 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 87FB 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 87FB 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 2727 0 000011F1 EB93 jmp .notfound 2729 2730 .setup_pointers: 0 000011F3 807EE610 cmp byte [bp + ldFATType], 16 0 000011F7 760E jbe .1612 2733 .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 2739 2740 .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 2745 @@: 0 00001213 C3 retn 2747 2748 2749 .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 2753 2754 .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 2758 0 00001225 50 push ax 0 00001226 8A07 mov al, [bx] 0 00001228 E8C715 call disp_al_hex 0 0000122B 58 pop ax 2763 0 0000122C BA[963F] mov dx, msg.unit_found.set_dl.after 2765 @@: 0 0000122F E88115 call disp_msg_asciz 2767 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 2771 0 0000123C 50 push ax 0 0000123D A1[E629] mov ax, [load_unit] 2774 0 00001240 84E4 test ah, ah 0 00001242 7511 jnz @F ; if to set auto unit --> 2777 0 00001244 BA[BE3E] mov dx, msg.using_fix_unit 0 00001247 E86915 call disp_msg_asciz 2780 0 0000124A E8A515 call disp_al_hex 0 0000124D 8807 mov byte [bx], al 2783 0 0000124F BA[D43E] mov dx, msg.using_fix_unit_after 0 00001252 58 pop ax 0 00001253 EB04 jmp @FF ; di -> set dl 2787 2788 @@: 0 00001255 5F pop di ; di -> set bpbn 0 00001256 BA[AB3F] mov dx, msg.using_auto_unit 2791 @@: 2792 0 00001259 87FE xchg si, di 0 0000125B F3A4 rep movsb ; write to there 2795 2796 .done_msg: 0 0000125D E85315 call disp_msg_asciz 2798 .done: 2799 2800 2801 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 2810 2811 .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 2817 2818 2819 .nearjmp: 0 00001282 AD lodsw 0 00001283 A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2822 .shortjmp: 0 00001284 AC lodsb 0 00001285 98 cbw 0 00001286 01C6 add si, ax 2826 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 2831 2832 @@: 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 87FB 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 87FB xchg bx, di 0 000012AA 7418 je .found_keep 0 000012AC 46 inc si 0 000012AD 4A dec dx 0 000012AE 75E4 jnz @B 2854 0 000012B0 EBBE jmp .notfound 2856 2857 .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 2862 2863 2864 .found_mov: 0 000012BC E8F3FF call .setup_pointers 0 000012BF BA[3B40] mov dx, msg.partinfo_found.mov 0 000012C2 EB06 jmp @F 2868 2869 .found_keep: 0 000012C4 E8EBFF call .setup_pointers 0 000012C7 BA[5B40] mov dx, msg.partinfo_found.keep 2872 %if 0 2873 call disp_msg_asciz 2874 2875 push ax 2876 mov al, [bx] 2877 call disp_al_hex 2878 pop ax 2879 2880 mov dx, msg.partinfo_found.keep.after 2881 %endif 2882 @@: 0 000012CA E8E614 call disp_msg_asciz 2884 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 2888 0 000012D7 50 push ax 0 000012D8 A1[E829] mov ax, [load_use_partinfo] 2891 0 000012DB 84E4 test ah, ah 0 000012DD 7506 jnz @F ; if to set auto partinfo --> 2894 0 000012DF BA[BF3F] mov dx, msg.using_fix_partinfo 2896 %if 0 2897 call disp_msg_asciz 2898 2899 call disp_al_hex 2900 mov byte [bx], al 2901 2902 mov dx, msg.using_fix_partinfo_after 2903 %endif 0 000012E2 58 pop ax 0 000012E3 EB04 jmp @FF ; di -> keep 2906 2907 @@: 0 000012E5 5F pop di ; di -> mov 0 000012E6 BA[7C40] mov dx, msg.using_auto_partinfo 2910 @@: 2911 0 000012E9 87FE xchg si, di 0 000012EB F3A4 rep movsb ; write to there 2914 2915 .done_msg: 0 000012ED E8C314 call disp_msg_asciz 2917 .done: 2918 2919 2920 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 2929 2930 .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 2936 2937 2938 .nearjmp: 0 00001312 AD lodsw 0 00001313 A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2941 .shortjmp: 0 00001314 AC lodsb 0 00001315 98 cbw 0 00001316 01C6 add si, ax 2945 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 2950 2951 @@: 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 87FB 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 87FB xchg bx, di 0 0000133A 7418 je .found_keep 0 0000133C 46 inc si 0 0000133D 4A dec dx 0 0000133E 75E4 jnz @B 2973 0 00001340 EBBE jmp .notfound 2975 2976 .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 2981 2982 2983 .found_query: 0 0000134C E8F3FF call .setup_pointers 0 0000134F BA[1A41] mov dx, msg.query_found.query 0 00001352 EB06 jmp @F 2987 2988 .found_keep: 0 00001354 E8EBFF call .setup_pointers 0 00001357 BA[3F41] mov dx, msg.query_found.keep 2991 %if 0 2992 call disp_msg_asciz 2993 2994 push ax 2995 mov al, [bx] 2996 call disp_al_hex 2997 pop ax 2998 2999 mov dx, msg.query_found.keep.after 3000 %endif 3001 @@: 0 0000135A E85614 call disp_msg_asciz 3003 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 3007 0 00001367 50 push ax 0 00001368 A1[EA29] mov ax, [load_use_query_geometry] 3010 0 0000136B 84E4 test ah, ah 0 0000136D 7506 jnz @F ; if to set auto query --> 3013 0 0000136F BA[9540] mov dx, msg.using_fix_query 3015 %if 0 3016 call disp_msg_asciz 3017 3018 call disp_al_hex 3019 mov byte [bx], al 3020 3021 mov dx, msg.using_fix_query_after 3022 %endif 0 00001372 58 pop ax 0 00001373 EB04 jmp @FF ; di -> keep 3025 3026 @@: 0 00001375 5F pop di ; di -> query 0 00001376 BA[7041] mov dx, msg.using_auto_query 3029 @@: 3030 0 00001379 87FE xchg si, di 0 0000137B F3A4 rep movsb ; write to there 3033 3034 .done_msg: 0 0000137D E83314 call disp_msg_asciz 3036 .done: 3037 3038 set_lba: 0 00001380 BB[7E1D] mov bx, lba_search_metadata 3040 3041 .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 3049 3050 3051 @@: 0 00001395 8A05 mov al, byte [di] ; get first byte 0 00001397 87FE xchg si, di ; es:di -> to search 0 00001399 87CA xchg dx, cx ; cx = count remaining, at least 1 0 0000139B F2AE repne scasb ; scan for byte 0 0000139D 87CA xchg dx, cx 0 0000139F 87FE xchg si, di ; restore register setup 0 000013A1 7519 jne .nextpattern 3059 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 3070 .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 3079 3080 .nextpattern: 3081 %if 1 3082 @@: 0 000013BC 833F00 cmp word [bx], 0 0 000013BF 8D5F02 lea bx, [bx + 2] 0 000013C2 75F8 jne @B 3086 %else 3087 ; With the repne scasb optimisation we may get 3088 ; al = first byte, and .patchwildcards may have 3089 ; never run for this pattern. So don't use this. 3090 xchg bx, ax ; get .patchwildcards return 3091 %endif 0 000013C4 EBBD jmp .looppattern 3093 3094 3095 ; INP: bx -> wildcard displacement list, zero-terminated 3096 ; si -> candidate match or match in our loader 3097 ; di -> pattern to patch with wildcard contents 3098 ; OUT: ax -> behind zero terminator of list 3099 ; CHG: none 3100 .patchwildcards: 0 000013C6 53 push bx 3102 .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 3113 .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 3118 3119 3120 .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 3126 3127 3128 .foundpattern: 0 000013F0 8B57FC mov dx, word [bx - 8 + 4] 0 000013F3 E8BD13 call disp_msg_asciz ; display what we found 3131 0 000013F6 BA[1C42] mov dx, msg.lba_found_suffix 0 000013F9 E8B713 call disp_msg_asciz 3134 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 --> 3138 0 00001409 8B7FF8 mov di, word [bx - 8] ; -> what we matched (eg LBA) 3140 0 0000140C 81FF[1F1D] cmp di, lba_search_strings_hdd 0 00001410 7242 jb .nothddmatch 3143 0 00001412 803E[ED29]01 cmp byte [load_use_lba + 1], 1 0 00001417 7503E99D00 je .done_msg 3146 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 3162 .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 3167 3168 .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 3173 3174 .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 3179 @@: 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 3188 3189 @@: 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 3196 3197 .hddreplacenotfound: 0 00001484 BA[2E42] mov dx, msg.lba_autohdd_not_found 0 00001487 E942ED jmp disp_error 3200 3201 3202 .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] 3213 0 0000149F 84E4 test ah, ah 0 000014A1 7507 jnz @F ; if to set auto LBA --> 3216 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 3221 3222 @@: 0 000014AA 58 pop ax 3224 ; di -> what we matched (eg LBA) 0 000014AB BA[9F41] mov dx, msg.using_auto_lba 3226 @@: 3227 0 000014AE 81FB[EB1A] cmp bx, lba_search_strings_chs 3229 ; matched CHS ? (this checks what we matched) 0 000014B2 7201 jb @F ; no --> 0 000014B4 97 xchg ax, di ; reverse (we matched CHS instead) 3232 @@: 3233 3234 .do_patch: 0 000014B5 87FE xchg si, di 0 000014B7 F3A4 rep movsb ; write to there 3237 3238 .done_msg: 0 000014B9 E8F712 call disp_msg_asciz 3240 .done: 3241 3242 3243 set_geometry: 0 000014BC BE[0E2A] mov si, g_table 0 000014BF BA[853E] mov dx, msg.g_previous 3246 .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] 3255 @@: 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 3265 0 000014F5 BE[0E2A] mov si, g_table 3267 .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 3274 3275 .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 3281 3282 @@: 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 3290 @@: 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 3301 3302 @@: 0 00001541 89E7 mov di, sp 0 00001543 83C707 add di, 7 3305 3306 .loop_auto: 0 00001546 D004 rol byte [si + giAuto], 1 0 00001548 731C jnc .skip_auto 3309 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] 3317 @@: 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 3321 3322 .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 3327 3328 .no_auto: 0 00001572 BE[0E2A] mov si, g_table 0 00001575 BA[993E] mov dx, msg.g_updated 3331 .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 3343 @@: 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 3348 .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 3356 @@: 3357 3358 3359 validate_fsinfo: 0 000015BA F646E702 test byte [bp + ldHasLBA], 2 0 000015BE 7458 jz .no_fsinfo 3362 0 000015C0 BF[600A] mov di, first_sector_buffer + 512 0 000015C3 BA[AF44] mov dx, msg.info_valid 3365 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 3378 3379 @@: 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 3383 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 3394 3395 .end: 0 00001615 E89B11 call disp_msg_asciz 3397 3398 .no_fsinfo: 3399 3400 3401 write: 3402 3403 ; If the sector size is <= 512 bytes and there is a second 3404 ; 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 3409 0 00001628 BA[2145] mov dx, msg.info_writing_not 0 0000162B E88511 call disp_msg_asciz 3412 0 0000162E EB47 jmp .write_info_copy_if_forced 3414 3415 3416 .write_fsinfo: 0 00001630 F606[2008]40 testopt [cmd_line_flags], clfWriteInfoToSectorFile 0 00001635 741D jz .not_info_to_sector_file 3419 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 3425 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 3430 0 00001652 EB18 jmp @F 3432 3433 3434 .not_info_to_sector_file: 0 00001654 F606[2008]10 testopt [cmd_line_flags], clfWriteInfoToFile 0 00001659 7425 jz .not_info_to_file 3437 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 3443 3444 @@: 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 3448 3449 .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 3453 3454 3455 .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 3466 3467 .write_copy_info: 0 000016A1 F606[D829]20 testopt [internalflags], detectedcopyinfo 0 000016A6 7443 jz .no_fsinfo 3470 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 3475 3476 ; 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 3481 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 3490 3491 .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 3495 @@: 0 000016E8 E8C810 call disp_msg_asciz 3497 3498 .no_fsinfo: 3499 3500 0 000016EB F606[2008]04 testopt [cmd_line_flags], clfDontWriteSector 0 000016F0 7408 jz .write_sector 3503 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 3507 3508 .write_sector: 0 000016FA F606[2008]01 testopt [cmd_line_flags], clfWriteSectorToFile 0 000016FF 7428 jz .not_sector_to_file 3511 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 3517 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 3522 0 00001718 BA[6008] mov dx, first_sector_buffer 3524 ; -> buffer 0 0000171B E8B201 call write_file_ae_512_bytes 0 0000171E 725B jc exit_error_restore_fsinfo 3527 3528 .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 3532 3533 3534 .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] 3541 ; If sector size is >= 1 KiB, this writes both sectors for 3542 ; the FAT32 two-sector case. 0 0000173A E82413 call write_ae_512_bytes 0 0000173D 723C jc exit_error_restore_fsinfo 3545 0 0000173F F606[2108]30 testopt [cmd_line_flags], clfWriteCopySector | clfWriteCopySectorIfSector 0 00001744 7426 jz .not_writing_sector_copy 3548 3549 .write_copy_sector: 0 00001746 F606[D829]10 testopt [internalflags], detectedcopysector 0 0000174B 746A jz exit_normal 3552 0 0000174D BA[8446] mov dx, msg.backup_writing_sector 0 00001750 E86010 call disp_msg_asciz 3555 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 3565 3566 .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 3572 3573 3574 exit_error_restore_fsinfo: 3575 ; If the boot sector failed to write after FSINFO was 3576 ; already written, try to restore FSINFO. 0 0000177B F646E702 test byte [bp + ldHasLBA], 2 0 0000177F 742B jz @F 3579 ; If haven't written, do not restore. 0 00001781 F606[2008]08 testopt [cmd_line_flags], clfDontWriteInfo 0 00001786 7524 jnz @F 3582 ; 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 3585 0 0000178F BA[EE45] mov dx, msg.info_restoring_sector 0 00001792 E81E10 call disp_msg_asciz 3588 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 3595 0 000017A6 BA[013C] mov dx, msg.critical_fail_fsinfo_changed 0 000017A9 E80710 call disp_msg_asciz 3598 @@: 3599 3600 3601 exit_error: 0 000017AC E8F20F call restorestate 0 000017AF B8014C mov ax, 4C01h 0 000017B2 CD21 int 21h 3605 3606 3607 exit_normal_message: 0 000017B4 E8FC0F call disp_msg_asciz 3609 3610 exit_normal: 0 000017B7 E8E70F call restorestate 0 000017BA B8004C mov ax, 4C00h 0 000017BD CD21 int 21h 3614 3615 3616 ; INP: ds:di -> cmd_line_file structure 3617 ; (word pointer to name, word handle) 3618 ; OUT: NC if success, file opened, 3619 ; bx = file handle 3620 ; CY if error, called disp_dos_error 3621 ; CHG: ax, bx, cx, dx, si 3622 ; Note: We never close our files, instead relying on the 3623 ; process termination to close them. 3624 open_file_readwrite: 0 000017BF B002 mov al, 2 0 000017C1 A9 db __TEST_IMM16 ; (skip mov al) 3627 open_file_read: 0 000017C2 B000 mov al, 0 0 000017C4 A9 db __TEST_IMM16 ; (skip mov al) 3630 open_file_write: 0 000017C5 B001 mov al, 1 3632 lframe near 0 000017C7 5589E5 lenter 3634 lvar word, bit0_wo_bit1_rw 0 000017CA 50 push ax 3636 3637 ; 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 3642 .return: 0 000017D4 89EC5D lleave code 0 000017D7 C3 retn 3645 3646 @@: 3647 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 --> 3656 3657 ; Early case for no-LFN-interface available. 3658 ; cmp ax, 1 3659 ; je .try_sfn 0 000017E7 3D0071 cmp ax, 7100h 0 000017EA 744B je .try_sfn 3662 3663 ; Only now, we check whether the used drive supports LFNs. 3664 ; If it does, then we treat the error received as an 3665 ; actual error and cancel here. If not, the SFN function 3666 ; is called next as a fallback. 3667 ; 3668 ; We cannot rely on specific error returns like the 3669 ; expected 7100h CY (or 7100h CF-unchanged) or the similar 3670 ; 0001h CY (Invalid function) because no one agrees on what 3671 ; error code to use. 3672 ; 3673 ; dosemu returns 0003h (Path not found) on FATFS and 3674 ; redirected-non-dosemu drives. But may be changed so as to 3675 ; return 0059h (Function not supported on network). 3676 ; MSWindows 98SE returns 0002h (File not found) on 3677 ; DOS-redirected drives. 3678 ; DOSLFN with Fallback mode enabled supports the call (albeit 3679 ; limited to SFNs). 3680 ; 3681 ; To suss out what the error means, check LFN availability. 3682 ; 3683 ; 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 3688 lframe none, nested 3689 lvar 34, fstype_buffer 3690 lvar 4, pathname_buffer 0 000017F0 5589E58D66DA lenter 3692 0 000017F6 AD lodsw ; load first two bytes of pathname 3694 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 3701 0 000017FF 80FC3A cmp ah, ':' ; starts with drive specifier ? 0 00001802 7408 je @F ; yes --> 3704 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 3709 @@: 0 0000180C AB stosw 0 0000180D B85C00 mov ax, '\' ; backslash and zero terminator 0 00001810 AB stosw ; es:di -> ?fstype_buffer 3713 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 3719 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 3725 0 00001825 7207 jc @F ; if call not supported --> 3727 ; 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 --> 3731 0 0000182D F8 clc ; is available 3733 @@: 3734 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 3741 ; if LFN interface is not available, try SFN 3742 3743 .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 3749 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 3754 3755 .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 3761 @@: 0 00001858 89F2 mov dx, si ; -> filename 3763 ; cx = create attribute 0 0000185A F9 stc 0 0000185B CD21 int 21h 0 0000185D 7209 jc .error 3767 3768 .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 3773 3774 .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 3782 @@: 0 0000187D E82500 call disp_dos_error 0 00001880 F9 stc 0 00001881 E950FF jmp .return 3786 3787 .setup_opencreate: 0 00001884 8B35 mov si, word [di + cmd_line_file_name_ofs] 3789 ; -> 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 3794 ; 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 3799 3800 @@: 0 0000189B BB2160 mov bx, 0110_0000_0010_0001b ; Auto-commit, no int 24h 3802 ; DENY WRITE, Write-only 0 0000189E BA1200 mov dx, 0000_0000_0001_0010b ; create / open-truncate 0 000018A1 C3 retn 3805 3806 @@: 0 000018A2 B322 mov bl, 0010_0010b ; DENY WRITE, Read-write 0 000018A4 C3 retn 3809 3810 lleave ctx 3811 3812 3813 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] 3826 @@: 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 3830 3831 3832 ; INP: ds:dx -> buffer 3833 ; bx = handle 3834 ; OUT: NC if success 3835 ; CY if error, disp_dos_error called 3836 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 3841 @@: 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) --> 3848 @@: 0 000018E9 BA[5C49] mov dx, msg.error_file_write 0 000018EC E8B6FF call disp_dos_error 0 000018EF F9 stc 3852 @@: 0 000018F0 C3 retn 3854 3855 3856 unit_search_strings: 0 000018F1 BD007C .mov: mov bp, 7C00h 3858 .mov_length: equ $ - .mov 0 000018F4 885624 .1612_set_bpbn: mov byte [bp + bsBPB + bpbNew + bpbnBootUnit], dl 3860 .1612_set_bpbn_length: equ $ - .1612_set_bpbn 0 000018F7 8A5624 .1612_set_dl: mov dl, byte [bp + bsBPB + bpbNew + bpbnBootUnit] 3862 .1612_set_dl_length: equ $ - .1612_set_dl 3863 %if .1612_set_bpbn_length != .1612_set_dl_length 3864 %error Unit fixing replacement string not same length! 3865 %endif 3866 0 000018FA 885640 .32_set_bpbn: mov byte [bp + bsBPB + ebpbNew + bpbnBootUnit], dl 3868 .32_set_bpbn_length: equ $ - .32_set_bpbn 0 000018FD 8A5640 .32_set_dl: mov dl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 3870 .32_set_dl_length: equ $ - .32_set_dl 3871 %if .32_set_bpbn_length != .32_set_dl_length 3872 %error Unit fixing replacement string not same length! 3873 %endif 3874 3875 3876 partinfo_search_strings: 3877 .mov: 0 00001900 84D2 test dl, dl ; floppy ? 0 00001902 7911 jns @F ; don't attempt detection --> 3880 ; Check whether an MBR left us partition information. 3881 ; 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 --> 3884 ; 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 --> 3887 ; Info valid, trust their hidden sectors over hardcoded. 3888 ; Assume the movsw instructions won't run with si = FFFFh. 0 0000190D BF1C7C mov di, 7C00h + bsBPB + bpbHiddenSectors 3890 ; -> 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 3894 @@: 3895 .mov_length: equ $ - .mov 3896 .keep: 0 00001915 84D2 test dl, dl ; floppy ? 0 00001917 7911 jns @F ; don't attempt detection --> 3899 ; Check whether an MBR left us partition information. 3900 ; 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 --> 3903 ; 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 --> 3906 ; Info valid, trust their hidden sectors over hardcoded. 3907 ; Assume the movsw instructions won't run with si = FFFFh. 0 00001922 BF1C7C mov di, 7C00h + bsBPB + bpbHiddenSectors 3909 ; -> BPB field 0 00001925 83C608 add si, 8 ; -> partition start sector in info 3911 3912 ; Patched out movsw twice 0 00001928 90 nop 0 00001929 90 nop ; overwrite BPB field with value from info 3915 @@: 3916 .keep_length: equ $ - .keep 3917 %if .mov_length != .keep_length 3918 %error Partinfo fixing replacement string not same length! 3919 %endif 3920 3921 3922 query_search_strings: 3923 .query: 3924 ; test dl, dl ; floppy? 3925 ; jns @F ; don't attempt query, might fail --> 3926 ; Note that while the original PC BIOS doesn't support this function 3927 ; (for its diskettes), it does properly return the error code 01h. 3928 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 0000192A B408 mov ah, 08h 3930 ; xor cx, cx ; initialise cl to 0 3931 ; 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 3941 @@: 3942 .query_length: equ $ - .query 3943 .keep: 3944 ; test dl, dl ; floppy? 3945 ; jns @F ; don't attempt query, might fail --> 3946 ; Note that while the original PC BIOS doesn't support this function 3947 ; (for its diskettes), it does properly return the error code 01h. 3948 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 0000193F B408 mov ah, 08h 3950 ; xor cx, cx ; initialise cl to 0 3951 ; Already from prologue cx = 0. 0 00001941 F9 stc ; initialise to CY 3953 3954 ; Patched out int 13h 0 00001942 90 nop 0 00001943 90 nop 3957 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 3965 @@: 3966 .keep_length: equ $ - .keep 3967 %if .query_length != .keep_length 3968 %error Query geometry fixing replacement string not same length! 3969 %endif 3970 3971 3972 %assign ALL 0 3973 %define PREFIX 3974 %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 3975 3976 3977 %assign ALL 0 3978 %define PREFIX 3979 %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 3980 3981 3982 %unmacro search_wildcard 1-2 0 3983 %unmacro fsi_search_string 2 3984 %unmacro dumpsearches 1-* 3985 3986 3987 %define SEARCHES dw "" 3988 3989 3990 %macro search_wildcard 1-2 0 3991 %assign %%wc $ + %2 - %1 3992 %if %%wc == 0 3993 %error Wildcard at beginning of search string is not allowed 3994 %endif 3995 %xdefine WILDCARDS WILDCARDS, dw %%wc 3996 %endmacro 3997 3998 %macro fsi_search_string 2 3999 %define WILDCARDS dw "" 4000 4001 %define %%identifier label_%1_fsi 4002 4003 %define %%extra 0 4004 4005 %%start: 4006 %[%%identifier %+ _search_string]: 4007 4008 mov di, 7C00h + 512 + 4 4009 mov si, 0 4010 search_wildcard %%start, -2 4011 search_wildcard %%start, -1 4012 ..@fsi_search_signature_offset: equ $ - 2 4013 mov cx, 4 4014 repe cmpsw 4015 %%end: 4016 4017 %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw 0, dw %%extra, WILDCARDS, dw 0 4019 %[%%identifier %+ _length]: equ %%end - %%start 4020 4021 %endmacro 4022 4023 4024 %assign variant 0 4025 %assign identifier variant 4026 fsi_search_string identifier, variant 3999 <1> %define WILDCARDS dw "" 4000 <1> 4001 <1> %define %%identifier label_%1_fsi 4002 <1> 4003 <1> %define %%extra 0 4004 <1> 4005 <1> %%start: 4006 <1> %[%%identifier %+ _search_string]: 4007 <1> 0 000022B6 BF047E mov di, 7C00h + 512 + 4 0 000022B9 BE0000 mov si, 0 4010 <1> search_wildcard %%start, -2 3991 <2> %assign %%wc $ + %2 - %1 3992 <2> %if %%wc == 0 3993 <2> %error Wildcard at beginning of search string is not allowed 3994 <2> %endif 3995 <2> %xdefine WILDCARDS WILDCARDS, dw %%wc 4011 <1> search_wildcard %%start, -1 3991 <2> %assign %%wc $ + %2 - %1 3992 <2> %if %%wc == 0 3993 <2> %error Wildcard at beginning of search string is not allowed 3994 <2> %endif 3995 <2> %xdefine WILDCARDS WILDCARDS, dw %%wc 4012 <1> ..@fsi_search_signature_offset: equ $ - 2 0 000022BC B90400 mov cx, 4 0 000022BF F3A7 repe cmpsw 4015 <1> %%end: 4016 <1> 4017 <1> %xdefine SEARCHES SEARCHES, %%identifier:, dw %%start, dw %%end - %%start, dw 0, dw %%extra, WILDCARDS, dw 0 4019 <1> %[%%identifier %+ _length]: equ %%end - %%start 4020 <1> 4027 4028 4029 %macro dumpsearches 1-* 4030 %rep %0 4031 %1 4032 %rotate 1 4033 %endrep 4034 %endmacro 4035 0 000022C1 00 align 2, db 0 4037 %[PREFIX]fsi_search_metadata: 4038 dumpsearches SEARCHES 4030 <1> %rep %0 4031 <1> %1 4032 <1> %rotate 1 4033 <1> %endrep 4031 <2> %1 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 000022C2 [B621] %1 4032 <2> %rotate 1 0 000022C4 0B00 %1 4032 <2> %rotate 1 0 000022C6 0000 %1 4032 <2> %rotate 1 0 000022C8 0000 %1 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 000022CA 0400 %1 4032 <2> %rotate 1 0 000022CC 0500 %1 4032 <2> %rotate 1 0 000022CE 0000 %1 4032 <2> %rotate 1 0 000022D0 00000000 dw 0,0 4040 4041 4042 %define STRINGS db "" 4043 4044 %macro fsi_revision 2.nolist 4045 %xdefine STRINGS STRINGS, %%message:, {asciz %2} 4046 dw %%message 4047 db %1 4048 %endmacro 4049 4050 align 2, db 0 4051 fsi_known_revisions: 4052 ; fsi_revision {0,0,0,0,0,0,0,0}, "None" 4053 %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 4055 4056 dumpsearches STRINGS 4030 <1> %rep %0 4031 <1> %1 4032 <1> %rotate 1 4033 <1> %endrep 4031 <2> %1 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 00002358 496E697469616C2072 %1 0 00002361 657673206F66206C44 0 0000236A 4F5320465349424F4F 0 00002373 542028323031372D30 0 0000237C 392D31332900 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 00002382 6C444F532046534942 %1 0 0000238B 4F4F54207265762030 0 00002394 2028323031382D3039 0 0000239D 2D32302900 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 000023A2 6C444F532046534942 %1 0 000023AB 4F4F54207265762031 0 000023B4 2028323031382D3039 0 000023BD 2D32312900 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 000023C2 6C444F532046534942 %1 0 000023CB 4F4F54207265762032 0 000023D4 2028323031382D3039 0 000023DD 2D32332900 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 000023E2 6C444F532046534942 %1 0 000023EB 4F4F54207265762033 0 000023F4 2028323032302D3039 0 000023FD 2D33302900 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 00002402 6C444F532046534942 %1 0 0000240B 4F4F54206578706572 0 00002414 696D656E74616C2072 0 0000241D 657620303020283230 0 00002426 32302D31302D313229 0 0000242F 00 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 00002430 6C444F532046534942 %1 0 00002439 4F4F54206578706572 0 00002442 696D656E74616C2072 0 0000244B 657620303120283230 0 00002454 32302D31302D323529 0 0000245D 00 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 0000245E 6C444F532046534942 %1 0 00002467 4F4F54206578706572 0 00002470 696D656E74616C2072 0 00002479 657620303220283230 0 00002482 32302D31312D313729 0 0000248B 00 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 0000248C 6C444F532046534942 %1 0 00002495 4F4F54207265762034 0 0000249E 2028323032312D3031 0 000024A7 2D31322900 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 000024AC 6C444F532046534942 %1 0 000024B5 4F4F54206578706572 0 000024BE 696D656E74616C2072 0 000024C7 657620303320283230 0 000024D0 32342D30382D313829 0 000024D9 00 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 000024DA 6C444F532046534942 %1 0 000024E3 4F4F54206578706572 0 000024EC 696D656E74616C2072 0 000024F5 657620303420283230 0 000024FE 32342D30382D313929 0 00002507 00 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 00002508 6C444F532046534942 %1 0 00002511 4F4F54206578706572 0 0000251A 696D656E74616C2072 0 00002523 657620303520283230 0 0000252C 32342D31302D303429 0 00002535 00 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 0 00002536 6C444F532046534942 %1 0 0000253F 4F4F54207265762035 0 00002548 2028323032342D3130 0 00002551 2D31312900 4032 <2> %rotate 1 4057 4058 4059 %if _NUM_DETECT_NAMES 4060 ; INP: ds:si -> first byte to check for name 4061 ; cx = number of bytes left 4062 ; OUT: (8+1+3+1)bytes[msg.foundname] = found name, 4063 ; converted to 8.3 ASCIZ format, 4064 ; "(None)" if none 4065 ; CY if no filename found, 4066 ; si = INP:si + INP:cx 4067 ; cx = 0 4068 ; NC if filename found, 4069 ; si -> byte behind the name, thus (si-11)-> name 4070 ; cx = number of bytes left 4071 ; CHG: di, ax 4072 ; STT: ds = es 4073 findname: 4074 .: 0 00002556 83F90B cmp cx, 11 ; enough for another name ? 0 00002559 7275 jb .none ; no --> 4077 ; (cx == 0 jumps here too) 4078 .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 --> 4086 ; cmp al, 5 ; first character may be 05h to indicate 0E5h 4087 ; je .check_pass 0 00002567 A8 db __TEST_IMM8 ; (skip lodsb) 4089 .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 4096 ; if we arrive here, all characters (while valid) are the 4097 ; same character repeated 11 times. we disallow this in case 4098 ; that the padding character is an allowed one (eg '&' 26h). 4099 .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 . 4105 4106 .check_character: 0 0000257A 3C20 cmp al, 32 0 0000257C 7218 jb .check_character_fail 0 0000257E 3C7F cmp al, 127 4110 ; je .check_character_fail 0 00002580 7314 jae .check_character_fail 4112 ; note: with all characters >= 128 allowed, 4113 ; 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 4124 .check_character_fail: 0 00002596 F9 stc 0 00002597 C3 retn 4127 4128 .check_character_pass: 0 00002598 F8 clc 0 00002599 C3 retn 4131 4132 .check_loop: 0 0000259A AC lodsb 4134 .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 4139 .check_pass: 0 000025A4 E2F4 loop .check_loop 4141 0 000025A6 58 pop ax ; (discard si) 0 000025A7 83EE0B sub si, 11 ; -> at name 4144 0 000025AA E83600 call convert_name_to_asciz 4146 ; 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 4151 4152 .check_loop_is_blank: 0 000025B3 88CC mov ah, cl ; = how many remaining in ext (1 to 3) 4154 ; 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) 4159 .check_loop_blank: 0 000025BE AC lodsb 4161 @@: 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 --> 4168 ; no, still in field after blank. 4169 ; check that next trail is all blanks too. 0 000025CC E2F0 loop .check_loop_blank 0 000025CE EBA4 jmp .check_fail ; (never reached) 4172 4173 .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 4184 4185 4186 ; INP: si -> 11-byte blank-padded name 4187 ; msg.foundname -> (8+1+3+1)-byte buffer 4188 ; OUT: si -> behind 11-byte blank-padded name 4189 ; msg.foundname filled 4190 ; CHG: cx, di, ax 4191 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 4198 @@: 4199 0 000025F5 A8 db __TEST_IMM8 ; (skip dec) 4201 @@: 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 --> 4205 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 4210 0 00002604 A8 db __TEST_IMM8 ; (skip dec) 4212 @@: 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 --> 4216 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 4220 @@: 0 00002613 B000 mov al, 0 0 00002615 AA stosb ; store filename terminator 0 00002616 C3 retn 4224 4225 4226 ; INP: ds:si-> first letter of name 4227 ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 4228 ; CHG: ax, cx, di 4229 ; OUT: NC if valid name, 4230 ; al = first character after name (EOL, blank, or slash) 4231 ; si -> next character 4232 ; CY else 4233 ; STT: es = ds 4234 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 4239 0 00002621 BF[6C3C] mov di, load_kernel_name 0 00002624 B90900 mov cx, 9 4242 .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 4261 .invalid: 0 0000264B F9 stc 0 0000264C C3 retn 4264 4265 .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 4270 .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 4290 4291 .loop_ext_done: 0 0000267E 83F904 cmp cx, 4 0 00002681 74C8 je .invalid 4294 .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 4301 @@: 0 00002699 F8 clc 0 0000269A C3 retn 4304 %endif 4305 4306 4307 iseol?: 0 0000269B 3C0D cmp al, 13 0 0000269D 7402 je .ret 4310 ; cmp al, ';' 4311 ; je .ret 0 0000269F 3C00 cmp al, 0 4313 .ret: 0 000026A1 C3 retn 4315 4316 4317 ; Check for given string (cap-insensitive) 4318 ; 4319 ; INP: si-> input string to check (either cap), 4320 ; terminated by CR (13), space, tab, comma 4321 ; dx-> ASCIZ string to check (all-caps) 4322 ; OUT: Iff string matches, 4323 ; si-> at separator that terminates the keyword 4324 ; else, 4325 ; si = input si 4326 ; STT: ds = es = ss 4327 ; CHG: dx, ax 4328 isstring?: 0 000026A2 56 push si 0 000026A3 87FA xchg dx, di 4331 .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 4339 4340 .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 4351 .ret_nz: 4352 ; NZ 0 000026C7 5E pop si 4354 .ret: 0 000026C8 87FA xchg dx, di 0 000026CA C3 retn 4357 4358 .checkend: 0 000026CB 26807DFF00 cmp byte [es:di - 1], 0 0 000026D0 75F5 jne .ret_nz 4361 .matched_zr: ; ZR 0 000026D2 58 pop ax ; (discard) 0 000026D3 8D74FF lea si, [si - 1] ; -> separator 0 000026D6 EBF0 jmp .ret 4365 4366 4367 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 4373 @@: 0 000026E2 C3 retn 4375 4376 4377 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 4388 .lit_decimaldigit: 0 000026F8 F8 clc 4390 .ret: 0 000026F9 C3 retn 4392 4393 4394 ; INP: al = first character 4395 ; si -> next 4396 ; OUT: doesn't return if error 4397 ; bx:dx = number read 4398 ; al = character after the number 4399 ; si -> next 4400 ; CHG: cx, ax, di 4401 get_decimal_literal: 0 000026FA BA0A00 mov dx, 10 ; set base: decimal 4403 %if 1 0 000026FD B93940 mov cx, '9' | (('A'-10-1 + 10) << 8) 4405 %else 4406 mov cl, dl 4407 add cl, '0'-1 4408 cmp cl, '9' 4409 jbe .lit_basebelow11 4410 mov cl, '9' 4411 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 4412 mov ch, dl 4413 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 4414 %endif 0 00002700 EB06 jmp @F 4416 4417 4418 get_hexadecimal_literal: 0 00002702 BA1000 mov dx, 16 ; set base: hexadecimal 4420 %if 1 0 00002705 B93946 mov cx, '9' | (('A'-10-1 + 16) << 8) 4422 %else 4423 mov cl, dl 4424 add cl, '0'-1 4425 cmp cl, '9' 4426 jbe .lit_basebelow11 4427 mov cl, '9' 4428 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 4429 mov ch, dl 4430 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 4431 %endif 4432 4433 @@: 0 00002708 B400 mov ah, 0 0 0000270A 31DB xor bx, bx 0 0000270C 89D7 mov di, dx ; di = base 4437 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 4441 .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 4451 .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 4470 .lit_skip: 0 00002749 AC lodsb 0 0000274A EBC9 jmp short .lit_loopdigit 4473 4474 .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 4478 4479 .err2: 0 00002752 BA[AC3E] mov dx, msg.error_invalid_number 0 00002755 E974DA jmp disp_error 4482 4483 4484 symhint_store_string getexpression 4485 getexpression.lit_ishexdigit?: 0 00002758 B93946 mov cx, "9F" 4487 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 4499 .yes: 0 00002770 F8 clc 0 00002771 C3 retn 4502 4503 .no_p: 0 00002772 58 pop ax 4505 .no: 0 00002773 F9 stc 0 00002774 C3 retn 4508 4509 4510 ; INP: al = character 4511 ; OUT: al = capitalised character 4512 ; ZR, NC if a separator 4513 ; NZ if no separator 4514 isseparator?: 0 00002775 E860FF call uppercase 0 00002778 51 push cx 4517 %if 0 ; _EXPRESSIONS 4518 call isoperator? ; normal operators are separators (also handles equality sign) 4519 je .yes ; if match --> (ZR, NC) 4520 %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 4527 .yes: 0 00002783 59 pop cx 0 00002784 C3 retn 4530 0 00002785 00 align 2, db 0 4532 %if 0 ; _EXPRESSIONS 4533 separators: countedw 32,9,13,",L;]:=)",0 4534 %else 0 00002786 0A0020090D2C4C3B5D separators: countedw 32,9,13,",L;]:=",0 0 0000278F 3A3D00 4536 %endif 4537 4538 4539 i24: 0 00002792 B003 mov al, 3 ; always return fail, to handle the error as a soft one 0 00002794 CF iret 4542 4543 i23: 0 00002795 2EC706[9526]EB08 mov word [ cs:$ ], (__JMP_REL8|__REL16__(.return)<<8) ; don't reenter 0 0000279C E80200 call restorestate 4546 .return: 0 0000279F F9 stc ; always abort program (what default DOS handler also does) 0 000027A0 CB retf 4549 4550 ; Restore modified DOS data 4551 ; 4552 ; CHG: - 4553 restorestate: 0 000027A1 50 push ax 4555 %if _VDD 4556 ; 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 4561 .novdd: 4562 %endif 0 000027B1 58 pop ax 0 000027B2 C3 retn 4565 4566 4567 ; INP: es:dx = ds:dx -> 0-terminated message 4568 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 4587 4588 4589 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 4602 .ZR: 0 000027E8 38C0 cmp al, al 4604 .ret: 0 000027EA C3 retn 4606 4607 4608 disp_ax_hex: 0 000027EB 86E0 xchg al, ah 0 000027ED E80200 call disp_al_hex 0 000027F0 86E0 xchg al, ah 4612 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 4619 .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) 4626 .isdigit: 0 00002808 A8 db __TEST_IMM8 ; (skip push) 4628 4629 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 4638 4639 4640 disp_ax_dec: 4641 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 4647 4648 4649 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 4655 4656 4657 ; Dump dword as decimal number string 4658 ; 4659 ; INP: dx:ax = dword 4660 ; cx = minimum width (<= 1 for none, must be < 10) 4661 ; es:di -> where to store 4662 ; OUT: es:di -> behind variable-length string 4663 ; CHG: - 4664 ; STT: UP 4665 dec_dword_minwidth: 4666 lframe near 4667 lequ 12, bufferlen 4668 lvar ?bufferlen,buffer 0 00002823 5589E58D66F4 lenter 4670 lvar dword, dividend 0 00002829 52 push dx 0 0000282A 50 push ax 0 0000282B 49 dec cx 4674 lvar word, minwidth 0 0000282C 51 push cx 0 0000282D 41 inc cx 4677 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 4685 0 00002835 16 push ss 0 00002836 07 pop es 4688 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 4694 4695 ; dword [bp + ?dividend] = number to display 0 00002840 B90A00 mov cx, 10 ; divisor 4697 .loop_write: 4698 0 00002843 31D2 xor dx, dx 0 00002845 57 push di 0 00002846 BF0400 mov di, 4 4702 .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 4709 ; dx = last remainder 0 00002855 5F pop di 0 00002856 92 xchg ax, dx ; ax = remainder (next digit) 4712 ; 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 4717 0 0000285F 837EF200 cmp word [bp + ?dividend + 2], 0 0 00002863 75DE jnz .loop_write 0 00002865 837EF000 cmp word [bp + ?dividend], 0 4721 ; any more ? 0 00002869 75D8 jnz .loop_write ; loop --> 4723 0 0000286B FC cld 4725 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 4736 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 4744 0 00002882 89EC5D lleave 0 00002885 C3 retn 4747 4748 4749 ; INP: dx:ax = sector to write 4750 ; cl = drive to write to (0 = A:) 4751 ; ds:bx -> buffer 4752 ; STT: ds = ss 4753 ; OUT: CY if failure, error message displayed to stdout 4754 ; NC if success 4755 ; dx:ax = incremented 4756 ; ds:bx -> behind buffer 4757 ; (bx += word[bp + ldBytesPerSector] 4758 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 4764 .plw1: 0 0000288B 833E[3808]00 cmp word [cmd_line_image_file.name], 0 0 00002890 7432 je .drive 4767 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 4774 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 4783 4784 @@: 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 4789 4790 .image_fail_seek: 0 000028BB BA[F13A] mov dx, msg.image_fail_seek.write 4792 @@: 0 000028BE E8F2FE call disp_msg_asciz 0 000028C1 E99100 jmp write_sector.ww3_error 4795 4796 .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 4808 .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 4817 4818 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 4819 .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 4829 0 00002900 E88001 call lockdrive 4831 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" 4836 %if _VDD 0 00002910 F606[D829]04 testopt [internalflags], ntpacket 0 00002915 750A jnz .vdd 4839 %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 4845 %if _VDD 4846 .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 4851 %endif 4852 .error_sector_not_found: 0 0000292E B008 mov al, 8 ; "sector not found" 4854 .done: 0 00002930 9C pushf 0 00002931 E87401 call unlockdrive 0 00002934 9D popf 0 00002935 BA[8F4D] mov dx, writing 4859 .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 4864 .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 4875 .ww3_error: 0 00002955 F9 stc 4877 .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 4887 @@: 0 00002960 035EDC add bx, word [bp + ldBytesPerSector] 0 00002963 9D popf 0 00002964 C3 retn 4891 4892 4893 ; INP: dx:ax = sector to read 4894 ; cl = drive to read from (0 = A:) 4895 ; ds:bx -> buffer 4896 ; STT: ds = ss 4897 ; OUT: CY if failure, error message displayed to stdout 4898 ; NC if success 4899 ; dx:ax = incremented 4900 ; ds:bx -> behind buffer 4901 ; (bx += word[bp + ldBytesPerSector] 4902 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 4908 .plw1: 0 0000296A 833E[3808]00 cmp word [cmd_line_image_file.name], 0 0 0000296F 742D je .drive 4911 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 4918 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 4927 4928 @@: 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 4933 4934 .image_fail_seek: 0 00002996 BA[F13A] mov dx, msg.image_fail_seek.read 4936 @@: 0 00002999 E817FE call disp_msg_asciz 0 0000299C EBB7 jmp write_sector.ww3_error 4939 4940 .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 4952 .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 4961 4962 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 4963 .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 4973 0 000029DA E8A600 call lockdrive 4975 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" 4980 %if _VDD 0 000029EA F606[D829]04 testopt [internalflags], ntpacket 0 000029EF 750A jnz .vdd 4983 %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 4989 %if _VDD 4990 .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 4995 %endif 4996 .error_sector_not_found: 0 00002A08 B008 mov al, 8 ; "sector not found" 4998 .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 5004 5005 5006 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 5012 @@: 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 5019 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 5025 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 5041 .image_seek_done: 0 00002A5E A8 db __TEST_IMM8 ; (NC, skip stc) 5043 .image_fail_seek: 0 00002A5F F9 stc 0 00002A60 C3 retn 5046 5047 5048 ; INP: dx:ax = first sector 5049 ; ds:bx -> buffer 5050 ; cl = drive number 5051 ; OUT: dx:ax = sector number after last written 5052 ; ds:bx -> buffer after last read 5053 ; CHG: - 5054 ; STT: ds = ss 5055 symhint_store_and_label write_ae_512_bytes 0 00002A61 57 push di 0 00002A62 BF0002 mov di, 512 5058 .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 5064 .error: 0 00002A70 5F pop di 0 00002A71 C3 retn 5067 5068 ; INP: dx:ax = first sector 5069 ; ds:bx -> buffer 5070 ; cl = drive number 5071 ; OUT: dx:ax = sector number after last read 5072 ; ds:bx -> buffer after last written 5073 ; CHG: - 5074 ; STT: ds = ss 5075 read_ae_512_bytes: 0 00002A72 57 push di 0 00002A73 BF0002 mov di, 512 5078 .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 5084 .error: 0 00002A81 5F pop di 0 00002A82 C3 retn 5087 5088 5089 ; INP: byte [ss:drivenumber] = 0-based drive number 5090 ; OUT: CF 5091 ; byte [ss:internalflags] & locked 5092 ; CHG: - 5093 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 5107 ; NC 5108 @@: 0 00002AA3 5A pop dx 0 00002AA4 59 pop cx 0 00002AA5 5B pop bx 0 00002AA6 58 pop ax 0 00002AA7 C3 retn 5114 5115 5116 ; INP: byte [ss:drivenumber] = 0-based drive number 5117 ; byte [ss:internalflags] & locked 5118 ; OUT: CF 5119 ; CHG: - 5120 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 5136 ; NC 5137 @@: 0 00002AD0 5A pop dx 0 00002AD1 59 pop cx 0 00002AD2 5B pop bx 0 00002AD3 58 pop ax 0 00002AD4 C3 retn 5143 5144 0 00002AD5 00 align 4, db 0 0 00002AD8 00000000 internalflags: dd 0 5147 oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 5148 newpacket equ 2 ; Int21.7305 packet method available (L, W) 5149 ntpacket equ 4 ; VDD registered and usable (L, W) 5150 locked equ 8 ; locked drive 5151 runningnt equ 20000h ; running in NTVDM 5152 detectedcopysector equ 10h 5153 detectedcopyinfo equ 20h 5154 detectedinfo equ 40h 5155 detectedfsineeded equ 80h 5156 5157 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 5165 0 00002AEF 00 align 4, db 0 5167 info_reset_struc: 5168 .signature1: 0 00002AF0 52526141 dd FSINFO.signature1_value 5170 .signature1_size: equ $ - .signature1 5171 .signature2_plus_entries: 0 00002AF4 72724161 dd FSINFO.signature2_value 0 00002AF8 FFFFFFFF dd -1 0 00002AFC FFFFFFFF dd -1 5175 .signature2_plus_entries_size: equ $ - .signature2_plus_entries 5176 .signature3: 0 00002B00 000055AA dd FSINFO.signature3_value 5178 .signature3_size: equ $ - .signature3 5179 5180 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 5184 5185 struc GINFO 5186 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 5193 endstruc 5194 5195 g_table: 5196 5197 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 5203 5204 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 5210 5211 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 5217 5218 g_table_end: 5219 5220 5221 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 5238 %if _NUM_REPLACEMENTS 5239 _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 5243 %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 5272 %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 5276 %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 5283 %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 5308 %endif 0 00003902 00 asciz 5310 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 5321 .drive_and_image_specified: 0 00003A10 447269766520616E64 asciz "Drive and FS image specified.",13,10 0 00003A19 20465320696D616765 0 00003A22 207370656369666965 0 00003A2B 642E0D0A00 5323 .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 5327 .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 5329 .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 5333 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 5337 .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 5339 .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 5342 .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 5345 .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 5348 .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 5353 %if !_FAT32 || !_FAT16 || !_FAT12 5354 .not_supported_fat_type: 5355 asciz "This FAT type is not supported in this build.",13,10 5356 %endif 5357 5358 %if _NUM_DETECT_NAMES 0 00003D69 00 align 4, db 0 5360 load_kernel_name: equ $ 0 00003D6C 00 times 12 db 0 5362 ; buffer for base name (8) + ext (3) + NUL (1) = 12 5363 %if _NUM_REPLACEMENTS 5364 .name_replacements: 0 00003D78 00 times 12 * _NUM_REPLACEMENTS db 0 5366 ; name replacement buffers, 4 times same as load_kernel_name 5367 %endif 5368 align 4, db 0 5369 .foundname: 0 00003DA8 00 times 8+1+3+1 db 0 5371 ; buffer for base name (8) + dot (1) + ext (3) + NUL (1) 0 00003DB5 00 align 2, db 0 5373 .foundname_none: 0 00003DB6 284E6F6E652900 asciz "(None)" 5375 .foundname_none_size: equ $ - .foundname_none 0 00003DBD 00 align 4, db 0 5377 .names: 5378 %assign ii 1 5379 %rep _NUM_DETECT_NAMES 5380 dw .name_ %+ ii, 0 5381 %assign ii ii + 1 5382 %endrep 0 00003DC0 [D23C]0000 dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 0 00003DC4 [DB3C]0000 dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 0 00003DC8 [E43C]0000 dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 0 00003DCC [ED3C]0000 dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 0 00003DD0 0000 dw 0 5384 %assign ii 1 5385 %rep _NUM_DETECT_NAMES 5386 _autodigitsstrdef DEF, ii 5387 %strcat string _DEF 5388 %strlen ll string 5389 %substr ones string ll 5390 %if ll >= 2 5391 %substr tens string ll - 1 5392 %else 5393 %define tens "0" 5394 %endif 5395 %deftok tokenones ones 5396 %deftok tokentens tens 5397 %if tokentens != 1 && tokenones == 1 5398 %define suffix "st" 5399 %elif tokentens != 1 && tokenones == 2 5400 %define suffix "nd" 5401 %elif tokentens != 1 && tokenones == 3 5402 %define suffix "rd" 5403 %else 5404 %define suffix "th" 5405 %endif 5406 .name_ %+ ii: asciz _DEF,suffix," name" 5407 %assign ii ii + 1 5408 %endrep 5386 <1> _autodigitsstrdef DEF, ii 5387 <1> %strcat string _DEF 5388 <1> %strlen ll string 5389 <1> %substr ones string ll 5390 <1> %if ll >= 2 5391 <1> %substr tens string ll - 1 5392 <1> %else 5393 <1> %define tens "0" 5394 <1> %endif 5395 <1> %deftok tokenones ones 5396 <1> %deftok tokentens tens 5397 <1> %if tokentens != 1 && tokenones == 1 5398 <1> %define suffix "st" 5399 <1> %elif tokentens != 1 && tokenones == 2 5400 <1> %define suffix "nd" 5401 <1> %elif tokentens != 1 && tokenones == 3 5402 <1> %define suffix "rd" 5403 <1> %else 5404 <1> %define suffix "th" 5405 <1> %endif 0 00003DD2 317374206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5407 <1> %assign ii ii + 1 5386 <1> _autodigitsstrdef DEF, ii 5387 <1> %strcat string _DEF 5388 <1> %strlen ll string 5389 <1> %substr ones string ll 5390 <1> %if ll >= 2 5391 <1> %substr tens string ll - 1 5392 <1> %else 5393 <1> %define tens "0" 5394 <1> %endif 5395 <1> %deftok tokenones ones 5396 <1> %deftok tokentens tens 5397 <1> %if tokentens != 1 && tokenones == 1 5398 <1> %define suffix "st" 5399 <1> %elif tokentens != 1 && tokenones == 2 5400 <1> %define suffix "nd" 5401 <1> %elif tokentens != 1 && tokenones == 3 5402 <1> %define suffix "rd" 5403 <1> %else 5404 <1> %define suffix "th" 5405 <1> %endif 0 00003DDB 326E64206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5407 <1> %assign ii ii + 1 5386 <1> _autodigitsstrdef DEF, ii 5387 <1> %strcat string _DEF 5388 <1> %strlen ll string 5389 <1> %substr ones string ll 5390 <1> %if ll >= 2 5391 <1> %substr tens string ll - 1 5392 <1> %else 5393 <1> %define tens "0" 5394 <1> %endif 5395 <1> %deftok tokenones ones 5396 <1> %deftok tokentens tens 5397 <1> %if tokentens != 1 && tokenones == 1 5398 <1> %define suffix "st" 5399 <1> %elif tokentens != 1 && tokenones == 2 5400 <1> %define suffix "nd" 5401 <1> %elif tokentens != 1 && tokenones == 3 5402 <1> %define suffix "rd" 5403 <1> %else 5404 <1> %define suffix "th" 5405 <1> %endif 0 00003DE4 337264206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5407 <1> %assign ii ii + 1 5386 <1> _autodigitsstrdef DEF, ii 5387 <1> %strcat string _DEF 5388 <1> %strlen ll string 5389 <1> %substr ones string ll 5390 <1> %if ll >= 2 5391 <1> %substr tens string ll - 1 5392 <1> %else 5393 <1> %define tens "0" 5394 <1> %endif 5395 <1> %deftok tokenones ones 5396 <1> %deftok tokentens tens 5397 <1> %if tokentens != 1 && tokenones == 1 5398 <1> %define suffix "st" 5399 <1> %elif tokentens != 1 && tokenones == 2 5400 <1> %define suffix "nd" 5401 <1> %elif tokentens != 1 && tokenones == 3 5402 <1> %define suffix "rd" 5403 <1> %else 5404 <1> %define suffix "th" 5405 <1> %endif 0 00003DED 347468206E616D6500 .name_ %+ ii: asciz _DEF,suffix," name" 5407 <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 5413 5414 %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 5417 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 5421 %endif 5422 %endif 5423 5424 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 5428 .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 5430 .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 5432 .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 5434 .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 5436 .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 5438 .allowing_sector_invalid: 0 00003F19 416C6C6F77696E6720 asciz "Allowing invalid sector: " 0 00003F22 696E76616C69642073 0 00003F2B 6563746F723A2000 5440 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 5462 .unit_found.set_dl.after: 0 00004096 682E00 asciz "h." 5464 .lba_found.keeping: 5465 .query_found.keeping: 5466 .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 5469 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 5476 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 5483 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 5491 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 5515 5516 .switch_requires_filename: 0 0000454D 537769746368207265 asciz "Switch requires a filename.",13,10 0 00004556 717569726573206120 0 0000455F 66696C656E616D652E 0 00004568 0D0A00 5518 .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 5520 .switch_filename_empty: 0 00004593 537769746368206669 asciz "Switch filename is empty.",13,10 0 0000459C 6C656E616D65206973 0 000045A5 20656D7074792E0D0A 0 000045AE 00 5522 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 5527 .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 5541 .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 5543 .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 5558 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 5561 .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 5566 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 5570 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 5612 5613 5614 align 2, db 0 5615 dos_error_table: 5616 .: 5617 %assign ii 0 5618 %rep 40 5619 _autodigitsstrdef NUMBER, ii 5620 %deftok _NUMBER _NUMBER 5621 dw msg.dos_error_ %+ _NUMBER 5622 %assign ii ii + 1 5623 %endrep 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D70 [AF49] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D72 [B849] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D74 [C949] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D76 [D849] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D78 [E749] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D7A [FC49] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D7C [0A4A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D7E [194A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D80 [274A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D82 [354A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D84 [414A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D86 [554A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D88 [644A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D8A [784A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D8C [854A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D8E [944A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D90 [A24A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D92 [C84A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D94 [D84A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D96 [E64A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D98 [FB4A] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D9A [084B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D9C [184B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004D9E [284B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DA0 [334B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DA2 [504B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DA4 [5B4B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DA6 [6E4B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DA8 [7F4B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DAA [944B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DAC [A04B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DAE [AB4B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DB0 [BB4B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DB2 [CD4B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DB4 [DC4B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DB6 [F04B] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DB8 [004C] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DBA [184C] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DBC [2B4C] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 0 00004DBE [4A4C] dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5624 .after_last: equ ($ - .) >> 1 5625 5626 5627 symhint_store_string dskerr 5628 dskerrs: 5629 .: 5630 %assign ii 0 5631 %rep 0Dh 5632 _autohexitsstrdef NUMBER, ii 5633 %strcat _NUMBER "dskerr",_NUMBER 5634 %deftok _NUMBER _NUMBER 5635 db _NUMBER - dskerrs 5636 %assign ii ii + 1 5637 %endrep 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC0 0D db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC1 21 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC2 34 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC3 44 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC4 54 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC5 94 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC6 65 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC7 70 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC8 83 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DC9 94 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DCA A2 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DCB AE db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5632 <1> _autohexitsstrdef NUMBER, ii 5633 <1> %strcat _NUMBER "dskerr",_NUMBER 5634 <1> %deftok _NUMBER _NUMBER 0 00004DCC B9 db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5638 .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 5647 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 5656 5657 5658 imsg: 5659 %if _VDD 0 00004EA3 44454258585644442E .vdd: asciz "DEBXXVDD.DLL" 0 00004EAC 444C4C00 0 00004EB0 446973706174636800 .dispatch: asciz "Dispatch" 0 00004EB9 496E697400 .init: asciz "Init" 5663 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 5666 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 5668 endarea .ntdos 5669 5670 ; INP: - 5671 ; OUT: CY if not NTVDM 5672 ; NC if NTVDM 5673 ; ds = es = cs 5674 ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 5675 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 5691 .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 5700 .notlast: 0 00004F2B 803F4D cmp byte [bx], 'M' ; Valid MCB chain? 0 00004F2E 756C jne .error 5703 .notchain: 0 00004F30 8B4F03 mov cx, [bx+3] ; MCB size in paragraphs 5705 ; ax = current memory block 5706 ; cx = size of current memory block in paragraphs 5707 ; dx = flag whether this is the last MCB 5708 ; 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 5713 .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 5718 ; ax = current SD sub-segment 5719 ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 5720 ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 5721 ; 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 5736 ; 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 5744 ; ax = current SD sub-segment size in byte 5745 .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 5752 .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) 5759 .notfound_3: 0 00004F8A 8CD8 mov ax, ds 5761 .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 5767 .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 5771 ; jmp short .notnt ; Otherwise, not found 5772 .error: 5773 .notnt: 0 00004F9C F9 stc 5775 .found: 0 00004F9D 0E push cs 0 00004F9E 1F pop ds ; restore ds 5778 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 5785 5786 findstring: 0 00004FA8 31F6 xor si, si 5788 .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 5794 .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 5807 .return: 0 00004FC2 C3 retn 5809 %endif 5810 5811 5812 initialise: 5813 ; Check DOS version 5814 %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 5820 .isnotnt: 5821 %endif 5822 0 00004FCF B80030 mov ax, 3000h ; check DOS version 0 00004FD2 CD21 int 21h 0 00004FD4 86E0 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 5829 .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 5837 .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 86E0 xchg al, ah ; strange Microsoft version format 5844 .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 5848 .notnewpacket: 5849 %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 5860 .novdd: 5861 %endif 5862 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 5874 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 5884 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 5889 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 5898 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 5904 %if 0 5905 AAAB 5906 ^ 5907 sca B, match 5908 ^ 5909 sca B, mismatch 5910 ^ 5911 stop 5912 %endif 0 00005071 83C704 add di, 4 ; di -> first differing byte (from top) 0 00005074 FC cld 5915 5916 %if 0 5917 0000000000000 5918 AAAAAAAA00000 5919 ^ 5920 FFFFFFFFFFFFF 5921 AAAAAAAA00FFF 5922 ^ 5923 %endif 0 00005075 39FA cmp dx, di ; choose the higher one 0 00005077 7302 jae @F 0 00005079 89FA mov dx, di 5927 @@: 0 0000507B 29DA sub dx, bx ; dx = sector size 5929 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 5935 @@: 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 5942 5943 .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 5952 5953 5954 .access_error: 0 000050A8 BA[0338] mov dx, msg.boot_access_error 0 000050AB EB0D jmp .error_common_j 5957 .sector_too_large: 0 000050AD BA[1338] mov dx, msg.boot_sector_too_large 0 000050B0 EB08 jmp .error_common_j 5960 .sector_too_small: 0 000050B2 BA[3938] mov dx, msg.boot_sector_too_small 0 000050B5 EB03 jmp .error_common_j 5963 .sector_not_power: 0 000050B7 BA[6138] mov dx, msg.boot_sector_not_power 5965 .error_common_j: 0 000050BA E8F6D6 call disp_msg_asciz 0 000050BD F9 stc 0 000050BE C3 retn 5969 0 000050BF 00 align 16, db 0 === Switch to base=-000100h -> "BUFFERS" 5971 section BUFFERS 5972 5973 align 8, db 0 5974 m_seek: 0 000058C0 FFFFFFFFFFFFFFFF dq -1 5976 m_offset: 0 000058C8 0000000000000000 dq 0 5978 m_sector_size: 0 000058D0 00020000 dd 512 5980 m_1: 0 000058D4 01000000 dd 1 5982 m_1024: 0 000058D8 00040000 dd 1024 5984 m_1024_times_1024: 0 000058DC 00001000 dd 1024 * 1024 5986 5987 align 4, db 0 0 000058E0 22A00000 cmd_line_flags: dd clfWriteSectorToSector | clfWriteInfoToSector | clfWriteCopySectorIfSector | clfWriteCopyInfoIfSector 5990 clfWriteSectorToFile: equ 1 5991 clfWriteSectorToSector: equ 2 5992 clfDontWriteSector: equ 4 5993 clfWriteSectorMask: equ clfWriteSectorToFile | clfWriteSectorToSector | clfDontWriteSector 5995 clfDontWriteInfo: equ 8 5996 clfWriteInfoToFile: equ 10h 5997 clfWriteInfoToSector: equ 20h 5998 clfWriteInfoToSectorFile: equ 40h 5999 clfWriteInfoMask: equ clfWriteInfoToFile | clfWriteInfoToSector | clfWriteInfoToSectorFile | clfDontWriteInfo 6002 clfReadSectorFile12: equ 80h 6003 clfReadSectorFile16: equ 100h 6004 clfReadSectorFile32: equ 200h 6005 clfAllowInvalidSector: equ 400h 6006 clfAllowInvalidInfo: equ 800h 6007 clfWriteCopySector: equ 1000h 6008 clfWriteCopySectorIfSector: equ 2000h 6009 clfWriteCopyInfo: equ 4000h 6010 clfWriteCopyInfoIfSector: equ 8000h 6011 clfLeaveSector: equ 1_0000h 6012 clfSectorFromCopy: equ 2_0000h 6013 clfLeaveInfo: equ 10_0000h 6014 clfInfoFromCopy: equ 20_0000h 6015 clfZeroInfo: equ 40_0000h 6016 clfSetOEMName: equ 100_0000h 6017 clfPreserveOEMName: equ 200_0000h 6018 clfAllowInvalidFSI: equ 400_0000h 6019 clfCheckFSI: equ 800_0000h 6020 6021 align 4, db 0 6022 cmd_line_readsector12_file: 0 000058E4 0000 .name: dw 0 0 000058E6 FFFF .handle: dw -1 6025 cmd_line_readsector16_file: 0 000058E8 0000 .name: dw 0 0 000058EA FFFF .handle: dw -1 6028 cmd_line_readsector32_file: 0 000058EC 0000 .name: dw 0 0 000058EE FFFF .handle: dw -1 6031 cmd_line_sector_file: 0 000058F0 0000 .name: dw 0 0 000058F2 FFFF .handle: dw -1 6034 cmd_line_info_file: 0 000058F4 0000 .name: dw 0 0 000058F6 FFFF .handle: dw -1 6037 cmd_line_image_file: 0 000058F8 0000 .name: dw 0 0 000058FA FFFF .handle: dw -1 6040 cmd_line_file_name_ofs: equ 0 6041 cmd_line_file_handle_ofs: equ 2 6042 6043 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 6049 0 00005919 0000 dw 0 ; insure there's an unused word in front of this (1) 0 0000591B 00 align 16, db 0 6052 first_sector_buffer: 6053 second_sector_buffer: equ first_sector_buffer - LOADDATA2 + 16 + 8192 6054 third_sector_buffer_512_bytes: equ second_sector_buffer + 8192 6056 end: equ third_sector_buffer_512_bytes + 512 6057 stack_start: equ end 6058 stack_end: equ stack_start + 4096 6059