Rpbasic-52 programming guide, Warning – Remote Processing BASIC 52 User Manual
Page 128

RPBASIC-52 PROGRAMMING GUIDE
2-109
ST@
Syntax:
S T @ expr
Where: expr = 0 to 65535
Function:
Takes a floating-point number from the a rgument stack and stores it to data mem ory at the address.
Mode:
Comm and, run
Use:
PUSH B : ST@7E00
Cards:
All
D E S C R IP T I ON
ST@ is used in conjunction with PUSH, POP, and LD@ . Use these commands to save and retrieve floating
p o in t n u mb e rs to p ro g ra m R A M .
NOTE: LD@ and ST@ cannot use ex tended RA M. Only se gment 0 R AM (u sed for running B asic
programs) is used. Use PEEK and POKE com mands to access this memory.
WARNING:
Wh en 128 K and 512K RA M are installe d, all of m emo ry is cle ared o n pow er up a nd rese t.
Do not use LD@ or ST @ to save floating point numbers in segment 0. Use POKE and
PEEK type comm ands instead.
32K R AM sy stems hav e address 7E 00H set as M TOP. T his location up to 7F FFH m ay be used to sto re
variables.
expr is the ad dress in RA M of w here a num ber is sto red.
Each floatin g-poin t num ber req uires si x byte s of m emo ry. expr in the ST@ and LD@ instructions specify the
high address. A number is stored at locations expr through expr-6.
RELATED
L D @ , P U S H , P O P
E R R O R
expr location should be above MTOP. Otherwise the data may be overwritten.
EXAMPLE
100 A=AIN(0)*.234
110 PUSH A
120 ST@7F00H
.
.
300 LD@7F00H
310 POP B
320 PRINT "Analog value retrieved=",B
>run
Analog value retrieved=",B