Tag Archives: assembler

6502 processor IDE

Mos6502

This is a page about my freeware 6502 processor IDE program which is an editor / emulator / debugger / assembler / disassembler for the 6502 processor all in one portable Windows executable. I was never a big fan of the MOS 6502 processor, it was far to simple compared to the Z80 processor that I used. But the MOS 6502 processor was the biggest competitor of the Z80 in home computers in the 80ties and a lot of great computers used this processor. A few years ago I build my first Apple 1 clone and I got interested in the MOS 6502 again, this time I took some time to learn to program it. But as with so many old processors, it is hard to find the programming tools, there are some, but most of them cover only one configuration or are not portable and not suited for Windows. I had already written an Apple 1 emulator and had the emulator code. So I decided to add another IDE to the ones I had already written. (It get easier every time). In this IDE I support the Apple 1 computer, the Elector Junior (KIM 1) board and a simple 64K rom/ram machine with only LED outputs. Have fun. Regards, Hein Pragt.

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

6502 editor / assembler / emulator / debugger

Mc6502 Ide

To be able to program for the 6502 processor you need an assembler or compiler. I personally still like to write in assembler but I could no longer find tools for Windows 10. There were still some programs to download but most of them worked at DOS level, had serious bugs or did not fit my needs. After some searching I decided that it was time for a new project, building a complete integrated 6502 development environment. I found a pretty good assembler and the base code of my Z80 IDE and I had some old code in my code library. The result is 6502 workbench, a portable x64 Windows program that includes an editor, assembler, disassembler, emulator, single step debugger, Intel hex read / write function a VT100 terminal window, a 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.

First time use

To practice there are a few example files 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. The speed will be just like the original processor, you can set the speed in the top of the screen. You can now stop running and modify the program, reassemble it and run it again. You can chose to see a realtime update of all registers (update checkbox) and you can set a breakpoint on code or memory access, a value of zero means its off. You can choose to stop at a breakpoint or start the realtime disassembler so you can trace your program. You can also set this trace on manually when you choose to single step trough the code. You can inspect the memory in the hex window. Default the 6521 PIA is emulated and the WozMon rom is loaded in Apple 1 mode. This terminal is a VT100 type. You can also select the Junior computer in which case the 6532 PIA is emulated and the Junior rom is loaded. Both rom files are external so you can modify them.

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 6502 circuit. You can also read an Intel-Hex file, which will then be loaded into the internal emulator memory. You can also run this 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.

I/O map

The 6502 has no I/O space so I implemented am MC6821 and a MC6532 PIA, in Apple 1 mode the 6821 PIA is used and mapped just like the Apple1, connecting the keyboard and the display with a VT100 terminal. In Junior mode the 6532 is emulated and the I/O mapping is just like the Junior computer (or KIM 1) with the seven segment displays and the keys mapped to the PC keyboard. You can also click the keys on the screen image. In simple mode the 8 leds are on memory address $d000 and the keyboard can be read using the same address.

Junior memory map

Junior Map

Version 1.04

I use the 6502_workbench myself and that is one of the way I find and fix bugs. I it now time to release the first version on my website so other can use it and I will continue to use improve the code. Suggestions and bugs reports are always welecome. I proudly present version 1.04 of the 6502 processor developer IDE.

Buy 6502 and 6502 related chips and hardware

I also have a webshop where I sell several 6502 types processors, boards and support chips.

https://www.heinpragt.nl/?s=6502&post_type=product

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, an assembler directory and a examples directory.

https://www.heinpragt.nl/?product=6502-processor-ide

  • Version 1.04
    • Fixed some small bugs in the user interface
    • Fixed overflow bug in monitor.
  • Version 1.01
    • Initial release, it might be not completely bug free, I will test on, wait for remarks amd release the next version soon.

Documentation:

U use an external CA65 assembler, you can find documentaion on: https://cc65.github.io/doc/ca65.html

More pages on software development

8052 processor IDE

8052

