MMBasic for Windows - betas


Author Message
Goksteroo
Senior Member

Joined: 15/03/2021
Location: Australia
Posts: 111
Posted: 09:18am 03 Mar 2022      

From Maximite MMBasic help page check out VARADDR and their example of peeking and poking that address is here:
sample$ = "The Colour Maximite 2 is the latest in a long series of microcomputers."

startB = PEEK(VARADDR sample$)
PRINT "          00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F"
PRINT
dump startB
FOR k = 0 TO 255
  POKE BYTE startB+k,k
NEXT k
PRINT
dump startB

SUB dump(startblock)
LOCAL INTEGER k,b,n
LOCAL a$
FOR k = 0 TO &h0f
  a$ = "   "
  PRINT HEX$(startblock+k*16,8);"  ";
  FOR n = 0 TO 15
    b = PEEK(BYTE startBlock+n+k*16)
    PRINT HEX$(b,2);" ";
    IF b > 31 AND b < 128 THEN
      a$ = a$ + CHR$(b)
    ELSE
      a$ = a$ + "."
    ENDIF
  NEXT n
  PRINT a$
NEXT k
END SUB
END
Mind you, this is for the Maximite version of MM Basic and I haven't tried it on MMB4W.