home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 2: Collection B / 17Bit_Collection_B.iso / files / 1794.dms / in.adf / About_AMOS_1.34 < prev    next >
Encoding:
Text File  |  1992-02-26  |  54.7 KB  |  1,503 lines

  1. -----------------------------------------------------------------------------
  2.  
  3.                       AMOS BASIC VERSION 1.34 UPDATER
  4.  
  5.                               By François Lionet
  6.  
  7.               AMOS (c) 1990 / 1991 / 1992 Europress Software Ltd.
  8.  
  9. -----------------------------------------------------------------------------
  10.  
  11.  
  12.                            Important copyright notes
  13.                           ---------------------------                     
  14.  
  15.      The AMOS Basic 1.34 Updater is public domain. You can (and you
  16.      are encouraged to) copy and distribute it freely. It does not mean
  17.      AMOS Basic itself is public domain. Copyright remains on the
  18.      interpreter, and on the updated version.
  19.      You need AMOS Basic V1.1, V1.21, V1.23, V1.3, V1.31 or V1.32
  20.      to make the adaptation.
  21.  
  22.  
  23. ------------------------------------------------------------------------------
  24.                     Move the mouse pointer to read the text.
  25. ------------------------------------------------------------------------------
  26.  
  27.  
  28.  
  29.  
  30. Foreword.
  31. -------------------------------------------------------------------------
  32.  
  33. Once again you have in your hand a new update to AMOS. This update is
  34. a major update to the software, as we have read all your mail and tried
  35. every small program you have sent us. And you have sent us a lot!
  36.  
  37. We truly thank you for this fantastic feed back. This update, in PD. form,
  38. is our answer to your questions. We hope you will like it, as we have done
  39. our best to suit your needs.
  40.  
  41. For example, you can now directly update a version of AMOS installed on 
  42. a hard-disc. Something people have been screaming for!
  43.  
  44. Some people will be disappointed not to find their suggestions in this new
  45. version. To them we say:
  46.  
  47. 1 Wait for version 2.0, a lot of suggestions will be taken into account.
  48.  
  49. 2 Modifying a two year old piece of software, used by thousands of people
  50.   is not an easy task. You have to be very careful with what you change.
  51.  
  52.   Some enhancements can turn into catastrophes later. By modifying
  53.   the way programs react you can end up causing non-expected malfunctions.
  54.  
  55.   So before choosing to modify one simple instruction, we always take time to
  56.   consider the implications of such a change. Most of the time we find that
  57.   the modification could cause a lot of trouble.
  58.  
  59. Here is a non-exhaustive list of people who helped us. Sorry if you
  60. do not find your name in the list!
  61.  
  62. Daniel J.Griffin, Stuart Davis, Sune Trudslev, Alejandro Manzanares,
  63. Chris Hellen, Greg Larson, J.S. Pritchett, Richard A. Newbould, 
  64. Micke Palm,  Michael Foord, Francis Hardy-Birt, Henrik Brinch,
  65. Christian Niederle, Mark Thorndyke, Darryl Farquhar, François Scheurer,
  66. Darryl Hamish, Stephane Dujourdy, J.A. Swanwick, François Gutherz,
  67. A. Flaganan, Robbie Miller, Brendan Thompson, Yann Pennaeach, 
  68. Madeleine Pesson, and many, many more...
  69.  
  70. In France: P. Berloquin, Béla Nogrady, Frédéric Bosson, Eric Andréani 
  71. + Syntex, Anne + Pop, Stéphane Schreiber, Julien, S. Dujourdy etc...
  72. All the guys at Commodore France, Francis, Nicolas, PascalV and PascalK 
  73. for their fantastic help on many occasions.
  74.  
  75. And the usual bunch...
  76. Fothergill brothers corporation, Stephen Hill, Len and Anne Tucker, 
  77. Gary Simons and I. Forgetsome.
  78.  
  79. All the best! François 03/02/1992.
  80.  
  81.  
  82. Contents.
  83. ---------------------------------------------------------------------------
  84.  
  85.     * Bugs removed from V 1.31
  86.     * Enhancements to V 1.34
  87.     * New instructions in V 1.34
  88.     * Manual main bugs
  89.     * Safe AmigaDos EXECUTE function
  90.     * Time and Data procedures
  91.     * Modifications up to V 1.2x
  92.         - Bob flipping
  93.                 - Serial port (modified since V1.23!)
  94.                 - Multi-tasking
  95.                 - Folders
  96.                 - Interlace
  97.                 - Other bits
  98.         - Converting your 1.2 .Env file to 1.3
  99.                  
  100.  
  101. Introduction.
  102. -----------------------------------------------------------------------------
  103.  
  104. AMOS Basic has gone through a number of changes during the course of its
  105. existence. Rather than rest on our laurels, we've steadily updated the
  106. system to include many new features suggested by AMOS users. Incredibly
  107. enough, we've placed these improvements on the public domain. Special
  108. updater discs are available from the official AMOS PD. library or your local
  109. PD. library. So whatever your version of AMOS Basic, you can upgrade to the
  110. latest system for the price of a disc.
  111.  
  112. Here's a list of the versions of AMOS Basic to date:
  113.  
  114. AMOS 1.1
  115. The original!
  116.  
  117. AMOS 1.2
  118. This included several new commands such as a BANK SWAP. There was also a
  119. whole new set of SPRITE flipping routines introduced which allowed you to
  120. display a single image in several orientations.
  121.    The file-selector was completely reworked, and allowed you to
  122. change the current disc by pressing the RIGHT mouse button and simply
  123. clicking on the new device name with the mouse. The UP/DOWN arrows were
  124. repositioned at the top of the scroll bar for maximum speed, and the
  125. PARENT button was repositioned to the far left corner and reduced in
  126. size.
  127.  
  128. AMOS 1.23
  129. Added the SERIAL extension, SPRITE compactor and procedure locking utility.
  130.  
  131. AMOS 1.3
  132. This version comes with the compiler and includes a range of turbo-charged
  133. Bob and screen copy routines written by Gary Symons. These optimise the
  134. performance of commands such as SCREEN COPY and PASTE BOB/ICON, leading to
  135. dramatic speed improvements in many games.
  136.  
  137. AMOS 1.31
  138. Only minor internal modifications done since version 1.3.
  139.  
  140. AMOS 1.34
  141. By cleaning up the code dramatically, we've been able to get rid of many
  142. little but annoying problems. It also includes major enhancement to the
  143. music routines.
  144.  
  145.  
  146.                         Bugs removed (from V1.31).
  147. --------------------------------------------------------------------------
  148.  
  149. * ICONS used to be in transparent mode upon loading, instead of being
  150.   in replace mode, as stated in the manual.
  151.  
  152. * CBLOCK did not work for blocs larger than 480 pixels.
  153.  
  154. * The inactive mouse-zone (when the mouse pointer was exactly over the top 
  155.   of the horizontal slider, no keyboard input was processed) has been removed.
  156.  
  157. * The disappearing line bug has been removed from the editor!
  158.  
  159. * Def Fn does not crash any more with no parameters.
  160.  
  161. * Set Rainbow does not crash with negative parameters in definition strings.
  162.  
  163. * Error n instruction now reports errors over 50.
  164.  
  165. * AMOS now saves Workbench icons properly, not all placed over each other, as
  166.   it used to!
  167.  
  168. * EVERY command works fine. At last.
  169.  
  170. * PLOAD used to leave a lock in the system.
  171.  
  172. * =DRIVE() does not display a requester if the device does not exist. This
  173.   was really stupid, as this instruction was used to determine existing devices!
  174.  
  175. * Music banks are now detected upon running. It means you can safely save 
  176.   them with the program.
  177.  
  178. * Arrays now work fine when you access elements higher that 65536.
  179.  
  180. * On Menu Proc used to block the machine under certain circumstances.
  181.  
  182. * Bobs can now be displayed on VERY large bitmaps.
  183.  
  184. * Marks did not work on A3000.
  185.  
  186. * Opening procedures with errors within, used to position the cursor at
  187.   the beginning of the text.
  188.  
  189. * INPUT #x,A$(n) did not ask for a proper string space. The result in
  190.   worse cases was a crash, as the incoming string erased crucial AMOS pointers.
  191.  
  192. * Note on serial interface problems.
  193.  
  194. A lot of users have reported to us problems when they were using the serial
  195. extension. Their programs used to work the first time, and crash on
  196. the next RUN.
  197. Amazingly enough, this bug does not come from AMOS, but from Commodore.
  198.  
  199. Commodore released a few years ago a bugged version of the serial.device.
  200.  
  201. Bad luck, this bugged version happened to be duplicated on our AMOS Master.
  202. At that moment we didn't realise this. As soon as we were made aware of the
  203. problem, we re-mastered the AMOS discs. But too late, some version of AMOS
  204. have got the wrong device.
  205.  
  206. The updater will save a good version of the serial.device on
  207. the copy of your AMOS Master.
  208.  
  209.  
  210. Improvements (from 1.31).
  211. -------------------------------------------------------------------------
  212.  
  213. * Versions.AMOS. This little program will explore the whole contents
  214. of your AMOS_System directory, and load the beginning of each file.
  215. It will look for a special string that contains the version number,
  216. and display it onto the screen.
  217. You will know at a glance all the version numbers of your programs!
  218.  
  219. * The directory system has been totally re-written.
  220.  
  221. You can now, safely use DIR$= to set the current directory, and it does not
  222. leave a Lock as it used to.
  223. More than that, =DIR$ does not crash any more when it cannot find a disc 
  224. in the drive.
  225. The file selector now automatically sets the dir to the current path when
  226. you select a file. Note that the SET DIR button still works, if you want
  227. to quickly set the directory, without loading a file.
  228.  
  229. To sum-up, AMOS now has one current path, automatically set by the file
  230. selector or by the DIR$= instruction.
  231.  
  232. * Hexadecimal and binary tokenisation now stops on spaces. It makes possible
  233.   to tokenise such a line:
  234.  
  235. If A=$1234 And B=2 
  236.  
  237. It was impossible before, as the A of "And" was used as part of the hexadecimal
  238. number!
  239.  
  240. * AMOS now closes the workbench under 2.0. If you want to prevent that, 
  241.   you have to use the configuration program, in the SET EDITOR menu.
  242.   New in version 1.34, the CLOSE WORKBENCH instruction will not have any
  243.   effect if you choose not to close the workbench in the configuration
  244.   program.
  245.   More than just preventing AMOS from closing the workbench upon loading, it
  246.   is preventing any AMOS program from closing it.
  247.   You are now the master of your own Workbench!
  248.  
  249. * The Requester now appear under AMOS on a 2.0 system. It does not crash as it 
  250.   used to sometimes under 1.3. The disc-inserted detection has been improved,
  251.   it detects all disc-changes now. It also works with one option requesters.
  252.  
  253. * The disk-font library only loads when you call it the first time. It means
  254.   you may have to re-insert the Workbench disc upon running a new program, as
  255.   you would do if it was using floating point numbers.
  256.  
  257. * Load IFF accepts new colour palettes, with colours defined on 8 bytes,
  258.   instead of 4 (this palette are saved by some new software).
  259.  
  260. * Physical drives are now listed in the device list (in file selector and
  261.   in =Dev First / =Dev Next). Some devices (like "Work:") are defined in both
  262.   logical and physical list. You will find them twice in the list. This is 
  263.   normal!
  264.  
  265. * Copy now works with ODD addresses, and ODD lengths. I should have done this
  266.   improvement much sooner.
  267.  
  268. * You can now recover from an "Out of variable space" error, it does not 
  269. stop the program as it used to. All you'll have to do in this case, is free
  270. a couple of strings from memory.
  271.  
  272. * Sound samples of any length are perfectly played.
  273.  
  274. * Autoback 2 mode does not produce a flash in the bobs as it used to, 
  275.   sometime. It gives a much better display. On the other hand, pasting and
  276.   printing in this mode will take one VBL longer than before.
  277.  
  278.  
  279. New music instructions.
  280. -----------------------------------------------------------------------
  281.  
  282. The music extension has been considerably enhanced. We've listened to your
  283. requests:
  284.  
  285.  
  286. * Playing Soundtracker modules.
  287.  
  288. SoundTracker is moving too fast for us. Every month or so, a new program
  289. pops up, with new instructions, making the SoundTracker converter obsolete.
  290.  
  291. The SoundTracker converter works fine with modules up to NoiseTracker V2.0.
  292. Above this version, some effects may be badly converted.
  293.  
  294. Anyway, you thought that this converter program was not a very good idea. 
  295. That's why we have directly implemented a Tracker player in the music 
  296. extension. The chosen one is "Startracker player", because it contains
  297. all the latest and main effects (today!), and it has the ability to play
  298. synthetic instruments.
  299.  
  300. Here are the new instructions:
  301.  
  302.  
  303.   TRACK LOAD "Name_Of_The_Module",Bank
  304.   ------------------------------------
  305. Load up a tracker module into a chip memory bank. It will of course it reserve
  306. the bank for you, and choose the correct bank size.
  307. If AMOS detects a Startracker synthetic instrument file (which must have
  308. a ".NT" extension appended to the file name), it will load it AS WELL into the
  309. bank. In fact you don't have to worry about it.
  310.  
  311.  
  312.   TRACK PLAY [Bank],[Pattern]
  313.   ---------------------------
  314. Plays a tracker module loaded into a bank. 
  315.  
  316. "Bank" is the number of the bank to be played. If omitted, it is the last loaded
  317. with the TRACK LOAD instruction, or upon running, bank number 5.
  318.  
  319. "Pattern" is the first pattern to be played. Use this with caution, as NO CHECK
  320. is done on the number of the pattern. You can very simply crash the computer
  321. by giving a bad value. This parameter is intended to allow you to have
  322. more than one music in a tracker bank...
  323.  
  324.   TRACK LOOP ON / OFF
  325.   -------------------
  326. Enable or disable looping when the tracker music is finished.
  327.  
  328.   TRACK STOP
  329.   ----------
  330. Stops a tracker music being played.
  331.  
  332.  
  333. IMPORTANT NOTES:
  334. -----------------
  335. The Tracker-playing instructions are implemented to give you a quick way 
  336. of playing modules. It is not as powerful as the normal AMOS music system.
  337.  
  338. For example :
  339.  
  340. * Do not play a normal AMOS music while playing a tracker module, 
  341.   this can lead to unpredictable results.
  342.  
  343. * Do not start any sample, or sound effect when a Tracker module is played.
  344.  
  345. * A Tracker module uses and initialises all four voices, even if your music
  346.   is only on 3 or 2. So do not play any sample on the other voices you think
  347.   are free. They are not!
  348.  
  349. * VOLUME instructions do not have any effect on the Tracker music, but
  350.   =VU METER works fine with a Tracker module.
  351.  
  352. ... if you want to make sound effects while a music is playing, then you
  353. should use the Soundtracker converter, and the normal AMOS Music system...
  354.  
  355.  
  356.   Improvements in sample playing:
  357.   --------------------------------
  358.  
  359. Here again we have listened to your complaints! You'll be happy to
  360. know that you can now play samples of any length, and that the small
  361. tick at the beginning have been removed.
  362. But much more than that, we have made it possible to play samples bigger
  363. than the actual memory of your Amiga, with the new double-buffer 
  364. sample instructions.
  365.  
  366. Floppy users : sorry, these new instructions will not be useable by you,
  367. but at a very low sample playing rate (like 4000-5000 Herz). The disc
  368. data output speed is just too low.
  369. Theses new instructions were designed mainly for CDTV and multimedia 
  370. purposes...
  371.  
  372. A working example of this instruction is given in the file
  373. "Sample_Double_Buffering.AMOS" you will find on your updated disc.
  374. I have commented this example very carefully, so that everything is clear
  375. to you.
  376. Before running this example, you have to create (or grab) a sound-sample,
  377. any size (preferable big), and copy it onto your hard-drive. You can 
  378. easily understand that we could not put a 2 Megabytes sample on the
  379. updater disc!
  380.  
  381.  
  382.   SLOAD File_Number,Length TO Address
  383.   -----------------------------------
  384. A new instruction intended to load parts of a sample, but it can be used
  385. in many other ways.
  386.  
  387. This instruction is an extended BLOAD
  388.  
  389. "File_Number" is the number of a file opened previously with the
  390. OPEN IN File_Number,"Name" instruction.
  391.  
  392. "Length" is the number of bytes to load. If this number is bigger than 
  393. the actual size of the file, then only the remaining bytes are loaded, without
  394. errors. You'll get an error if you try to load once more after the end has 
  395. been reached.
  396.  
  397. "Address" is the destination address. Of course, the memory must have been
  398. previously reserved.
  399.  
  400. The advantage of this instruction, is that you can set the position of the
  401. file pointer with the POF()= instruction before using SLOAD. As you can see,
  402. this instructions can have a lot more usage than just loading samples...
  403.  
  404.  
  405.   SAM SWAP Voices TO Address,Length
  406.   ---------------------------------
  407. This instruction initialise the sound-swapping. The actual swapping will only
  408. occur when the actual buffer has been totally played through the speaker.
  409. The swap is done under interrupts, so you will not hear any tick in the
  410. sample.
  411.  
  412. "Voice" is a bit pattern to define the voice concerned, just like in the
  413. SAM RAW instruction.
  414.  
  415. "Address" is the address of the next buffer to play. Of course, it must
  416. be in chip memory.
  417.  
  418. "Length" is the number of bytes to play.
  419.  
  420.  
  421.   =SAM SWAPPED(Voice_Number)
  422.   --------------------------
  423. This function returns a boolean value (TRUE -1, or FALSE 0). It is the
  424. key function in synchronising double buffer players.
  425.  
  426. "Voice_Number" is the number of the voice you want to have information
  427. about (0 to 3). Do not make mistake, is it NOT a bitpattern.
  428.  
  429. It returns TRUE if the sample swapping has occurred, it means the new buffer
  430. you have initialised with the SAM SWAP instruction is being played at the 
  431. very moment. It returns FALSE if not.
  432.  
  433. Practically, you can only load a new part of the sample in the free buffer,
  434. when the SAM SWAPPED instruction returns you a TRUE value. It returns FALSE
  435. if the sample swapping has NOT happened.
  436.  
  437.  
  438.   SAM STOP [Voice_Pattern]
  439.   ------------------------
  440. This simple instruction seems to have been forgotten in the instruction
  441. set since the beginning. The only way to stop a sample playing, was to 
  442. use the PLAY instruction!
  443.  
  444. "Voice_Pattern" is a bit pattern defining the voices to be stopped, like in
  445. the SAM RAW instruction. All voices will be affected if you omit it.
  446.  
  447.  
  448. NOTE: it is perfectly possible to have an AMOS music bank playing on 2 
  449. voices, and double-buffered samples playing on the last 2. (hey, but not 
  450. a Tracker module, if you remember what I told you!)
  451.  
  452.  
  453.  
  454. Other new instructions (from 1.31).
  455. ---------------------------------------------------------------------------
  456.  
  457. * =COL(Bob)
  458.   ---------
  459. Well, in fact, it is not a new instruction, but a good enhancement to the
  460. collision detection method.
  461. To detect a collision, I remind you, you have to use one of the
  462. collision detection functions (=BOB COL(), =SPRITE COL(), =BOB SPRITE COL(),
  463. =SPRITE BOB COL()). When this function returns a TRUE value, you have to
  464. explore the =COL() reserved array to find out which bob or sprite created the
  465. collision.
  466. The problem, is that you had to write a loop exploring sequentially all the
  467. COL() array. This was eating a lot of processor time. You could see certain
  468. games slowing down when some bobs were colliding.
  469.  
  470. I wanted to do something to correct it. But what? The problem with AMOS, is 
  471. that if I change the syntax or the behaviour of one instruction to please
  472. certain people, it may (and surely will) not be compatible with thousand 
  473. of existing programs! 
  474. So I found a -rather tricky- solution to this problem.
  475.  
  476. =COL(Number) behaves normally if you send it a POSITIVE number as an 
  477. argument, this keeps it compatible with all existing programs.
  478.  
  479. If "Number" is negative, AMOS will first remove the sign, i.e. turn it into
  480. a positive number.
  481. Then it will explore the COL() array himself, and find the first non-zero
  482. value higher than -Number. Then it will not return TRUE or FALSE as it used
  483. to, but the actual number of the bob colliding.
  484. To get the next bob colliding, simply call it again with a this number, minus
  485. one..
  486.  
  487. Example, this small and fast loop, will give all bobs colliding with bob zero:
  488.  
  489. B=Bob Col(0)
  490. BB=0
  491. Repeat 
  492.    BB=Col(-(BB+1))
  493.    If BB
  494.       Print "Bob";BB;" is colliding..."
  495.    Endif
  496. Until BB=0
  497.  
  498. You can certainly remark that with this method, it is impossible to get the
  499. collision of bob number zero. That's why I say this was not perfect...
  500.  
  501.  
  502.   =DISC INFO$("Name") 
  503.   -------------------
  504. ...is a new instruction that returns information on any disc.
  505.  
  506. "Name" is the name of a file or a directory of the disc you want to have
  507. information about. The string returned has the following form:
  508.  
  509. "NAME_OF_THE_DISC:XXXXXXX" , where XXXXXXX is the free space on the disc.
  510.  
  511. To get both, use this simple method:
  512.  
  513. A$=DiscInfo$("Df0:")
  514. C=Instr(A$,":")
  515. N$=Left$(A$,C)
  516. F=Val(A$,C+1)
  517. Print "Name of the disc :";N$;" Free space:";F
  518.  
  519.  
  520.   = PRG STATE (returns the current status of a program)
  521.   -----------------------------------------------------
  522. =PRG STATE
  523.  
  524. This little handy function let you know how your program was launched.
  525. It returns three possible values:
  526.  
  527.   0 : if your program was run under the AMOS interpreter.
  528.   1 : if your program was run under RAMOS run-only.
  529.  -1 : if your program is compiled.
  530.  
  531.  
  532. Getting the system date and time.
  533. ---------------------------------------------------------------------------
  534. You will find on your updated disc a program called "GET_TIME.AMOS".
  535. This program includes two procedures to get the time and date from 
  536. the system.
  537.  
  538.   Time.
  539.   -----
  540. Call the procedure, and you'll have in Param$ the current clock time under
  541. the following format: 00:00:00
  542.  
  543. _TIME$
  544. Print Param$
  545. ...
  546. 11:04:04
  547.  
  548.   Date.
  549.   -----
  550. This procedure returns the current date in Param$:
  551.  
  552. _DATE$
  553. Print Param$
  554. ...
  555. 21/06/1991
  556.  
  557.  
  558. Safe AmigaDos EXECUTE.
  559. ------------------------------------------------------------------------------
  560.  
  561. It is perfectly possible to launch an external program from AMOS. But in order
  562. to do so, you have to know some of the AmigaDos internal functions.
  563. That's why you will find on your updated disc a small program with a 
  564. procedure called _EXECUTE.
  565. Just transmit an AmigaDos command to this procedure, and it will launch it
  566. out of AMOS. To run an external program, use:
  567.  
  568. _EXECUTE["RUN >NIL: <NIL: Program_Name.AMOS"]
  569.  
  570. You can launch other CLI commands (like "Assign"). Of course
  571. if you want to see the display, you have to perform an AMOS TO BACK 
  572. instruction.
  573.  
  574. As the Amiga is a multitask machine, your AMOS program will go on running
  575. as well as the launched program. Of course the speed will be bit reduced,
  576. depending on the other program.
  577.  
  578.  
  579. Manual bugs.
  580. ----------------------------------------------------------------------------
  581.  
  582. This paragraph will just list some of the main errors found in the manual,
  583. like missing instructions.
  584.  
  585.   LLIST
  586.   -----
  587. This instruction does not exist, and never did! To print a program:
  588.  
  589.     - Mark the whole text as a block (CONTROL-A)
  590.     - Go to the BLOCK menu, and select PRINT BLOCK.
  591.  
  592.  
  593.   NO ICON MASK [number] (Remove the mask from an icon).
  594.   -----------------------------------------------------
  595. This instruction has simply been forgotten in the manual. It simply
  596. does the same job as NO MASK, but for icons.
  597.  
  598.  
  599.   RAINBOW DEL [Number] (Delete on or all rainbows).
  600.   -------------------------------------------------
  601. Another instruction forgotten in the manual, but very useful when you
  602. want to get rid of a rainbow!
  603. "Number" specify the number of the rainbow to remove, or all if omitted.
  604.  
  605.  
  606.   = TEXT STYLES (Returns the current font attributes).
  607.   ----------------------------------------------------
  608. This instruction is badly spelt in the manual. You must add an "S" to it!
  609.  
  610.  
  611.  
  612. New instructions in V 1.3x / V 1.2x.
  613. ----------------------------------------------------------------------------
  614. The following part of text grabs some parts of the previous "About_AMOS_1.3", 
  615. found on the AMOS 1.31 PD. update.
  616. Anyway, you should (must) read it, as we have added some instructions
  617. that mysteriously disappeared from the documentation.
  618.  
  619.  
  620.  
  621. Multi tasking improvements.
  622. ---------------------------------------------------------------------------
  623.  
  624.   MULTI WAIT  (Force a multi-task wait vbl)
  625.   ----------
  626. MULTI WAIT
  627.  
  628. To make effective multi-tasking programs, you must not grab most of the
  629. processor time, leaving only a limited amount of power for other tasks.
  630. MULTI WAIT does a MULTI-TASK wait vbl. You should use it in your
  631. programs main loop, when you wait for example, for a menu item to be
  632. selected.
  633.    Note that you should not use this instruction to make accurate
  634. screen synchronisation as it is designed to multi-task. This instruction
  635. is not consistent at all! It may skip many VBLs, depending on the number
  636. of running tasks at the time.
  637.    If you missed it elsewhere in the manual, Multitasking can be
  638. activated by pressing Amiga+A to flick between AMOS and the CLI or
  639. Workbench environments. This allows systems with at least 1 meg to run
  640. AMOS and programs like DPaint III at the same time!
  641.  
  642.  
  643.   AMOS TO BACK  (Hide AMOS from view and show the Workbench)
  644.   ----------------------------------------------------------
  645. AMOS TO BACK
  646.  
  647. This will bring forward the Workbench display, allowing you to access
  648. other programs.
  649.  
  650.  
  651.   AMOS TO FRONT  (Switch AMOS to the display)
  652.   -------------------------------------------
  653. AMOS TO FRONT
  654.  
  655. AMOS is forced back onto the display with this command, leaving the
  656. Workbench hidden.
  657.  
  658.  
  659.   AMOS HERE  (Report which task is on display)
  660.   --------------------------------------------
  661. AMOS HERE
  662.  
  663. This returns TRUE if AMOS is currently displayed and FALSE if the
  664. Workbench is in view.
  665.  
  666.  
  667.   AMOS LOCK (Forgotten instruction : Locks AMOS in front position)
  668.   ----------------------------------------------------------------
  669. AMOS LOCK
  670.  
  671. This instruction first does an "AMOS TO FRONT", and then disable
  672. the AMIGA-A system. Use this instruction if you do not want people
  673. to know your program was written in AMOS.
  674.  
  675.  
  676.   AMOS UNLOCK (Forgotten instruction : make AMIGA-A active)
  677.   ---------------------------------------------------------
  678. AMOS UNLOCK
  679.  
  680. Just restores the AMIGA-A Workbench/AMOS flipping. You may want people to
  681. stay under AMOS during certain parts of your program for example, to 
  682. see your name (!) and then free them.
  683.  
  684.  
  685.  
  686. Swapping banks.
  687. -------------------------------------------------------------------------
  688.  
  689.   BANK SWAP number1,number2
  690.   -------------------------
  691. This instruction will swap the pointers of the two banks. Useful if you
  692. want to turn an icon bank into a sprite bank. Example:
  693.  
  694.    Bank Swap 1,2
  695.  
  696. or have more than one music bank at the same time, for example:
  697.  
  698.    Bank Swap 3,5
  699.  
  700.  
  701. Display-handling enhancements.
  702. ------------------------------------------------------------------------
  703.  
  704.   LACED (Function to open an interlaced screen)
  705.   ---------------------------------------------
  706. To open an interlaced screen use the following syntax:
  707.  
  708. SCREEN OPEN 0,320,200,16,LACED [+HIRES] [+LOWRES]
  709.  
  710. LACED is a function that returns 4.
  711.  
  712. Important: As soon as one screen is opened with Interlace, all the other
  713. screens turn to interlace. The interlacing will only truly effect the
  714. screen actually opened with LACED. All the others will just have their
  715. vertical lines doubled on the screen to adjust to the special mode.
  716.    Interlaced mode is perfect for displaying pictures, but
  717. animation runs at half normal speed. Games should not be written in
  718. Interlace!
  719.    As soon as the last interlaced screen is closed the whole
  720. display returns to normal mode. Your TV monitor might not like lots of
  721. fast switching from normal mode to Interlace, so you are advised not to
  722. do this excessively.
  723.    All normal operations are available in interlaced screens:
  724. Screen Offset, Screen Display and so on. The only problem that arises is
  725. due to interlacing being software driven in AMOS. The bitplanes are
  726. changed during the vertical blank and this particular interlace process
  727. is forbidden during copper list calculation.
  728.    So if you have a large copper list (i.e.. four screens, one
  729. interlaced, and a rainbow), and have a copper calculation to do, the
  730. interlaced screen will display only half of the picture during the
  731. calculation. Nothing can be done to solve this, it is simply a
  732. limitation of the whole system.
  733.  
  734. There are two extra screen commands in AMOS now. These allow a program
  735. to work out what type of display it is being run on:
  736.  
  737.  
  738.   DISPLAY HEIGHT  (Report how tall a screen can be)
  739.   -------------------------------------------------
  740. =DISPLAY HEIGHT
  741.  
  742. This command returns 311 in PAL and 263 in NTSC.
  743.  
  744.  
  745.   NTSC (Flags the type of display in operation)
  746.   ---------------------------------------------
  747. =NTSC
  748.  
  749. This returns TRUE if the system is in NTSC mode or FALSE if in PAL.
  750. Ideal for international software development!
  751.    NTSC refreshes the screen at 60 times a second whereas PAL
  752. screens refresh at only 50 times a second. However, AMOS1.3 compensates
  753. for this and now music runs at exactly the same speed in PAL and NTSC
  754.    AMAL also relies on the interrupt routine but is not slowed down
  755. to comply with PAL speeds. You must therefore be careful not to
  756. synchronise music and animations by just relying on the speed they run
  757. at. Check that an animation frame has been reached or the music has
  758. played a certain note. Using this technique you'll ensure the software
  759. executes at the right points on all systems.
  760.  
  761.  
  762. Requester enhancements.
  763. -------------------------------------------------------------------------
  764.  
  765.   REQUEST  (Generate a requester routine)
  766.   ---------------------------------------
  767. REQUEST ON
  768.  
  769. This will make AMOS use its own requester routine and is the
  770. default.
  771.  
  772. REQUEST OFF
  773.  
  774. AMOS will always select the CANCEL button of the requester if this
  775. command is used. The actual requester will not be displayed, so this is
  776. ideal for error trapping within a program.
  777.  
  778. REQUEST WB
  779.  
  780. This tells AMOS to switch back to Workbench's system requester. You'll
  781. come back to AMOS as soon as you have chosen one of the options.
  782.  
  783. Note: If you don't load up the Requester (by deleting it from the
  784. extension list using the config file), the normal Workbench requester
  785. will be used for displaying messages.
  786.  
  787. This does have a bad side-effect though, AMOS will seem to have crashed
  788. when a requester appears. If this happens you must simply press Amiga+A
  789. to return to the Workbench, answer the question and press Amiga+A once
  790. again to return to AMOS. It's only best to avoid loading the requester
  791. when memory is very low!
  792.  
  793.  
  794. Bob and sprite flipping commands.
  795. ---------------------------------------------------------------------------
  796.  
  797. In a great number of games, the main character needs to animate left to
  798. right, and up and down. Up to now, you were obliged to keep in the
  799. sprite bank reversed copies of small animation sequences for the main
  800. character. As the main character usually has the best animation, you
  801. lose an enormous amount of space!
  802.    For the game RanXerox, for which AMOS author François Lionet
  803. wrote the sprite routines, a flipping routine was developed which
  804. allowed just one copy of the main character to be kept in the bank. This
  805. routine has been enhanced and placed into AMOS.
  806.    How does it work? Imagine your character is walking to the left
  807. and then back to the right. You would only have in your bank the image
  808. of him walking to the right. To display this right image, you simply
  809. refer to the image number in the bank as usual.
  810.    To display the image reversed in the X axis (left walking
  811. image), you set bit number 15 of the image number to 1. Don't panic, you
  812. can simply do it with:
  813.  
  814.    $8000+Image number
  815.  
  816. So:
  817.  
  818.    Bob 1,160,100,1
  819.  
  820. will display your character walking right, and:
  821.  
  822.    Bob 1,160,100,$8000+1
  823.  
  824. will display it walking left. The same principle is used for vertical
  825. reversing. For this, bit number 14 is used - add $4000 to the image
  826. number. To have a vertical and horizontal reversing, use $C000.
  827.    The symmetry is a full symmetry: The hot spot of the bob is also
  828. reversed. For example, if we had put the hot spot in X under the feet of
  829. our character, the reversed version would also have it under his feet.
  830. So be careful if you set the hot spot on the top left corner on a bob,
  831. the reversed image will be displayed at the top left!
  832.    You might say that $8000 and $C000 are a bit weird to use. We
  833. have provided special functions to give a better AMOS interface:
  834.  
  835.    =HREV(image)      adds $8000 to the image
  836.    =VREV(image)      adds $4000
  837.    =REV(image)       adds $C000
  838.  
  839. Use them in place of the hex values:
  840.  
  841.    Bob 1,160,100,10
  842.    Bob 1,160,100,HREV(10)
  843.    Bob 1,160,100,VREV(10)
  844.    Bob 1,160,100,REV(10)
  845.  
  846. To allow easy use of the bob flipper in AMAL, we have implemented
  847. Hexadecimal evaluation. So you can use hex notation to refer easily to
  848. reversed bobs. If hex frightens you, just add $8000, $4000 or $C000
  849. before all references in your AMAL strings. Example:
  850.  
  851. Old AMAL string:
  852.  
  853.    "Anim 0,(1,2)(2,2)(3,2)(4,2)"
  854.  
  855. New reversed string:
  856.  
  857.    "Anim 0,($8000+1,2)($8000+2)($8000+3)($8000+4)"
  858.  
  859. or
  860.  
  861.    "Anim 0,($8001,2)($8002,2)($8003,2)($8004,2)"
  862.  
  863. If you use a register to calculate the image number, do not try to
  864. modify the calculation itself, but only when you assign the register to
  865. the image.
  866.  
  867. Old AMAL string:
  868.  
  869.    For R0=1 To 10; Let A=R0; Next R0
  870.  
  871. New one:
  872.  
  873.    For R0=1 To 10; Let A=$C000+R0; Next R0
  874.  
  875.  
  876. How does the flip routine work?
  877.  
  878. It is really important for you to understand how it works internally, so
  879. that you do not ask this system to do things it is not designed to do.
  880.    The reversing system is designed to free memory before trying to
  881. be fast (although we would not mind if it was actually fast, would we?).
  882. Concessions had to be made to have it fast, and at the same time easy
  883. and powerful.
  884.    The routine actually works right in the middle of the bank, and
  885. does not use any extra memory. The bobs are flipped during the update
  886. process, just before a bob is redrawn on the screen. AMOS looks to see
  887. if the image needs to be flipped in the bank. If it does, it is flipped
  888. and a flag is set within the bank. On the next update, if the bob image
  889. has not changed, it will not be flipped, thus saving a lot of time.
  890.    If you understand the above, you will also realise one big
  891. limitation. It is not wise to use more than one flipped bob pointing to
  892. the same image. Let's see the next example:
  893.  
  894.    Bob 1,160,100,1
  895.    Bob 2,160,150,$8001
  896.    Bob 3,20,20,$4001
  897.    Bob 4,20,100,$C001
  898.    Update
  899.  
  900. During the UPDATE process, AMOS will first draw bob number 1. No
  901. problem, it is in the right position. Then bob number 2 - AMOS needs to
  902. reverse it in X. Bob number 3 needs a Y and an X reversing (to put the
  903. bob back to normal in X!). Then bob number 4 needs an X flipping.
  904.    On the next update, providing the bob's image has not changed,
  905. to display bob 1, AMOS will have to flip it in X and Y, then bob 2...
  906.    As you can see, for each UPDATE, that is, every 50th of second,
  907. if the bobs move they need to be reversed! This will work, but will take
  908. a lot of processor time, and the animation will be disastrous.
  909.    So the golden rule is, use the reversed bobs for objects alone
  910. on a screen (or be sure that normal and reversed images are not
  911. displayed at the same time on the screen). If you want, you can have two
  912. bobs like this - experiment!
  913.    We told you before that this system was for use with bobs. Yes,
  914. it is totally automatic with bobs. But as it directly affects the sprite
  915. bank, you can also use it with sprites.
  916.    When a hardware computed sprite is calculated, AMOS looks into
  917. the sprite bank and gets the image from it. If the image is reversed at
  918. that moment, the hardware sprite will display a reversed image. You can
  919. therefore have reversed hardware sprites using this method. But you
  920. cannot do this for example:
  921.  
  922.    Sprite 1,200,200,$8001
  923.  
  924.  
  925. Pasting flipped bobs
  926.  
  927. PASTE BOB also accepts reversed images. A simple trick to reverse an
  928. image in the bank without having to display a bob, is to PASTE the
  929. reversed image outside of the screen. Example:
  930.  
  931.    Paste Bob 500,500,$C000
  932.  
  933. This will reverse image 4 in the bank, without any output (and quite
  934. fast).
  935.  
  936.  
  937. Collision detection
  938.  
  939. This is an important point, and you have to be very careful when you
  940. detect collisions with reversed bobs!
  941.    The collision detection uses the shapes in the bank at the very
  942. moment it is called. Let's see an example that will never work:
  943.  
  944.    Bob 1,160,100,1
  945.    Do
  946.          Bob 2,XScreen(XMouse),YScreen(YMouse),$8001
  947.          Wait Vbl
  948.          Exit if Bob Col(1)
  949.    Loop
  950.  
  951. Why doesn't it work? We have two reversed images of the same definition
  952. in the bank. After the updating process, the image in the bank is left
  953. reversed. So the Bob Col instruction will take bob shape 1, the reversed
  954. image, and this will not work!
  955.    So remember: Thou shalt never use collision detection with more
  956. than one reversed image on the screen!
  957.  
  958.  
  959. How is it coded into the sprite bank?
  960.  
  961. Two bits of each images X Hot Spot are used to flag the flipping (at
  962. SPRITE BASE+6).
  963.  
  964. Bit number 15 for X  0 if normal, 1 if reversed
  965. Bit number 14 for Y  0 if normal, 1 if reversed
  966.  
  967. Before RUN and SAVE, the bank is restored to its normal state, so that
  968. it is still compatible with version 1.1.
  969.  
  970.  
  971. Block flipping
  972.  
  973. The flip routine can also be used for blocks.
  974.  
  975. HREV BLOCK  (Flip a block horizontally)
  976.  
  977. HREV BLOCK image
  978.  
  979. Flips block number image horizontally.
  980.  
  981. VREV BLOCK  (Flip a block vertically)
  982.  
  983. VREV BLOCK image
  984.  
  985. Flips block number image vertically.
  986.  
  987.  
  988. Altering the Bob drawing order.
  989. -----------------------------------------------------------------------
  990.  
  991.   PRIORITY REVERSE ON/OFF  (Change the order in which Bobs are printed to
  992.   -----------------------------------------------------------------------
  993. the screen)
  994.  
  995. PRIORITY REVERSE ON
  996. PRIORITY REVERSE OFF
  997.  
  998. PRIORITY REVERSE ON, reverses the entire bob's priority table. This
  999. means that bob number 1 will be the first one drawn in front of all
  1000. other bobs, 2 will come in second etc... This priority list is
  1001. compatible with STOS.
  1002.    This instruction has another feature when used in conjunction
  1003. with the PRIORITY ON command. The bobs are not printed from TOP to
  1004. BOTTOM any more, but from BOTTOM to TOP! The highest bob on the screen
  1005. will be displayed in front of the others.
  1006.  
  1007.  
  1008.  
  1009. Squash a bob routine.
  1010. -----------------------------------------------------------------------
  1011.  
  1012. This routine was originally written for a Fun School 3 program called
  1013. Letters. Each letter in the alphabet is displayed as a single large
  1014. sprite. This requires a total of 52 separate images, taking up a massive
  1015. 110k of memory. Since only a couple of images are displayed at a time,
  1016. most of this space is actually wasted. So a small routine was written to
  1017. pack the unused sprites into a spare memory bank. This allowed us to
  1018. compress the entire sprite bank into just 26k!
  1019.    AMOS Squash is now available on the public domain. Feel free to
  1020. use it in any of your own programs. It's especially useful for the
  1021. massive Level Guardians in an arcade game. These can be compressed into
  1022. a fraction of their normal size, and can be instantly retrieved at the
  1023. appropriate point in your program.
  1024.  
  1025. Using AMOS Squash
  1026.  
  1027. The packer program comes in two separate parts. The first program loads
  1028. a sprite bank into memory and compacts your images. It can be found in
  1029. the file Squash_a_bob.AMOS
  1030.    In order to use this routine, you need to perform the following
  1031. simple procedure:
  1032.  
  1033.    Load a sprite bank from the disc using the file-selector.
  1034.    Enter the number of the first sprite you wish to pack.
  1035.    Enter the number of the final sprite in your list.
  1036.    Input the number of colours used by your sprite images.
  1037.    Choose a new memory bank to hold your squashed images.
  1038.  
  1039. The squasher routine will now be executed and your selected images will
  1040. be quickly compressed. After it has concluded, you will be given an
  1041. option to save your compacted images onto the disc.
  1042.    Note that no colour information is saved with these images. So
  1043. you may need to make a note of the current colour settings before
  1044. proceeding any further.
  1045.    Once you've squashed your images, you can load them into your
  1046. AMOS Basic programs with the help of three small procedures. These can
  1047. be found in the file Squash_procs.AMOS and can be incorporated into your
  1048. program using the MERGE command from the AMOS Editor menu.
  1049.    The squash routines are remarkably easy to use. The first stage
  1050. is to load your original sprite bank from Direct mode and delete the
  1051. images you have just compressed. Use a line like:
  1052.  
  1053.    Del Sprite start To finish
  1054.  
  1055. This erases your old images from memory, saving you a considerable
  1056. amount of storage space. You can now enter your packed images from the
  1057. disc with the LOAD command:
  1058.  
  1059.    Load "images.abk"
  1060.  
  1061. At the start of your program, you should initialise the compaction
  1062. system with a call to the PBOB_INIT procedure:
  1063.  
  1064.    PBOB_INIT[bank,cols,max_x,max_y]
  1065.  
  1066. Where:
  1067.  
  1068.    bank  is the bank number containing your compressed images
  1069.    cols  holds the number of colours
  1070.    max_x stores the maximum width of your images
  1071.    max_y holds the maximum height of your images
  1072.  
  1073. The action of this procedure is to prepare a temporary screen for the
  1074. squasher utility. Your images can now be unpacked as and when they are
  1075. required, using a simple call to the PBOB routine.
  1076.  
  1077.    PBOB[source,dest]
  1078.  
  1079. source is the number of the image to be unpacked. This is the original
  1080. image number from the sprite bank.
  1081. dest is the number of the new image you wish to install in the sprite
  1082. bank. Choose the number of the last sprite in the bank plus one.
  1083.    Once you've installed your image into memory, you can animate it
  1084. directly with the various SPRITE or BOB commands. PBOB can be called as
  1085. many times as you wish. So the same image number can be re-used again
  1086. and again.
  1087.    Finally, add a call to the PBOB_END procedure towards the end of
  1088. your program. This will erase the hidden screen created by PBOB_INIT.
  1089.  
  1090.  
  1091.  
  1092. Serial port commands extension.
  1093. -------------------------------------------------------------------------
  1094.  
  1095. Welcome to the intriguing world of AMOS communications. The serial
  1096. extension is intended for those of you who wish to transfer information
  1097. between several different computers using the Amiga's serial port.
  1098.    The extension provides you with a total of 15 new commands. You
  1099. can use these commands to create amazing multi-user games. It's also
  1100. possible to access a Midi interface which has been plugged into the
  1101. Amiga's serial port. So musicians will be able to control their
  1102. instruments directly from AMOS Basic. Wow! As you would expect, full
  1103. multitasking is supported.
  1104.  
  1105.  
  1106. Opening the serial port
  1107.   
  1108.  
  1109.   SERIAL OPEN (Opens a channel for Serial I/O)
  1110.   --------------------------------------------
  1111. SERIAL OPEN Channel, Port_no [,Shared, Xdisabled, 7wires]
  1112.  
  1113. Opens a communication channel to a serial device.
  1114.  
  1115. Channel This is an identification number which will be used for all
  1116. subsequent communication commands. Allowable values range from 0 to 3.
  1117.  
  1118. Port_no Specifies the logical device number of the serial port.
  1119. Normally, this value should be set to zero. However, if you've plugged a
  1120. MULTI SERIAL card into your Amiga, you can access your additional ports
  1121. using the numbers from one onwards.
  1122.  
  1123. Shared (optional) This is a flag which informs AMOS that the device can
  1124. be shared with other tasks which are currently running on your Amiga.
  1125. It's used in multitasking. A value of FALSE (zero) will grab the channel
  1126. for AMOS Basic, and will deny access to any other program. If it's is
  1127. set to TRUE (-1), the serial port can be shared between several programs
  1128. in memory. Beware: This system must be used with extreme care or the
  1129. Amiga could easily crash!
  1130.  
  1131. Xdisabled (optional) Toggles XON/XOFF checking during transmission of
  1132. your data over the serial line. It's essential to set this flag when you
  1133. are first opening the device, even if it will only be required later.
  1134. The default value is FALSE (0) and disables the system. If you want to
  1135. enable the checking, use a value of TRUE (-1). After the port has been
  1136. opened, you'll then need to set the XON and XOFF characters using a
  1137. separate call to the SERIAL X command.
  1138.  
  1139. 7Wires (optional) A value of TRUE (-1) tells the device to use the 7
  1140. wires system as explained in the official Commodore documentation. The
  1141. default is FALSE (0).
  1142.  
  1143. When you call the Serial Open command for the first time, it will
  1144. automatically load the SERIAL.DEVICE library from your system disc. So
  1145. make sure it's available from the current drive.
  1146.  
  1147. Default settings depends on the number in "Port_no":
  1148.  
  1149. -Port_no=0 refers to the default serial port, it will be opened using the
  1150. parameters set in the "Preference" workbench program. You should open this
  1151. port if you use the workbench.
  1152.  
  1153. -Port_no=1 refers to the built in serial port. Every Amiga has one. This
  1154. is the port you should open. The default settings will be set for this port
  1155. to use the French minitel: 1200 Baud, 7 bits, 1 stop bit, Even parity. 
  1156. This can be easily changed using the SERIAL SPEED, SERIAL BIT or 
  1157. SERIAL PARITY instructions if required.
  1158.  
  1159. -Port_no>1 can only be used if you have a multi-serial card.
  1160.  
  1161.  
  1162. Closing the serial port
  1163.  
  1164.   SERIAL CLOSE (Closes one or more serial channels)
  1165.   -------------------------------------------------
  1166. SERIAL CLOSE [Channel]
  1167.  
  1168. If you don't include the channel number, SERIAL CLOSE will close all
  1169. currently opened serial channels with absolutely no error checking. The
  1170. optional channel number allows you to close a single channel and uses
  1171. all the normal error checks.
  1172.  
  1173. Note: Whenever a program is RUN from AMOS Basic, any opened channels
  1174. will be automatically closed for you.
  1175.  
  1176.  
  1177. Sending information through the serial port
  1178.  
  1179.   SERIAL SEND  (Output a string via a serial channel)
  1180.   ---------------------------------------------------
  1181. SERIAL SEND Channel, t$
  1182.  
  1183. Sends the string t$ straight to the specified serial channel. It does
  1184. not wait for the data to be transmitted through the actual port. You'll
  1185. therefore need to use the =SERIAL CHECK(Channel) function to detect when
  1186. the transmission has been completed.
  1187.  
  1188.  
  1189.   SERIAL OUT  (Outputs a memory block via a serial channel)
  1190.   ---------------------------------------------------------
  1191. SERIAL OUT Channel, Address, Length
  1192.  
  1193. This is identical to Serial Send except that it works with RAW data.
  1194.  
  1195. Address is the address of your data in memory.
  1196. Length is the number of bytes to be sent.
  1197.  
  1198.  
  1199. Reading information from the serial port
  1200.  
  1201.   SERIAL GET  (Gets a byte from a serial device)
  1202.   ----------------------------------------------
  1203. =SERIAL GET(Channel)
  1204.  
  1205. Reads a single byte from the serial device. If nothing is available a
  1206. value of -1 will be returned.
  1207.  
  1208.  
  1209.   SERIAL INPUT$  (Gets a string from the serial port)
  1210.   ---------------------------------------------------
  1211. =SERIAL INPUT$(Channel)
  1212.  
  1213. Reads an entire string of characters from the serial port. If there's no
  1214. data, the command will return an empty string "". Otherwise the string
  1215. will contain all the bytes which have been sent over the serial line up
  1216. to the present time.
  1217.    Be careful when using this command with high speed transfers
  1218. (such as MIDI). If you wait too long between each SERIAL INPUT$ command,
  1219. you can overload the system completely, and generate annoying errors
  1220. such as "string too long" or "serial device buffer over-run".
  1221.  
  1222.  
  1223. Setting the serial parameters
  1224.  
  1225.   SERIAL SPEED  (Sets the transfer baud rate for a serial channel)
  1226.   ----------------------------------------------------------------
  1227. SERIAL SPEED Channel, Baud rate
  1228.  
  1229. Sets the current transfer rate of the appropriate channel. The same
  1230. value will be used for both reading and writing operations. Note that
  1231. you can't set split baud rates for a single channel. If the baud rate
  1232. you have specified is not supported by the current device, it may be
  1233. rejected by the system.
  1234.  
  1235.  
  1236.   SERIAL BITS  (Sets the Nbit & Stopbit part of a protocol)
  1237.   ---------------------------------------------------------
  1238. SERIAL BITS Channel, Nbits, Stopbits
  1239.  
  1240. Assigns the number of bits which will be used for each character you
  1241. transmit.
  1242.  
  1243. Nbits is the number of bits
  1244. Stopbits is the number of STOP bits
  1245.  
  1246.  
  1247.   SERIAL PARITY  (Sets the parity checking, correct version)
  1248.   ----------------------------------------------------------
  1249. SERIAL PARITY Channel, Parity
  1250.  
  1251. Sets the parity checking you are using for the current serial channel.
  1252. Here's a list of the available options.
  1253.  
  1254. Parity can have 5 different states:
  1255.  
  1256.    -1 : no parity
  1257.     0 : EVEN parity
  1258.     1 : ODD parity
  1259.     2 : SPACE parity
  1260.     3 : MARK parity
  1261.  
  1262. See the Commodore documentation for a full explanation of this system.
  1263.  
  1264.  
  1265.   SERIAL X  (Sets XON/XOFF)
  1266.   -------------------------
  1267. SERIAL X Channel, Xmode (Activates/deactivates the XON/XOFF handshaking
  1268. system)
  1269.  
  1270. A value of TRUE for Xmode disables handshaking. Any other value turns it
  1271. on. Xmode should be loaded with the correct control characters. These
  1272. must be specified in the following format:
  1273.  
  1274.    Xmode=XON*$10000000+XOFF*$10000
  1275.  
  1276. Check Commodore's documentation for more information.
  1277.  
  1278.  
  1279. Other commands
  1280.  
  1281.   SERIAL BUFFER  (Sets the size of the serial buffer)
  1282.   ---------------------------------------------------
  1283. SERIAL BUFFER Channel, Length
  1284.  
  1285. Allocates length bytes of buffer space for the required channel. Note
  1286. that the default value is 512 bytes and the minimum allocation is 64
  1287. bytes.
  1288.    It's a good idea to increase the buffer size for high speed
  1289. transfers.
  1290.  
  1291.  
  1292.   SERIAL FAST  (Switches on FAST transfer mode)
  1293.   ---------------------------------------------
  1294. SERIAL FAST Channel
  1295.  
  1296. This sets a special fast flag in the current device and disables a lot
  1297. of internal checking which would otherwise slow down the communication
  1298. process. Use it for high speed transfers such as MIDI.
  1299.  
  1300. Warning: When you call this command, the protocol will be changed to:
  1301. PARITY EVEN,NO XON/XOFF and 8 bits.
  1302.  
  1303.  
  1304.   SERIAL SLOW  (Switches serial transfer back into SLOW mode)
  1305.   -----------------------------------------------------------
  1306. SERIAL SLOW Channel
  1307.  
  1308. Slows the serial device back to normal speed and reactivates all the
  1309. error checks.
  1310.  
  1311.  
  1312.   SERIAL CHECK  (Reports on current serial device activity)
  1313.   ---------------------------------------------------------
  1314. =SERIAL CHECK(Channel)
  1315.  
  1316. Asks the device for a read-out of its current status. You can use it to
  1317. check whether all the information you've transferred with a previous
  1318. SERIAL SEND command has been sent.
  1319.  
  1320.    CHECK=FALSE (0) -> if the last serial command is still being
  1321. executed.
  1322.  
  1323.    CHECK=TRUE (-1) -> All done!
  1324.  
  1325.  
  1326.   SERIAL ERROR  (Reports success or failure of last transfer)
  1327.   -----------------------------------------------------------
  1328. =SERIAL ERROR(Channel)
  1329.  
  1330. Looks for the ERROR byte in the serial device. A value of zero indicates
  1331. that everything is fine. Otherwise, the last transmission was faulty.
  1332.  
  1333.  
  1334. Sending large strings
  1335.  
  1336. Transmitting a large string may take quite a long time, especially at
  1337. low baud rates. As AMOS is multitasking, your program will continue to
  1338. run AFTER a SERIAL SEND instruction.
  1339.    It's essential to avoid provoking a garbage collection before
  1340. the transfer has been completed, otherwise your data will be corrupted.
  1341. So:
  1342.  
  1343.    Use the =SERIAL CHECK function before doing a lot of string work.
  1344.    Perform a garage collection using X=FREE to ensure that your program
  1345. will not provoke one automatically.
  1346.    Use the SERIAL OUT channel,address,length instruction
  1347. with 'address' containing the location of a previously reserved memory
  1348. bank.
  1349.  
  1350.  
  1351. More information
  1352.  
  1353. More information about the Amiga's serial system can be found in the
  1354. Commodore ROM KERNEL Reference Manual, Library and Devices. This will
  1355. allow expert users to make maximum use of the serial device.
  1356.  
  1357.  
  1358.  
  1359. Searching for the current devices.
  1360. ----------------------------------------------------------------------------
  1361.  
  1362. AMOS can report back to you the current list of devices using the
  1363. following commands.
  1364.  
  1365.  
  1366.   =DEV FIRST$  (Get first device from the current device list)
  1367.   ------------------------------------------------------------
  1368. dev$=DEV FIRST$("filter")
  1369.  
  1370. Works the same as Dir First$ and Dir Next$, but reports back the device
  1371. list. Note that you should remove the spaces with -" " to get the right
  1372. name.
  1373.  
  1374.  
  1375.   =DEV NEXT$  (Get the next device satisfying the filter)
  1376.   -------------------------------------------------------
  1377. dev$=DEV NEXT$
  1378.  
  1379. Gets the next device from the device list. A null string indicates the
  1380. end of the list has been reached. Example:
  1381.  
  1382.    Print Dev First$
  1383.    Do
  1384.          A$=Dev Next$
  1385.          A$=A$-" "
  1386.          If A$="" then End
  1387.          Print A$
  1388.    Loop
  1389.  
  1390.  
  1391.  
  1392. ABOUT CONFIGURATION FILES (to read only if you come from V1.2x).
  1393. --------------------------------------------------------------------------
  1394.  
  1395. AMOS1.3 needs a new configuration file called "AMOS1_3_PAL.ENV" or
  1396. "AMOS1_3_NTSC.ENV". You'll also find on your updated disc a new
  1397. configuration program call CONFIG1_.AMOS.
  1398. This new program has on new option: "Load AMOS1.2 configuration". 
  1399. As you can imagine, this option turns your 1.2 configuration file 
  1400. into a 1.3 configuration file, without modifying your settings.
  1401. Be careful with the extensions: the Config1_3 program adds ".Lib"
  1402. to all extensions name found in the "Extensions loaded" list, and the
  1403. new extension name are not compatible any more with the old ones.
  1404. This is perfect for all official extension: Compact, Music, Request,
  1405. Serial. but AMOS will refuse to boot if any other extension is found
  1406. in the list. 
  1407. So erase ALL unwanted extensions BEFORE saving your 1.3 configuration!
  1408.  
  1409.  
  1410.  
  1411. Loading AMOS from within a folder.
  1412. --------------------------------------------------------------------------
  1413.  
  1414. Although it is perfectly possible to copy the AMOS_System folder
  1415. in the middle of another folder (explained later), you should avoid
  1416. to do so, if you do not want later hassle with other programs that
  1417. DO assume the position of the AMOS_System folder (like the 3d 
  1418. extension for example, and a number of other extensions).
  1419.  
  1420. AMOS does a number of housekeeping chores before fully loading up and
  1421. presenting itself to you. One of these is to locate all its default
  1422. files like the sprite pointer, default font and so on. The procedure and
  1423. logic it uses is as follows:
  1424.  
  1425. 1  Check the current system to define if a PAL or NTSC screen is in
  1426. use.
  1427.  
  1428. 2  Depending on the system it will look for the AMOS1_3_PAL.Env or
  1429. AMOS1_3_NTSC.Env.
  1430.  
  1431. 3  Failing to find one of these files, it will look for the AMOS
  1432. System folder in the root directory of the current drive. If this also
  1433. fails, AMOS gives up trying to load and returns to the Workbench.
  1434.  
  1435. 4  If AMOS picks up Default.Env at point 2, it will examine the
  1436. environment file to find out where the other files are located. This is
  1437. the key to relocating AMOS anywhere on a disc.
  1438.  
  1439. Let's assume we want to set up AMOS within a folder called UTILS on a
  1440. hard disc. First we must copy across the following files from the AMOS
  1441. Program disc to the hard disc path Dh0:UTILS/
  1442.  
  1443.    AMOS_System A folder containing all the default files
  1444.    AMOS1.3     The Main AMOS file
  1445.  
  1446. The files AMOS1_3_PAL.Env and AMOS1_3_NTSC.Env must be moved from the
  1447. AMOS system folder to the Utils folder.
  1448.  
  1449.    AMOS_System
  1450.    AMOS1.3
  1451.    AMOS1_3_PAL.Env
  1452.    AMOS1_3_NTSC.Env
  1453.  
  1454. Now we must change the Env files so that they tell AMOS where all the
  1455. data files are. To do this you'll have to boot a normal copy of AMOS and
  1456. run the Config.AMOS program. Simply ensure that the loaded extensions
  1457. and default files have the correct path and filenames.
  1458.    In our example all the files are inside the directory
  1459. AMOS_System. Just make sure that the extensions read as follows:
  1460.  
  1461.    1-:AMOS_System/Music
  1462.    2-:AMOS_System/Compact
  1463.    3-:AMOS_System/Request
  1464.    4-:AMOS_System/3D            ;Only if you have AMOS 3D
  1465.    5-:AMOS_System/Compiler        ;Only if you have the AMOS Compiler
  1466.    6-:AMOS_System/Serial
  1467.  
  1468. The default filenames must be set as:
  1469.  
  1470.    1-:AMOS_System/Def_Icon
  1471.    2-:AMOS_System/Mouse.Abk
  1472.    3-:AMOS_System/Default.Font
  1473.    4-:AMOS_System/Default.Key
  1474.  
  1475. An important point to note is that only the extra part of the pathname
  1476. is required. AMOS adds AMOS_System onto the current path (in this case
  1477. Dh0:UTILS) to find the full path: Dh0:UTILS/AMOS_System/
  1478.    Hard disc users will find this information very helpful and it
  1479. will avoid having the AMOS_System folder stuck in the root directory of
  1480. the hard disc. Anyone developing a CDTV application in AMOS will also
  1481. need to use this feature. The above information is also true for the
  1482. RAMOS runtime system, the only difference being that RAMOS doesn't
  1483. require the PAL or NTSC files.
  1484.  
  1485.    IMPORTANT: AMOS 1.3 needs the W.LIB to work. This file includes all
  1486. graphic primitive such as screens sprites and bobs. To locate this file 
  1487. on the disc, AMOS takes the pathname of "Mouse.Abk" file, remove the
  1488. "Mouse.Abk" and replace it by "W.Lib". So you MUST put this file near
  1489. Mouse.Abk, otherwise AMOS1.3 WILL NOT LOAD!
  1490.  
  1491.  
  1492.  
  1493. The future of AMOS.
  1494. ---------------------------------------------------------------------------
  1495.  
  1496. AMOS will constantly be updated so that it keeps up-to-date with new
  1497. trends on the Amiga scene. For the latest AMOS update information
  1498. contact Sandra Sharkey of the AMOS PD. Library: 25 Park Road, Wigan, WN6
  1499. 7AA, England. Telephone 10am to 3pm on (0942) 495261.
  1500.  
  1501.  
  1502.  
  1503.