Storing or Recalling a Single Byte
Two of the system functions, STB and RCB, let you store and recall single bytes in memory. The valid range for byte values is 0-255 in decimal mode, (00-FF in hex mode). Regardless of the mode in use, you must express the byte address as a hexadecimal number.
Calculating an Address in User Memory
To calculate the address of a byte in user memory, use one of the formulas given below. Then convert the address to hex. (For the address of a byte in system memory, refer to the "Memory Map" and "System RAM Usage" sections of Appendix C.)- For a specified byte in a data register, use:
Byte address = 16384 - ( 8 × Reg) - Byte
where Reg is the number of the data register and Byte is in the range 1-8. - For a specified step in program memory, use:
Byte address = 9184 + FS + Step
where FS is the number of bytes partitioned as file space and Step is the program step number. - For a specified byte in the file space, use:
Byte address = 9183 + Byte
where Byte is in the range 1 to the total number of bytes partitioned as file space.
The STB and RCB Functions
{ STB } hhhh stores the value in the numeric display in byte hhhh, where hhhh is a four-digit hex memory address.
{ RCB } hhhh recalls into the numeric display register the value in byte hhhh, where hhhh is a four-digit hex memory address.
Example
Use STB to store the hex value AA (170 decimal) in the third byte of data register 000 and then use RCB to recall the byte in decimal mode. First, use the equation from above to calculate the address of the byte.Byte address = 16384 - ( 8 × 0 ) - 3 = 16381
Converted to hex, the byte address is 3FFD.
Procedure | Press | Display |
---|---|---|
Clear and select hex mode | [ CLEAR ] [ CONV ] { BAS } { HEX } | |
Remove protection | [ FUNC ] { SYS } { YES } | |
Enter value AA | [ 2nd ] [ AH ] [ 2nd ] [ AH ] | |
Store at address 3FFD | { STB } 3 [ 2nd ] [ FH ] [ 2nd ] [ FH ] [ 2nd ] [ DH ] | |
Clear and select decimal mode | [ CLEAR ] [ CONV ] { BAS } { DEC } | |
Redisplay system functions menu | [ FUNC ] { SYS } | |
Recall the value from address 3FFD | { RCB } 3 [ 2nd ] [ FH ] [ 2nd ] [ FH ] [ 2nd ] [ DH ] | |
Restore protection | [ HELP ] { YES } |
☚ Back