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.
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.
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…
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:
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.
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.
;*****************************************************************************
;* *
;* 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] *
;*****************************************************************************
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