Saturday, July 29, 2017

Heathkit Oscilloscopes

I recently picked up a Heathkit IO-10 oscilloscope which I will be restoring and then highlighting in a YouTube video.

A recent post to a Heathkit mailing list asked about a complete list of Heathkit oscilloscopes. My book Classic Heathkit Test Equipment has a chapter of oscilloscopes and includes scopes in a table of all of the Heathkit test equipment.

Here, taken from my book, is a list of all of the models of oscilloscopes I was able to identify through a number of sources. They are sorted by date of introduction. I was able to identify 67 unique models, made from 1947 to 1989.

Model Description First Year Comments
O-1 Oscilloscope 1947 5”
O-2 Oscilloscope 1948 5”
O-3 Oscilloscope 1948 5”, 150 kHz
O-4 Oscilloscope 1949 5”, 2 MHz
O-5 Oscilloscope 1950 5”, 2.2MHz
O-6 Oscilloscope 1950 5”, 200 kHz
O-7 Oscilloscope 1951 5”, 250 kHz
O-8 Oscilloscope 1951 5”, 2MHz
O-9 Oscilloscope 1951 5”, 3 MHz
O-10 Oscilloscope 1955 5”, 400 kHz, PC board
OL-1 Oscilloscope 1955 5”, 5 MHz
OM-1 Oscilloscope 1955 5”, 5 MHz
O-11 Oscilloscope 1957 5”, 5 MHz
OM-2 Oscilloscope 1957 5”
O-12 Oscilloscope 1958 5”, 5 MHz
OM-3 Oscilloscope 1958 5”, 1.2 MHz
OP-1 Oscilloscope 1958 2.2 MHz
OR-1 Oscilloscope 1959 5”, 200 kHz
IO-10 Oscilloscope 1960 3”, 200 kHz, recurrent sweep
IO-30 Oscilloscope 1960 5”, 5MHz
IO-21 Oscilloscope 1961 3”, 200 kHz
IO-12 Oscilloscope 1962 5”, 4MHz
EUW-25 Oscilloscope 1963 3”, 400 kHz
EV-3 Oscilloscope 1964 IMPScope biological EKG type
IO-14 Oscilloscope 1966 5”, 8MHz
EVW-3 Oscilloscope 1968 Assembled version of EV-3
IO-17 Oscilloscope 1968 3”, 5MHz
IO-18 Oscilloscope 1968 5”, 5MHz
EU-70 Oscilloscope 1970 15 MHz, dual trace, solid-state, assembled
IO-101 Vectorscope/Color Generator 1970 3” vectorscope and color bar/pattern generator
IO-102 Oscilloscope 1971 5”, 5MHz
IO-105 Oscilloscope 1971 5”, 15MHz, dual trace
IO-1128 Oscilloscope 1971 3”, vector monitor
IOW-18S Oscilloscope 1971 Berkeley Physics Laboratory, 5” laboratory
IO-103 Oscilloscope 1972 5”, 10MHz
SO-29 Oscilloscope 1972 Biological, high gain DC
IO-104 Oscilloscope 1973 5”, 15MHz
IO-4510 Oscilloscope 1974 5”, 15 MHz, dual trace
SO-4510 Oscilloscope 1974 Assembled version of IO-4510
IO-4530 Oscilloscope 1975 5”, 10 MHz, TV Service
IO-4540 Oscilloscope 1975 5”, 5 MHz, hobby/service
IO-4560 Oscilloscope 1975 5”, 5 MHz, auto triggered sweep
SO-4530 Oscilloscope 1975 Assembled version of IO-4530
SO-4540 Oscilloscope 1975 Assembled version of IO-4540
IO-4550 Oscilloscope 1976 5”, 10 MHz, dual trace
SO-4550 Oscilloscope 1976 Assembled version of IO-4550
IO-4101 Oscilloscope 1977 Vectorscope like IO-101
IO-4541 Oscilloscope 1977 5”, 5 MHz, special TV triggering
IO-4555 Oscilloscope 1978 5”, 10 MHz
IO-4105 Oscilloscope 1979 5”, 5MHz
IO-4205 Oscilloscope 1979 5”, 5MHz, dual trace
IO-4235 Oscilloscope 1979 5”, 35 MHz, dual trace, delayed sweep
SO-4105 Oscilloscope 1979 Assembled version of IO-4105
SO-4205 Oscilloscope 1979 Assembled version of IO-4205
IO-3220 Oscilloscope 1982 5”, 20MHz, dual trace, battery powered
SO-3220 Oscilloscope 1982 Assembled version of IO-3220
IO-4360 Oscilloscope 1984 5”, 60 MHz, triple trace
SO-4221 Oscilloscope 1987 5”, 20 MHz, dual trace
SO-4226 Oscilloscope 1987 5”, 25 MHz, dual trace
SO-4521 Oscilloscope 1987 5”, 50 MHz, dual trace
SDS-5000 Oscilloscope 1988 Computer-based
ID-4850 Digital Memory Oscilloscope 1989 Digital memory box for scopes
IO-4210 Oscilloscope 1989 5”, 10MHz, dual trace
IO-4225 Oscilloscope 1989 5”, 25 MHz, dual trace
SO-4552 Oscilloscope 1989 5”, 25 MHz
SO-4554 Oscilloscope 1989 5”, 40 MHz

