home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / aminet / amos136.dms / amos136.adf / About_AMOS_1.36 < prev    next >
Text File  |  1993-03-15  |  55KB  |  1,485 lines

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