This is a page about my freeware 8051 / 8052 IDE program which is an editor / emulator / debugger / assembler / disassembler / ISP programmer for the 8052 all in one portable Windows executable. Many years ago when I was programming the 8052 professionally and at home, tools were very expensive. There was not much freeware or opensource, but trough my employer I had most of the tools I needed. I wrote a lot of programs in 8052 assembler in 8052 assembler and PL/M, but I also learned to write in C and I had a good C compiler for the 8052. The 8052 was a genius design for its time and its funny that this processor is still used a lot. For development and debugging 8052 assembler code, this freeware IDE can be used. Regards, Hein Pragt.

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

8052 editor / assembler / emulator / debugger

8052 Workbench

To be able to program for the 8052 you need an assembler or compiler. I personally still like to write in 8052 assembler but I could no longer find tools for Windows 10. There were still some programs to download but most of them worked at DOS level, had serious bugs or did not fit my needs. After some searching I decided that it was time for a new project, building a complete integrated 8052 development environment. I found a pretty good assembler and the base code of my Z80 IDE and I had some olde code in my code library. The result is 8052 workbench, a portable x64 Windows program that includes an editor, assembler, disassembler, emulator, single step debugger, Intel hex read / write function a VT100 terminal window, a 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.

First time use

To practice there is an example4.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. You can now modify the program, reassemble it and run it again.

In de example directory there are also two 8052 Basic versions from Intel that will run fine in this IDE emulator. After the assembler and RUN hit the spacebar (just as in the original autobaud detect) and the prompt will be shown.

There are more example files, a lot of them I made myself when testing the IDE and some I found on the Internet and are free to use.

By means of the step button you can execute the program instruction by instruction and check the output and the registers. You can also enter the break address, the emulator will then stop at a run command at this address and display the registers of that moment. When 0000 is entered in the break field it 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 8052 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.

I/O map

The 8052 has no I/O space so the LEDS and seven segment display are mapped on port 1 and 2. You can put the leds on port 1 or 2 and the display on lines port 1 or 2 and character port 1 of 2. You can select this with the top menu, or with some extra assembler directives I added. Look in the example files to see how they work.

  • The keyboard is send to the serial buffer of the 8052 (SBUF) and the display is also connected to the serial (SBUF) of the 8052. I also pulse the character on the RX pin to enable autobaud detect and simulate the hardware as good as possible.
  • Interrupt lines are connected to the interrupt buttons at the top of the screen, when pushed they will activate the interrupt lines.
  • The output ports are shown at the top as input values and output values, they can be modified to test input / output code.

LED I/O modes

In led I/O mode 1 the leds are connected to port 1 and a 1 on the port makes the led light up, directive is ;#LED1

8052 Leds Port1


In led I/O mode 2 the leds are connected to port 2 and a 1 on the port makes the led light up, directive is ;#LED2

8052 Leds Port2

Seven segment display modes

In Seven segment mode 1 the leds are connected to port 1 is select of segment and port 2 is display data. The data is latched so the displays keep their value even if they are no longer selected. Directive is ;#SEVEN12

8052 Seven1


In Seven segment mode 2 the leds are connected to port 2 is select of segment and port 1 is display data. The data is latched so the displays keep their value even if they are no longer selected. Directive is ;#SEVEN21

8052 Seven2

Interrupt pins configuration

The I0, I1 and I2 buttons ar the top of the screen are connected to the interrupt lines to simulate external interrupts.

8052 Interrupts Buttons

User define buttons configuration

There are also four user define buttons on the seven segment panel, these are connected to P1.2 to P1,5 to simulate external switches.

8052 User Buttons

Supported processors

The current version supports the Intel 8031, 8032, 8051, 8052 and Atmel 8952 processor. For the Atmel 8952 processor this IDE had a ISP In Circuit Programming mode, that supports a serial Arduino ISP module to update an 8952 processor from within the IDE. You can edit code, run and debug it on the emulator and then test it on a real 8952 processor. The hardware configuration of the IDE is equal to a cheap 8952 development board from China.

Supported development board

