Specifications
258 AMD Geode™ GeodeROM Functional Specification
Build Utilities
32087C
X2ROM.EXE – .EXE to .ROM file conversion utility version 1.0
Magic number: 5A4Dh
Bytes on last page: 01E4h
Pages in file: 0008h
Relocations: 0000h
Paragraphs in header: 0020h
Extra paragraphs needed: 0000h
Extra paragraphs wanted: FFFFh
Initial stack location: 0000:0000h
Word checksum: 0000h
Entry point: 0000:0000h
Relocation table address: 001Eh
Memory Needed: 4 KB
X2ROM.EXE – The “/F:xxxx” (Fixup Segment) Command Line Argument
The “/F” argument is used to “fix” far (segment:offset) links within the .EXE file with the hexidecimal value xxxxh supplied by
the developer. Segment fix-ups are typically supplied by DOS’ .EXE loader, however, this loader is unavailable to ROM
modules and therefore must be supplied by the developer during the build process. Also, a ROM module in need of a fix-up
is normally (but not always) indicative of a problem with the code’s structure.
X2ROM.EXE – The “/O:xxxx” (Code Origin) Command Line Argument
The “/O” argument is used to move the code origin in the resulting .ROM output file from offset 0 to the caller-specified off-
set xxxxh. This option is used to “pad” the beginning of the .ROM output file with FFh bytes if so desired. It saves the devel-
oper from having to create an additional utility to prepend “empty” space to the end of the .ROM output file.
X2ROM.EXE – The “/S:xxxx” (Code Size) Command Line Argument
The “/S” argument is used to specify the size, in bytes, of the resulting .ROM output file. Unless executing in EXE2BIN
mode (described below), X2ROM.EXE calculates the 2’s complement of the binary ROM image and places the checksum
value at offset xxxxh – 1 within the resulting .ROM output file. It is the responsibility of the developer to ensure the place-
ment of this checksum byte does not overwrite, or in any way affect the operating of the code within the ROM image.
X2ROM.EXE – The “/V” (Verbose Output) Command Line Argument
The “/V” argument is used to display information contained in the .EXE header. The format of this information is similar to
that output by the Microsoft
®
EXEHDR.EXE utility. The following section displays the output information for a ROM-based
keyboard handler. For an explanation of each field, consult a PC technical reference book, such as Raymond Duncan’s,
“Advanced MS-DOS Programming”, available from Microsoft Press.
X2ROM.EXE – The “/X” (EXE2BIN Compatible) Command Line Argument
The “/X” option is used primarily to validate the X2ROM.EXE utility. When this argument is specified, X2ROM outputs a file
with no checksum, nor any leading or trailing “pad” bytes. This is the same format as that output by the MS-DOS EXE2BIN
utility. Therefore, X2ROM.EXE functionality can be checked by running X2ROM.EXE (with the “/X” option specified) and
EXE2BIN.EXE on the same .EXE file and comparing the resulting output files. Note that the “/X” option cannot be used in
conjunction with the “/O” or “/S” command line switches, nor can it be used in conjunction with the “/Y” option, which is
described in the next section.
X2ROM.EXE – The “/Y” (EXE2BIN Mode w/Padding) Command Line Argument
The “/Y” option is identical in nature to the “/X” option described in the previous section, except it causes X2ROM to “round
up” the file size to the next paragraph boundary, and pads the trailing paragraph of the output file with FFh bytes.