I would like to fit MCS-52 basic version 1.1 (or later, for exemple v1.3) to ADuC84x device.
Theoretically it is possible because this BASIC interpreter demands at least 8K code ROM and as minimal 1K XRAM
and can operate without external EPROM for initial adjustment and basic program storage.
I tried to modify ASM codes of original BASIC as following^
1) at the address 0000H I made LCALL ADUC842
I rewrote a procedure of automatic baud rate calculation and load RCAPH2 and RCAPL2 with required constants.
When I tried to run the 842 with this codes I find out the incorrect operation of BASIC interpreter.
For instance it does not store user program in RAM
>10 print 10
It calculates arithmetic expressions incorrectly or detects errors where are no them.
Q: What SFRs can affect on code execution?
Q: Are there any differences in instructions execution on ADuC842 vs standard 8052 and how to work around them?
Attachment: modified ASM source of MCS-52 BASIC.
(I suppose one-cycle core of ADuC842 does not affect on calculations).