I use this development board, you can order it in my webshop, its very complete, you have to solder it yourself. It had a Zif socket for the processor, a full rs232 circuit, and USB circuit, four pushbuttons and a reset button, am ISP programming connector, eight output leds, a power supply, crystal in socket and all I/O lines on connector pins.

8952 Developme Board

Link: https://www.heinpragt.nl/?product=avr-development-board-kit

Schema of this development board

Development Avr51

8952 ISP programmer using Arduin nano

I created my own Arduino Nano based ISP programmer for the 89S52 processor. I connected it to the Chinese development board with a standard ISP connector cable and I guess this will work on other 8052 ISP development boards as well. I chose this development board because it is very cheap and has a lot of features. And of course an Arduino Nano is small and also cheap.

8959 Arduino Nano Isp

Schema of Arduino Nano ISP programmer

Arduino Nano 8952 Isp Schema

Download Arduino Nano sketch for the ISP programmer.

*) This will also work with an Arduino Uno board!

Version 1.04

I use the 8052_workbench myself and that is one of the way I find and fix bugs. One of the last things I did was recode de TB31.asm file, a complete Tiny Basic interpreter for the Intel 8031 and made it work fine on 8031 with 128 bytes internal ram. During this process I found some little bugs in de emulator and I added a mode to emulate a real 8031 (128 bytes memory checks) to the code. Also I fixed code that would destroy the user interface if there was too much output to the windows. And the most important new feature is the ISP In Circuit Programming option. The example directory now also contains the Intel 8052 floating point basic assembly sourcecode, the complete 8031 tiny basic assembly sourcecode and the paulmon21 assembly sourcecode. I proudly present version 1.04 of the 8052 developer IDE.

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, an assembler directory and a examples directory. After weeks of debugging I think the project is ready for release, if you find any bugs please report them to me.

https://www.heinpragt.nl/?product=8052-processor-ide

  • Version 1.04
    • Added full timer 2 support.
    • Added ISP upload feature
    • Change Led polarity to match development board.
    • Added four buttons to LCD panel.
    • Fixed P3 display in register panel.
    • Fixed windows corrupt on to much update.
    • Fixed SETB to handle LEDS correct.
  • Version 1.03
    • Fixed error in IDE update windows that would destroy the IDE context menus.
    • Fixed ADDC flags error.
    • Fixed MOVC A,@A + PC instruction.
    • Fixed DA A instruction AC flag error.
    • Fixed SUBB OV flag error.
    • Added 8031 emulation checkbox.
  • Version 1.02
    • Fixed a last minute change error in the terminal code that made keyboard not respond.
    • Fixed the name of the example directory.
    • Fixed a unwanted quote character in exampkle4.asm.
  • Version 1.01
    • Initial release, it might be not completely bug free, I will test on, wait for remarks amd release the next version soon.


8052 links, tips and documents

More pages on software development

MC14500B processor IDE

Mc14500a

This is a page about my MC14500B IDE program which is an editor / emulator / debugger / assembler / disassembler / ISP programmer for the MC14500B, all in one portable Windows executable. I learned about the MC14500B one bit processor on an Internet forum and I was facinated by this little device. I ordered a PLC14500 board from Tindie and designed mt own hardware, a breadboard design and an Arduino shield version. There ere no real tools but the processor is quite simple and reading the datasheet and the programming manual I wrote an assembler and disassembler and an emulator, then I decided to adap my IDE framework for the MC14500B processor. It took som time to create a fully working hardware emulator for the PLC14500 board and a working emulator for my own board, and I tried to visualize the boards on screen. Then I write my own bootloader for the Arduino Nano and added the ISP option to the IDE so you could upload the code directly to the boards. For development and debugging MC14500B assembler code, this IDE can be used.
Regards, Hein Pragt.

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

MC14500B editor / assembler / emulator / debugger

Mc14500b Workbench

