%if 0 2019, by C. Masloch Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument. DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. %endif %include "lmacros3.mac" defaulting sectalign off numdef SPI, (1024 * 1024 * 1024 * 1024 * 4 / 512) ; sectors per image numdef CHS_SECTORS, 63 ; CHS geometry field for sectors numdef CHS_HEADS, 255 ; CHS geometry field for heads numdef MBR, 1 numdef MBR_DOSEMU_IMAGE_HEADER, 1 struc DOSEMU_IMAGE_HEADER ; This structure is parsed when determining the geometry for ; a hard disk image. It is documented in the dosemu2 sources at: ; https://github.com/dosemu2/dosemu2/blob/f41c0f267fec/src/include/disks.h#L132 dihSig: resb 7 ; "DOSEMU",0 or 0Eh,"DEXE" dihCHSHeads: resd 1 ; (note the misalignment for these) dihCHSSectors: resd 1 dihCHSCylinders:resd 1 dihHeaderSize: resd 1 dihDummy: resb 1 dihDEXEFlags: resd 1 endstruc dih_our_size: equ 8192 ; (16 * 512) %define STARTSFOLLOWS start=0 %if _MBR CYLINDERS equ (_SPI) \ / (_CHS_HEADS * _CHS_SECTORS) %if _MBR_DOSEMU_IMAGE_HEADER addsection dosemu_image_header, STARTSFOLLOWS %define STARTSFOLLOWS follows=dosemu_image_header istruc DOSEMU_IMAGE_HEADER at dihSig, asciz "DOSEMU" at dihCHSHeads, dd _CHS_HEADS at dihCHSSectors, dd _CHS_SECTORS at dihCHSCylinders, dd CYLINDERS at dihHeaderSize, dd dih_our_size iend times dih_our_size - ($ - $$) db 0 %endif %endif