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

RPBASIC-52 PROGRAMMING GUIDE
2-85
POKEW
Syntax:
P O KE W segmen t,address,d ata
Where: segment = 0 to 7, specifies the 64K segment
address = 0 to 65535, location in segment to save to
data = 0 to 6 5 53 5 , n u m b er t o s a v e t o R A M
Function:
W r it es an u ns ig n ed 1 6 b it nu m be r t o R A M .
Mode:
Comm and, Run
Use:
P O K E W 1 , A D, D A
Cards:
All
D E S C R IP T I ON
Use POKE W to write 16 bit numbers into RAM. The results of an A-D conversion, for example, can be
saved.
WARNING:
RPBAS IC-52 does not check the address. It is possible to poke into the program, stack, or
variable areas. Results are unpredictable. Poke into mem ory above MT OP for safest
operation.
See the POKEB command for segment and address information.
RELATED
P E E K W
ERRORS
B A D S Y N T A X
If W, segmen t, address, or data is missing.
BAD DATA
If segment is > 7, address or data > 65535 or negative
EXAMPLES
T h e f ol lo w in g ex a mp le ta k es da ta fr om t he A IN f un c ti on a nd sa v es it to se g me n t 1 of th e 12 8 K R A M .
1000 FOR N = 0 TO 7
1010 POKE W1,N*2+100,AIN(N)
1020 NEXT
T h e n e xt ex a mp le p ri nt s o u t t he d at a f ro m R A M.
500 FOR N = 0 TO 7
510 PRINT PEEKW(1,100+N*2)
520 NEXT