02-20-2004, 06:47 PM
Ever wondered what you memory looks like?
Well.... probably not... heh, ut now you can see visually what your memory looks like. I am planning a 3D version of this and maybe have a game revolve around it.
Well.... probably not... heh, ut now you can see visually what your memory looks like. I am planning a 3D version of this and maybe have a game revolve around it.
Code:
DEFINT A-Z
SCREEN 12
LINE (0, 114)-(639, 116), 8, BF
LINE (0, 117)-(639, 119), 7, BF
LINE (0, 120)-(639, 430), 15, BF
LINE (0, 431)-(639, 433), 7, BF
LINE (0, 434)-(639, 436), 8, BF
DO
key$ = INKEY$
oldmemloc = memloc
IF key$ = "+" AND dir < 1 THEN dir = dir + 1
IF key$ = "-" AND dir > -1 THEN dir = dir - 1
IF dir = 1 AND memloc < 64882 THEN memloc = memloc + 8
IF dir = -1 AND memloc > 8 THEN memloc = memloc - 8
LOCATE 1, 1: PRINT "Displaying Mem Location:"; memloc; " to"; memloc + 640
IF oldmemloc <> memloc THEN LINE (0, 144)-(639, 401), 15, BF
FOR disp = 0 TO 639
mem = PEEK(disp + memloc)
LINE (disp, 400)-(disp, 400 - mem), 8
IF memloc = oldmemloc THEN LINE (disp, 140)-(disp, 400 - mem), 15
NEXT
LOOP