home *** CD-ROM | disk | FTP | other *** search
/ Light / Light_Vol.1_August_1992_Datasphere_Publications_Disk_1_of_2_Side_B.d64 / peeper (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  1KB  |  18 lines

  1. 0 print"[147]":poke53281,11:poke53280,11:poke646,1:print" ** simple basic memory display ** [146]":print"for those without a monitor, here is a":print"basic program to display memory bytes.":print"it will give you some idea of how the":print"computer stores data."
  2. 1 print"for instance : input 2048 to about 2600":print"to see this program and what it looks":print"like.":print"press any key to see each line of bytes":print"while within display mode.":print"message will say when you are finished.":print"[153] press any key [146]"
  3. 2 geta$:ifa$=""then2
  4. 3 poke53280,0:print"[147]":print"please enter start address in decimal"
  5. 4 input"start address ";sa:ifsa<0then4
  6. 5 print"please enter end address in decimal"
  7. 6 input"end address ";ea:ifea>65535then6
  8. 7 ifea<sathen3
  9. 8 print"[147]":forct=satoeastep8:zz=ct:gosub15:fortc=cttoct+7:zz=peek(tc):gosub16:printzz$;" ";:nexttc:print" ";:aa$="":fortc=cttoct+7:zz=peek(tc):ifzz<32orzz>95thenaa$=aa$+".":goto10
  10. 9 aa$=aa$+chr$(zz)
  11. 10 nexttc:printaa$
  12. 11 geta$:ifa$=""then11
  13. 12 nextct:print">>  end of display [146]":forde=0to2000:next:print"[153][153] press any key [146]"
  14. 13 geta$:ifa$=""then13
  15. 14 goto3
  16. 15 hb=int(zz/256):lb=ct-hb*256:zz=hb:gosub16:printzz$;:zz=lb:gosub16:printzz$;" ";:return
  17. 16 z1=int(zz/16):z2=zz-z1*16:zz$=chr$(z1+48-7*(z1>9))+chr$(z2+48-7*(z2>9)):return
  18.