Sunday, July 9, 2017

Building a 68000 Single Board Computer - 6809 to 68000 Assembly Language Source Translator

Unlike Intel, which made a decision to keep a high level of compatibility in their x86 processor line, from the 8086 through 286, 386, 486, and Pentium and beyond, Motorola made a clean break when they introduced the 68000. It didn't offer any software compatibility with their earlier processors like the 6800 and 6809.

However, Motorola offered a tool to help programmers port their source code from the 6809 to 68000 microprocessor. The tool, written in Pascal, was intended to do about 90% of the work of translation.

I was able to find a copy of this tool at and try it out. It includes the tool (both executable and source code), documentation, and some sample files.

I was able to run the original executable under using the dosbox MS-DOS emulator. I was also able to run it under Windows 10, but I got a number of errors that I had to ignore.

The tool was written in Pascal. It didn't specify which compiler it was targetted at, but it looks like pretty standard Pascal. I was able to compile it using the Free Pascal compiler under Linux with the addition of one line: "Uses Crt;". I made a few other changes to remove warnings about unused variables. The data files used by the program also needed to be renamed to lower case as Linux is case sensitive.

The tool ran quite well, working as described. Much of the translation rules are contained in data files which can be modified. It also uses some small routines which need to be assembled separately.

M6809 to M68000 Source Code Translator     Version 1.2
Systems Engg, E. Kilbride, Scotland
Motorola Inc. Copyright 1986

   Code in       Code out         Errors         Warnings
      17             23              0               4

The basic approach is to map the 6809 registers to corresponding 68000 registers, e.g. A to D0, B to D1, D to D2, X to A0, and Y to A1. It converts 6809 instructions to corresponding 68000 versions, e.g. LDA to MOVE, and points out possible problem areas, like where the behavior of the overflow flag may be different. Some instructions cannot be converted at all. The intention is that this might do about 90% of the conversion and a programmer would need to do the rest.

Here is a sample conversion, first the 6809 code:

* Sample input program
NULL     EQU   0
         CMPA  #9
         BLS   CB1HX1           branch if number is 0-9
         ADDA  #7               number is 10-15 so add 7 to make it A-F

CB1HX1   ADDA  #'0              add the ASCII offset

OP1HEX   PSHS   A               save the binary number
         BSR    CB1HEX          convert the number to its ASCII equivalent
         LBSR   OPCHAR          and output it to the system terminal
         PULS   A,PC            restore the binary number and exit
         EXG    A,B             save the l.s. ASCII character in B; original 8-bit number to A
         LSRA                   shift the m.s. half byte into the l.s half byte
         RTS                    leave the m.s. ASCII character in A

