I first located code similar to the last 256 bytes of FORMAT.COM, by searching for strings of bytes unlikely to change; such as "50 B0 02 50" (PUSH AX / MOV AL,02 / PUSH AX), then added more bytes to hex strings like that one. Rather quickly, I found many similar strings to the whole fragment spanning across Sectors 110 - 111 in the 160 KiB diskette image, which turned out to be a part of LINK.EXE; specifically, at offsets DDBEh through DEBDh.
As I did on my Boot Sector page, I've compared the bytes from the end of FORMAT.COM (on the right side; 256 bytes, an interesting number, at offsets 51E8h through 52E7h in the diskette image) with similar bytes found in LINK.EXE (on the left side), highlighting all the bytes that are the same.
The comparison shown further below of the Assembly instructions is even more compelling a reason to see the code at the end of FORMAT.COM as Slack Space from part of LINK.EXE when it was still under development that someone accidentally in haste or deciding incorrectly (without consulting anyone?) made part of the program; just as they did when adding part of LINK.EXE to a copy of the Boot Sector!
As before, I'm using the offsets in the LINK.EXE file; not where the code would appear in Memory when being executed:
Bytes from LINK.EXE Bytes from the end of FORMAT.COM ------------------- -------------------------------- Offset 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Offset 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 33BE 88 00 33BE 88 00 33C0 EB 43 8A 5E 0A B7 00 D1 E3 8B 87 A2 3B 89 46 FC 33C0 EB 43 8A 5E 0A B7 00 D1 E3 8B 87 92 3B 89 46 FC 33D0 8B 46 08 89 46 FA 8A 5E 0A B7 00 8A 87 A5 38 88 33D0 8B 46 08 89 46 FA 8A 5E 0A B7 00 8A 87 95 38 88 33E0 46 F9 B4 00 D1 E0 89 C3 FF 87 A8 34 B8 05 00 50 33E0 46 F9 B4 00 D1 E0 89 C3 FF 87 98 34 B8 05 00 50 33F0 8D 46 F9 50 B0 02 50 FF 36 44 1C 9A 1A 0A 5A 01 33F0 8D 46 F9 50 B0 02 50 FF 36 34 1C 9A 14 0A 72 04 3400 83 06 44 1C 05 89 EC 5D CA 06 00 55 8B EC 51 B8 3400 83 06 34 1C 05 89 EC 5D CA 06 00 55 8B EC 51 B8 3410 1E 03 50 9A 32 00 38 01 9A 38 01 D0 02 B8 23 03 3410 1E 03 50 9A 3C 00 4F 04 9A 32 01 E8 05 B8 23 03 3420 50 9A 32 00 38 01 8A 1E 64 1E B7 00 D1 E3 8B 46 3420 50 9A 3C 00 4F 04 8A 1E 54 1E B7 00 D1 E3 8B 46 3430 06 2B 87 AD 2F 50 B0 04 50 9A 0B 01 38 01 9A 33 3430 06 2B 87 9D 2F 50 B0 04 50 9A 15 01 4F 04 9A 3D 3440 01 38 01 89 EC 5D CA 02 00 55 8B EC 51 A1 1C 1C 3440 01 4F 04 89 EC 5D CA 02 00 55 8B EC 51 A1 0C 1C 3450 89 46 FE C7 06 1C 1C 00 00 B8 2A 03 50 9A 89 00 3450 89 46 FE C7 06 0C 1C 00 00 B8 2A 03 50 9A 83 00 3460 D0 02 FF 76 04 9A 8B 03 68 02 83 7E FE 00 74 0D 3460 E8 05 FF 76 04 9A 85 03 80 05 83 7E FE 00 74 0D 3470 8B 46 FE A3 1C 1C C7 46 FE 00 00 EB DC 89 EC 5D 3470 8B 46 FE A3 0C 1C C7 46 FE 00 00 EB DC 89 EC 5D 3480 C2 02 00 55 8B EC 83 EC 16 9A 41 01 38 01 B4 00 3480 C2 02 00 55 8B EC 83 EC 16 9A 4B 01 4F 04 B4 00 3490 89 46 FE 8B 46 06 B1 08 D3 E0 03 46 FE 89 46 F4 3490 89 46 FE 8B 46 06 B1 08 D3 E0 03 46 FE 89 46 F4 34A0 8B 0E 2C 1C 03 C8 89 4E F8 05 9D 40 89 46 F6 8D 34A0 8B 0E 1C 1C 03 C8 89 4E F8 05 8D 40 89 46 F6 8D 34B0 46 EA 50 8D 46 EB 50 8D 46 FC 50 8D 46 F0 34B0 46 EA 50 8D 46 EB 50 8D 46 FC 50 8D 46 F0 Offsets within LINK.EXE (version 1.10) & Code Code from the end of FORMAT.COM in same locations ------------------------------------------------- ------------------------------------------------- 33BE 8800 MOV [BX+SI],AL 33BE 8800 MOV [BX+SI],AL 33C0 EB43 JMP 3405 33C0 EB43 JMP 3405 33C2 8A5E0A MOV BL,[BP+0A] 33C2 8A5E0A MOV BL,[BP+0A] 33C5 B700 MOV BH,00 33C5 B700 MOV BH,00 33C7 D1E3 SHL BX,1 33C7 D1E3 SHL BX,1 33C9 8B87A23B MOV AX,[BX+3BA2] 33C9 8B87923B MOV AX,[BX+3B92] 33CD 8946FC MOV [BP-04],AX 33CD 8946FC MOV [BP-04],AX 33D0 8B4608 MOV AX,[BP+08] 33D0 8B4608 MOV AX,[BP+08] 33D3 8946FA MOV [BP-06],AX 33D3 8946FA MOV [BP-06],AX 33D6 8A5E0A MOV BL,[BP+0A] 33D6 8A5E0A MOV BL,[BP+0A] 33D9 B700 MOV BH,00 33D9 B700 MOV BH,00 33DB 8A87A538 MOV AL,[BX+38A5] 33DB 8A879538 MOV AL,[BX+3895] 33DF 8846F9 MOV [BP-07],AL 33DF 8846F9 MOV [BP-07],AL 33E2 B400 MOV AH,00 33E2 B400 MOV AH,00 33E4 D1E0 SHL AX,1 33E4 D1E0 SHL AX,1 33E6 89C3 MOV BX,AX 33E6 89C3 MOV BX,AX 33E8 FF87A834 INC WORD PTR [BX+34A8] 33E8 FF879834 INC WORD PTR [BX+3498] 33EC B80500 MOV AX,0005 33EC B80500 MOV AX,0005 33EF 50 PUSH AX 33EF 50 PUSH AX 33F0 8D46F9 LEA AX,[BP-07] 33F0 8D46F9 LEA AX,[BP-07] 33F3 50 PUSH AX 33F3 50 PUSH AX 33F4 B002 MOV AL,02 33F4 B002 MOV AL,02 33F6 50 PUSH AX 33F6 50 PUSH AX 33F7 FF36441C PUSH [1C44] 33F7 FF36341C PUSH [1C34] 33FB 9A1A0A5A01 CALL 015A:0A1A 33FB 9A140A7204 CALL 0472:0A14 3400 8306441C05 ADD WORD PTR [1C44],+05 3400 8306341C05 ADD WORD PTR [1C34],+05 3405 89EC MOV SP,BP 3405 89EC MOV SP,BP 3407 5D POP BP 3407 5D POP BP 3408 CA0600 RETF 0006 3408 CA0600 RETF 0006 340B 55 PUSH BP 340B 55 PUSH BP 340C 8BEC MOV BP,SP 340C 8BEC MOV BP,SP 340E 51 PUSH CX 340E 51 PUSH CX 340F B81E03 MOV AX,031E 340F B81E03 MOV AX,031E 3412 50 PUSH AX 3412 50 PUSH AX 3413 9A32003801 CALL 0138:0032 3413 9A3C004F04 CALL 044F:003C 3418 9A3801D002 CALL 02D0:0138 3418 9A3201E805 CALL 05E8:0138 341D B82303 MOV AX,0323 341D B82303 MOV AX,0323 3420 50 PUSH AX 3420 50 PUSH AX 3421 9A32003801 CALL 0138:0032 3421 9A3C004F04 CALL 044F:003C 3426 8A1E641E MOV BL,[1E64] 3426 8A1E541E MOV BL,[1E54] 342A B700 MOV BH,00 342A B700 MOV BH,00 342C D1E3 SHL BX,1 342C D1E3 SHL BX,1 342E 8B4606 MOV AX,[BP+06] 342E 8B4606 MOV AX,[BP+06] 3431 2B87AD2F SUB AX,[BX+2FAD] 3431 2B879D2F SUB AX,[BX+2F9D] 3435 50 PUSH AX 3435 50 PUSH AX 3436 B004 MOV AL,04 3436 B004 MOV AL,04 3438 50 PUSH AX 3438 50 PUSH AX 3439 9A0B013801 CALL 0138:010B 3439 9A15014F04 CALL 044F:0115 343E 9A33013801 CALL 0138:0133 343E 9A3D014F04 CALL 044F:013D 3443 89EC MOV SP,BP 3443 89EC MOV SP,BP 3445 5D POP BP 3445 5D POP BP 3446 CA0200 RETF 0002 3446 CA0200 RETF 0002 3449 55 PUSH BP 3449 55 PUSH BP 344A 8BEC MOV BP,SP 344A 8BEC MOV BP,SP 344C 51 PUSH CX 344C 51 PUSH CX 344D A11C1C MOV AX,[1C1C] 344D A10C1C MOV AX,[1C0C] 3450 8946FE MOV [BP-02],AX 3450 8946FE MOV [BP-02],AX 3453 C7061C1C0000 MOV WORD PTR [1C1C],0000 3453 C7060C1C0000 MOV WORD PTR [1C0C],0000 3459 B82A03 MOV AX,032A 3459 B82A03 MOV AX,032A 345C 50 PUSH AX 345C 50 PUSH AX 345D 9A8900D002 CALL 02D0:0083 345D 9A8300E805 CALL 05E8:0083 3462 FF7604 PUSH [BP+04] 3462 FF7604 PUSH [BP+04] 3465 9A8B036802 CALL 0268:038B 3465 9A85038005 CALL 0580:0385 346A 837EFE00 CMP WORD PTR [BP-02],+00 346A 837EFE00 CMP WORD PTR [BP-02],+00 346E 740D JZ 347D 346E 740D JZ 347D 3470 8B46FE MOV AX,[BP-02] 3470 8B46FE MOV AX,[BP-02] 3473 A31C1C MOV [1C1C],AX 3473 A30C1C MOV [1C0C],AX 3476 C746FE0000 MOV WORD PTR [BP-02],0000 3476 C746FE0000 MOV WORD PTR [BP-02],0000 347B EBDC JMP 3459 347B EBDC JMP 3459 347D 89EC MOV SP,BP 347D 89EC MOV SP,BP 347F 5D POP BP 347F 5D POP BP 3480 C20200 RET 0002 3480 C20200 RET 0002 3483 55 PUSH BP 3483 55 PUSH BP 3484 8BEC MOV BP,SP 3484 8BEC MOV BP,SP 3486 83EC16 SUB SP,+16 3486 83EC16 SUB SP,+16 3489 9A41013801 CALL 0138:0141 3489 9A4B014F04 CALL 044F:014B 348E B400 MOV AH,00 348E B400 MOV AH,00 3490 8946FE MOV [BP-02],AX 3490 8946FE MOV [BP-02],AX 3493 8B4606 MOV AX,[BP+06] 3493 8B4606 MOV AX,[BP+06] 3496 B108 MOV CL,08 3496 B108 MOV CL,08 3498 D3E0 SHL AX,CL 3498 D3E0 SHL AX,CL 349A 0346FE ADD AX,[BP-02] 349A 0346FE ADD AX,[BP-02] 349D 8946F4 MOV [BP-0C],AX 349D 8946F4 MOV [BP-0C],AX 34A0 8B0E2C1C MOV CX,[1C2C] 34A0 8B0E1C1C MOV CX,[1C1C] 34A4 03C8 ADD CX,AX 34A4 03C8 ADD CX,AX 34A6 894EF8 MOV [BP-08],CX 34A6 894EF8 MOV [BP-08],CX 34A9 059D40 ADD AX,409D 34A9 058D40 ADD AX,408D 34AC 8946F6 MOV [BP-0A],AX 34AC 8946F6 MOV [BP-0A],AX 34AF 8D46EA LEA AX,[BP-16] 34AF 8D46EA LEA AX,[BP-16] 34B2 50 PUSH AX 34B2 50 PUSH AX 34B3 8D46EB LEA AX,[BP-15] 34B3 8D46EB LEA AX,[BP-15] 34B6 50 PUSH AX 34B6 50 PUSH AX 34B7 8D46FC LEA AX,[BP-04] 34B7 8D46FC LEA AX,[BP-04] 34BA 50 PUSH AX 34BA 50 PUSH AX 34BB 8D46F0 LEA AX,[BP-10] 34BB 8D46F0 LEA AX,[BP-10]
First Published: January 5, 2022 (2022.01.05).
You can reply to us here.
PC DOS 1.10 Boot Sector page
IBM PC DOS 1.10 Index
MBR
and Boot Records Index
The Starman's Realm Index