home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 37 / 64er_Magazin_Sonderheft_37_19xx_Markt__Technik_de_Disk_1_of_2_Side_A.d64 / change (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  51 lines

  1. 10 n1$="a.paint p1"
  2. 15 u=8:d=0
  3. 60 print "bitte amica-paint disk in laufwerk 8 einlegen und taste druecken"
  4. 65 poke198,0:wait 198,1
  5. 80 n$=n1$:p=44800
  6. 110 v=16: q=32: f=256: n$=left$(n$,v)
  7. 120 h$="0123456789abcdef": z$=chr$(0)
  8. 130 t$=right$(str$(d),1): open 1,u,15,"i"+t$: gosub 620
  9. 140 t$=t$+":"+n$: open 2,u,2,t$+",p,r"
  10. 150 input#1,e,m$,j,k: if e=0 then 240
  11. 160 close 1: close 2: print " programm ";n$;
  12. 170 if e=62 then print " nicht gefunden ": goto 200
  13. 180 if e=64 then print " falscher filetyp": goto 200
  14. 190 print " disk read-error";e: end
  15. 210 j=int(c/v): k=c-j*v
  16. 220 m$=m$+mid$(h$,j+1,1)+mid$(h$,k+1,1)
  17. 230 return
  18. 240 get#2,a$,b$: if st then 190
  19. 250 close 2: close 1: m$=""
  20. 260 a=asc(a$+z$): b=asc(b$+z$)
  21. 270 c=b: gosub 210: c=a: gosub 210
  22. 280 print"die startadresse von ";n$;" ist: ";
  23. 290 print"hexadezimal: ";m$;" dezimal:  ";b*f+a
  24. 300 print"und wird geaendert auf dezimal: ";p
  25. 340 b=int(p/f): a=p-b*f: p$=chr$(a)+chr$(b): m$=""
  26. 350 c=b: gosub 210: c=a: gosub 210
  27. 360 print " hex:  ";m$;"    decimal: ";b*f+a
  28. 390 j=len(n$): if j=v then 410
  29. 400 for x=j+1 to v:n$=n$+chr$(160):next
  30. 410 open 1,u,15: open 2,u,2,"#"
  31. 420 gosub 620: t=18: s=1
  32. 430 print#1,"u1:";2;d;t;s: gosub 620
  33. 440 print#1,"b-p:";2;0: get#2,a$,b$
  34. 450 t=asc(a$+z$): s=asc(b$+z$): h=2
  35. 460 print#1,"b-p:";2;h: get#2,t$
  36. 470 c=asc(t$+z$): if c<>130 then 510
  37. 480 get#2,a$,b$: f$="": for x=1 to v
  38. 490 get#2,t$: f$=f$+t$: next
  39. 500 if f$=n$ then 530
  40. 510 h=h+q: if h<f then 460
  41. 520 goto 430
  42. 530 a=asc(a$+z$): b=asc(b$+z$)
  43. 540 print#1,"u1:";2;d;a;b: gosub 620
  44. 550 print#1,"b-p:";2;2: print#2,p$;
  45. 560 print#1,"u2:";2;d;a;b: gosub 620
  46. 570 close 2: gosub 620: close 1
  47. 610 print"fertig! amica-paint kann nun gestartet   werden":end
  48. 620 input#1,e,m$,j,k:if e=0 then return
  49. 630 print " error: ";e;m$;j;k
  50. 640 close 2: close 1: end
  51.