Posted on Leave a comment

8048 processor IDE

MAB8048H

This is a page about my freeware 8048 / 8049 IDE program which is an editor / emulator / debugger / assembler / disassembler for the 8048 all in one portable Windows executable. Many years ago when I was programming 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 assembler. The 8048 was a genius design for its time and its funny that this processor is still used. For development and debugging 8048 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!

8048 editor / assembler / emulator / debugger

8052 Workbench

To be able to program for the 8048 you need an assembler or compiler. I personally still like to write in assembler but I could no longer find tools for MS Windows. 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 8048 development environment, using the framework I used for all my othe IDE’s. I found a pretty good assembler and old code in my code library. The result is 8048 workbench, a portable x64 and x32 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. The program is portable and will run under Linux as well using WINE. (This is the way I use it).

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. On Linux unpack the zip file on your disk and use WINE to execute the program. I use Q4Wine as interface on Linux.

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.

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 8048 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 8048 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.

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


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

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


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

Interrupt pins configuration

The IDE has a button that will activate the interrupt line to simulate external interrupt.

User define buttons configuration

There are also four user define buttons on the seven segment panel, these are connected to P2.8 to P2,5 to simulate I/O lines.

Supported development board

I use this development board that I build usinf an Arduin Nano as ram/rom/ IO simulator. It is simple to buid and the IDE can generate the C code array to include in the Arduno sketch below.

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.

Note *) I stopped using expensive (400 $ a year) code signing certificates to bypass the “smartscreen” on Windows so this IDE (and the next version of the others) is free. So if you want to use this IDE just tell smartscreen that you trust this software. On de Linux it is has never been a problem using this IDE.

Version 1.01

  • Initial release, it might be not completely bug free, I will test on, wait for remarks and release the next version soon.

8048 links, tips and documents

More pages on software development

[catlist name=”Software development”]

Leave a Reply