To be able to program for the MC14500Byou need an assembler or compiler. I like to write (puzzle) in MC14500B assembler but there were no real usefull tools available for for Windows 7,8,10,11. After some searching I decided that it was time for a new project, building a complete integrated MC14500B development environment. I wrote an two pass assembler and used the base code (framework) of my Z80 and 8052 IDE. The result is MC14500B workbench, a portable x64 (and X32) Windows program that includes an editor, assembler, disassembler, emulator, single step debugger, Intel hex write function, a VT100 terminal window and a ISP programmer.

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.

First time use

To practice there is an example directory, from which you can load example programs after which it will be displayed in the editor 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. By simply pressing the run button you can execute the program on the selected on screen board and follow it on the screen. This will not be very fast because every instruction will perform a screen update of all registers, ports and leds. If you want the program to run faster, you can disable the update of the registry block by means of the update checkbox. You can now modify the program, reassemble it and run it again.

Ifyou have a board connected you can use (select) the terminal window to “talk”to the Arduino Nano, and if you have loaded my bootloader, you can then simply upload the code to the board using the ISP menu. This is also the menu where you select the communication port.

In the main directory there is also the .ino sourcecode file of my custom bootloader for the Arduino Nano. Just load the code in the Arduino IDE, compile it an upload it to the Arduino Nano using the serial cable. You can now check the code inside the Arduino eeprom or do a factory reset (smoketest program) on the board using the Arduino IDE terminal of the terminal of my IDE at 9600 Baud,

By means of the step button you can execute the program instruction by instruction and check the output and the registers and ports. You can also enter the break address, the emulator will then stop at a run command at this address and display the registers of that moment. When 0000 is entered in the break field it 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 MC14500B circuit. You can also disassemble the internal emulator memory code after which the source code will appears in the edit screen in the middle. The assembler and disassembler are default loaded with all the friendly names of all the I/O in a standard symbols table. This generated sourcecode can then be changed and written back into the emulator memory by means of assemble button.

I/O map

The IDE currently supports two hardware boards that will be displayed on the screen with working leds and buttons. Inside the IDE is a real hardware emulation of the complet circuit of the board and all the chips so it should work exactly as the real hardware. My board is not yet ready but I am using this tool to debug it. My board will support JMP and RTN instruction with a ONE level stack :-). With the top menu you call also connect te VT100 terminal to the input and output lines of the board, this will be useful on my board.

Version 1.02

Version 1.02 is the second version with some improvements after testing with different hardware. I will be maintaining the program based on my own needs, bug reports and feature reuests.

Download

Here you can download the latest version if this IDE for a small fee. This download is a zip file containing a portable x64 (and a x32 version) Windows exe programs, an examples directory and my custom Arduino Nano boatloader sourcecode. After weeks of debugging I think the project is ready for release, if you find any bugs please report them to me. The progams are digitally signed using my codeding certificate for your safety and to make them thrusted by Windows. It seems my IDE programs work fine on (Linux) WINE as well.

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

  • Version 1.02
    • Fixed error in hex dump bootloader (16e byte);
    • Improved ISP uploader for PLC14500 board;
    • Improved ISP uploader for HP14500 (Arduino shield) board;
    • Fixed terminal bug in HP145000 emulation.
  • Version 1.01
    • Initial release, it might be not completely bug free, I will test on, wait for remarks amd release the next version soon.

MC14500B links, tips and documents

More pages on software development

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

Z80 processor IDE

Z80 Header2

This is a page about my freeware Z80 IDE program which is an editor / emulator / debugger / assembler / disassembler for the Z80 all in one portable Windows executable. Many years ago when I was programming the Z80 professionally and at home, tools were very expensive. There was not much freeware or opensource, but trough my employer I had most of the tools I needed. When I was twenty years old in 1979 I bought my first real computer, the Tandy TRS-80 model I level II with a Z80 processor at its heart. I wrote a lot of programs in Z80 assembler for this computer and all computers I bought after that had a Z80 processor like the Sinclair Spectrum and later the MSX. My first IT job was developing hardware and software on embedded Z80 systems (cash register and machine control systems) in assembler and PL/Z. After that I started working at Micro Technology (an MSX hardware supplier) and there I was also programming a lot in Z80 assembler, bat I also learned to write in C and I had a good C compiler for the Z80. assembler. The Z80 was a genius design for its time and its funny that this processor is still used a lot in for instance the Nintendo Gameboy but also in the Texas Instrument scientific calculators. Also there is a growing group of computer hobbyist that keep the processor alive by creating new single board computers based on the Z80 processor. For development and debugging Z80 assembler code, this freeware IDE can be used. Regards, Hein Pragt.

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

