home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / prt / prnmod.ba < prev    next >
Text File  |  2006-10-19  |  5KB  |  112 lines

  1. 0 'CLUB 100 Library, Modem 415-939-1246
  2. 1 'PRNMOD.BA by Jim Irwin
  3. 10 I=59900:CLEAR256,I:I=HIMEM:J=59960 '    I is for CTRL codes, J is for Fonts
  4. 11 CLS:PRINT:PRINT"[S]tatus":PRINT"[C]trl Codes":PRINT"[F]onts":PRINT"[E]nd"
  5. 12 A$=INPUT$(1):IFA$="E"ORA$="e"THENMENU
  6. 13 IFA$="S"ORA$="s"THEN16
  7. 14 IFA$="C"ORA$="c"THEN40
  8. 15 IFA$="F"ORA$="f"THEN70ELSE11
  9. 16 GOSUB98:GOSUB110:IFPEEK(I)<255THENCLS:JC=0:IC=I:GOTO19
  10. 17 POKEI+1,255:POKEI+2,255
  11. 18 PRINT"No Control Characters Stored":JC=JC+1:GOTO31
  12. 19 I$="^"+CHR$(PEEK(IC)+64):PRINT@JC*40,I$;"+ ";:IC=IC+1
  13. 20 IFPEEK(IC)=255THENPRINT"No Code"
  14. 21 IFPEEK(IC)=255THEN24
  15. 22 PRINTMID$(STR$(PEEK(IC)),2);:IC=IC+1:IF PEEK(IC)<255 THENPRINT",";
  16. 23 GOTO21
  17. 24 PRINT@JC*40+20,I$;"- ";:IC=IC+1
  18. 25 IFPEEK(IC)=255THENPRINT"No Code"
  19. 26 IFPEEK(IC)=255THEN29
  20. 27 PRINTMID$(STR$(PEEK(IC)),2);:IC=IC+1:IFPEEK(IC)<255THENPRINT",";
  21. 28 GOTO26
  22. 29 JC=JC+1:IFJC=8THENJC=0:A$=INPUT$(1):CLS
  23. 30 IC=IC+1:IFPEEK(IC)=255THEN31ELSE19
  24. 31 IC=J:IFPEEK(IC)<255THEN33
  25. 32 POKEIC+1,255:PRINT@JC*40,"No Fonts Stored":GOTO39
  26. 33 PRINT@JC*40,"Font";STR$(PEEK(IC));":  ";:IC=IC+1
  27. 34 IFPEEK(IC)=255THENPRINT"No Font":GOTO37
  28. 35 IFPEEK(IC)=255THEN37
  29. 36 PRINTMID$(STR$(PEEK(IC)),2);:IC=IC+1:IFPEEK(IC)<255THENPRINT",";:GOTO36
  30. 37 JC=JC+1:IC=IC+1:IFJC=8THENJC=0:A$=INPUT$(1):CLS
  31. 38 IFPEEK(IC)<255THEN33
  32. 39 A$=INPUT$(1):GOTO11
  33. 40 C$="CIJMPWXYZ":IC=I
  34. 41 B=INT(I/256):A=I-256*B:POKE61835,A:POKE61836,B
  35. 42 CLS:PRINT"Control Codes are in decimal, with val-"
  36. 43 PRINT"ues separated by commas.  (Ex:  27,45,1)";
  37. 44 PRINT"Just press ENTER at the + or - prompt if";
  38. 45 PRINT"you want a null code."
  39. 46 PRINT@203,"Control Letter: ";:LINEINPUTA$
  40. 47 A=ASC(A$):IFA>90THENA=A-32
  41. 48 B=INSTR(1,C$,CHR$(A)):IFB>0ORA<65ORA>90THEN49ELSE50
  42. 49 PRINT@240,CHR$(27);"p^";CHR$(A);" is not allowed";CHR$(27);"q":GOTO46
  43. 50 PRINT"^";CHR$(A);"+ Ctrl Sequence: ";:LINEINPUTL$(1)
  44. 51 PRINT"^";CHR$(A);"- Ctrl Sequence: ";:LINEINPUTL$(2)
  45. 52 POKEIC,A-64:GOSUB62:FORK=1TO2:IFL$(K)=""THEN56
  46. 53 A=VAL(L$(K)):POKEIC,A:GOSUB62
  47. 54 B=INSTR(1,L$(K),","):IFB=0THEN56
  48. 55 L$(K)=MID$(L$(K),B+1):GOTO53
  49. 56 POKEIC,255:GOSUB62
  50. 57 NEXT
  51. 58 PRINT"Done? (Y/N) ";:LINEINPUTA$
  52. 59 IFA$="Y"ORA$="y"THEN61
  53. 60 IFA$="N"ORA$="n"THEN42ELSE58
  54. 61 POKEIC,255:GOTO11
  55. 62 IC=IC+1:IFIC<JTHENRETURN
  56. 63 FORK=0TO2:POKEI+K,255:NEXT
  57. 64 CLS:PRINT"Your CTRL sequences are going to over-"
  58. 65 PRINT"write your Font sequences.  Your input"
  59. 66 PRINT"has been lost and PRINT.CO now has NO"
  60. 67 PRINT"CTRL codes stored.  (Sorry!)  Edit line"
  61. 68 PRINT"20 and change I=XXXXX to a lower value."
  62. 69 END
  63. 70 JC=J:B=INT(J/256):A=J-256*B:POKE60228,A:POKE60229,B
  64. 71 CLS:PRINT"Font Codes are any decimal from 1-254."
  65. 72 PRINT"Font Sequences are in decimal, with val-";
  66. 73 PRINT"ues separated by commas.  (Ex: 27,31,9)"
  67. 74 PRINT@208,"Font Code";:CALL16989:INPUTA
  68. 75 IFA<1ORA>254THEN76ELSE77
  69. 76 PRINTCHR$(27);"pFont";STR$(A);" is not allowed";CHR$(27);"q":GOTO74
  70. 77 PRINTUSING"Font ### Sequence: ";A;:CALL16989:LINEINPUTK$
  71. 78 POKEJC,A:GOSUB88
  72. 79 IFK$=""THEN83
  73. 80 A=VAL(K$):POKEJC,A:GOSUB88
  74. 81 B=INSTR(1,K$,","):IFB=0THEN83
  75. 82 K$=MID$(K$,B+1):GOTO80
  76. 83 POKEJC,255:GOSUB88
  77. 84 PRINT"Done? (Y/N) ";:LINEINPUTA$
  78. 85 IFA$="Y"ORA$="y"THEN87
  79. 86 IFA$="N"ORA$="n"THEN71ELSE84
  80. 87 POKEJC,255:GOTO11
  81. 88 JC=JC+1:IFJC<60000THENRETURN
  82. 89 GOSUB98:CLS:PRINT"Your Font sequences are about to over-"
  83. 90 PRINT"write the PRINT program.  Your input has";
  84. 91 PRINT"been lost and PRINT.CO now has NO Fonts"
  85. 92 PRINT"stored (sorry).  Edit line 20 and change";
  86. 93 PRINT"J=XXXXX to a lower value.  Your  CTRL"
  87. 94 PRINT"sequences extend to";
  88. 95 PRINTSTR$(K);".  J must be"
  89. 96 PRINT"greater than that! Press any key to end.";
  90. 97 A$=INPUT$(1):END
  91. 98 IK=0:FORK=ITOJ:IFK=IANDPEEK(K)=255THENK=K+2:RETURN
  92. 99 IFPEEK(K)<255THEN102
  93. 100 IFIK=0THENIK=1:GOTO102
  94. 101 IFPEEK(K+1)=255THENK=K+1:RETURN
  95. 102 NEXT:
  96. 103 CLS:PRINT"End of CTRL sequences is past the start"
  97. 104 PRINT"of the Font sequences.  This program"
  98. 105 PRINT"won't change any of your stored data,"
  99. 106 PRINT"but something is wrong.  Either use this";
  100. 107 PRINT"program to enter new codes, or PEEK at"
  101. 108 PRINT"the code tables."
  102. 109 END
  103. 110 FORK=JTO60000:IFPEEK(K)=255ANDPEEK(K+1)=255THENK=K+1:RETURN
  104. 111 NEXT
  105. 112 CLS:PRINT"End of Font sequences is past the start"
  106. 113 PRINT"of the PRINT program.  This program"
  107. 114 PRINT"won't change any of your stored data,"
  108. 115 PRINT"but something is wrong.  Either use this";
  109. 116 PRINT"program to enter new codes, or PEEK at"
  110. 117 PRINT"the code tables."
  111. 118 END
  112.