Software development for the 805x series

While working with my now working 8052 SBC, I spent some time testing with the BASIC-52 (v1.31) program.  One of the things I noticed is that the default value for the XTAL variable is set for 11.0592 MHz.  In looking at the source code, which is written in assembly, I found where the default value is stored and was able to change it.  However, I needed a way to re-assemble the source code into a binary to load into the AT89S52’s on-board FLASH memory.

I run Linux all the time and use it for everything. Currently, I am running Linux Mint 13 (LTS) but also have a WINDOWS® XP virtual machine running so I can develop for the AVR series of MCU’s.  For the 805x series, I have the limited “free” version of Keil’s uVision IDE, which runs under WINDOWS® and supports the legacy 805x MCU’s but it is limited to some 2KB of producible program code.  The Keil uVision assembler does directly assemble the BASIC-52 source code without modification.  The nice thing about KEIL’s IDE is that it also has a simulator for debugging code.

I REALLY want to assemble code under Linux and there are several open-source assemblers.  Most are outdated and must run under DOS (or a DOS-box under WINDOWS®).  I could run DOEMU or DOSBOX under Linux but that would be inefficient and there are some open-source Linux alternatives like as31, as8051 (asxxxx), asem51, etc.  A web search for these will yield their download URL’s.  But none of these directly assemble the BASIC-52 source code without some modification.  I really did not wish to modify the original source code in that manner though.  I did finally stumble across the asem51 assembler, which I found assembles the BASIC-52 source code without modification thus it is compatible with INTEL’s (and KEIL’s) DOS andWINDOWS® based assemblers.

BTW: the modification for setting the default XTAL frequency in the BASIC-52 source code is located around line 5830 in the version 1.31 source code.  Using the Linux command line version of the open-source minipro software for the TL-866A programmer also allowed me to reprogram the AT89S52 using the ICSP interface.  Except for a decent Linux-based debugger, I now am able to assemble and download my code into the AT89S52 without removing it from the PCB.

I’ll also note that the sdcc compiler is Linux compatible and will compile “C” code and has the ASXXXX assembler (written by Alan Baldwin) bundled with it.  As I stated, though the ASXXXX assembler is not directly compatible with the INTEL assembler, so existing 805x assembly code may need some modification to assemble without errors.

Peace and blessings.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s