M20 Olivetti M20

Description of the M20 bootstrap procedure

In this section, we try to provide a short description of the code contained in the 8kB ROM which performs the diagnostic tests at the system startup and boots the operating system. The rom contents have been dumped and disassembled by Chris Groessler and the source can be found in the file rom.s

At the startup, the Z8001 fetches its status (named FCW) at segment 0, offset 2 and the program counter (PC) at segment 0, offset 4. The ROM code begins with:

begin: .word 0 ! ???
.word 0xc000 ! FCW at reset
.long reset ! PC value at reset

In this operation, all interrupts must be disabled and the system must be designed in order that a NMI is not sent to the Z8001 during this initialization phase. In the M20, the memory management system is obtained by using several PROMs, which map the logical segments into the physical ones. In the boot phase, the system is configured with the 8kB boot ROM at the segment 0 and the code is executed.

At first, the screen is initialized (after determining if it is a color or black and white version). Then, tests are performed in order to verify system integrity. At each test, a shape is drawn on the screen and if the test is unsuccesful, the computer hangs up, showing the last shape drawn. In a working system, the screen has not the time to lighten up and the end user seldom sees the shapes.

The beginning of the tests appears like it follows, with a nice triangle

! give some indication on the display where in the self-test we are ld scrmem,#0x1000 ! 0001000000000000
ld scrmem + 0x40,#0x2800 ! 0010100000000000
ld scrmem + 0x80,#0x4400 ! 0100010000000000
ld scrmem + 0xc0,#0xfe00 ! 1111111000000000

scrmem points at the very beginning of the video memory. As the M20 graphic adapter is used has a 512 pixel width line (and one pixel corresponds to one bit), the address scrmem+0x40 corresponds to the beginning of the second line and so on.

Right after drawing the triangle, the program perform a series of basic test on the CPU: use of registers, addressing modes, operation like multiplication and division, complement.
The screen is then cleaned and a small square is drawn. The ROM consistency is tested, with a checksum algorithm.
The next phase is started by drawing a diamond on the screen.

Page log

  • Oct. 7, 2006 - original version of the page.
  • Jan. 10, 2016 - updated to the newer version (2012) of rom.s file.

RSS feedsRSS feeds

Search in the M20 site
Search in the Internet