home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 March / Ahoy_Magazine_87-03_1987_Double_L.d64 / Picmasher (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  70 lines

  1. 0 rem *********************************
  2. 1 rem *****       picmasher       *****
  3. 2 rem ***** by scott miller petty *****
  4. 3 rem ***** 407 b. smith avenue   *****
  5. 4 rem ***** chapel hill, n.c.     *****
  6. 5 rem *****               27514   *****
  7. 6 rem ***** (919)-967-8522        *****
  8. 7 rem *********************************
  9. 10 ifz<>0then175
  10. 15 ifa=0thena=1:load"compressor.o",8,1
  11. 20 ifa=1thena=2:poke56,19:poke55,135:clr:a=2:dimf$(3)
  12. 25 poke53281,15:poke53280,12:poke646,6
  13. 30 s$="[151]                picmasher               [146]":pa=30960
  14. 35 ko$=""+chr$(193)+"[146]pic ":mi$="pic."
  15. 40 print"[147]"s$""tab(12)"k[146]oala":printtab(12)"m[146]icroillustrator"
  16. 45 printtab(12)"o[146]ther"
  17. 50 wait198,15:gett$:bg=0:bo=0
  18. 55 ift$="k"thenp$=ko$:p=1:l1=32576:l2=33576:l3=24576:bg=34576:bo=0
  19. 60 ift$="m"thenp$=mi$:p=1:l1=6384:l2=7384:l3=8384:bg=6364:bo=6365
  20. 65 ift$<>"o"andt$<>"m"andt$<>"k"then50
  21. 70 ift$="o"thenprint"[147]"s$:goto95
  22. 75 print"[147]"s$:input"filename of picture ";f$:p$=p$+f$
  23. 80 print"[145]"tab(23)""p$"[146]":ifleft$(p$,1)<>chr$(18)then95
  24. 85 l=len(p$):ifl<17thenp$=p$+chr$(32):goto85
  25. 90 p$=right$(p$,14):p$=chr$(129)+p$
  26. 95 input"new load address of pic ";f:n$=right$(str$(f),len(str$(f))-1)
  27. 100 print"[145]"tab(27)""n$"[157][146]":f1=int(f/256):f2=f-256*f1
  28. 105 ifpthen165
  29. 110 print"file loads in [156]1[146] 2[146] 3[146] parts ?":wait198,15:gett$:d=val(t$)
  30. 115 print"[145]"tab(15)"  "t$"  [146]"
  31. 120 fori=1tod:print"filename of part"i:input"[145]";f$(i)
  32. 125 print"[145]"tab(22)f$(i)"[146]":next:p$=f$(1):f$=p$
  33. 130 input"address of video matrix is ";l1
  34. 135 l1$=right$(str$(l1),len(str$(l1))-1):print"[145]"tab(30)""l1$"[157][146]"
  35. 140 input"address of color memory is ";l2
  36. 145 l2$=right$(str$(l2),len(str$(l2))-1):print"[145]"tab(30)""l2$"[157][146]"
  37. 150 input"address of your bit map is ";l3
  38. 155 l3$=right$(str$(l3),len(str$(l3))-1):print"[145]"tab(30)""l3$"[157][146]"
  39. 160 fori=1264to1743:pokei,32:next:print""
  40. 165 k$="[151]                                        [146]":print""k$""k$
  41. 170 print"[145][145][145]  insert picture disk and hit  return   [146]":wait198,15:gett$
  42. 175 ifpthen195
  43. 180 ifz=0thenz=1:loadf$(1),8,1
  44. 185 ifd>1thenifz=1thenz=2:loadf$(2),8,1
  45. 190 ifd>2thenifz=2thenz=3:loadf$(3),8,1
  46. 195 ifz=0thenz=1:loadp$,8,1
  47. 200 ifl3=24576thenp$=right$(p$,14):p$="[193][146]"+p$
  48. 205 print""p$" is now loaded"
  49. 210 print""k$""k$:bg=peek(bg):bo=peek(bo)
  50. 215 print"[145][145][145]insert destination disk and hit  return [146]":wait198,15:gett$
  51. 220 cp=49152:sv=cp+324
  52. 225 ifl1>29960andl1<40960thenpa=5000
  53. 230 ifl2>29960andl2<40960thenpa=5000
  54. 235 ifl3>29960andl3<40960thenpa=5000
  55. 240 syscp,l1,pa,1000
  56. 245 ra=peek(253)+256*peek(254)
  57. 250 syscp,l2,ra,1000
  58. 255 ra=peek(253)+256*peek(254)
  59. 260 syscp,l3,ra,8000
  60. 265 ra=peek(253)+256*peek(254)
  61. 270 ifl3=24576thenf$=right$(f$,len(f$)-2)
  62. 275 open2,8,2,f$+chr$(160)+n$+",p,w":syssv,pa,ra,f:print#2,chr$(bg)chr$(bo)
  63. 280 close2:sys65484:printtab(6)"old file length = 10000 bytes"
  64. 285 printtab(6)"new file length =";:ra=ra-pa:printra"bytes":sa=10000-ra
  65. 290 printtab(6)"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  66. 295 printtab(6)"memory saved    ="sa"bytes":printtab(13)" hit any key [145][146]"
  67. 300 wait198,15:gett$
  68. 305 print"[147]"s$" another file (y/n)":wait198,15:gett$
  69. 310 ift$="y"thenz=0:open15,8,15:print#15,"i0:":close15:goto25
  70.