Back Home

Navigation

Home

SB-Assembler
News
Download
Quick Start
Source Files
Running SBASM
Expressions
Labels
Directives
Macros
Error Messages
How To?
History
Known Bugs

Cross-Overlays


History Of The SB-Assembler

In the beginning I assembled my machine language programs by hand for the Apple ][ computer. As you can imagine this a very time consuming way of programming. If you add or delete one byte of code somewhere in between your program you'll have to recalculate all destination addresses and pointers. It is also very likely to have coding or calculation errors.

The SC-Assembler

After buying some disk drives for my computer I went looking for a suitable assembler. All assemblers available for the Apple had a bulky user guide and were quite difficult to use. For some the source files were stored in text format and reading text files with the Apple was something you really didn't want to do. The Apple read 1 character at a time from disk. And if it decides to read more the disk already rotated to the next sector. So you had to wait a whole revolution of the disk before it can read the next character, and so on.
I got hold of the SC-Assembler, made by Bob Sander Cederlof. It had a very easy to use structure and disk access was not as fast as with the Applesoft Basic, but it was acceptable. I had no trouble learning this assembler and it had everything I wanted on board. I created a few programs with this assembler until I started wanting more. I wanted to have cross assemblers for a few other processors. Some crosses were available for the SC-Assembler, but with many limitations. The 6502 version of the SC-Assembler had been developed further over the years. Other crosses however were stuck to version 1.0. I created some programs with a 6800 and a 6809 cross version of the SC-Assembler, despite of its limitations.

One day I was building something with a 8048 processor. I did not have a cross-assembler for it and therefore I assembled the whole program by hand again. It is not such a big problem because the 8048 had only 2k of memory. I wasted a whole week to find a silly bug I introduced by translating a mnemonic to the wrong hex code. And that's when I finally decided to write my own cross assembler.

The Apple ][ Version Of The SB-Assembler

Programming the assembler myself had the advantage that I could make all crosses that I needed. I wouldn't have to go look for a new cross, I could simply write it myself. An other advantage is that I could add a few new features.

First I started by disassembling the whole 6502 version of the SC-Assembler, to learn how it is done. I must say I that learned quite a lot by looking at the code. Once I knew how the assembler worked I could start writing my own version, the SB-Assembler. Apple had developed a 16k RAM card which was used for several different purposes. The SB-Assembler was programmed completely in this 16k RAM card to leave as much conventional memory free as possible. The 16k of RAM were squeezed into a 12k address space. The top 2k if this 12k range could not be used because the monitor ROM had to be copied into it to maintain DOS functionality. Nowadays we would call this monitor ROM the BIOS, for it handled character input, display output and a few other house keeping tasks. The bottom 4k was bank switched to get the total of 16k available. I programmed all the directives into one of these 4k banks. The rest of the assembler core was programmed in the remaining 6kb. This would leave the extra 4k bank free for the cross overlays. Every time a program is assembled the selected cross overlay was loaded into this 4k bank. This structure proved to be working very well.
It took me half a year to complete the SBASM and a few cross overlays and I was very satisfied with the end result. I have developed many programs with it for different processors like the 6502, 6800, 6809, Z8, Z80, and 8048.

The PC Version Of The SB-Assembler

Like everyone else I had to buy a PC to keep up with time. And 2 computers on my desk was a bit too much, so the Apple had to leave. This presented me with a little problem, I could not miss my beloved SB-Assembler anymore. I went to the local book store and bought 2 heavy books, one explaining 8086 machine language, the other explaining the BIOS of the PC. And after reading these two books cover to cover I was ready to program my first assembly program on a PC, the SBASM. I do agree, looking back at parts of the code that were made first I start to laugh. Gradually the code became more effective. In three months time I finished the first version of the assembler. It took a few more moths extra to complete all the crosses. The PC version was 99.9% upward compatible with the Apple version. The only differences were the filename structure, which is totally different in the PC, and the inability to write the object file to internal RAM. To compensate for these minor differences I added a few extra features to the already rich feature list.
I use the SB-Assembler for all my stand alone projects without ever facing any difficulties. I do admit there were a few little bugs left in the assembler, but none of them affected the functionality, stability or usability of program.

Going Public

Finally I decided to make the SB-Assembler available to the public. My home page was on line for almost a year then and it was time to fill it with my projects. We moved to a new house early 2001 and my hobby corner was not ready yet. Unable to do any hardware projects without a decent hobby corner I was forced to work on software projects only for a while. The SB-Assembler was the perfect project to waste all of my spare time on.

The most important job that had to be done in order to make the SB-Assembler available to the public was writing this user manual. I wanted it to be as complete as possible and that took quite some time.
At the same time I revised the complete code of the SB-Assembler to get rid of the minor bugs that were known to me. And before I made the SB-Assembler public I wanted to expand its number handling system from 16 bits to 32 bits.
All these efforts resulted in the first SB-Assembler made public in the first half of 2002. As time goes on new Crosses may become available and some bug fixes may be released. Please refer to the news page to find out what's happening. A release history can be found below.
The latest version of the SB-Assembler can be downloaded here.

Release History

27-July-2006

Version 2.07 of the main program is released today. Improvements are: Apple 1 target format added. .DU directive expanded. .OR directive does not close empty unformatted files anymore. A small technical detail changed for the AVR cross overlay which I still hope to finish someday.
One bug fix: The last line of any source file was not assembled if it was terminated by EOF and not by a CR character.

12-April-2006

Due to a version mix-up an in between version of version 2.05 made its way to the net which still contained some errors which were already fixed in the real version 2.05. I've renamed the good version to 2.06 which is from now on the one you can download from this site.

1-October-2004

The Datapoint 2200 cross overlay was added to the package. Version 2.05 of the main program was finally released which fixes some minor bugs.
And a small bug was fixed in the Microchip PIC16Cxxx cross overlay which now has version 2.01.

17-December-2003

The Motorola 68HC08 cross overlay was added. This overlay was ready for a while before I finally made it publicly available. I intended to release it together with the pending release of the AVR cross overlay, but due to lack of time to finish the latter soon I decided to release the 68HC08 overlay now.

30-July-2003

A bug is fixed in the 146805, 6805 and 68HC05 cross overlays. The bug caused a wrong decision to be made regarding the offset size when a 16-bit offset had a low-byte of $00. This bug is now fixed in the affected overlays version 2.01.

25-July-2002

Cross overlay for the Zilog Z180 added.

18-July-2002

New software version 2.04 of the SB-Assembler core program released to increase the compatibility with other assemblers. New directives for defining bytes and words are added and the SB-Assembler now also understands the Intel radix notation (i.e. 0ABCDH). Two new directives were added to enable programmer control through the COM port.

30-June-2002

Intel 8008 cross overlay adapted to understand both 1972 syntax and 1976 syntax.

27-June-2002

I have added two Fairchild ACE micro controller overlays.

19-June-19-2002

At long last all previously existing cross overlays are finished and included in the download package. The newcomer this week is the Microchip PIC16Cxxx family of processors.
From now on only new crosses are to be added.

12-June-2002

The Motorola 6805 family and 68HC11 added.
The Microchip PIC16C5x family added.
The Microchip cross required me to make a small addition to the assembler core program, which has now version 2.03. Please note that the Microchip cross overlay won't work properly on older versions of SBASM.COM.

4-June-2002

Added the cross overlays for the 8008 and the 6809.

27-May-2002

Stupid TAB character bug fixed in parsing routine (Thanks Izabella).

26-May-2002

The overlays for the following processors were added to the download package:
6502, 65C02, Rockwell 65C02, 6800, 6801, 6804, and 6301.

10-May-2002

The Z8 cross overlay was added to the download package.
The Z80 cross overlay contained a little bug which caused the range check for relative jumps to fail. This was corrected from version 2.01.
The SBASM.COM core program failed to display this new version number correctly, so that bug is also fixed in the latest version 2.01.

30-April-2002

The first official release of the SB-Assembler version 2.0.
The download package includes cross overlays for the 8048 family, the 8051, 8080, 8085 and the Z80.

 

© 2002, San Bergmans, Oisterwijk, The Netherlands
http://www.sbprojects.com