1000 NM$="A U T O P E E K"' A program to peek at a location in memory
1010 REV$="Rev: 830120"'By Robert Hamilton
1020 SCREEN 0,0,0:WIDTH 80:COLOR 2,0,0:KEY OFF:CLS:UP$=STRING$(1,30)
1030 LOCATE ,,1,12,13:DEF SEG=0:IF PEEK (&H410)= 109 THEN LOCATE ,,,6,7
1040 DEF SEG=64:POKE 23,128:DEF SEG:CL$=STRING$(79,0):Q$=CHR$(34)
1050 CLS:LOCATE 5,31:PRINT NM$;CHR$(10);TAB(33);REV$:DEF SEG=64:POKE 23,32
1060 LOCATE 15,5:COLOR 6,0:PRINT "This Program will peek at an input starting segment and offset location.";CHR$(10):ON ERROR GOTO 1190
1070 PRINT TAB(5);"Memory Address may be Decimal, Hexidecimal or Octal.":LOCATE 20,1
1080 COLOR 10,0:INPUT"ENTER  Starting Segment       (-9 to Quit) ===> ",S
1090 IF S<0 THEN 1190
1100 DEF SEG=S:N=15
1110 COLOR 10,0:INPUT"ENTER  Starting Offset        (-9 to Quit) ===> ",H
1120 IF H<0 THEN 1190
1130 COLOR 6,0:PRINT CHR$(10);"Starting Segment =";S;SPC(3);"OFFSET =";H;"+"
1140 COLOR 4,0:PRINT "OFFSET"," DEC","HEX":COLOR 6,0
1150 FOR I=0 TO N:X=PEEK(I+H)
1160 PRINT I,X,HEX$(X)
1170 NEXT:PRINT CHR$(10)
1180 GOTO 1110
1190 DEF SEG=64:POKE 23,0:SOUND 500,5
1200 COLOR 6,0:ON ERROR GOTO 0:END