home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 October / Ahoy_Magazine_87-10_1987_Double_L_Side_A.d64 / Duo-Print (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  603b  |  24 lines

  1. 5 h$="0123456789abcdef"
  2. 10 input"[147]enter starting address ";a1
  3. 20 input"[147]enter ending address ";a2
  4. 30 ifa2<a1then10
  5. 40 s1=a1:s2=int((a2+a1)/2)
  6. 55 ifa1-int(a1/8)*8<>s2-int(s2/8)*8thens2=s2+1:goto55
  7. 60 e1=s2-1:e2=a2
  8. 70 print"[147]"
  9. 75 open4,4:cmd4
  10. 80 ifs1>e1thenprintspc(30);:goto95
  11. 90 a=s1:gosub600:fori=0to7:a=peek(s1+i):gosub700:nexti
  12. 95 printspc(10):ifs2>e2then110
  13. 100 a=s2:gosub600:fori=0to7:a=peek(s2+i):gosub700:nexti
  14. 105 print
  15. 110 s1=s1+8:s2=s2+8
  16. 115 ifs1<=e1ors2<=e2then80
  17. 120 print#4,"":close 4:end
  18. 599 rem
  19. 600 c=int(a/4096):printmid$(h$,c+1,1);:a=a-4096*c
  20. 605 c=int(a/256):printmid$(h$,c+1,1);:a=a-256*c:c=int(a/16)
  21. 610 printmid$(h$,c+1,1);:a=a-16*c:printmid$(h$,a+1,1)": ";:return
  22. 700 c=int(a/16)
  23. 705 printmid$(h$,c+1,1)mid$(h$,(aand15)+1,1)" ";:return
  24.