modem7
10k Member
Manufacturer tests
Manufacturer tests
In the initial part of the power-on-self-test (POST), POST codes are sent to the keyboard port. These are commented in the source code like "<><><> CHECKPOINT 2 <><><>". The page showing the I/O map of the 8255A has them labeled as "Diagnostic Outputs".
At a certain point, the POST resets the keyboard port. If a keyboard is plugged in, it will return AAh, however if certain other values are returned, the POST does the following:
Byte 65H returned
The POST jumps to code which does the following, quote: "Load a block of test code through the keyboard port for manufacturing test. This routine will load a test (max length = FAFFH) through the keyboard port. Code will be loaded at location 0000:0500. After loading, control will be transferred to location 0000:0500. Stack will be located just below the test code. This routine assumes that the first 2 bytes transferred contain the count of bytes to be loaded."
Byte 00H returned
POST does something to the keyboard lines, waits a bit, then looks to see if the data line was grounded. If it was grounded, the POST sets the 'manufacturing test flag' in memory (in the BIOS Data Area, at offset 12h). Some code associated with the 'manufacturing test flag' refers to it as the "mfg run-in tests".
The POST then continues.
Irrespective of the state of the 'manufacturing test flag', POST codes are no longer sent to the keyboard port, but instead are placed in memory (in the BIOS Data Area, at offset 15h).
The 'manufacturing test flag' is used in later parts of the POST, eg.
1. If set, the timer is set up to periodically run a routine (via an interrupt) that toggles a LED. By the code, it looks like the LED must be something attached to the keyboard port.
2. The routine that beeps the speaker on error, examines the 'manufacturing test flag'. If set, a jump is made to code that fetches the POST code from memory, then outputs that to the keyboard port, then halts the CPU.
.
Manufacturer tests
The following info is sourced from the March '86 revision of the 5160 Technical Reference manual.Would you please elaborate more on this feature! I read somewhere that it is possible to do data-acquisition in the background on a PC via keyboard buffer
In the initial part of the power-on-self-test (POST), POST codes are sent to the keyboard port. These are commented in the source code like "<><><> CHECKPOINT 2 <><><>". The page showing the I/O map of the 8255A has them labeled as "Diagnostic Outputs".
At a certain point, the POST resets the keyboard port. If a keyboard is plugged in, it will return AAh, however if certain other values are returned, the POST does the following:
Byte 65H returned
The POST jumps to code which does the following, quote: "Load a block of test code through the keyboard port for manufacturing test. This routine will load a test (max length = FAFFH) through the keyboard port. Code will be loaded at location 0000:0500. After loading, control will be transferred to location 0000:0500. Stack will be located just below the test code. This routine assumes that the first 2 bytes transferred contain the count of bytes to be loaded."
Byte 00H returned
POST does something to the keyboard lines, waits a bit, then looks to see if the data line was grounded. If it was grounded, the POST sets the 'manufacturing test flag' in memory (in the BIOS Data Area, at offset 12h). Some code associated with the 'manufacturing test flag' refers to it as the "mfg run-in tests".
The POST then continues.
Irrespective of the state of the 'manufacturing test flag', POST codes are no longer sent to the keyboard port, but instead are placed in memory (in the BIOS Data Area, at offset 15h).
The 'manufacturing test flag' is used in later parts of the POST, eg.
1. If set, the timer is set up to periodically run a routine (via an interrupt) that toggles a LED. By the code, it looks like the LED must be something attached to the keyboard port.
2. The routine that beeps the speaker on error, examines the 'manufacturing test flag'. If set, a jump is made to code that fetches the POST code from memory, then outputs that to the keyboard port, then halts the CPU.
.