And now the resulting 68000 version generated by the tool:

*++       ******   STUB EXTERNAL REFERENCES  ******

                  XREF ..DIN,..DOUT,..JSR,..RTS,..CTOX,..CREP
                  XREF ..DPR,..DPW,..CLRAB,..MUL,..INIT,..VREP
* Sample input program
NULL      EQU 0                 
          CMP.B #9,D0           
          BLS CB1HX1            branch if number is 0-9
          ADD.B  #7,D0          number is 10-15 so add 7 to make it A-F

CB1HX1    ADD.B  #'0',D0        add the ASCII offset
          BSR ..RTS              

OP1HEX    MOVEM.L D0,-(A6)      save the binary number
          BSR CB1HEX            convert the number to its ASCII equivalent
          BSR OPCHAR            and output it to the system terminal
          MOVEM.L (A6)+,D0      restore the binary number and exit
          MOVE.L (A6)+,A3       
          JMP (A3)              
          EXG.L  D0,D1          save the l.s. ASCII character in B; original 8-
*                               bit number to A
          LSR.B #1,D0           shift the m.s. half byte into the l.s half byte
** WARNING **                      * V-BIT CLEARED *
          LSR.B #1,D0            
** WARNING **                      * V-BIT CLEARED *
          LSR.B #1,D0            
** WARNING **                      * V-BIT CLEARED *
          LSR.B #1,D0            
** WARNING **                      * V-BIT CLEARED *
          BSR ..RTS             leave the m.s. ASCII character in A

To actually use this tool you may need to modify it and/or the data files to work with your particular 68000 cross-assembler. For example, the VASM assembler I use does not like the stub routine names starting with two dots like "..RTS" but will accept them with only one dot (e.g. ".RTS").

I've put my test files and notes here:

I don't know if anyone used this tool to port any significant programs for the 6809 to 68000, but it is a rather interesting tool and the concept could be applicable to other processors. It is also an alternative approach to emulation, which is often use but has a different set of tradeoffs (like performance).

Saturday, July 8, 2017

Building a 68000 Single Board Computer - The Quelo 68000 Cross-Assembler

In the book 68000 Microcomputer Experiments by Alan D. Wilcox that I recently mentioned in a blog post, there is a chapter that covers using a cross-assembler to build 68000 code and upload it to the Motorola ECB. The assembler used for the examples is the Quelo 68000 cross-assembler.

A couple FORTH implementations for the 68000 that I came across mentioned that they were written for the Quelo assembler as well.

Quelo was a company based in Seattle, WA that offered a commercial cross-assembler for the 68000 that ran on CP/M and MS-DOS, around 1984. A Google search located a copy of the Quelo assembler for MS-DOS as well as a manual.

I was able to run the assembler under Linux using the dosbox MS-DOS emulator program (It likely runs under Windows 10 as well, but in my experience dosbox is often even more compatible with MS-DOS than recent versions of Windows are).

I used the small program example that was in the Wilcox book and was able to assemble it, generate an S record file, and upload and run it on my TS2 computer.

Assembling my larger calculator program generated some errors which looked trivial to fix (e.g. the syntax for PC relative addressing was different).

It looks like quite a sophisticated cross-assembler which includes macro support and a separate linker as well as some utilities like a cross-reference tool and utility for splitting files into odd and even ROMs.

All of the files I used as well as building instructions can be found here:

A Google search for Quelo found a number of references to CP/M and Motorola 68K software including the ad above from the November 1983 issue of PC Magazine. The manual says it was licensed for a single user. One source referred to the CP/M version as being public domain; possibly they made the CP/M version of the assembler free when MS-DOS became more popular, but as far as I can tell the source code is not available anywhere and is likely lost.

