Skip to content

How to build

640KB edited this page Dec 5, 2025 · 14 revisions

GLaBIOS can be built using MASM 5, MASM 6.1, TASM 3.x or JWasm 2.20+.

See Build Options for descriptions of all available configuration options.

Build Process:

JWasm 2.20 or above:

  1. jwasm -Fl -Zm -bin GLABIOS.ASM
  2. python gla2rom/gla2rom.py GLABIOS.BIN GLABIOS.ROM

MASM 5.x:

  1. MASM GLABIOS; (note: add /L to create the .LST listing file).
  2. LINK GLABIOS; Will create GLABIOS.EXE.

MASM 6:

  1. ML.EXE /I. /Zm /c GLABIOS.ASM (note: add /Fl to create the .lst listing file)
  2. LINK GLABIOS; Will create GLABIOS.EXE.

TASM:

  1. TASM GLABIOS.ASM (note: add /l or /la to create the .lst listing file).
  2. LINK GLABIOS; Using MS-DOS LINK.EXE is recommended.
Create binary (MASM/TASM) using GLA2ROM.COM (DOS):
  1. Run GLA2ROM GLABIOS.EXE GLABIOS.ROM (included in src folder) to convert to an 8 KiB ROM file.
Or edit output file manually:
  1. Convert EXE by removing the EXE header (the first 512 bytes of the EXE file) and extracting the last 8 KiB
  2. Calculate 8-bit checksum byte and insert into relative file offset 1FFF in GLABIOS.ROM. The low byte of sum of all bytes should equal 0.

Tip

You may also specify CPU and ARCH types on the command line:

  • MASM 5: MASM /L /DCPU_TYPE="8" /DARCH_TYPE="T" GLABIOS;
  • MASM 6: ML.EXE /I. /Fl /Zm /DCPU_TYPE='8' /DARCH_TYPE='T' /c GLABIOS.ASM
  • JWasm: jwasm -Fl -Zm -DCPU_TYPE="CPU_8088" -DARCH_TYPE="ARCH_5150" -bin GLABIOS.ASM

MASM 6 / JWasm note:

Due to differences between MASM 5 and MASM 6/JWasm, the MACROs that ensure that fixed ORGs are not exceeded do not work correctly on MASM 6 and as a result it is possible to end up with a broken ROM build if certain build options are enabled together. If you are experimenting with build options, it's recommended to build with MASM 5 to ensure there is sufficient code space for that custom build type.

Clone this wiki locally