Intel's 8052, an 8051 with Basic built in

I’d somehow missed this, the 8051 being perhaps the 3rd CPU I got a little familiarity with - Intel (and second sources) offered the 8052 microcontroller with a built-in Basic. Apparently useful for fire alarms, burglar alarms and other kinds of not-realtime industrial control.

Here’s a project, by Madis Kaal, which uses it:
My 8052 BASIC Project

image

Some time in early 80-ies Intel produced a mask-programmed 8052 MCU which contained a floating-point Basic interpreter with lots of interesting features, including built-in support for EPROM storage of BASIC programs.

*MCS-51(tm) BASIC V1.1*
READY
>

Many further links on the project page, including a link to this second, improved, project:
Fully configured 8052-BASIC core

After building my first 8052-BASIC project I learned that there is more to that Basic that shows up on a surface. The most important fact is that it looks for extension ROMin code memory space and if couple of bytes check out during boot, tries to call initialization code and does other interesting things in that ROM space. So the method to map 32K of RAM to both code and data space is not a very good idea at all, possibly resulting a crash at startup…

See also the helpfully HTML-ified manual:
BASIC-52 Reference Manual

7 Likes

Rather than hijack the PJRC 8051 dev board thread with something only marginally related, I think I’ve found a port of 8052-BASIC to the incredibly cheap CH552 8051 clone:

https://nitter.net/hiyodori5/status/1655122637390237697

The thread is in Japanese, but there are working download links to a Google Drive folder with various hex files inside. I haven’t tried these yet, even though I have a bunch of the (5× for $10) WeAct Studio CH552 USB breakout boards.

The BASIC program seems to be limited to around 500 bytes as the CH552 isn’t configured with any external RAM.

1 Like

Hi
I got Tiny BASIC working on the SAB80535 dev board although BASIC-52 also looks interesting and a lot more complete.

I did some searching with Google for BASIC-52 and there are many hits. What would be the best starting point so I can port over to my SAB80535 dev board project?

What assembler is necessary? I am using AS31 assembler and ASEM-51 macro assembler for project so far.

Thanks! Andrew Lynch

The original source was available at:
ftp://ftp.intel.com/pub/mcs51/tools/basic52.zip
but is no longer.

The source for the version mentioned in EdS’s link is here:
https://web.archive.org/web/20020802083519/http://www.code.archive.aisnota.com/basic-52.zip

For reasons, it’s not built from Intel’s source. Intel’s source is public domain.

The thread I linked to has the source in here:
https://drive.google.com/drive/folders/1VYlqOcmCvUONTFpKjgOmCA-ttdABl6nv?usp=sharing

It is based on:

;*****************************************************************************
;*                                                                           *
;*                    MCS-BASIC-52 V1.31 Source Listing                      *
;*                           12/1986 till 11/2001                            *
;*       The original source code of V1.1 (BASIC.SRC and FP52.SRC) by        *
;*            Intel Corporation, Embedded Controller Operations              *
;*                             is public donain                              *
;*                                                                           *
;*****************************************************************************
;
;*****************************************************************************
;* General alterations made by D. Wulf, 12/1999.                             *
;* e-mail: [email protected]                                         *
;*****************************************************************************

aka MCS-BASIC-52 V1.31, by Wulf and Boehling. Its original listing is here: A Tiny 80(C)32 BASIC Board

The google drive link includes an exe of Metalink’s ASM51

1 Like

Hi
OK, that’s great. Good to start out on the right foot when doing new software ports so much appreciated.

When I ported the Tiny-BASIC on the PJRC website to my SAB80535 dev board, the defaults were to run in ROM and it took a while to find and adjust the settings so it would run properly in RAM.

I will download the BASIC-52 code and see if it runs on the SAB80535 dev board. Looks really interesting! Thanks, Andrew Lynch

Someone has taken the inexpensive WinChipHead WCH55x 8051 chips and remade an Intel 8052 pin-compatible single chip computer:
Simple Single Chip Computer running MCS BASIC-52

The smallest/cheapest CH552 chip only has enough RAM for a roughly 600 byte program, but the CH559 has a more useful 6 KB of RAM. None of these chips can take external RAM, however, and it seems that programs don’t persist and must be ‘typed in’ via the UART

While the CH559 is available inexpensively as bare chips, the dev boards are much more expensive

It’s great to see people still interested in using early microcontrollers as the base for retrocomputing. I put Basic-52 v1.3 on an eprom to run on a New Micros SAB80535 board. Lots of fun still to be had. The 8051 series was kind of weird with a modified Harvard architecture that could be run as a von-Neuman processor out of common ram. I’m also seeing if I can use 68HC11 based boards to act as a 6800-based SWTPC clone due to the same instruction set and architecture. Maybe try to get VTL on it. Running the tools in dosbox adds to the fun.

2 Likes