RAM MEMORY
510 GOSUB 2000 | Retrieve variables |
This subroutine stores variables CF, JC, and AC into an array starting in segment 1, address 0.
1000 POK EB1, 30*NO, JC
1010 POKEW1,30*NO+ 1,AC
1020 POKEF1,30*NO+ 3,CF
1030 POKE$1, 30*NO+ 9,$(0)
1040 RETURN
Subroutine 2000 - 2040 retrieves data into variables CF, JC and AC .
2000 JC = | PEEKB(1,30*NO) | |
2010 | AC = | PEEKW (1,30*N O+ 1) |
2020 | $(1) = | PEEK$(1, 30*NO+ 9) |
2030 CF = | PEEKF (1,30*N O+ 3) |
2040 RETURN
You can store and retrie ve strings a nd variab les in this way. Ther e are many variations of PEEK and POKE statements. Refer to the RPBASIC
BLOCK DATA TRANSFER
Blocks of data are transferred to and from RA M and flash EPR OM u sing BLOAD and BSAVE comma nds. Block transfers are useful for loading and storing data,
Transfers from EPRO M to RAM , using BLOA D, take approximately 23.5 m s/1000 bytes. T ransfers from RAM to EPROM , using BSAVE , are even longer at 100 ms/ 1000 bytes usin g a 512K byte EPR OM . T his time is even longer when smaller E PROM s are used (due to the program ming algorithm).
Serial port, tick timer, and external interrupts are enabled dur ing these tra nsfers. Howe ver, response s to ONT ICK or ONIT R are d elayed by the time it takes to transfer data. W hen ONTIC K or ONIT R must be serviced faster, transfer data in sm aller blocks.
Refer to BLOAD and BSAVE in Appendix A for more information.
SECTION 5
ASSEMBLY LANGUAGE INTERFACE
Assembly language program s must be placed in the
RPBASIC is norm ally in a 32K byte EPROM (27C256). A 64K byte EPROM (27C512) may be used in socket U4 provided the following modification is made: Cut the trace between W11 pins 1 and 2 on the circuit side. (Jumper W11 is under socket U4. P in 1 is designated by the square pad.) Solder a jumpe r between W11 pin 2 and 3.
Docum ented assem bly language interface calls listed in the Intel MCS BASIC
The
COMMANDS
The following is a list of
Comm and | Function |
BLOAD | Transfers data from EPROM to RAM |
BSAVE | Transfers data from RAM to EPROM |
CALL | Calls an assembly language routine |
CBY | Return s code m emor y data |
DBY | Returns or assigns internal memory |
MTOP | Sets top of RAM memory |
PEEK B | Return s a byte |
PEEK F | Returns a floating point number |
PEEK W Returns a 16 bit value | |
PEEK $ | Returns a string |
POKE B | Stores a by te |
POKE F Stores a floating point number | |
POKE W Stores a 16 bit value | |
POKE $ | Stores a string |
XBY | Returns or assigns external memory |
Page