??? 12/20/04 16:43 Read: times |
#83534 - Data limited, not code Responding to: ???'s previous message |
Steve,
First, thanks. Good to feel a tap on my shoulder :-) The code is not limited by the XRAM size, as you can write the code directly to FLASH (hence code limited to between $8000 and bootloader beginning). However, XRAM limits the data when the program is running. Of course, you can add extra SRAM as many you want up to 32kB. ------- I made the modifications simply because I had no board with external SRAM and EPROM on hand and wanted to try the BASIC52 I downloaded as soon as possible. Then, I thought on how the problem with small SRAM can be circumvented, and I expanded the GOSUB and GOTO so that it refers not only to program line, but also to position in ROM. In this way you can write short routines and burn them into FLASH, "linking" them together with such statements. While working, this is a true pain to plan bigger programs. I tried to run the lunar lander in this way; and although I succeeded (in 5 parts), it was a whole night of debugging - absolutely no fun. Later I realized that there is no reason not to treat the FLASH as RAM, so I simply tried, and you can test the result. Unfortunately, only the Atmel/Temic variety of RD2 requires no extra RAM to reprogram a FLASH page (they did't publish details, but I suspect they have a 128-bytes long RAM buffer hidden from the processor core, where they store data while erasing a page); so modifying it for the AD, Philips, SST and Winbond chips would not be so easy, but perhaps viable. The AD-sort has a 64 bytes long page, so if time and circumstances permit, I will try that first. Jan Waclawek |