It was fun to be able to run a program from 1983 on a modern computer, but for most of my 68000 cross-assembler needs I think I will stick to the VASM assembler which runs natively on Linux and is still being actively maintained.

Building a 68000 Single Board Computer - RPN Calculator Program

I haven't really done any signficant 68000 programming other than typing in examples from books and other sources and porting the code to my TS2. As a larger programming project, I decided to write a simple calculator program.

It uses Reverse Polish (infix) notation and is loosely inspired by the FORTH programming language. It works with 32-bit signed integers and supports some basic math and bitwise functions and input and output in hex and decimal.

The stack size is programmable at build time and defaults to five. It is written for the VASM cross-assembler. Here is a list of the supported commands:

number  Enter number (32-bit signed), put on top of stack
.                           Display stack
+                          Add two numbers on stack, pop them, push result
-                           Subtract two numbers on stack, pop them, push result
*                          Multiply two numbers on stack, pop them, push result
/                           Divide two numbers on stack, pop them, push result
%                        Divide two numbers on stack, pop them, push remainder
!                          2's complement
~                         1's complement
&                        Bitwise AND
|                          Bitwise inclusive OR
^                         Bitwise exclusive OR
<                        Shift left
>                        Shift right
=                        Pop and compare two values on top of stack. Push 1 if they are same, otherwise 0
h                        Set input and output base to hexadecimal.
n                        Set input and output base to decimal.
q                        Quit to TUTOR monitor.
?                        Help (Show summary of commands)

The next four commands are inspired by the FORTH programming language:

DROP                Removes the number from top of stack
SWAP                Exchanges the top 2 numbers on the stack
DUP                   Duplicates the value on the top of stack
ROT                   Rotates the top 3 numbers on the top of the stack

And here is an example session:

RPN Calculator v1.0
? 3
? 4
? *
? !
? n
Base set to decimal
? 10
? *

The code allowed me to get some hands-on experience with 68000 assembly language programming. In particular I was exposed to:

  • Different size operations (byte, world, longword)
  • Use of data and address registers.
  • Use of indexed addressing modes.
  • Use of arithmetic, logical, and shift operations.
  • Calling TUTOR's TRAP 14 firmware routines.
  • String manipulation.
  • Writing subroutines with well-defined interfaces and saving and restoring of registers.
  • Writing position independent code.

Overall it went quite smoothly and only took a few evenings to implement. I made occasional use of TUTOR's trace function and breakpoints to debug the code. It is just over 1000 lines of commented source code and about 2KB of executable code.

The source code can be found at

Building a 68000 Single Board Computer - More Books and Alternative Version of TUTOR

I recently picked up a couple more 68000 books.

68000, 68010, 68020 Primer by Stan Kelly-Bootle and Bob Fowler covers 68000 family programming. It has a friendly and not highly technical style. While not heavy on examples (most examples are not complete programs), it does a good job of explaining the important concepts of the 68000, including some aspects which might appear to be quirks but are intended behavior (like the Z versus X flags). It even covers basic concepts like binary arithmetic for readers who may not be familiar with them. The appendix of 68000 Resources is interesting from a historical perspective, listing a number of 68000 hardware and software suppliers, most of which are now long defunct.

68000 Microcomputer Experiments by Alan D. Wilcox, subtitled "Using the Motorola Educational Computer Board", is a small spiral bound book that covers the 68000 more from a hardware perspective. Each chapter covers a topics such as "Programming with Tutor" and "Using the Serial Port", with a series of lab experiments and exercises. Some of the experiments require an oscilloscope, logic probe, and optionally a logic analyzer. It is aimed mostly at university level electrical engineering students and it most useful if you have access to a Motorola ECB board. Most of the book is relevant to my TS2 board, as it is similar and mostly compatible, which exceptions like the parallel port and cassette tape interfaces. The appendices have useful reference material, some of which came from Motorola documentation.