home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / totallyamos / issue4 / programming / 2.seq < prev    next >
Encoding:
Text File  |  1992-04-27  |  14.8 KB  |  339 lines

  1. ddd00000ff00fe0080888000a3f
  2. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  3.  
  4. ^2                         MY MISTAKE, SORRY!
  5.  
  6. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  7.  
  8. ^2 Before we get onto the first load of program files, the following is
  9. ^2a correction to the March Issue of TA.
  10.  
  11. ^6This is  a  correction to the Interlace_Paul program that appeared in
  12. ^6the last issue of TA.
  13.  
  14. ^6 Paul  Faxed the listing to us and I (Anne) typed it in.  The program
  15. ^6ran fine, don't ask how, but one number managed to get itself changed
  16. ^6somehow between typing, testing and transferring to the TA disk.  The
  17. ^6instructions  should  have  read  `use  2  interlace pics' NOT `2 HAM
  18. ^6pics'.
  19.  
  20. ^6Here is the listing for you either to type in again or correct in the
  21. ^6listing supplied in the last issue.
  22.  
  23. ^1`Vertical Interlace Demo
  24. ^1`By Paul Townsend of Technical Fred Software
  25. ^1`Loads in 2 Hires pics
  26. ^1`Shrinks them to half size
  27. ^1`Uses  Vertical  Interlace (A bit like normal Interlace turned on its
  28. ^1`side)  The  interlace  effect  makes  up  the lost resolution due to
  29. ^1`shrinking  the  pics.   Is  the idea of use to anyone?  Feel free to
  30. ^1`adapt  it  for your own use.  Please let me know if you use it.  The
  31. ^1`contact address is in the Ads section of TA.
  32.  
  33. ^2Dir$="df1:"
  34. ^2Load "robot",10
  35. ^2Unpack 10 to 0
  36. ^2Wait Vbl
  37. ^2Flash Off
  38. ^2Load "earth",10
  39. ^2Unpack 10 to 1
  40. ^2Wait Vbl
  41. ^2Flash Off
  42. ^2Erase 10
  43. ^2Screen Open 2,640,256,16,Hires
  44. ^2Flash Off
  45. ^2Get Palette 0
  46. ^2Screen Open 3,640,256,16,Hires
  47. ^2Flash Off
  48. ^2Get Palette 0
  49. ^2For F=0 To 640 Step 2
  50. ^2   Screen Copy 0,F,0,F+1,256 To 2, POS,0
  51. ^2   Screen Copy 0,F+1,0,F+2,256 To 3,POS,0:REM This line was wrong
  52. ^2   Inc POS
  53. ^2Next F
  54. ^2For F=0 To 640 Step 2
  55. ^2   Screen Copy 1,F,0,F+1,256 To 2, POS,0
  56. ^2   Screen Copy 1,F+1,0,F+2,256 To 3,POS,0
  57. ^2   Inc POS
  58. ^2Next F
  59. ^2Do
  60. ^2   Screen To Front 2
  61. ^2   Wait Vbl
  62. ^2   Screen To Front 3
  63. ^2   Wait Vbl
  64. ^2Loop
  65.  
  66. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  67.  
  68. ^2                       PROGRAM FILES ON DISK I.
  69.  
  70. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  71.  
  72. ^4 We  start  off  with  docs  files  supplied  by  the  authors of the
  73. ^4following  programs.   The  othe  files will be described in Files on
  74. ^4Disk II.
  75.  
  76. ^4These are the docs supplied by Ken Kowalewki, from Michigan, USA, for
  77. ^4his Disk Utility program.
  78.  
  79. ^2 *We  have  included  the  .AMOS  version  of this program on TA this
  80. ^2month,  due  to  limited  disk  space,  if  you  wish to use it as an
  81. ^2accessory, simply rename the file Disk_Utility.Acc.  As Ken says, the
  82. ^2two programs are the same except for the name.
  83.  
  84. ^4                             Disk_Utility.Acc
  85. ^4                             DiskUtility.AMOS
  86. ^4                                    by
  87. ^4                              Ken Kowalewski
  88.  
  89. ^6 These  two programs * are different only in their names.  Everything
  90. ^6else  about  them  is  identical.  The program has been written using
  91. ^6AMOS  -  The  Creator.   I  have written this program to be used from
  92. ^6within  AMOS  as  an  accessory.   If  you  copy the Disk_Utility.Acc
  93. ^6program  to your AMOS system disk, you will then be able to run it as
  94. ^6an accessory.
  95.  
  96. ^4 Although  I  am an experienced programmer in BASIC, this is my first
  97. ^4program  written  using  AMOS.  This was written using AMOS1.3.  I am
  98. ^4sorry  for  the  coding.   It  is  not  very  efficient  and  I would
  99. ^4appreciate  suggestions  and  comments  on the coding or improvements
  100. ^4desired.
  101.  
  102. ^6 I  have  tested this on an AMIGA 500 with one meg and two drives.  I
  103. ^6have  also  tested  it  on  an AMIGA 3000 with two internal drives in
  104. ^6addition to an internal hard drive.
  105.  
  106. ^2WHAT IT DOES:
  107.  
  108. ^4 This  program adds some useful options within the AMOS editor.  When
  109. ^4it  is  used  as an accessory, you may switch between the utility and
  110. ^4the  program  you  are  editing.   You can find out how much space is
  111. ^4available  on disks in all your drives.  You can also check the space
  112. ^4in  the  individual  partitions  of  your hard drive.  You can delete
  113. ^4files  from  disk.   You  can  rename  files.   You  can  create  new
  114. ^4directories.   You  can  get  a list of all devices mounted from your
  115. ^4boot  disk.   And,  of course, you can exit back to the editor.  This
  116. ^4program was not designed to be a stand alone program!
  117.  
  118. ^2HOW TO USE:
  119.  
  120. ^6 The  mouse  is  used  for  almost  everything  in  the  program.  On
  121. ^6start-up, there will be a menu screen presented for your options.  To
  122. ^6select  an  option,  move  the mouse pointer to the option desired an
  123. ^6click  either mouse button while over any part of the text.  You will
  124. ^6here a bell and the option will be activated.
  125.  
  126. ^4 For  the  space  available and mounted devices option, a window will
  127. ^4open  and  display  the  information  requested.   Click either mouse
  128. ^4button, when you are done with the options.  For the delete option, a
  129. ^4file requestor will be displayed.  Locate the file you wish to delete
  130. ^4and  double-click  on it to continue (other normal ways to select are
  131. ^4also  active).   After you have selected the file, a window will open
  132. ^4notifying  you  of your selection and asking you if you are sure this
  133. ^4is correct.  If it is the correct file to be deleted, you can press Y
  134. ^4(upper  or  lower  case) or click the left mouse button to delete the
  135. ^4file.   Press any other key or click the right mouse button to change
  136. ^4your mind.  If you deleted a file, you will be told what was deleted.
  137. ^4You will be given the option to delete another.  Again, there will be
  138. ^4a  Yes/No request.  To create a new directory, the file selector will
  139. ^4appear.   Locate  the  level that you wish to place the new directory
  140. ^4in.   YOU DO NOT HAVE TO SELECT ANYTHING!  on the bottom line type in
  141. ^4the  name for the new directory and press return.  A window will open
  142. ^4showing  what  you  are about to do.  There will be a Yes/No request.
  143. ^4There  will  be  an  option to create another.  To rename a file, the
  144. ^4file   requestor   will  appear.   Select  the  file  to  rename  and
  145. ^4double-click  on it.  A window will open and you will have to type in
  146. ^4the  new filename.  You only have to type in the file's new name, not
  147. ^4the entire path.  As before, there are Yes/No options.  The return to
  148. ^4Amos option also brings up a Yes/No request.  There is information in
  149. ^4the program listing on naming your drive devices.
  150.  
  151. ^6 I am placing this program into the Public Domain as of 29-8-91.  You
  152. ^6may use it as you see fit.  There really isn't anything special about
  153. ^6my  coding.   If  you  would like to send me a donation, I promise to
  154. ^6spend it in good health.  It is not, however, required to do so.
  155.  
  156. ^4 I  have  a  number  of  projects in the works, including a diet/meal
  157. ^4planner,  a  complex  board game, a graphic adventure with a friendly
  158. ^4point-and-click  interface  and  an  educational  game.  I would also
  159. ^4consider  ideas  from others.  I would also like to try and form some
  160. ^4sort  of  AMOS  user  group  here  in  the USA.  Anyone that sends me
  161. ^4bribes,  notes  of  encouragement,  questions, answers, complaints or
  162. ^4anything  else that can be delivered in the mail will be placed on my
  163. ^4mailing  list  for  future  information.   I  have  written  and sold
  164. ^4programs  to  LOADSTAR  on the Commodore 64 and am now working toward
  165. ^4commercial products on the Amiga using Amos.
  166.  
  167. ^2I can be contacted at:
  168.  
  169. ^1Kenneth Kowalewski 5172 Westlake Dearborn Heights, MI 48125 U.S.A.
  170.  
  171. ^1For those living in Michigan, my phone number is:  1-(313) 292-5625
  172.  
  173.  
  174. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  175.  
  176. ^2Steven Bradley has sent us a program, we'll let him explain......
  177.  
  178. ^5 I have submitted this program in the hope that it may be of interest
  179. ^5to  your  readers  and  to  share  my tiny amount of Amos programming
  180. ^5knowledge.  I aquired Amos at Christmas and this is my first project.
  181. ^5It's  a  computerised  version  of  a  Vignere  Table,  a  method  of
  182. ^5encryption  used in World War II.  A table of 26 alphabets, the first
  183. ^5starting  with`A'  going  to  `Z',  the  next starting with `B' going
  184. ^5through  to `Z' ending with `A'.This continues in the same fashion of
  185. ^5moving the first letter to the end, thus forming the table.
  186.  
  187. ^6 There are 2 main parts to the program:-
  188.  
  189. ^2 Encypher:
  190.  
  191. ^5 The  computer asks for a password, this can be any word.  In fact it
  192. ^5can  be any combination of letters as long as it does not contain any
  193. ^5numbers, spaces or punctuation marks.  You then type in your message.
  194. ^5The  computer  will  then compare your message with the password.  It
  195. ^5looks  at the first letter of the password and the same letter in the
  196. ^5top  row  of  the  table.   It  then looks at the first letter of the
  197. ^5message  and  the  same  letter  on  the left hand side of the table.
  198. ^5Where  the  two  lines (X and Y axis) intersect is the letter for the
  199. ^5code.   It  continues to do this with each letter of the password and
  200. ^5message  until  finished.  in most cases the password will be smaller
  201. ^5than the message, so when the computer reaches the last letter of the
  202. ^5password it starts at the beginning again and so on until the message
  203. ^5is coded.
  204.  
  205. ^2 Decipher:
  206.  
  207. ^6 This  part  of  the  program  is  similar to the encypher part.  The
  208. ^6password  is  entered  and then the code.  The password is taken from
  209. ^6the  top  row  of thetable but, and this is where it differs from the
  210. ^6encypher  part,  the  computer  looks down the column of the password
  211. ^6letter  to  find  the letter of the code.  It then goes across to the
  212. ^6left hand row to find the letter of the original message.
  213.  
  214. ^2 Example:  Password:  DOG
  215.  
  216. ^2 PASSWORD:    DOGDOGDOGDOGDOGDO
  217. ^2 MESSAGE:     MY NAME IS STEVEN
  218. ^2 CODE:        PM QOSH OV YWSBHB
  219.  
  220. ^2 PASSWORD:    DOGDOGDOGDOGDOGDO
  221. ^2 CODE:        PM QOSH OV YWSBHB 
  222. ^2 MESSAGE:     MY NAME IS STEVEN
  223.  
  224. ^5 You  can  see that spaces in the message and code are also compared.
  225. ^5Try to follow the process on the table.
  226.  
  227. ^6 If  a person gets hold of your code and has a copy of the program or
  228. ^6table,  it  would  be  very  hard  to  find  the  message without the
  229. ^6password.
  230.  
  231. ^5 I  have included some form of error trapping of the inputs and would
  232. ^5appreciate any comments on the code.(Pogram)
  233.  
  234.  
  235. ^4TABLE:
  236. ^2                              P A S S W O R D
  237.  
  238.                         ^4ABCDEFGHIJKLMNOPQRSTUVWXYZ
  239.           ^2M             ^4BCDEFGHIJKLMNOPQRSTUVWXYZA
  240.                         ^4CDEFGHIJKLMNOPQRSTUVWXYZAB
  241.           ^2E             ^4DEFGHIJKLMNOPQRSTUVWXYZABC
  242.                         ^4EFGHIJKLMNOPQRSTUVWXYZABCD
  243.           ^2S             ^4FGHIJKLMNOPQRSTUVWXYZABCDE
  244.                         ^4GHIJKLMNOPQRSTUVWXYZABCDEF
  245.           ^2S             ^4HIJKLMNOPQRSTUVWXYZABCDEFG
  246.                         ^4IJKLMNOPQRSTUVWXYZABCDEFGH
  247.           ^2A             ^4JKLMNOPQRSTUVWXYZABCDEFGHI
  248.                         ^4KLMNOPQRSTUVWXYZABCDEFGHIJ
  249.           ^2G             ^4LMNOPQRSTUVWXYZABCDEFGHIJK
  250.                         ^4MNOPQRSTUVWXYZABCDEFGHIJKL
  251.           ^2E             ^4NOPQRSTUVWXYZABCDEFGHIJKLM
  252.                         ^4OPQRSTUVWXYZABCDEFGHIJKLMN
  253.           ^2OR            ^4PQRSTUVWXYZABCDEFGHIJKLMNO
  254.                         ^4QRSTUVWXYZABCDEFGHIJKLMNOP
  255.           ^2C             ^4RSTUVWXYZABCDEFGHIJKLMNOPQ
  256.                         ^4STUVWXYZABCDEFGHIJKLMNOPQR
  257.           ^2O             ^4TUVWXYZABCDEFGHIJKLMNOPQRS
  258.                         ^4UVWXYZABCDEFGHIJKLMNOPQRST
  259.           ^2D             ^4VWXYZABCDEFGHIJKLMNOPQRSTU
  260.                         ^4WXYZABCDEFGHIJKLMNOPQRSTUV
  261.           ^2E             ^4XYZABCDEFGHIJKLMNOPQRSTUVW
  262.                         ^4YZABCDEFGHIJKLMNOPQRSTUVWX
  263.                         ^4ZABCDEFGHIJKLMNOPQRSTUVWXY
  264.  
  265. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  266.  
  267. ^3                        New Fonts for your printer!
  268.  
  269. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  270.  
  271. ^2(Printer Fonts Directory)
  272.  
  273. ^4 As  a magnanimous, kind, warmhearted gesture, I have agreed that Len
  274. ^4and  Anne  could  give  you  FREE  with  this issue of T.A.  a sample
  275. ^4printer font for each of the LC10, LC200, and 24-pin printers.
  276.  
  277. ^4 No,  thats  a bit of a fib.  The free fonts are here, but its just a
  278. ^4cheap  plug  so  that you can try them, think:  'Gosh!  Thats good!',
  279. ^4and  then  rush  out  and  buy  the full licenceware version for your
  280. ^4printer  for  only  £3.50  from  any  Amos licenceware stockist.  The
  281. ^4occassion  is  the  release of the new disc for the LC200 only, as it
  282. ^4had  previously had to make do with a dodgy conversion program on the
  283. ^4LC10  disc.  The new release sings, dances, makes toast, solves world
  284. ^4famine,  and  -  TA  DA!   even works in EPSON mode.  (This will be a
  285. ^4great relief to anyone who used the old version)
  286.  
  287. ^4The  instructions  given here are painfully brief, but should get you
  288. ^4going.   Whichever  printer you own, you need to set the Dip switches
  289. ^4up to let you use the printer RAM as storage for Downloaded Fonts.
  290.  
  291. ^2LC10: Set dipswitch 2-1 to OFF
  292. ^2LC200: Set EDS  A-2 to OFF
  293. ^2LC24 & other 24 pin printers.. please read your manual.
  294.  
  295. ^4For all cases, the printer should be in STANDARD or EPSON mode.
  296.  
  297. ^6To use the fonts:
  298.  
  299. ^2Copy the font for your machine to your work disc.
  300.  
  301. ^4At a Shell or CLI prompt , type the following, using the filename for
  302. ^4your machine:
  303. ^4          either;
  304. ^2                  TYPE Gothic.LC10 TO PAR:
  305. ^2          or;     TYPE Gothic.LC200 TO PAR:
  306. ^2          or;     TYPE Gothic.LC24 TO PAR:
  307.  
  308. ^4This  sends  the  stream  of control codes which redefine the letters
  309. ^4down  to your printer.  After this has been done, the printer is left
  310. ^4in NLQ download mode.  Any text you send to the printer should appear
  311. ^4in the new font.
  312.  
  313. ^4There  can  be  problems  with  some WP programs, as one of the first
  314. ^4things  they  do before printing is to reset the printer.  This loses
  315. ^4the  font.   I  have  included on this disc a modified printer driver
  316. ^4which  combats  this.   The driver is called MODIFIED_DRIVER.  If you
  317. ^4want  to  try  it,  copy it to your DEVS/PRINTERS directory, then use
  318. ^4Preferences  to  select  it.   It is for the LC10, but will drive the
  319. ^4LC200,  and  the  24 pins in text mode.  The alteration I made was to
  320. ^4replace the escape code sequence <ESC> 40 with 00,00 so that no reset
  321. ^4occurs.  You can do the same to your favourite driver using a program
  322. ^4like  ZAP.   (Back  up  the  original  first) I made one other useful
  323. ^4twiddle  to  the driver.  Most Amiga printer drivers assume that BOLD
  324. ^4means  EMPHASISED  print.   You  may not know the difference, but may
  325. ^4have  wondered why setting text to BOLD in a WP made no difference to
  326. ^4the output in NLQ mode.  I have changed this driver to send <ESC> G ,
  327. ^4instead of <ESC> E, and this makes BOLD really print BOLD.
  328.  
  329. ^4Again, I could go on for pages, but I must be brief.
  330.  
  331. ^4Have fun with the fonts, and don't forget :  there are 19 more on the
  332. ^4LC10  &  LC200  licenceware  discs,  and 11 more on the LC24 version.
  333. ^4Only £3.50, get them while they're hot!
  334.  
  335. ^2Jeff Tullin April 1992.
  336.  
  337. ^7<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
  338. \
  339.