Z80 workbensch editor / emulator / debugger

Z80 Workbench

To be able to program for the z80 you need an assembler or compiler. I personally still like to write in Z80 assembler but I could no longer find tools for Windows 10. There were still some programs to download but most of them worked at DOS level. After some searching I decided that it was time for a new hobby project, building a complete integrated Z80 development environment. I found a pretty good assembler and good portable C code from an emulator and the rest I had somewhere in my code library. The result is Z80 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 MPF-1 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.

First time use

To practice there is an example4.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. You can now modify the program, reassemble it and run it again.

The basic2.asm is an example of the basic assembler file from Grant Searle, I only added a modified BIOS file at the end and an .org 0000h at the end to set the start adresss.

The monitor.asm is an example of the sourcode of a simple monitor program to input hex bytes a an address, dump bytes of ans address to terminal and call an aadress in memory.

By means of the step button you can execute the program instruction by instruction and check the output and the registers. You can also enter the break address, the emulator will then stop at a run command at this address and display the registers of that moment. When 0000 is entered in the break field it 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 Z80 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.

I/O map

The emulator has a standard number of I/O ports for input from the keyboard and output to the terminal screen or the seven segment displays / LEDs. In example4 there is an example of both.

  • In port 1: Returns the character of the keyboard in A register, when there is no sign a 0 character will be returned.
  • In port 2: Return the status of the keyboard, 0 no keystroke is available, unequal to 0 means a keystroke is available. The character must then be read on port 1.
  • Out port 1: Data for terminal or seven segment display. When Out port 2 is a 0, the data will go to the terminal. If port 2 is unequal to zero, the data will go to the seven segment display.
  • Out port 2: Selection terminal (0) or seven segment display. When a segment select bit (0..5) is 1, the display data will be send to each seven segment display that has its bit set to 1. It is therefore possible to address each display individually as well as multiple displays at the same time. To turn everything off, first set 0xff to port two and then a 0 to port 1. To switch back to the terminal, you have to write a 0 to port 2 again. (In contrast to the MPF-1, the data of the display is latched.)
  • Out port 3: This port is a latch to the eight LEDs where each bit controls an LED.

Credits: Credits go to Jorge Giner Cordero for letting me use and distribute his Z80 assembler.

Version 2.01 – 2.04

After version 1.07 I decided to add full support for a Z80-MBC2 emulator including CP/M 2.2 because I use this board and then I noticed some errors in the Z80 emulator code. So I decided to fix that and before I knew I was starting to rewrite all of the emulator code and now it is good and supports a lot of extra undocumented features of the Z80 processor. For CP/M 2 I needed a VT100 terminal, I had the code from 30 years ago when I write my own terminal when I was working with a DEC 750 VMS machine so I could reuse this code with some adjustments for Windows. When debugging the Z80 emulator I needed better breakpoint and tracing so I also added all these features. By this time I realized this would not just be version 1.08 but it is clearly a major upgrade so I decided to go for version 2.01. I included som CP/M disks and some old CP/M programs I still had as well. Just click Z80-MBC2 CP/M 2.2 in the main menu and then push the RUN button and you are on a Z80-MBC2 emulator machine with VT100 terminal and a few disk drives.I hope you like the new features and I will continue to improve this Z80 workbench, I have some new options in mind, like CP/M disk management and support for emulating more hardware and machines as well. In version 2.04 I added full support for hardware and software emulation of the famous MPF-1 board. I support the basic board, with an on screen keyboard, the 8255 I/O chip and the keyboard and display scan as well. I do not support tape load and tape save, these buttons link to the standard save hex and load hex as nice replacements. You can use the debugging solutions of the MPF-1 in combination with the debugging solutions of the IDE and you can use the assembler / disassembler together with the MPF-1. For the MPF-1 I also added support for the Z80 None Maskable Interrupt because the MPF-1 uses that for single stepping. And as usual I added one example program for the MPF-1.

