#COMPILE EXE "s85_peek_poke.exe"
' Sample: Memory access via pointers
FUNCTION PBMAIN() AS LONG
    DIM val AS LONG, p AS LONG PTR
    val = 42
    p = VARPTR(val)
    PRINT "Original value:"; val
    PRINT "Value via @p ="; @p
    @p = 99
    PRINT "After pointer write:"; val
    FUNCTION = 0
END FUNCTION
