Abstract:
Developer David Oberhollenzer created a special ZIP file that can be decompressed like an ordinary compressed package and can also be used as a boot image, allowing computers that support traditional BIOS to directly run the programs in it.
This file named boot.zip does not simply stuff the startup file into a compressed package, but also meets the ZIP format, Multiboot startup specifications and traditional BIOS startup requirements. When checked using regular decompression tools, the file content can be read normally.

According to the developer, boot.zip can be run through the direct kernel boot mode of QEMU, or loaded by a Multiboot-compatible bootloader.
After writing it to a floppy disk as a disk image, compatible old PCs can also be booted directly through the BIOS without modifying the compressed package itself.The key to achieving this effect lies in the overlap between the ZIP file structure and the x86 processor instructions. The ZIP file starts with the PK mark. The first file ZIPHEAD.COM is saved in an uncompressed manner, and the startup code and the identification and verification information required by Multiboot are placed inside.

The traditional BIOS will read the first 512 bytes of the boot media and check whether there is a 0x55AA boot mark at the end. The developer arranges this mark in the corresponding position of the compressed package.
The version number, flag bit and modification time of the ZIP file header are also carefully designed so that the CPU can smoothly jump to the real boot code when executing from the beginning of the file.
The time field in the ZIP file header is cleverly used and encoded into an x86 jump instruction. It was originally just a byte of compressed package metadata, and thus became part of the startup process.
This not only retains the legal structure of the ZIP file, but also avoids adding additional startup data at the beginning of the file that may affect compatibility.

The developers also tested on actual old hardware, including Pentium MMX, i486 DX2 and Am386DX-40 machines. After startup, the system will display the text content of the MESSAGE.TXT file in the compressed package, proving that it can indeed read the data in the file and execute the program.
Comments