Buy Z80 chips and support chips

I also have a webshop where you can buy all kind of Z80 chips and support chips to repair or create youre own Z80 board.

https://www.heinpragt.nl/?s=z80&post_type=product

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, two example directories, a CP/M disks directory and an assembler directory and a MPF-1 directory. The zip file is just a container, only copy the “z80_workbenchdirectory from the zip file to a location on your harddrive.
There was a last minute bug in the 204 version, the SIMPLE mode did not work correct anymore, this is fixed in the 204A version.

https://www.heinpragt.nl/?product=z80-processor-ide

  • Version 2.04
    • Fixed seven segment display blanks and errors after heavly use.
    • Fixed seven segment display lines are wider now.
    • Fixed R register is now functioning like it should.
    • Added MPF-1 emulation, with original ROM and keyboard and display in true MPF-1 mode.
    • Added MPF-1 hardware emulation (8255) and ram / rom mapping.
    • Added mpf1 directory with hex code of ROM and example assembler file.
    • Added None Maskable Interrupt button and correct handling in emulator.
  • Version 2.03
    • Included latest version 1.10 of uz80as.exe in this project.
    • Added -u option to assembler to enable undocumented instructions.
    • Fixed false caret display in VT100 terminal.
    • Fixed error in VT100 terminal with 80th character on next line.
  • Version 2.02
    • Fixed error in VT100 handling that would cause a crash of the program.
    • Added new cursor handling in VT100 using the Windows caret.
  • Version 2.01
    • Complete rewrite of the Z80 emulator code, it now also supports all the undocumented features.
    • Added full Z80-MBC2 emulation mode (inluding CP/M 2.2), including R/W SP/M disk images from Z80-MBC2.
    • Added the CP/M drives from Z80-MBC2 and an extra drive H: that contains some old CP/M programs I had like Sargon Chess, an Aventure game and Zork.
    • Click Z80-MBC2 CP/M 2.2 in the main menu, push the RUN button and you are on a Z80-MBC2 machine with VT100 terminal and a few disk drives.
    • Changed the layout of the screen to fit a complete functional VT100 terminal emulation.
    • Added a notification window for errors and tracing.
    • Removed cycle counting.
    • Added new top menu items for window and terminal settings.
    • Added support for monitting and editing 4 memory locations realtime (Handy for memory mapped I/O).
    • Added support for breakpoint on memory access.
    • Added support for start of trace on breakpoint instead of stopping.
    • Added support for loading binary files (like roms) into memory.
    • Improved disassembler, better syntax and newlines after jumps and return statements.
    • Added realtime tracing in notification window with address and disassembled instruction.
    • Beside x64 there is also now a x32 version.
    • Added feature to write all terminal output to a file in the base directory.

Extentions to the IDE

George Kordogiannis wrote some nice additions to the IDE that I will include in the new version. For now I want to make the additions available to all existing users with this download. Just download the file and add (overwrite) the subdirectories of the z80_ide. It will also add a cpmtools directory.  F.i. it makes it possible to send HEX programs to your CP\M environment, and run them. Inside the cpmtools folder you will find 4 BAT files.

LS.BAT shows the contents of your CP\M folder

TRANSFER.BAT transfers the file you put inside the BAT file to your CP\M folder

With TRANSFER1.BAT it asks you to write the name of the HEX file you want to transfer.

With KILL.BAT we delete the given file from your CP\M folder

Finally in CP\M now with the LOAD command we can convert it to COM and run it.

This way you can write, save it in examples folder and develop a program on Z80 testing it directly in CP\M environment without having to transfer it to Z80-MBC2 which is a time-consuming process.

Download this zip file here: z80_wb_additions.zip

Z80 links, tips and documents

More pages on software development