home *** CD-ROM | disk | FTP | other *** search
/ Fujiology Archive / fujiology_archive_v1_0.iso / !MAGS / KELSTAR / KELSTR04.ZIP / KELSTR04.MSA / TEXT_PROG0001.TXT < prev    next >
Text File  |  2010-04-21  |  9KB  |  209 lines

  1.  
  2.  
  3. Hello,my name is Carl Robinson and I am a keen user of STOS.I know 
  4. that there are quite a few of you out there who would like to learn 
  5. how to do a bit of programming yourselves but are maybe thinking that 
  6. it would be too difficult to learn.What I`d like to do is to try to 
  7. explain some of the basics of this language in a manner that the total 
  8. beginner will be able to follow.I shall do this in a series of 
  9. tutorials in Kelstar beginning right here.
  10. I had intended to start earlier but my first draughts disappeared 
  11. somewhere in my disk collection and so I have had to start again.The main 
  12. emphasis on this section is to help anybody (hopefully) who want's to 
  13. program intro's/games.This tutorial will not make you the next Bitmap 
  14. Brothers though.So all I have to say now is that I hope you like it and 
  15. learn something.I don't know how long this section will run for it all 
  16. depend's on you.If you like it drop a letter to Kelstar I'm sure Bob 
  17. would love to hear from you.
  18.    
  19. ***************************************************************************
  20.  
  21.  
  22.         BEGINNER'S GUIDE TO STOS Part 1 
  23.         ===============================
  24.         
  25.             S.T.O.S
  26.             
  27. What is STOS I hear you say well it is a variation on basic which 
  28. is designed to help you make games/intro's.But in fact you can use
  29. it to do anything you want I have coded copier's/doc readers and 
  30. a whole heap of other things with it which people say couldn't be
  31. done in STOS so NAH to them.Right I hope you all have a copy of STOS
  32. as without it this tutorial will be useless to you all.First up I 
  33. will explain extensions what they are and how to use them as they 
  34. now play a major part in STOS programming.
  35.  
  36. What is an extension ?
  37.  
  38. Well basically it is a upgrade for stos all of the best one's are 
  39. written by programmer's themselves as Mandarin produced some crap 
  40. one's in it's time STOS 3D/TOME.The best extensions out are 
  41. the Missing Link,Control,Misty,Extra.
  42.  
  43. You should be able to find a file called extensions on this disk
  44. which has the P.D version's of two of these extensions in it.
  45. You would be well advised to register these extensions as some of  
  46. the command's won't be available to you if you don't and these
  47. people deserve some reward for all their hard work so if you are 
  48. serious about learning STOS then please register.
  49.  
  50. ******************************************************************
  51. The Misty and Missing Link registration's are handled by Goodman's
  52. now so if you're going to register them then that's where the money
  53. ought to go.
  54. *******************************************************************
  55.  
  56. Right you should have de-archived the file extensions onto a disk
  57. and read through the manual's if you have a printer the print the 
  58. files out as they come in very handy later on.
  59.  
  60. To install the extensions you must copy the files with the suffix
  61. EX? into the STOS folder and the files with the suffix EC? into 
  62. the compiler folder.
  63.  
  64. Now boot up STOS and you should see some messages in the background
  65. telling you that the extensions have been installed.Load up a few 
  66. of the examples and get used to basic listings.Try altering things 
  67. about don't worry though you can't damage your ST though you might
  68. sometimes have to reboot STOS if you go to far with some of the commands
  69. but that is half of the fun.
  70.  
  71.             LISTINGS
  72.             ========
  73.  
  74. In this section I will explain a few of the commands that you will
  75. need to know.If you have a STOS manual then you won't need to read
  76. this but for all you who got STOS from ST USER then this should 
  77. come in handy.
  78.  
  79. Right here we go.
  80.  
  81. Load "(filename.Bas)"    - Load's up a bas file to work on
  82.  
  83. Save "(filename.Bas)"    - Save's a file to disk
  84.  
  85. List    - Lists the current program you are working on
  86.  
  87. Run    - Run's our listing
  88.  
  89. New     - Erases the listing in memory - Make sure you have saved it 
  90.       first.
  91. Unnew    - In case you didn't save your file it could still be in memory
  92.       so try this and thing's should be ok.
  93. System     - Quits to gem
  94.  
  95. *******************************************************************
  96. *   VERY IMPORTANT ONE THIS                      *
  97. *                                  *
  98. *CTRL-C  - Stops the program currently being run.                 *
  99. *          It would be useful if you pressed the undo key twice   *
  100. *       afterwards as this would reset the editor back to      *
  101. *       normal.   (Thanx for reminding me about this one bob)  *
  102. *******************************************************************
  103.  
  104.  
  105.  
  106. Well they are the main commands to do with the editor itself so now 
  107. onto a few basic command's which will be in our listing.You can just 
  108. enter these in the editor
  109.  
  110. Curs off/on     - Guess what
  111.  
  112. Mode 0/1     - 0= Low Resolution : 1= Med Resolution
  113.  
  114. Hide/Show     - Hides the mouse pointer
  115.  
  116. Key off/on     - Get's rid of that stupid menu bar at the top 
  117.          - of the editor.
  118.  
  119. Cls         - A very slow screen clear,Later on you will be shown
  120.          - the fast version's but for now this one will
  121.            suffice.
  122.  
  123. Print "text"     - There are a lot of different way's of using print
  124.            but for now we will use this one.
  125.            eg  10  Print "HELLO"
  126.                run 
  127.                HELLO
  128. Wait (value)/wait key    - Guess.eg wait 100 waits for 100*50th's of a sec
  129.  
  130. Rem         - Anything you put after a rem is ignored so they are very
  131.            handy for putting comments into your code.           
  132.  
  133. End/Stop     - Stops the program and returns to editor
  134.  
  135. Default         - Set's up the editor in default mode so 
  136.            say for example you took the menu bar
  137.            off and went in low res then if you 
  138.            use default everything will go back
  139.            to normal.
  140.  
  141. New           - Erases the current program in memory-ONLY use
  142.             it if you are 100% sure you don't want it.
  143.             
  144.             
  145. Right that should be enough for now so we can start with a very 
  146. primitive program.All it will do is print Kelstar all the way down
  147. the screen then wait for a key then stop.You will not find this 
  148. program on disk as it is very short so you will either have to
  149. write it out or print it out and type it out yourself.
  150.  
  151. 10 rem ******    Our very first program   *********
  152. 20 rem ******   Prints Kelstar on the screen *****
  153. 30 mode 0:key off:hide:curs off
  154. 40 for I=0 to 10 
  155. 50 print "KELSTAR"
  156. 60 next I
  157. 70 wait key :default:end
  158.  
  159. Now a break  down of the abve program.
  160.  
  161. Right lines 10 and 20 are just comments for us to make more sense
  162. out of our listings and they will be ignored by the interpreter.
  163.  
  164. Line 30. Mode 0 - means put is into Low res if we had put mode as 1 then 
  165. we would be in med res.Key off - get's rid of the menu bar.Hide - hide's
  166. the mouse pointer.Curs off hides the cursor.
  167.  
  168. Line 40 - 60 is the main part.
  169.  
  170. We have set up a loop with the For/next lines.We will loop 10 times
  171. as indicated by the value we put in I.We can make I any number we want.
  172. Try changing it use negative as well as positive but if you want to go from 
  173. a high number to a low number eg 100 to 0 then add STEP -1 at the end of 
  174. line 40 eg For I=100 to 0 step -1.
  175.  
  176. Line 50 tells the computer to print the line Kelstar.We could have told 
  177. it where to print it but for now we will keep thing's simple.
  178.  
  179. Line 60 tells the computer that this is the end of the loop and we want to 
  180. go back to Line 40 unless I=10 then the loop stops.
  181.  
  182. Line 70 just wait's for a keyy then  reset's the screen and places 
  183. the cursor and menu bar on the screen and then the program stop's.
  184.  
  185.  
  186. And that is your first program I know it's not very exciting but it 
  187. does show a couple of important things.And for this first part I want 
  188. you to become familiar with STOS and to try out the examples on this disk
  189. so you can get used to the various commands.Don't worry if you do know 
  190. what a command does as long as your disk is write protected you can't do
  191. any damage at all so play about with them as much as you can.
  192.  
  193. Next time I will be showing you how to disply pictures and music and 
  194. learning how to use the compiler.
  195. So we can make our very own intro.If you have any question's,tips of your
  196. own then I would love to hear from you.If so then send them to Kelstar
  197. and I'm sure Bob will pass them on.
  198.  
  199. **************************************************************************
  200.             STOSSER - DISKMAGS
  201.             
  202. I feel it worth mentioning that these are excellent diskmags for all STOS
  203. users.They have tutorial's and loads of source code so if you can get
  204. hold of them then do so.
  205.  
  206. ***************************************************************************
  207.  
  208.  
  209.