Software Center 2026-06-30 20:37
So i know you can save numbers using POKE, but how do i save letters
C-script 2026-07-01 00:44
I used POKE for this exact thing. I turned it into the ASCLL value like A is 65 then made a simple program to decode it.
Small example
BASE=60000
DO
CLS
LOADs$=""
I=0
DO
C=PEEK(BASE+I)
IF C=0 THEN EXIT
LOADs$=LOADs$+CHR$(C)
I=I+1
LOOP
PRINT "TYPE A WORD:"
PRINT
PRINT "LAST WORD:"
PRINT LOADs$
PRINT
INPUT TEXTs$
FOR I=1 TO LEN(TEXTs$)
POKE BASE+I-1,ASC(MID$(TEXTs$,I,1))
NEXT I
POKE BASE+LEN(TEXTs$),0
LOOP
wryhode 2026-07-02 22:40 (Edited)
' ===== saving a string to memory
' setup variables
' addr can be changed to any valid ram location to store the string at a different place
ADDR = $A000
' to_save is the string you want to save
TO_SAVE$ = "HELLO, WORLD!"
' use i starting at one, incrementing up until the length of the string
FOR I = 1 TO LEN(TO_SAVE$)
' get the character / letter at place i of the string
C$ = MID$(TO_SAVE$, I, 1)
' pokes (saves) the ascii value of the character to the memory address
POKE ADDR, ASC(C$)
' increment address to the next memory location to store the next character
INC ADDR
NEXT I
' ===== reading a stored string from memory
' setup variables
' change this to be equal to the place you stored the string
READ_ADDR = $A000
' variable used to store the string as it gets read from ram
STRING$ = ""
' loop "forever"
DO
' read the value at the current memory address
C = PEEK(READ_ADDR)
' if it is equal to 0, we know that we have reached the end of our stored string, we can exit the do-loop loop
' (no valid letter has the ascii code 0)
IF C = 0 THEN EXIT
' convert the value to a character, and add it to the string
STRING$ = STRING$ + CHR$(C)
' add 1 to the read address, move to next character of the stored string
INC READ_ADDR
LOOP
' the string read and is ready to be used
PRINT STRING$