SC/MP processor IDE

Scmp2

This is a page about my SC/MP IDE program which is an editor / emulator / debugger / assembler / disassembler for the SC/MP processor all in one portable Windows executable. When I was 15 years old the Dutch magazine Elektuur published a lot of articles and designs about SC/MP computer boards and as I was fascinated. But I did not have the money to buy these chips and boards, so I build myself a paper version of the SC/MP board with a lot of ones and zeros on little paper. This is how I learned microprocessors and programming. Ten years later I would become a professional software / hardware engineer but mainly on Z80 based boards. Up until a few years ago I forgot about the SC/MP that was my first love but then I build a MK14 board (Karen Orton design) based on a PIC processor and I got interested again. You cannot buy a SC/MP processor anymore for a reasonable price and again I found a solution, I wrote a MK14 emulator for Windows. That gave me another challenge, there was no good assembler available except for a few multiple processor cross assemblers like the SB-assembler. But they all had errors in code generation, strange syntax so every source file had to be rewritten, and most annoying was that the offset (EA) calculation was wrong most of the time. In the sourcecode asm files you would see programmers correcting this by adding or subtracting values but this was not what I wanted. I could not find a decent assembler, so I decided to write my own SC/MP assembler, based in the syntax of the old original assembler. Then I added support for most of the syntax of the other assemblers as well. But in one thing I do not compromise, labels are followed with a colon. As I build IDE’s before for other processors I decided to write a complete development suite for the SC/MP processor, including assembler, disassembler, emulator, MK14,ELBUG and NIBL support, and a single step debugger. It is a portable program in x64 and x32 for Windows, it will run fine under WINE and the exe files are digitally signed with my code certificate. Have fun, Hein Pragt.

I also have a Facebook Group on Retro Computing and Electronics, feel free to join!

SC/MP workbensch editor / emulator / debugger

Scmp Ide

To be able to program for the SC/MP (INS8060) you need an assembler but I could not find any good functioning one for Windows 10 / 11. There were still some programs to download but most of them did not work fine or needed extra runtime installed. After some searching I decided that it was time for a new hobby project, building a complete integrated SC/MP (INS8060) development environment. I wrote my own SC/MP (INS8060) assembler in good old portable C code and and re-used the SC/MP emulator that I had wrtitten for the MK14 emuator, and most of the rest I had somewhere in my code library. The result is SC/MP (INS8060) workbench, a portable x64 Windows program that includes an editor, assembler, disassembler, emulator, single step debugger, Intel hex read / write function a terminal window, an MK14 compatible seven segment display with 8 LEDs and keyboard support.

Installation

Download the zip file and unzip it at the place where you want to install it on your hard drive. Then create a shortcut to the program to the desktop and the program is ready for use. It is a so-called portable program which means that it does not use external sources or libraries and does not use the registry. After removing the directory from this program, it has also disappeared completely from your system. The zip file contains the exe files an a example program directory.

First time use

To practice there is an alarmclock_f20.asm file in the example directory, which you can load after which it will be in the shown in the middle edit window. Now you can convert this into machine code by means of the assemble button, this will appear on the left of the screen and be put into the virtual memory of the emulator. The last (or first) .org statement will also be put in the program counter and by simply pressing the run button you can execute the program and follow it on the screen. This will not be very fast because every instruction will perform a screen update of all registers. If you want the program to run faster, you can disable the update of the registry block by means of the update checkbox. The emulator is timing correct, you can adjust the processor speed in the top bar. You can now modify the program, reassemble it and run it again.

The IDE supports four configurations, the SIMPLE one is basically the first simple Electuur design with just 8 leds at 0x100 and keys on 0x200. The MK14 is a fully working MK14 emulator include the type 2 rom. The ELBUG emulation is the second design of Elektuur with a seven segment display and a monitor program. The NIBL implementation is the BASIC computer emulation, including the original rom and a hardware serial I/O emulation. In all configurations you can use the full IDE features including assembler and debugger.

By means of the step button you can execute the program instruction by instruction and check the output and the registers, and with trace on you can see each instruction that is executed. You can also enter the break address for code and ram read/write access. the emulator will then stop at this address and display the registers of that moment. When 0000 is entered in the break fields will be ignored.

You can save the modified code as an asm file again but also save it as a hex file so that you can load the binary code in a circuit or ep(rom) for a real SC/MP circuit. You can also read an Intel-Hex file, which will then be loaded into the internal emulator memory. You can also run tis code when you put the correct start address in the program counter. You can also disassemble this internal emulator memory code after which the source code will appears in the edit screen in the middle. This can then be changed and written back into the emulator memory by means of assemble button.

Memory map

The emulator has the full 64K of ram memory and a part can be protected as rom by setting the Rom-end address. The memory mapped I/O is exactly like the machine hardware that is emulated including the shadow addresses. The keyboard is mapped to the hardware memory address bits of the emulated hardware so I could use original roms without any modifications.

Assembler

The assembler is a typical two pass assembler, on the first pass it does syntax checking and it collects and defines all symbols and during the second pass it will generate the code. The notation of the opcodes is the same as in the SC/MP (INS8060) datasheet, but for PTR register you can either use simply 1 of P1. The assembler contains an expression evaluator that will follow the regular mathematical rules first functions, then * and / and then + and -. The two functions are H() for the high byte of a word value and L() for the low byte of a word value. For compatibility reasons you can also use /label for H() and #label for L(). There are two special symbols that are overloaded, if a operand only contains a * or . this will represent the current address pointer.

The assembler knows the following directives:

.ORG <expression>Sets the current address pointer to <expression>
.ORsame as .org
.BYTE <expression> [,<expression>]Defines one or more bytes that will be stored in memory
.DBSame as .byte
Label: .EQU <expression>Adds a label with value <expression> to the symbol table
=Same as .EQU
.BS <expression>reserves <expression> bytes of memory at current address
.=Same as .BS
.DSSame as .BS
.WORD <expression> [,<expression>]Defines one or more words that will be stored in memory
.DWSame as .word
.ENDdefines the end of the source file
.ENSame as .end
.CRDummy ignore
.TFDummy ignore
.LFDummy ignore

Labels may contain _ A..Z and 0..9 and numbers can be written as: 99 (decimal), 0x99, 0X99, 0H99 or 99H (Hexadecimal)

Version 1.02

This is my second release version 1.02 the code has been heavily tested and debugged by myself and there might still be some little bugs in the program, I am open to bug reports and feature requests.

Download

Here you can download the latest version if this IDE. This download is a zip file containing a portable x64 (and a x32 version) Windows exe programs, and example directory.

Download at: https://www.heinpragt.nl/?product=sc-mp-processor-ide

  • Version 1.02
    • Fixed .DW and .WORD bug.
  • Version 1.01
    • Initial release.

INS8060 or SC/MP Processor

This page is dedicated to my fist microprocessor, the INS8060, also called the SC/MP processor. At the time I was 13 years old and did not have much money, I could afford to buy an electronics magazine called Elektuur every month, and they published a simple computer board based on the SC/MP processor. I was very interested in computer technology at that time and I read all I could about the SC/MP processor. The SC/MP is my first processor and nowadays you cannot get the processor anymore (at least not at a reasonable price), but there are emulators in software and hardware that are still available. I have to say that I recemtly bought a SC/MP processor in China for 20 Euros. On this page I will share all documentations, links, schematics and code that I have or have found.
INS8060 or SC/MP Processor page

More pages on software development

Leave a Reply

Your email address will not be published. Required fields are marked *