Summary:
All 8052-specific functions/statements have been disabled.
Due to the fact that the EPROM programming features do not work when
executing BASIC-52 from external EPROM, all EPROM programming features
have been disabled.
Timer 1 defaults to the baud rate generation for the console port except
during execution of any commands that send output to the list port and
during the execution of the PWM statement.
All other features/functions are intact.
These changes were made to allow BASIC to run on an 8031/8051 uP system
in external EPROM.
Changes:
Functions/commands removed | |
TIMER2 special function operator disabled | generates ERROR: BAD SYNTAX message |
T2CON special function operator disabled | generates ERROR: BAD SYNTAX message |
RCAP2 special function operator disabled | generates ERROR: BAD SYNTAX message |
PROG command disabled | generates ERROR: PROGRAMMING message |
FPROG command disabled | generates ERROR: PROGRAMMING message |
PROGx command disabled | generates ERROR: PROGRAMMING message |
FPROGx command disabled | generates ERROR: PROGRAMMING message |
PGM statement disabled | generates ERROR: PROGRAMMING message |
Timer 2 overflow interrupt disabled | replaced with RETI |
Timer 1 :
Timer 1 used for serial console port. (19200 baud is maximum).
The EPROM baud rate value at 8000H (for example, when saved with a
PROGx by BASIC-52) is loaded into Timer 1.
Autobaud rate value converted to Timer 1 value.
Location 44H in internal memory is now reserved for Timer 1 baud rate
value.
Timesharing of Timer 1 added to PH0.#,
PH1.#, PRINT#,
P.#, ?#, and
LIST# statements so that when sending output
to the list device, Timer 1 is used for the list device baud rate. Timer
1 is restored to the baud rate timer for the console port when output to
the list device is finished.
Timesharing of Timer 1 added to the PWM
statement so that when generating output on the PWM
pin, Timer 1 is used for that timing. Timer 1 is restored to the baud rate
timer for the console port when the PWM output
is finished.
Stack :
Internal stack overflow checking modified to recognize that the 8031/8051
has only 128 bytes of internal RAM instead of 256 bytes.
Miscellaneous :
Sign-on version number changed to V1.2.
"Modified by ..." text added to ^W^C message.
Enhancements:
Backspace support added to line editing - in addition to the Delete character.
The floating point subtraction routine modifications and the ASCII-to-BINARY performance improvements from the October 1991 issue of Elektor Electronics USA have been added. (Note: The multiplication routine modifications from the November 1991 issue of Elektor Electronics USA were not included due to the fixes not performing as indicated in the article)
Anomalies:
Due to the timesharing of Timer 1 during sending output to the list device (PRINT#, LIST#, etc.), a ^C (control C) will not stop the list output because Timer 1 is used for the output baud rate and the console serial port is deactivated.
Due to the smaller internal RAM in the 8031/8051, the internal stack
is defaulted to 51 bytes instead of the 179 bytes in the 8052. This may
cause some programs to generated an "ERROR:
I-STACK". This is typically caused by too many nested levels of parenthesis
"()", and can usually be made to work by breaking the expression into several
less complex expressions.
Summary:
Corrected bug to allow Baud Rate to be correctly loaded from autoboot
external EPROM at 8000H.
Corrected bug which displayed garbage characters on console port when
printing with PRINT statements that were
followed immediately by PRINT# statements.
Corrected Intel bug to allow autoboot EPROM at 8000H with program with
user command extensions to work.1
Corrected Intel bug to that discarded the 'F' in any variable ending
in F, FP, FPR, and FPRO and followed by a space.2
Stack :
Modified internal stack (I-STACK) check to allow usage of 256 bytes of internal RAM if available on 8052 or enhanced 8051.
Uses Bit 51 (38.3/26.3H) : 0 = 128, 1 = 256 bytes internal RAM
Miscellaneous :
Sign-on version number changed to V1.2a.
Note2] This does not correct the problem of the
character being discarded from a variable that is the first character of
the last user added keyword extensions when it is followed by a space.
These code changes have been tested, but is not guaranteed to be bug
free (what software is?!).
For those who haven't discovered this, BASIC-52 has a keystroke sequence
^W^C (control-W followed by a control C) that will display the developers'
name, company, and date.
References:
- Intel MCS(R) BASIC-52
USERS MANUAL, Order Number: 270010-003, Intel Corporation, 1986
- BASIC-52 PROGRAMMING,
First Edition, Revision 1.1E, Systronix, Inc, November 1989
- Intel TECHBits BASIC-52
(ECO), Reference No. MIC-23, B. Jones, Intel Corporation, October 10, 1986
- Modifications :
Dan Karmann, Aug. 1993