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 45 00000000 ?????? bsJump: resb 3 46 00000003 ???????????????? bsOEM: resb 8 47 bsBPB: 48 endstruc 49 50 struc EBPB ; BPB sec 51 00000000 ???? bpbBytesPerSector: resw 1 ; offset 00h 0Bh 52 00000002 ?? bpbSectorsPerCluster: resb 1 ; offset 02h 0Dh 53 00000003 ???? bpbReservedSectors: resw 1 ; offset 03h 0Eh 54 00000005 ?? bpbNumFATs: resb 1 ; offset 05h 10h 55 00000006 ???? bpbNumRootDirEnts: resw 1 ; offset 06h 11h -- 0 for FAT32 56 00000008 ???? bpbTotalSectors: resw 1 ; offset 08h 13h 57 0000000A ?? bpbMediaID: resb 1 ; offset 0Ah 15h 58 0000000B ???? bpbSectorsPerFAT: resw 1 ; offset 0Bh 16h -- 0 for FAT32 59 0000000D ???? bpbCHSSectors: resw 1 ; offset 0Dh 18h 60 0000000F ???? bpbCHSHeads: resw 1 ; offset 0Fh 1Ah 61 00000011 ???????? bpbHiddenSectors: resd 1 ; offset 11h 1Ch 62 00000015 ???????? bpbTotalSectorsLarge: resd 1 ; offset 15h 20h 63 bpbNew: ; offset 19h 24h 64 65 00000019 ???????? ebpbSectorsPerFATLarge: resd 1 ; offset 19h 24h 66 0000001D ???? ebpbFSFlags: resw 1 ; offset 1Dh 28h 67 0000001F ???? ebpbFSVersion: resw 1 ; offset 1Fh 2Ah 68 00000021 ???????? ebpbRootCluster: resd 1 ; offset 21h 2Ch 69 00000025 ???? ebpbFSINFOSector: resw 1 ; offset 25h 30h 70 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 76 00000000 ?? bpbnBootUnit: resb 1 ; 00h 19h 24h 35h 40h 77 00000001 ?? resb 1 ; 01h 1Ah 25h 36h 41h 78 00000002 ?? bpbnExtBPBSignature: resb 1 ; 02h 1Bh 26h 37h 42h -- 29h for valid BPBN 79 00000003 ???????? bpbnSerialNumber: resd 1 ; 03h 1Ch 27h 38h 43h 80 00000007 bpbnVolumeLabel: resb 11 ; 07h 20h 2Bh 3Ch 47h 81 00000012 ???????????????? bpbnFilesystemID: resb 8 ; 12h 2Bh 36h 47h 52h 82 endstruc ; 1Ah 33h 3Eh 4Fh 5Ah 83 84 struc LOADSTACKVARS, -10h 85 FFFFFFF0 ???????? lsvFirstCluster: resd 1 86 FFFFFFF4 ???????? lsvFATSector: resd 1 87 FFFFFFF8 ???? lsvFATSeg: resw 1 88 FFFFFFFA ???? lsvLoadSeg: resw 1 89 FFFFFFFC ???????? lsvDataStart: resd 1 90 endstruc 91 92 struc LOADDATA, LOADSTACKVARS - 10h 93 FFFFFFE0 ???? ldMemoryTop: resw 1 94 FFFFFFE2 ???? ldLoadTop: resw 1 95 FFFFFFE4 ???? ldSectorSeg: resw 1 96 FFFFFFE6 ?? ldFATType: resb 1 97 FFFFFFE7 ?? ldHasLBA: resb 1 98 FFFFFFE8 ???? ldClusterSize: resw 1 99 FFFFFFEA ???? ldParaPerSector:resw 1 100 FFFFFFEC ???? ldLoadingSeg: resw 1 101 FFFFFFEE ???? ldLoadUntilSeg: resw 1 102 endstruc 103 104 struc LOADDATA2, LOADDATA - 10h 105 FFFFFFD0 ???????? ldRootSector: resd 1 106 FFFFFFD4 ???? ldEntriesPerSector: resw 1 107 FFFFFFD6 ???? ldLastAvailableSector: resw 1 108 FFFFFFD8 ???? ldParasLeft: resw 1 109 FFFFFFDA ???? ldParasDone: resw 1 110 FFFFFFDC ???? ldBytesPerSector: resw 1 111 endstruc 112 113 struc DIRENTRY 114 00000000 ???????????????? deName: resb 8 115 00000008 ?????? deExt: resb 3 116 0000000B ?? deAttrib: resb 1 117 0000000C ???????????????? resb 8 118 00000014 ???? deClusterHigh: resw 1 119 00000016 ???? deTime: resw 1 120 00000018 ???? deDate: resw 1 121 0000001A ???? deClusterLow: resw 1 122 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 133 00000000 ???? lpSize: resw 1 134 00000002 ???? lpCount: resw 1 135 00000004 ???????? lpBuffer: resd 1 136 00000008 ???????????????? lpSector: resq 1 137 endstruc 138 139 struc PARTINFO 140 00000000 ?? piBoot: resb 1 141 00000001 ?????? piStartCHS: resb 3 142 00000004 ?? piType: resb 1 143 00000005 ?????? piEndCHS: resb 3 144 00000008 ???????? piStart: resd 1 145 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 161 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 165 000001E4 ???????? .signature2: resd 1 ; 61417272h ("rrAa") for valid FSINFO 166 .signature2_value: equ 61417272h 167 000001E8 ???????? .numberfree: resd 1 ; FSINFO: number of free clusters or -1 168 000001EC ???????? .nextfree: resd 1 ; FSINFO: first free cluster or -1 169 000001F0 .reserved2: resd 3 ; unused, initialized to zero by FORMAT 170 000001FC ???????? .signature3: resd 1 ; AA550000h for valid FSINFO or FSIBOOT 171 .signature3_value: equ 0AA550000h 172 endstruc 173 174 struc FSIBOOTG ; FSIBOOT general layout 175 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 204 section PROGRAM align=16 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 251 section PROGRAM 252 start: 253 ; This is a simple MS-DOS 1.x detection (8 Byte). 254 00000000 B44D mov ah, 4Dh ; the only function I found that doesn't need much setup or cleanup 255 00000002 F9 stc ; but that uses MS-DOS 2.x error reporting. clears CF (Int21.30 does not) 256 00000003 CD21 int 21h 257 00000005 7301 jnc .dosgood ; it is MS-DOS 2.x+ or compatible --> 258 00000007 C3 retn ; it isn't so simply terminate 259 260 .dosgood: 261 00000008 FC cld 262 00000009 81FC[A05A] cmp sp, stack_end 263 0000000D 730B jae .stackgood 264 0000000F BA[8338] mov dx, msg.out_of_memory 265 00000012 E89E26 call disp_msg_asciz 266 00000015 B8FF4C mov ax, 4CFFh 267 00000018 CD21 int 21h 268 269 .stackgood: 270 0000001A BA[9526] mov dx, i23 271 0000001D B82325 mov ax, 2523h 272 00000020 CD21 int 21h ; set Int23 so that we restore on Ctrl-C as well 273 00000022 BA[9226] mov dx, i24 274 00000025 B82425 mov ax, 2524h 275 00000028 CD21 int 21h ; set Int24 so all hard errors are changed to the soft error 276 277 0000002A C606[EE29]FF mov byte [drivenumber], -1 278 279 0000002F BE8100 mov si, 81h 280 .loop: 281 00000032 AC lodsb 282 .loop_got_byte: 283 00000033 3C09 cmp al, 9 284 00000035 74FB je .loop 285 00000037 3C20 cmp al, 32 286 00000039 74F7 je .loop 287 0000003B 7303E91508 jb cmd_line_end 288 289 00000040 3C2D cmp al, '-' 290 00000042 7428 je .switch 291 00000044 3C2F cmp al, '/' 292 00000046 7424 je .switch 293 294 00000048 803C3A cmp byte [si], ':' 295 0000004B 7403E9BB07 jne .error 296 00000050 E88525 call uppercase 297 00000053 2C41 sub al, 'A' 298 00000055 3C20 cmp al, 32 299 00000057 7203E9AF07 jae .error 300 0000005C 803E[EE29]FF cmp byte [drivenumber], -1 301 00000061 7403E99F07 jne .error_multiple_drives 302 00000066 A2[EE29] mov byte [drivenumber], al 303 00000069 46 inc si 304 0000006A EBC6 jmp .loop 305 306 .switch: 307 0000006C AC lodsb 308 0000006D E86825 call uppercase 309 %if _NUM_REPLACEMENTS 310 00000070 3C46 cmp al, 'F' 311 00000072 7467 je .switch_f 312 %endif 313 00000074 3C4F cmp al, 'O' 314 00000076 7503E9DD00 je .switch_o 315 0000007B 3C55 cmp al, 'U' 316 0000007D 7503E9B801 je .switch_u 317 00000082 3C50 cmp al, 'P' 318 00000084 7503E9F601 je .switch_p 319 00000089 3C51 cmp al, 'Q' 320 0000008B 7503E92B02 je .switch_q 321 00000090 3C4C cmp al, 'L' 322 00000092 7503E96002 je .switch_l 323 00000097 3C49 cmp al, 'I' 324 00000099 7503E9A002 je .switch_i 325 0000009E 3C42 cmp al, 'B' 326 000000A0 7503E94803 je .switch_b 327 000000A5 3C43 cmp al, 'C' 328 000000A7 7503E9BA03 je .switch_c 329 000000AC 3C53 cmp al, 'S' 330 000000AE 7503E93204 je .switch_s 331 000000B3 3C4D cmp al, 'M' 332 000000B5 7503E96F05 je .switch_m 333 000000BA 3C47 cmp al, 'G' 334 000000BC 7503E94606 je .switch_g 335 336 000000C1 3C48 cmp al, 'H' 337 000000C3 740D je .switch_h 338 000000C5 3C3F cmp al, '?' 339 000000C7 7409 je .switch_h 340 341 .switch_not_supported: 342 000000C9 BA[9438] mov dx, msg.switch_not_supported 343 disp_error: equ $ 344 000000CC E8E425 call disp_msg_asciz 345 000000CF E9DA15 jmp exit_error 346 347 348 .switch_h: 349 000000D2 BA[2C2A] mov dx, msg.help 350 000000D5 E8DB25 call disp_msg_asciz 351 000000D8 E9DC15 jmp exit_normal 352 353 354 %if _NUM_REPLACEMENTS 355 .switch_f: 356 357 @@: 358 000000DB AC lodsb 359 000000DC 3C20 cmp al, 32 360 000000DE 74FB je @B 361 000000E0 3C09 cmp al, 9 362 000000E2 74F7 je @B 363 000000E4 3C3D cmp al, '=' 364 000000E6 742F je @FF 365 000000E8 3C3A cmp al, ':' 366 000000EA 742B je @FF 367 000000EC E80B25 call get_decimal_literal 368 000000EF 85DB test bx, bx 369 000000F1 7403E91507 jnz .error 370 000000F6 85D2 test dx, dx 371 000000F8 7503E90E07 jz .error 372 000000FD 83FA04 cmp dx, _NUM_REPLACEMENTS 373 00000100 7603E90607 ja .error 374 00000105 4A dec dx 375 00000106 3C3D cmp al, '=' 376 00000108 7407 je @F 377 0000010A 3C3A cmp al, ':' 378 0000010C 7403E9FA06 jne .error 379 @@: 380 00000111 B80C00 mov ax, 12 381 00000114 F7E2 mul dx ; ax = 0, 12, 24, 36 382 00000116 A9 db __TEST_IMM16 ; (skip xor) 383 @@: 384 00000117 31C0 xor ax, ax ; if empty number field (al was colon) 385 00000119 05[783C] add ax, msg.name_replacements ; -> name replacement buffer 386 0000011C 97 xchg ax, di ; -> buffer 387 388 0000011D AC lodsb 389 0000011E 4E dec si 390 0000011F 3C20 cmp al, 32 391 00000121 742F je @F 392 00000123 3C09 cmp al, 9 393 00000125 742B je @F 394 00000127 E87124 call iseol? 395 0000012A 7426 je @F 396 397 0000012C 57 push di 398 0000012D E8E723 call boot_parse_fn ; parse 399 00000130 5F pop di 400 00000131 7303E9D506 jc .error ; error out --> 401 00000136 3C2F cmp al, '/' 402 00000138 7503E9CE06 je .error 403 0000013D 3C5C cmp al, '\' 404 0000013F 7503E9C706 je .error ; invalid --> 405 00000144 4E dec si 406 00000145 56 push si 407 00000146 BE[6C3C] mov si, load_kernel_name 408 00000149 B90600 mov cx, 12 >> 1 409 0000014C F3A5 rep movsw ; write to buffer 410 0000014E 5E pop si 411 0000014F E9E0FE jmp .loop 412 413 @@: 414 00000152 C60500 mov byte [di], 0 ; delete replacement name 415 00000155 E9DAFE jmp .loop 416 %endif 417 418 419 .switch_o: 420 00000158 AC lodsb 421 00000159 E87C24 call uppercase 422 0000015C 3C4E cmp al, 'N' 423 0000015E 7508 jne @F 424 00000160 8026[2308]FC clropt [cmd_line_flags], clfSetOEMName | clfPreserveOEMName 425 00000165 E9CAFE jmp .loop 426 427 @@: 428 00000168 3C50 cmp al, 'P' 429 0000016A 750D jne @F 430 0000016C 800E[2308]02 setopt [cmd_line_flags], clfPreserveOEMName 431 00000171 8026[2308]FE clropt [cmd_line_flags], clfSetOEMName 432 00000176 E9B9FE jmp .loop 433 434 @@: 435 00000179 3C3D cmp al, '=' 436 0000017B 7407 je @F 437 0000017D 3C3A cmp al, ':' 438 0000017F 7403 je @F 439 00000181 E945FF jmp .switch_not_supported 440 441 @@: 442 00000184 8026[2308]FD clropt [cmd_line_flags], clfPreserveOEMName 443 00000189 800E[2308]01 setopt [cmd_line_flags], clfSetOEMName 444 0000018E BF[DC29] mov di, oemname 445 00000191 AC lodsb 446 00000192 88C4 mov ah, al 447 00000194 3C22 cmp al, '"' 448 00000196 7407 je .o_quoted 449 00000198 3C27 cmp al, "'" 450 0000019A 7403 je .o_quoted 451 0000019C B400 mov ah, 0 452 0000019E A8 db __TEST_IMM8 453 .o_quoted: 454 .o_loop: 455 0000019F AC lodsb 456 000001A0 38E0 cmp al, ah 457 000001A2 742E je .o_end_lod 458 000001A4 84E4 test ah, ah 459 000001A6 750C jnz @F 460 000001A8 3C09 cmp al, 9 461 000001AA 7427 je .o_end 462 000001AC 3C20 cmp al, 32 463 000001AE 7423 je .o_end 464 000001B0 3C0D cmp al, 13 465 000001B2 741F je .o_end 466 @@: 467 000001B4 3C0D cmp al, 13 468 000001B6 7448 je .o_error 469 000001B8 81FF[E429] cmp di, oemname + 8 470 000001BC 7342 jae .o_error 471 000001BE 3C5C cmp al, '\' 472 000001C0 750D jne .o_store 473 000001C2 AC lodsb 474 000001C3 3C0D cmp al, 13 475 000001C5 7439 je .o_error 476 000001C7 3C78 cmp al, 'x' 477 000001C9 743B je .o_x 478 000001CB 3C58 cmp al, 'X' 479 000001CD 7437 je .o_x 480 .o_store: 481 000001CF AA stosb 482 000001D0 EBCD jmp .o_loop 483 484 .o_end_lod: 485 000001D2 AC lodsb 486 .o_end: 487 000001D3 89F9 mov cx, di 488 000001D5 81E9[DC29] sub cx, oemname 489 000001D9 83F908 cmp cx, 8 490 000001DC 731F jae .o_done 491 000001DE 56 push si 492 000001DF 50 push ax 493 000001E0 BF[E329] mov di, oemname + 7 494 000001E3 BE[DC29] mov si, oemname 495 000001E6 01CE add si, cx 496 000001E8 4E dec si 497 000001E9 FD std ; AMD erratum 109 workaround below 498 000001EA E303 jcxz @FF 499 @@: 500 000001EC A4 movsb 501 000001ED E2FD loop @B 502 @@: 503 ; rep movsb 504 @@: 505 000001EF 81FF[DC29] cmp di, oemname 506 000001F3 7205 jb @F 507 000001F5 B020 mov al, 32 508 000001F7 AA stosb 509 000001F8 EBF5 jmp @B 510 @@: 511 000001FA FC cld 512 000001FB 58 pop ax 513 000001FC 5E pop si 514 .o_done: 515 000001FD E933FE jmp .loop_got_byte 516 517 .o_error: 518 00000200 BA[AC38] mov dx, msg.o_error 519 00000203 E9C6FE jmp disp_error 520 521 .o_x: 522 00000206 AC lodsb 523 00000207 E84E24 call getexpression.lit_ishexdigit? 524 0000020A 72F4 jc .o_error 525 0000020C E8C923 call uppercase 526 0000020F 2C30 sub al, '0' 527 00000211 3C09 cmp al, 9 ; was decimal digit ? 528 00000213 7602 jbe @F ; yes --> 529 00000215 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 530 @@: 531 00000217 88C3 mov bl, al 532 00000219 AC lodsb 533 0000021A E83B24 call getexpression.lit_ishexdigit? 534 0000021D 7216 jc .o_store_bl_dec_si 535 0000021F E8B623 call uppercase 536 00000222 2C30 sub al, '0' 537 00000224 3C09 cmp al, 9 ; was decimal digit ? 538 00000226 7602 jbe @F ; yes --> 539 00000228 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 540 @@: 541 0000022A 00DB add bl, bl 542 0000022C 00DB add bl, bl 543 0000022E 00DB add bl, bl 544 00000230 00DB add bl, bl 545 00000232 00C3 add bl, al 546 00000234 46 inc si 547 .o_store_bl_dec_si: 548 00000235 4E dec si 549 00000236 88D8 mov al, bl 550 00000238 EB95 jmp .o_store 551 552 .switch_u: 553 @@: 554 0000023A AC lodsb 555 0000023B 3C20 cmp al, 32 556 0000023D 74FB je @B 557 0000023F 3C09 cmp al, 9 558 00000241 74F7 je @B 559 00000243 3C3D cmp al, '=' 560 00000245 74F3 je @B 561 00000247 3C3A cmp al, ':' 562 00000249 74EF je @B 563 564 0000024B BA[333E] mov dx, msg.keep 565 0000024E 4E dec si 566 0000024F E85023 call isstring? 567 00000252 B8FFFF mov ax, 0FFFFh 568 00000255 7422 je @F 569 00000257 BA[383E] mov dx, msg.auto 570 0000025A E84523 call isstring? 571 0000025D B800FF mov ax, 0FF00h 572 00000260 7417 je @F 573 00000262 AC lodsb 574 00000263 E89C23 call get_hexadecimal_literal 575 00000266 85DB test bx, bx 576 00000268 7403E99E05 jnz .error 577 0000026D 81FA0001 cmp dx, 256 578 00000271 7203E99505 jae .error 579 00000276 89D0 mov ax, dx 580 00000278 4E dec si 581 @@: 582 00000279 A3[E629] mov word [load_unit], ax 583 0000027C E9B3FD jmp .loop 584 585 586 .switch_p: 587 @@: 588 0000027F AC lodsb 589 00000280 3C20 cmp al, 32 590 00000282 74FB je @B 591 00000284 3C09 cmp al, 9 592 00000286 74F7 je @B 593 00000288 3C3D cmp al, '=' 594 0000028A 74F3 je @B 595 0000028C 3C3A cmp al, ':' 596 0000028E 74EF je @B 597 598 00000290 BA[333E] mov dx, msg.keep 599 00000293 4E dec si 600 00000294 E80B23 call isstring? 601 00000297 B8FFFF mov ax, 0FFFFh 602 0000029A 7419 je @F 603 0000029C BA[383E] mov dx, msg.auto 604 0000029F E80023 call isstring? 605 000002A2 B800FF mov ax, 0FF00h 606 000002A5 740E je @F 607 000002A7 BA[453E] mov dx, msg.none 608 000002AA E8F522 call isstring? 609 000002AD B8FF00 mov ax, 00FFh 610 000002B0 7403 je @F 611 000002B2 E95605 jmp .error 612 @@: 613 000002B5 A3[E829] mov word [load_use_partinfo], ax 614 000002B8 E977FD jmp .loop 615 616 617 .switch_q: 618 @@: 619 000002BB AC lodsb 620 000002BC 3C20 cmp al, 32 621 000002BE 74FB je @B 622 000002C0 3C09 cmp al, 9 623 000002C2 74F7 je @B 624 000002C4 3C3D cmp al, '=' 625 000002C6 74F3 je @B 626 000002C8 3C3A cmp al, ':' 627 000002CA 74EF je @B 628 629 000002CC BA[333E] mov dx, msg.keep 630 000002CF 4E dec si 631 000002D0 E8CF22 call isstring? 632 000002D3 B8FFFF mov ax, 0FFFFh 633 000002D6 7419 je @F 634 000002D8 BA[383E] mov dx, msg.auto 635 000002DB E8C422 call isstring? 636 000002DE B800FF mov ax, 0FF00h 637 000002E1 740E je @F 638 000002E3 BA[453E] mov dx, msg.none 639 000002E6 E8B922 call isstring? 640 000002E9 B8FF00 mov ax, 00FFh 641 000002EC 7403 je @F 642 000002EE E91A05 jmp .error 643 @@: 644 000002F1 A3[EA29] mov word [load_use_query_geometry], ax 645 000002F4 E93BFD jmp .loop 646 647 648 .switch_l: 649 @@: 650 000002F7 AC lodsb 651 000002F8 3C20 cmp al, 32 652 000002FA 74FB je @B 653 000002FC 3C09 cmp al, 9 654 000002FE 74F7 je @B 655 00000300 3C3D cmp al, '=' 656 00000302 74F3 je @B 657 00000304 3C3A cmp al, ':' 658 00000306 74EF je @B 659 660 00000308 BA[333E] mov dx, msg.keep 661 0000030B 4E dec si 662 0000030C E89322 call isstring? 663 0000030F B8FFFF mov ax, 0FFFFh 664 00000312 7424 je @F 665 00000314 BA[383E] mov dx, msg.auto 666 00000317 E88822 call isstring? 667 0000031A B800FF mov ax, 0FF00h 668 0000031D 7419 je @F 669 0000031F BA[3D3E] mov dx, msg.autohdd 670 00000322 E87D22 call isstring? 671 00000325 B80001 mov ax, 0100h 672 00000328 740E je @F 673 0000032A BA[453E] mov dx, msg.none 674 0000032D E87222 call isstring? 675 00000330 B8FF00 mov ax, 00FFh 676 00000333 7403 je @F 677 00000335 E9D304 jmp .error 678 @@: 679 00000338 A3[EC29] mov word [load_use_lba], ax 680 0000033B E9F4FC jmp .loop 681 682 683 .switch_i: 684 0000033E AC lodsb 685 0000033F E89622 call uppercase 686 00000342 3C4F cmp al, 'O' 687 00000344 750D jne @F 688 00000346 8026[2208]9F clropt [cmd_line_flags], clfZeroInfo | clfInfoFromCopy 689 0000034B 800E[2208]10 setopt [cmd_line_flags], clfLeaveInfo 690 .loop_1: 691 00000350 E9DFFC jmp .loop 692 693 @@: 694 00000353 3C52 cmp al, 'R' 695 00000355 7507 jne @F 696 00000357 8026[2208]8F clropt [cmd_line_flags], clfLeaveInfo | clfZeroInfo | clfInfoFromCopy 697 0000035C EBF2 jmp .loop_1 698 699 @@: 700 0000035E 3C5A cmp al, 'Z' 701 00000360 750C jne @F 702 00000362 8026[2208]CF clropt [cmd_line_flags], clfLeaveInfo | clfInfoFromCopy 703 00000367 800E[2208]40 setopt [cmd_line_flags], clfZeroInfo 704 0000036C EBE2 jmp .loop_1 705 706 @@: 707 0000036E 3C43 cmp al, 'C' 708 00000370 750C jne @F 709 00000372 8026[2208]AF clropt [cmd_line_flags], clfLeaveInfo | clfZeroInfo 710 00000377 800E[2208]20 setopt [cmd_line_flags], clfInfoFromCopy 711 0000037C EBD2 jmp .loop_1 712 713 @@: 714 0000037E 3C49 cmp al, 'I' 715 00000380 7507 jne @F 716 00000382 800E[2108]08 setopt [cmd_line_flags], clfAllowInvalidInfo 717 00000387 EBC7 jmp .loop_1 718 719 @@: 720 00000389 3C56 cmp al, 'V' 721 0000038B 7507 jne @F 722 0000038D 8026[2108]F7 clropt [cmd_line_flags], clfAllowInvalidInfo 723 00000392 EBBC jmp .loop_1 724 725 @@: 726 00000394 3C53 cmp al, 'S' 727 00000396 750C jne @F 728 00000398 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 729 0000039D 800E[2008]20 setopt [cmd_line_flags], clfWriteInfoToSector 730 000003A2 EBAC jmp .loop_1 731 732 @@: 733 000003A4 3C4E cmp al, 'N' 734 000003A6 750C jne @F 735 000003A8 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 736 000003AD 800E[2008]08 setopt [cmd_line_flags], clfDontWriteInfo 737 .loop_2: 738 000003B2 EB9C jmp .loop_1 739 740 @@: 741 000003B4 3C3A cmp al, ':' 742 000003B6 740B je @F 743 000003B8 3C3D cmp al, '=' 744 000003BA 7407 je @F 745 000003BC 3C42 cmp al, 'B' 746 000003BE 7421 je .switch_i_b 747 000003C0 E906FD jmp .switch_not_supported 748 749 @@: 750 000003C3 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 751 000003C8 800E[2008]10 setopt [cmd_line_flags], clfWriteInfoToFile 752 @@: 753 000003CD AC lodsb 754 000003CE 3C20 cmp al, 32 755 000003D0 74FB je @B 756 000003D2 3C09 cmp al, 9 757 000003D4 74F7 je @B 758 759 000003D6 4E dec si 760 000003D7 8936[3408] mov word [cmd_line_info_file.name], si 761 000003DB E83304 call process_switch_filename 762 000003DE E952FC jmp .loop_got_byte 763 764 .switch_i_b: 765 000003E1 8026[2008]87 clropt [cmd_line_flags], clfWriteInfoMask 766 000003E6 800E[2008]40 setopt [cmd_line_flags], clfWriteInfoToSectorFile 767 000003EB EBC5 jmp .loop_2 768 769 770 .switch_b: 771 000003ED AC lodsb 772 000003EE E8E721 call uppercase 773 000003F1 3C4F cmp al, 'O' 774 000003F3 750C jne @F 775 000003F5 8026[2208]FD clropt [cmd_line_flags], clfSectorFromCopy 776 000003FA 800E[2208]01 setopt [cmd_line_flags], clfLeaveSector 777 000003FF EBB1 jmp .loop_2 778 779 @@: 780 00000401 3C52 cmp al, 'R' 781 00000403 7507 jne @F 782 00000405 8026[2208]FC clropt [cmd_line_flags], clfLeaveSector | clfSectorFromCopy 783 0000040A EBA6 jmp .loop_2 784 785 @@: 786 0000040C 3C43 cmp al, 'C' 787 0000040E 750C jne @F 788 00000410 8026[2208]FE clropt [cmd_line_flags], clfLeaveSector 789 00000415 800E[2208]02 setopt [cmd_line_flags], clfSectorFromCopy 790 0000041A EB96 jmp .loop_2 791 792 @@: 793 0000041C 3C53 cmp al, 'S' 794 0000041E 750C jne @F 795 00000420 8026[2008]F8 clropt [cmd_line_flags], clfWriteSectorMask 796 00000425 800E[2008]02 setopt [cmd_line_flags], clfWriteSectorToSector 797 0000042A EB86 jmp .loop_2 798 799 @@: 800 0000042C 3C4E cmp al, 'N' 801 0000042E 750D jne @F 802 00000430 8026[2008]F8 clropt [cmd_line_flags], clfWriteSectorMask 803 00000435 800E[2008]04 setopt [cmd_line_flags], clfDontWriteSector 804 0000043A E975FF jmp .loop_2 805 806 @@: 807 0000043D 3C3A cmp al, ':' 808 0000043F 7407 je @F 809 00000441 3C3D cmp al, '=' 810 00000443 7403 je @F 811 00000445 E981FC jmp .switch_not_supported 812 813 @@: 814 00000448 8026[2008]F8 clropt [cmd_line_flags], clfWriteSectorMask 815 0000044D 800E[2008]01 setopt [cmd_line_flags], clfWriteSectorToFile 816 @@: 817 00000452 AC lodsb 818 00000453 3C20 cmp al, 32 819 00000455 74FB je @B 820 00000457 3C09 cmp al, 9 821 00000459 74F7 je @B 822 823 0000045B 4E dec si 824 0000045C 8936[3008] mov word [cmd_line_sector_file.name], si 825 00000460 E8AE03 call process_switch_filename 826 00000463 E9CDFB jmp .loop_got_byte 827 828 829 .switch_c: 830 00000466 AC lodsb 831 00000467 E86E21 call uppercase 832 0000046A 3C42 cmp al, 'B' 833 0000046C 750D jne @F 834 0000046E 8026[2108]DF clropt [cmd_line_flags], clfWriteCopySectorIfSector 835 00000473 800E[2108]10 setopt [cmd_line_flags], clfWriteCopySector 836 00000478 E937FF jmp .loop_2 837 838 @@: 839 0000047B 3C49 cmp al, 'I' 840 0000047D 750D jne @F 841 0000047F 8026[2108]7F clropt [cmd_line_flags], clfWriteCopyInfoIfSector 842 00000484 800E[2108]40 setopt [cmd_line_flags], clfWriteCopyInfo 843 00000489 E926FF jmp .loop_2 844 845 @@: 846 0000048C 3C4E cmp al, 'N' 847 0000048E 751D jne @F 848 00000490 AC lodsb 849 00000491 E84421 call uppercase 850 00000494 3C49 cmp al, 'I' 851 00000496 740D je .switch_cni 852 00000498 8026[2108]CF clropt [cmd_line_flags], clfWriteCopySectorIfSector | clfWriteCopySector 854 0000049D 3C42 cmp al, 'B' 855 0000049F 7503E90EFF je .loop_2 856 000004A4 4E dec si 857 .switch_cn: 858 .switch_cni: 859 000004A5 8026[2108]3F clropt [cmd_line_flags], clfWriteCopyInfoIfSector | clfWriteCopyInfo 861 000004AA E905FF jmp .loop_2 862 863 @@: 864 000004AD 3C53 cmp al, 'S' 865 000004AF 7527 jne @F 866 000004B1 AC lodsb 867 000004B2 E82321 call uppercase 868 000004B5 3C49 cmp al, 'I' 869 000004B7 7412 je .switch_csi 870 000004B9 8026[2108]EF clropt [cmd_line_flags], clfWriteCopySector 871 000004BE 800E[2108]20 setopt [cmd_line_flags], clfWriteCopySectorIfSector 872 000004C3 3C42 cmp al, 'B' 873 000004C5 7503E9E8FE je .loop_2 874 000004CA 4E dec si 875 .switch_cs: 876 .switch_csi: 877 000004CB 8026[2108]BF clropt [cmd_line_flags], clfWriteCopyInfo 878 000004D0 800E[2108]80 setopt [cmd_line_flags], clfWriteCopyInfoIfSector 879 000004D5 E9DAFE jmp .loop_2 880 881 @@: 882 000004D8 8026[2108]5F clropt [cmd_line_flags], clfWriteCopySectorIfSector | clfWriteCopyInfoIfSector 883 000004DD 800E[2108]50 setopt [cmd_line_flags], clfWriteCopySector | clfWriteCopyInfo 884 000004E2 E9CDFE jmp .loop_2 885 886 887 .switch_s: 888 000004E5 AC lodsb 889 000004E6 E8EF20 call uppercase 890 891 000004E9 3C47 cmp al, 'G' 892 000004EB 7403E98200 jne @FF 893 894 000004F0 800E[2308]08 setopt [cmd_line_flags], clfCheckFSI 895 896 000004F5 B82020 mov ax, 2020h 897 000004F8 BF[5008] mov di, fsi_check 898 000004FB B90400 mov cx, 4 899 000004FE 57 push di 900 000004FF F3AB rep stosw 901 00000501 5F pop di 902 00000502 B400 mov ah, 0 903 @@: 904 00000504 AC lodsb 905 00000505 3C20 cmp al, 32 906 00000507 74FB je @B 907 00000509 3C09 cmp al, 9 908 0000050B 74F7 je @B 909 0000050D 3C3D cmp al, '=' 910 0000050F 74F3 je @B 911 00000511 3C3A cmp al, ':' 912 00000513 74EF je @B 913 00000515 3C22 cmp al, '"' 914 00000517 7503 jne .sg_no_quote 915 00000519 88C4 mov ah, al 916 0000051B AC lodsb 917 .sg_no_quote: 918 919 0000051C 31DB xor bx, bx 920 .sg_loop: 921 0000051E 3C20 cmp al, 32 922 00000520 7307 jae .sg_not_eol 923 00000522 84E4 test ah, ah 924 00000524 7449 jz .sg_done_dec 925 .switch_not_supported_j1: 926 00000526 E9A0FB jmp .switch_not_supported 927 928 .sg_not_eol: 929 00000529 7504 jne .sg_not_quoted_blank 930 0000052B 84E4 test ah, ah 931 0000052D 7440 jz .sg_done_dec 932 .sg_not_quoted_blank: 933 0000052F 38E0 cmp al, ah 934 00000531 7439 je .sg_done 935 00000533 80FB08 cmp bl, 8 936 00000536 73EE jae .switch_not_supported_j1 937 00000538 3C5C cmp al, '\' 938 0000053A 752B jne .sg_next 939 0000053C AC lodsb 940 0000053D 3C0D cmp al, 13 941 0000053F 74E5 je .switch_not_supported_j1 942 00000541 3C78 cmp al, 'x' 943 00000543 7404 je .sg_escape_x 944 00000545 3C58 cmp al, 'X' 945 00000547 751E jne .sg_next 946 .sg_escape_x: 947 00000549 AC lodsb 948 0000054A 31C9 xor cx, cx 949 0000054C E89420 call get_hexit 950 0000054F 72D5 jc .switch_not_supported_j1 951 00000551 88C1 mov cl, al 952 00000553 AC lodsb 953 00000554 E88C20 call get_hexit 954 00000557 720B jc .sg_store_cl 955 00000559 01C9 add cx, cx 956 0000055B 01C9 add cx, cx 957 0000055D 01C9 add cx, cx 958 0000055F 01C9 add cx, cx 959 00000561 00C1 add cl, al 960 00000563 A8 db __TEST_IMM8 ; skip dec si 961 .sg_store_cl: 962 00000564 4E dec si 963 00000565 88C8 mov al, cl 964 .sg_next: 965 00000567 AA stosb 966 00000568 43 inc bx 967 00000569 AC lodsb 968 0000056A EBB2 jmp .sg_loop 969 970 .sg_done: 971 0000056C E9C3FA jmp .loop 972 973 .sg_done_dec: 974 0000056F E9C1FA jmp .loop_got_byte 975 976 @@: 977 00000572 3C49 cmp al, 'I' 978 00000574 7508 jne @F 979 00000576 8026[2308]FB clropt [cmd_line_flags], clfAllowInvalidFSI 980 0000057B E934FE jmp .loop_2 981 982 @@: 983 0000057E 3C4A cmp al, 'J' 984 00000580 7508 jne @F 985 00000582 800E[2308]04 setopt [cmd_line_flags], clfAllowInvalidFSI 986 00000587 E928FE jmp .loop_2 987 988 @@: 989 0000058A 3C56 cmp al, 'V' 990 0000058C 7508 jne @F 991 0000058E 8026[2108]FB clropt [cmd_line_flags], clfAllowInvalidSector 992 00000593 E91CFE jmp .loop_2 993 994 @@: 995 00000596 3C4E cmp al, 'N' 996 00000598 7508 jne @F 997 0000059A 800E[2108]04 setopt [cmd_line_flags], clfAllowInvalidSector 998 0000059F E910FE jmp .loop_2 999 1000 @@: 1001 000005A2 3C52 cmp al, 'R' 1002 000005A4 7509 jne @F 1003 000005A6 8126[2008]7FFC clropt [cmd_line_flags], clfReadSectorFile12 | clfReadSectorFile16 | clfReadSectorFile32, 1 1004 000005AC E903FE jmp .loop_2 1005 1006 @@: 1007 000005AF 31FF xor di, di 1008 000005B1 BA8003 mov dx, clfReadSectorFile12 | clfReadSectorFile16 | clfReadSectorFile32 1009 000005B4 3C3A cmp al, ':' 1010 000005B6 7449 je @F 1011 000005B8 3C3D cmp al, '=' 1012 000005BA 7445 je @F 1013 1014 000005BC 86E0 xchg al, ah 1015 000005BE AC lodsb 1016 000005BF 86E0 xchg al, ah 1017 000005C1 BF[2408] mov di, cmd_line_readsector12_file.name 1018 000005C4 BA8000 mov dx, clfReadSectorFile12 1019 000005C7 3D3132 cmp ax, "12" 1020 000005CA 7422 je .switch_s_check_equals 1021 000005CC BF[2808] mov di, cmd_line_readsector16_file.name 1022 000005CF BA0001 mov dx, clfReadSectorFile16 1023 000005D2 3D3136 cmp ax, "16" 1024 000005D5 7417 je .switch_s_check_equals 1025 000005D7 BF[2C08] mov di, cmd_line_readsector32_file.name 1026 000005DA BA0002 mov dx, clfReadSectorFile32 1027 000005DD 3D3332 cmp ax, "32" 1028 000005E0 740C je .switch_s_check_equals 1029 1030 000005E2 E9E4FA jmp .switch_not_supported 1031 1032 1033 .switch_s_r_type: 1034 000005E5 F7D2 not dx 1035 000005E7 2116[2008] and [cmd_line_flags], dx 1036 000005EB E9C4FD jmp .loop_2 1037 1038 1039 .switch_s_check_equals: 1040 000005EE AC lodsb 1041 000005EF E8E61F call uppercase 1042 000005F2 3C52 cmp al, 'R' 1043 000005F4 74EF je .switch_s_r_type 1044 000005F6 3C3A cmp al, ':' 1045 000005F8 7407 je @F 1046 000005FA 3C3D cmp al, '=' 1047 000005FC 7403 je @F 1048 1049 000005FE E9C8FA jmp .switch_not_supported 1050 1051 1052 @@: 1053 00000601 0916[2008] or word [cmd_line_flags], dx 1054 @@: 1055 00000605 AC lodsb 1056 00000606 3C20 cmp al, 32 1057 00000608 74FB je @B 1058 0000060A 3C09 cmp al, 9 1059 0000060C 74F7 je @B 1060 1061 0000060E 4E dec si 1062 0000060F 85FF test di, di 1063 00000611 7404 jz @F 1064 00000613 8935 mov word [di], si 1065 00000615 EB0C jmp @FF 1066 1067 @@: 1068 00000617 8936[2408] mov word [cmd_line_readsector12_file.name], si 1069 0000061B 8936[2808] mov word [cmd_line_readsector16_file.name], si 1070 0000061F 8936[2C08] mov word [cmd_line_readsector32_file.name], si 1071 @@: 1072 00000623 E8EB01 call process_switch_filename 1073 00000626 E90AFA jmp .loop_got_byte 1074 1075 1076 .switch_m: 1077 00000629 AC lodsb 1078 0000062A E8AB1F call uppercase 1079 0000062D 3C4E cmp al, 'N' 1080 0000062F 7427 je .switch_mn 1081 00000631 3C53 cmp al, 'S' 1082 00000633 742B je .switch_ms 1083 00000635 3C4F cmp al, 'O' 1084 00000637 747C je .switch_mo 1085 00000639 3C3A cmp al, ':' 1086 0000063B 7407 je @F 1087 0000063D 3C3D cmp al, '=' 1088 0000063F 7403 je @F 1089 00000641 E985FA jmp .switch_not_supported 1090 1091 @@: 1092 00000644 AC lodsb 1093 00000645 3C20 cmp al, 32 1094 00000647 74FB je @B 1095 00000649 3C09 cmp al, 9 1096 0000064B 74F7 je @B 1097 0000064D 4E dec si 1098 0000064E 8936[3808] mov word [cmd_line_image_file.name], si 1099 00000652 E8BC01 call process_switch_filename 1100 00000655 E9DBF9 jmp .loop_got_byte 1101 1102 .switch_mn: 1103 00000658 8326[3808]00 and word [cmd_line_image_file.name], 0 1104 0000065D E9D2F9 jmp .loop 1105 1106 .switch_ms: 1107 00000660 AC lodsb 1108 00000661 3C3A cmp al, ':' 1109 00000663 7407 je @F 1110 00000665 3C3D cmp al, '=' 1111 00000667 7403 je @F 1112 00000669 E99F01 jmp .error 1113 1114 @@: 1115 0000066C AC lodsb 1116 0000066D 3C30 cmp al, '0' 1117 0000066F 750B jne @F 1118 00000671 AC lodsb 1119 00000672 E8631F call uppercase 1120 00000675 3C58 cmp al, 'X' 1121 00000677 7408 je .switch_ms.hex 1122 00000679 4E dec si 1123 0000067A 4E dec si 1124 0000067B AC lodsb 1125 @@: 1126 0000067C E87B1F call get_decimal_literal 1127 0000067F EB04 jmp @F 1128 1129 .switch_ms.hex: 1130 00000681 AC lodsb 1131 00000682 E87D1F call get_hexadecimal_literal 1132 @@: 1133 00000685 85DB test bx, bx 1134 00000687 7403E97F01 jnz .error 1135 0000068C 81FA0020 cmp dx, 8192 1136 00000690 7603E97601 ja .error 1137 00000695 BB2000 mov bx, 32 1138 00000698 39DA cmp dx, bx 1139 0000069A 7303E96C01 jb .error 1140 @@: 1141 0000069F 39DA cmp dx, bx 1142 000006A1 740B je @F 1143 000006A3 01DB add bx, bx 1144 000006A5 81FB0020 cmp bx, 8192 1145 000006A9 76F4 jbe @B 1146 000006AB E95D01 jmp .error 1147 1148 @@: 1149 000006AE 8916[1008] mov word [m_sector_size], dx 1150 000006B2 E97DF9 jmp .loop 1151 1152 1153 .switch_mo: 1154 000006B5 AC lodsb 1155 000006B6 E81F1F call uppercase 1156 000006B9 3C53 cmp al, 'S' 1157 000006BB BF[1008] mov di, m_sector_size 1158 000006BE 7412 je @F 1159 000006C0 3C4B cmp al, 'K' 1160 000006C2 BF[1808] mov di, m_1024 1161 000006C5 740B je @F 1162 000006C7 3C4D cmp al, 'M' 1163 000006C9 BF[1C08] mov di, m_1024_times_1024 1164 000006CC 7404 je @F 1165 000006CE BF[1408] mov di, m_1 1166 000006D1 A8 db __TEST_IMM8 1167 @@: 1168 000006D2 AC lodsb 1169 000006D3 3C3A cmp al, ':' 1170 000006D5 7407 je @F 1171 000006D7 3C3D cmp al, '=' 1172 000006D9 7403 je @F 1173 000006DB E92D01 jmp .error 1174 1175 @@: 1176 000006DE 57 push di 1177 000006DF AC lodsb 1178 000006E0 3C30 cmp al, '0' 1179 000006E2 750B jne @F 1180 000006E4 AC lodsb 1181 000006E5 E8F01E call uppercase 1182 000006E8 3C58 cmp al, 'X' 1183 000006EA 7408 je .switch_mo.hex 1184 000006EC 4E dec si 1185 000006ED 4E dec si 1186 000006EE AC lodsb 1187 @@: 1188 000006EF E8081F call get_decimal_literal 1189 000006F2 EB04 jmp @F 1190 1191 .switch_mo.hex: 1192 000006F4 AC lodsb 1193 000006F5 E80A1F call get_hexadecimal_literal 1194 @@: 1195 000006F8 5F pop di 1196 000006F9 56 push si 1197 000006FA BE[0808] mov si, m_offset 1198 000006FD 87DA xchg dx, bx 1199 000006FF 93 xchg ax, bx 1200 00000700 E8C800 call multiply_dxax_dword_di_to_qword_si 1201 00000703 5E pop si 1202 00000704 E92BF9 jmp .loop 1203 1204 1205 .switch_g: 1206 @@: 1207 00000707 AC lodsb 1208 00000708 3C20 cmp al, 32 1209 0000070A 74FB je @B 1210 0000070C 3C09 cmp al, 9 1211 0000070E 74F7 je @B 1212 00000710 3C3D cmp al, '=' 1213 00000712 74F3 je @B 1214 00000714 3C3A cmp al, ':' 1215 00000716 74EF je @B 1216 1217 00000718 BA[383E] mov dx, msg.auto 1218 0000071B 4E dec si 1219 0000071C E8831E call isstring? 1220 0000071F 742C je .switch_g_all_auto 1221 00000721 BA[333E] mov dx, msg.keep 1222 00000724 E87B1E call isstring? 1223 00000727 7433 je .switch_g_all_keep 1224 00000729 BA[4A3E] mov dx, msg.heads 1225 0000072C BB[0E2A] mov bx, g_heads 1226 0000072F E8701E call isstring? 1227 00000732 7436 je .switch_g_single 1228 00000734 BA[503E] mov dx, msg.sectors 1229 00000737 BB[182A] mov bx, g_sectors 1230 0000073A E8651E call isstring? 1231 0000073D 742B je .switch_g_single 1232 0000073F BA[583E] mov dx, msg.hidden 1233 00000742 BB[222A] mov bx, g_hidden 1234 00000745 E85A1E call isstring? 1235 00000748 7420 je .switch_g_single 1236 0000074A E9BE00 jmp .error 1237 1238 .switch_g_all_auto: 1239 0000074D B8FF00 mov ax, 00FFh 1240 00000750 A3[0E2A] mov word [g_heads.auto_low_single_high], ax 1241 00000753 A3[182A] mov word [g_sectors.auto_low_single_high], ax 1242 00000756 A3[222A] mov word [g_hidden.auto_low_single_high], ax 1243 00000759 E9D6F8 jmp .loop 1244 1245 .switch_g_all_keep: 1246 0000075C 31C0 xor ax, ax 1247 0000075E A3[0E2A] mov word [g_heads.auto_low_single_high], ax 1248 00000761 A3[182A] mov word [g_sectors.auto_low_single_high], ax 1249 00000764 A3[222A] mov word [g_hidden.auto_low_single_high], ax 1250 00000767 E9C8F8 jmp .loop 1251 1252 .switch_g_single: 1253 @@: 1254 0000076A AC lodsb 1255 0000076B 3C20 cmp al, 32 1256 0000076D 74FB je @B 1257 0000076F 3C09 cmp al, 9 1258 00000771 74F7 je @B 1259 00000773 3C3D cmp al, '=' 1260 00000775 74F3 je @B 1261 00000777 3C3A cmp al, ':' 1262 00000779 74EF je @B 1263 0000077B 4E dec si 1264 0000077C BA[383E] mov dx, msg.auto 1265 0000077F E8201E call isstring? 1266 00000782 7507 jne @F 1267 00000784 C707FF00 mov word [bx + giAutoLowSingleHigh], 00FFh 1268 00000788 E9A7F8 jmp .loop 1269 1270 @@: 1271 0000078B BA[333E] mov dx, msg.keep 1272 0000078E E8111E call isstring? 1273 00000791 7506 jne @F 1274 00000793 832700 and word [bx + giAutoLowSingleHigh], 0 1275 00000796 E999F8 jmp .loop 1276 1277 @@: 1278 00000799 AC lodsb 1279 0000079A 53 push bx 1280 0000079B 3C30 cmp al, '0' 1281 0000079D 750B jne @F 1282 0000079F AC lodsb 1283 000007A0 E8351E call uppercase 1284 000007A3 3C58 cmp al, 'X' 1285 000007A5 7408 je .switch_g_single.hex 1286 000007A7 4E dec si 1287 000007A8 4E dec si 1288 000007A9 AC lodsb 1289 @@: 1290 000007AA E84D1E call get_decimal_literal 1291 000007AD EB04 jmp @F 1292 1293 .switch_g_single.hex: 1294 000007AF AC lodsb 1295 000007B0 E84F1E call get_hexadecimal_literal 1296 @@: 1297 000007B3 5F pop di 1298 000007B4 807D0602 cmp byte [di + giLength], 2 1299 000007B8 7704 ja @F 1300 000007BA 85DB test bx, bx 1301 000007BC 754D jnz .error 1302 @@: 1303 000007BE C70500FF mov word [di + giAutoLowSingleHigh], 0FF00h 1304 000007C2 895502 mov word [di + giValue], dx 1305 000007C5 895D04 mov word [di + giValue + 2], bx 1306 000007C8 E967F8 jmp .loop 1307 1308 1309 multiply_dxax_dword_di_to_qword_si: equ $ 1310 000007CB 50 push ax 1311 000007CC 89D0 mov ax, dx 1312 000007CE 52 push dx 1313 000007CF F76502 mul word [di + 2] ; high times high 1314 000007D2 894404 mov word [si + 4], ax 1315 000007D5 895406 mov word [si + 6], dx 1316 000007D8 58 pop ax 1317 000007D9 F725 mul word [di] ; high times low 1318 000007DB 894402 mov word [si + 2], ax 1319 000007DE 015404 add word [si + 4], dx 1320 000007E1 83540600 adc word [si + 6], 0 ; (NC) 1321 000007E5 58 pop ax 1322 000007E6 50 push ax 1323 000007E7 F76502 mul word [di + 2] ; low times high 1324 000007EA 014402 add word [si + 2], ax 1325 000007ED 115404 adc word [si + 4], dx 1326 000007F0 83540600 adc word [si + 6], 0 ; (NC) 1327 000007F4 58 pop ax 1328 000007F5 F725 mul word [di] ; low times low 1329 000007F7 8904 mov word [si], ax 1330 000007F9 015402 add word [si + 2], dx 1331 000007FC 83540400 adc word [si + 4], 0 1332 00000800 83540600 adc word [si + 6], 0 ; (NC) 1333 00000804 C3 retn 1334 1335 1336 .error_multiple_drives: 1337 00000805 BA[F338] mov dx, msg.error_multiple_drives 1338 00000808 E9C1F8 jmp disp_error 1339 1340 .error: 1341 0000080B BA[C938] mov dx, msg.invalid_argument 1342 0000080E E9BBF8 jmp disp_error 1343 1344 1345 process_switch_filename: 1346 00000811 89F3 mov bx, si ; -> start of name 1347 00000813 89F7 mov di, si ; -> start of name 1348 00000815 AC lodsb ; load character 1349 00000816 E8821D call iseol? 1350 00000819 7506 jne @F 1351 0000081B BA[4D44] mov dx, msg.switch_requires_filename 1352 .disp_error_1: 1353 0000081E E9ABF8 jmp disp_error 1354 1355 @@: 1356 .unquoted_loop: 1357 00000821 3C20 cmp al, 32 ; blank or EOL outside quoted part ? 1358 00000823 7411 je .blank 1359 00000825 3C09 cmp al, 9 1360 00000827 740D je .blank 1361 00000829 E86F1D call iseol? 1362 0000082C 7408 je .blank ; yes --> 1363 0000082E 3C22 cmp al, '"' ; starting quote mark ? 1364 00000830 7416 je .quoted ; yes --> 1365 00000832 AA stosb ; store character 1366 .unquote: 1367 00000833 AC lodsb ; load character 1368 00000834 EBEB jmp .unquoted_loop ; continue in not-quoted loop --> 1369 1370 .blank: 1371 ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 1372 00000836 C60500 mov byte [di], 0 ; terminate 1373 00000839 39FB cmp bx, di ; empty ? 1374 0000083B 740E je .empty ; yes --> 1375 0000083D C3 retn ; done 1376 1377 .quoted_loop: 1378 0000083E E85A1D call iseol? ; EOL inside quoted part ? 1379 00000841 740D je .quoted_eol ; if yes, error --> 1380 00000843 3C22 cmp al, '"' ; ending quote mark ? 1381 00000845 74EC je .unquote ; yes --> 1382 00000847 AA stosb ; store character 1383 .quoted: 1384 00000848 AC lodsb ; load character 1385 00000849 EBF3 jmp .quoted_loop ; continue in quoted loop --> 1386 1387 .empty: 1388 0000084B BA[9344] mov dx, msg.switch_filename_empty 1389 0000084E EBCE jmp .disp_error_1 1390 1391 .quoted_eol: 1392 00000850 BA[6B44] mov dx, msg.switch_filename_missing_unquote 1393 00000853 EBC9 jmp .disp_error_1 1394 1395 1396 cmd_line_end: 1397 00000855 803E[EE29]FF cmp byte [drivenumber], -1 1398 0000085A 750D jne @F 1399 0000085C 833E[3808]00 cmp word [cmd_line_image_file.name], 0 1400 00000861 7513 jne @FF 1401 00000863 BA[DD38] mov dx, msg.no_drive_specified 1402 00000866 E963F8 jmp disp_error 1403 1404 @@: 1405 00000869 833E[3808]00 cmp word [cmd_line_image_file.name], 0 1406 0000086E 7406 je @F 1407 00000870 BA[1039] mov dx, msg.drive_and_image_specified 1408 00000873 E956F8 jmp disp_error 1409 1410 @@: 1411 00000876 F606[2008]40 testopt [cmd_line_flags], clfWriteInfoToSectorFile 1412 0000087B 740D jz @F 1413 0000087D F606[2008]01 testopt [cmd_line_flags], clfWriteSectorToFile 1414 00000882 7506 jnz @F 1415 1416 00000884 BA[3039] mov dx, msg.no_sector_file_specified 1417 00000887 E942F8 jmp disp_error 1418 1419 @@: 1420 1421 detect_fat_type: 1422 0000088A BB[A028] mov bx, second_sector_buffer ; will be used for ld/lsv/bpb 1423 0000088D 89DD mov bp, bx 1424 0000088F 53 push bx 1425 1426 00000890 E83046 call initialise ; uses first_sector_buffer 1427 ; for size detection 1428 00000893 7303E9140E jc exit_error 1429 1430 00000898 5B pop bx 1431 00000899 31C0 xor ax, ax 1432 0000089B 31D2 xor dx, dx 1433 0000089D 8A0E[EE29] mov cl, [drivenumber] 1434 000008A1 E8CE20 call read_ae_512_bytes ; load partition boot sector 1435 000008A4 7303E9030E jc exit_error 1436 ; 2nd buffer = boot sector original 1437 1438 000008A9 BA[6039] mov dx, msg.bootfail_sig 1439 000008AC 81BEFE0155AA cmp word [bp + 510], 0AA55h 1440 000008B2 751A jne .disp_error_1 1441 1442 000008B4 8B5EDC mov bx, [bp + ldBytesPerSector] 1443 000008B7 3B5E0B cmp bx, [bp + bsBPB + bpbBytesPerSector] 1444 000008BA BA[F339] mov dx, msg.bootfail_secsizediffer 1445 000008BD 750F jne .disp_error_1 1446 1447 000008BF 81FB0002 cmp bx, 512 1448 000008C3 7618 jbe @FF 1449 000008C5 81FB0004 cmp bx, 1024 1450 000008C9 7306 jae @F 1451 000008CB BA[C439] mov dx, msg.bootfail_secsizeinvalid 1452 .disp_error_1: 1453 000008CE E9FBF7 jmp disp_error 1454 @@: 1455 000008D1 89DF mov di, bx 1456 000008D3 817BFE55AA cmp word [bp + di - 2], 0AA55h 1457 000008D8 BA[9039] mov dx, msg.bootfail_sig2 1458 000008DB 75F1 jne .disp_error_1 1459 @@: 1460 1461 000008DD BE[A028] mov si, second_sector_buffer 1462 000008E0 BF[A048] mov di, third_sector_buffer_512_bytes 1463 000008E3 B90001 mov cx, 512 >> 1 1464 000008E6 F3A5 rep movsw 1465 ; 3rd buffer = copy of first 512 B of 2nd buffer 1466 ; (boot sector original) prior to BPBN move 1467 1468 000008E8 31C0 xor ax, ax 1469 000008EA 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 1470 000008ED 740B je @F ; is FAT32 --> 1471 000008EF BE[C428] mov si, second_sector_buffer + bsBPB + bpbNew 1472 000008F2 BF[E028] mov di, second_sector_buffer + bsBPB + ebpbNew 1473 000008F5 B91A00 mov cx, BPBN_size 1474 000008F8 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 1482 000008FA 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) 1486 000008FC 8A460D mov al, [bp + bsBPB + bpbSectorsPerCluster] 1487 000008FF FEC8 dec al 1488 00000901 40 inc ax 1489 00000902 8946E8 mov [bp + ldClusterSize], ax 1490 1491 00000905 8B46D4 mov ax, [bp + ldEntriesPerSector] 1492 1493 ; number of sectors used for root directory (store in CX) 1494 00000908 31D2 xor dx, dx 1495 0000090A 89C3 mov bx, ax 1496 0000090C 48 dec ax ; rounding up 1497 0000090D 034611 add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 1498 00000910 11D2 adc dx, dx ; account for overflow (dx was zero) 1499 00000912 F7F3 div bx ; get number of root sectors 1500 00000914 91 xchg ax, cx ; cx = number of root secs 1501 1502 1503 ; (iniload.asm code starts here) 1504 1505 00000915 51 push cx ; number of root secs 1506 00000916 31C0 xor ax, ax 1507 ; first sector of root directory 1508 00000918 8A4610 mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 1509 0000091B 8B4E16 mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 1510 0000091E 31FF xor di, di ; di:cx = sectors per FAT 1511 ; iff FAT12, FAT16 1512 00000920 85C9 test cx, cx ; is FAT32 ? 1513 00000922 7506 jnz @F ; no --> 1514 00000924 8B4E24 mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 1515 00000927 8B7E26 mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 1516 @@: 1517 0000092A 50 push ax 1518 0000092B F7E1 mul cx 1519 ; ax = low word SpF*nF 1520 ; dx = high word 1521 0000092D 93 xchg bx, ax 1522 0000092E 87D1 xchg cx, dx 1523 ; cx:bx = first mul 1524 00000930 58 pop ax 1525 00000931 F7E7 mul di 1526 ; ax = high word adjust 1527 ; dx = third word 1528 00000933 85D2 test dx, dx 1529 00000935 7406 jz @F 1530 error_badchain: equ $ 1531 00000937 BA[383A] mov dx, msg.boot_badchain 1532 0000093A E98FF7 jmp disp_error 1533 1534 @@: 1535 0000093D 92 xchg dx, ax 1536 ; dx = high word adjust 1537 0000093E 01CA add dx, cx 1538 ; dx:bx = result 1539 00000940 72F5 jc error_badchain 1540 00000942 93 xchg ax, bx 1541 ; dx:ax = result 1542 00000943 72F2 jc error_badchain 1543 1544 00000945 03460E add ax, [bp + bsBPB + bpbReservedSectors] 1545 00000948 83D200 adc dx, byte 0 1546 0000094B 72EA jc error_badchain 1547 1548 0000094D 59 pop cx ; number of root sectors 1549 0000094E 31FF xor di, di 1550 1551 ; first sector of disk data area: 1552 00000950 01C1 add cx, ax 1553 00000952 11D7 adc di, dx 1554 00000954 72E1 jc error_badchain 1555 00000956 894EFC mov [bp + lsvDataStart], cx 1556 00000959 897EFE mov [bp + lsvDataStart + 2], di 1557 1558 0000095C 8946D0 mov [bp + ldRootSector], ax 1559 0000095F 8956D2 mov [bp + ldRootSector + 2], dx 1560 1561 ; total sectors 1562 00000962 31D2 xor dx, dx 1563 00000964 8B4613 mov ax, [bp + bsBPB + bpbTotalSectors] 1564 00000967 85C0 test ax, ax 1565 00000969 7506 jnz @F 1566 0000096B 8B5622 mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 1567 0000096E 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 1582 00000971 8B5E16 mov bx, [bp + bsBPB + bpbSectorsPerFAT] 1583 00000974 C646E620 mov byte [bp + ldFATType], 32 1584 00000978 85DB test bx, bx 1585 0000097A 7439 jz .gotfattype 1586 1587 0000097C 31C9 xor cx, cx 1588 1589 0000097E 895E24 mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 1590 00000981 894E26 mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 1591 00000984 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 1596 00000987 2B46FC sub ax, word [bp + lsvDataStart] 1597 0000098A 1B56FE sbb dx, word [bp + lsvDataStart + 2] 1598 1599 ; dx:ax = total amount of data sectors 1600 0000098D 89C3 mov bx, ax 1601 0000098F 92 xchg ax, dx 1602 00000990 31D2 xor dx, dx 1603 00000992 F776E8 div word [bp + ldClusterSize] 1604 00000995 93 xchg bx, ax 1605 00000996 F776E8 div word [bp + ldClusterSize] 1606 ; bx:ax = quotient, dx = remainder 1607 ; bx:ax = number of clusters 1608 00000999 85DB test bx, bx 1609 0000099B 7406 jz @F 1610 .badclusters: 1611 0000099D BA[1E3A] mov dx, msg.boot_badclusters 1612 000009A0 E929F7 jmp disp_error 1613 1614 @@: 1615 000009A3 83F8F5 cmp ax, 0FFF7h - 2 1616 000009A6 77F5 ja .badclusters 1617 000009A8 C646E610 mov byte [bp + ldFATType], 16 1618 000009AC 3DF50F cmp ax, 0FF7h - 2 1619 000009AF 7704 ja .gotfattype 1620 1621 000009B1 C646E60C mov byte [bp + ldFATType], 12 1622 .gotfattype: 1623 1624 000009B5 BA[3F3C] mov dx, msg.is_fat16 1625 %if _FAT16 1626 000009B8 BE[0002] mov si, fat16_payload 1627 %else 1628 mov si, 0 ; (preserve flags) 1629 %endif 1630 000009BB 807EE610 cmp byte [bp + ldFATType], 16 1631 000009BF 740E je @F 1632 000009C1 BA[2A3C] mov dx, msg.is_fat12 1633 %if _FAT12 1634 000009C4 BE[0000] mov si, fat12_payload 1635 %else 1636 mov si, 0 ; (preserve flags) 1637 %endif 1638 000009C7 7206 jb @F 1639 000009C9 BA[543C] mov dx, msg.is_fat32 1640 %if _FAT32 1641 000009CC BE[0004] mov si, fat32_payload 1642 %else 1643 mov si, 0 ; (preserve flags) 1644 %endif 1645 @@: 1646 000009CF 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: 1673 000009D2 C646E700 mov byte [bp + ldHasLBA], 0 ; 2 clear: not FSINFO 1674 %if _FAT32_TWO_SECTORS 1675 000009D6 81FE[0004] cmp si, fat32_payload 1676 000009DA 7528 jne .not_fat32 1677 1678 000009DC 804EE704 or byte [bp + ldHasLBA], 4 ; 4 set: large sector 1679 1680 000009E0 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 1681 000009E5 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 1685 000009E7 BA[783B] mov dx, msg.not_yet_non_fsinfo 1686 1687 000009EA 81BC00025252 cmp word [si + 512 + FSINFO.signature1], "RR" 1688 000009F0 7403E9D7F6 jne disp_error 1689 000009F5 81BC02026141 cmp word [si + 512 + FSINFO.signature1 + 2], "aA" 1690 000009FB 7403E9CCF6 jne disp_error 1691 1692 00000A00 804EE702 or byte [bp + ldHasLBA], 2 ; 2 set: FSINFO 1693 %endif 1694 .not_fat32: 1695 .fat32_larger_sector: 1696 1697 1698 detect_backup: 1699 00000A04 807EE620 cmp byte [bp + ldFATType], 32 1700 00000A08 722E jb .none 1701 00000A0A BA[4246] mov dx, msg.no_backup 1702 00000A0D 31DB xor bx, bx 1703 00000A0F 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 1704 00000A12 85C0 test ax, ax 1705 00000A14 741B jz .done 1706 00000A16 3B460E cmp ax, word [bp + bsBPB + bpbReservedSectors] 1707 00000A19 7316 jae .done 1708 1709 00000A1B BA[5D46] mov dx, msg.backup_no_info 1710 00000A1E BB1000 mov bx, detectedcopysector 1711 00000A21 034630 add ax, word [bp + bsBPB + ebpbFSINFOSector] 1712 00000A24 720B jc .done 1713 00000A26 3B460E cmp ax, word [bp + bsBPB + bpbReservedSectors] 1714 00000A29 7306 jae .done 1715 1716 00000A2B BA[2A46] mov dx, msg.backup 1717 00000A2E BB3000 mov bx, detectedcopysector | detectedcopyinfo 1718 .done: 1719 00000A31 E87F1C call disp_msg_asciz 1720 00000A34 091E[D829] or word [internalflags], bx 1721 1722 .none: 1723 1724 1725 prepare_sector: 1726 00000A38 F606[2208]02 testopt [cmd_line_flags], clfSectorFromCopy 1727 00000A3D 742A jz @F 1728 1729 00000A3F F606[D829]10 testopt [internalflags], detectedcopysector 1730 00000A44 7506 jnz .sector_from_copy 1731 00000A46 BA[7947] mov dx, msg.missing_backup_sector 1732 00000A49 E980F6 jmp disp_error 1733 1734 .sector_from_copy: 1735 00000A4C BA[DD47] mov dx, msg.copy_sector 1736 00000A4F E8611C call disp_msg_asciz 1737 00000A52 31D2 xor dx, dx 1738 00000A54 BB[6008] mov bx, first_sector_buffer 1739 00000A57 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 1740 00000A5A 8A0E[EE29] mov cl, [drivenumber] 1741 00000A5E E8111F call read_ae_512_bytes ; load boot sector from backup copy 1742 00000A61 7303E9460C jc exit_error 1743 00000A66 E91501 jmp .got_sector_buffer 1744 1745 @@: 1746 00000A69 F606[2208]01 testopt [cmd_line_flags], clfLeaveSector 1747 00000A6E 743C jz @F 1748 1749 00000A70 F646E702 test byte [bp + ldHasLBA], 2 1750 00000A74 740C jz .no_leave_fsinfo 1751 00000A76 81C60002 add si, 512 1752 00000A7A B90001 mov cx, 512 >> 1 1753 00000A7D BF[600A] mov di, first_sector_buffer + 512 1754 00000A80 F3A5 rep movsw 1755 .no_leave_fsinfo: 1756 1757 00000A82 BA[0748] mov dx, msg.leave_sector 1758 00000A85 E82B1C call disp_msg_asciz 1759 ; Copy over original 512-byte sector buffer content. 1760 00000A88 B90002 mov cx, 512 1761 00000A8B BF[6008] mov di, first_sector_buffer 1762 00000A8E BE[A048] mov si, third_sector_buffer_512_bytes 1763 00000A91 B90001 mov cx, 512 >> 1 1764 00000A94 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. 1769 00000A96 BE[A02A] mov si, second_sector_buffer + 512 1770 00000A99 8B4EDC mov cx, [bp + ldBytesPerSector] 1771 00000A9C 81E90002 sub cx, 512 1772 00000AA0 7703E9D900 jbe .got_sector_buffer 1773 00000AA5 D1E9 shr cx, 1 1774 00000AA7 F3A5 rep movsw 1775 ; 1st buffer = boot sector original 1776 00000AA9 E9D200 jmp .got_sector_buffer 1777 1778 @@: 1779 00000AAC BF[2408] mov di, cmd_line_readsector12_file 1780 00000AAF BA8000 mov dx, clfReadSectorFile12 1781 00000AB2 807EE610 cmp byte [bp + ldFATType], 16 1782 00000AB6 720E jb @F 1783 00000AB8 BF[2808] mov di, cmd_line_readsector16_file 1784 00000ABB BA0001 mov dx, clfReadSectorFile16 1785 00000ABE 7406 je @F 1786 00000AC0 BF[2C08] mov di, cmd_line_readsector32_file 1787 00000AC3 BA0002 mov dx, clfReadSectorFile32 1788 @@: 1789 00000AC6 8516[2008] test word [cmd_line_flags], dx 1790 00000ACA 7503E9A100 jz .replace_internal 1791 00000ACF BA[4448] mov dx, msg.replace_sector_file 1792 00000AD2 E8DE1B call disp_msg_asciz 1793 1794 ; di -> file structure 1795 00000AD5 E8EA0B call open_file_read 1796 00000AD8 7303E9CF0B jc exit_error 1797 1798 00000ADD B80242 mov ax, 4202h 1799 00000AE0 31C9 xor cx, cx 1800 00000AE2 31D2 xor dx, dx 1801 00000AE4 CD21 int 21h 1802 00000AE6 7309 jnc @F 1803 00000AE8 BA[8649] mov dx, msg.error_file_seek 1804 00000AEB E8B70C call disp_dos_error 1805 00000AEE E9BB0B jmp exit_error 1806 1807 @@: 1808 00000AF1 85D2 test dx, dx 1809 00000AF3 7510 jnz .wrong_size 1810 00000AF5 3D0002 cmp ax, 512 1811 00000AF8 7411 je .ok_size 1812 00000AFA 3D0004 cmp ax, 1024 1813 00000AFD 7506 jne .wrong_size 1814 00000AFF 807EE620 cmp byte [bp + ldFATType], 32 1815 00000B03 7406 je .ok_size 1816 1817 .wrong_size: 1818 00000B05 BA[B33B] mov dx, msg.wrong_size 1819 00000B08 E9C1F5 jmp disp_error 1820 1821 1822 .ok_size: 1823 00000B0B 50 push ax 1824 1825 00000B0C B80042 mov ax, 4200h 1826 00000B0F 31C9 xor cx, cx 1827 00000B11 31D2 xor dx, dx 1828 00000B13 CD21 int 21h 1829 00000B15 7309 jnc @F 1830 00000B17 BA[8649] mov dx, msg.error_file_seek 1831 00000B1A E8880C call disp_dos_error 1832 00000B1D E98C0B jmp exit_error 1833 1834 @@: 1835 00000B20 59 pop cx 1836 00000B21 BA[6008] mov dx, first_sector_buffer 1837 00000B24 89D6 mov si, dx 1838 00000B26 B43F mov ah, 3Fh 1839 00000B28 CD21 int 21h ; read file 1840 00000B2A 7207 jc @F 1841 00000B2C 39C8 cmp ax, cx 1842 00000B2E B8FFFF mov ax, -1 1843 00000B31 7409 je @FF ; (NC) --> 1844 @@: 1845 00000B33 BA[7149] mov dx, msg.error_file_read 1846 00000B36 E86C0C call disp_dos_error 1847 00000B39 E9700B jmp exit_error 1848 1849 @@: 1850 00000B3C C646E700 mov byte [bp + ldHasLBA], 0 ; 2 and 4 clear: not FSINFO, no large 1851 1852 00000B40 81F90004 cmp cx, 1024 1853 00000B44 7228 jb .not_fat32_two_sectors 1854 1855 00000B46 804EE704 or byte [bp + ldHasLBA], 4 ; 4 set: large sector 1856 1857 00000B4A 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 1858 00000B4F 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 1862 00000B51 BA[783B] mov dx, msg.not_yet_non_fsinfo 1863 1864 00000B54 81BC00025252 cmp word [si + 512 + FSINFO.signature1], "RR" 1865 00000B5A 7403E96DF5 jne disp_error 1866 00000B5F 81BC02026141 cmp word [si + 512 + FSINFO.signature1 + 2], "aA" 1867 00000B65 7403E962F5 jne disp_error 1868 1869 00000B6A 804EE702 or byte [bp + ldHasLBA], 2 ; 2 set: FSINFO 1870 1871 .fat32_larger_sector: 1872 .not_fat32_two_sectors: 1873 00000B6E 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: 1880 00000B70 BA[2948] mov dx, msg.replace_sector 1881 00000B73 E83D1B call disp_msg_asciz 1882 1883 00000B76 B90002 mov cx, 1024 >> 1 1884 00000B79 BF[6008] mov di, first_sector_buffer 1885 00000B7C 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: 1893 00000B7E BA[F73D] mov dx, msg.sector_invalid_no_id 1894 00000B81 BE[483D] mov si, msg.fat12sig 1895 00000B84 BF[9608] mov di, first_sector_buffer + bsBPB + bpbNew + bpbnFilesystemID 1896 00000B87 807EE610 cmp byte [bp + ldFATType], 16 1897 00000B8B 720B jb @F 1898 00000B8D BE[503D] mov si, msg.fat16sig 1899 00000B90 7406 je @F 1900 00000B92 BE[583D] mov si, msg.fat32sig 1901 00000B95 BF[B208] mov di, first_sector_buffer + bsBPB + ebpbNew + bpbnFilesystemID 1902 @@: 1903 00000B98 B90400 mov cx, 4 1904 00000B9B F3A7 repe cmpsw 1905 00000B9D 7540 jne .invalid 1906 1907 00000B9F BA[603D] mov dx, msg.sector_invalid_no_jump 1908 00000BA2 BF[6008] mov di, first_sector_buffer 1909 00000BA5 8B4501 mov ax, word [di + 1] 1910 00000BA8 8D5D03 lea bx, [di + 3] 1911 00000BAB 803DE9 cmp byte [di], 0E9h 1912 00000BAE 740C je .rel16 1913 00000BB0 803DE8 cmp byte [di], 0E8h 1914 00000BB3 7407 je .rel16 1915 00000BB5 803DEB cmp byte [di], 0EBh 1916 00000BB8 7525 jne .invalid 1917 .rel8: 1918 00000BBA 4B dec bx 1919 00000BBB 98 cbw 1920 .rel16: 1921 00000BBC 01C3 add bx, ax 1922 00000BBE BF[9E08] mov di, first_sector_buffer + bsBPB + bpbNew + BPBN_size 1923 00000BC1 807EE610 cmp byte [bp + ldFATType], 16 1924 00000BC5 7603 jbe @F 1925 00000BC7 BF[BA08] mov di, first_sector_buffer + bsBPB + ebpbNew + BPBN_size 1926 @@: 1927 00000BCA BA[873D] mov dx, msg.sector_invalid_too_short_jump 1928 00000BCD 39FB cmp bx, di 1929 00000BCF 720E jb .invalid 1930 00000BD1 BA[A93D] mov dx, msg.sector_invalid_too_long_jump 1931 00000BD4 81FB[5E0A] cmp bx, first_sector_buffer + 510 1932 00000BD8 7305 jae .invalid 1933 1934 00000BDA BA[CA3D] mov dx, msg.sector_valid 1935 00000BDD EB12 jmp .valid 1936 1937 .invalid: 1938 00000BDF F606[2108]04 testopt [cmd_line_flags], clfAllowInvalidSector 1939 00000BE4 7503E9E3F4 jz disp_error 1940 1941 00000BE9 52 push dx 1942 00000BEA BA[193E] mov dx, msg.allowing_sector_invalid 1943 00000BED E8C31A call disp_msg_asciz 1944 00000BF0 5A pop dx 1945 1946 .valid: 1947 00000BF1 E8BF1A call disp_msg_asciz 1948 1949 1950 write_sector_oem: 1951 00000BF4 BE[DC29] mov si, oemname 1952 00000BF7 BF[6308] mov di, first_sector_buffer + bsOEM 1953 00000BFA B90400 mov cx, 4 1954 00000BFD F606[2308]01 testopt [cmd_line_flags], clfSetOEMName 1955 00000C02 750B jnz @F 1956 00000C04 BE[A328] mov si, second_sector_buffer + bsOEM 1957 00000C07 F606[2308]02 testopt [cmd_line_flags], clfPreserveOEMName 1958 00000C0C 7501 jnz @F 1959 00000C0E A9 db __TEST_IMM16 ; skip rep movsw 1960 @@: 1961 00000C0F F3A5 rep movsw 1962 1963 1964 write_sector_bpb: 1965 00000C11 BE[AB28] mov si, second_sector_buffer + bsBPB 1966 00000C14 BF[6B08] mov di, first_sector_buffer + bsBPB 1967 00000C17 807EE610 cmp byte [bp + ldFATType], 16 1968 00000C1B 7607 jbe @F ; if FAT12/FAT16 --> 1969 00000C1D B93500 mov cx, ebpbNew 1970 00000C20 F3A4 rep movsb ; move EBPB (minus BPBN) 1971 00000C22 EB08 jmp @FF ; si -> BPBN 1972 @@: 1973 00000C24 B91900 mov cx, bpbNew ; move BPB 1974 00000C27 F3A4 rep movsb 1975 00000C29 83C61C add si, ebpbNew - bpbNew ; si -> BPBN 1976 @@: 1977 00000C2C B91A00 mov cx, BPBN_size 1978 00000C2F F3A4 rep movsb 1979 ; 1st buffer = sector from whatever source plus 1980 ; the (E)BPB and BPBN from fs 1981 1982 1983 prepare_fsinfo: 1984 00000C31 807EE610 cmp byte [bp + ldFATType], 16 1985 00000C35 7703E90301 jbe .no_fsinfo 1986 1987 00000C3A 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 1988 00000C3F 7203E9F900 jae .no_fsinfo 1989 1990 00000C44 8B4630 mov ax, word [bp + bsBPB + ebpbFSINFOSector] 1991 1992 00000C47 BA[5E3B] mov dx, msg.no_fsinfo 1993 00000C4A 85C0 test ax, ax 1994 00000C4C 7405 jz .fsinfo_doesnt_exist 1995 00000C4E 3B460E cmp ax, word [bp + bsBPB + bpbReservedSectors] 1996 00000C51 7216 jb .fsinfo_exists 1997 .fsinfo_doesnt_exist: 1998 00000C53 F606[2008]58 testopt [cmd_line_flags], clfDontWriteInfo | clfWriteInfoToSectorFile | clfWriteInfoToFile 2000 00000C58 7509 jnz @F 2001 00000C5A F646E702 test byte [bp + ldHasLBA], 2 2002 00000C5E 7403E969F4 jnz disp_error 2003 @@: 2004 00000C63 E84D1A call disp_msg_asciz 2005 00000C66 E9D400 jmp .no_fsinfo 2006 2007 .fsinfo_exists: 2008 00000C69 31D2 xor dx, dx 2009 00000C6B BB[A02A] mov bx, second_sector_buffer + 512 2010 00000C6E 8A0E[EE29] mov cl, [drivenumber] 2011 00000C72 E8FD1C call read_ae_512_bytes ; load FSINFO sector 2012 00000C75 7303E9320A jc exit_error 2013 ; 2nd buffer 2nd 512 B has original FSINFO 2014 2015 00000C7A 800E[D829]40 setopt [internalflags], detectedinfo 2016 2017 00000C7F F606[2208]20 testopt [cmd_line_flags], clfInfoFromCopy 2018 00000C84 742D jz @F 2019 2020 00000C86 F606[D829]20 testopt [internalflags], detectedcopyinfo 2021 00000C8B 7506 jnz .info_from_copy 2022 00000C8D BA[AB47] mov dx, msg.missing_backup_info 2023 00000C90 E939F4 jmp disp_error 2024 2025 .info_from_copy: 2026 00000C93 BA[6948] mov dx, msg.copy_info 2027 00000C96 E81A1A call disp_msg_asciz 2028 00000C99 31D2 xor dx, dx 2029 00000C9B BB[600A] mov bx, first_sector_buffer + 512 2030 00000C9E 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 2031 00000CA1 034630 add ax, word [bp + bsBPB + ebpbFSINFOSector] 2032 00000CA4 8A0E[EE29] mov cl, [drivenumber] 2033 00000CA8 E8C71C call read_ae_512_bytes ; load FSINFO sector from backup copy 2034 00000CAB 7303E9FC09 jc exit_error 2035 00000CB0 E98A00 jmp .no_fsinfo 2036 2037 @@: 2038 2039 00000CB3 F606[2208]40 testopt [cmd_line_flags], clfZeroInfo 2040 00000CB8 7433 jz @F 2041 2042 00000CBA BA[8C48] mov dx, msg.zero_info 2043 00000CBD E8F319 call disp_msg_asciz 2044 2045 00000CC0 BF[600A] mov di, first_sector_buffer + 512 2046 00000CC3 B90001 mov cx, 512 >> 1 2047 00000CC6 31C0 xor ax, ax 2048 00000CC8 F3AB rep stosw ; zero entire sector 2049 2050 00000CCA BE[A02A] mov si, second_sector_buffer + 512 + FSINFO.signature1 2051 00000CCD B90200 mov cx, 4 >> 1 2052 00000CD0 BF[600A] mov di, first_sector_buffer + 512 2053 00000CD3 F3A5 rep movsw ; copy over first signature 2054 2055 00000CD5 BE[842C] mov si, second_sector_buffer + 512 + FSINFO.signature2 2056 00000CD8 BF[440C] mov di, first_sector_buffer + 512 + FSINFO.signature2 2057 00000CDB B90600 mov cx, (FSINFO.reserved2 - FSINFO.signature2) >> 1 2058 00000CDE F3A5 rep movsw ; copy signature and entries 2059 2060 00000CE0 BE[9C2C] mov si, second_sector_buffer + 512 + FSINFO.signature3 2061 00000CE3 BF[5C0C] mov di, first_sector_buffer + 512 + FSINFO.signature3 2062 00000CE6 B90200 mov cx, 4 >> 1 2063 00000CE9 F3A5 rep movsw ; copy final signature 2064 00000CEB EB50 jmp .no_fsinfo 2065 2066 @@: 2067 2068 00000CED F646E702 test byte [bp + ldHasLBA], 2 2069 00000CF1 7505 jnz @F 2070 00000CF3 800E[2208]10 setopt [cmd_line_flags], clfLeaveInfo 2071 @@: 2072 2073 00000CF8 F606[2208]10 testopt [cmd_line_flags], clfLeaveInfo 2074 00000CFD 7413 jz @F 2075 2076 00000CFF BA[AE48] mov dx, msg.leave_info 2077 00000D02 E8AE19 call disp_msg_asciz 2078 2079 ; Copy over original FSINFO sector content. 2080 00000D05 BE[A02A] mov si, second_sector_buffer + 512 2081 00000D08 BF[600A] mov di, first_sector_buffer + 512 2082 00000D0B B90001 mov cx, 512 >> 1 2083 00000D0E F3A5 rep movsw 2084 00000D10 EB2B jmp .no_fsinfo 2085 2086 @@: 2087 00000D12 BA8000 mov dx, clfReadSectorFile12 2088 00000D15 807EE610 cmp byte [bp + ldFATType], 16 2089 00000D19 7208 jb @F 2090 00000D1B BA0001 mov dx, clfReadSectorFile16 2091 00000D1E 7403 je @F 2092 00000D20 BA0002 mov dx, clfReadSectorFile32 2093 @@: 2094 00000D23 8516[2008] test word [cmd_line_flags], dx 2095 00000D27 BA[C948] mov dx, msg.replace_info 2096 00000D2A 7403 jz @F 2097 00000D2C BA[DE48] mov dx, msg.replace_info_file 2098 @@: 2099 00000D2F E88119 call disp_msg_asciz 2100 2101 ; Copy over actual FSINFO structure from original. 2102 ; (Leaves FSIBOOT as written from our image.) 2103 00000D32 BE[842C] mov si, second_sector_buffer + 512 + FSINFO.signature2 2104 00000D35 BF[440C] mov di, first_sector_buffer + 512 + FSINFO.signature2 2105 00000D38 B90E00 mov cx, (FSINFO_size - FSINFO.signature2) >> 1 2106 00000D3B F3A5 rep movsw ; copy over FSINFO 2107 .no_fsinfo: 2108 ; 1st buffer second 512 B = FSINFO with FSIBOOT 2109 2110 2111 prepare_sector_final: 2112 00000D3D BE[9E2A] mov si, second_sector_buffer + 510 2113 00000D40 BF[5E0A] mov di, first_sector_buffer + 510 2114 00000D43 A5 movsw 2115 ; 1st buffer signature set from original 2116 2117 00000D44 8B4EDC mov cx, word [bp + ldBytesPerSector] 2118 00000D47 F646E706 test byte [bp + ldHasLBA], 2 | 4 2119 00000D4B 740E jz @F 2120 00000D4D 81C60002 add si, 512 ; -> second_sector_buffer +1024 2121 00000D51 81C70002 add di, 512 ; -> behind buffer for FSIBOOT 2122 00000D55 81E90002 sub cx, 512 2123 00000D59 7608 jbe @FF 2124 @@: 2125 00000D5B 81E90002 sub cx, 512 2126 00000D5F 7602 jbe @F 2127 00000D61 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: 2136 00000D63 BB[5621] mov bx, type_search_metadata 2137 2138 .looppattern: 2139 00000D66 BE[6008] mov si, first_sector_buffer 2140 00000D69 BA0002 mov dx, 512 2141 00000D6C 8B3F mov di, [bx] 2142 00000D6E 85FF test di, di 2143 00000D70 7437 jz .notfound 2144 00000D72 8B4F02 mov cx, [bx + 2] 2145 00000D75 83C308 add bx, 8 2146 2147 2148 @@: 2149 00000D78 8A05 mov al, byte [di] ; get first byte 2150 00000D7A 87FE xchg si, di ; es:di -> to search 2151 00000D7C 87CA xchg dx, cx ; cx = count remaining, at least 1 2152 00000D7E F2AE repne scasb ; scan for byte 2153 00000D80 87CA xchg dx, cx 2154 00000D82 87FE xchg si, di ; restore register setup 2155 00000D84 7519 jne .nextpattern 2156 2157 00000D86 4E dec si ; scasb left a pointer behind match 2158 00000D87 42 inc dx ; also fix counter 2159 00000D88 53 push bx 2160 00000D89 56 push si 2161 00000D8A 57 push di 2162 00000D8B 51 push cx 2163 00000D8C 39D1 cmp cx, dx 2164 00000D8E 7705 ja .mismatchpattern ; (NZ) if doesn't fit in 512 bytes 2165 00000D90 E83305 call .patchwildcards ; patch potential match candidate's wildcards 2166 00000D93 F3A6 repe cmpsb 2167 .mismatchpattern: 2168 00000D95 59 pop cx 2169 00000D96 5F pop di 2170 00000D97 5E pop si 2171 00000D98 5B pop bx 2172 00000D99 7413 je .foundpattern 2173 00000D9B 46 inc si 2174 00000D9C 4A dec dx 2175 00000D9D 75D9 jnz @B 2176 2177 .nextpattern: 2178 %if 1 2179 @@: 2180 00000D9F 833F00 cmp word [bx], 0 2181 00000DA2 8D5F02 lea bx, [bx + 2] 2182 00000DA5 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 2189 00000DA7 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: 2200 00000DA9 BA[1544] mov dx, msg.type_not_found 2201 00000DAC EB0F jmp .done_msg 2202 2203 2204 .foundpattern: 2205 00000DAE BA[3544] mov dx, msg.type_found.1 2206 00000DB1 E8FF18 call disp_msg_asciz 2207 00000DB4 8B57FC mov dx, word [bx - 8 + 4] 2208 00000DB7 E8F918 call disp_msg_asciz ; display what we found 2209 00000DBA BA[4944] mov dx, msg.type_found.2 2210 2211 .done_msg: 2212 00000DBD E8F318 call disp_msg_asciz 2213 .done: 2214 2215 2216 detect_fsi: 2217 00000DC0 807EE610 cmp byte [bp + ldFATType], 16 2218 00000DC4 7703E95101 jbe .done 2219 2220 00000DC9 BB[C221] mov bx, fsi_search_metadata 2221 2222 .looppattern: 2223 00000DCC BE[6008] mov si, first_sector_buffer 2224 00000DCF BA0002 mov dx, 512 2225 00000DD2 8B3F mov di, [bx] 2226 00000DD4 85FF test di, di 2227 00000DD6 7437 jz .notfound 2228 00000DD8 8B4F02 mov cx, [bx + 2] 2229 00000DDB 83C308 add bx, 8 2230 2231 2232 @@: 2233 00000DDE 8A05 mov al, byte [di] ; get first byte 2234 00000DE0 87FE xchg si, di ; es:di -> to search 2235 00000DE2 87CA xchg dx, cx ; cx = count remaining, at least 1 2236 00000DE4 F2AE repne scasb ; scan for byte 2237 00000DE6 87CA xchg dx, cx 2238 00000DE8 87FE xchg si, di ; restore register setup 2239 00000DEA 7519 jne .nextpattern 2240 2241 00000DEC 4E dec si ; scasb left a pointer behind match 2242 00000DED 42 inc dx ; also fix counter 2243 00000DEE 53 push bx 2244 00000DEF 56 push si 2245 00000DF0 57 push di 2246 00000DF1 51 push cx 2247 00000DF2 39D1 cmp cx, dx 2248 00000DF4 7705 ja .mismatchpattern ; (NZ) if doesn't fit in 512 bytes 2249 00000DF6 E8CD04 call .patchwildcards ; patch potential match candidate's wildcards 2250 00000DF9 F3A6 repe cmpsb 2251 .mismatchpattern: 2252 00000DFB 59 pop cx 2253 00000DFC 5F pop di 2254 00000DFD 5E pop si 2255 00000DFE 5B pop bx 2256 00000DFF 7414 je .foundpattern 2257 00000E01 46 inc si 2258 00000E02 4A dec dx 2259 00000E03 75D9 jnz @B 2260 2261 .nextpattern: 2262 %if 1 2263 @@: 2264 00000E05 833F00 cmp word [bx], 0 2265 00000E08 8D5F02 lea bx, [bx + 2] 2266 00000E0B 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 2273 00000E0D 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: 2284 00000E0F BA[A142] mov dx, msg.fsi_not_found 2285 00000E12 E90201 jmp .done_msg 2286 2287 2288 .foundpattern: 2289 00000E15 8B36[BA21] mov si, word [..@fsi_search_signature_offset] 2290 00000E19 81EE007C sub si, 7C00h 2291 00000E1D 72F0 jb .notfound 2292 00000E1F 81FEF601 cmp si, 512 - 10 2293 00000E23 77EA ja .notfound 2294 00000E25 81C6[6008] add si, first_sector_buffer 2295 00000E29 89F2 mov dx, si 2296 00000E2B B90800 mov cx, 8 2297 @@: 2298 00000E2E AC lodsb 2299 00000E2F 3C20 cmp al, 32 2300 00000E31 7309 jae .notzero 2301 ; Hack for first FSIBOOT: Last byte may be NUL 2302 00000E33 83F901 cmp cx, 1 2303 00000E36 75D7 jne .notfound 2304 00000E38 84C0 test al, al 2305 00000E3A 75D3 jnz .notfound 2306 2307 .notzero: 2308 00000E3C 3C7F cmp al, 127 2309 00000E3E 73CF jae .notfound 2310 00000E40 E2EC loop @B 2311 2312 00000E42 800E[D829]80 setopt [internalflags], detectedfsineeded 2313 2314 00000E47 89D6 mov si, dx 2315 00000E49 BF[3C08] mov di, fsi_needed 2316 00000E4C 57 push di 2317 00000E4D B90400 mov cx, 4 2318 00000E50 F3A5 rep movsw 2319 00000E52 5F pop di 2320 00000E53 BA[BF42] mov dx, msg.fsi_found.1 2321 00000E56 E80300 call disp_fsi 2322 00000E59 E9BE00 jmp .done 2323 2324 disp_fsi: equ $ 2325 00000E5C E85418 call disp_msg_asciz 2326 00000E5F 89FE mov si, di 2327 00000E61 B90400 mov cx, 4 2328 00000E64 31DB xor bx, bx 2329 @@: 2330 00000E66 AD lodsw 2331 00000E67 09C3 or bx, ax 2332 00000E69 E2FB loop @B 2333 00000E6B 7506 jnz @F 2334 00000E6D BA[AF42] mov dx, msg.none_found 2335 00000E70 E9A100 jmp .display_done_msg 2336 2337 @@: 2338 00000E73 B022 mov al, '"' 2339 00000E75 E89118 call disp_al 2340 00000E78 89FE mov si, di 2341 00000E7A B108 mov cl, 8 2342 .displayloop: 2343 00000E7C AC lodsb 2344 00000E7D 3C20 cmp al, 32 2345 00000E7F 7204 jb .nonprintable 2346 00000E81 3C7F cmp al, 127 2347 00000E83 7211 jb .printable 2348 .nonprintable: 2349 00000E85 50 push ax 2350 00000E86 B05C mov al, '\' 2351 00000E88 E87E18 call disp_al 2352 00000E8B B078 mov al, 'x' 2353 00000E8D E87918 call disp_al 2354 00000E90 58 pop ax 2355 00000E91 E85E18 call disp_al_hex 2356 00000E94 EB12 jmp .displaynext 2357 2358 .printable: 2359 00000E96 3C5C cmp al, '\' 2360 00000E98 7404 je .escape 2361 00000E9A 3C22 cmp al, '"' 2362 00000E9C 7507 jne .plain 2363 .escape: 2364 00000E9E 50 push ax 2365 00000E9F B05C mov al, '\' 2366 00000EA1 E86518 call disp_al 2367 00000EA4 58 pop ax 2368 .plain: 2369 00000EA5 E86118 call disp_al 2370 .displaynext: 2371 00000EA8 E2D2 loop .displayloop 2372 2373 00000EAA BA[4744] mov dx, msg.fsi_found.2 2374 00000EAD E80318 call disp_msg_asciz 2375 2376 00000EB0 BE[D421] mov si, fsi_known_revisions 2377 .loop: 2378 00000EB3 AD lodsw 2379 00000EB4 85C0 test ax, ax 2380 00000EB6 741D jz .unknown 2381 00000EB8 57 push di 2382 00000EB9 56 push si 2383 00000EBA B90400 mov cx, 4 2384 00000EBD F3A7 repe cmpsw 2385 00000EBF 5E pop si 2386 00000EC0 5F pop di 2387 00000EC1 8D7408 lea si, [si + 8] 2388 00000EC4 75ED jne .loop 2389 .known: 2390 00000EC6 BA[BB43] mov dx, msg.fsi_known.1 2391 00000EC9 E8E717 call disp_msg_asciz 2392 00000ECC 92 xchg dx, ax 2393 00000ECD E8E317 call disp_msg_asciz 2394 00000ED0 BA[BD43] mov dx, msg.fsi_known.2 2395 00000ED3 EB3F jmp .display_done_msg 2396 2397 .unknown: 2398 00000ED5 89FB mov bx, di 2399 00000ED7 BE[C043] mov si, msg.signature.fsiboot 2400 00000EDA B90700 mov cx, 7 2401 00000EDD F3A6 repe cmpsb 2402 00000EDF 750F jne .checkexp 2403 00000EE1 8A05 mov al, [di] 2404 00000EE3 A2[E643] mov byte [msg.future_fsiboot.revision], al 2405 00000EE6 E8E717 call is_alphanumeric 2406 00000EE9 7526 jne .unknown2 2407 00000EEB BA[CD43] mov dx, msg.future_fsiboot 2408 00000EEE EB24 jmp .display_done_msg 2409 2410 .checkexp: 2411 00000EF0 89DF mov di, bx 2412 00000EF2 BE[C743] mov si, msg.signature.fsibex 2413 00000EF5 B106 mov cl, 6 2414 00000EF7 F3A6 repe cmpsb 2415 00000EF9 7516 jne .unknown2 2416 00000EFB 8B05 mov ax, [di] 2417 00000EFD A3[1044] mov word [msg.future_fsibex.revision], ax 2418 00000F00 E8CD17 call is_alphanumeric 2419 00000F03 750C jne .unknown2 2420 00000F05 86E0 xchg al, ah 2421 00000F07 E8C617 call is_alphanumeric 2422 00000F0A 7505 jne .unknown2 2423 00000F0C BA[EA43] mov dx, msg.future_fsibex 2424 00000F0F EB03 jmp .display_done_msg 2425 2426 .unknown2: 2427 00000F11 BA[9E43] mov dx, msg.fsi_unknown 2428 .display_done_msg: 2429 00000F14 E99C17 jmp disp_msg_asciz 2430 2431 .done_msg: 2432 00000F17 E89917 call disp_msg_asciz 2433 .done: 2434 2435 2436 check_fsi_provided: 2437 00000F1A 807EE610 cmp byte [bp + ldFATType], 16 2438 00000F1E 7703E99A00 jbe .done 2439 2440 00000F23 BF[4608] mov di, fsi_provided 2441 00000F26 BE[640A] mov si, first_sector_buffer + 512 + FSINFO.fsiboot 2442 2443 00000F29 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 2444 00000F2E 7311 jae .first 2445 2446 00000F30 F606[D829]40 testopt [internalflags], detectedinfo 2447 00000F35 7411 jz .none 2448 2449 00000F37 F606[2008]58 testopt [cmd_line_flags], clfDontWriteInfo | clfWriteInfoToSectorFile | clfWriteInfoToFile 2451 00000F3C 7403 jz .first 2452 2453 00000F3E BE[A42A] mov si, second_sector_buffer + 512 + FSINFO.fsiboot 2454 2455 .second: 2456 2457 .first: 2458 00000F41 B90400 mov cx, 4 2459 00000F44 57 push di 2460 00000F45 F3A5 rep movsw 2461 00000F47 5F pop di 2462 .none: 2463 2464 00000F48 BA[CE42] mov dx, msg.fsi_provided.1 2465 00000F4B E80EFF call disp_fsi 2466 2467 00000F4E F606[D829]80 testopt [internalflags], detectedfsineeded 2468 00000F53 744B jz .done_check_sg 2469 00000F55 F606[2008]04 testopt [cmd_line_flags], clfDontWriteSector 2470 00000F5A 7544 jnz .done_check_sg 2471 2472 00000F5C BF[4608] mov di, fsi_provided 2473 00000F5F BE[3C08] mov si, fsi_needed 2474 00000F62 B90400 mov cx, 4 2475 00000F65 F3A7 repe cmpsw 2476 00000F67 7437 je .done_check_sg 2477 2478 00000F69 BA[DD42] mov dx, msg.fsi_mismatch.1 2479 00000F6C E80200 call .disp_error 2480 00000F6F EB28 jmp .handle_needed 2481 2482 .disp_error: 2483 00000F71 B8[1843] mov ax, msg.fsi_mismatch.2.big 2484 00000F74 817EDC0004 cmp word [bp + ldBytesPerSector], 1024 2485 00000F79 7317 jae @F 2486 00000F7B B8[3B43] mov ax, msg.fsi_mismatch.2.none 2487 00000F7E F606[D829]40 testopt [internalflags], detectedinfo 2488 00000F83 740D jz @F 2489 00000F85 B8[5B43] mov ax, msg.fsi_mismatch.2.found 2490 00000F88 F606[2008]58 testopt [cmd_line_flags], clfDontWriteInfo | clfWriteInfoToSectorFile | clfWriteInfoToFile 2492 00000F8D 7503 jnz @F 2493 00000F8F B8[7D43] mov ax, msg.fsi_mismatch.2.install 2494 @@: 2495 2496 00000F92 E81E17 call disp_msg_asciz 2497 00000F95 92 xchg dx, ax 2498 00000F96 E91A17 jmp disp_msg_asciz 2499 2500 .handle_needed: 2501 00000F99 F606[2308]04 testopt [cmd_line_flags], clfAllowInvalidFSI 2502 00000F9E 741A jz .exit_error 2503 2504 .done_check_sg: 2505 00000FA0 F606[2308]08 testopt [cmd_line_flags], clfCheckFSI 2506 00000FA5 7416 jz .done 2507 2508 00000FA7 BF[4608] mov di, fsi_provided 2509 00000FAA BE[5008] mov si, fsi_check 2510 00000FAD B90400 mov cx, 4 2511 00000FB0 F3A7 repe cmpsw 2512 00000FB2 7409 je .done 2513 2514 00000FB4 BA[FB42] mov dx, msg.fsi_mismatch.3 2515 00000FB7 E8B7FF call .disp_error 2516 .exit_error: 2517 00000FBA E9EF06 jmp exit_error 2518 2519 .done: 2520 2521 2522 %if _NUM_DETECT_NAMES 2523 listnames: 2524 00000FBD BB[C03C] mov bx, msg.names 2525 00000FC0 BE[9E08] mov si, first_sector_buffer + bsBPB + bpbNew + BPBN_size 2526 00000FC3 B9C001 mov cx, 512 - (bsBPB + bpbNew + BPBN_size) - 2 2527 ; -2 = AA55h sig 2528 00000FC6 807EE610 cmp byte [bp + ldFATType], 16 2529 00000FCA 7606 jbe @F 2530 00000FCC BE[BA08] mov si, first_sector_buffer + bsBPB + ebpbNew + BPBN_size 2531 00000FCF 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. 2567 00000FD2 E88114 call findname 2568 00000FD5 730D jnc @F 2569 00000FD7 BA[FE3C] mov dx, msg.name_none 2570 00000FDA E8D616 call disp_msg_asciz 2571 00000FDD EB36 jmp @FF 2572 2573 .nextname: 2574 00000FDF E87414 call findname 2575 00000FE2 7231 jc @FF 2576 @@: 2577 00000FE4 8B17 mov dx, [bx] 2578 00000FE6 E8CA16 call disp_msg_asciz 2579 00000FE9 BA[F63C] mov dx, msg.name_before 2580 00000FEC E8C416 call disp_msg_asciz 2581 00000FEF BA[F93C] mov dx, msg.name_quote 2582 00000FF2 E8BE16 call disp_msg_asciz 2583 00000FF5 BA[A83C] mov dx, msg.foundname 2584 00000FF8 E8B816 call disp_msg_asciz 2585 00000FFB BA[F93C] mov dx, msg.name_quote 2586 00000FFE E8B216 call disp_msg_asciz 2587 00001001 BA[FB3C] mov dx, msg.name_after 2588 00001004 E8AC16 call disp_msg_asciz 2589 00001007 8D44F5 lea ax, [si - 11] ; -> name in buffer 2590 0000100A 894702 mov word [bx + 2], ax ; -> name in buffer, or 0 2591 0000100D 83C304 add bx, 4 2592 00001010 833F00 cmp word [bx], 0 2593 00001013 75CA jne .nextname 2594 @@: 2595 %endif 2596 2597 2598 %if _NUM_REPLACEMENTS 2599 00001015 BE[783C] mov si, msg.name_replacements 2600 00001018 BB[C03C] mov bx, msg.names 2601 0000101B B90400 mov cx, _NUM_REPLACEMENTS 2602 .loop: 2603 0000101E 803C00 cmp byte [si], 0 2604 00001021 7448 je .next 2605 00001023 8B7F02 mov di, word [bx + 2] 2606 00001026 85FF test di, di 2607 00001028 7514 jnz .replace 2608 0000102A BA[123D] mov dx, msg.no_name_found_before 2609 0000102D E88316 call disp_msg_asciz 2610 00001030 8B17 mov dx, [bx] 2611 00001032 E87E16 call disp_msg_asciz 2612 00001035 BA[163D] mov dx, msg.no_name_found_after 2613 00001038 E87816 call disp_msg_asciz 2614 0000103B E96E06 jmp exit_error 2615 2616 .replace: 2617 0000103E BA[303D] mov dx, msg.replacing_before 2618 00001041 E86F16 call disp_msg_asciz 2619 00001044 8B17 mov dx, [bx] 2620 00001046 E86A16 call disp_msg_asciz 2621 00001049 BA[3B3D] mov dx, msg.replacing_between 2622 0000104C E86416 call disp_msg_asciz 2623 0000104F 51 push cx 2624 00001050 56 push si 2625 00001051 56 push si 2626 00001052 57 push di 2627 00001053 E88D14 call convert_name_to_asciz 2628 00001056 5F pop di 2629 00001057 5E pop si 2630 00001058 BA[A83C] mov dx, msg.foundname 2631 0000105B E85516 call disp_msg_asciz 2632 0000105E BA[433D] mov dx, msg.replacing_after 2633 00001061 E84F16 call disp_msg_asciz 2634 00001064 B90B00 mov cx, 11 2635 00001067 F3A4 rep movsb 2636 00001069 5E pop si 2637 0000106A 59 pop cx 2638 2639 .next: 2640 0000106B 83C304 add bx, 4 2641 0000106E 83C60C add si, 12 2642 00001071 833F00 cmp word [bx], 0 2643 00001074 E0A8 loopnz .loop 2644 %endif 2645 %endif 2646 2647 2648 set_unit: 2649 00001076 BE[6008] mov si, first_sector_buffer 2650 00001079 AC lodsb 2651 0000107A 3CE9 cmp al, 0E9h 2652 0000107C 741B je .nearjmp 2653 0000107E 3CE8 cmp al, 0E8h 2654 00001080 7417 je .nearjmp 2655 00001082 3CEB cmp al, 0EBh 2656 00001084 7415 je .shortjmp 2657 2658 .notfound: 2659 00001086 BA[D93E] mov dx, msg.unit_not_found 2660 00001089 833E[E629]FF cmp word [load_unit], -1 2661 0000108E 7403E939F0 jne disp_error 2662 00001093 BA[0B3F] mov dx, msg.unit_not_found.keep 2663 00001096 E9C400 jmp .done_msg 2664 2665 2666 .nearjmp: 2667 00001099 AD lodsw 2668 0000109A A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2669 .shortjmp: 2670 0000109B AC lodsb 2671 0000109C 98 cbw 2672 0000109D 01C6 add si, ax 2673 2674 0000109F BA1000 mov dx, 16 2675 000010A2 BF[F117] mov di, unit_search_strings.mov 2676 000010A5 B90300 mov cx, unit_search_strings.mov_length 2677 @@: 2678 000010A8 56 push si 2679 000010A9 57 push di 2680 000010AA 51 push cx 2681 000010AB F3A6 repe cmpsb 2682 000010AD 59 pop cx 2683 000010AE 5F pop di 2684 000010AF 5E pop si 2685 000010B0 7406 je .found_mov 2686 000010B2 46 inc si 2687 000010B3 4A dec dx 2688 000010B4 75F2 jnz @B 2689 2690 000010B6 EBCE jmp .notfound 2691 2692 .found_mov: 2693 000010B8 01CE add si, cx 2694 2695 000010BA BA3000 mov dx, 48 2696 000010BD BB[F717] mov bx, unit_search_strings.1612_set_dl 2697 000010C0 BF[F417] mov di, unit_search_strings.1612_set_bpbn 2698 000010C3 B90300 mov cx, unit_search_strings.1612_set_bpbn_length 2699 000010C6 807EE610 cmp byte [bp + ldFATType], 16 2700 000010CA 7609 jbe @F 2701 000010CC BB[FD17] mov bx, unit_search_strings.32_set_dl 2702 000010CF BF[FA17] mov di, unit_search_strings.32_set_bpbn 2703 000010D2 B90300 mov cx, unit_search_strings.32_set_bpbn_length 2704 2705 @@: 2706 000010D5 56 push si 2707 000010D6 57 push di 2708 000010D7 51 push cx 2709 000010D8 F3A6 repe cmpsb 2710 000010DA 59 pop cx 2711 000010DB 5F pop di 2712 000010DC 5E pop si 2713 000010DD 7435 je .found_set_bpbn 2714 000010DF 87FB xchg bx, di 2715 000010E1 56 push si 2716 000010E2 57 push di 2717 000010E3 51 push cx 2718 000010E4 F3A6 repe cmpsb 2719 000010E6 59 pop cx 2720 000010E7 5F pop di 2721 000010E8 5E pop si 2722 000010E9 87FB xchg bx, di 2723 000010EB 742F je .found_set_dl 2724 000010ED 46 inc si 2725 000010EE 4A dec dx 2726 000010EF 75E4 jnz @B 2727 2728 000010F1 EB93 jmp .notfound 2729 2730 .setup_pointers: 2731 000010F3 807EE610 cmp byte [bp + ldFATType], 16 2732 000010F7 760E jbe .1612 2733 .32: 2734 000010F9 BB[A008] mov bx, first_sector_buffer + bsBPB + ebpbNew + bpbnBootUnit 2735 000010FC B8[FA17] mov ax, unit_search_strings.32_set_bpbn 2736 000010FF BF[FD17] mov di, unit_search_strings.32_set_dl 2737 00001102 B90300 mov cx, unit_search_strings.32_set_dl_length 2738 00001105 EB0C jmp @F 2739 2740 .1612: 2741 00001107 BB[8408] mov bx, first_sector_buffer + bsBPB + bpbNew + bpbnBootUnit 2742 0000110A B8[F417] mov ax, unit_search_strings.1612_set_bpbn 2743 0000110D BF[F717] mov di, unit_search_strings.1612_set_dl 2744 00001110 B90300 mov cx, unit_search_strings.1612_set_dl_length 2745 @@: 2746 00001113 C3 retn 2747 2748 2749 .found_set_bpbn: 2750 00001114 E8DCFF call .setup_pointers 2751 00001117 BA[453F] mov dx, msg.unit_found.set_bpbn 2752 0000111A EB13 jmp @F 2753 2754 .found_set_dl: 2755 0000111C E8D4FF call .setup_pointers 2756 0000111F BA[6A3F] mov dx, msg.unit_found.set_dl 2757 00001122 E88E15 call disp_msg_asciz 2758 2759 00001125 50 push ax 2760 00001126 8A07 mov al, [bx] 2761 00001128 E8C715 call disp_al_hex 2762 0000112B 58 pop ax 2763 2764 0000112C BA[963F] mov dx, msg.unit_found.set_dl.after 2765 @@: 2766 0000112F E88115 call disp_msg_asciz 2767 2768 00001132 BA[993F] mov dx, msg.unit_found.keeping 2769 00001135 833E[E629]FF cmp word [load_unit], -1 2770 0000113A 7421 je .done_msg 2771 2772 0000113C 50 push ax 2773 0000113D A1[E629] mov ax, [load_unit] 2774 2775 00001140 84E4 test ah, ah 2776 00001142 7511 jnz @F ; if to set auto unit --> 2777 2778 00001144 BA[BE3E] mov dx, msg.using_fix_unit 2779 00001147 E86915 call disp_msg_asciz 2780 2781 0000114A E8A515 call disp_al_hex 2782 0000114D 8807 mov byte [bx], al 2783 2784 0000114F BA[D43E] mov dx, msg.using_fix_unit_after 2785 00001152 58 pop ax 2786 00001153 EB04 jmp @FF ; di -> set dl 2787 2788 @@: 2789 00001155 5F pop di ; di -> set bpbn 2790 00001156 BA[AB3F] mov dx, msg.using_auto_unit 2791 @@: 2792 2793 00001159 87FE xchg si, di 2794 0000115B F3A4 rep movsb ; write to there 2795 2796 .done_msg: 2797 0000115D E85315 call disp_msg_asciz 2798 .done: 2799 2800 2801 set_partinfo: 2802 00001160 BE[6008] mov si, first_sector_buffer 2803 00001163 AC lodsb 2804 00001164 3CE9 cmp al, 0E9h 2805 00001166 741A je .nearjmp 2806 00001168 3CE8 cmp al, 0E8h 2807 0000116A 7416 je .nearjmp 2808 0000116C 3CEB cmp al, 0EBh 2809 0000116E 7414 je .shortjmp 2810 2811 .notfound: 2812 00001170 BA[D93F] mov dx, msg.partinfo_not_found 2813 00001173 833E[E829]FF cmp word [load_use_partinfo], -1 2814 00001178 7403E94FEF jne disp_error 2815 0000117D BA[0640] mov dx, msg.partinfo_not_found.keep 2816 00001180 EB6B jmp .done_msg 2817 2818 2819 .nearjmp: 2820 00001182 AD lodsw 2821 00001183 A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2822 .shortjmp: 2823 00001184 AC lodsb 2824 00001185 98 cbw 2825 00001186 01C6 add si, ax 2826 2827 00001188 BA8000 mov dx, 128 2828 0000118B BB[1518] mov bx, partinfo_search_strings.keep 2829 0000118E BF[0018] mov di, partinfo_search_strings.mov 2830 00001191 B91500 mov cx, partinfo_search_strings.mov_length 2831 2832 @@: 2833 00001194 56 push si 2834 00001195 57 push di 2835 00001196 51 push cx 2836 00001197 F3A6 repe cmpsb 2837 00001199 59 pop cx 2838 0000119A 5F pop di 2839 0000119B 5E pop si 2840 0000119C 741E je .found_mov 2841 0000119E 87FB xchg bx, di 2842 000011A0 56 push si 2843 000011A1 57 push di 2844 000011A2 51 push cx 2845 000011A3 F3A6 repe cmpsb 2846 000011A5 59 pop cx 2847 000011A6 5F pop di 2848 000011A7 5E pop si 2849 000011A8 87FB xchg bx, di 2850 000011AA 7418 je .found_keep 2851 000011AC 46 inc si 2852 000011AD 4A dec dx 2853 000011AE 75E4 jnz @B 2854 2855 000011B0 EBBE jmp .notfound 2856 2857 .setup_pointers: 2858 000011B2 B8[0018] mov ax, partinfo_search_strings.mov 2859 000011B5 BF[1518] mov di, partinfo_search_strings.keep 2860 000011B8 B91500 mov cx, partinfo_search_strings.keep_length 2861 000011BB C3 retn 2862 2863 2864 .found_mov: 2865 000011BC E8F3FF call .setup_pointers 2866 000011BF BA[3B40] mov dx, msg.partinfo_found.mov 2867 000011C2 EB06 jmp @F 2868 2869 .found_keep: 2870 000011C4 E8EBFF call .setup_pointers 2871 000011C7 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 @@: 2883 000011CA E8E614 call disp_msg_asciz 2884 2885 000011CD BA[993F] mov dx, msg.partinfo_found.keeping 2886 000011D0 833E[E829]FF cmp word [load_use_partinfo], -1 2887 000011D5 7416 je .done_msg 2888 2889 000011D7 50 push ax 2890 000011D8 A1[E829] mov ax, [load_use_partinfo] 2891 2892 000011DB 84E4 test ah, ah 2893 000011DD 7506 jnz @F ; if to set auto partinfo --> 2894 2895 000011DF 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 2904 000011E2 58 pop ax 2905 000011E3 EB04 jmp @FF ; di -> keep 2906 2907 @@: 2908 000011E5 5F pop di ; di -> mov 2909 000011E6 BA[7C40] mov dx, msg.using_auto_partinfo 2910 @@: 2911 2912 000011E9 87FE xchg si, di 2913 000011EB F3A4 rep movsb ; write to there 2914 2915 .done_msg: 2916 000011ED E8C314 call disp_msg_asciz 2917 .done: 2918 2919 2920 set_query: 2921 000011F0 BE[6008] mov si, first_sector_buffer 2922 000011F3 AC lodsb 2923 000011F4 3CE9 cmp al, 0E9h 2924 000011F6 741A je .nearjmp 2925 000011F8 3CE8 cmp al, 0E8h 2926 000011FA 7416 je .nearjmp 2927 000011FC 3CEB cmp al, 0EBh 2928 000011FE 7414 je .shortjmp 2929 2930 .notfound: 2931 00001200 BA[AE40] mov dx, msg.query_not_found 2932 00001203 833E[EA29]FF cmp word [load_use_query_geometry], -1 2933 00001208 7403E9BFEE jne disp_error 2934 0000120D BA[E040] mov dx, msg.query_not_found.keep 2935 00001210 EB6B jmp .done_msg 2936 2937 2938 .nearjmp: 2939 00001212 AD lodsw 2940 00001213 A9 db __TEST_IMM16 ; (skip lodsb, cbw) 2941 .shortjmp: 2942 00001214 AC lodsb 2943 00001215 98 cbw 2944 00001216 01C6 add si, ax 2945 2946 00001218 BA8000 mov dx, 128 2947 0000121B BB[3F18] mov bx, query_search_strings.keep 2948 0000121E BF[2A18] mov di, query_search_strings.query 2949 00001221 B91500 mov cx, query_search_strings.query_length 2950 2951 @@: 2952 00001224 56 push si 2953 00001225 57 push di 2954 00001226 51 push cx 2955 00001227 F3A6 repe cmpsb 2956 00001229 59 pop cx 2957 0000122A 5F pop di 2958 0000122B 5E pop si 2959 0000122C 741E je .found_query 2960 0000122E 87FB xchg bx, di 2961 00001230 56 push si 2962 00001231 57 push di 2963 00001232 51 push cx 2964 00001233 F3A6 repe cmpsb 2965 00001235 59 pop cx 2966 00001236 5F pop di 2967 00001237 5E pop si 2968 00001238 87FB xchg bx, di 2969 0000123A 7418 je .found_keep 2970 0000123C 46 inc si 2971 0000123D 4A dec dx 2972 0000123E 75E4 jnz @B 2973 2974 00001240 EBBE jmp .notfound 2975 2976 .setup_pointers: 2977 00001242 B8[2A18] mov ax, query_search_strings.query 2978 00001245 BF[3F18] mov di, query_search_strings.keep 2979 00001248 B91500 mov cx, query_search_strings.keep_length 2980 0000124B C3 retn 2981 2982 2983 .found_query: 2984 0000124C E8F3FF call .setup_pointers 2985 0000124F BA[1A41] mov dx, msg.query_found.query 2986 00001252 EB06 jmp @F 2987 2988 .found_keep: 2989 00001254 E8EBFF call .setup_pointers 2990 00001257 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 @@: 3002 0000125A E85614 call disp_msg_asciz 3003 3004 0000125D BA[993F] mov dx, msg.query_found.keeping 3005 00001260 833E[EA29]FF cmp word [load_use_query_geometry], -1 3006 00001265 7416 je .done_msg 3007 3008 00001267 50 push ax 3009 00001268 A1[EA29] mov ax, [load_use_query_geometry] 3010 3011 0000126B 84E4 test ah, ah 3012 0000126D 7506 jnz @F ; if to set auto query --> 3013 3014 0000126F 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 3023 00001272 58 pop ax 3024 00001273 EB04 jmp @FF ; di -> keep 3025 3026 @@: 3027 00001275 5F pop di ; di -> query 3028 00001276 BA[7041] mov dx, msg.using_auto_query 3029 @@: 3030 3031 00001279 87FE xchg si, di 3032 0000127B F3A4 rep movsb ; write to there 3033 3034 .done_msg: 3035 0000127D E83314 call disp_msg_asciz 3036 .done: 3037 3038 set_lba: 3039 00001280 BB[7E1D] mov bx, lba_search_metadata 3040 3041 .looppattern: 3042 00001283 BE[6008] mov si, first_sector_buffer 3043 00001286 BA0002 mov dx, 512 3044 00001289 8B3F mov di, [bx] 3045 0000128B 85FF test di, di 3046 0000128D 744E jz .notfound 3047 0000128F 8B4F02 mov cx, [bx + 2] 3048 00001292 83C308 add bx, 8 3049 3050 3051 @@: 3052 00001295 8A05 mov al, byte [di] ; get first byte 3053 00001297 87FE xchg si, di ; es:di -> to search 3054 00001299 87CA xchg dx, cx ; cx = count remaining, at least 1 3055 0000129B F2AE repne scasb ; scan for byte 3056 0000129D 87CA xchg dx, cx 3057 0000129F 87FE xchg si, di ; restore register setup 3058 000012A1 7519 jne .nextpattern 3059 3060 000012A3 4E dec si ; scasb left a pointer behind match 3061 000012A4 42 inc dx ; also fix counter 3062 000012A5 53 push bx 3063 000012A6 56 push si 3064 000012A7 57 push di 3065 000012A8 51 push cx 3066 000012A9 39D1 cmp cx, dx 3067 000012AB 7705 ja .mismatchpattern ; (NZ) if doesn't fit in 512 bytes 3068 000012AD E81600 call .patchwildcards ; patch potential match candidate's wildcards 3069 000012B0 F3A6 repe cmpsb 3070 .mismatchpattern: 3071 000012B2 59 pop cx 3072 000012B3 5F pop di 3073 000012B4 5E pop si 3074 000012B5 5B pop bx 3075 000012B6 7438 je .foundpattern 3076 000012B8 46 inc si 3077 000012B9 4A dec dx 3078 000012BA 75D9 jnz @B 3079 3080 .nextpattern: 3081 %if 1 3082 @@: 3083 000012BC 833F00 cmp word [bx], 0 3084 000012BF 8D5F02 lea bx, [bx + 2] 3085 000012C2 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 3092 000012C4 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: 3101 000012C6 53 push bx 3102 .loopwildcard: 3103 000012C7 53 push bx 3104 000012C8 8B1F mov bx, [bx] ; = displacement to wildcard byte 3105 000012CA 85DB test bx, bx ; zero ? 3106 000012CC 7409 jz .donewildcard ; yes, done --> 3107 000012CE 8A00 mov al, byte [si + bx] ; get actual value 3108 000012D0 8801 mov byte [di + bx], al ; store it in wildcard position 3109 000012D2 5B pop bx 3110 000012D3 43 inc bx 3111 000012D4 43 inc bx ; -> next wildcard displacement 3112 000012D5 EBF0 jmp .loopwildcard 3113 .donewildcard: 3114 000012D7 5B pop bx 3115 000012D8 8D4702 lea ax, [bx + 2] 3116 000012DB 5B pop bx ; restore -> start of displacement list 3117 000012DC C3 retn 3118 3119 3120 .notfound: 3121 000012DD BA[BC41] mov dx, msg.lba_not_found 3122 000012E0 833E[EC29]FF cmp word [load_use_lba], -1 3123 000012E5 7403E9E2ED jne disp_error 3124 000012EA BA[E841] mov dx, msg.lba_not_found.keep 3125 000012ED E9C900 jmp .done_msg 3126 3127 3128 .foundpattern: 3129 000012F0 8B57FC mov dx, word [bx - 8 + 4] 3130 000012F3 E8BD13 call disp_msg_asciz ; display what we found 3131 3132 000012F6 BA[1C42] mov dx, msg.lba_found_suffix 3133 000012F9 E8B713 call disp_msg_asciz 3134 3135 000012FC BA[993F] mov dx, msg.lba_found.keeping 3136 000012FF 833E[EC29]FF cmp word [load_use_lba], -1 3137 00001304 7503E9B000 je .done_msg ; done, no change --> 3138 3139 00001309 8B7FF8 mov di, word [bx - 8] ; -> what we matched (eg LBA) 3140 3141 0000130C 81FF[1F1D] cmp di, lba_search_strings_hdd 3142 00001310 7242 jb .nothddmatch 3143 3144 00001312 803E[ED29]01 cmp byte [load_use_lba + 1], 1 3145 00001317 7503E99D00 je .done_msg 3146 3147 0000131C 8B5FFE mov bx, word [bx - 8 + 6] 3148 0000131F 53 push bx 3149 00001320 8B5F02 mov bx, word [bx + 2] 3150 00001323 8B3F mov di, word [bx] ; -> the other code 3151 00001325 83C308 add bx, 8 3152 00001328 E89BFF call .patchwildcards 3153 0000132B 5B pop bx 3154 0000132C 53 push bx 3155 0000132D 8B5F04 mov bx, word [bx + 4] 3156 00001330 8B3F mov di, word [bx] ; -> the other code 3157 00001332 83C308 add bx, 8 3158 00001335 E88EFF call .patchwildcards 3159 00001338 5B pop bx 3160 00001339 803E[ED29]00 cmp byte [load_use_lba + 1], 0 3161 0000133E 750A jne .hddsetauto 3162 .hddsetnone: 3163 00001340 8B5F02 mov bx, word [bx + 2] 3164 00001343 8B3F mov di, word [bx] 3165 00001345 BA[8E41] mov dx, msg.using_none_lba 3166 00001348 EB6B jmp .do_patch 3167 3168 .hddsetauto: 3169 0000134A 8B5F04 mov bx, word [bx + 4] 3170 0000134D 8B3F mov di, word [bx] 3171 0000134F BA[9F41] mov dx, msg.using_auto_lba 3172 00001352 EB61 jmp .do_patch 3173 3174 .nothddmatch: 3175 00001354 803E[ED29]01 cmp byte [load_use_lba + 1], 1 3176 00001359 752F jne .nothddreplace 3177 0000135B 83EB08 sub bx, 8 3178 0000135E BF[6C1D] mov di, label_hdd_special 3179 @@: 3180 00001361 833D00 cmp word [di], 0 3181 00001364 741E je .hddreplacenotfound 3182 00001366 395D02 cmp word [di + 2], bx 3183 00001369 740A je @F 3184 0000136B 395D04 cmp word [di + 4], bx 3185 0000136E 7405 je @F 3186 00001370 83C706 add di, 6 3187 00001373 EBEC jmp @B 3188 3189 @@: 3190 00001375 8B1D mov bx, word [di] 3191 00001377 8B3F mov di, word [bx] 3192 00001379 83C308 add bx, 8 3193 0000137C E847FF call .patchwildcards 3194 0000137F BA[7942] mov dx, msg.using_autohdd_lba 3195 00001382 EB31 jmp .do_patch 3196 3197 .hddreplacenotfound: 3198 00001384 BA[2E42] mov dx, msg.lba_autohdd_not_found 3199 00001387 E942ED jmp disp_error 3200 3201 3202 .nothddreplace: 3203 0000138A 57 push di 3204 0000138B 8B5FFE mov bx, word [bx - 8 + 6] 3205 0000138E 8B3F mov di, word [bx] ; -> the other code 3206 00001390 83C308 add bx, 8 3207 00001393 E830FF call .patchwildcards ; patch other code in case we use it 3208 00001396 89F8 mov ax, di ; ax -> the other code 3209 00001398 5B pop bx 3210 00001399 89DF mov di, bx ; bx = di -> what we matched 3211 0000139B 50 push ax 3212 0000139C A1[EC29] mov ax, [load_use_lba] 3213 3214 0000139F 84E4 test ah, ah 3215 000013A1 7507 jnz @F ; if to set auto LBA --> 3216 3217 000013A3 BA[8E41] mov dx, msg.using_none_lba 3218 000013A6 58 pop ax 3219 000013A7 97 xchg ax, di ; di -> what we didn't match (eg CHS) 3220 000013A8 EB04 jmp @FF 3221 3222 @@: 3223 000013AA 58 pop ax 3224 ; di -> what we matched (eg LBA) 3225 000013AB BA[9F41] mov dx, msg.using_auto_lba 3226 @@: 3227 3228 000013AE 81FB[EB1A] cmp bx, lba_search_strings_chs 3229 ; matched CHS ? (this checks what we matched) 3230 000013B2 7201 jb @F ; no --> 3231 000013B4 97 xchg ax, di ; reverse (we matched CHS instead) 3232 @@: 3233 3234 .do_patch: 3235 000013B5 87FE xchg si, di 3236 000013B7 F3A4 rep movsb ; write to there 3237 3238 .done_msg: 3239 000013B9 E8F712 call disp_msg_asciz 3240 .done: 3241 3242 3243 set_geometry: 3244 000013BC BE[0E2A] mov si, g_table 3245 000013BF BA[853E] mov dx, msg.g_previous 3246 .loop_display: 3247 000013C2 E8EE12 call disp_msg_asciz 3248 000013C5 31DB xor bx, bx 3249 000013C7 8A5C07 mov bl, byte [si + giOffset] 3250 000013CA 31D2 xor dx, dx 3251 000013CC 8B87[6B08] mov ax, word [first_sector_buffer + bsBPB + bx] 3252 000013D0 807C0602 cmp byte [si + giLength], 2 3253 000013D4 7604 jbe @F 3254 000013D6 8B97[6D08] mov dx, word [first_sector_buffer + bsBPB + bx + 2] 3255 @@: 3256 000013DA E83E13 call decdword 3257 000013DD 8B5408 mov dx, word [si + giName] 3258 000013E0 E8D012 call disp_msg_asciz 3259 000013E3 BA[823E] mov dx, msg.comma 3260 000013E6 83C60A add si, GINFO_size 3261 000013E9 81FE[2C2A] cmp si, g_table_end 3262 000013ED 72D3 jb .loop_display 3263 000013EF BA[7F3E] mov dx, msg.linebreak 3264 000013F2 E8BE12 call disp_msg_asciz 3265 3266 000013F5 BE[0E2A] mov si, g_table 3267 .loop_check: 3268 000013F8 D004 rol byte [si + giAuto], 1 3269 000013FA 720B jc .auto 3270 000013FC 83C60A add si, GINFO_size 3271 000013FF 81FE[2C2A] cmp si, g_table_end 3272 00001403 72F3 jb .loop_check 3273 00001405 EB6B jmp .no_auto 3274 3275 .auto: 3276 00001407 833E[3808]00 cmp word [cmd_line_image_file.name], 0 3277 0000140C 7409 je @F 3278 0000140E BA[753A] mov dx, msg.g_no_auto_image 3279 00001411 E89F12 call disp_msg_asciz 3280 00001414 E99502 jmp exit_error 3281 3282 @@: 3283 00001417 B80D44 mov ax, 440Dh 3284 0000141A 8A1E[EE29] mov bl, byte [drivenumber] 3285 0000141E 43 inc bx 3286 0000141F B96008 mov cx, 0860h 3287 00001422 807EE610 cmp byte [bp + ldFATType], 16 3288 00001426 7602 jbe @F 3289 00001428 B548 mov ch, 48h 3290 @@: 3291 0000142A 83EC5A sub sp, 5Ch - 2 3292 0000142D BA0400 mov dx, 4 ; init "special functions" 3293 00001430 52 push dx 3294 00001431 89E2 mov dx, sp 3295 00001433 F9 stc 3296 00001434 CD21 int 21h 3297 00001436 7309 jnc @F 3298 00001438 BA[4D3A] mov dx, msg.g_auto_failed 3299 0000143B E87512 call disp_msg_asciz 3300 0000143E E96B02 jmp exit_error 3301 3302 @@: 3303 00001441 89E7 mov di, sp 3304 00001443 83C707 add di, 7 3305 3306 .loop_auto: 3307 00001446 D004 rol byte [si + giAuto], 1 3308 00001448 731C jnc .skip_auto 3309 3310 0000144A 31DB xor bx, bx 3311 0000144C 8A5C07 mov bl, byte [si + giOffset] 3312 0000144F 31D2 xor dx, dx 3313 00001451 8B01 mov ax, word [di + bx] 3314 00001453 807C0602 cmp byte [si + giLength], 2 3315 00001457 7603 jbe @F 3316 00001459 8B5102 mov dx, word [di + bx + 2] 3317 @@: 3318 0000145C 895404 mov word [si + giValue + 2], dx 3319 0000145F 894402 mov word [si + giValue], ax 3320 00001462 C64401FF mov byte [si + giSingle], 0FFh 3321 3322 .skip_auto: 3323 00001466 83C60A add si, GINFO_size 3324 00001469 81FE[2C2A] cmp si, g_table_end 3325 0000146D 72D7 jb .loop_auto 3326 0000146F 83C45C add sp, 5Ch 3327 3328 .no_auto: 3329 00001472 BE[0E2A] mov si, g_table 3330 00001475 BA[993E] mov dx, msg.g_updated 3331 .loop_update: 3332 00001478 D04401 rol byte [si + giSingle], 1 3333 0000147B 7328 jnc .no_update 3334 0000147D E83312 call disp_msg_asciz 3335 00001480 31DB xor bx, bx 3336 00001482 8A5C07 mov bl, byte [si + giOffset] 3337 00001485 8B5404 mov dx, word [si + giValue + 2] 3338 00001488 8B4402 mov ax, word [si + giValue] 3339 0000148B 8987[6B08] mov word [first_sector_buffer + bsBPB + bx], ax 3340 0000148F 807C0602 cmp byte [si + giLength], 2 3341 00001493 7604 jbe @F 3342 00001495 8997[6D08] mov word [first_sector_buffer + bsBPB + bx + 2], dx 3343 @@: 3344 00001499 E87F12 call decdword 3345 0000149C 8B5408 mov dx, word [si + giName] 3346 0000149F E81112 call disp_msg_asciz 3347 000014A2 BA[823E] mov dx, msg.comma 3348 .no_update: 3349 000014A5 83C60A add si, GINFO_size 3350 000014A8 81FE[2C2A] cmp si, g_table_end 3351 000014AC 72CA jb .loop_update 3352 000014AE 81FA[823E] cmp dx, msg.comma 3353 000014B2 7506 jne @F 3354 000014B4 BA[7F3E] mov dx, msg.linebreak 3355 000014B7 E8F911 call disp_msg_asciz 3356 @@: 3357 3358 3359 validate_fsinfo: 3360 000014BA F646E702 test byte [bp + ldHasLBA], 2 3361 000014BE 7458 jz .no_fsinfo 3362 3363 000014C0 BF[600A] mov di, first_sector_buffer + 512 3364 000014C3 BA[AF44] mov dx, msg.info_valid 3365 3366 000014C6 813D5252 cmp word [di + FSINFO.signature1], FSINFO.signature1_value & 0FFFFh 3367 000014CA 7526 jne @F 3368 000014CC 817D026141 cmp word [di + FSINFO.signature1 + 2], FSINFO.signature1_value >> 16 3369 000014D1 751F jne @F 3370 000014D3 81BDE4017272 cmp word [di + FSINFO.signature2], FSINFO.signature2_value & 0FFFFh 3371 000014D9 7517 jne @F 3372 000014DB 81BDE6014161 cmp word [di + FSINFO.signature2 + 2], FSINFO.signature2_value >> 16 3373 000014E1 750F jne @F 3374 000014E3 83BDFC0100 cmp word [di + FSINFO.signature3], FSINFO.signature3_value & 0FFFFh 3375 000014E8 7508 jne @F 3376 000014EA 81BDFE0155AA cmp word [di + FSINFO.signature3 + 2], FSINFO.signature3_value >> 16 3377 000014F0 7423 je .end 3378 3379 @@: 3380 000014F2 BA[D044] mov dx, msg.info_invalid_allowing 3381 000014F5 F606[2108]08 testopt [cmd_line_flags], clfAllowInvalidInfo 3382 000014FA 7519 jnz .end 3383 3384 000014FC BA[FD44] mov dx, msg.info_invalid_resetting 3385 000014FF BE[F029] mov si, info_reset_struc 3386 00001502 B90200 mov cx, info_reset_struc.signature1_size >> 1 3387 00001505 F3A5 rep movsw 3388 00001507 B106 mov cl, info_reset_struc.signature2_plus_entries_size >> 1 3389 00001509 BF[440C] mov di, first_sector_buffer + 512 + FSINFO.signature2 3390 0000150C F3A5 rep movsw 3391 0000150E B102 mov cl, info_reset_struc.signature3_size >> 1 3392 00001510 BF[5C0C] mov di, first_sector_buffer + 512 + FSINFO.signature3 3393 00001513 F3A5 rep movsw 3394 3395 .end: 3396 00001515 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. 3405 00001518 F646E702 test byte [bp + ldHasLBA], 2 3406 0000151C 7503E9CA00 jz .no_fsinfo 3407 00001521 F606[2008]08 testopt [cmd_line_flags], clfDontWriteInfo 3408 00001526 7408 jz .write_fsinfo 3409 3410 00001528 BA[2145] mov dx, msg.info_writing_not 3411 0000152B E88511 call disp_msg_asciz 3412 3413 0000152E EB47 jmp .write_info_copy_if_forced 3414 3415 3416 .write_fsinfo: 3417 00001530 F606[2008]40 testopt [cmd_line_flags], clfWriteInfoToSectorFile 3418 00001535 741D jz .not_info_to_sector_file 3419 3420 00001537 BA[3745] mov dx, msg.info_writing_sector_file 3421 0000153A E87611 call disp_msg_asciz 3422 0000153D BF[3008] mov di, cmd_line_sector_file 3423 00001540 E88201 call open_file_write 3424 00001543 7303E96401 jc exit_error 3425 3426 00001548 B80042 mov ax, 4200h 3427 0000154B 31C9 xor cx, cx 3428 0000154D BA0002 mov dx, 512 ; seek offset 512 3429 00001550 CD21 int 21h 3430 3431 00001552 EB18 jmp @F 3432 3433 3434 .not_info_to_sector_file: 3435 00001554 F606[2008]10 testopt [cmd_line_flags], clfWriteInfoToFile 3436 00001559 7425 jz .not_info_to_file 3437 3438 0000155B BA[5D45] mov dx, msg.info_writing_file 3439 0000155E E85211 call disp_msg_asciz 3440 00001561 BF[3408] mov di, cmd_line_info_file 3441 00001564 E85E01 call open_file_write 3442 00001567 7303E94001 jc exit_error 3443 3444 @@: 3445 0000156C BA[600A] mov dx, first_sector_buffer + 512 3446 0000156F E85E02 call write_file_ae_512_bytes 3447 00001572 7303E93501 jc exit_error 3448 3449 .write_info_copy_if_forced: 3450 00001577 F606[2108]40 testopt [cmd_line_flags], clfWriteCopyInfo 3451 0000157C 7460 jz .not_writing_fsinfo_copy 3452 0000157E EB21 jmp .write_copy_info 3453 3454 3455 .not_info_to_file: 3456 00001580 BA[7745] mov dx, msg.info_writing_sector 3457 00001583 E82D11 call disp_msg_asciz 3458 00001586 BB[600A] mov bx, first_sector_buffer + 512 3459 00001589 8B4630 mov ax, word [bp + bsBPB + ebpbFSINFOSector] 3460 0000158C 31D2 xor dx, dx 3461 0000158E 8A0E[EE29] mov cl, [drivenumber] 3462 00001592 E8CC13 call write_ae_512_bytes 3463 00001595 7303E91201 jc exit_error 3464 0000159A F606[2108]C0 testopt [cmd_line_flags], clfWriteCopyInfo | clfWriteCopyInfoIfSector 3465 0000159F 743D jz .not_writing_fsinfo_copy 3466 3467 .write_copy_info: 3468 000015A1 F606[D829]20 testopt [internalflags], detectedcopyinfo 3469 000015A6 7443 jz .no_fsinfo 3470 3471 000015A8 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 3472 000015AB 034630 add ax, word [bp + bsBPB + ebpbFSINFOSector] 3473 000015AE BA[AA46] mov dx, msg.backup_writing_info 3474 000015B1 E8FF10 call disp_msg_asciz 3475 3476 ; Invalidate FSINFO entries. 3477 000015B4 830E[480C]FF or word [first_sector_buffer + 512 + FSINFO.numberfree], -1 3478 000015B9 830E[4A0C]FF or word [first_sector_buffer + 512 + FSINFO.numberfree + 2], -1 3479 000015BE 830E[4C0C]FF or word [first_sector_buffer + 512 + FSINFO.nextfree], -1 3480 000015C3 830E[4E0C]FF or word [first_sector_buffer + 512 + FSINFO.nextfree + 2], -1 3481 3482 000015C8 BB[600A] mov bx, first_sector_buffer + 512 3483 000015CB 31D2 xor dx, dx 3484 000015CD 8A0E[EE29] mov cl, [drivenumber] 3485 000015D1 E88D13 call write_ae_512_bytes 3486 000015D4 7315 jnc .no_fsinfo 3487 000015D6 BA[4C47] mov dx, msg.backup_error_info 3488 000015D9 E8D710 call disp_msg_asciz 3489 000015DC EB0D jmp .no_fsinfo 3490 3491 .not_writing_fsinfo_copy: 3492 000015DE F606[D829]20 testopt [internalflags], detectedcopyinfo 3493 000015E3 7406 jz .no_fsinfo 3494 000015E5 BA[F546] mov dx, msg.backup_not_writing_info 3495 @@: 3496 000015E8 E8C810 call disp_msg_asciz 3497 3498 .no_fsinfo: 3499 3500 3501 000015EB F606[2008]04 testopt [cmd_line_flags], clfDontWriteSector 3502 000015F0 7408 jz .write_sector 3503 3504 000015F2 BA[9345] mov dx, msg.sector_writing_not 3505 000015F5 E8BB10 call disp_msg_asciz 3506 000015F8 EB26 jmp .write_sector_copy_if_forced 3507 3508 .write_sector: 3509 000015FA F606[2008]01 testopt [cmd_line_flags], clfWriteSectorToFile 3510 000015FF 7428 jz .not_sector_to_file 3511 3512 00001601 BA[AE45] mov dx, msg.sector_writing_file 3513 00001604 E8AC10 call disp_msg_asciz 3514 00001607 BF[3008] mov di, cmd_line_sector_file 3515 0000160A E8B800 call open_file_write 3516 0000160D 726C jc exit_error_restore_fsinfo 3517 3518 0000160F B80042 mov ax, 4200h ; seek from start of file 3519 00001612 31C9 xor cx, cx 3520 00001614 31D2 xor dx, dx ; seek offset 0 3521 00001616 CD21 int 21h ; seek to start of file 3522 3523 00001618 BA[6008] mov dx, first_sector_buffer 3524 ; -> buffer 3525 0000161B E8B201 call write_file_ae_512_bytes 3526 0000161E 725B jc exit_error_restore_fsinfo 3527 3528 .write_sector_copy_if_forced: 3529 00001620 F606[2108]10 testopt [cmd_line_flags], clfWriteCopySector 3530 00001625 7445 jz .not_writing_sector_copy 3531 00001627 EB1D jmp .write_copy_sector 3532 3533 3534 .not_sector_to_file: 3535 00001629 BA[CD45] mov dx, msg.sector_writing_sector 3536 0000162C E88410 call disp_msg_asciz 3537 0000162F BB[6008] mov bx, first_sector_buffer 3538 00001632 31C0 xor ax, ax 3539 00001634 31D2 xor dx, dx 3540 00001636 8A0E[EE29] mov cl, [drivenumber] 3541 ; If sector size is >= 1 KiB, this writes both sectors for 3542 ; the FAT32 two-sector case. 3543 0000163A E82413 call write_ae_512_bytes 3544 0000163D 723C jc exit_error_restore_fsinfo 3545 3546 0000163F F606[2108]30 testopt [cmd_line_flags], clfWriteCopySector | clfWriteCopySectorIfSector 3547 00001644 7426 jz .not_writing_sector_copy 3548 3549 .write_copy_sector: 3550 00001646 F606[D829]10 testopt [internalflags], detectedcopysector 3551 0000164B 746A jz exit_normal 3552 3553 0000164D BA[8446] mov dx, msg.backup_writing_sector 3554 00001650 E86010 call disp_msg_asciz 3555 3556 00001653 BB[6008] mov bx, first_sector_buffer 3557 00001656 31D2 xor dx, dx 3558 00001658 8B4632 mov ax, word [bp + bsBPB + ebpbBackupSector] 3559 0000165B 8A0E[EE29] mov cl, [drivenumber] 3560 0000165F E8FF12 call write_ae_512_bytes 3561 00001662 7353 jnc exit_normal 3562 00001664 BA[1A47] mov dx, msg.backup_error_sector 3563 00001667 E84910 call disp_msg_asciz 3564 0000166A EB4B jmp exit_normal 3565 3566 .not_writing_sector_copy: 3567 0000166C F606[D829]10 testopt [internalflags], detectedcopysector 3568 00001671 7444 jz exit_normal 3569 00001673 BA[CB46] mov dx, msg.backup_not_writing_sector 3570 00001676 E83A10 call disp_msg_asciz 3571 00001679 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. 3577 0000167B F646E702 test byte [bp + ldHasLBA], 2 3578 0000167F 742B jz @F 3579 ; If haven't written, do not restore. 3580 00001681 F606[2008]08 testopt [cmd_line_flags], clfDontWriteInfo 3581 00001686 7524 jnz @F 3582 ; If have written to a file, do not restore. 3583 00001688 F606[2008]50 testopt [cmd_line_flags], clfWriteInfoToFile | clfWriteInfoToSectorFile 3584 0000168D 751D jnz @F 3585 3586 0000168F BA[EE45] mov dx, msg.info_restoring_sector 3587 00001692 E81E10 call disp_msg_asciz 3588 3589 00001695 BB[A02A] mov bx, second_sector_buffer + 512 3590 00001698 8B4630 mov ax, word [bp + bsBPB + ebpbFSINFOSector] 3591 0000169B 31D2 xor dx, dx 3592 0000169D 8A0E[EE29] mov cl, [drivenumber] 3593 000016A1 E8BD12 call write_ae_512_bytes 3594 000016A4 7306 jnc @F 3595 3596 000016A6 BA[013C] mov dx, msg.critical_fail_fsinfo_changed 3597 000016A9 E80710 call disp_msg_asciz 3598 @@: 3599 3600 3601 exit_error: 3602 000016AC E8F20F call restorestate 3603 000016AF B8014C mov ax, 4C01h 3604 000016B2 CD21 int 21h 3605 3606 3607 exit_normal_message: 3608 000016B4 E8FC0F call disp_msg_asciz 3609 3610 exit_normal: 3611 000016B7 E8E70F call restorestate 3612 000016BA B8004C mov ax, 4C00h 3613 000016BD 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: 3625 000016BF B002 mov al, 2 3626 000016C1 A9 db __TEST_IMM16 ; (skip mov al) 3627 open_file_read: 3628 000016C2 B000 mov al, 0 3629 000016C4 A9 db __TEST_IMM16 ; (skip mov al) 3630 open_file_write: 3631 000016C5 B001 mov al, 1 3632 lframe near 3633 000016C7 5589E5 lenter 3634 lvar word, bit0_wo_bit1_rw 3635 000016CA 50 push ax 3636 3637 ; Is it already open ? 3638 000016CB 8B5D02 mov bx, word [di + cmd_line_file_handle_ofs] 3639 000016CE 83FBFF cmp bx, -1 3640 000016D1 7405 je @F 3641 000016D3 F8 clc 3642 .return: 3643 000016D4 89EC5D lleave code 3644 000016D7 C3 retn 3645 3646 @@: 3647 3648 000016D8 E8A900 call .setup_opencreate ; ds:si -> pathname 3649 000016DB B86C71 mov ax, 716Ch ; LFN open-create 3650 000016DE 57 push di 3651 000016DF 31FF xor di, di ; alias hint 3652 000016E1 F9 stc 3653 000016E2 CD21 int 21h 3654 000016E4 5F pop di 3655 000016E5 7378 jnc .got ; LFN call succeeded --> 3656 3657 ; Early case for no-LFN-interface available. 3658 ; cmp ax, 1 3659 ; je .try_sfn 3660 000016E7 3D0071 cmp ax, 7100h 3661 000016EA 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 3684 000016EC 1E push ds 3685 000016ED 06 push es 3686 000016EE 57 push di 3687 000016EF 50 push ax 3688 lframe none, nested 3689 lvar 34, fstype_buffer 3690 lvar 4, pathname_buffer 3691 000016F0 5589E58D66DA lenter 3692 3693 000016F6 AD lodsw ; load first two bytes of pathname 3694 3695 000016F7 16 push ss 3696 000016F8 1F pop ds 3697 000016F9 89E2 mov dx, sp ; ds:dx -> ?pathname_buffer 3698 000016FB 16 push ss 3699 000016FC 07 pop es 3700 000016FD 89E7 mov di, sp ; es:di -> ?pathname_buffer 3701 3702 000016FF 80FC3A cmp ah, ':' ; starts with drive specifier ? 3703 00001702 7408 je @F ; yes --> 3704 3705 00001704 B419 mov ah, 19h 3706 00001706 CD21 int 21h ; get current default drive 3707 00001708 0441 add al, 'A' ; A: = 0, convert to drive letter 3708 0000170A B43A mov ah, ':' ; drive specifier 3709 @@: 3710 0000170C AB stosw 3711 0000170D B85C00 mov ax, '\' ; backslash and zero terminator 3712 00001710 AB stosw ; es:di -> ?fstype_buffer 3713 3714 00001711 31C0 xor ax, ax 3715 00001713 B91100 mov cx, 34 >> 1 3716 00001716 57 push di 3717 00001717 F3AB rep stosw ; initialise ?fstype_buffer to all zeros 3718 00001719 5F pop di ; -> ?fstype_buffer 3719 3720 0000171A B92000 mov cx, 32 ; size of ?fstype_buffer 3721 0000171D 31DB xor bx, bx ; harden, initialise this 3722 0000171F B8A071 mov ax, 71A0h ; get volume information 3723 00001722 F9 stc 3724 00001723 CD21 int 21h 3725 3726 00001725 7207 jc @F ; if call not supported --> 3727 ; bx = FS flags 3728 00001727 F6C740 test bh, 0100_0000b ; LFN interface available ? 3729 0000172A F9 stc ; if no 3730 0000172B 7401 jz @F ; no --> 3731 3732 0000172D F8 clc ; is available 3733 @@: 3734 3735 0000172E 89EC5D lleave 3736 00001731 58 pop ax ; (restore error code) 3737 00001732 5F pop di 3738 00001733 07 pop es 3739 00001734 1F pop ds 3740 00001735 7331 jnc .error ; if LFN interface is available, actual error 3741 ; if LFN interface is not available, try SFN 3742 3743 .try_sfn: 3744 00001737 E84A00 call .setup_opencreate 3745 0000173A B8006C mov ax, 6C00h ; Open-create 3746 0000173D F9 stc 3747 0000173E CD21 int 21h 3748 00001740 731D jnc .got 3749 3750 00001742 83F801 cmp ax, 1 3751 00001745 7405 je .try_old_open_or_create 3752 00001747 3D006C cmp ax, 6C00h 3753 0000174A 751C jne .error 3754 3755 .try_old_open_or_create: 3756 0000174C B43C mov ah, 3Ch ; Create (Create/Truncate) 3757 0000174E F646FE01 test byte [bp + ?bit0_wo_bit1_rw], 1 3758 00001752 7504 jnz @F ; setup for write --> 3759 00001754 88D8 mov al, bl 3760 00001756 B43D mov ah, 3Dh ; Open 3761 @@: 3762 00001758 89F2 mov dx, si ; -> filename 3763 ; cx = create attribute 3764 0000175A F9 stc 3765 0000175B CD21 int 21h 3766 0000175D 7209 jc .error 3767 3768 .got: 3769 0000175F 89C3 mov bx, ax 3770 00001761 895D02 mov word [di + cmd_line_file_handle_ofs], bx 3771 00001764 F8 clc 3772 00001765 E96CFF jmp .return 3773 3774 .error: 3775 00001768 BA[FD48] mov dx, msg.error_file_open_write 3776 0000176B F646FE01 test byte [bp + ?bit0_wo_bit1_rw], 1 3777 0000176F 750C jnz @F ; setup for write --> 3778 00001771 BA[3F49] mov dx, msg.error_file_open_readwrite 3779 00001774 F646FE02 test byte [bp + ?bit0_wo_bit1_rw], 2 3780 00001778 7503 jnz @F ; setup for rw --> 3781 0000177A BA[1E49] mov dx, msg.error_file_open_read 3782 @@: 3783 0000177D E82500 call disp_dos_error 3784 00001780 F9 stc 3785 00001781 E950FF jmp .return 3786 3787 .setup_opencreate: 3788 00001784 8B35 mov si, word [di + cmd_line_file_name_ofs] 3789 ; -> filename 3790 00001786 31C9 xor cx, cx ; create attribute 3791 00001788 F646FE01 test byte [bp + ?bit0_wo_bit1_rw], 1 3792 0000178C 750D jnz @F ; setup for write --> 3793 0000178E BB2060 mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 3794 ; DENY WRITE, Read-only 3795 00001791 BA0100 mov dx, 0000_0000_0000_0001b ; open 3796 00001794 F646FE02 test byte [bp + ?bit0_wo_bit1_rw], 2 3797 00001798 7508 jnz @FF ; setup for rw --> 3798 0000179A C3 retn 3799 3800 @@: 3801 0000179B BB2160 mov bx, 0110_0000_0010_0001b ; Auto-commit, no int 24h 3802 ; DENY WRITE, Write-only 3803 0000179E BA1200 mov dx, 0000_0000_0001_0010b ; create / open-truncate 3804 000017A1 C3 retn 3805 3806 @@: 3807 000017A2 B322 mov bl, 0010_0010b ; DENY WRITE, Read-write 3808 000017A4 C3 retn 3809 3810 lleave ctx 3811 3812 3813 disp_dos_error: 3814 000017A5 E80B0F call disp_msg_asciz 3815 000017A8 BA[9B49] mov dx, msg.dos_error_msg_1 3816 000017AB E8050F call disp_msg_asciz 3817 000017AE E83A0F call disp_ax_hex 3818 000017B1 BA[A649] mov dx, msg.dos_error_msg_2 3819 000017B4 E8FC0E call disp_msg_asciz 3820 000017B7 BA[624C] mov dx, msg.dos_error_unknown 3821 000017BA 83F828 cmp ax, dos_error_table.after_last 3822 000017BD 7308 jae @F 3823 000017BF 89C3 mov bx, ax 3824 000017C1 D1E3 shl bx, 1 3825 000017C3 8B97[704C] mov dx, word [dos_error_table + bx] 3826 @@: 3827 000017C7 E8E90E call disp_msg_asciz 3828 000017CA BA[AA49] mov dx, msg.dos_error_msg_3 3829 000017CD 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: 3837 000017D0 8B4EDC mov cx, word [bp + ldBytesPerSector] 3838 000017D3 81F90002 cmp cx, 512 ; more than 512 bytes ? 3839 000017D7 7703 ja @F ; yes --> 3840 000017D9 B90002 mov cx, 512 ; fix sector size 3841 @@: 3842 000017DC B440 mov ah, 40h 3843 000017DE CD21 int 21h ; write file 3844 000017E0 7207 jc @F 3845 000017E2 39C8 cmp ax, cx 3846 000017E4 B8FFFF mov ax, -1 3847 000017E7 7407 je @FF ; (NC) --> 3848 @@: 3849 000017E9 BA[5C49] mov dx, msg.error_file_write 3850 000017EC E8B6FF call disp_dos_error 3851 000017EF F9 stc 3852 @@: 3853 000017F0 C3 retn 3854 3855 3856 unit_search_strings: 3857 000017F1 BD007C .mov: mov bp, 7C00h 3858 .mov_length: equ $ - .mov 3859 000017F4 885624 .1612_set_bpbn: mov byte [bp + bsBPB + bpbNew + bpbnBootUnit], dl 3860 .1612_set_bpbn_length: equ $ - .1612_set_bpbn 3861 000017F7 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 3867 000017FA 885640 .32_set_bpbn: mov byte [bp + bsBPB + ebpbNew + bpbnBootUnit], dl 3868 .32_set_bpbn_length: equ $ - .32_set_bpbn 3869 000017FD 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: 3878 00001800 84D2 test dl, dl ; floppy ? 3879 00001802 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. 3882 00001804 380C cmp byte [si], cl ; flags for xx-00h (result is xx), SF = bit 7 3883 00001806 790D jns @F ; xx < 80h, ie info invalid --> 3884 ; byte[ds:si+4] is the file system type. Check for valid one. 3885 00001808 384C04 cmp byte [si+4], cl ; is it zero? 3886 0000180B 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. 3889 0000180D BF1C7C mov di, 7C00h + bsBPB + bpbHiddenSectors 3890 ; -> BPB field 3891 00001810 83C608 add si, 8 ; -> partition start sector in info 3892 00001813 A5 movsw 3893 00001814 A5 movsw ; overwrite BPB field with value from info 3894 @@: 3895 .mov_length: equ $ - .mov 3896 .keep: 3897 00001815 84D2 test dl, dl ; floppy ? 3898 00001817 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. 3901 00001819 380C cmp byte [si], cl ; flags for xx-00h (result is xx), SF = bit 7 3902 0000181B 790D jns @F ; xx < 80h, ie info invalid --> 3903 ; byte[ds:si+4] is the file system type. Check for valid one. 3904 0000181D 384C04 cmp byte [si+4], cl ; is it zero? 3905 00001820 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. 3908 00001822 BF1C7C mov di, 7C00h + bsBPB + bpbHiddenSectors 3909 ; -> BPB field 3910 00001825 83C608 add si, 8 ; -> partition start sector in info 3911 3912 ; Patched out movsw twice 3913 00001828 90 nop 3914 00001829 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) 3929 0000182A B408 mov ah, 08h 3930 ; xor cx, cx ; initialise cl to 0 3931 ; Already from prologue cx = 0. 3932 0000182C F9 stc ; initialise to CY 3933 0000182D CD13 int 13h ; query drive geometry 3934 0000182F 720E jc @F ; apparently failed --> 3935 00001831 83E13F and cx, 3Fh ; get sectors 3936 00001834 7409 jz @F ; invalid (S is 1-based), don't use --> 3937 00001836 894E18 mov [bp + bsBPB + bpbCHSSectors], cx 3938 00001839 88F1 mov cl, dh ; cx = maximum head number 3939 0000183B 41 inc cx ; cx = number of heads (H is 0-based) 3940 0000183C 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) 3949 0000183F B408 mov ah, 08h 3950 ; xor cx, cx ; initialise cl to 0 3951 ; Already from prologue cx = 0. 3952 00001841 F9 stc ; initialise to CY 3953 3954 ; Patched out int 13h 3955 00001842 90 nop 3956 00001843 90 nop 3957 3958 00001844 720E jc @F ; apparently failed --> 3959 00001846 83E13F and cx, 3Fh ; get sectors 3960 00001849 7409 jz @F ; invalid (S is 1-based), don't use --> 3961 0000184B 894E18 mov [bp + bsBPB + bpbCHSSectors], cx 3962 0000184E 88F1 mov cl, dh ; cx = maximum head number 3963 00001850 41 inc cx ; cx = number of heads (H is 0-based) 3964 00001851 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: 332 00001854 4175746F204C424120- <1> .auto: asciz "Auto LBA detection" 332 0000185D 646574656374696F6E- <1> 332 00001866 00 <1> 333 00001867 4175746F204C424120- <1> .autohdd: asciz "Auto LBA detection (HDD only)" 333 00001870 646574656374696F6E- <1> 333 00001879 2028484444206F6E6C- <1> 333 00001882 792900 <1> 334 00001885 4175746F204C424120- <1> .autoskip: asciz "Auto LBA detection (skip check)" 334 0000188E 646574656374696F6E- <1> 334 00001897 2028736B6970206368- <1> 334 000018A0 65636B2900 <1> 335 000018A5 466F72636564204348- <1> .forcechs: asciz "Forced CHS access" 335 000018AE 532061636365737300 <1> 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> 256 000018B7 B441 <2> mov ah, 41h 257 000018B9 BBAA55 <2> mov bx, 55AAh 258 000018BC 8A567F <2> 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 268 000018BF 84D2 <2> test dl, dl 269 000018C1 90 <2> nop 270 000018C2 90 <2> nop 271 <2> %endif 272 000018C3 CD13 <2> int 13h 273 000018C5 7215 <2> jc @F 274 000018C7 D1E9 <2> shr cx, 1 275 000018C9 81DB54AA <2> sbb bx, 0AA55h - 1 276 000018CD 750D <2> 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 289 000018CF 8D7680 <2> 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 291 000018D2 895E80 <2> 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 293 000018D5 895E80 <2> 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 296 000018D8 B442 <2> mov ah, 42h 297 000018DA EB00 <2> 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> 256 000018DC B441 <2> mov ah, 41h 257 000018DE BBAA55 <2> mov bx, 55AAh 258 000018E1 8A567F <2> 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 268 000018E4 84D2 <2> test dl, dl 269 000018E6 90 <2> nop 270 000018E7 90 <2> nop 271 <2> %endif 272 000018E8 CD13 <2> int 13h 273 000018EA 7218 <2> jc @F 274 000018EC D1E9 <2> shr cx, 1 275 000018EE 81DB54AA <2> sbb bx, 0AA55h - 1 276 000018F2 7510 <2> jne @F 277 <2> 278 <2> %if _OEM_BOOT 279 000018F4 8DB6FF03 <2> 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 282 000018F8 899EFF03 <2> 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 285 000018FC 899EFF03 <2> 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 296 00001900 B442 <2> mov ah, 42h 297 00001902 EB00 <2> 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 115 00001904 B441 <3> mov ah, 41h 116 00001906 8A567F <3> 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 118 00001909 BBAA55 <3> mov bx, 55AAh 119 0000190C F9 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 0000190D CD13 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 0000190F 7210 <3> 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 131 00001911 81FB55AA <3> cmp bx, 0AA55h 132 00001915 750A <3> 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 134 00001917 D0E9 <3> shr cl, 1 135 00001919 7306 <3> 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 172 0000191B B442 <3> mov ah, 42h 173 0000191D CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 0000191F 7200 <3> 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 00001921 8A567F <3> 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 172 00001924 B442 <3> mov ah, 42h 173 00001926 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001928 7200 <3> 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 0000192A 8A567F <3> 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 0000192D F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 0000192E B442 <3> mov ah, 42h 173 00001930 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001932 7200 <3> 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 115 00001934 B441 <3> mov ah, 41h 116 00001936 8A567F <3> 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 118 00001939 BBAA55 <3> mov bx, 55AAh 119 0000193C F9 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 0000193D CD13 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 0000193F 721A <3> 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 131 00001941 81FB55AA <3> cmp bx, 0AA55h 132 00001945 7514 <3> 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 134 00001947 D0E9 <3> shr cl, 1 135 00001949 7310 <3> 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 0000194B B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 0000194D CD13 <3> int 13h 149 <3> %endif 150 0000194F 730A <3> 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> 161 00001951 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001955 B442 <3> mov ah, 42h 173 00001957 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001959 7200 <3> 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 0000195B 8A567F <3> 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 0000195E B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001960 CD13 <3> int 13h 149 <3> %endif 150 00001962 730A <3> 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> 161 00001964 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001968 B442 <3> mov ah, 42h 173 0000196A CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 0000196C 7200 <3> 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 0000196E 8A567F <3> 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 00001971 F9 <3> stc 142 <3> %endif 143 00001972 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001974 CD13 <3> int 13h 149 <3> %endif 150 00001976 730B <3> 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> 161 00001978 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 0000197C F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 0000197D B442 <3> mov ah, 42h 173 0000197F CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001981 7200 <3> 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 00001983 B441 <3> mov ah, 41h 116 00001985 8A567F <3> 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 118 00001988 BBAA55 <3> mov bx, 55AAh 119 0000198B F9 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 0000198C CD13 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 0000198E 721E <3> 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 131 00001990 81FB55AA <3> cmp bx, 0AA55h 132 00001994 7518 <3> 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 134 00001996 D0E9 <3> shr cl, 1 135 00001998 7314 <3> 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 0000199A B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 0000199C CD13 <3> int 13h 149 <3> %endif 150 0000199E 730E <3> 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 000019A0 31C0 <3> xor ax, ax 155 000019A2 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 000019A4 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 000019A8 B442 <3> mov ah, 42h 173 000019AA CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 000019AC 7200 <3> 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 000019AE 8A567F <3> 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 000019B1 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 000019B3 CD13 <3> int 13h 149 <3> %endif 150 000019B5 730E <3> 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 000019B7 31C0 <3> xor ax, ax 155 000019B9 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 000019BB C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 000019BF B442 <3> mov ah, 42h 173 000019C1 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 000019C3 7200 <3> 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 000019C5 8A567F <3> 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 000019C8 F9 <3> stc 142 <3> %endif 143 000019C9 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 000019CB CD13 <3> int 13h 149 <3> %endif 150 000019CD 730F <3> 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 000019CF 31C0 <3> xor ax, ax 155 000019D1 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 000019D3 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 000019D7 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 000019D8 B442 <3> mov ah, 42h 173 000019DA CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 000019DC 7200 <3> 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 000019DE 1E <3> push ds 109 000019DF BB4000 <3> mov bx, 40h 110 000019E2 8EDB <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 000019E4 B441 <3> mov ah, 41h 116 000019E6 8A567F <3> 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 118 000019E9 BBAA55 <3> mov bx, 55AAh 119 000019EC F9 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 000019ED CD13 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 000019EF 1F <3> pop ds 128 <3> %endif 129 000019F0 7210 <3> 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 131 000019F2 81FB55AA <3> cmp bx, 0AA55h 132 000019F6 750A <3> 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 134 000019F8 D0E9 <3> shr cl, 1 135 000019FA 7306 <3> 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 172 000019FC B442 <3> mov ah, 42h 173 000019FE CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001A00 7200 <3> 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 108 00001A02 1E <3> push ds 109 00001A03 BB4000 <3> mov bx, 40h 110 00001A06 8EDB <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 00001A08 B441 <3> mov ah, 41h 116 00001A0A 8A567F <3> 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 118 00001A0D BBAA55 <3> mov bx, 55AAh 119 00001A10 F9 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 00001A11 CD13 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 00001A13 1F <3> pop ds 128 <3> %endif 129 00001A14 721A <3> 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 131 00001A16 81FB55AA <3> cmp bx, 0AA55h 132 00001A1A 7514 <3> 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 134 00001A1C D0E9 <3> shr cl, 1 135 00001A1E 7310 <3> 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 00001A20 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001A22 CD13 <3> int 13h 149 <3> %endif 150 00001A24 730A <3> 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> 161 00001A26 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001A2A B442 <3> mov ah, 42h 173 00001A2C CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001A2E 7200 <3> 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 00001A30 1E <3> push ds 109 00001A31 BB4000 <3> mov bx, 40h 110 00001A34 8EDB <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 00001A36 B441 <3> mov ah, 41h 116 00001A38 8A567F <3> 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 118 00001A3B BBAA55 <3> mov bx, 55AAh 119 00001A3E F9 <3> stc 120 <3> %if _FORCE_CHS 121 <3> nop 122 <3> nop 123 <3> %else 124 00001A3F CD13 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 00001A41 1F <3> pop ds 128 <3> %endif 129 00001A42 721E <3> 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 131 00001A44 81FB55AA <3> cmp bx, 0AA55h 132 00001A48 7518 <3> 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 134 00001A4A D0E9 <3> shr cl, 1 135 00001A4C 7314 <3> 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 00001A4E B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001A50 CD13 <3> int 13h 149 <3> %endif 150 00001A52 730E <3> 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 00001A54 31C0 <3> xor ax, ax 155 00001A56 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001A58 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001A5C B442 <3> mov ah, 42h 173 00001A5E CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001A60 7200 <3> 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 00001A62 8A567F <3> 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 172 00001A65 B442 <3> mov ah, 42h 173 00001A67 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001A69 7305 <3> 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 183 00001A6B 80FC01 <3> cmp ah, 1 184 00001A6E 7400 <3> 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 00001A70 8A567F <3> 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 00001A73 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001A74 B442 <3> mov ah, 42h 173 00001A76 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001A78 7305 <3> 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 183 00001A7A 80FC01 <3> cmp ah, 1 184 00001A7D 7400 <3> 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 00001A7F 8A567F <3> 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 00001A82 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001A84 CD13 <3> int 13h 149 <3> %endif 150 00001A86 730F <3> 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> 161 00001A88 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001A8C B442 <3> mov ah, 42h 173 00001A8E CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001A90 7305 <3> 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 183 00001A92 80FC01 <3> cmp ah, 1 184 00001A95 7400 <3> 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 00001A97 8A567F <3> 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 00001A9A F9 <3> stc 142 <3> %endif 143 00001A9B B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001A9D CD13 <3> int 13h 149 <3> %endif 150 00001A9F 7310 <3> 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> 161 00001AA1 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 00001AA5 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001AA6 B442 <3> mov ah, 42h 173 00001AA8 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001AAA 7305 <3> 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 183 00001AAC 80FC01 <3> cmp ah, 1 184 00001AAF 7400 <3> 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 00001AB1 8A567F <3> 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 00001AB4 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001AB6 CD13 <3> int 13h 149 <3> %endif 150 00001AB8 7313 <3> 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 00001ABA 31C0 <3> xor ax, ax 155 00001ABC CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001ABE C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001AC2 B442 <3> mov ah, 42h 173 00001AC4 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001AC6 7305 <3> 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 183 00001AC8 80FC01 <3> cmp ah, 1 184 00001ACB 7400 <3> 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 00001ACD 8A567F <3> 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 00001AD0 F9 <3> stc 142 <3> %endif 143 00001AD1 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 <3> nop 146 <3> stc 147 <3> %else 148 00001AD3 CD13 <3> int 13h 149 <3> %endif 150 00001AD5 7314 <3> 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 00001AD7 31C0 <3> xor ax, ax 155 00001AD9 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001ADB C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 00001ADF F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 <3> mov ah, 01h 169 <3> nop 170 <3> stc 171 <3> %else 172 00001AE0 B442 <3> mov ah, 42h 173 00001AE2 CD13 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001AE4 7305 <3> 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 183 00001AE6 80FC01 <3> cmp ah, 1 184 00001AE9 7400 <3> 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> 256 00001AEB B441 <3> mov ah, 41h 257 00001AED BBAA55 <3> mov bx, 55AAh 258 00001AF0 8A567F <3> 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 262 00001AF3 30D2 <3> xor dl, dl 263 00001AF5 7419 <3> 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 272 00001AF7 CD13 <3> int 13h 273 00001AF9 7215 <3> jc @F 274 00001AFB D1E9 <3> shr cx, 1 275 00001AFD 81DB54AA <3> sbb bx, 0AA55h - 1 276 00001B01 750D <3> 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 289 00001B03 8D7680 <3> 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 291 00001B06 895E80 <3> 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 293 00001B09 895E80 <3> 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 296 00001B0C B442 <3> mov ah, 42h 297 00001B0E EB00 <3> 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> 256 00001B10 B441 <3> mov ah, 41h 257 00001B12 BBAA55 <3> mov bx, 55AAh 258 00001B15 8A567F <3> 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 262 00001B18 30D2 <3> xor dl, dl 263 00001B1A 741C <3> 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 272 00001B1C CD13 <3> int 13h 273 00001B1E 7218 <3> jc @F 274 00001B20 D1E9 <3> shr cx, 1 275 00001B22 81DB54AA <3> sbb bx, 0AA55h - 1 276 00001B26 7510 <3> jne @F 277 <3> 278 <3> %if _OEM_BOOT 279 00001B28 8DB6FF03 <3> 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 282 00001B2C 899EFF03 <3> 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 285 00001B30 899EFF03 <3> 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 296 00001B34 B442 <3> mov ah, 42h 297 00001B36 EB00 <3> 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 115 00001B38 B441 <3> mov ah, 41h 116 00001B3A 8A567F <3> 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 118 00001B3D BBAA55 <3> mov bx, 55AAh 119 00001B40 F9 <3> stc 120 <3> %if _FORCE_CHS 121 00001B41 90 <3> nop 122 00001B42 90 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 00001B43 7210 <3> 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 131 00001B45 81FB55AA <3> cmp bx, 0AA55h 132 00001B49 750A <3> 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 134 00001B4B D0E9 <3> shr cl, 1 135 00001B4D 7306 <3> 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 00001B4F B401 <3> mov ah, 01h 169 00001B51 90 <3> nop 170 00001B52 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001B53 7200 <3> 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 00001B55 8A567F <3> 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 00001B58 B401 <3> mov ah, 01h 169 00001B5A 90 <3> nop 170 00001B5B F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001B5C 7200 <3> 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 00001B5E 8A567F <3> 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 00001B61 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001B62 B401 <3> mov ah, 01h 169 00001B64 90 <3> nop 170 00001B65 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001B66 7200 <3> 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 115 00001B68 B441 <3> mov ah, 41h 116 00001B6A 8A567F <3> 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 118 00001B6D BBAA55 <3> mov bx, 55AAh 119 00001B70 F9 <3> stc 120 <3> %if _FORCE_CHS 121 00001B71 90 <3> nop 122 00001B72 90 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 00001B73 721A <3> 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 131 00001B75 81FB55AA <3> cmp bx, 0AA55h 132 00001B79 7514 <3> 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 134 00001B7B D0E9 <3> shr cl, 1 135 00001B7D 7310 <3> 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 00001B7F B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001B81 90 <3> nop 146 00001B82 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001B83 730A <3> 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> 161 00001B85 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001B89 B401 <3> mov ah, 01h 169 00001B8B 90 <3> nop 170 00001B8C F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001B8D 7200 <3> 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 00001B8F 8A567F <3> 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 00001B92 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001B94 90 <3> nop 146 00001B95 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001B96 730A <3> 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> 161 00001B98 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001B9C B401 <3> mov ah, 01h 169 00001B9E 90 <3> nop 170 00001B9F F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001BA0 7200 <3> 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 00001BA2 8A567F <3> 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 00001BA5 F9 <3> stc 142 <3> %endif 143 00001BA6 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001BA8 90 <3> nop 146 00001BA9 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001BAA 730B <3> 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> 161 00001BAC C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 00001BB0 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001BB1 B401 <3> mov ah, 01h 169 00001BB3 90 <3> nop 170 00001BB4 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001BB5 7200 <3> 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 00001BB7 B441 <3> mov ah, 41h 116 00001BB9 8A567F <3> 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 118 00001BBC BBAA55 <3> mov bx, 55AAh 119 00001BBF F9 <3> stc 120 <3> %if _FORCE_CHS 121 00001BC0 90 <3> nop 122 00001BC1 90 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 <3> pop ds 128 <3> %endif 129 00001BC2 721E <3> 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 131 00001BC4 81FB55AA <3> cmp bx, 0AA55h 132 00001BC8 7518 <3> 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 134 00001BCA D0E9 <3> shr cl, 1 135 00001BCC 7314 <3> 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 00001BCE B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001BD0 90 <3> nop 146 00001BD1 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001BD2 730E <3> 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 00001BD4 31C0 <3> xor ax, ax 155 00001BD6 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001BD8 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001BDC B401 <3> mov ah, 01h 169 00001BDE 90 <3> nop 170 00001BDF F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001BE0 7200 <3> 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 00001BE2 8A567F <3> 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 00001BE5 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001BE7 90 <3> nop 146 00001BE8 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001BE9 730E <3> 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 00001BEB 31C0 <3> xor ax, ax 155 00001BED CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001BEF C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001BF3 B401 <3> mov ah, 01h 169 00001BF5 90 <3> nop 170 00001BF6 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001BF7 7200 <3> 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 00001BF9 8A567F <3> 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 00001BFC F9 <3> stc 142 <3> %endif 143 00001BFD B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001BFF 90 <3> nop 146 00001C00 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001C01 730F <3> 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 00001C03 31C0 <3> xor ax, ax 155 00001C05 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001C07 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 00001C0B F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001C0C B401 <3> mov ah, 01h 169 00001C0E 90 <3> nop 170 00001C0F F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 00001C10 7200 <3> 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 00001C12 1E <3> push ds 109 00001C13 BB4000 <3> mov bx, 40h 110 00001C16 8EDB <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 00001C18 B441 <3> mov ah, 41h 116 00001C1A 8A567F <3> 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 118 00001C1D BBAA55 <3> mov bx, 55AAh 119 00001C20 F9 <3> stc 120 <3> %if _FORCE_CHS 121 00001C21 90 <3> nop 122 00001C22 90 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 00001C23 1F <3> pop ds 128 <3> %endif 129 00001C24 7210 <3> 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 131 00001C26 81FB55AA <3> cmp bx, 0AA55h 132 00001C2A 750A <3> 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 134 00001C2C D0E9 <3> shr cl, 1 135 00001C2E 7306 <3> 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 00001C30 B401 <3> mov ah, 01h 169 00001C32 90 <3> nop 170 00001C33 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001C34 7200 <3> 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 108 00001C36 1E <3> push ds 109 00001C37 BB4000 <3> mov bx, 40h 110 00001C3A 8EDB <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 00001C3C B441 <3> mov ah, 41h 116 00001C3E 8A567F <3> 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 118 00001C41 BBAA55 <3> mov bx, 55AAh 119 00001C44 F9 <3> stc 120 <3> %if _FORCE_CHS 121 00001C45 90 <3> nop 122 00001C46 90 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 00001C47 1F <3> pop ds 128 <3> %endif 129 00001C48 721A <3> 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 131 00001C4A 81FB55AA <3> cmp bx, 0AA55h 132 00001C4E 7514 <3> 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 134 00001C50 D0E9 <3> shr cl, 1 135 00001C52 7310 <3> 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 00001C54 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001C56 90 <3> nop 146 00001C57 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001C58 730A <3> 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> 161 00001C5A C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001C5E B401 <3> mov ah, 01h 169 00001C60 90 <3> nop 170 00001C61 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001C62 7200 <3> 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 00001C64 1E <3> push ds 109 00001C65 BB4000 <3> mov bx, 40h 110 00001C68 8EDB <3> mov ds, bx 111 <3> 112 <3> 113 <3> 114 <3> %endif 115 00001C6A B441 <3> mov ah, 41h 116 00001C6C 8A567F <3> 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 118 00001C6F BBAA55 <3> mov bx, 55AAh 119 00001C72 F9 <3> stc 120 <3> %if _FORCE_CHS 121 00001C73 90 <3> nop 122 00001C74 90 <3> nop 123 <3> %else 124 <3> int 13h 125 <3> %endif 126 <3> %if _LBA_WORKAROUND 127 00001C75 1F <3> pop ds 128 <3> %endif 129 00001C76 721E <3> 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 131 00001C78 81FB55AA <3> cmp bx, 0AA55h 132 00001C7C 7518 <3> 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 134 00001C7E D0E9 <3> shr cl, 1 135 00001C80 7314 <3> 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 00001C82 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001C84 90 <3> nop 146 00001C85 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001C86 730E <3> 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 00001C88 31C0 <3> xor ax, ax 155 00001C8A CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001C8C C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001C90 B401 <3> mov ah, 01h 169 00001C92 90 <3> nop 170 00001C93 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 <3> jnc .lba_done 182 <3> search_wildcard %%start, -1 183 <3> cmp ah, 1 184 <3> je .no_lba 185 <3> search_wildcard %%start, -1 186 <3> %endif 187 <3> %else 188 <3> %if _LBA_SKIP_ANY 189 <3> jc .no_lba 190 <3> search_wildcard %%start, -1 191 <3> %else 192 <3> jc .lba_check_error_1 193 <3> search_wildcard %%start, -1 194 <3> %endif 195 <3> %endif 196 <3> %else 197 <3> .cy_err: 198 00001C94 7200 <3> 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 00001C96 8A567F <3> 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 00001C99 B401 <3> mov ah, 01h 169 00001C9B 90 <3> nop 170 00001C9C F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001C9D 7305 <3> 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 183 00001C9F 80FC01 <3> cmp ah, 1 184 00001CA2 7400 <3> 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 00001CA4 8A567F <3> 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 00001CA7 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001CA8 B401 <3> mov ah, 01h 169 00001CAA 90 <3> nop 170 00001CAB F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001CAC 7305 <3> 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 183 00001CAE 80FC01 <3> cmp ah, 1 184 00001CB1 7400 <3> 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 00001CB3 8A567F <3> 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 00001CB6 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001CB8 90 <3> nop 146 00001CB9 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001CBA 730F <3> 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> 161 00001CBC C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001CC0 B401 <3> mov ah, 01h 169 00001CC2 90 <3> nop 170 00001CC3 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001CC4 7305 <3> 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 183 00001CC6 80FC01 <3> cmp ah, 1 184 00001CC9 7400 <3> 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 00001CCB 8A567F <3> 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 00001CCE F9 <3> stc 142 <3> %endif 143 00001CCF B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001CD1 90 <3> nop 146 00001CD2 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001CD3 7310 <3> 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> 161 00001CD5 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 00001CD9 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001CDA B401 <3> mov ah, 01h 169 00001CDC 90 <3> nop 170 00001CDD F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001CDE 7305 <3> 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 183 00001CE0 80FC01 <3> cmp ah, 1 184 00001CE3 7400 <3> 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 00001CE5 8A567F <3> 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 00001CE8 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001CEA 90 <3> nop 146 00001CEB F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001CEC 7313 <3> 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 00001CEE 31C0 <3> xor ax, ax 155 00001CF0 CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001CF2 C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001CF6 B401 <3> mov ah, 01h 169 00001CF8 90 <3> nop 170 00001CF9 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001CFA 7305 <3> 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 183 00001CFC 80FC01 <3> cmp ah, 1 184 00001CFF 7400 <3> 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 00001D01 8A567F <3> 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 00001D04 F9 <3> stc 142 <3> %endif 143 00001D05 B442 <3> mov ah, 42h 144 <3> %if _FORCE_CHS 145 00001D07 90 <3> nop 146 00001D08 F9 <3> stc 147 <3> %else 148 <3> int 13h 149 <3> %endif 150 00001D09 7314 <3> 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 00001D0B 31C0 <3> xor ax, ax 155 00001D0D CD13 <3> int 13h 156 <3> %endif 157 <3> 158 <3> 159 <3> 160 <3> 161 00001D0F C6440201 <3> mov byte [si + 2], 1 162 <3> %endif 163 <3> 164 <3> %if _LBA_SKIP_CHECK && _LBA_SKIP_CY 165 00001D13 F9 <3> stc 166 <3> %endif 167 <3> %if _FORCE_CHS 168 00001D14 B401 <3> mov ah, 01h 169 00001D16 90 <3> nop 170 00001D17 F9 <3> stc 171 <3> %else 172 <3> mov ah, 42h 173 <3> int 13h 174 <3> %endif 175 <3> %if _LBA_SKIP_CHECK && _CHS 176 <3> %if _LDOSBOOT32 177 <3> %if _LBA_SKIP_ANY 178 <3> jc .no_lba 179 <3> search_wildcard %%start, -1 180 <3> %else 181 00001D18 7305 <3> 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 183 00001D1A 80FC01 <3> cmp ah, 1 184 00001D1D 7400 <3> 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> 256 00001D1F B441 <2> mov ah, 41h 257 00001D21 BBAA55 <2> mov bx, 55AAh 258 00001D24 8A567F <2> 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 00001D27 84D2 <2> test dl, dl 266 00001D29 7419 <2> jz @F 267 <2> %else 268 <2> test dl, dl 269 <2> nop 270 <2> nop 271 <2> %endif 272 00001D2B CD13 <2> int 13h 273 00001D2D 7215 <2> jc @F 274 00001D2F D1E9 <2> shr cx, 1 275 00001D31 81DB54AA <2> sbb bx, 0AA55h - 1 276 00001D35 750D <2> 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 289 00001D37 8D7680 <2> 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 291 00001D3A 895E80 <2> 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 293 00001D3D 895E80 <2> 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 296 00001D40 B442 <2> mov ah, 42h 297 00001D42 EB00 <2> 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> 256 00001D44 B441 <2> mov ah, 41h 257 00001D46 BBAA55 <2> mov bx, 55AAh 258 00001D49 8A567F <2> 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 00001D4C 84D2 <2> test dl, dl 266 00001D4E 741C <2> jz @F 267 <2> %else 268 <2> test dl, dl 269 <2> nop 270 <2> nop 271 <2> %endif 272 00001D50 CD13 <2> int 13h 273 00001D52 7218 <2> jc @F 274 00001D54 D1E9 <2> shr cx, 1 275 00001D56 81DB54AA <2> sbb bx, 0AA55h - 1 276 00001D5A 7510 <2> jne @F 277 <2> 278 <2> %if _OEM_BOOT 279 00001D5C 8DB6FF03 <2> 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 282 00001D60 899EFF03 <2> 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 285 00001D64 899EFF03 <2> 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 296 00001D68 B442 <2> mov ah, 42h 297 00001D6A EB00 <2> 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: 396 00001D6C [6220] <1> dw %[PREFIX]label_freedos_hdd_chs_diskette 397 00001D6E [F01E] <1> dw %[PREFIX]label_freedos_chs 398 00001D70 [7E1D] <1> dw %[PREFIX]label_freedos_lba 399 <1> 400 <1> %[PREFIX]label_freedos_hdd_oem_special: 401 00001D72 [7620] <1> dw %[PREFIX]label_freedos_hdd_oem_chs_diskette 402 00001D74 [041F] <1> dw %[PREFIX]label_freedos_oem_chs 403 00001D76 [921D] <1> dw %[PREFIX]label_freedos_oem_lba 404 <1> 405 00001D78 000000000000 <1> 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 410 00001D7E [B718] <3> %1 411 <3> %rotate 1 410 00001D80 2500 <3> %1 411 <3> %rotate 1 410 00001D82 [5418] <3> %1 411 <3> %rotate 1 410 00001D84 [F01E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001D86 0700 <3> %1 411 <3> %rotate 1 410 00001D88 1A00 <3> %1 411 <3> %rotate 1 410 00001D8A 1D00 <3> %1 411 <3> %rotate 1 410 00001D8C 2000 <3> %1 411 <3> %rotate 1 410 00001D8E 2400 <3> %1 411 <3> %rotate 1 410 00001D90 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001D92 [DC18] <3> %1 411 <3> %rotate 1 410 00001D94 2800 <3> %1 411 <3> %rotate 1 410 00001D96 [5418] <3> %1 411 <3> %rotate 1 410 00001D98 [041F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001D9A 0700 <3> %1 411 <3> %rotate 1 410 00001D9C 1A00 <3> %1 411 <3> %rotate 1 410 00001D9E 1B00 <3> %1 411 <3> %rotate 1 410 00001DA0 1E00 <3> %1 411 <3> %rotate 1 410 00001DA2 1F00 <3> %1 411 <3> %rotate 1 410 00001DA4 2200 <3> %1 411 <3> %rotate 1 410 00001DA6 2300 <3> %1 411 <3> %rotate 1 410 00001DA8 2700 <3> %1 411 <3> %rotate 1 410 00001DAA 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DAC [0419] <3> %1 411 <3> %rotate 1 410 00001DAE 1D00 <3> %1 411 <3> %rotate 1 410 00001DB0 [5418] <3> %1 411 <3> %rotate 1 410 00001DB2 [1E1F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DB4 0400 <3> %1 411 <3> %rotate 1 410 00001DB6 0C00 <3> %1 411 <3> %rotate 1 410 00001DB8 1200 <3> %1 411 <3> %rotate 1 410 00001DBA 1600 <3> %1 411 <3> %rotate 1 410 00001DBC 1C00 <3> %1 411 <3> %rotate 1 410 00001DBE 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DC0 [2119] <3> %1 411 <3> %rotate 1 410 00001DC2 0900 <3> %1 411 <3> %rotate 1 410 00001DC4 [8518] <3> %1 411 <3> %rotate 1 410 00001DC6 [321F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DC8 0200 <3> %1 411 <3> %rotate 1 410 00001DCA 0800 <3> %1 411 <3> %rotate 1 410 00001DCC 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DCE [2A19] <3> %1 411 <3> %rotate 1 410 00001DD0 0A00 <3> %1 411 <3> %rotate 1 410 00001DD2 [8518] <3> %1 411 <3> %rotate 1 410 00001DD4 [401F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DD6 0200 <3> %1 411 <3> %rotate 1 410 00001DD8 0900 <3> %1 411 <3> %rotate 1 410 00001DDA 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DDC [3419] <3> %1 411 <3> %rotate 1 410 00001DDE 2700 <3> %1 411 <3> %rotate 1 410 00001DE0 [5418] <3> %1 411 <3> %rotate 1 410 00001DE2 [4E1F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DE4 0400 <3> %1 411 <3> %rotate 1 410 00001DE6 0C00 <3> %1 411 <3> %rotate 1 410 00001DE8 1200 <3> %1 411 <3> %rotate 1 410 00001DEA 1600 <3> %1 411 <3> %rotate 1 410 00001DEC 1C00 <3> %1 411 <3> %rotate 1 410 00001DEE 2600 <3> %1 411 <3> %rotate 1 410 00001DF0 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DF2 [5B19] <3> %1 411 <3> %rotate 1 410 00001DF4 1300 <3> %1 411 <3> %rotate 1 410 00001DF6 [8518] <3> %1 411 <3> %rotate 1 410 00001DF8 [641F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001DFA 0200 <3> %1 411 <3> %rotate 1 410 00001DFC 0800 <3> %1 411 <3> %rotate 1 410 00001DFE 1200 <3> %1 411 <3> %rotate 1 410 00001E00 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E02 [6E19] <3> %1 411 <3> %rotate 1 410 00001E04 1500 <3> %1 411 <3> %rotate 1 410 00001E06 [8518] <3> %1 411 <3> %rotate 1 410 00001E08 [741F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E0A 0200 <3> %1 411 <3> %rotate 1 410 00001E0C 0900 <3> %1 411 <3> %rotate 1 410 00001E0E 1400 <3> %1 411 <3> %rotate 1 410 00001E10 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E12 [8319] <3> %1 411 <3> %rotate 1 410 00001E14 2B00 <3> %1 411 <3> %rotate 1 410 00001E16 [5418] <3> %1 411 <3> %rotate 1 410 00001E18 [841F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E1A 0400 <3> %1 411 <3> %rotate 1 410 00001E1C 0C00 <3> %1 411 <3> %rotate 1 410 00001E1E 1200 <3> %1 411 <3> %rotate 1 410 00001E20 1600 <3> %1 411 <3> %rotate 1 410 00001E22 1C00 <3> %1 411 <3> %rotate 1 410 00001E24 2A00 <3> %1 411 <3> %rotate 1 410 00001E26 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E28 [AE19] <3> %1 411 <3> %rotate 1 410 00001E2A 1700 <3> %1 411 <3> %rotate 1 410 00001E2C [8518] <3> %1 411 <3> %rotate 1 410 00001E2E [9A1F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E30 0200 <3> %1 411 <3> %rotate 1 410 00001E32 0800 <3> %1 411 <3> %rotate 1 410 00001E34 1600 <3> %1 411 <3> %rotate 1 410 00001E36 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E38 [C519] <3> %1 411 <3> %rotate 1 410 00001E3A 1900 <3> %1 411 <3> %rotate 1 410 00001E3C [8518] <3> %1 411 <3> %rotate 1 410 00001E3E [AA1F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E40 0200 <3> %1 411 <3> %rotate 1 410 00001E42 0900 <3> %1 411 <3> %rotate 1 410 00001E44 1800 <3> %1 411 <3> %rotate 1 410 00001E46 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E48 [DE19] <3> %1 411 <3> %rotate 1 410 00001E4A 2400 <3> %1 411 <3> %rotate 1 410 00001E4C [5418] <3> %1 411 <3> %rotate 1 410 00001E4E [BA1F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E50 0A00 <3> %1 411 <3> %rotate 1 410 00001E52 1300 <3> %1 411 <3> %rotate 1 410 00001E54 1900 <3> %1 411 <3> %rotate 1 410 00001E56 1D00 <3> %1 411 <3> %rotate 1 410 00001E58 2300 <3> %1 411 <3> %rotate 1 410 00001E5A 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E5C [021A] <3> %1 411 <3> %rotate 1 410 00001E5E 2E00 <3> %1 411 <3> %rotate 1 410 00001E60 [5418] <3> %1 411 <3> %rotate 1 410 00001E62 [CE1F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E64 0A00 <3> %1 411 <3> %rotate 1 410 00001E66 1300 <3> %1 411 <3> %rotate 1 410 00001E68 1900 <3> %1 411 <3> %rotate 1 410 00001E6A 1D00 <3> %1 411 <3> %rotate 1 410 00001E6C 2300 <3> %1 411 <3> %rotate 1 410 00001E6E 2D00 <3> %1 411 <3> %rotate 1 410 00001E70 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E72 [301A] <3> %1 411 <3> %rotate 1 410 00001E74 3200 <3> %1 411 <3> %rotate 1 410 00001E76 [5418] <3> %1 411 <3> %rotate 1 410 00001E78 [E41F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E7A 0A00 <3> %1 411 <3> %rotate 1 410 00001E7C 1300 <3> %1 411 <3> %rotate 1 410 00001E7E 1900 <3> %1 411 <3> %rotate 1 410 00001E80 1D00 <3> %1 411 <3> %rotate 1 410 00001E82 2300 <3> %1 411 <3> %rotate 1 410 00001E84 3100 <3> %1 411 <3> %rotate 1 410 00001E86 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E88 [621A] <3> %1 411 <3> %rotate 1 410 00001E8A 0E00 <3> %1 411 <3> %rotate 1 410 00001E8C [8518] <3> %1 411 <3> %rotate 1 410 00001E8E [FA1F] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E90 0200 <3> %1 411 <3> %rotate 1 410 00001E92 0800 <3> %1 411 <3> %rotate 1 410 00001E94 0D00 <3> %1 411 <3> %rotate 1 410 00001E96 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001E98 [701A] <3> %1 411 <3> %rotate 1 410 00001E9A 0F00 <3> %1 411 <3> %rotate 1 410 00001E9C [8518] <3> %1 411 <3> %rotate 1 410 00001E9E [0A20] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EA0 0200 <3> %1 411 <3> %rotate 1 410 00001EA2 0900 <3> %1 411 <3> %rotate 1 410 00001EA4 0E00 <3> %1 411 <3> %rotate 1 410 00001EA6 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EA8 [7F1A] <3> %1 411 <3> %rotate 1 410 00001EAA 1800 <3> %1 411 <3> %rotate 1 410 00001EAC [8518] <3> %1 411 <3> %rotate 1 410 00001EAE [1A20] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EB0 0200 <3> %1 411 <3> %rotate 1 410 00001EB2 0800 <3> %1 411 <3> %rotate 1 410 00001EB4 1200 <3> %1 411 <3> %rotate 1 410 00001EB6 1700 <3> %1 411 <3> %rotate 1 410 00001EB8 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EBA [971A] <3> %1 411 <3> %rotate 1 410 00001EBC 1A00 <3> %1 411 <3> %rotate 1 410 00001EBE [8518] <3> %1 411 <3> %rotate 1 410 00001EC0 [2C20] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EC2 0200 <3> %1 411 <3> %rotate 1 410 00001EC4 0900 <3> %1 411 <3> %rotate 1 410 00001EC6 1400 <3> %1 411 <3> %rotate 1 410 00001EC8 1900 <3> %1 411 <3> %rotate 1 410 00001ECA 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001ECC [B11A] <3> %1 411 <3> %rotate 1 410 00001ECE 1C00 <3> %1 411 <3> %rotate 1 410 00001ED0 [8518] <3> %1 411 <3> %rotate 1 410 00001ED2 [3E20] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001ED4 0200 <3> %1 411 <3> %rotate 1 410 00001ED6 0800 <3> %1 411 <3> %rotate 1 410 00001ED8 1600 <3> %1 411 <3> %rotate 1 410 00001EDA 1B00 <3> %1 411 <3> %rotate 1 410 00001EDC 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EDE [CD1A] <3> %1 411 <3> %rotate 1 410 00001EE0 1E00 <3> %1 411 <3> %rotate 1 410 00001EE2 [8518] <3> %1 411 <3> %rotate 1 410 00001EE4 [5020] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EE6 0200 <3> %1 411 <3> %rotate 1 410 00001EE8 0900 <3> %1 411 <3> %rotate 1 410 00001EEA 1800 <3> %1 411 <3> %rotate 1 410 00001EEC 1D00 <3> %1 411 <3> %rotate 1 410 00001EEE 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EF0 [EB1A] <3> %1 411 <3> %rotate 1 410 00001EF2 2500 <3> %1 411 <3> %rotate 1 410 00001EF4 [A518] <3> %1 411 <3> %rotate 1 410 00001EF6 [7E1D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001EF8 0700 <3> %1 411 <3> %rotate 1 410 00001EFA 1A00 <3> %1 411 <3> %rotate 1 410 00001EFC 1D00 <3> %1 411 <3> %rotate 1 410 00001EFE 2000 <3> %1 411 <3> %rotate 1 410 00001F00 2400 <3> %1 411 <3> %rotate 1 410 00001F02 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F04 [101B] <3> %1 411 <3> %rotate 1 410 00001F06 2800 <3> %1 411 <3> %rotate 1 410 00001F08 [A518] <3> %1 411 <3> %rotate 1 410 00001F0A [921D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F0C 0700 <3> %1 411 <3> %rotate 1 410 00001F0E 1A00 <3> %1 411 <3> %rotate 1 410 00001F10 1B00 <3> %1 411 <3> %rotate 1 410 00001F12 1E00 <3> %1 411 <3> %rotate 1 410 00001F14 1F00 <3> %1 411 <3> %rotate 1 410 00001F16 2200 <3> %1 411 <3> %rotate 1 410 00001F18 2300 <3> %1 411 <3> %rotate 1 410 00001F1A 2700 <3> %1 411 <3> %rotate 1 410 00001F1C 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F1E [381B] <3> %1 411 <3> %rotate 1 410 00001F20 1D00 <3> %1 411 <3> %rotate 1 410 00001F22 [A518] <3> %1 411 <3> %rotate 1 410 00001F24 [AC1D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F26 0400 <3> %1 411 <3> %rotate 1 410 00001F28 0C00 <3> %1 411 <3> %rotate 1 410 00001F2A 1200 <3> %1 411 <3> %rotate 1 410 00001F2C 1600 <3> %1 411 <3> %rotate 1 410 00001F2E 1C00 <3> %1 411 <3> %rotate 1 410 00001F30 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F32 [551B] <3> %1 411 <3> %rotate 1 410 00001F34 0900 <3> %1 411 <3> %rotate 1 410 00001F36 [A518] <3> %1 411 <3> %rotate 1 410 00001F38 [C01D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F3A 0200 <3> %1 411 <3> %rotate 1 410 00001F3C 0800 <3> %1 411 <3> %rotate 1 410 00001F3E 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F40 [5E1B] <3> %1 411 <3> %rotate 1 410 00001F42 0A00 <3> %1 411 <3> %rotate 1 410 00001F44 [A518] <3> %1 411 <3> %rotate 1 410 00001F46 [CE1D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F48 0200 <3> %1 411 <3> %rotate 1 410 00001F4A 0900 <3> %1 411 <3> %rotate 1 410 00001F4C 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F4E [681B] <3> %1 411 <3> %rotate 1 410 00001F50 2700 <3> %1 411 <3> %rotate 1 410 00001F52 [A518] <3> %1 411 <3> %rotate 1 410 00001F54 [DC1D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F56 0400 <3> %1 411 <3> %rotate 1 410 00001F58 0C00 <3> %1 411 <3> %rotate 1 410 00001F5A 1200 <3> %1 411 <3> %rotate 1 410 00001F5C 1600 <3> %1 411 <3> %rotate 1 410 00001F5E 1C00 <3> %1 411 <3> %rotate 1 410 00001F60 2600 <3> %1 411 <3> %rotate 1 410 00001F62 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F64 [8F1B] <3> %1 411 <3> %rotate 1 410 00001F66 1300 <3> %1 411 <3> %rotate 1 410 00001F68 [A518] <3> %1 411 <3> %rotate 1 410 00001F6A [F21D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F6C 0200 <3> %1 411 <3> %rotate 1 410 00001F6E 0800 <3> %1 411 <3> %rotate 1 410 00001F70 1200 <3> %1 411 <3> %rotate 1 410 00001F72 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F74 [A21B] <3> %1 411 <3> %rotate 1 410 00001F76 1500 <3> %1 411 <3> %rotate 1 410 00001F78 [A518] <3> %1 411 <3> %rotate 1 410 00001F7A [021E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F7C 0200 <3> %1 411 <3> %rotate 1 410 00001F7E 0900 <3> %1 411 <3> %rotate 1 410 00001F80 1400 <3> %1 411 <3> %rotate 1 410 00001F82 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F84 [B71B] <3> %1 411 <3> %rotate 1 410 00001F86 2B00 <3> %1 411 <3> %rotate 1 410 00001F88 [A518] <3> %1 411 <3> %rotate 1 410 00001F8A [121E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F8C 0400 <3> %1 411 <3> %rotate 1 410 00001F8E 0C00 <3> %1 411 <3> %rotate 1 410 00001F90 1200 <3> %1 411 <3> %rotate 1 410 00001F92 1600 <3> %1 411 <3> %rotate 1 410 00001F94 1C00 <3> %1 411 <3> %rotate 1 410 00001F96 2A00 <3> %1 411 <3> %rotate 1 410 00001F98 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001F9A [E21B] <3> %1 411 <3> %rotate 1 410 00001F9C 1700 <3> %1 411 <3> %rotate 1 410 00001F9E [A518] <3> %1 411 <3> %rotate 1 410 00001FA0 [281E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FA2 0200 <3> %1 411 <3> %rotate 1 410 00001FA4 0800 <3> %1 411 <3> %rotate 1 410 00001FA6 1600 <3> %1 411 <3> %rotate 1 410 00001FA8 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FAA [F91B] <3> %1 411 <3> %rotate 1 410 00001FAC 1900 <3> %1 411 <3> %rotate 1 410 00001FAE [A518] <3> %1 411 <3> %rotate 1 410 00001FB0 [381E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FB2 0200 <3> %1 411 <3> %rotate 1 410 00001FB4 0900 <3> %1 411 <3> %rotate 1 410 00001FB6 1800 <3> %1 411 <3> %rotate 1 410 00001FB8 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FBA [121C] <3> %1 411 <3> %rotate 1 410 00001FBC 2400 <3> %1 411 <3> %rotate 1 410 00001FBE [A518] <3> %1 411 <3> %rotate 1 410 00001FC0 [481E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FC2 0A00 <3> %1 411 <3> %rotate 1 410 00001FC4 1300 <3> %1 411 <3> %rotate 1 410 00001FC6 1900 <3> %1 411 <3> %rotate 1 410 00001FC8 1D00 <3> %1 411 <3> %rotate 1 410 00001FCA 2300 <3> %1 411 <3> %rotate 1 410 00001FCC 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FCE [361C] <3> %1 411 <3> %rotate 1 410 00001FD0 2E00 <3> %1 411 <3> %rotate 1 410 00001FD2 [A518] <3> %1 411 <3> %rotate 1 410 00001FD4 [5C1E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FD6 0A00 <3> %1 411 <3> %rotate 1 410 00001FD8 1300 <3> %1 411 <3> %rotate 1 410 00001FDA 1900 <3> %1 411 <3> %rotate 1 410 00001FDC 1D00 <3> %1 411 <3> %rotate 1 410 00001FDE 2300 <3> %1 411 <3> %rotate 1 410 00001FE0 2D00 <3> %1 411 <3> %rotate 1 410 00001FE2 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FE4 [641C] <3> %1 411 <3> %rotate 1 410 00001FE6 3200 <3> %1 411 <3> %rotate 1 410 00001FE8 [A518] <3> %1 411 <3> %rotate 1 410 00001FEA [721E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FEC 0A00 <3> %1 411 <3> %rotate 1 410 00001FEE 1300 <3> %1 411 <3> %rotate 1 410 00001FF0 1900 <3> %1 411 <3> %rotate 1 410 00001FF2 1D00 <3> %1 411 <3> %rotate 1 410 00001FF4 2300 <3> %1 411 <3> %rotate 1 410 00001FF6 3100 <3> %1 411 <3> %rotate 1 410 00001FF8 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00001FFA [961C] <3> %1 411 <3> %rotate 1 410 00001FFC 0E00 <3> %1 411 <3> %rotate 1 410 00001FFE [A518] <3> %1 411 <3> %rotate 1 410 00002000 [881E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002002 0200 <3> %1 411 <3> %rotate 1 410 00002004 0800 <3> %1 411 <3> %rotate 1 410 00002006 0D00 <3> %1 411 <3> %rotate 1 410 00002008 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 0000200A [A41C] <3> %1 411 <3> %rotate 1 410 0000200C 0F00 <3> %1 411 <3> %rotate 1 410 0000200E [A518] <3> %1 411 <3> %rotate 1 410 00002010 [981E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002012 0200 <3> %1 411 <3> %rotate 1 410 00002014 0900 <3> %1 411 <3> %rotate 1 410 00002016 0E00 <3> %1 411 <3> %rotate 1 410 00002018 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 0000201A [B31C] <3> %1 411 <3> %rotate 1 410 0000201C 1800 <3> %1 411 <3> %rotate 1 410 0000201E [A518] <3> %1 411 <3> %rotate 1 410 00002020 [A81E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002022 0200 <3> %1 411 <3> %rotate 1 410 00002024 0800 <3> %1 411 <3> %rotate 1 410 00002026 1200 <3> %1 411 <3> %rotate 1 410 00002028 1700 <3> %1 411 <3> %rotate 1 410 0000202A 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 0000202C [CB1C] <3> %1 411 <3> %rotate 1 410 0000202E 1A00 <3> %1 411 <3> %rotate 1 410 00002030 [A518] <3> %1 411 <3> %rotate 1 410 00002032 [BA1E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002034 0200 <3> %1 411 <3> %rotate 1 410 00002036 0900 <3> %1 411 <3> %rotate 1 410 00002038 1400 <3> %1 411 <3> %rotate 1 410 0000203A 1900 <3> %1 411 <3> %rotate 1 410 0000203C 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 0000203E [E51C] <3> %1 411 <3> %rotate 1 410 00002040 1C00 <3> %1 411 <3> %rotate 1 410 00002042 [A518] <3> %1 411 <3> %rotate 1 410 00002044 [CC1E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002046 0200 <3> %1 411 <3> %rotate 1 410 00002048 0800 <3> %1 411 <3> %rotate 1 410 0000204A 1600 <3> %1 411 <3> %rotate 1 410 0000204C 1B00 <3> %1 411 <3> %rotate 1 410 0000204E 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002050 [011D] <3> %1 411 <3> %rotate 1 410 00002052 1E00 <3> %1 411 <3> %rotate 1 410 00002054 [A518] <3> %1 411 <3> %rotate 1 410 00002056 [DE1E] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002058 0200 <3> %1 411 <3> %rotate 1 410 0000205A 0900 <3> %1 411 <3> %rotate 1 410 0000205C 1800 <3> %1 411 <3> %rotate 1 410 0000205E 1D00 <3> %1 411 <3> %rotate 1 410 00002060 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002062 [1F1D] <3> %1 411 <3> %rotate 1 410 00002064 2500 <3> %1 411 <3> %rotate 1 410 00002066 [6718] <3> %1 411 <3> %rotate 1 410 00002068 [6C1D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 0000206A 0700 <3> %1 411 <3> %rotate 1 410 0000206C 1A00 <3> %1 411 <3> %rotate 1 410 0000206E 1D00 <3> %1 411 <3> %rotate 1 410 00002070 2000 <3> %1 411 <3> %rotate 1 410 00002072 2400 <3> %1 411 <3> %rotate 1 410 00002074 0000 <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 00002076 [441D] <3> %1 411 <3> %rotate 1 410 00002078 2800 <3> %1 411 <3> %rotate 1 410 0000207A [6718] <3> %1 411 <3> %rotate 1 410 0000207C [721D] <3> %1 411 <3> %rotate 1 410 <3> %1 411 <3> %rotate 1 410 0000207E 0700 <3> %1 411 <3> %rotate 1 410 00002080 1A00 <3> %1 411 <3> %rotate 1 410 00002082 1B00 <3> %1 411 <3> %rotate 1 410 00002084 1E00 <3> %1 411 <3> %rotate 1 410 00002086 1F00 <3> %1 411 <3> %rotate 1 410 00002088 2200 <3> %1 411 <3> %rotate 1 410 0000208A 2300 <3> %1 411 <3> %rotate 1 410 0000208C 2700 <3> %1 411 <3> %rotate 1 410 0000208E 0000 <3> %1 411 <3> %rotate 1 418 00002090 00000000 <1> 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 49 00002094 EA00040002 <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 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 00002099 EA00047000 <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 52 <3> jmp 70h:400h 53 <3> %define %%messagestring "lDOS (old)" 54 <3> %elif %2 == 2 55 0000209E EA00027000 <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 55 <3> jmp 70h:200h 56 <3> %define %%messagestring "MS-DOS v7" 57 <3> %elif %2 == 3 58 000020A3 EA00007000 <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 58 <3> jmp 70h:0 59 <3> %define %%messagestring "MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS)" 60 <3> %elif %2 == 4 61 000020A8 EA0000E01F <3> 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 64 000020AD 0000 <3> dw 0 65 000020AF 6000 <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 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 000020B1 EA0000E01F <3> 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 71 000020B6 0000 <3> dw 0 72 000020B8 7000 <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 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 000020BA EA0000E01F <3> 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 78 000020BF 0000 <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 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 000020C1 EA00006000 <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 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 110 000020C6 6C444F5320286E6577- <3> %1 110 000020CF 2900 <3> 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 000020D1 6C444F5320286F6C64- <3> %1 110 000020DA 2900 <3> 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 000020DC 4D532D444F53207637- <3> %1 110 000020E5 00 <3> 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 000020E6 4D532D444F53207636- <3> %1 110 000020EF 202F2049424D2D444F- <3> 110 000020F8 53202F206C444F5320- <3> 110 00002101 284544522D444F5329- <3> 110 0000210A 00 <3> 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000210B 46726565444F532028- <3> %1 110 00002114 46726565444F532900 <3> 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000211D 46726565444F532028- <3> %1 110 00002126 456E68616E63656420- <3> 110 0000212F 44522D444F532900 <3> 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002137 46726565444F532028- <3> %1 110 00002140 6F746865722900 <3> 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002147 6C444F532028467265- <3> %1 110 00002150 65444F532900 <3> 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 110 00002156 [9420] <3> %1 111 <3> %rotate 1 110 00002158 0500 <3> %1 111 <3> %rotate 1 110 0000215A [C620] <3> %1 111 <3> %rotate 1 110 0000215C 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000215E 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002160 [9920] <3> %1 111 <3> %rotate 1 110 00002162 0500 <3> %1 111 <3> %rotate 1 110 00002164 [D120] <3> %1 111 <3> %rotate 1 110 00002166 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002168 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000216A [9E20] <3> %1 111 <3> %rotate 1 110 0000216C 0500 <3> %1 111 <3> %rotate 1 110 0000216E [DC20] <3> %1 111 <3> %rotate 1 110 00002170 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002172 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002174 [A320] <3> %1 111 <3> %rotate 1 110 00002176 0500 <3> %1 111 <3> %rotate 1 110 00002178 [E620] <3> %1 111 <3> %rotate 1 110 0000217A 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000217C 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000217E [A820] <3> %1 111 <3> %rotate 1 110 00002180 0900 <3> %1 111 <3> %rotate 1 110 00002182 [0B21] <3> %1 111 <3> %rotate 1 110 00002184 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002186 0100 <3> %1 111 <3> %rotate 1 110 00002188 0200 <3> %1 111 <3> %rotate 1 110 0000218A 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000218C [B120] <3> %1 111 <3> %rotate 1 110 0000218E 0900 <3> %1 111 <3> %rotate 1 110 00002190 [1D21] <3> %1 111 <3> %rotate 1 110 00002192 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 00002194 0100 <3> %1 111 <3> %rotate 1 110 00002196 0200 <3> %1 111 <3> %rotate 1 110 00002198 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 0000219A [BA20] <3> %1 111 <3> %rotate 1 110 0000219C 0700 <3> %1 111 <3> %rotate 1 110 0000219E [3721] <3> %1 111 <3> %rotate 1 110 000021A0 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 000021A2 0100 <3> %1 111 <3> %rotate 1 110 000021A4 0200 <3> %1 111 <3> %rotate 1 110 000021A6 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 000021A8 [C120] <3> %1 111 <3> %rotate 1 110 000021AA 0500 <3> %1 111 <3> %rotate 1 110 000021AC [4721] <3> %1 111 <3> %rotate 1 110 000021AE 0000 <3> %1 111 <3> %rotate 1 110 <3> %1 111 <3> %rotate 1 110 000021B0 0000 <3> %1 111 <3> %rotate 1 120 000021B2 00000000 <1> 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> 4008 000021B6 BF047E <1> mov di, 7C00h + 512 + 4 4009 000021B9 BE0000 <1> 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 4013 000021BC B90400 <1> mov cx, 4 4014 000021BF F3A7 <1> 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 4036 000021C1 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 4031 000021C2 [B621] <2> %1 4032 <2> %rotate 1 4031 000021C4 0B00 <2> %1 4032 <2> %rotate 1 4031 000021C6 0000 <2> %1 4032 <2> %rotate 1 4031 000021C8 0000 <2> %1 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 000021CA 0400 <2> %1 4032 <2> %rotate 1 4031 000021CC 0500 <2> %1 4032 <2> %rotate 1 4031 000021CE 0000 <2> %1 4032 <2> %rotate 1 4039 000021D0 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> 16 000021D4 [5822]465349424F4F- <1> fsi_revision {"FSIBOOT",0}, "Initial revs of lDOS FSIBOOT (2017-09-13)" 16 000021DC 5400 <1> 17 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/f8698897b208 18 <1> 19 000021DE [8222]465349424F4F- <1> fsi_revision "FSIBOOT0", "lDOS FSIBOOT rev 0 (2018-09-20)" 19 000021E6 5430 <1> 20 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/07a99b9f6f7d 21 <1> 22 000021E8 [A222]465349424F4F- <1> fsi_revision "FSIBOOT1", "lDOS FSIBOOT rev 1 (2018-09-21)" 22 000021F0 5431 <1> 23 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/af54529e9f46 24 <1> 25 000021F2 [C222]465349424F4F- <1> fsi_revision "FSIBOOT2", "lDOS FSIBOOT rev 2 (2018-09-23)" 25 000021FA 5432 <1> 26 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/dae7de41a043 27 <1> ; Used for RxDOS v7.24, 2020-02-03 28 <1> 29 000021FC [E222]465349424F4F- <1> fsi_revision "FSIBOOT3", "lDOS FSIBOOT rev 3 (2020-09-30)" 29 00002204 5433 <1> 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> 37 00002206 [0223]465349424558- <1> fsi_revision "FSIBEX00", "lDOS FSIBOOT experimental rev 00 (2020-10-12)" 37 0000220E 3030 <1> 38 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/143c764757a7 39 <1> 40 00002210 [3023]465349424558- <1> fsi_revision "FSIBEX01", "lDOS FSIBOOT experimental rev 01 (2020-10-25)" 40 00002218 3031 <1> 41 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/72d74cdd7a3c 42 <1> 43 0000221A [5E23]465349424558- <1> fsi_revision "FSIBEX02", "lDOS FSIBOOT experimental rev 02 (2020-11-17)" 43 00002222 3032 <1> 44 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/5a5ccfb311ef 45 <1> 46 00002224 [8C23]465349424F4F- <1> fsi_revision "FSIBOOT4", "lDOS FSIBOOT rev 4 (2021-01-12)" 46 0000222C 5434 <1> 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> 58 0000222E [AC23]465349424558- <1> fsi_revision "FSIBEX03", "lDOS FSIBOOT experimental rev 03 (2024-08-18)" 58 00002236 3033 <1> 59 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/fb5f0cb6ced4 60 <1> 61 00002238 [DA23]465349424558- <1> fsi_revision "FSIBEX04", "lDOS FSIBOOT experimental rev 04 (2024-08-19)" 61 00002240 3034 <1> 62 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/88c097107c86 63 <1> 64 00002242 [0824]465349424558- <1> fsi_revision "FSIBEX05", "lDOS FSIBOOT experimental rev 05 (2024-10-04)" 64 0000224A 3035 <1> 65 <1> ; https://hg.pushbx.org/ecm/ldosboot.exp/rev/aae8332780e8 66 <1> 67 0000224C [3624]465349424F4F- <1> fsi_revision "FSIBOOT5", "lDOS FSIBOOT rev 5 (2024-10-11)" 67 00002254 5435 <1> 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 4054 00002256 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 4031 00002258 496E697469616C2072- <2> %1 4031 00002261 657673206F66206C44- <2> 4031 0000226A 4F5320465349424F4F- <2> 4031 00002273 542028323031372D30- <2> 4031 0000227C 392D31332900 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 00002282 6C444F532046534942- <2> %1 4031 0000228B 4F4F54207265762030- <2> 4031 00002294 2028323031382D3039- <2> 4031 0000229D 2D32302900 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 000022A2 6C444F532046534942- <2> %1 4031 000022AB 4F4F54207265762031- <2> 4031 000022B4 2028323031382D3039- <2> 4031 000022BD 2D32312900 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 000022C2 6C444F532046534942- <2> %1 4031 000022CB 4F4F54207265762032- <2> 4031 000022D4 2028323031382D3039- <2> 4031 000022DD 2D32332900 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 000022E2 6C444F532046534942- <2> %1 4031 000022EB 4F4F54207265762033- <2> 4031 000022F4 2028323032302D3039- <2> 4031 000022FD 2D33302900 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 00002302 6C444F532046534942- <2> %1 4031 0000230B 4F4F54206578706572- <2> 4031 00002314 696D656E74616C2072- <2> 4031 0000231D 657620303020283230- <2> 4031 00002326 32302D31302D313229- <2> 4031 0000232F 00 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 00002330 6C444F532046534942- <2> %1 4031 00002339 4F4F54206578706572- <2> 4031 00002342 696D656E74616C2072- <2> 4031 0000234B 657620303120283230- <2> 4031 00002354 32302D31302D323529- <2> 4031 0000235D 00 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 0000235E 6C444F532046534942- <2> %1 4031 00002367 4F4F54206578706572- <2> 4031 00002370 696D656E74616C2072- <2> 4031 00002379 657620303220283230- <2> 4031 00002382 32302D31312D313729- <2> 4031 0000238B 00 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 0000238C 6C444F532046534942- <2> %1 4031 00002395 4F4F54207265762034- <2> 4031 0000239E 2028323032312D3031- <2> 4031 000023A7 2D31322900 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 000023AC 6C444F532046534942- <2> %1 4031 000023B5 4F4F54206578706572- <2> 4031 000023BE 696D656E74616C2072- <2> 4031 000023C7 657620303320283230- <2> 4031 000023D0 32342D30382D313829- <2> 4031 000023D9 00 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 000023DA 6C444F532046534942- <2> %1 4031 000023E3 4F4F54206578706572- <2> 4031 000023EC 696D656E74616C2072- <2> 4031 000023F5 657620303420283230- <2> 4031 000023FE 32342D30382D313929- <2> 4031 00002407 00 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 00002408 6C444F532046534942- <2> %1 4031 00002411 4F4F54206578706572- <2> 4031 0000241A 696D656E74616C2072- <2> 4031 00002423 657620303520283230- <2> 4031 0000242C 32342D31302D303429- <2> 4031 00002435 00 <2> 4032 <2> %rotate 1 4031 <2> %1 4032 <2> %rotate 1 4031 00002436 6C444F532046534942- <2> %1 4031 0000243F 4F4F54207265762035- <2> 4031 00002448 2028323032342D3130- <2> 4031 00002451 2D31312900 <2> 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 .: 4075 00002456 83F90B cmp cx, 11 ; enough for another name ? 4076 00002459 7275 jb .none ; no --> 4077 ; (cx == 0 jumps here too) 4078 .check: 4079 0000245B 51 push cx 4080 0000245C 56 push si 4081 0000245D B90B00 mov cx, 11 4082 00002460 AC lodsb 4083 00002461 88C4 mov ah, al ; check for same char in all 11 places 4084 00002463 3C20 cmp al, 32 ; first character must not be blank 4085 00002465 740D je .check_fail ; if it is --> 4086 ; cmp al, 5 ; first character may be 05h to indicate 0E5h 4087 ; je .check_pass 4088 00002467 A8 db __TEST_IMM8 ; (skip lodsb) 4089 .check_loop_same: 4090 00002468 AC lodsb 4091 00002469 38C4 cmp ah, al 4092 0000246B 752E jne .check_loop_differs 4093 0000246D E80A00 call .check_character 4094 00002470 7202 jc .check_fail 4095 00002472 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: 4100 00002474 5E pop si 4101 00002475 59 pop cx 4102 00002476 49 dec cx ; lessen the counter 4103 00002477 46 inc si ; -> next position to check 4104 00002478 EBDC jmp . 4105 4106 .check_character: 4107 0000247A 3C20 cmp al, 32 4108 0000247C 7218 jb .check_character_fail 4109 0000247E 3C7F cmp al, 127 4110 ; je .check_character_fail 4111 00002480 7314 jae .check_character_fail 4112 ; note: with all characters >= 128 allowed, 4113 ; we get false positives in our sectors. 4114 00002482 3C2E cmp al, '.' 4115 00002484 7410 je .check_character_fail 4116 00002486 3C2F cmp al, '/' 4117 00002488 740C je .check_character_fail 4118 0000248A 3C5C cmp al, '\' 4119 0000248C 7408 je .check_character_fail 4120 0000248E 3C61 cmp al, 'a' 4121 00002490 7206 jb .check_character_pass 4122 00002492 3C7A cmp al, 'z' 4123 00002494 7702 ja .check_character_pass 4124 .check_character_fail: 4125 00002496 F9 stc 4126 00002497 C3 retn 4127 4128 .check_character_pass: 4129 00002498 F8 clc 4130 00002499 C3 retn 4131 4132 .check_loop: 4133 0000249A AC lodsb 4134 .check_loop_differs: 4135 0000249B E8DCFF call .check_character 4136 0000249E 72D4 jc .check_fail 4137 000024A0 3C20 cmp al, 32 4138 000024A2 740F je .check_loop_is_blank 4139 .check_pass: 4140 000024A4 E2F4 loop .check_loop 4141 4142 000024A6 58 pop ax ; (discard si) 4143 000024A7 83EE0B sub si, 11 ; -> at name 4144 4145 000024AA E83600 call convert_name_to_asciz 4146 ; si -> behind name 4147 000024AD 59 pop cx 4148 000024AE 83E90B sub cx, 11 ; lessen the counter 4149 000024B1 F8 clc 4150 000024B2 C3 retn 4151 4152 .check_loop_is_blank: 4153 000024B3 88CC mov ah, cl ; = how many remaining in ext (1 to 3) 4154 ; or name+ext (1 to 10, cannot be 11) 4155 000024B5 80FC03 cmp ah, 3 ; in ext ? 4156 000024B8 7605 jbe @F ; yes --> 4157 000024BA 80EC03 sub ah, 3 ; 1 to 7 name field remaining 4158 000024BD A8 db __TEST_IMM8 ; (skip lodsb) 4159 .check_loop_blank: 4160 000024BE AC lodsb 4161 @@: 4162 000024BF E8B8FF call .check_character ; general check 4163 000024C2 72B0 jc .check_fail 4164 000024C4 3C20 cmp al, 32 ; non-blank ? 4165 000024C6 75AC jne .check_fail ; yes, fails --> 4166 000024C8 FECC dec ah ; at end of field ? 4167 000024CA 74D8 jz .check_pass ; yes --> 4168 ; no, still in field after blank. 4169 ; check that next trail is all blanks too. 4170 000024CC E2F0 loop .check_loop_blank 4171 000024CE EBA4 jmp .check_fail ; (never reached) 4172 4173 .none: 4174 000024D0 01CE add si, cx 4175 000024D2 BF[A83C] mov di, msg.foundname 4176 000024D5 56 push si 4177 000024D6 BE[B63C] mov si, msg.foundname_none 4178 000024D9 B90400 mov cx, (msg.foundname_none_size + 1) >> 1 4179 000024DC F3A5 rep movsw 4180 000024DE 5E pop si 4181 000024DF 31C9 xor cx, cx 4182 000024E1 F9 stc 4183 000024E2 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: 4192 000024E3 BF[A83C] mov di, msg.foundname 4193 000024E6 B90800 mov cx, 8 4194 000024E9 F3A4 rep movsb ; copy over base name, si -> extension 4195 000024EB 807DF805 cmp byte [di - 8], 05h ; is it 05h ? 4196 000024EF 7504 jne @F ; no --> 4197 000024F1 C645F8E5 mov byte [di - 8], 0E5h ; yes, convert to 0E5h 4198 @@: 4199 4200 000024F5 A8 db __TEST_IMM8 ; (skip dec) 4201 @@: 4202 000024F6 4F dec di ; decrement -> at previous trailing blank 4203 000024F7 807DFF20 cmp byte [di - 1], 32 ; trailing blank ? 4204 000024FB 74F9 je @B ; yes --> 4205 4206 000024FD B02E mov al, '.' 4207 000024FF AA stosb ; store dot (if needed) 4208 00002500 B103 mov cl, 3 4209 00002502 F3A4 rep movsb ; copy over extension, si -> behind name 4210 4211 00002504 A8 db __TEST_IMM8 ; (skip dec) 4212 @@: 4213 00002505 4F dec di ; decrement -> at previous trailing blank 4214 00002506 807DFF20 cmp byte [di - 1], 32 ; trailing blank ? 4215 0000250A 74F9 je @B ; yes --> 4216 4217 0000250C 807DFF2E cmp byte [di - 1], '.' ; trailing dot ? (only occurs if all-blank ext) 4218 00002510 7501 jne @F ; no --> 4219 00002512 4F dec di ; -> at the dot 4220 @@: 4221 00002513 B000 mov al, 0 4222 00002515 AA stosb ; store filename terminator 4223 00002516 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: 4235 00002517 B020 mov al, 32 4236 00002519 BF[6C3C] mov di, load_kernel_name 4237 0000251C B90B00 mov cx, 11 4238 0000251F F3AA rep stosb ; initialise to empty 4239 4240 00002521 BF[6C3C] mov di, load_kernel_name 4241 00002524 B90900 mov cx, 9 4242 .loop_name: 4243 00002527 AC lodsb 4244 00002528 E8AD00 call uppercase 4245 0000252B 3C22 cmp al, '"' 4246 0000252D 741C je .invalid 4247 0000252F E86900 call iseol? 4248 00002532 744F je .loop_name_done 4249 00002534 3C20 cmp al, 32 4250 00002536 744B je .loop_name_done 4251 00002538 3C09 cmp al, 9 4252 0000253A 7447 je .loop_name_done 4253 0000253C 3C2F cmp al, '/' 4254 0000253E 7443 je .loop_name_done 4255 00002540 3C5C cmp al, '\' 4256 00002542 743F je .loop_name_done 4257 00002544 3C2E cmp al, '.' 4258 00002546 7405 je .loop_name_ext 4259 00002548 AA stosb 4260 00002549 E2DC loop .loop_name 4261 .invalid: 4262 0000254B F9 stc 4263 0000254C C3 retn 4264 4265 .loop_name_ext: 4266 0000254D 83F909 cmp cx, 9 4267 00002550 74F9 je .invalid 4268 00002552 B90400 mov cx, 4 4269 00002555 BF[743C] mov di, load_kernel_name + 8 4270 .loop_ext: 4271 00002558 AC lodsb 4272 00002559 E87C00 call uppercase 4273 0000255C 3C22 cmp al, '"' 4274 0000255E 74EB je .invalid 4275 00002560 E83800 call iseol? 4276 00002563 7419 je .loop_ext_done 4277 00002565 3C20 cmp al, 32 4278 00002567 7415 je .loop_ext_done 4279 00002569 3C09 cmp al, 9 4280 0000256B 7411 je .loop_ext_done 4281 0000256D 3C2F cmp al, '/' 4282 0000256F 740D je .loop_ext_done 4283 00002571 3C5C cmp al, '\' 4284 00002573 7409 je .loop_ext_done 4285 00002575 3C2E cmp al, '.' 4286 00002577 74D2 je .invalid 4287 00002579 AA stosb 4288 0000257A E2DC loop .loop_ext 4289 0000257C EBCD jmp .invalid 4290 4291 .loop_ext_done: 4292 0000257E 83F904 cmp cx, 4 4293 00002581 74C8 je .invalid 4294 .loop_name_done: 4295 00002583 83F909 cmp cx, 9 4296 00002586 74C3 je .invalid 4297 00002588 C606[773C]00 mov byte [load_kernel_name + 11], 0 4298 0000258D 803E[6C3C]E5 cmp byte [load_kernel_name], 0E5h 4299 00002592 7505 jne @F 4300 00002594 C606[6C3C]05 mov byte [load_kernel_name], 05h 4301 @@: 4302 00002599 F8 clc 4303 0000259A C3 retn 4304 %endif 4305 4306 4307 iseol?: 4308 0000259B 3C0D cmp al, 13 4309 0000259D 7402 je .ret 4310 ; cmp al, ';' 4311 ; je .ret 4312 0000259F 3C00 cmp al, 0 4313 .ret: 4314 000025A1 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?: 4329 000025A2 56 push si 4330 000025A3 87FA xchg dx, di 4331 .loop: 4332 000025A5 AC lodsb 4333 000025A6 E82F00 call uppercase 4334 000025A9 AE scasb 4335 000025AA 7506 jne .mismatch 4336 000025AC 84C0 test al, al 4337 000025AE 75F5 jne .loop 4338 000025B0 EB20 jmp .matched_zr 4339 4340 .mismatch: 4341 000025B2 E8E6FF call iseol? 4342 000025B5 7414 je .checkend 4343 000025B7 3C20 cmp al, 32 4344 000025B9 7410 je .checkend 4345 000025BB 3C09 cmp al, 9 4346 000025BD 740C je .checkend 4347 000025BF 3C2C cmp al, ',' 4348 000025C1 7408 je .checkend 4349 000025C3 3C3D cmp al, '=' 4350 000025C5 7404 je .checkend 4351 .ret_nz: 4352 ; NZ 4353 000025C7 5E pop si 4354 .ret: 4355 000025C8 87FA xchg dx, di 4356 000025CA C3 retn 4357 4358 .checkend: 4359 000025CB 26807DFF00 cmp byte [es:di - 1], 0 4360 000025D0 75F5 jne .ret_nz 4361 .matched_zr: ; ZR 4362 000025D2 58 pop ax ; (discard) 4363 000025D3 8D74FF lea si, [si - 1] ; -> separator 4364 000025D6 EBF0 jmp .ret 4365 4366 4367 uppercase: 4368 000025D8 3C61 cmp al, 'a' 4369 000025DA 7206 jb @F 4370 000025DC 3C7A cmp al, 'z' 4371 000025DE 7702 ja @F 4372 000025E0 24DF and al, ~20h 4373 @@: 4374 000025E2 C3 retn 4375 4376 4377 get_hexit: 4378 000025E3 51 push cx 4379 000025E4 B93946 mov cx, '9' | (('A'-10-1 + 16) << 8) 4380 000025E7 E87100 call getexpression.lit_isdigit? ; first character must be a digit 4381 000025EA 59 pop cx 4382 000025EB 720C jc .ret 4383 000025ED E8E8FF call uppercase 4384 000025F0 2C30 sub al, '0' 4385 000025F2 3C09 cmp al, 9 ; was decimal digit ? 4386 000025F4 7602 jbe .lit_decimaldigit ; yes --> 4387 000025F6 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4388 .lit_decimaldigit: 4389 000025F8 F8 clc 4390 .ret: 4391 000025F9 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: 4402 000025FA BA0A00 mov dx, 10 ; set base: decimal 4403 %if 1 4404 000025FD 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 4415 00002600 EB06 jmp @F 4416 4417 4418 get_hexadecimal_literal: 4419 00002602 BA1000 mov dx, 16 ; set base: hexadecimal 4420 %if 1 4421 00002605 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 @@: 4434 00002608 B400 mov ah, 0 4435 0000260A 31DB xor bx, bx 4436 0000260C 89D7 mov di, dx ; di = base 4437 4438 0000260E E84A00 call getexpression.lit_isdigit? ; first character must be a digit 4439 00002611 723F jc .err2 4440 00002613 31D2 xor dx, dx ; initialize value 4441 .lit_loopdigit: 4442 00002615 3C5F cmp al, '_' 4443 00002617 7430 je .lit_skip 4444 00002619 E83F00 call getexpression.lit_isdigit? ; was last character ? 4445 0000261C 722E jc .lit_end ; yes --> 4446 0000261E E8B7FF call uppercase 4447 00002621 2C30 sub al, '0' 4448 00002623 3C09 cmp al, 9 ; was decimal digit ? 4449 00002625 7602 jbe .lit_decimaldigit ; yes --> 4450 00002627 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4451 .lit_decimaldigit: 4452 00002629 50 push ax 4453 0000262A 89D0 mov ax, dx 4454 0000262C 53 push bx 4455 0000262D F7E7 mul di ; multiply low word with base 4456 0000262F 89D3 mov bx, dx 4457 00002631 89C2 mov dx, ax 4458 00002633 58 pop ax 4459 00002634 52 push dx 4460 00002635 F7E7 mul di ; multiply high word with base 4461 00002637 85D2 test dx, dx 4462 00002639 5A pop dx 4463 0000263A 7516 jnz .err2 ; overflow --> 4464 0000263C 01C3 add bx, ax ; add them 4465 0000263E 58 pop ax 4466 0000263F 7211 jc .err2 ; overflow --> 4467 00002641 00C2 add dl, al ; add in the new digit 4468 00002643 80D600 adc dh, 0 4469 00002646 83D300 adc bx, byte 0 4470 .lit_skip: 4471 00002649 AC lodsb 4472 0000264A EBC9 jmp short .lit_loopdigit 4473 4474 .lit_end: 4475 0000264C E82600 call isseparator? ; after the number, there must be a separator 4476 0000264F 7501 jne .err2 ; none here --> 4477 00002651 C3 retn 4478 4479 .err2: 4480 00002652 BA[AC3E] mov dx, msg.error_invalid_number 4481 00002655 E974DA jmp disp_error 4482 4483 4484 symhint_store_string getexpression 4485 getexpression.lit_ishexdigit?: 4486 00002658 B93946 mov cx, "9F" 4487 getexpression.lit_isdigit?: 4488 0000265B 3C30 cmp al, '0' 4489 0000265D 7214 jb .no 4490 0000265F 38C8 cmp al, cl 4491 00002661 760D jbe .yes 4492 00002663 50 push ax 4493 00002664 E871FF call uppercase 4494 00002667 38E8 cmp al, ch 4495 00002669 7707 ja .no_p 4496 0000266B 3C41 cmp al, 'A' 4497 0000266D 7203 jb .no_p 4498 0000266F 58 pop ax 4499 .yes: 4500 00002670 F8 clc 4501 00002671 C3 retn 4502 4503 .no_p: 4504 00002672 58 pop ax 4505 .no: 4506 00002673 F9 stc 4507 00002674 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?: 4515 00002675 E860FF call uppercase 4516 00002678 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 4521 00002679 57 push di 4522 0000267A BF[8626] mov di, separators 4523 0000267D 8B0D mov cx, word [di] 4524 0000267F AF scasw 4525 00002680 F2AE repne scasb ; ZR, NC on match, NZ else 4526 00002682 5F pop di 4527 .yes: 4528 00002683 59 pop cx 4529 00002684 C3 retn 4530 4531 00002685 00 align 2, db 0 4532 %if 0 ; _EXPRESSIONS 4533 separators: countedw 32,9,13,",L;]:=)",0 4534 %else 4535 00002686 0A0020090D2C4C3B5D- separators: countedw 32,9,13,",L;]:=",0 4535 0000268F 3A3D00 4536 %endif 4537 4538 4539 i24: 4540 00002692 B003 mov al, 3 ; always return fail, to handle the error as a soft one 4541 00002694 CF iret 4542 4543 i23: 4544 00002695 2EC706[9526]EB08 mov word [ cs:$ ], (__JMP_REL8|__REL16__(.return)<<8) ; don't reenter 4545 0000269C E80200 call restorestate 4546 .return: 4547 0000269F F9 stc ; always abort program (what default DOS handler also does) 4548 000026A0 CB retf 4549 4550 ; Restore modified DOS data 4551 ; 4552 ; CHG: - 4553 restorestate: 4554 000026A1 50 push ax 4555 %if _VDD 4556 ; Release the registered VDD. 4557 000026A2 F606[D829]04 testopt [internalflags], ntpacket 4558 000026A7 7408 jz .novdd 4559 000026A9 A1[E429] mov ax, word [hVdd] 4560 000026AC C4C4580190 UnRegisterModule 4561 .novdd: 4562 %endif 4563 000026B1 58 pop ax 4564 000026B2 C3 retn 4565 4566 4567 ; INP: es:dx = ds:dx -> 0-terminated message 4568 disp_msg_asciz: 4569 000026B3 50 push ax 4570 000026B4 53 push bx 4571 000026B5 51 push cx 4572 000026B6 57 push di 4573 000026B7 BB0100 mov bx, 1 4574 000026BA B80040 mov ax, 4000h 4575 000026BD 89D7 mov di, dx 4576 000026BF B9FFFF mov cx, -1 4577 000026C2 F2AE repne scasb ; -> after nul 4578 000026C4 4F dec di ; -> at nul 4579 000026C5 29D7 sub di, dx ; size 4580 000026C7 89F9 mov cx, di 4581 000026C9 CD21 int 21h 4582 000026CB 5F pop di 4583 000026CC 59 pop cx 4584 000026CD 5B pop bx 4585 000026CE 58 pop ax 4586 000026CF C3 retn 4587 4588 4589 is_alphanumeric: 4590 000026D0 3C30 cmp al, '0' 4591 000026D2 7216 jb .ret 4592 000026D4 3C39 cmp al, '9' 4593 000026D6 7610 jbe .ZR 4594 000026D8 3C41 cmp al, 'A' 4595 000026DA 720E jb .ret 4596 000026DC 3C5A cmp al, 'Z' 4597 000026DE 7608 jbe .ZR 4598 000026E0 3C61 cmp al, 'a' 4599 000026E2 7206 jb .ret 4600 000026E4 3C7A cmp al, 'z' 4601 000026E6 7702 ja .ret 4602 .ZR: 4603 000026E8 38C0 cmp al, al 4604 .ret: 4605 000026EA C3 retn 4606 4607 4608 disp_ax_hex: 4609 000026EB 86E0 xchg al, ah 4610 000026ED E80200 call disp_al_hex 4611 000026F0 86E0 xchg al, ah 4612 disp_al_hex: 4613 000026F2 51 push cx 4614 000026F3 B104 mov cl, 4 4615 000026F5 D2C8 ror al, cl 4616 000026F7 E80300 call .nibble 4617 000026FA D2C8 ror al, cl 4618 000026FC 59 pop cx 4619 .nibble: 4620 000026FD 50 push ax 4621 000026FE 240F and al, 0Fh 4622 00002700 0430 add al, '0' 4623 00002702 3C39 cmp al, '9' 4624 00002704 7602 jbe .isdigit 4625 00002706 0407 add al, 'A'-('9'+1) 4626 .isdigit: 4627 00002708 A8 db __TEST_IMM8 ; (skip push) 4628 4629 disp_al: 4630 00002709 50 push ax 4631 0000270A 52 push dx 4632 0000270B 92 xchg dx, ax 4633 0000270C B402 mov ah, 02h 4634 0000270E CD21 int 21h 4635 00002710 5A pop dx 4636 00002711 58 pop ax 4637 00002712 C3 retn 4638 4639 4640 disp_ax_dec: 4641 decword: 4642 00002713 52 push dx 4643 00002714 31D2 xor dx, dx 4644 00002716 E80200 call decdword 4645 00002719 5A pop dx 4646 0000271A C3 retn 4647 4648 4649 decdword: 4650 0000271B 51 push cx 4651 0000271C 31C9 xor cx, cx 4652 0000271E E80200 call dec_dword_minwidth 4653 00002721 59 pop cx 4654 00002722 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 4669 00002723 5589E58D66F4 lenter 4670 lvar dword, dividend 4671 00002729 52 push dx 4672 0000272A 50 push ax 4673 0000272B 49 dec cx 4674 lvar word, minwidth 4675 0000272C 51 push cx 4676 0000272D 41 inc cx 4677 4678 0000272E 50 push ax 4679 0000272F 53 push bx 4680 00002730 51 push cx 4681 00002731 52 push dx 4682 00002732 56 push si 4683 00002733 57 push di 4684 00002734 06 push es 4685 4686 00002735 16 push ss 4687 00002736 07 pop es 4688 4689 00002737 8D7EFF lea di, [bp + ?buffer + ?bufferlen - 1] 4690 0000273A 89FB mov bx, di 4691 0000273C FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4692 0000273D B024 mov al, '$' 4693 0000273F AA stosb ; 21.09 dollar terminator 4694 4695 ; dword [bp + ?dividend] = number to display 4696 00002740 B90A00 mov cx, 10 ; divisor 4697 .loop_write: 4698 4699 00002743 31D2 xor dx, dx 4700 00002745 57 push di 4701 00002746 BF0400 mov di, 4 4702 .loop_divide: 4703 00002749 8B43EE mov ax, [bp + ?dividend - 2 + di] 4704 0000274C F7F1 div cx 4705 0000274E 8943EE mov word [bp + ?dividend - 2 + di], ax 4706 00002751 4F dec di 4707 00002752 4F dec di 4708 00002753 75F4 jnz .loop_divide 4709 ; dx = last remainder 4710 00002755 5F pop di 4711 00002756 92 xchg ax, dx ; ax = remainder (next digit) 4712 ; dword [bp + ?dividend] = result of div 4713 00002757 0430 add al, '0' 4714 00002759 AA stosb 4715 0000275A FF4EEE dec word [bp + ?minwidth] 4716 0000275D 79E4 jns .loop_write 4717 4718 0000275F 837EF200 cmp word [bp + ?dividend + 2], 0 4719 00002763 75DE jnz .loop_write 4720 00002765 837EF000 cmp word [bp + ?dividend], 0 4721 ; any more ? 4722 00002769 75D8 jnz .loop_write ; loop --> 4723 4724 0000276B FC cld 4725 4726 0000276C 29FB sub bx, di 4727 0000276E 89D9 mov cx, bx 4728 00002770 89FA mov dx, di 4729 00002772 42 inc dx 4730 00002773 1E push ds 4731 00002774 16 push ss 4732 00002775 1F pop ds 4733 00002776 B409 mov ah, 09h 4734 00002778 CD21 int 21h ; display to stdout 4735 0000277A 1F pop ds 4736 4737 0000277B 07 pop es 4738 0000277C 5F pop di 4739 0000277D 5E pop si 4740 0000277E 5A pop dx 4741 0000277F 59 pop cx 4742 00002780 5B pop bx 4743 00002781 58 pop ax 4744 4745 00002782 89EC5D lleave 4746 00002785 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 4759 00002786 50 push ax 4760 00002787 52 push dx 4761 00002788 53 push bx 4762 00002789 51 push cx 4763 0000278A 56 push si 4764 .plw1: 4765 0000278B 833E[3808]00 cmp word [cmd_line_image_file.name], 0 4766 00002790 7432 je .drive 4767 4768 00002792 57 push di 4769 00002793 53 push bx 4770 00002794 E87E01 call image_seek 4771 00002797 5A pop dx 4772 00002798 5F pop di 4773 00002799 7220 jc .image_fail_seek 4774 4775 0000279B 8B0E[1008] mov cx, word [m_sector_size] 4776 0000279F B440 mov ah, 40h 4777 000027A1 F9 stc 4778 000027A2 CD21 int 21h 4779 000027A4 7309 jnc @F 4780 000027A6 BA[A93A] mov dx, msg.image_fail.write 4781 000027A9 E8F9EF call disp_dos_error 4782 000027AC E9A600 jmp write_sector.ww3_error 4783 4784 @@: 4785 000027AF 39C8 cmp ax, cx 4786 000027B1 7503E9A000 je write_sector.ww3 ; (NC) 4787 000027B6 BA[C43A] mov dx, msg.image_fail_enough.write 4788 000027B9 EB03 jmp @F 4789 4790 .image_fail_seek: 4791 000027BB BA[F13A] mov dx, msg.image_fail_seek.write 4792 @@: 4793 000027BE E8F2FE call disp_msg_asciz 4794 000027C1 E99100 jmp write_sector.ww3_error 4795 4796 .drive: 4797 000027C4 51 push cx 4798 000027C5 80C141 add cl, 'A' 4799 000027C8 880E[9F4D] mov byte [driveno], cl 4800 000027CC 59 pop cx 4801 000027CD F606[D829]07 testopt [internalflags], oldpacket| newpacket| ntpacket 4802 000027D2 7513 jnz .plw3 ; if using a packet --> 4803 000027D4 85D2 test dx, dx 4804 000027D6 7556 jnz .error_sector_not_found 4805 000027D8 92 xchg ax, dx ; dx = sector to write 4806 000027D9 91 xchg ax, cx ; al = drive number 4807 000027DA B90100 mov cx, 1 4808 .oldint: 4809 000027DD 55 push bp 4810 000027DE 57 push di 4811 000027DF CD26 int 26h 4812 000027E1 44 inc sp 4813 000027E2 44 inc sp 4814 000027E3 5F pop di 4815 000027E4 5D pop bp 4816 000027E5 EB49 jmp .done 4817 4818 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 4819 .plw3: 4820 000027E7 53 push bx 4821 000027E8 BB[042A] mov bx, packet 4822 000027EB 8907 mov word [bx+0], ax ; LoWord sector number 4823 000027ED 895702 mov word [bx+2], dx ; HiWord sector number 4824 000027F0 C747040100 mov word [bx+4], 1 ; number of sectors 4825 000027F5 88C8 mov al, cl 4826 000027F7 8F4706 pop word [bx+6] ; transfer address ofs 4827 000027FA 8C5F08 mov word [bx+8], ds ; transfer address seg 4828 000027FD B9FFFF mov cx, -1 4829 4830 00002800 E88001 call lockdrive 4831 4832 00002803 36F606[D829]06 testopt [ss:internalflags], newpacket| ntpacket 4833 00002809 74D2 jz .oldint 4834 0000280B 88C2 mov dl, al ; A: = 0, ... 4835 0000280D BE0100 mov si, 0001h ; write, assume "unknown data" 4836 %if _VDD 4837 00002810 F606[D829]04 testopt [internalflags], ntpacket 4838 00002815 750A jnz .vdd 4839 %endif 4840 00002817 FEC2 inc dl ; A: = 1, ... 4841 00002819 B80573 mov ax, 7305h ; ds:(e)bx-> packet 4842 0000281C F9 stc 4843 0000281D CD21 int 21h 4844 0000281F EB0F jmp short .done 4845 %if _VDD 4846 .vdd: 4847 00002821 A1[E429] mov ax, word [hVdd] 4848 00002824 B90500 mov cx, 5 4849 00002827 C4C4580290 DispatchCall 4850 0000282C EB02 jmp short .done 4851 %endif 4852 .error_sector_not_found: 4853 0000282E B008 mov al, 8 ; "sector not found" 4854 .done: 4855 00002830 9C pushf 4856 00002831 E87401 call unlockdrive 4857 00002834 9D popf 4858 00002835 BA[8F4D] mov dx, writing 4859 .ww1: 4860 00002838 731C jnc .ww3 ; if no error 4861 0000283A 3C0C cmp al, dskerrs.after_last - 1 4862 0000283C 7602 jbe .ww2 ; if in range 4863 0000283E B00C mov al, dskerrs.after_last - 1 4864 .ww2: 4865 00002840 98 cbw ; ah = 0 4866 00002841 BB[C04C] mov bx, dskerrs ; -> byte table 4867 00002844 D7 xlatb ; get offset from dskerrs 4868 00002845 01D8 add ax, bx ; -> message 4869 00002847 92 xchg ax, dx ; dx-> diskerrs message 4870 00002848 E868FE call disp_msg_asciz 4871 0000284B 92 xchg ax, dx ; dx-> writing/reading 4872 0000284C E864FE call disp_msg_asciz 4873 0000284F BA[954D] mov dx, drive ; dx-> "ing drive _" 4874 00002852 E85EFE call disp_msg_asciz 4875 .ww3_error: 4876 00002855 F9 stc 4877 .ww3: 4878 00002856 5E pop si 4879 00002857 59 pop cx 4880 00002858 5B pop bx 4881 00002859 5A pop dx 4882 0000285A 58 pop ax 4883 0000285B 9C pushf 4884 0000285C 40 inc ax 4885 0000285D 7501 jnz @F 4886 0000285F 42 inc dx 4887 @@: 4888 00002860 035EDC add bx, word [bp + ldBytesPerSector] 4889 00002863 9D popf 4890 00002864 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: 4903 00002865 50 push ax 4904 00002866 52 push dx 4905 00002867 53 push bx 4906 00002868 51 push cx 4907 00002869 56 push si 4908 .plw1: 4909 0000286A 833E[3808]00 cmp word [cmd_line_image_file.name], 0 4910 0000286F 742D je .drive 4911 4912 00002871 57 push di 4913 00002872 53 push bx 4914 00002873 E89F00 call image_seek 4915 00002876 5A pop dx 4916 00002877 5F pop di 4917 00002878 721C jc .image_fail_seek 4918 4919 0000287A 8B0E[1008] mov cx, word [m_sector_size] 4920 0000287E B43F mov ah, 3Fh 4921 00002880 F9 stc 4922 00002881 CD21 int 21h 4923 00002883 7308 jnc @F 4924 00002885 BA[153B] mov dx, msg.image_fail.read 4925 00002888 E81AEF call disp_dos_error 4926 0000288B EBC8 jmp write_sector.ww3_error 4927 4928 @@: 4929 0000288D 39C8 cmp ax, cx 4930 0000288F 74C5 je write_sector.ww3 ; (NC) 4931 00002891 BA[303B] mov dx, msg.image_fail_enough.read 4932 00002894 EB03 jmp @F 4933 4934 .image_fail_seek: 4935 00002896 BA[F13A] mov dx, msg.image_fail_seek.read 4936 @@: 4937 00002899 E817FE call disp_msg_asciz 4938 0000289C EBB7 jmp write_sector.ww3_error 4939 4940 .drive: 4941 0000289E 51 push cx 4942 0000289F 80C141 add cl, 'A' 4943 000028A2 880E[9F4D] mov byte [driveno], cl 4944 000028A6 59 pop cx 4945 000028A7 F606[D829]07 testopt [internalflags], oldpacket| newpacket| ntpacket 4946 000028AC 7513 jnz .plw3 ; if using a packet --> 4947 000028AE 85D2 test dx, dx 4948 000028B0 7556 jnz .error_sector_not_found 4949 000028B2 92 xchg ax, dx ; dx = sector to read 4950 000028B3 91 xchg ax, cx ; al = drive number 4951 000028B4 B90100 mov cx, 1 4952 .oldint: 4953 000028B7 55 push bp 4954 000028B8 57 push di 4955 000028B9 CD25 int 25h 4956 000028BB 44 inc sp 4957 000028BC 44 inc sp 4958 000028BD 5F pop di 4959 000028BE 5D pop bp 4960 000028BF EB49 jmp .done 4961 4962 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 4963 .plw3: 4964 000028C1 53 push bx 4965 000028C2 BB[042A] mov bx, packet 4966 000028C5 8907 mov word [bx+0], ax ; LoWord sector number 4967 000028C7 895702 mov word [bx+2], dx ; HiWord sector number 4968 000028CA C747040100 mov word [bx+4], 1 ; number of sectors 4969 000028CF 88C8 mov al, cl 4970 000028D1 8F4706 pop word [bx+6] ; transfer address ofs 4971 000028D4 8C5F08 mov word [bx+8], ds ; transfer address seg 4972 000028D7 B9FFFF mov cx, -1 4973 4974 000028DA E8A600 call lockdrive 4975 4976 000028DD 36F606[D829]06 testopt [ss:internalflags], newpacket| ntpacket 4977 000028E3 74D2 jz .oldint 4978 000028E5 88C2 mov dl, al ; A: = 0, ... 4979 000028E7 BE0000 mov si, 0000h ; read, assume "unknown data" 4980 %if _VDD 4981 000028EA F606[D829]04 testopt [internalflags], ntpacket 4982 000028EF 750A jnz .vdd 4983 %endif 4984 000028F1 FEC2 inc dl ; A: = 1, ... 4985 000028F3 B80573 mov ax, 7305h ; ds:(e)bx-> packet 4986 000028F6 F9 stc 4987 000028F7 CD21 int 21h 4988 000028F9 EB0F jmp short .done 4989 %if _VDD 4990 .vdd: 4991 000028FB A1[E429] mov ax, word [hVdd] 4992 000028FE B90500 mov cx, 5 4993 00002901 C4C4580290 DispatchCall 4994 00002906 EB02 jmp short .done 4995 %endif 4996 .error_sector_not_found: 4997 00002908 B008 mov al, 8 ; "sector not found" 4998 .done: 4999 0000290A 9C pushf 5000 0000290B E89A00 call unlockdrive 5001 0000290E 9D popf 5002 0000290F BA[894D] mov dx, reading 5003 00002912 E923FF jmp write_sector.ww1 5004 5005 5006 image_seek: 5007 00002915 BE[0008] mov si, m_seek 5008 00002918 BF[1008] mov di, m_sector_size 5009 0000291B E8ADDE call multiply_dxax_dword_di_to_qword_si 5010 0000291E BFF8FF mov di, -8 5011 00002921 F8 clc 5012 @@: 5013 00002922 8B85[1008] mov ax, word [m_offset + 8 + di] 5014 00002926 1185[0808] adc word [m_seek + 8 + di], ax 5015 0000292A 47 inc di 5016 0000292B 47 inc di 5017 0000292C 75F4 jnz @B 5018 0000292E 722F jc .image_fail_seek 5019 5020 00002930 BF[3808] mov di, cmd_line_image_file 5021 00002933 56 push si 5022 00002934 E888ED call open_file_readwrite 5023 00002937 5E pop si 5024 00002938 7225 jc .image_fail_seek 5025 5026 0000293A B84271 mov ax, 7142h 5027 0000293D 89F2 mov dx, si 5028 0000293F B100 mov cl, 0 5029 00002941 F9 stc 5030 00002942 CD21 int 21h 5031 00002944 7318 jnc .image_seek_done 5032 00002946 837C0400 cmp word [si + 4], 0 5033 0000294A 7513 jnz .image_fail_seek 5034 0000294C 837C0600 cmp word [si + 6], 0 5035 00002950 750D jnz .image_fail_seek 5036 00002952 8B14 mov dx, word [si] 5037 00002954 8B4C02 mov cx, word [si + 2] 5038 00002957 B80042 mov ax, 4200h 5039 0000295A CD21 int 21h 5040 0000295C 7201 jc .image_fail_seek 5041 .image_seek_done: 5042 0000295E A8 db __TEST_IMM8 ; (NC, skip stc) 5043 .image_fail_seek: 5044 0000295F F9 stc 5045 00002960 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 5056 00002961 57 push di 5057 00002962 BF0002 mov di, 512 5058 .loop: 5059 00002965 E81EFE call write_sector 5060 00002968 7206 jc .error 5061 0000296A 2B7EDC sub di, word [bp + ldBytesPerSector] 5062 0000296D 77F6 ja .loop 5063 0000296F F8 clc 5064 .error: 5065 00002970 5F pop di 5066 00002971 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: 5076 00002972 57 push di 5077 00002973 BF0002 mov di, 512 5078 .loop: 5079 00002976 E8ECFE call read_sector 5080 00002979 7206 jc .error 5081 0000297B 2B7EDC sub di, word [bp + ldBytesPerSector] 5082 0000297E 77F6 ja .loop 5083 00002980 F8 clc 5084 .error: 5085 00002981 5F pop di 5086 00002982 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: 5094 00002983 50 push ax 5095 00002984 53 push bx 5096 00002985 51 push cx 5097 00002986 52 push dx 5098 00002987 368A1E[EE29] mov bl, byte [ss:drivenumber] 5099 0000298C FEC3 inc bl 5100 0000298E B700 mov bh, 0 5101 00002990 B94A08 mov cx, 084Ah 5102 00002993 BA0100 mov dx, 0001h 5103 00002996 B80D44 mov ax, 440Dh 5104 00002999 CD21 int 21h 5105 0000299B 7206 jc @F 5106 0000299D 36800E[D829]08 setopt [ss:internalflags], locked 5107 ; NC 5108 @@: 5109 000029A3 5A pop dx 5110 000029A4 59 pop cx 5111 000029A5 5B pop bx 5112 000029A6 58 pop ax 5113 000029A7 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: 5121 000029A8 50 push ax 5122 000029A9 53 push bx 5123 000029AA 51 push cx 5124 000029AB 52 push dx 5125 000029AC 36F606[D829]08 testopt [ss:internalflags], locked 5126 000029B2 741C jz @F ; --> (NC) 5127 000029B4 368A1E[EE29] mov bl, byte [ss:drivenumber] 5128 000029B9 FEC3 inc bl 5129 000029BB B700 mov bh, 0 5130 000029BD B96A08 mov cx, 086Ah 5131 000029C0 BA0100 mov dx, 0001h 5132 000029C3 B80D44 mov ax, 440Dh 5133 000029C6 CD21 int 21h 5134 000029C8 7206 jc @F 5135 000029CA 368026[D829]F7 clropt [ss:internalflags], locked 5136 ; NC 5137 @@: 5138 000029D0 5A pop dx 5139 000029D1 59 pop cx 5140 000029D2 5B pop bx 5141 000029D3 58 pop ax 5142 000029D4 C3 retn 5143 5144 5145 000029D5 00 align 4, db 0 5146 000029D8 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 5158 000029DC 00 oemname: times 8 db 0 5159 000029E4 0000 hVdd: dw 0 5160 000029E6 FFFF load_unit: dw -1 5161 000029E8 FFFF load_use_partinfo: dw -1 5162 000029EA FFFF load_use_query_geometry:dw -1 5163 000029EC FFFF load_use_lba: dw -1 5164 000029EE 00 drivenumber: db 0 5165 5166 000029EF 00 align 4, db 0 5167 info_reset_struc: 5168 .signature1: 5169 000029F0 52526141 dd FSINFO.signature1_value 5170 .signature1_size: equ $ - .signature1 5171 .signature2_plus_entries: 5172 000029F4 72724161 dd FSINFO.signature2_value 5173 000029F8 FFFFFFFF dd -1 5174 000029FC FFFFFFFF dd -1 5175 .signature2_plus_entries_size: equ $ - .signature2_plus_entries 5176 .signature3: 5177 00002A00 000055AA dd FSINFO.signature3_value 5178 .signature3_size: equ $ - .signature3 5179 5180 align 4, db 0 5181 00002A04 00000000 packet: dd 0 ; sector number 5182 00002A08 0000 dw 0 ; number of sectors to read 5183 00002A0A 00000000 dd 0 ; transfer address Segm:OOOO 5184 5185 struc GINFO 5186 giAutoLowSingleHigh: 5187 00000000 ?? giAuto: resb 1 5188 00000001 ?? giSingle: resb 1 5189 00000002 ???????? giValue: resd 1 5190 00000006 ?? giLength: resb 1 5191 00000007 ?? giOffset: resb 1 5192 00000008 ???? giName: resw 1 5193 endstruc 5194 5195 g_table: 5196 5197 g_heads: 5198 00002A0E 0000 .auto_low_single_high: dw 0 5199 00002A10 00000000 .value: dd 0 5200 00002A14 02 .length: db 2 5201 00002A15 0F .offset: db bpbCHSHeads 5202 00002A16 [5F3E] .name: dw msg.g_heads 5203 5204 g_sectors: 5205 00002A18 0000 .auto_low_single_high: dw 0 5206 00002A1A 00000000 .value: dd 0 5207 00002A1E 02 .length: db 2 5208 00002A1F 0D .offset: db bpbCHSSectors 5209 00002A20 [6A3E] .name: dw msg.g_sectors 5210 5211 g_hidden: 5212 00002A22 0000 .auto_low_single_high: dw 0 5213 00002A24 00000000 .value: dd 0 5214 00002A28 04 .length: db 4 5215 00002A29 11 .offset: db bpbHiddenSectors 5216 00002A2A [773E] .name: dw msg.g_hidden 5217 5218 g_table_end: 5219 5220 5221 msg: 5222 00002A2C 494E5354534543543A- .help: db "INSTSECT: Install boot sectors. 2018--2024 by E. C. Masloch",13,10 5222 00002A35 20496E7374616C6C20- 5222 00002A3E 626F6F742073656374- 5222 00002A47 6F72732E2032303138- 5222 00002A50 2D2D32303234206279- 5222 00002A59 20452E20432E204D61- 5222 00002A62 736C6F63680D0A 5223 00002A69 0D0A db 13,10 5224 00002A6B 5573616765206F6620- db "Usage of the works is permitted provided that this",13,10 5224 00002A74 74686520776F726B73- 5224 00002A7D 206973207065726D69- 5224 00002A86 747465642070726F76- 5224 00002A8F 696465642074686174- 5224 00002A98 20746869730D0A 5225 00002A9F 696E737472756D656E- db "instrument is retained with the works, so that any entity",13,10 5225 00002AA8 742069732072657461- 5225 00002AB1 696E65642077697468- 5225 00002ABA 2074686520776F726B- 5225 00002AC3 732C20736F20746861- 5225 00002ACC 7420616E7920656E74- 5225 00002AD5 6974790D0A 5226 00002ADA 746861742075736573- db "that uses the works is notified of this instrument.",13,10 5226 00002AE3 2074686520776F726B- 5226 00002AEC 73206973206E6F7469- 5226 00002AF5 66696564206F662074- 5226 00002AFE 68697320696E737472- 5226 00002B07 756D656E742E0D0A 5227 00002B0F 0D0A db 13,10 5228 00002B11 444953434C41494D45- db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 5228 00002B1A 523A2054484520574F- 5228 00002B23 524B53204152452057- 5228 00002B2C 4954484F5554205741- 5228 00002B35 5252414E54592E0D0A 5229 00002B3E 0D0A db 13,10 5230 00002B40 4F7074696F6E733A0D- db "Options:",13,10 5230 00002B49 0A 5231 00002B4A 09613A09096C6F6164- db 9,"a:",9,9,"load or update boot sectors of specified drive",13,10 5231 00002B53 206F72207570646174- 5231 00002B5C 6520626F6F74207365- 5231 00002B65 63746F7273206F6620- 5231 00002B6E 737065636966696564- 5231 00002B77 2064726976650D0A 5232 00002B7F 092F4D3D66696C656E- db 9,"/M=filename",9,"operate on FS image file instead of drive",13,10 5232 00002B88 616D65096F70657261- 5232 00002B91 7465206F6E20465320- 5232 00002B9A 696D6167652066696C- 5232 00002BA3 6520696E7374656164- 5232 00002BAC 206F66206472697665- 5232 00002BB5 0D0A 5233 00002BB7 092F4D4E09096F7065- db 9,"/MN",9,9,"operate on drive instead of image file (default)",13,10 5233 00002BC0 72617465206F6E2064- 5233 00002BC9 7269766520696E7374- 5233 00002BD2 656164206F6620696D- 5233 00002BDB 6167652066696C6520- 5233 00002BE4 2864656661756C7429- 5233 00002BED 0D0A 5234 00002BEF 092F4D533D6E756D62- db 9,"/MS=number",9,"set sector size of FS image file (default 512)",13,10 5234 00002BF8 657209736574207365- 5234 00002C01 63746F722073697A65- 5234 00002C0A 206F6620465320696D- 5234 00002C13 6167652066696C6520- 5234 00002C1C 2864656661756C7420- 5234 00002C25 353132290D0A 5235 00002C2B 092F4D4F3D6E756D62- db 9,"/MO=number",9,"set offset in image file in bytes (default 0)",13,10 5235 00002C34 657209736574206F66- 5235 00002C3D 6673657420696E2069- 5235 00002C46 6D6167652066696C65- 5235 00002C4F 20696E206279746573- 5235 00002C58 202864656661756C74- 5235 00002C61 2030290D0A 5236 00002C66 092F4D4F783D6E756D- db 9,"/MOx=number",9,"set offset (x = S sectors, K 1024, M 1024 * 1024)",13,10 5236 00002C6F 62657209736574206F- 5236 00002C78 666673657420287820- 5236 00002C81 3D205320736563746F- 5236 00002C8A 72732C204B20313032- 5236 00002C93 342C204D2031303234- 5236 00002C9C 202A2031303234290D- 5236 00002CA5 0A 5237 00002CA6 0D0A db 13,10 5238 %if _NUM_REPLACEMENTS 5239 _autodigitsstrdef DEF, _NUM_REPLACEMENTS 5240 00002CA8 092F46783D66696C65- db 9,"/Fx=filename",9,"replace Xth name in the boot sector, X = 1 to ",_DEF,13,10 5240 00002CB1 6E616D65097265706C- 5240 00002CBA 61636520587468206E- 5240 00002CC3 616D6520696E207468- 5240 00002CCC 6520626F6F74207365- 5240 00002CD5 63746F722C2058203D- 5240 00002CDE 203120746F20340D0A 5241 00002CE7 092F463D66696C656E- db 9,"/F=filename",9,"alias to /F1=filename",13,10 5241 00002CF0 616D6509616C696173- 5241 00002CF9 20746F202F46313D66- 5241 00002D02 696C656E616D650D0A 5242 00002D0B 0D0A db 13,10 5243 %endif 5244 00002D0D 092F55204B45455009- db 9,"/U KEEP",9,9,"keep default/current boot unit handling (default)",13,10 5244 00002D16 096B65657020646566- 5244 00002D1F 61756C742F63757272- 5244 00002D28 656E7420626F6F7420- 5244 00002D31 756E69742068616E64- 5244 00002D3A 6C696E672028646566- 5244 00002D43 61756C74290D0A 5245 00002D4A 092F55204155544F09- db 9,"/U AUTO",9,9,"patch boot loader to use auto boot unit handling",13,10 5245 00002D53 09706174636820626F- 5245 00002D5C 6F74206C6F61646572- 5245 00002D65 20746F207573652061- 5245 00002D6E 75746F20626F6F7420- 5245 00002D77 756E69742068616E64- 5245 00002D80 6C696E670D0A 5246 00002D86 092F55207878090970- db 9,"/U xx",9,9,"patch boot loader to use XXh as a fixed unit",13,10 5246 00002D8F 6174636820626F6F74- 5246 00002D98 206C6F616465722074- 5246 00002DA1 6F2075736520585868- 5246 00002DAA 206173206120666978- 5246 00002DB3 656420756E69740D0A 5247 00002DBC 0D0A db 13,10 5248 00002DBE 092F50204B45455009- db 9,"/P KEEP",9,9,"keep default/current part info handling (default)",13,10 5248 00002DC7 096B65657020646566- 5248 00002DD0 61756C742F63757272- 5248 00002DD9 656E74207061727420- 5248 00002DE2 696E666F2068616E64- 5248 00002DEB 6C696E672028646566- 5248 00002DF4 61756C74290D0A 5249 00002DFB 092F50204155544F09- db 9,"/P AUTO",9,9,"patch boot loader to use auto part info handling",13,10 5249 00002E04 09706174636820626F- 5249 00002E0D 6F74206C6F61646572- 5249 00002E16 20746F207573652061- 5249 00002E1F 75746F207061727420- 5249 00002E28 696E666F2068616E64- 5249 00002E31 6C696E670D0A 5250 00002E37 092F50204E4F4E4509- db 9,"/P NONE",9,9,"patch boot loader to use fixed part info",13,10 5250 00002E40 09706174636820626F- 5250 00002E49 6F74206C6F61646572- 5250 00002E52 20746F207573652066- 5250 00002E5B 697865642070617274- 5250 00002E64 20696E666F0D0A 5251 00002E6B 0D0A db 13,10 5252 00002E6D 092F51204B45455009- db 9,"/Q KEEP",9,9,"keep default/current query geometry handling (default)",13,10 5252 00002E76 096B65657020646566- 5252 00002E7F 61756C742F63757272- 5252 00002E88 656E74207175657279- 5252 00002E91 2067656F6D65747279- 5252 00002E9A 2068616E646C696E67- 5252 00002EA3 202864656661756C74- 5252 00002EAC 290D0A 5253 00002EAF 092F51204155544F09- db 9,"/Q AUTO",9,9,"patch boot loader to use auto query geometry handling",13,10 5253 00002EB8 09706174636820626F- 5253 00002EC1 6F74206C6F61646572- 5253 00002ECA 20746F207573652061- 5253 00002ED3 75746F207175657279- 5253 00002EDC 2067656F6D65747279- 5253 00002EE5 2068616E646C696E67- 5253 00002EEE 0D0A 5254 00002EF0 092F51204E4F4E4509- db 9,"/Q NONE",9,9,"patch boot loader to use fixed geometry",13,10 5254 00002EF9 09706174636820626F- 5254 00002F02 6F74206C6F61646572- 5254 00002F0B 20746F207573652066- 5254 00002F14 697865642067656F6D- 5254 00002F1D 657472790D0A 5255 00002F23 0D0A db 13,10 5256 00002F25 092F4C204B45455009- db 9,"/L KEEP",9,9,"keep default/current LBA handling (default)",13,10 5256 00002F2E 096B65657020646566- 5256 00002F37 61756C742F63757272- 5256 00002F40 656E74204C42412068- 5256 00002F49 616E646C696E672028- 5256 00002F52 64656661756C74290D- 5256 00002F5B 0A 5257 00002F5C 092F4C204155544F09- db 9,"/L AUTO",9,9,"patch boot loader to use auto LBA handling",13,10 5257 00002F65 09706174636820626F- 5257 00002F6E 6F74206C6F61646572- 5257 00002F77 20746F207573652061- 5257 00002F80 75746F204C42412068- 5257 00002F89 616E646C696E670D0A 5258 00002F92 092F4C204155544F48- db 9,"/L AUTOHDD",9,"patch boot loader to use auto LBA (HDD-only) handling",13,10 5258 00002F9B 444409706174636820- 5258 00002FA4 626F6F74206C6F6164- 5258 00002FAD 657220746F20757365- 5258 00002FB6 206175746F204C4241- 5258 00002FBF 20284844442D6F6E6C- 5258 00002FC8 79292068616E646C69- 5258 00002FD1 6E670D0A 5259 00002FD5 092F4C204E4F4E4509- db 9,"/L NONE",9,9,"patch boot loader to use only CHS",13,10 5259 00002FDE 09706174636820626F- 5259 00002FE7 6F74206C6F61646572- 5259 00002FF0 20746F20757365206F- 5259 00002FF9 6E6C79204348530D0A 5260 00003002 0D0A db 13,10 5261 00003004 092F47204B45455009- db 9,"/G KEEP",9,9,"keep all current geometry (default)",13,10 5261 0000300D 096B65657020616C6C- 5261 00003016 2063757272656E7420- 5261 0000301F 67656F6D6574727920- 5261 00003028 2864656661756C7429- 5261 00003031 0D0A 5262 00003033 092F47204155544F09- db 9,"/G AUTO",9,9,"read all auto geometry from DOS",13,10 5262 0000303C 097265616420616C6C- 5262 00003045 206175746F2067656F- 5262 0000304E 6D657472792066726F- 5262 00003057 6D20444F530D0A 5263 0000305E 092F47204845414453- db 9,"/G HEADS=x",9,"set geometry CHS heads (x = KEEP, AUTO, numeric)",13,10 5263 00003067 3D7809736574206765- 5263 00003070 6F6D65747279204348- 5263 00003079 532068656164732028- 5263 00003082 78203D204B4545502C- 5263 0000308B 204155544F2C206E75- 5263 00003094 6D65726963290D0A 5264 0000309C 092F4720534543544F- db 9,"/G SECTORS=x",9,"set geometry CHS sectors (x = KEEP, AUTO, numeric)",13,10 5264 000030A5 52533D780973657420- 5264 000030AE 67656F6D6574727920- 5264 000030B7 43485320736563746F- 5264 000030C0 7273202878203D204B- 5264 000030C9 4545502C204155544F- 5264 000030D2 2C206E756D65726963- 5264 000030DB 290D0A 5265 000030DE 092F47204849444445- db 9,"/G HIDDEN=x",9,"set geometry hidden (x = KEEP, AUTO, numeric)",13,10 5265 000030E7 4E3D78097365742067- 5265 000030F0 656F6D657472792068- 5265 000030F9 696464656E20287820- 5265 00003102 3D204B4545502C2041- 5265 0000310B 55544F2C206E756D65- 5265 00003114 726963290D0A 5266 0000311A 0D0A db 13,10 5267 0000311C 092F53520909646F20- db 9,"/SR",9,9,"do not read boot sector from source file (default)",13,10 5267 00003125 6E6F74207265616420- 5267 0000312E 626F6F742073656374- 5267 00003137 6F722066726F6D2073- 5267 00003140 6F757263652066696C- 5267 00003149 65202864656661756C- 5267 00003152 74290D0A 5268 00003156 092F533D66696C656E- db 9,"/S=filename",9,"read boot sector loader from source file",13,10 5268 0000315F 616D65097265616420- 5268 00003168 626F6F742073656374- 5268 00003171 6F72206C6F61646572- 5268 0000317A 2066726F6D20736F75- 5268 00003183 7263652066696C650D- 5268 0000318C 0A 5269 0000318D 092F5331323D66696C- db 9,"/S12=filename",9,"as /S=filename but only for FAT12 (also /S16, /S32)",13,10 5269 00003196 656E616D6509617320- 5269 0000319F 2F533D66696C656E61- 5269 000031A8 6D6520627574206F6E- 5269 000031B1 6C7920666F72204641- 5269 000031BA 5431322028616C736F- 5269 000031C3 202F5331362C202F53- 5269 000031CC 3332290D0A 5270 000031D1 092F5356090976616C- db 9,"/SV",9,9,"validate boot sector jump and FS ID (default)",13,10 5270 000031DA 696461746520626F6F- 5270 000031E3 7420736563746F7220- 5270 000031EC 6A756D7020616E6420- 5270 000031F5 465320494420286465- 5270 000031FE 6661756C74290D0A 5271 00003206 092F534E0909646F20- db 9,"/SN",9,9,"do not validate boot sector jump and FS ID",13,10 5271 0000320F 6E6F742076616C6964- 5271 00003218 61746520626F6F7420- 5271 00003221 736563746F72206A75- 5271 0000322A 6D7020616E64204653- 5271 00003233 2049440D0A 5272 %if _FAT32 5273 00003238 092F5349090976616C- db 9,"/SI",9,9,"validate FAT32 FSIBOOT compatibility (default)",13,10 5273 00003241 696461746520464154- 5273 0000324A 333220465349424F4F- 5273 00003253 5420636F6D70617469- 5273 0000325C 62696C697479202864- 5273 00003265 656661756C74290D0A 5274 0000326E 092F534A0909646F20- db 9,"/SJ",9,9,"do not validate FAT32 FSIBOOT compatiblity",13,10 5274 00003277 6E6F742076616C6964- 5274 00003280 617465204641543332- 5274 00003289 20465349424F4F5420- 5274 00003292 636F6D70617469626C- 5274 0000329B 6974790D0A 5275 000032A0 092F53473D7369676E- db 9,"/SG=sign",9,"check for FAT32 FSIBOOT exact signature match",13,10 5275 000032A9 09636865636B20666F- 5275 000032B2 722046415433322046- 5275 000032BB 5349424F4F54206578- 5275 000032C4 616374207369676E61- 5275 000032CD 74757265206D617463- 5275 000032D6 680D0A 5276 %endif 5277 000032D9 0D0A db 13,10 5278 000032DB 092F42530909777269- db 9,"/BS",9,9,"write boot sector to drive's boot sector (default)",13,10 5278 000032E4 746520626F6F742073- 5278 000032ED 6563746F7220746F20- 5278 000032F6 647269766527732062- 5278 000032FF 6F6F7420736563746F- 5278 00003308 72202864656661756C- 5278 00003311 74290D0A 5279 00003315 092F423D66696C656E- db 9,"/B=filename",9,"write boot sector to file, not to drive",13,10 5279 0000331E 616D65097772697465- 5279 00003327 20626F6F7420736563- 5279 00003330 746F7220746F206669- 5279 00003339 6C652C206E6F742074- 5279 00003342 6F2064726976650D0A 5280 0000334B 092F424E0909646F20- db 9,"/BN",9,9,"do not write boot sector",13,10 5280 00003354 6E6F74207772697465- 5280 0000335D 20626F6F7420736563- 5280 00003366 746F720D0A 5281 0000336B 092F42520909726570- db 9,"/BR",9,9,"replace boot sector loader with built-in one (default)",13,10 5281 00003374 6C61636520626F6F74- 5281 0000337D 20736563746F72206C- 5281 00003386 6F6164657220776974- 5281 0000338F 68206275696C742D69- 5281 00003398 6E206F6E6520286465- 5281 000033A1 6661756C74290D0A 5282 000033A9 092F424F09096B6565- db 9,"/BO",9,9,"keep original boot sector",13,10 5282 000033B2 70206F726967696E61- 5282 000033BB 6C20626F6F74207365- 5282 000033C4 63746F720D0A 5283 %if _FAT32 5284 000033CA 092F42430909726573- db 9,"/BC",9,9,"restore boot sector from backup copy",13,10 5284 000033D3 746F726520626F6F74- 5284 000033DC 20736563746F722066- 5284 000033E5 726F6D206261636B75- 5284 000033EE 7020636F70790D0A 5285 000033F6 0D0A db 13,10 5286 000033F8 4F6E6C79206170706C- db "Only applicable for FAT32 with sector size below or equal to 512 bytes:",13,10 5286 00003401 696361626C6520666F- 5286 0000340A 722046415433322077- 5286 00003413 69746820736563746F- 5286 0000341C 722073697A65206265- 5286 00003425 6C6F77206F72206571- 5286 0000342E 75616C20746F203531- 5286 00003437 322062797465733A0D- 5286 00003440 0A 5287 00003441 092F49530909777269- db 9,"/IS",9,9,"write FSIBOOT to drive's FSINFO sector (default)",13,10 5287 0000344A 746520465349424F4F- 5287 00003453 5420746F2064726976- 5287 0000345C 652773204653494E46- 5287 00003465 4F20736563746F7220- 5287 0000346E 2864656661756C7429- 5287 00003477 0D0A 5288 00003479 092F493D66696C656E- db 9,"/I=filename",9,"write FSIBOOT to file, not to drive",13,10 5288 00003482 616D65097772697465- 5288 0000348B 20465349424F4F5420- 5288 00003494 746F2066696C652C20- 5288 0000349D 6E6F7420746F206472- 5288 000034A6 6976650D0A 5289 000034AB 092F49420909777269- db 9,"/IB",9,9,"write FSIBOOT to boot sector file (see /B=filename)",13,10 5289 000034B4 746520465349424F4F- 5289 000034BD 5420746F20626F6F74- 5289 000034C6 20736563746F722066- 5289 000034CF 696C65202873656520- 5289 000034D8 2F423D66696C656E61- 5289 000034E1 6D65290D0A 5290 000034E6 092F494E0909646F20- db 9,"/IN",9,9,"do not write FSIBOOT",13,10 5290 000034EF 6E6F74207772697465- 5290 000034F8 20465349424F4F540D- 5290 00003501 0A 5291 00003502 092F49520909726570- db 9,"/IR",9,9,"replace reserved field with built-in FSIBOOT (default)",13,10 5291 0000350B 6C6163652072657365- 5291 00003514 72766564206669656C- 5291 0000351D 642077697468206275- 5291 00003526 696C742D696E204653- 5291 0000352F 49424F4F5420286465- 5291 00003538 6661756C74290D0A 5292 00003540 092F494F09096B6565- db 9,"/IO",9,9,"keep original reserved fields (including FSIBOOT area)",13,10 5292 00003549 70206F726967696E61- 5292 00003552 6C2072657365727665- 5292 0000355B 64206669656C647320- 5292 00003564 28696E636C7564696E- 5292 0000356D 6720465349424F4F54- 5292 00003576 2061726561290D0A 5293 0000357E 092F49430909726573- db 9,"/IC",9,9,"restore FSINFO from backup copy",13,10 5293 00003587 746F7265204653494E- 5293 00003590 464F2066726F6D2062- 5293 00003599 61636B757020636F70- 5293 000035A2 790D0A 5294 000035A5 092F495A09097A6572- db 9,"/IZ",9,9,"zero out reserved fields (including FSIBOOT area)",13,10 5294 000035AE 6F206F757420726573- 5294 000035B7 657276656420666965- 5294 000035C0 6C64732028696E636C- 5294 000035C9 7564696E6720465349- 5294 000035D2 424F4F542061726561- 5294 000035DB 290D0A 5295 000035DE 092F494909096C6561- db 9,"/II",9,9,"leave invalid FSINFO structure",13,10 5295 000035E7 766520696E76616C69- 5295 000035F0 64204653494E464F20- 5295 000035F9 737472756374757265- 5295 00003602 0D0A 5296 00003604 092F495609096D616B- db 9,"/IV",9,9,"make valid FSINFO if there is none (default)",13,10 5296 0000360D 652076616C69642046- 5296 00003616 53494E464F20696620- 5296 0000361F 746865726520697320- 5296 00003628 6E6F6E652028646566- 5296 00003631 61756C74290D0A 5297 00003638 0D0A db 13,10 5298 0000363A 4F6E6C79206170706C- db "Only applicable for FAT32:",13,10 5298 00003643 696361626C6520666F- 5298 0000364C 722046415433323A0D- 5298 00003655 0A 5299 00003656 092F430909666F7263- db 9,"/C",9,9,"force writing to backup copies",13,10 5299 0000365F 652077726974696E67- 5299 00003668 20746F206261636B75- 5299 00003671 7020636F706965730D- 5299 0000367A 0A 5300 0000367B 092F43420909666F72- db 9,"/CB",9,9,"force writing sector to backup copy",13,10 5300 00003684 63652077726974696E- 5300 0000368D 6720736563746F7220- 5300 00003696 746F206261636B7570- 5300 0000369F 20636F70790D0A 5301 000036A6 092F43490909666F72- db 9,"/CI",9,9,"force writing info to backup copy",13,10 5301 000036AF 63652077726974696E- 5301 000036B8 6720696E666F20746F- 5301 000036C1 206261636B75702063- 5301 000036CA 6F70790D0A 5302 000036CF 092F434E0909646973- db 9,"/CN",9,9,"disable writing to backup copies",13,10 5302 000036D8 61626C652077726974- 5302 000036E1 696E6720746F206261- 5302 000036EA 636B757020636F7069- 5302 000036F3 65730D0A 5303 000036F7 092F434E4209096469- db 9,"/CNB",9,9,"disable writing sector to backup copy",13,10 5303 00003700 7361626C6520777269- 5303 00003709 74696E672073656374- 5303 00003712 6F7220746F20626163- 5303 0000371B 6B757020636F70790D- 5303 00003724 0A 5304 00003725 092F434E4909096469- db 9,"/CNI",9,9,"disable writing info to backup copy",13,10 5304 0000372E 7361626C6520777269- 5304 00003737 74696E6720696E666F- 5304 00003740 20746F206261636B75- 5304 00003749 7020636F70790D0A 5305 00003751 092F435309096F6E6C- db 9,"/CS",9,9,"only write backup copies if writing sectors (default)",13,10 5305 0000375A 792077726974652062- 5305 00003763 61636B757020636F70- 5305 0000376C 696573206966207772- 5305 00003775 6974696E6720736563- 5305 0000377E 746F72732028646566- 5305 00003787 61756C74290D0A 5306 0000378E 092F43534209096F6E- db 9,"/CSB",9,9,"only write sector to backup copy if writing sector",13,10 5306 00003797 6C7920777269746520- 5306 000037A0 736563746F7220746F- 5306 000037A9 206261636B75702063- 5306 000037B2 6F7079206966207772- 5306 000037BB 6974696E6720736563- 5306 000037C4 746F720D0A 5307 000037C9 092F43534909096F6E- db 9,"/CSI",9,9,"only write info to backup copy if writing sector",13,10 5307 000037D2 6C7920777269746520- 5307 000037DB 696E666F20746F2062- 5307 000037E4 61636B757020636F70- 5307 000037ED 792069662077726974- 5307 000037F6 696E6720736563746F- 5307 000037FF 720D0A 5308 %endif 5309 00003802 00 asciz 5310 5311 00003803 416363657373206572- .boot_access_error: asciz "Access error.", 13,10 5311 0000380C 726F722E0D0A00 5312 00003813 536563746F72207369- .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 5312 0000381C 7A6520746F6F20736D- 5312 00003825 616C6C20283C203332- 5312 0000382E 206279746573292E0D- 5312 00003837 0A00 5313 00003839 536563746F72207369- .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 5313 00003842 7A6520746F6F206C61- 5313 0000384B 72676520283E203831- 5313 00003854 393220627974657329- 5313 0000385D 2E0D0A00 5314 00003861 536563746F72207369- .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 5314 0000386A 7A65206E6F74206120- 5314 00003873 706F776572206F6620- 5314 0000387C 74776F2E0D0A00 5315 00003883 4F7574206F66206D65- .out_of_memory: asciz "Out of memory.",13,10 5315 0000388C 6D6F72792E0D0A00 5316 00003894 537769746368206E6F- .switch_not_supported: asciz "Switch not supported.",13,10 5316 0000389D 7420737570706F7274- 5316 000038A6 65642E0D0A00 5317 000038AC 537769746368202F4F- .o_error: asciz "Switch /O invalid content.",13,10 5317 000038B5 20696E76616C696420- 5317 000038BE 636F6E74656E742E0D- 5317 000038C7 0A00 5318 000038C9 496E76616C69642061- .invalid_argument: asciz "Invalid argument.",13,10 5318 000038D2 7267756D656E742E0D- 5318 000038DB 0A00 5319 000038DD 4E6F20647269766520- .no_drive_specified: asciz "No drive specified.",13,10 5319 000038E6 737065636966696564- 5319 000038EF 2E0D0A00 5320 000038F3 4D756C7469706C6520- .error_multiple_drives: asciz "Multiple drives specified.",13,10 5320 000038FC 647269766573207370- 5320 00003905 656369666965642E0D- 5320 0000390E 0A00 5321 .drive_and_image_specified: 5322 00003910 447269766520616E64- asciz "Drive and FS image specified.",13,10 5322 00003919 20465320696D616765- 5322 00003922 207370656369666965- 5322 0000392B 642E0D0A00 5323 .no_sector_file_specified: 5324 00003930 4E6F20626F6F742073- asciz "No boot sector file specified for /IB switch.",13,10 5324 00003939 6563746F722066696C- 5324 00003942 652073706563696669- 5324 0000394B 656420666F72202F49- 5324 00003954 42207377697463682E- 5324 0000395D 0D0A00 5325 00003960 426F6F742073656374- .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 5325 00003969 6F72207369676E6174- 5325 00003972 757265206D69737369- 5325 0000397B 6E6720286973206E6F- 5325 00003984 74204141353568292E- 5325 0000398D 0D0A00 5326 00003990 42696720626F6F7420- .bootfail_sig2: asciz "Big boot sector signature missing (is not AA55h).",13,10 5326 00003999 736563746F72207369- 5326 000039A2 676E6174757265206D- 5326 000039AB 697373696E67202869- 5326 000039B4 73206E6F7420414135- 5326 000039BD 3568292E0D0A00 5327 .bootfail_secsizeinvalid: 5328 000039C4 536563746F72207369- asciz "Sector size is invalid (not a power of two).",13,10 5328 000039CD 7A6520697320696E76- 5328 000039D6 616C696420286E6F74- 5328 000039DF 206120706F77657220- 5328 000039E8 6F662074776F292E0D- 5328 000039F1 0A00 5329 .bootfail_secsizediffer: 5330 000039F3 425042204270532064- asciz "BPB BpS differs from actual sector size.",13,10 5330 000039FC 696666657273206672- 5330 00003A05 6F6D2061637475616C- 5330 00003A0E 20736563746F722073- 5330 00003A17 697A652E0D0A00 5331 00003A1E 42616420616D6F756E- .boot_badclusters: asciz "Bad amount of clusters.",13,10 5331 00003A27 74206F6620636C7573- 5331 00003A30 746572732E0D0A00 5332 00003A38 42616420636C757374- .boot_badchain: asciz "Bad cluster chain.",13,10 5332 00003A41 657220636861696E2E- 5332 00003A4A 0D0A00 5333 5334 00003A4D 4572726F723A204175- .g_auto_failed: asciz "Error: Auto geometry DOS call failed.",13,10 5334 00003A56 746F2067656F6D6574- 5334 00003A5F 727920444F53206361- 5334 00003A68 6C6C206661696C6564- 5334 00003A71 2E0D0A00 5335 00003A75 4572726F723A204175- .g_no_auto_image: asciz "Error: Auto geometry on image file not supported.",13,10 5335 00003A7E 746F2067656F6D6574- 5335 00003A87 7279206F6E20696D61- 5335 00003A90 67652066696C65206E- 5335 00003A99 6F7420737570706F72- 5335 00003AA2 7465642E0D0A00 5336 00003AA9 4572726F7220777269- .image_fail.write: asciz "Error writing image file, " 5336 00003AB2 74696E6720696D6167- 5336 00003ABB 652066696C652C2000 5337 .image_fail_enough.write: 5338 00003AC4 4572726F723A204469- asciz "Error: Did not write enough to image file.",13,10 5338 00003ACD 64206E6F7420777269- 5338 00003AD6 746520656E6F756768- 5338 00003ADF 20746F20696D616765- 5338 00003AE8 2066696C652E0D0A00 5339 .image_fail_seek.read: 5340 00003AF1 4572726F723A204661- .image_fail_seek.write: asciz "Error: Failed to seek image file.",13,10 5340 00003AFA 696C656420746F2073- 5340 00003B03 65656B20696D616765- 5340 00003B0C 2066696C652E0D0A00 5341 00003B15 4572726F7220726561- .image_fail.read: asciz "Error reading image file, " 5341 00003B1E 64696E6720696D6167- 5341 00003B27 652066696C652C2000 5342 .image_fail_enough.read: 5343 00003B30 4572726F723A204469- asciz "Error: Did not read enough from image file.",13,10 5343 00003B39 64206E6F7420726561- 5343 00003B42 6420656E6F75676820- 5343 00003B4B 66726F6D20696D6167- 5343 00003B54 652066696C652E0D0A- 5343 00003B5D 00 5344 00003B5E 4E6F204653494E464F- .no_fsinfo: asciz "No FSINFO sector found.",13,10 5344 00003B67 20736563746F722066- 5344 00003B70 6F756E642E0D0A00 5345 .not_yet_non_fsinfo: 5346 00003B78 464154333220776974- asciz "FAT32 with two sectors and not FSINFO not yet supported.",13,10 5346 00003B81 682074776F20736563- 5346 00003B8A 746F727320616E6420- 5346 00003B93 6E6F74204653494E46- 5346 00003B9C 4F206E6F7420796574- 5346 00003BA5 20737570706F727465- 5346 00003BAE 642E0D0A00 5347 00003BB3 4572726F723A20536F- .wrong_size: asciz "Error: Source file has wrong size, expected 512 or (FAT32-only) 1024 bytes.",13,10 5347 00003BBC 757263652066696C65- 5347 00003BC5 206861732077726F6E- 5347 00003BCE 672073697A652C2065- 5347 00003BD7 787065637465642035- 5347 00003BE0 3132206F7220284641- 5347 00003BE9 5433322D6F6E6C7929- 5347 00003BF2 203130323420627974- 5347 00003BFB 65732E0D0A00 5348 .critical_fail_fsinfo_changed: 5349 00003C01 4661696C7572652074- asciz "Failure to write back original FSINFO!",13,10 5349 00003C0A 6F2077726974652062- 5349 00003C13 61636B206F72696769- 5349 00003C1C 6E616C204653494E46- 5349 00003C25 4F210D0A00 5350 00003C2A 446574656374656420- .is_fat12: asciz "Detected FAT12 FS.",13,10 5350 00003C33 46415431322046532E- 5350 00003C3C 0D0A00 5351 00003C3F 446574656374656420- .is_fat16: asciz "Detected FAT16 FS.",13,10 5351 00003C48 46415431362046532E- 5351 00003C51 0D0A00 5352 00003C54 446574656374656420- .is_fat32: asciz "Detected FAT32 FS.",13,10 5352 00003C5D 46415433322046532E- 5352 00003C66 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 5359 00003C69 00 align 4, db 0 5360 load_kernel_name: equ $ 5361 00003C6C 00 times 12 db 0 5362 ; buffer for base name (8) + ext (3) + NUL (1) = 12 5363 %if _NUM_REPLACEMENTS 5364 .name_replacements: 5365 00003C78 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: 5370 00003CA8 00 times 8+1+3+1 db 0 5371 ; buffer for base name (8) + dot (1) + ext (3) + NUL (1) 5372 00003CB5 00 align 2, db 0 5373 .foundname_none: 5374 00003CB6 284E6F6E652900 asciz "(None)" 5375 .foundname_none_size: equ $ - .foundname_none 5376 00003CBD 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 5380 00003CC0 [D23C]0000 <1> dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 5380 00003CC4 [DB3C]0000 <1> dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 5380 00003CC8 [E43C]0000 <1> dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 5380 00003CCC [ED3C]0000 <1> dw .name_ %+ ii, 0 5381 <1> %assign ii ii + 1 5383 00003CD0 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 5406 00003CD2 317374206E616D6500 <1> .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 5406 00003CDB 326E64206E616D6500 <1> .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 5406 00003CE4 337264206E616D6500 <1> .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 5406 00003CED 347468206E616D6500 <1> .name_ %+ ii: asciz _DEF,suffix," name" 5407 <1> %assign ii ii + 1 5409 00003CF6 3A2000 .name_before: asciz ": " 5410 00003CF9 2200 .name_quote: asciz '"' 5411 00003CFB 0D0A00 .name_after: asciz 13,10 5412 00003CFE 4E6F206E616D652064- .name_none: asciz "No name detected.",13,10 5412 00003D07 657465637465642E0D- 5412 00003D10 0A00 5413 5414 %if _NUM_REPLACEMENTS 5415 00003D12 4E6F2000 .no_name_found_before: asciz "No " 5416 00003D16 20666F72207265706C- .no_name_found_after: asciz " for replacement found!",13,10 5416 00003D1F 6163656D656E742066- 5416 00003D28 6F756E64210D0A00 5417 5418 00003D30 5265706C6163696E67- .replacing_before: asciz "Replacing " 5418 00003D39 2000 5419 00003D3B 2077697468202200 .replacing_between: asciz " with ",'"' 5420 00003D43 222E0D0A00 .replacing_after: asciz '".',13,10 5421 %endif 5422 %endif 5423 5424 align 2, db 0 5425 00003D48 464154313220- .fat12sig: fill 8, 32, db "FAT12" 5425 00003D48 5426 00003D50 464154313620- .fat16sig: fill 8, 32, db "FAT16" 5426 00003D50 5427 00003D58 464154333220- .fat32sig: fill 8, 32, db "FAT32" 5427 00003D58 5428 .sector_invalid_no_jump: 5429 00003D60 536563746F7220696E- asciz "Sector invalid, no jump instruction.",13,10 5429 00003D69 76616C69642C206E6F- 5429 00003D72 206A756D7020696E73- 5429 00003D7B 7472756374696F6E2E- 5429 00003D84 0D0A00 5430 .sector_invalid_too_short_jump: 5431 00003D87 536563746F7220696E- asciz "Sector invalid, too short jump.",13,10 5431 00003D90 76616C69642C20746F- 5431 00003D99 6F2073686F7274206A- 5431 00003DA2 756D702E0D0A00 5432 .sector_invalid_too_long_jump: 5433 00003DA9 536563746F7220696E- asciz "Sector invalid, too long jump.",13,10 5433 00003DB2 76616C69642C20746F- 5433 00003DBB 6F206C6F6E67206A75- 5433 00003DC4 6D702E0D0A00 5434 .sector_valid: 5435 00003DCA 536563746F72207661- asciz "Sector valid, FS ID match and proper jump.",13,10 5435 00003DD3 6C69642C2046532049- 5435 00003DDC 44206D617463682061- 5435 00003DE5 6E642070726F706572- 5435 00003DEE 206A756D702E0D0A00 5436 .sector_invalid_no_id: 5437 00003DF7 536563746F7220696E- asciz "Sector invalid, no FS ID match.",13,10 5437 00003E00 76616C69642C206E6F- 5437 00003E09 204653204944206D61- 5437 00003E12 7463682E0D0A00 5438 .allowing_sector_invalid: 5439 00003E19 416C6C6F77696E6720- asciz "Allowing invalid sector: " 5439 00003E22 696E76616C69642073- 5439 00003E2B 6563746F723A2000 5440 5441 00003E33 4B45455000 .keep: asciz "KEEP" 5442 00003E38 4155544F00 .auto: asciz "AUTO" 5443 00003E3D 4155544F48444400 .autohdd: asciz "AUTOHDD" 5444 00003E45 4E4F4E4500 .none: asciz "NONE" 5445 00003E4A 484541445300 .heads: asciz "HEADS" 5446 00003E50 534543544F525300 .sectors: asciz "SECTORS" 5447 00003E58 48494444454E00 .hidden: asciz "HIDDEN" 5448 00003E5F 204348532048656164- .g_heads: asciz " CHS Heads" 5448 00003E68 7300 5449 00003E6A 204348532053656374- .g_sectors: asciz " CHS Sectors" 5449 00003E73 6F727300 5450 00003E77 2048696464656E00 .g_hidden: asciz " Hidden" 5451 00003E7F 0D0A00 .linebreak: asciz 13,10 5452 00003E82 2C2000 .comma: asciz ", " 5453 00003E85 50726576696F757320- .g_previous: asciz "Previous geometry: " 5453 00003E8E 67656F6D657472793A- 5453 00003E97 2000 5454 00003E99 557064617465642067- .g_updated: asciz "Updated geometry: " 5454 00003EA2 656F6D657472793A20- 5454 00003EAB 00 5455 00003EAC 496E76616C6964206E- .error_invalid_number: asciz "Invalid number.",13,10 5455 00003EB5 756D6265722E0D0A00 5456 00003EBE 205573696E67206669- .using_fix_unit: asciz " Using fixed unit of " 5456 00003EC7 78656420756E697420- 5456 00003ED0 6F662000 5457 00003ED4 682E0D0A00 .using_fix_unit_after: asciz "h.",13,10 5458 00003ED9 4572726F723A20556E- .unit_not_found: asciz "Error: Unit selection code not found in sector.",13,10 5458 00003EE2 69742073656C656374- 5458 00003EEB 696F6E20636F646520- 5458 00003EF4 6E6F7420666F756E64- 5458 00003EFD 20696E20736563746F- 5458 00003F06 722E0D0A00 5459 00003F0B 556E69742073656C65- .unit_not_found.keep: asciz "Unit selection code not found in sector. Keeping as is.",13,10 5459 00003F14 6374696F6E20636F64- 5459 00003F1D 65206E6F7420666F75- 5459 00003F26 6E6420696E20736563- 5459 00003F2F 746F722E204B656570- 5459 00003F38 696E67206173206973- 5459 00003F41 2E0D0A00 5460 00003F45 4175746F20756E6974- .unit_found.set_bpbn: asciz "Auto unit selection found in sector." 5460 00003F4E 2073656C656374696F- 5460 00003F57 6E20666F756E642069- 5460 00003F60 6E20736563746F722E- 5460 00003F69 00 5461 00003F6A 466978656420756E69- .unit_found.set_dl: asciz "Fixed unit selection found in sector, unit " 5461 00003F73 742073656C65637469- 5461 00003F7C 6F6E20666F756E6420- 5461 00003F85 696E20736563746F72- 5461 00003F8E 2C20756E69742000 5462 .unit_found.set_dl.after: 5463 00003F96 682E00 asciz "h." 5464 .lba_found.keeping: 5465 .query_found.keeping: 5466 .partinfo_found.keeping: 5467 00003F99 204B656570696E6720- .unit_found.keeping: asciz " Keeping as is.",13,10 5467 00003FA2 61732069732E0D0A00 5468 00003FAB 205573696E67206175- .using_auto_unit: asciz " Using auto unit.",13,10 5468 00003FB4 746F20756E69742E0D- 5468 00003FBD 0A00 5469 5470 00003FBF 205573696E67206669- .using_fix_partinfo: asciz " Using fixed part info.",13,10 5470 00003FC8 786564207061727420- 5470 00003FD1 696E666F2E0D0A00 5471 00003FD9 4572726F723A205061- .partinfo_not_found: asciz "Error: Part info code not found in sector.",13,10 5471 00003FE2 727420696E666F2063- 5471 00003FEB 6F6465206E6F742066- 5471 00003FF4 6F756E6420696E2073- 5471 00003FFD 6563746F722E0D0A00 5472 00004006 5061727420696E666F- .partinfo_not_found.keep:asciz "Part info code not found in sector. Keeping as is.",13,10 5472 0000400F 20636F6465206E6F74- 5472 00004018 20666F756E6420696E- 5472 00004021 20736563746F722E20- 5472 0000402A 4B656570696E672061- 5472 00004033 732069732E0D0A00 5473 0000403B 4175746F2070617274- .partinfo_found.mov: asciz "Auto part info found in sector." 5473 00004044 20696E666F20666F75- 5473 0000404D 6E6420696E20736563- 5473 00004056 746F722E00 5474 0000405B 466978656420706172- .partinfo_found.keep: asciz "Fixed part info found in sector." 5474 00004064 7420696E666F20666F- 5474 0000406D 756E6420696E207365- 5474 00004076 63746F722E00 5475 0000407C 205573696E67206175- .using_auto_partinfo: asciz " Using auto part info.",13,10 5475 00004085 746F20706172742069- 5475 0000408E 6E666F2E0D0A00 5476 5477 00004095 205573696E67206669- .using_fix_query: asciz " Using fixed geometry.",13,10 5477 0000409E 7865642067656F6D65- 5477 000040A7 7472792E0D0A00 5478 000040AE 4572726F723A205175- .query_not_found: asciz "Error: Query geometry code not found in sector.",13,10 5478 000040B7 6572792067656F6D65- 5478 000040C0 74727920636F646520- 5478 000040C9 6E6F7420666F756E64- 5478 000040D2 20696E20736563746F- 5478 000040DB 722E0D0A00 5479 000040E0 51756572792067656F- .query_not_found.keep: asciz "Query geometry code not found in sector. Keeping as is.",13,10 5479 000040E9 6D6574727920636F64- 5479 000040F2 65206E6F7420666F75- 5479 000040FB 6E6420696E20736563- 5479 00004104 746F722E204B656570- 5479 0000410D 696E67206173206973- 5479 00004116 2E0D0A00 5480 0000411A 4175746F2071756572- .query_found.query: asciz "Auto query geometry found in sector." 5480 00004123 792067656F6D657472- 5480 0000412C 7920666F756E642069- 5480 00004135 6E20736563746F722E- 5480 0000413E 00 5481 0000413F 46697865642067656F- .query_found.keep: asciz "Fixed geometry (disabled query) found in sector." 5481 00004148 6D6574727920286469- 5481 00004151 7361626C6564207175- 5481 0000415A 6572792920666F756E- 5481 00004163 6420696E2073656374- 5481 0000416C 6F722E00 5482 00004170 205573696E67206175- .using_auto_query: asciz " Using auto query geometry.",13,10 5482 00004179 746F20717565727920- 5482 00004182 67656F6D657472792E- 5482 0000418B 0D0A00 5483 5484 0000418E 205573696E67206E6F- .using_none_lba: asciz " Using no LBA.",13,10 5484 00004197 204C42412E0D0A00 5485 0000419F 205573696E67206175- .using_auto_lba: asciz " Using auto LBA detection.",13,10 5485 000041A8 746F204C4241206465- 5485 000041B1 74656374696F6E2E0D- 5485 000041BA 0A00 5486 000041BC 4572726F723A204C42- .lba_not_found: asciz "Error: LBA detection not found in sector.",13,10 5486 000041C5 412064657465637469- 5486 000041CE 6F6E206E6F7420666F- 5486 000041D7 756E6420696E207365- 5486 000041E0 63746F722E0D0A00 5487 000041E8 4C4241206465746563- .lba_not_found.keep: asciz "LBA detection not found in sector. Keeping as is.",13,10 5487 000041F1 74696F6E206E6F7420- 5487 000041FA 666F756E6420696E20- 5487 00004203 736563746F722E204B- 5487 0000420C 656570696E67206173- 5487 00004215 2069732E0D0A00 5488 0000421C 20666F756E6420696E- .lba_found_suffix: asciz " found in sector." 5488 00004225 20736563746F722E00 5489 0000422E 0D0A4572726F723A20- .lba_autohdd_not_found: asciz 13,10,"Error: Cannot patch this LBA detection to auto detection for HDD only.",13,10 5489 00004237 43616E6E6F74207061- 5489 00004240 746368207468697320- 5489 00004249 4C4241206465746563- 5489 00004252 74696F6E20746F2061- 5489 0000425B 75746F206465746563- 5489 00004264 74696F6E20666F7220- 5489 0000426D 484444206F6E6C792E- 5489 00004276 0D0A00 5490 00004279 205573696E67206175- .using_autohdd_lba: asciz " Using auto LBA detection (HDD only).",13,10 5490 00004282 746F204C4241206465- 5490 0000428B 74656374696F6E2028- 5490 00004294 484444206F6E6C7929- 5490 0000429D 2E0D0A00 5491 5492 000042A1 4E6565642046534942- .fsi_not_found: db "Need FSIBOOT: " 5492 000042AA 4F4F543A20 5493 000042AF 284E6F6E6520666F75- .none_found: asciz "(None found.)",13,10 5493 000042B8 6E642E290D0A00 5494 000042BF 4E6565642046534942- .fsi_found.1: asciz "Need FSIBOOT: " 5494 000042C8 4F4F543A2000 5495 000042CE 486176652046534942- .fsi_provided.1: asciz "Have FSIBOOT: " 5495 000042D7 4F4F543A2000 5496 000042DD 4E6565646564204653- .fsi_mismatch.1: asciz "Needed FSIBOOT doesn't match " 5496 000042E6 49424F4F5420646F65- 5496 000042EF 736E2774206D617463- 5496 000042F8 682000 5497 000042FB 436865636B20465349- .fsi_mismatch.3: asciz "Check FSIBOOT doesn't match " 5497 00004304 424F4F5420646F6573- 5497 0000430D 6E2774206D61746368- 5497 00004316 2000 5498 00004318 776861742069732066- .fsi_mismatch.2.big: asciz "what is found in the big sector.",13,10 5498 00004321 6F756E6420696E2074- 5498 0000432A 686520626967207365- 5498 00004333 63746F722E0D0A00 5499 0000433B 617320746865726520- .fsi_mismatch.2.none: asciz "as there is no FSINFO sector.",13,10 5499 00004344 6973206E6F20465349- 5499 0000434D 4E464F20736563746F- 5499 00004356 722E0D0A00 5500 0000435B 776861742069732066- .fsi_mismatch.2.found: asciz "what is found in FSINFO sector.",13,10 5500 00004364 6F756E6420696E2046- 5500 0000436D 53494E464F20736563- 5500 00004376 746F722E0D0A00 5501 0000437D 776861742069732061- .fsi_mismatch.2.install:asciz "what is about to be installed.",13,10 5501 00004386 626F757420746F2062- 5501 0000438F 6520696E7374616C6C- 5501 00004398 65642E0D0A00 5502 0000439E 20556E6B6E6F776E20- .fsi_unknown: asciz " Unknown FSIBOOT revision.",13,10 5502 000043A7 465349424F4F542072- 5502 000043B0 65766973696F6E2E0D- 5502 000043B9 0A00 5503 000043BB 2000 .fsi_known.1: asciz " " 5504 000043BD 0D0A00 .fsi_known.2: asciz 13,10 5505 000043C0 465349424F4F54 .signature.fsiboot: db "FSIBOOT" 5506 000043C7 465349424558 .signature.fsibex: db "FSIBEX" 5507 000043CD 206C444F5320667574- .future_fsiboot: db " lDOS future FSIBOOT rev " 5507 000043D6 75726520465349424F- 5507 000043DF 4F542072657620 5508 000043E6 580D0A00 .future_fsiboot.revision:asciz "X",13,10 5509 000043EA 206C444F5320667574- .future_fsibex: db " lDOS future FSIBOOT experimental rev " 5509 000043F3 75726520465349424F- 5509 000043FC 4F5420657870657269- 5509 00004405 6D656E74616C207265- 5509 0000440E 7620 5510 00004410 58580D0A00 .future_fsibex.revision:asciz "XX",13,10 5511 00004415 547970652068657572- .type_not_found: asciz "Type heuristic: (None found.)",13,10 5511 0000441E 69737469633A20284E- 5511 00004427 6F6E6520666F756E64- 5511 00004430 2E290D0A00 5512 00004435 547970652068657572- .type_found.1: asciz "Type heuristic: ",22h 5512 0000443E 69737469633A202200 5513 00004447 2200 .fsi_found.2: asciz 22h 5514 00004449 220D0A00 .type_found.2: asciz 22h,13,10 5515 5516 .switch_requires_filename: 5517 0000444D 537769746368207265- asciz "Switch requires a filename.",13,10 5517 00004456 717569726573206120- 5517 0000445F 66696C656E616D652E- 5517 00004468 0D0A00 5518 .switch_filename_missing_unquote: 5519 0000446B 537769746368206669- asciz "Switch filename missing ending quote.",13,10 5519 00004474 6C656E616D65206D69- 5519 0000447D 7373696E6720656E64- 5519 00004486 696E672071756F7465- 5519 0000448F 2E0D0A00 5520 .switch_filename_empty: 5521 00004493 537769746368206669- asciz "Switch filename is empty.",13,10 5521 0000449C 6C656E616D65206973- 5521 000044A5 20656D7074792E0D0A- 5521 000044AE 00 5522 5523 000044AF 56616C696420465349- .info_valid: asciz "Valid FSINFO entries detected.",13,10 5523 000044B8 4E464F20656E747269- 5523 000044C1 657320646574656374- 5523 000044CA 65642E0D0A00 5524 000044D0 5761726E696E673A20- .info_invalid_allowing: asciz "Warning: Invalid FSINFO entries, allowing.",13,10 5524 000044D9 496E76616C69642046- 5524 000044E2 53494E464F20656E74- 5524 000044EB 726965732C20616C6C- 5524 000044F4 6F77696E672E0D0A00 5525 000044FD 526573657474696E67- .info_invalid_resetting:asciz "Resetting invalid FSINFO entries.",13,10 5525 00004506 20696E76616C696420- 5525 0000450F 4653494E464F20656E- 5525 00004518 74726965732E0D0A00 5526 00004521 4E6F74207772697469- .info_writing_not: asciz "Not writing FSINFO.",13,10 5526 0000452A 6E67204653494E464F- 5526 00004533 2E0D0A00 5527 .info_writing_sector_file: 5528 00004537 57726974696E672046- asciz "Writing FSINFO to boot sector file.",13,10 5528 00004540 53494E464F20746F20- 5528 00004549 626F6F742073656374- 5528 00004552 6F722066696C652E0D- 5528 0000455B 0A00 5529 0000455D 57726974696E672046- .info_writing_file: asciz "Writing FSINFO to file.",13,10 5529 00004566 53494E464F20746F20- 5529 0000456F 66696C652E0D0A00 5530 00004577 57726974696E672046- .info_writing_sector: asciz "Writing FSINFO to sector.",13,10 5530 00004580 53494E464F20746F20- 5530 00004589 736563746F722E0D0A- 5530 00004592 00 5531 00004593 4E6F74207772697469- .sector_writing_not: asciz "Not writing boot sector.",13,10 5531 0000459C 6E6720626F6F742073- 5531 000045A5 6563746F722E0D0A00 5532 000045AE 57726974696E672062- .sector_writing_file: asciz "Writing boot sector to file.",13,10 5532 000045B7 6F6F7420736563746F- 5532 000045C0 7220746F2066696C65- 5532 000045C9 2E0D0A00 5533 000045CD 57726974696E672062- .sector_writing_sector: asciz "Writing boot sector to sector.",13,10 5533 000045D6 6F6F7420736563746F- 5533 000045DF 7220746F2073656374- 5533 000045E8 6F722E0D0A00 5534 000045EE 4572726F7220776869- .info_restoring_sector: db "Error while writing boot sector," 5534 000045F7 6C652077726974696E- 5534 00004600 6720626F6F74207365- 5534 00004609 63746F722C 5535 0000460E 20726573746F72696E- asciz " restoring FSINFO sector.",13,10 5535 00004617 67204653494E464F20- 5535 00004620 736563746F722E0D0A- 5535 00004629 00 5536 0000462A 446574656374656420- .backup: asciz "Detected backup copy.",13,10 5536 00004633 6261636B757020636F- 5536 0000463C 70792E0D0A00 5537 00004642 446574656374656420- .no_backup: asciz "Detected no backup copy.",13,10 5537 0000464B 6E6F206261636B7570- 5537 00004654 20636F70792E0D0A00 5538 0000465D 446574656374656420- .backup_no_info: asciz "Detected backup copy without FSINFO.",13,10 5538 00004666 6261636B757020636F- 5538 0000466F 707920776974686F75- 5538 00004678 74204653494E464F2E- 5538 00004681 0D0A00 5539 00004684 57726974696E672062- .backup_writing_sector: asciz "Writing boot sector to backup copy.",13,10 5539 0000468D 6F6F7420736563746F- 5539 00004696 7220746F206261636B- 5539 0000469F 757020636F70792E0D- 5539 000046A8 0A00 5540 000046AA 57726974696E672046- .backup_writing_info: asciz "Writing FSINFO to backup copy.",13,10 5540 000046B3 53494E464F20746F20- 5540 000046BC 6261636B757020636F- 5540 000046C5 70792E0D0A00 5541 .backup_not_writing_sector: 5542 000046CB 4E6F74207772697469- asciz "Not writing boot sector to backup copy.",13,10 5542 000046D4 6E6720626F6F742073- 5542 000046DD 6563746F7220746F20- 5542 000046E6 6261636B757020636F- 5542 000046EF 70792E0D0A00 5543 .backup_not_writing_info: 5544 000046F5 4E6F74207772697469- asciz "Not writing FSINFO to backup copy.",13,10 5544 000046FE 6E67204653494E464F- 5544 00004707 20746F206261636B75- 5544 00004710 7020636F70792E0D0A- 5544 00004719 00 5545 0000471A 4572726F7220776869- .backup_error_sector: asciz "Error while writing boot sector to backup copy.",13,10 5545 00004723 6C652077726974696E- 5545 0000472C 6720626F6F74207365- 5545 00004735 63746F7220746F2062- 5545 0000473E 61636B757020636F70- 5545 00004747 792E0D0A00 5546 0000474C 4572726F7220776869- .backup_error_info: asciz "Error while writing FSINFO to backup copy.",13,10 5546 00004755 6C652077726974696E- 5546 0000475E 67204653494E464F20- 5546 00004767 746F206261636B7570- 5546 00004770 20636F70792E0D0A00 5547 00004779 4572726F723A204E6F- .missing_backup_sector: asciz "Error: No backup copy of boot sector available.",13,10 5547 00004782 206261636B75702063- 5547 0000478B 6F7079206F6620626F- 5547 00004794 6F7420736563746F72- 5547 0000479D 20617661696C61626C- 5547 000047A6 652E0D0A00 5548 000047AB 4572726F723A204E6F- .missing_backup_info: asciz "Error: No backup copy of info sector available.",13,10 5548 000047B4 206261636B75702063- 5548 000047BD 6F7079206F6620696E- 5548 000047C6 666F20736563746F72- 5548 000047CF 20617661696C61626C- 5548 000047D8 652E0D0A00 5549 000047DD 436F7079696E672073- .copy_sector: asciz "Copying sector loader from backup copy.",13,10 5549 000047E6 6563746F72206C6F61- 5549 000047EF 6465722066726F6D20- 5549 000047F8 6261636B757020636F- 5549 00004801 70792E0D0A00 5550 00004807 4B656570696E67206F- .leave_sector: asciz "Keeping original sector loader.",13,10 5550 00004810 726967696E616C2073- 5550 00004819 6563746F72206C6F61- 5550 00004822 6465722E0D0A00 5551 00004829 5265706C6163696E67- .replace_sector: asciz "Replacing sector loader.",13,10 5551 00004832 20736563746F72206C- 5551 0000483B 6F616465722E0D0A00 5552 00004844 5265706C6163696E67- .replace_sector_file: asciz "Replacing sector loader from file.",13,10 5552 0000484D 20736563746F72206C- 5552 00004856 6F616465722066726F- 5552 0000485F 6D2066696C652E0D0A- 5552 00004868 00 5553 00004869 436F7079696E672046- .copy_info: asciz "Copying FSINFO from backup copy.",13,10 5553 00004872 53494E464F2066726F- 5553 0000487B 6D206261636B757020- 5553 00004884 636F70792E0D0A00 5554 0000488C 5A65726F696E672046- .zero_info: asciz "Zeroing FSINFO reserved fields.",13,10 5554 00004895 53494E464F20726573- 5554 0000489E 657276656420666965- 5554 000048A7 6C64732E0D0A00 5555 000048AE 4B656570696E67206F- .leave_info: asciz "Keeping original FSINFO.",13,10 5555 000048B7 726967696E616C2046- 5555 000048C0 53494E464F2E0D0A00 5556 000048C9 5265706C6163696E67- .replace_info: asciz "Replacing FSIBOOT.",13,10 5556 000048D2 20465349424F4F542E- 5556 000048DB 0D0A00 5557 000048DE 5265706C6163696E67- .replace_info_file: asciz "Replacing FSIBOOT from file.",13,10 5557 000048E7 20465349424F4F5420- 5557 000048F0 66726F6D2066696C65- 5557 000048F9 2E0D0A00 5558 5559 000048FD 4572726F72206F7065- .error_file_open_write: asciz "Error opening file for writing, " 5559 00004906 6E696E672066696C65- 5559 0000490F 20666F722077726974- 5559 00004918 696E672C2000 5560 0000491E 4572726F72206F7065- .error_file_open_read: asciz "Error opening file for reading, " 5560 00004927 6E696E672066696C65- 5560 00004930 20666F722072656164- 5560 00004939 696E672C2000 5561 .error_file_open_readwrite: 5562 0000493F 4572726F72206F7065- asciz "Error opening file for R/W, " 5562 00004948 6E696E672066696C65- 5562 00004951 20666F7220522F572C- 5562 0000495A 2000 5563 0000495C 4572726F7220777269- .error_file_write: asciz "Error writing file, " 5563 00004965 74696E672066696C65- 5563 0000496E 2C2000 5564 00004971 4572726F7220726561- .error_file_read: asciz "Error reading file, " 5564 0000497A 64696E672066696C65- 5564 00004983 2C2000 5565 00004986 4572726F7220736565- .error_file_seek: asciz "Error seeking file, " 5565 0000498F 6B696E672066696C65- 5565 00004998 2C2000 5566 symhint_store_string msg.dos_error_ 5567 0000499B 444F53206572726F72- .dos_error_msg_1: asciz "DOS error " 5567 000049A4 2000 5568 000049A6 68202800 .dos_error_msg_2: asciz "h (" 5569 000049AA 292E0D0A00 .dos_error_msg_3: asciz ").",13,10 5570 5571 000049AF 4E6F206572726F7200 .dos_error_0: asciz "No error" 5572 000049B8 496E76616C69642066- .dos_error_1: asciz "Invalid function" 5572 000049C1 756E6374696F6E00 5573 000049C9 46696C65206E6F7420- .dos_error_2: asciz "File not found" 5573 000049D2 666F756E6400 5574 000049D8 50617468206E6F7420- .dos_error_3: asciz "Path not found" 5574 000049E1 666F756E6400 5575 000049E7 4E6F2068616E646C65- .dos_error_4: asciz "No handles available" 5575 000049F0 7320617661696C6162- 5575 000049F9 6C6500 5576 000049FC 416363657373206465- .dos_error_5: asciz "Access denied" 5576 00004A05 6E69656400 5577 00004A0A 496E76616C69642068- .dos_error_6: asciz "Invalid handle" 5577 00004A13 616E646C6500 5578 00004A19 4D4342206465737472- .dos_error_7: asciz "MCB destroyed" 5578 00004A22 6F79656400 5579 00004A27 4F7574206F66206D65- .dos_error_8: asciz "Out of memory" 5579 00004A30 6D6F727900 5580 00004A35 4D434220696E76616C- .dos_error_9: asciz "MCB invalid" 5580 00004A3E 696400 5581 00004A41 456E7669726F6E6D65- .dos_error_10: asciz "Environment invalid" 5581 00004A4A 6E7420696E76616C69- 5581 00004A53 6400 5582 00004A55 466F726D617420696E- .dos_error_11: asciz "Format invalid" 5582 00004A5E 76616C696400 5583 00004A64 41636365737320636F- .dos_error_12: asciz "Access code invalid" 5583 00004A6D 646520696E76616C69- 5583 00004A76 6400 5584 00004A78 4461746120696E7661- .dos_error_13: asciz "Data invalid" 5584 00004A81 6C696400 5585 00004A85 4669787570206F7665- .dos_error_14: asciz "Fixup overflow" 5585 00004A8E 72666C6F7700 5586 00004A94 496E76616C69642064- .dos_error_15: asciz "Invalid drive" 5586 00004A9D 7269766500 5587 00004AA2 417474656D70746564- .dos_error_16: asciz "Attempted to remove current directory" 5587 00004AAB 20746F2072656D6F76- 5587 00004AB4 652063757272656E74- 5587 00004ABD 206469726563746F72- 5587 00004AC6 7900 5588 00004AC8 4E6F742073616D6520- .dos_error_17: asciz "Not same device" 5588 00004AD1 64657669636500 5589 00004AD8 4E6F206D6F72652066- .dos_error_18: asciz "No more files" 5589 00004AE1 696C657300 5590 00004AE6 4469736B2077726974- .dos_error_19: asciz "Disk write protected" 5590 00004AEF 652070726F74656374- 5590 00004AF8 656400 5591 00004AFB 556E6B6E6F776E2075- .dos_error_20: asciz "Unknown unit" 5591 00004B04 6E697400 5592 00004B08 4472697665206E6F74- .dos_error_21: asciz "Drive not ready" 5592 00004B11 20726561647900 5593 00004B18 556E6B6E6F776E2063- .dos_error_22: asciz "Unknown command" 5593 00004B21 6F6D6D616E6400 5594 00004B28 44617461206572726F- .dos_error_23: asciz "Data error" 5594 00004B31 7200 5595 00004B33 426164207265717565- .dos_error_24: asciz "Bad request structure length" 5595 00004B3C 737420737472756374- 5595 00004B45 757265206C656E6774- 5595 00004B4E 6800 5596 00004B50 5365656B206572726F- .dos_error_25: asciz "Seek error" 5596 00004B59 7200 5597 00004B5B 556E6B6E6F776E206D- .dos_error_26: asciz "Unknown media type" 5597 00004B64 656469612074797065- 5597 00004B6D 00 5598 00004B6E 536563746F72206E6F- .dos_error_27: asciz "Sector not found" 5598 00004B77 7420666F756E6400 5599 00004B7F 5072696E746572206F- .dos_error_28: asciz "Printer out of paper" 5599 00004B88 7574206F6620706170- 5599 00004B91 657200 5600 00004B94 577269746520666175- .dos_error_29: asciz "Write fault" 5600 00004B9D 6C7400 5601 00004BA0 52656164206661756C- .dos_error_30: asciz "Read fault" 5601 00004BA9 7400 5602 00004BAB 47656E6572616C2066- .dos_error_31: asciz "General failure" 5602 00004BB4 61696C75726500 5603 00004BBB 53686172696E672076- .dos_error_32: asciz "Sharing violation" 5603 00004BC4 696F6C6174696F6E00 5604 00004BCD 4C6F636B2076696F6C- .dos_error_33: asciz "Lock violation" 5604 00004BD6 6174696F6E00 5605 00004BDC 4469736B206368616E- .dos_error_34: asciz "Disk change invalid" 5605 00004BE5 676520696E76616C69- 5605 00004BEE 6400 5606 00004BF0 46434220756E617661- .dos_error_35: asciz "FCB unavailable" 5606 00004BF9 696C61626C6500 5607 00004C00 53686172696E672062- .dos_error_36: asciz "Sharing buffer overflow" 5607 00004C09 7566666572206F7665- 5607 00004C12 72666C6F7700 5608 00004C18 436F64652070616765- .dos_error_37: asciz "Code page mismatch" 5608 00004C21 206D69736D61746368- 5608 00004C2A 00 5609 00004C2B 43616E6E6F7420636F- .dos_error_38: asciz "Cannot complete file operation" 5609 00004C34 6D706C657465206669- 5609 00004C3D 6C65206F7065726174- 5609 00004C46 696F6E00 5610 00004C4A 496E73756666696369- .dos_error_39: asciz "Insufficient disk space" 5610 00004C53 656E74206469736B20- 5610 00004C5C 737061636500 5611 00004C62 556E6B6E6F776E2065- .dos_error_unknown: asciz "Unknown error" 5611 00004C6B 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 5621 00004C70 [AF49] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C72 [B849] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C74 [C949] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C76 [D849] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C78 [E749] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C7A [FC49] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C7C [0A4A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C7E [194A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C80 [274A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C82 [354A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C84 [414A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C86 [554A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C88 [644A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C8A [784A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C8C [854A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C8E [944A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C90 [A24A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C92 [C84A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C94 [D84A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C96 [E64A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C98 [FB4A] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C9A [084B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C9C [184B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004C9E [284B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CA0 [334B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CA2 [504B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CA4 [5B4B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CA6 [6E4B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CA8 [7F4B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CAA [944B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CAC [A04B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CAE [AB4B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CB0 [BB4B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CB2 [CD4B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CB4 [DC4B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CB6 [F04B] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CB8 [004C] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CBA [184C] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CBC [2B4C] <1> dw msg.dos_error_ %+ _NUMBER 5622 <1> %assign ii ii + 1 5619 <1> _autodigitsstrdef NUMBER, ii 5620 <1> %deftok _NUMBER _NUMBER 5621 00004CBE [4A4C] <1> 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 5635 00004CC0 0D <1> 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 5635 00004CC1 21 <1> 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 5635 00004CC2 34 <1> 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 5635 00004CC3 44 <1> 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 5635 00004CC4 54 <1> 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 5635 00004CC5 94 <1> 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 5635 00004CC6 65 <1> 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 5635 00004CC7 70 <1> 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 5635 00004CC8 83 <1> 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 5635 00004CC9 94 <1> 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 5635 00004CCA A2 <1> 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 5635 00004CCB AE <1> 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 5635 00004CCC B9 <1> db _NUMBER - dskerrs 5636 <1> %assign ii ii + 1 5638 .after_last: equ ($ - .) 5639 00004CCD 57726974652070726F- dskerr0: asciz "Write protect error" 5639 00004CD6 74656374206572726F- 5639 00004CDF 7200 5640 00004CE1 556E6B6E6F776E2075- dskerr1: asciz "Unknown unit error" 5640 00004CEA 6E6974206572726F72- 5640 00004CF3 00 5641 00004CF4 4472697665206E6F74- dskerr2: asciz "Drive not ready" 5641 00004CFD 20726561647900 5642 00004D04 556E6B6E6F776E2063- dskerr3: asciz "Unknown command" 5642 00004D0D 6F6D6D616E6400 5643 00004D14 44617461206572726F- dskerr4: asciz "Data error (CRC)" 5643 00004D1D 7220284352432900 5644 00004D25 5365656B206572726F- dskerr6: asciz "Seek error" 5644 00004D2E 7200 5645 00004D30 556E6B6E6F776E206D- dskerr7: asciz "Unknown media type" 5645 00004D39 656469612074797065- 5645 00004D42 00 5646 00004D43 536563746F72206E6F- dskerr8: asciz "Sector not found" 5646 00004D4C 7420666F756E6400 5647 dskerr5: 5648 00004D54 556E6B6E6F776E2065- dskerr9: asciz "Unknown error" 5648 00004D5D 72726F7200 5649 00004D62 577269746520666175- dskerrA: asciz "Write fault" 5649 00004D6B 6C7400 5650 00004D6E 52656164206661756C- dskerrB: asciz "Read fault" 5650 00004D77 7400 5651 00004D79 47656E6572616C2066- dskerrC: asciz "General failure" 5651 00004D82 61696C75726500 5652 00004D89 207265616400 reading: asciz " read" 5653 00004D8F 207772697400 writing: asciz " writ" 5654 00004D95 696E67206472697665- drive: db "ing drive " 5654 00004D9E 20 5655 00004D9F 5F0D0A00 driveno: asciz "_",13,10 5656 5657 5658 imsg: 5659 %if _VDD 5660 00004DA3 44454258585644442E- .vdd: asciz "DEBXXVDD.DLL" 5660 00004DAC 444C4C00 5661 00004DB0 446973706174636800 .dispatch: asciz "Dispatch" 5662 00004DB9 496E697400 .init: asciz "Init" 5663 align 2, db 0 5664 00004DBE 4D4F555345202020 .mouse: db "MOUSE",32,32,32 ; Looks like a device name 5665 00004DC6 416E64792057617473- .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 5665 00004DCF 6F6E 5666 endarea .andy 5667 00004DD1 57696E646F7773204E- .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 5667 00004DDA 54204D532D444F5320- 5667 00004DE3 73756273797374656D- 5667 00004DEC 204D6F757365204472- 5667 00004DF5 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: 5676 00004DF9 B80258 mov ax, 5802h ; Get UMB link state 5677 00004DFC CD21 int 21h 5678 00004DFE 30E4 xor ah, ah 5679 00004E00 50 push ax ; Save UMB link state 5680 00004E01 B80358 mov ax, 5803h ; Set UMB link state: 5681 00004E04 BB0100 mov bx, 1 ; Add UMBs to memory chain 5682 00004E07 CD21 int 21h 5683 00004E09 B452 mov ah, 52h 5684 00004E0B BBFFFF mov bx, -1 5685 00004E0E CD21 int 21h ; Get list of lists 5686 00004E10 43 inc bx ; 0FFFFh ? 5687 00004E11 7503E98600 jz .notnt ; invalid --> 5688 00004E16 268B47FD mov ax, word [es:bx-3] ; First MCB 5689 00004E1A 0E push cs 5690 00004E1B 07 pop es ; reset es 5691 .loop: 5692 00004E1C 8ED8 mov ds, ax ; ds = MCB 5693 00004E1E 40 inc ax ; Now segment of memory block itself 5694 00004E1F 31D2 xor dx, dx 5695 00004E21 31DB xor bx, bx 5696 00004E23 803F5A cmp byte [bx], 'Z' ; End of MCB chain? 5697 00004E26 7503 jne .notlast 5698 00004E28 42 inc dx 5699 00004E29 EB05 jmp short .notchain 5700 .notlast: 5701 00004E2B 803F4D cmp byte [bx], 'M' ; Valid MCB chain? 5702 00004E2E 756C jne .error 5703 .notchain: 5704 00004E30 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) 5709 00004E33 837F0108 cmp word [bx+1], 8 ; MCB owner DOS? 5710 00004E37 755D jne .notfound_1 5711 00004E39 817F085344 cmp word [bx+8], "SD" ; MCB name "SD"? 5712 00004E3E 7556 jne .notfound_1 5713 .loopsub: 5714 00004E40 8ED8 mov ds, ax ; SD sub-segment inside memory block 5715 00004E42 40 inc ax 5716 00004E43 49 dec cx 5717 00004E44 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 5722 00004E47 39E9 cmp cx, bp 5723 00004E49 724B jb .notfound_1 ; Goes beyond memory block, invalid --> 5724 00004E4B 803F51 cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 5725 00004E4E 753C jne .notfound_2 ; no --> 5726 00004E50 BE0800 mov si, 8 ; Offset of device name (if SD device driver sub-segment) 5727 00004E53 BF[BE4D] mov di, imsg.mouse 5728 00004E56 51 push cx 5729 00004E57 89F1 mov cx, si ; length of name 5730 00004E59 F3A6 repe cmpsb ; blank-padded device name "MOUSE" ? 5731 00004E5B 59 pop cx 5732 00004E5C 752E jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 5733 00004E5E 8CD8 mov ax, ds 5734 00004E60 40 inc ax 5735 00004E61 8ED8 mov ds, ax ; Segment of SD sub-segment 5736 ; ds = current SD sub-segment 5737 00004E63 89E8 mov ax, bp ; Leave paragraph value in bp 5738 00004E65 A900F0 test ax, 0F000h ; Would *16 cause an overflow? 5739 00004E68 7520 jnz .notfound_3 ; Then too large --> 5740 00004E6A 51 push cx 5741 00004E6B B104 mov cl, 4 5742 00004E6D D3E0 shl ax, cl ; *16 5743 00004E6F 59 pop cx 5744 ; ax = current SD sub-segment size in byte 5745 .andy: 5746 00004E70 BF[C64D] mov di, imsg.andy 5747 00004E73 51 push cx 5748 00004E74 B90B00 mov cx, imsg.andy_size 5749 00004E77 E82E00 call findstring ; String "Andy Watson"? 5750 00004E7A 59 pop cx 5751 00004E7B 720D jc .notfound_3 5752 .ntdos: 5753 00004E7D BF[D14D] mov di, imsg.ntdos 5754 00004E80 51 push cx 5755 00004E81 B92800 mov cx, imsg.ntdos_size 5756 00004E84 E82100 call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 5757 00004E87 59 pop cx 5758 00004E88 7313 jnc .found ; (NC) 5759 .notfound_3: 5760 00004E8A 8CD8 mov ax, ds 5761 .notfound_2: 5762 00004E8C 39E9 cmp cx, bp 5763 00004E8E 7406 je .notfound_1 ; End of SD memory block, get next MCB 5764 00004E90 01E8 add ax, bp ; Address next SD sub-MCB 5765 00004E92 29E9 sub cx, bp 5766 00004E94 EBAA jmp short .loopsub ; Try next SD sub-segment 5767 .notfound_1: 5768 00004E96 01C8 add ax, cx ; Address next MCB 5769 00004E98 85D2 test dx, dx ; Non-zero if 'Z' MCB 5770 00004E9A 7480 jz .loop ; If not at end of MCB chain, try next 5771 ; jmp short .notnt ; Otherwise, not found 5772 .error: 5773 .notnt: 5774 00004E9C F9 stc 5775 .found: 5776 00004E9D 0E push cs 5777 00004E9E 1F pop ds ; restore ds 5778 5779 00004E9F 5B pop bx ; saved UMB link state 5780 00004EA0 B80358 mov ax, 5803h 5781 00004EA3 9C pushf 5782 00004EA4 CD21 int 21h ; Set UMB link state 5783 00004EA6 9D popf 5784 00004EA7 C3 retn 5785 5786 findstring: 5787 00004EA8 31F6 xor si, si 5788 .loop: 5789 00004EAA 56 push si 5790 00004EAB 01CE add si, cx 5791 00004EAD 7203 jc .notfound_c 5792 00004EAF 4E dec si ; The largest offset we need for this compare 5793 00004EB0 39F0 cmp ax, si 5794 .notfound_c: 5795 00004EB2 5E pop si 5796 00004EB3 720D jb .return ; Not found if at top of memory block --> 5797 00004EB5 57 push di 5798 00004EB6 56 push si 5799 00004EB7 51 push cx 5800 00004EB8 F3A6 repe cmpsb ; String somewhere inside program? 5801 00004EBA 59 pop cx 5802 00004EBB 5E pop si 5803 00004EBC 5F pop di 5804 00004EBD 7403 je .return ; Yes, proceed --> (if ZR, NC) 5805 00004EBF 46 inc si ; Increase pointer by one 5806 00004EC0 EBE8 jmp short .loop ; Try next address 5807 .return: 5808 00004EC2 C3 retn 5809 %endif 5810 5811 5812 initialise: 5813 ; Check DOS version 5814 %if _VDD 5815 00004EC3 55 push bp 5816 00004EC4 E832FF call isnt ; NTVDM ? 5817 00004EC7 5D pop bp 5818 00004EC8 7205 jc .isnotnt ; no --> 5819 00004ECA 800E[DA29]02 setopt [internalflags], runningnt 5820 .isnotnt: 5821 %endif 5822 5823 00004ECF B80030 mov ax, 3000h ; check DOS version 5824 00004ED2 CD21 int 21h 5825 00004ED4 86E0 xchg al, ah 5826 00004ED6 3D1F03 cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 5827 00004ED9 7205 jb .notoldpacket ; no --> 5828 00004EDB 800E[D829]01 setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 5829 .notoldpacket: 5830 00004EE0 50 push ax 5831 00004EE1 31DB xor bx, bx ; preset to invalid value 5832 00004EE3 B80633 mov ax, 3306h 5833 00004EE6 CD21 int 21h 5834 00004EE8 08C0 or al, al ; invalid, DOS 1.x error --> 5835 00004EEA 7402 jz .213306invalid 5836 00004EEC 3CFF cmp al, -1 ; invalid 5837 .213306invalid: 5838 00004EEE 58 pop ax 5839 00004EEF 7407 je .useoldver 5840 00004EF1 85DB test bx, bx ; 0.0 ? 5841 00004EF3 7403 jz .useoldver ; assume invalid --> 5842 00004EF5 93 xchg ax, bx ; get version to ax 5843 00004EF6 86E0 xchg al, ah ; strange Microsoft version format 5844 .useoldver: 5845 00004EF8 3D0107 cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 5846 00004EFB 7205 jb .notnewpacket ; no --> 5847 00004EFD 800E[D829]03 setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 5848 .notnewpacket: 5849 %if _VDD 5850 00004F02 F606[DA29]02 testopt [internalflags], runningnt 5851 00004F07 7419 jz .novdd 5852 00004F09 BE[A34D] mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 5853 00004F0C BB[B04D] mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 5854 00004F0F BF[B94D] mov di, imsg.init ; es:di-> ASCIZ init entry 5855 00004F12 F8 clc ; ! 5856 00004F13 C4C4580090 RegisterModule ; register VDD 5857 00004F18 7208 jc .novdd ; error ? --> 5858 00004F1A A3[E429] mov word [hVdd], ax 5859 00004F1D 800E[D829]05 setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 5860 .novdd: 5861 %endif 5862 5863 00004F22 31C0 xor ax, ax 5864 00004F24 BB[6008] mov bx, first_sector_buffer ; ds:bx -> sector buffer 5865 00004F27 89DF mov di, bx ; es:di -> sector buffer 5866 00004F29 B90110 mov cx, (8192 + 2) >> 1 5867 00004F2C F3AB rep stosw ; fill buffer, di -> behind (first_sector_buffer+8192+2) 5868 00004F2E 31D2 xor dx, dx 5869 00004F30 8A0E[EE29] mov cl, [drivenumber] 5870 00004F34 53 push bx 5871 00004F35 E82DD9 call read_sector 5872 00004F38 5B pop bx 5873 00004F39 726D jc .access_error 5874 5875 00004F3B FD std ; AMD erratum 109 handling not needed 5876 00004F3C 26C747FE5E5E mov word [es:bx - 2], 5E5Eh ; writes to unused word (1) 5877 00004F42 AF scasw ; -> first_sector_buffer+8192 (at last word to sca) 5878 00004F43 B90110 mov cx, (8192 + 2) >> 1 5879 00004F46 31C0 xor ax, ax 5880 00004F48 F3AF repe scasw 5881 00004F4A 83C704 add di, 4 ; di -> first differing byte (from top) 5882 00004F4D FC cld 5883 00004F4E 57 push di 5884 5885 00004F4F 89DF mov di, bx 5886 00004F51 B90110 mov cx, (8192 + 2) >> 1 5887 00004F54 48 dec ax ; = FFFFh 5888 00004F55 F3AB rep stosw 5889 5890 00004F57 31C0 xor ax, ax 5891 00004F59 31D2 xor dx, dx 5892 00004F5B 8A0E[EE29] mov cl, [drivenumber] 5893 00004F5F 53 push bx 5894 00004F60 E802D9 call read_sector 5895 00004F63 5B pop bx 5896 00004F64 5A pop dx 5897 00004F65 7241 jc .access_error 5898 5899 00004F67 FD std ; AMD erratum 109 handling not needed 5900 00004F68 AF scasw ; di -> first_sector_buffer+8192 (last word to sca) 5901 00004F69 B8FFFF mov ax, -1 5902 00004F6C B90110 mov cx, (8192 + 2) >> 1 5903 00004F6F F3AF repe scasw 5904 %if 0 5905 AAAB 5906 ^ 5907 sca B, match 5908 ^ 5909 sca B, mismatch 5910 ^ 5911 stop 5912 %endif 5913 00004F71 83C704 add di, 4 ; di -> first differing byte (from top) 5914 00004F74 FC cld 5915 5916 %if 0 5917 0000000000000 5918 AAAAAAAA00000 5919 ^ 5920 FFFFFFFFFFFFF 5921 AAAAAAAA00FFF 5922 ^ 5923 %endif 5924 00004F75 39FA cmp dx, di ; choose the higher one 5925 00004F77 7302 jae @F 5926 00004F79 89FA mov dx, di 5927 @@: 5928 00004F7B 29DA sub dx, bx ; dx = sector size 5929 5930 00004F7D 81FA0220 cmp dx, 8192 + 2 5931 00004F81 732A jae .sector_too_large 5932 00004F83 B82000 mov ax, 32 5933 00004F86 39C2 cmp dx, ax 5934 00004F88 7228 jb .sector_too_small 5935 @@: 5936 00004F8A 39C2 cmp dx, ax 5937 00004F8C 7409 je .got_match 5938 00004F8E 3D0020 cmp ax, 8192 5939 00004F91 7324 jae .sector_not_power 5940 00004F93 D1E0 shl ax, 1 5941 00004F95 EBF3 jmp @B 5942 5943 .got_match: 5944 00004F97 8946DC mov word [bp + ldBytesPerSector], ax 5945 00004F9A B104 mov cl, 4 5946 00004F9C D3E8 shr ax, cl 5947 00004F9E 8946EA mov word [bp + ldParaPerSector], ax 5948 00004FA1 D1E8 shr ax, 1 5949 00004FA3 8946D4 mov word [bp + ldEntriesPerSector], ax 5950 00004FA6 F8 clc 5951 00004FA7 C3 retn 5952 5953 5954 .access_error: 5955 00004FA8 BA[0338] mov dx, msg.boot_access_error 5956 00004FAB EB0D jmp .error_common_j 5957 .sector_too_large: 5958 00004FAD BA[1338] mov dx, msg.boot_sector_too_large 5959 00004FB0 EB08 jmp .error_common_j 5960 .sector_too_small: 5961 00004FB2 BA[3938] mov dx, msg.boot_sector_too_small 5962 00004FB5 EB03 jmp .error_common_j 5963 .sector_not_power: 5964 00004FB7 BA[6138] mov dx, msg.boot_sector_not_power 5965 .error_common_j: 5966 00004FBA E8F6D6 call disp_msg_asciz 5967 00004FBD F9 stc 5968 00004FBE C3 retn 5969 5970 00004FBF 00 align 16, db 0 5971 section BUFFERS 5972 5973 align 8, db 0 5974 m_seek: 5975 00000800 FFFFFFFFFFFFFFFF dq -1 5976 m_offset: 5977 00000808 0000000000000000 dq 0 5978 m_sector_size: 5979 00000810 00020000 dd 512 5980 m_1: 5981 00000814 01000000 dd 1 5982 m_1024: 5983 00000818 00040000 dd 1024 5984 m_1024_times_1024: 5985 0000081C 00001000 dd 1024 * 1024 5986 5987 align 4, db 0 5988 00000820 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: 6023 00000824 0000 .name: dw 0 6024 00000826 FFFF .handle: dw -1 6025 cmd_line_readsector16_file: 6026 00000828 0000 .name: dw 0 6027 0000082A FFFF .handle: dw -1 6028 cmd_line_readsector32_file: 6029 0000082C 0000 .name: dw 0 6030 0000082E FFFF .handle: dw -1 6031 cmd_line_sector_file: 6032 00000830 0000 .name: dw 0 6033 00000832 FFFF .handle: dw -1 6034 cmd_line_info_file: 6035 00000834 0000 .name: dw 0 6036 00000836 FFFF .handle: dw -1 6037 cmd_line_image_file: 6038 00000838 0000 .name: dw 0 6039 0000083A 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 6044 0000083C 00 fsi_needed: times 9 db 0 6045 00000845 00 align 2, db 0 6046 00000846 00 fsi_provided: times 9 db 0 6047 0000084F 00 align 2, db 0 6048 00000850 00 fsi_check: times 9 db 0 6049 6050 00000859 0000 dw 0 ; insure there's an unused word in front of this (1) 6051 0000085B 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