PCjs Machines

Home of the original IBM PC emulator for browsers.

Logo

IBM PC (Model 5150) BIOS Sources

PCjs has created and archived a collection IBM PC ROM BIOS diskettes. Their contents are thanks to the PC DOS Retro website. Directory Listings and Version Notes are provided below.

[PCjs Machine "ibm5160-msdos320"]

Waiting for machine "ibm5160-msdos320" to load....

Directory of IBM PC BIOS Sources (V1)

 Volume in drive A is 5150V1
 Directory of A:\

5150     TXT      4087   3-27-20   3:00p
5150V1   ASM    179480   3-27-20   3:00p
README   TXT      3460   3-27-20   3:00p
VERSIONS TXT      8490   3-27-20   3:00p
        4 file(s)     195517 bytes
                      124928 bytes free

Directory of IBM PC BIOS Sources (V2)

 Volume in drive A is 5150V2
 Directory of A:\

5150     TXT      4087   3-27-20   3:00p
5150V2   ASM    179424   3-27-20   3:00p
README   TXT      3460   3-27-20   3:00p
VERSIONS TXT      8490   3-27-20   3:00p
        4 file(s)     195461 bytes
                      124928 bytes free

Directory of IBM PC BIOS Sources (V3)

 Volume in drive A is 5150V3
 Directory of A:\

5150     TXT      4087   3-27-20   3:00p
5150V3   ASM    193439   3-27-20   3:00p
README   TXT      3460   3-27-20   3:00p
VERSIONS TXT      8490   3-27-20   3:00p
        4 file(s)     209476 bytes
                      111616 bytes free

5150V1 Notes (from PC DOS Retro)

IBM PC BIOS dated 04/24/81 is 5940 lines based on the BIOS listings in the IBM PC Technical Reference dated August 1981.
The BIOS was likely built using the Intel ASM86 Macro Assembler V1.0.

Notes to build with MASM 1 to 4:

Line 1:    $$TITLE(ROM BIOS FOR IBM PERSONAL COMPUTER)
           to build with MASM remove the $$
Line 193:  CODE SEGMENT AT 0F000H
           to build with MASM and LINK remove the 'AT 0F000H'
           LINK will not generate code for 'AT address' segments
Line 539:  JMP TST6
           MASM generates EB 2B 90 while the BIOS has E9 2A 00
Line 647:  JMP TST8
           MASM generates EB 37 90 while the BIOS has E9 36 00
Line 944:  JMP TST12
           MASM generates EB 4B 90 while the BIOS has E9 4A 00
Line 2511: MOV SI,OFFSET J17
           to match the BIOS (BE F3 ED 90) add an extra NOP after this line
           the original assembler generated an extra NOP due to the forward reference
Line 5936: JMP RESET
           MASM generates a near jump instead of a far jump
           also LINK will not generate code for 'AT address' segments

LINK will generate an .EXE file with 22 relocations. These are due to references to the CODE segment and should be F000.
Unfortunately EXE2BIN will not process the EXE file as it has more than 65278 bytes of code.

The BIOS code ends at FFD9, the bytes from FFDA to FFEF should be padded with FF.

The VECTOR segment data should be entered at FFF0 as follows:
EA 5B E0 00 F0 30 34 2F 32 34 2F 38 31 FF FF EB

5150V2 Notes (from PC DOS Retro)

IBM PC BIOS version 2 (10/19/81) differences:

Line 196:       change copyright notice:
                DB      '5700671 COPR. IBM 1981'
Line 368-371:   change instruction order:
                CMP     BL,0FFH                 ;YES - SEE IF ALL BITS GO OFF
                JE      C13                     ; TIMER1_BITS_OFF
                IN      AL,TIMER+1              ;READ TIMER 1 COUNT
                OR      BL,AL                   ;ALL BITS ON IN TIMER
Line 380:       add two NOPs after this line for timing delay:
                OUT     TIMER+3,AL
Line 385:       add two NOPs after this line to maintain offsets:
                JMP     SHORT ERR01
Line 390-391:   delete these lines:
                MOV     AL,54H                  ;SEL TIM 1, LSB, MODE 2
                OUT     TIMER+3,AL              ;WRITE TIMER MODE REG
Line 702:       move this instruction just after line 711 in POST:
                REP     MOVSW                   ;MOVE VECTOR TABLE TO RAM
Line 1566:      correct timeout error code in comm routine:
                OR      AH,80H                  ; INDICATE TIME OUT
Line 3065:      change timeout value in print routine:
                MOV     BL,20                   ; TIME OUT VALUE
Line 5297:      move this line just before line 5293 in cassette routine:
                MOV     BX,EDGE_CNT             ;BX GETS LAST EDGE COUNT
Line 5510:      change bottom row of character 04 (diamond):
                DB      010H,038H,07CH,0FEH,07CH,038H,010H,000H ; D_04
Line 5938:      change BIOS release date:
                DB      '10/19/81'              ; RELEASE MARKER

The VECTOR segment data should be entered at FFF0 as follows:
EA 5B E0 00 F0 31 30 2F 31 39 2F 38 31 FF FF 9B

5150V3 Notes (from PC DOS Retro)

IBM PC BIOS version 3 (10/27/82)

IBM PC BIOS dated 10/27/82 is 6207 lines based on the BIOS listings in the IBM PC Technical Reference dated April 1984.
The BIOS was likely built using the Intel ASM86 Macro Assembler V2.0.

This BIOS must be built with ASM86, several operand constructs are used which MASM does not recognize.

Line 224:  CODE SEGMENT AT 0F000H
           to build with LINK remove the 'AT 0F000H'
           LINK will not generate code for 'AT address' segments

LINK will generate an .EXE file with 1 relocation. This is due to a far jump to segment F000.
Unfortunately EXE2BIN will not process the EXE file as it has more than 65278 bytes of code.

The VECTOR segment data should be entered at FFF0 as follows:
EA 5B E0 00 F0 31 30 2F 32 37 2F 38 32 FF FF 77