home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / info / amrep204.lzh / AMREPORT-2.04
Encoding:
Text File  |  1992-06-01  |  58.5 KB  |  1,355 lines

  1.  
  2.             *---== AM-REPORT INTERNATIONAL ONLINE MAGAZINE ==---*
  3.                    """""""""""""""""""""""""""""""""""""""
  4.                       "The Online Magazine of Choice!"
  5.                                     from
  6.                              STR Publishing Inc.
  7.                              """"""""""""""""""
  8.  
  9.  
  10.  May 31, 1992                                                  Volume 2.04
  11.  =========================================================================
  12.  
  13.  > 05/31/92: AM-Report  #2.04      The Online Magazine of Choice!
  14.  
  15.     -Amiga on TV            -Amiga in Print         -Programming Tutorials 
  16.     -Northgate Sold         -Mitsubish Sells Macs   -Compaq Rating Down
  17.     -IBM Robotics           -Soft-Logik News        -IBM Micro-Transistors
  18.     -AT&T Movies            -ImageMaster & Toaster
  19.  
  20.                             -* GFA Basic Review *-
  21.                           -* Soft-Logik's HotLinks *-
  22.                                 -* ViewPort *-
  23.  
  24.                              -* Much, Much More *-
  25.  
  26.                            TODAY'S NEWS ..TODAY!
  27.  
  28.   """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  29.  
  30.  > AMReport's Staff              The regulars and this week's contributors!
  31.    ================
  32.  
  33.                             Publisher - Editor
  34.                             ------------------
  35.                              Ralph F. Mariano
  36.  
  37.  
  38.           PC DIVISION         AMIGA DIVISION           MAC DIVISION
  39.           -----------         --------------           ------------
  40.           Robert Retelle      Charles Hill             R. ALBRITTON
  41.  
  42.  
  43.                          Contributing Correspondents
  44.                          ---------------------------
  45.  
  46.      Mike Todd (CIX)                         Jim Shaffer, Jr. (UseNet)
  47.   70117,634 on CompuServe                   amix.commodore.com!vanth!jms
  48.  
  49.                                Andrew Farrell
  50.                     Australian Commodore and Amiga Review
  51.                                       &
  52.                       Professional Amiga User Magazine
  53.  
  54.       Mike Ehlert, SysOp: PACIFIC COAST MICRO BBS -- FidoNet 1:102/1001
  55.  
  56.  
  57.  
  58.                              IMPORTANT NOTICE
  59.                              ================
  60.       Please, submit letters to the editor, articles, reviews, etc...
  61.                               via E-Mail to:
  62.  
  63.                  Compuserve....................  76370,3045
  64.                  Internet/Usenet...............  76370.3045@compuserve.com
  65.  
  66.  ****************************************************************************
  67.  
  68.  
  69. EDITORIAL
  70. ~~~~~~~~~
  71.  
  72.  
  73.  
  74. IMAGEMASTER - TOASTER
  75. ~~~~~~~~~~~~~~~~~~~~~
  76. [The following two messages were posted on CompuServe's Amiga Vendor forum.
  77.  They were posted by John Foust of Syndesis Corp. and Ben Williams of Black
  78.  Belt System.]
  79.  
  80.  
  81. If you saw Brent Malnack's column in this month's issue of "AV Video" and
  82. were excited to hear about a product from Syndesis Corporation that would
  83. magically link Black Belt Systems' Imagemaster to the Toaster, I've got bad
  84. news.  This product is an unfortunate victim of the time-shift of press lead
  85. times and unfavorable legal restrictions.
  86.  
  87. Yes, the product does exist, but we (Syndesis) developed it using proprietary
  88. information we gained in the process of making the TIO conversions we made
  89. for Toaster 2.0.  Because the code was based on proprietary information, we
  90. needed to ask NewTek's permission to release this product.  Before they
  91. reached a decision, I'd heard that AV Video was covering Imagemaster and
  92. I told Brent about our product. Later, NewTek decided that we should not
  93. release it.
  94.  
  95. Why?  Releasing this would force them to release these undocumented hooks
  96. to other developers who've been anxious to link to the Toaster. These links
  97. are currently undocumented, unsupported, subject to change, and otherwise
  98. impossible to hand out in their present state. In the future, things may
  99. change.
  100.  
  101. I'm just as sad about this as you are, but we had to play it clean and
  102. above-board.  From the outset we knew it was dependent on NewTek's
  103. decision.   It didn't even have a name.  This was a cool little gizmo, I
  104. wish I could have sold a million of them.  With it, you paint in Imagemaster
  105. and it automatically renders through to the Toaster's composite output *and*
  106. updates ToasterPaint's buffers with the same changes to the image, or vice
  107. versa, moving the current frame grab into ImageMaster and back again.
  108.  
  109.  
  110. John Foust
  111. President
  112. Syndesis Corporation
  113.  
  114.                             -----------------------
  115.  
  116. John,
  117.  
  118. Thanks for posting these details for those of our customers (and yours) who
  119. have been interested.
  120.  
  121. We will continue to encourage those Toaster users who wish to see this
  122. product released to contact NewTek and express their opinion(s) on the
  123. matter via voice, fax and mail.
  124.  
  125. It is extremely unfortunate that Toaster users must suffer this type
  126. of arbitrary restriction from NewTek; it's also a shame that you, and we,
  127. wasted the time completely developing a solution for a company that puts
  128. it's customers and external supporters last.
  129.  
  130. Ben Williams
  131. Black Belt Systems
  132.  
  133.  ----------------------------------------------------------------------------
  134.  
  135.  
  136. IBM BREAKTHROUGH
  137. ~~~~~~~~~~~~~~~~
  138. IBM scientists have announced that they have made the world's smallest
  139. transistor.  This transistor is 20 times smaller than the current crop
  140. and should allow memory chip fabrication in the realm of four gigabits
  141. (four billion bits), compared with the capacity of 16 megabits offered
  142. by the largest memory chip now available.
  143.  
  144. Look for commercial availability of such chips around the year 2000.
  145.  
  146.  ----------------------------------------------------------------------------
  147.  
  148.  
  149. AT&T MOVIES
  150. ~~~~~~~~~~~
  151. AT&T Paradyne, a subidiary of AT&T announced that it has developed a way
  152. to send television and movie images over ordinary copper phone wires.  The
  153. new system is called carrierless, amplitude-phase modulation and it sends
  154. information along the wires as rapidly as needed and without the need for
  155. boosters.
  156.  
  157. AT&T predicts that this will lead to the final acceptance of video telephones
  158. as well as practical video conferencing and two-way television -- all of
  159. which could operate over the telephone lines already in use.
  160.  
  161. No time table or productions costs were released.  The product was developed
  162. in conjunction with Bell Labs.
  163.  
  164.  ----------------------------------------------------------------------------
  165.  
  166.  
  167. EVEREX BUYS NORTHGATE
  168. ~~~~~~~~~~~~~~~~~~~~~
  169. PC Clone computer maker, Everex Systems, Inc. is buying the direct market
  170. computer manufacturer, Northgate Computer Corp. for $4.3 million in stock.
  171. Earlier in the month, analysts were speculating that IBM was courting
  172. Northgate for a buyout.
  173.  
  174. Everex President Hal Clark said that Northgate would be operated as a 
  175. separate subsidiary, continuing to market under the Northgate name.
  176.  
  177.  ----------------------------------------------------------------------------
  178.  
  179.  
  180. MITSUBISHI TO SELL MACS
  181. ~~~~~~~~~~~~~~~~~~~~~~~
  182. It is being reported that Mitsubish Corp. has received marketing rights
  183. to sell all models of Apple Computers in Japan.
  184.  
  185.  ----------------------------------------------------------------------------
  186.  
  187.  
  188. COMPAQ RATING LOWERED
  189. ~~~~~~~~~~~~~~~~~~~~~
  190. Smith Barney investment house has lowered its rating on Compaq Computer
  191. Corp.'s stock to "avoid" from "sell".
  192.  
  193.  ----------------------------------------------------------------------------
  194.  
  195.  
  196. APPLE SHOWING NEW QUADRA SYSTEM
  197. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  198. Apple Computer Inc. is unveiling the latest in its high-end Quadra line,
  199. said to be its most powerful computer yet.  The new Quadra 950 is powered
  200. by the 33MHz Motorola Inc. 68040 microprocessor and comes with 24-bit color
  201. capabilities as well as a sound generator and microphone for multimedia
  202. applications.  The new Apple also comes with a minimum of 8MB of RAM,
  203. a hard drive with up of to 430MB of storage space and Apple's SuperDrive.
  204.  
  205.  ----------------------------------------------------------------------------
  206.  
  207.  
  208. MAGAZINE SHUFFLE
  209. ~~~~~~~~~~~~~~~~
  210. Just a .info note:
  211.  
  212. COMPUTE is happy to announce the addition of two new columnists to the Amiga
  213. Resource edition of the magazine:
  214.  
  215.     Mark Brown, former editor of .info, who'll be doing general industry
  216.        news, opinion, and product info.
  217.  
  218.     Oran J. Sands, .info video columnist, will be doing a column on the
  219.        latest and greatest Amiga video happenings.
  220.  
  221. They join Steve Worley, whose 3-D Rendering tutorials starts in the September
  222. issue, and Mike Nelson, who reports on all the new happenings from the U.K.
  223.  
  224. While we're sorry to see .info cease publication (it was the magazine we most
  225. anxiously awaited hitting COMPUTE's mailbox each month), we're pleased to be
  226. able to welcome Mark and OJ to the COMPUTE team.
  227.  
  228.  ...Denny Atkin [Compute]
  229.  
  230.  ----------------------------------------------------------------------------
  231.  
  232.  
  233. IBM ROBOTS
  234. ~~~~~~~~~~
  235. IBM scientists say they have solved the problem of making robots more 
  236. flexible in the high-precision operations necessary for assembling parts
  237. of high-technology products like computer packages, electronic circuit
  238. boards and disk drives.  IBM is quoted as saying robots are limited to
  239. movements in the range of a tenth of a millimeter at best, while some
  240. applications require a thousandth of a millimeter, or less.
  241.  
  242. A new IBM micro-robot called a fine positioner "works down to two-tenths
  243. of a thousandth of a millimeter, more than 100 times greater precision
  244. than current models. The device, which is attached to a macro-robot's arm,
  245. takes 30 minutes to construct, IBM says.  The device works alongside the
  246. macro-robot, and is activated by a variable electromagnetic field, and at
  247. the same time, is forced apart by a layer of compressed air.
  248.  
  249.  ----------------------------------------------------------------------------
  250.  
  251.  
  252. SOFT-LOGIK NEWS
  253. ~~~~~~~~~~~~~~~
  254. [The following message was posted on CompuServe's AmigaVendor forum by a
  255.  representative of Soft-Logik.]
  256.  
  257. Miscellaneous News
  258.  
  259. Everyone will be happy to know our shipping department just moved into much,
  260. much larger quarters. This will put us another week behind in shipping due to
  261. the move, but will make shipping much easier as soon as the move is complete in
  262. a few days. We are still 2-3 weeks behind in orders at this time. We hope to be
  263. caught up within a few weeks.
  264.  
  265. Registered Soft-Logik dealers should call our BBS for their copy of the Dealer
  266. Handbook, which is now online for their downloading. This is only available to
  267. dealers.
  268.  
  269. We have tested a lot of the fonts from Agfa's Type library for the Amiga and
  270. every font so far has worked great with PageStream. Don't hesitate to order
  271. these fonts if you own a non-PostScript printer. We have tested a number of our
  272. fonts with the Gold Disk Type 1 -> Intellifont converter, with mixed results.
  273. Some didn't work and all of them had incorrect style settings. This is not a
  274. recommended conversion method at this time.
  275.  
  276. For those needing to call tech support, the lines have been pretty quiet the
  277. last few weeks, so it's fairly easy to get through.
  278.  
  279. Michael Soft-Logik Publishing Corporation
  280.  
  281.  ============================================================================
  282.  
  283.  
  284.                          *** GFA BASIC 3.5 REVIEW ***
  285.                          ** by: Stewart C. Russell **
  286.  
  287.  
  288.  
  289. GFA BASIC 3.5 is a fast BASIC interpreter, with advanced commands which
  290. include matrix manipulation and direct access to the Exec, Intuition, Dos,
  291. and Graphics libraries.  The optional compiler generates code which is
  292. comparable in execution speed to a good C compiler.
  293.  
  294.  
  295. *** Statement of Interest ***
  296.         I have no commercial links with any part of the GFA organisation.
  297.         I have written several tutorial articles on GFA BASIC in Jeff
  298.         Walker's Just Amiga Monthly (JAM) magazine, the UK's only non-games
  299.         Amiga magazine.  I have never received any incentive, financial or
  300.         otherwise, to write about GFA BASIC; I paid cash for my GFA system.
  301.  
  302.  
  303. *** Product Preamble ***
  304. Product: GFA BASIC 3.5 Interpreter
  305.          GFA BASIC 3.5 Compiler
  306.  
  307. Supplier:       GFA Data Media (UK) Ltd
  308.                 Box 121
  309.                 Wokingham
  310.                 Berkshire
  311.                 RG11 1FA
  312.                 England
  313.  
  314. Price:          Interpreter #49.95 Sterling
  315.                 Compiler    #29.95    "
  316.  
  317. Those hashes are pound signs, btw; ASCII doesn't support them.  I have
  318. tried to find the suppliers outside the UK, but have received no answers
  319. yet.  The product is advertised in Amiga World, discounted to around $85
  320. (for the Interpreter, I assume) and one of the advertisements suggests that
  321. the US distributor is Antic.
  322.  
  323.  
  324. *** Reviewer Info ***
  325.                         Stewart C. Russell
  326. Paper Mail Address:     140 Capelrig Road
  327.                         Newton Mearns
  328.                         Glasgow G77 6LA
  329.                         Scotland
  330.  
  331. Telephone:              041-639 5372 (in UK)
  332.  
  333. E-Mail:                 clcp16@vaxa.strath.ac.uk
  334.         (This account should be active until July, when I graduate.)
  335.  
  336.                         scruss@cix.compulink.co.uk
  337.         (This is my "professional" account.  I get charged for any
  338.          international mail I receive or send, so use only as a last resort.)
  339.  
  340. [Ed. note:  Mr. Russel has informed me that he can forward any queries to
  341. Les Player, the MD of GFA Data Media (UK) Ltd.  I prefer not to give
  342. Mr. Player's address publicly.]
  343.  
  344.  
  345.  
  346. AmigaBASIC isn't one of the world's marvels of high speed execution.  It
  347. also get bored with the tedium of running your programs sometimes, and
  348. wanders off into oblivion.
  349.  
  350. The first version of GFA BASIC I saw (v3.041) was fast, but was so bug
  351. ridden as to be completely useless.  In a way, it was like the first release
  352. of the Amiga's operating system; it had something special, but the bugs
  353. made it less than useful.  And now the bugs are (mostly) gone, people
  354. remember it as it used to be - unstable.
  355.  
  356. GFA BASIC has been long in development, originally appearing on the Atari
  357. ST around 1986.  There is still the lingering feeling that, although the
  358. authors are clearly excellent programmers, they are still not 100% sure of
  359. the Amiga.
  360.  
  361. What you get
  362. ------------
  363.  
  364. There are at least 300 commands in GFA BASIC, ranging from bit operations
  365. to a file requester.  Most of the inch-thick manual is given over to command
  366. descriptions, with very small program fragments illustrating command usage.
  367. There is no tutorial in the manual, and the lack of properly commented
  368. examples (they are commented - but in German) is worrying.  The manual
  369. suffers from truly appalling translation in places, which can range from
  370. the faintly amusing to the downright misleading.
  371.  
  372. The GFA BASIC 3.5 interpreter is some 135 KB in length, allowing it to run
  373. comfortably on a basic A500.  Only one program can be edited at a time, but
  374. multiple interpreters can be run.  When this is done, blocks of text can be
  375. cut from one interpreter and pasted to another.
  376.  
  377. A shorter run-only interpreter is also supplied, and this may be freely
  378. distributed with your programs.  This program only accepts tokenised GFA
  379. BASIC files, and consequently could never be used for program development.
  380.  
  381. The Front End
  382. -------------
  383.  
  384. The single-bitplane editor screen has two rows of ten gadgets along the
  385. top, with a clock and a line number indicator on the right hand side.  These
  386. gadgets allow various file operations (Load, Save, etc) and edit operations
  387. (Block, Find, etc).  These gadgets correspond to function and Shift-function
  388. key combinations.
  389.  
  390. A couple of these gadgets merit special mention.  The Test gadget tests the
  391. integrity of your program's flow control structures, and warns you of any
  392. problems.  The Direct gadget drops you into a command line, where BASIC
  393. commands are executed as you type.  You should be able to work out what the
  394. Run gadget does.
  395.  
  396. The GFA editor is rather strange.  It parses the input line when you press
  397. Return, and won't let you continue if there is a syntax error.  It also does
  398. not allow blank lines, insisting on an apostrophe at the least.  You'll hate
  399. it at first, but when you realise that it allows abbreviated input (p for
  400. PRINT, inp for INPUT) and automatically indents loop structures, you'll
  401. begin to like it more.  Only one command is allowed per line, and line
  402. numbers must not be used.  In line comments are allowed though, but these
  403. must be prefixed with an exclamation mark.
  404.  
  405. Functions & Features
  406. --------------------
  407.  
  408. GFA BASIC knows about most of the commands in the Intuition, Dos, Exec,
  409. Layers, Diskfont Graphics and Icon libraries, and parses them
  410. appropriately; typing in "a%=allocremember(...)" for example would result
  411. in "a%=AllocRemember(...)" being returned.  (The very pedantic would also
  412. note that a syntax error would be returned too; ellipsis is not a valid
  413. input to AllocRemember()... :-) )
  414.  
  415. If your favourite routines exist in another library, you can use the FD
  416. file to create the basis for a stub.  I've already used this to create
  417. interfaces for the iff.library (for IFF handling) and the medplayer.library
  418. (for playing MED modules).  In this respect, being able to call these
  419. library functions from an interpreted language makes GFA BASIC a great
  420. prototyping tool.
  421.  
  422. As with most modern BASICs, GFA supports SELECT...CASE structures, and
  423. ELSEIF clauses in IF structures.  All structures support an EXIT IF clause,
  424. which works similarly to "break" in C.
  425.  
  426. INC, DEC, ADD, SUB, MUL and DIV manipulate variables far more quickly than
  427. the more usual infix operators.  Bitwise operators exist which are similar
  428. to (when compiled, identical to) 68000 instructions.
  429.  
  430. Windows and Screens are handled well, with HAM and Halfbrite as accessible
  431. as in any other language.  All the Window/IDCMP flags are available too.
  432.  
  433. Graphics commands are slightly better than AmigaBASIC's offerings; the DRAW
  434. command contains a full turtle graphics package, based on HPGL.  A slight
  435. nasty is the DISPLAY command; this is a hangover from the Atari, where it's
  436. quite safe to switch off Display DMA.  DISPLAY on the Amiga results in
  437. horrific flickering and all-over nastiness; avoid.
  438.  
  439. Two useful hangovers from the Atari are ALERT and FILESELECT.  ALERT creates
  440. a small requester similar to the GEM Dialog box, and nothing like as
  441. frightening as an Intuition red Alert().  FILESELECT creates a usable file
  442. selector; it's not as good as the ARP one, but it works well.  ALERT and
  443. FILESELECT are not Requesters, so they don't need a window to be attached
  444. to.
  445.  
  446. Arrays are used in the way that BASIC originally intended; as matrices.
  447. Matrices can be added, subtracted, multiplied, inverted, transposed, copied
  448. (in whole or part, with optional transposition) and the determinant and
  449. rank obtained.  Matrix housekeeping tasks for storing, recalling and
  450. printing matrices are supplied; a reasonable package.
  451.  
  452. Arrays can also have members inserted, deleted or moved, so dynamic list
  453. handling is a possibility.  Hardcoded quicksort and shellsort routines
  454. (fast) mean that the old bubble sort routine you've trusted since your PET
  455. days can finally be put out to grass.
  456.  
  457. Sound handling is OK.  I rarely use it though.
  458.  
  459. Variable Types
  460. --------------
  461.  
  462. The standard GFA integer is 32 bits long, unlike AmigaBASIC's sixteen which
  463. corresponds to GFA's Word type.  The byte variable type is unique to GFA
  464. BASIC, being identical to C's unsigned char type.  The Boolean type uses
  465. only one bit per entry if used in an array, or one byte otherwise.
  466.  
  467. This would be fine if GFA hadn't chosen non-standard suffixes for its
  468. variables.  A table shows the problem -
  469.  
  470.                                              Suffix
  471.  Variable Type                  Microsoft               GFA
  472.  =============                  =========               ===
  473.  Boolean                        (not supported)         !
  474.  8-bit Integer                  (not supported)         |
  475.  16-bit Integer                 %                       &
  476.  32-bit Integer                 &                       %
  477.  Single Precision FP            !                       (not supported)
  478.  Double Precision FP            #                       #
  479.  String                         $                       $
  480.  
  481. GFA's mathematical routines use a proprietary double precision format as
  482. the default variable type.  It is very fast (see the benchmarks later on)
  483. but unfortunately does not take advantage of a 68881/68882 coprocessor,
  484. since it was originally developed on the Atari ST.
  485.  
  486. Pointers are handled quite well for a BASIC, but not with the flexibility
  487. of C.  Memory access is enhanced too; the {...} operator can be used to read
  488. and write different types of variable.  Thus
  489.  
  490.   rp%={WINDOW(0)+50}    could return the address of a window's Rastport
  491.                         structure, and
  492.  
  493.   CHAR{attr%+8}="diamond.font"  could put a zero terminated font name into
  494.                                 a pre-prepared TextAttr structure.
  495.  
  496. Although structures aren't directly supported, they can be fudged using
  497. Malloc() and the {..} operator.  This is not C, after all.
  498.  
  499. (In)Compatibility
  500. -----------------
  501.  
  502. GFA BASIC is compatible with, well, only GFA BASIC I guess.  ASCII files can
  503. be merged into the editor, and anything that isn't understood gets `==>'
  504. placed in front of it.  Screen and window commands differ greatly from
  505. AmigaBASIC, but file handling and OBJECT (Bob) commands are almost
  506. identical.  Sprites, however, merit a separate command.
  507.  
  508. Major differences between Amiga and GFA BASIC include -
  509.  
  510.  - "IF...THEN...END IF" is written "IF...ENDIF" (THEN being optional).
  511.  
  512.  - "GOSUB name" branches to "PROCEDURE name".  Subroutines can have
  513.    parameters, and can be recursive; SUB...STATIC does not exist.
  514.    Procedures can be folded down to one line by hitting the Help key.
  515.  
  516.  - "DEF FNname(a,b)" becomes "DEFFN name(a,b)".  Multiline recursive
  517.    functions can be defined using FUNCTION, and can be folded using the
  518.    Help key.  Functions can be voided using "VOID func" or "~func".
  519.  
  520.  - Menu and Interrupt handling is wildly different, and is unfortunately
  521.    identical with the Atari ST's system, which busy waits on signals.  It is
  522.    possible, however, to interrogate IDCMP directly and Wait() on the
  523.    message ports.
  524.  
  525. If portability is an issue to you, GFA BASIC is available on the Atari ST
  526. and PC, though the latter is still slightly buggy.  OS/2, Windows 3 and
  527. Unix (386) versions are said to be under development.  GFA BASIC 4 should be
  528. with us before the third quarter of 1991, according to Les Player of GFA
  529. Data Media (UK).
  530.  
  531. (I know of people who run the program on A3000 machines with no ill
  532. effects, and also on Fatter Agnus B2000s. Runs just fine on my A500 too.)
  533.  
  534. The Compiler
  535. ------------
  536.  
  537. The interpreter is fast, but if you want real speed you need the optional
  538. compiler.  The compiler and linker run from the CLI, but a Workbench
  539. graphical shell is provided.  Maybe it's just the way my machine is set up,
  540. but the GFA shell seldom works properly for me, and I always use the CLI.
  541.  
  542. The compiler only reads tokenised files, and produces a standard Metacomco
  543. object file ready for linkage.  The GFA linker "gl" is very minimal, and
  544. reads the GFA library and library index in a proprietary file format.
  545. External functions can be linked into GFA programs, and the compiler manual
  546. details how to do this.  The GFA library is also supplied in Metacomco
  547. format if you wish to use a different linker.
  548.  
  549. Compilation is quick; all of the benchmark test programs actually compiled
  550. in under two seconds.  Most of the time is spent in the linker, since it has
  551. about 150 KB of library to wade through.  All programs are compiled with
  552. code for Workbench and window opening; producing CLI programs requires the
  553. opening of a CON: (or "*") output file and using stream printing.
  554.  
  555. A large amount of optimisation is done by the compiler, but a good part of
  556. the manual is given over to optimisations that the programmer can include
  557. for better performance.  An example of this is integer multiplication; if
  558. you stick to 16-bit integers, you can set the compiler to use the 68000
  559. MULS instruction.
  560.  
  561. Verdict
  562. -------
  563.  
  564. I bought GFA BASIC 3.5 back in October, and have been using it on a daily
  565. basis since then.  If I prototype something using it, it often interprets
  566. fast enough to do the job.  If not, I compile it, and it's fast enough.  If I
  567. really needed extra speed, I'd link in assembly language subroutines.
  568.  
  569. GFA BASIC isn't bug free yet; but what large product is?  The interpreter
  570. must be 99.5% solid, and the compiled code has never crashed on me.  I trust
  571. it enough to be writing my undergraduate project with it.
  572.  
  573. If you get C sick, take a long hard look at GFA BASIC.
  574.  
  575.  
  576. Benchmarks
  577. ----------
  578. (These are at the end since not everyone might want to read them - SCR)
  579.  
  580. It's easy to say that GFA BASIC is fast, but exactly how fast can only be
  581. demonstrated by comparison with other languages.  HiSoft (Professional)
  582. BASIC is a popular integrated compiler system, and is broadly compatible
  583. with AmigaBASIC.  AmigaBASIC is packaged with every Amiga, and has the
  584. unique ability to run more slowly on a 16MHz 68020/68882 machine than a
  585. 7.1MHz 68000 machine.  DICE is Matt Dillon's C compiler, noted for its rapid
  586. compilation and efficient executables.
  587.  
  588. All times derived from the internal timer routines in each interpreter or
  589. compiler, and then rounded to the nearest quarter second.  Default compiler
  590. options were used in all cases.  The test machine was a 3MB A500/A590.
  591.  
  592. (If you ask me very, very nicely, and I happen to be in a good mood at the
  593. time (and not too busy either), I can send you the actual benchmark
  594. sources.  You'll have to give me a pretty good reason for wanting them
  595. though.)
  596.  
  597. CALC
  598.  
  599.         The old CALC benchmark; 5000 loops of two multiplications and
  600.         two divisions each.  Tests floating point speed and accuracy.  GFA
  601.         uses its own 64-bit floating point format, while HiSoft and
  602.         AmigaBASIC use single precision in this test.
  603.         (An IEEE Double Precision CALC using Matt Dillon's DICE is given
  604.         for comparison.  Out of the four different math packages, IEEE was
  605.         the only one to leave a residual error (of ~-5E-8).  Most odd.)
  606.  
  607.                 GFA     GFA
  608.         Interpreted     Compiled        HiSoft    AmigaBASIC    DICE
  609.         ============================================================
  610.  
  611. Run Time       5.0        3.0            3.25        16.75      6.5
  612. (seconds)
  613.  
  614. Compile Time   -         13.5            5.0          -        11.0
  615. (seconds)
  616.  
  617. Code Size      -         11184          19208         -         7592
  618. (bytes)
  619.  
  620.  
  621. I/O TEST
  622.  
  623.         A small (and not very stringent) test of my own devising.  `Write'
  624.         writes out the integers 1-10000 to a file in RAM:.  `Read' reads
  625.         them back again.  `Print' tests text output by printing 1000 lines
  626.         of 56 characters to the Workbench screen.
  627.         (The RAM: used here is not Commodore's, but The Other Guys'
  628.         Recoverable RAM Disk running FFS.)
  629.  
  630.                 GFA     GFA
  631.         Interpreted     Compiled        HiSoft          AmigaBASIC
  632.         ==========================================================
  633.  
  634. Run Time
  635. (seconds)
  636.  
  637.    Write      14.25      12.0           161.0              42.75
  638.     Read       7.75       7.0            20.25             49.75
  639.    Print      37.5       37.25           78.75            149.75
  640.  
  641. Compile Time   -         14.0             4.5               -
  642. (seconds)
  643.  
  644. Code Size      -         14496           23096              -
  645. (bytes)
  646.  
  647.  
  648. PCW
  649.  
  650.         A suite of benchmarks used many years ago by PCW Magazine to test
  651.         machine performance when running BASIC.
  652.  
  653.  PCW1 - FOR k=1 TO 10000:NEXT k, with k floating point
  654.  PCW2 - 10000 GOTOs and 10000 floating point additions
  655.  PCW3 - Floating Point divide, multiply, add, subtract; all 10000 times
  656.  PCW4 - Same as PCW3, but with explicit constants
  657.  PCW5 - PCW4 plus 10000 GOSUBs
  658.  PCW6 - PCW5 plus 10000 "FOR l=1 TO 5:NEXT l"
  659.  PCW7 - PCW6 with an array access in the FOR...NEXT loop
  660.  PCW8 - 10000 additions, exponentiations, LOG()s and SIN()s
  661.  
  662.                 GFA     GFA
  663.         Interpreted     Compiled        HiSoft          AmigaBASIC
  664.         ==========================================================
  665.  
  666. Run Time
  667. (seconds)
  668.  
  669.   PCW1         0.75       0.75           1.25               4.0
  670.   PCW2         2.75       0.5            2.5               21.5
  671.   PCW3         7.75       3.0            5.0               43.0
  672.   PCW4         7.5        1.25           5.5               48.0
  673.   PCW5         8.0        1.25           7.25              53.5
  674.   PCW6        13.25       4.0           14.25              90.75
  675.   PCW7        21.5        6.5           23.75             140.75
  676.   PCW8        34.25      29.5           20.75             179.75
  677.  
  678.  Average      12.0        5.75          10.0               72.75
  679.  
  680. Compile Time   -         16.0            6.5                -
  681. (seconds)
  682.  
  683. Code Size      -         15272           22944              -
  684. (bytes)
  685.  
  686.  
  687. SIEVE
  688.  
  689.         The Sieve of Eratosthenes with 5 loops of 7000 short integers each.
  690.         (The DICE benchmark is a slightly different program to the BASIC
  691.         ones, which used GOTO liberally.  The result is the same, though.)
  692.  
  693.                 GFA     GFA
  694.         Interpreted     Compiled        HiSoft    AmigaBASIC    DICE
  695.         ============================================================
  696.  
  697. Run Time      53.5        3.5            40.75      258.75      1.75
  698. (seconds)
  699.  
  700. Compile Time   -         17.0             4.5         -        11.0
  701. (seconds)
  702.  
  703. Code Size      -         11256           19256        -         5732
  704. (bytes)
  705.  
  706.                                  %*%* end *%*%
  707.  
  708. --
  709. |Stewart C. Russell       | University of Strathclyde, Glasgow, Scotland, UK|
  710. |clcp16@vaxa.strath.ac.uk |        (opinions my own, not theirs)            |
  711.  
  712.  ============================================================================
  713.  
  714.  
  715. SOFTLOGIK'S HOTLINKS
  716. ~~~~~~~~~~~~~~~~~~~~
  717. What is HotLinks?
  718.  
  719. HotLinks is Soft-Logik's data interchange environment.  It allows any
  720. HotLinks aware program to exchange data with any other HotLinks aware
  721. program.  Although the HotLinks interface was developed by Soft-Logik,
  722. we are opening it up to the whole Amiga community in much the way ARexx
  723. or IFF is open the community.  In fact the data formats used by HotLinks
  724. all follow established IFF guidelines.  What HotLinks offers is a method
  725. for documented data interchange via a document database and live update.
  726. Having said that mouth full, what does it all mean.  To best answer that,
  727. here are some of the most asked questions about HotLinks:
  728.  
  729.  
  730. Q: Is HotLinks the same as ARexx?
  731.  
  732. A: No.  HotLinks is designed around the idea of data interchange, not
  733.    command interchange.  HotLinks is perfectly suited for exchanging
  734.    large bitmap files and word processing documents.  It does not send
  735.    commands to programs other than to let them know the HotLinks edition
  736.    they have subscribed to has been updated.  In feel and operation, it
  737.    is much more like the DOS library than ARexx.  Together though, ARexx
  738.    and HotLinks are a powerful team.
  739.  
  740.  
  741. Q: Is HotLinks proprietary?
  742.  
  743. A: No.  We want everyone to use HotLinks and help shape its future.  The
  744.    actual HotLinks library, resident code and support programs however
  745.    are copyrighted by Soft-Logik.
  746.  
  747.  
  748. Q: Do I have to license HotLinks from Soft-Logik?
  749.  
  750. A: No.  We are making information about HotLinks freely available.  The
  751.    HotLinks resident code itself is a product from Soft-Logik, much like
  752.    ARexx is a product from William Hawes.  Currently the HotLinks resident
  753.    code is sold with two HotLinks compatible programs, BME and PageLiner.
  754.  
  755.  
  756. Q: What sort of support will Soft-Logik offer, and to whom?
  757.  
  758. A: We are interested in supporting all developers who wish to include
  759.    HotLinks in their products.  In some ads, we have restricted this to
  760.    those registered with CATS.  We do not require this, but would encourage
  761.    any Amiga developer to be registered with Commodore in their native
  762.    country or region.  As for the support itself, we will be sending a
  763.    developers kit to those who request it.  This kit includes example code
  764.    in the C language for interacting with HotLinks, all associated includes,
  765.    development tools and a complete set of libs and programs that make up
  766.    the HotLinks environment.  It also includes a paper manual full of
  767.    HotLinks programming and development information.  Soft-Logik also wants
  768.    to ensure those products that claim to be Hot-Links compatible, are.  To
  769.    this end, Soft-Logik asks that those developers that integrate HotLinks
  770.    into their products provide Soft-Logik with two copies of the product.
  771.    This is so Soft-Logik may validate, demonstrate and better answer
  772.    questions about supporting products.  Furthermore Soft-Logik intends on
  773.    including lists of HotLinks compatible products in its ads and producing
  774.    a "HotLinks Compatible" sticker much like the green 2.0 sticker.  This
  775.    is necessary to assure users that a program that claims to be HotLinks
  776.    compatible, truly is.
  777.  
  778.  
  779. Q: How does HotLinks compare to similar systems on other platforms?
  780.  
  781. A: HotLinks is often compared to systems like DDE and OLE on DOS platforms,
  782.    Publish and Subscribe in Macintosh System 7 and NeXt step 3.0Us Linking.
  783.    HotLinks uses a Publish and Subscribe metaphor, not unlike the Apple
  784.    Macintosh System 7.  Also like DDE and System 7, HotLinks uses the
  785.    operating system's standard message passing system.  HotLinks functions
  786.    are accessed via a disk based library called HotLinks.library.  The
  787.    library packages up your messages and sends them to the HotLinks resident
  788.    program, and returns to your program the results.  Furthermore the library
  789.    provides a uniform interface, with the new 2.0 look, for all HotLinks
  790.    interaction.  
  791.  
  792.  
  793. Q: How does the Publish and Subscribe metaphor in HotLinks work?
  794.  
  795. A: When you wish to make a block of data available to HotLink users, you
  796.    Publish it.  If you make changes to that data and want to give users
  797.    the new data, you Update it.  If at any point you no longer want users
  798.    to receive further changes from your document, you can break the link
  799.    that associates your data with the HotLinks Edition.  At this point
  800.    people could still subscribe to the old data and update it, unless you
  801.    delete the Edition.  If you wish to use the data that HotLinks has to
  802.    offer, you may Subscribe to an Edition.  When you Subscribe, you can:
  803.    (1) link the data and ask for notification, (2) link the data and not
  804.    ask for notification, or (3) receive the data and immediately break
  805.    the link.  Each case it has its own uses.  In the event that you save
  806.    a file with a HotLink in it, that file will not be updated until it
  807.    is reopened.  When a file is reopened, you can check to see if you
  808.    have the most recent version of the Edition.  If not, you can update
  809.    at that time.  
  810.  
  811.  
  812. Q: How does HotLinks physically interchange the data?
  813.  
  814. A: In all cases an actual disk based file is created when data is 
  815.    exchanged.  This file contains the data as well as security and audit
  816.    information.  Currently HotLinks maintains a special directory where
  817.    HotLinked files are kept.  Files in the HotLinks directory are not
  818.    meant to be accessed by the normal OS, but can be as they are normal
  819.    Amiga files.  In the future however, files may be kept in many places,
  820.    possibly across networks.  By using the calls in the HotLinks library,
  821.    the program does not need to know where the file is physically located.
  822.    The files are written by the program, via HotLinks, in much the same
  823.    manner as if using the DOS library.  Open, Read, Write, Seek and Close
  824.    calls all have HotLink equivalents.  For this reason, implementing
  825.    HotLinks is very similar to implementing traditional file I/O.  
  826.  
  827.  
  828. Q: What kind of data can be exchanged?
  829.  
  830. A: Eventually, everything.  At this time, only the formats for bitmapped
  831.    graphics and formatted text have been defined.  The bitmapped format
  832.    is a simple extension of the existing IFF ILBM format, and the text
  833.    format is IFF DTXT.  It is our intention that wherever possible, any
  834.    existing approved IFF format will be used.  In this way, a minimal
  835.    amount of redevelopment will need to be done.  Of course many kinds
  836.    of data that will be exchanged do not yet have an established IFF
  837.    format.  We will work with any developer or group of developers
  838.    to establish new standards.  This will expand the IFF standard as
  839.    well as focus program data interchange in and out of HotLinks.  We
  840.    also want to include those members of the Amiga community that are
  841.    involved in the BIX amiga.dev/iff section, as they have helped shape
  842.    several standards.
  843.  
  844.  
  845. Q: Can you give me an example of how HotLinks is used?
  846.  
  847. A: Here are a few examples:
  848.  
  849.    A user scans in an image using HotLinks aware software.  The user
  850.    has the choice of saving the image as a normal file, and/or publishing
  851.    it to HotLinks.  They publishes it to HotLinks, then switches into a
  852.    page layout program.  Next, the user subscribes to the image, places,
  853.    rotates and scales the image.  After having done this they realize
  854.    that there is a minor problem with the image, not enough to require
  855.    re-scanning, just touch up.  The user then enters the touch up program
  856.    and subscribes to the file, touches it up and updates it.  Now when they
  857.    flip back to the page layout program the file has updated, but none of
  858.    the position, rotation, scaling information has been lost.  Another 
  859.    example could involve text.   A user may first create a body of text in
  860.    a fast text or word processor, then publish the file to HotLinks.  From
  861.    here the file could be grammar checked, flowed into page layout, 
  862.    re-edited, re-checked and re-flowed.  The document could make many trips
  863.    around the loop without losing any important information.  In each case
  864.    the subscribing program only changes the information it understands, and
  865.    passes on the rest.  Finally, HotLinks would be an excellent way to 
  866.    update parts of a multi-media presentation without disturbing the whole.
  867.    Each part, text, sounds, animations, graphics, could be Hot-Linked 
  868.    editions.  The user could work on these while maintaining the originals
  869.    in the presentation.  When the user feels that the updated version is now
  870.    better, then they can choose to update that portion.  In the meantime,
  871.   the integrity of the whole presentation is maintained.
  872.  
  873.  
  874. Q: What do I have to do to support HotLinks?
  875.  
  876. A: At its heart, HotLinks merely enhances the file I/O environment.  To use
  877.    a HotLinks edition, you will have to do the equivalent of reading and
  878.    writing a standard file.  For the most part this means treating HotLinks
  879.    like another format you import or export.  The major difference is that
  880.    you get HotLinks edition requesters when asking for an edition instead
  881.    of the standard ASL or ARP requester.  There is also an edition infor-
  882.    mation requester available.  Depending on what options you support, you
  883.    may want to add a HotLinks menu or sub-menu.
  884.  
  885.  
  886. Q: What is in the future for HotLinks?
  887.  
  888. A: One of the biggest things in the future of HotLinks is network support.
  889.    The real power of HotLinks can be unleashed when multiple users on a
  890.    network can be collaborating on a single venture, each providing the
  891.    other with different parts of the whole.  The current version of HotLinks
  892.    is not network compatible, but due to the multi-tasking nature of the
  893.    Amiga, it offers a powerful way for programs to interact.
  894.  
  895.  
  896. Also we foresee the integration of ARexx, for seamless computer control
  897. of the whole environment.
  898.  
  899.  
  900. [Soft-Logik]
  901.  
  902.  ============================================================================
  903.  
  904.  
  905.                                 ** VIEWPORT **
  906.  
  907. GEnie's Amiga forum, the *Starship* Amiga has started publishing a online
  908. newsletter centered around the activities and happenings on GEnie.  The
  909. Publisher is Peggy Herrington, the Producer is Deb Christensen and the
  910. Editor is Jim Meyer.  Currently it is all ASCII, though it was written
  911. on the premise that it is physically printed before read.  (It is written
  912. in two-column style with embedded form-feeds [CTRL-L] and page numbers.)
  913.  
  914. Aside from the goings on on *Starship* Amiga, Viewport has reviews, news
  915. and tutorial articles.  It looks like they are on about their third or
  916. fourth issue, and so far it looks quite good.  The tutorial articles
  917. especially well done.
  918.  
  919. Viewport is freely redistributable as long as the archive is kept intact
  920. (text file, icon, read.me and possibly a note).  There is also a provision
  921. to reprint some of the articles in newsletters as long as credit is given.
  922. I am going to take advantage of that provision now and give you a little
  923. taste of Viewport.  If you like what you see, Viewport is available on a
  924. monthly basis on GEnie.  I do not know if GEnie mail has provisions for
  925. internet mail, so I don't know if subscriptions are available.
  926.  
  927. Contact JIM.MEYER on GEnie for more information.
  928.  
  929.  
  930.  
  931. "Reprinted from ViewPort, a *StarShip*(tm) production available on GEnie(R)."
  932.  
  933.  
  934. PRO/AM SOLUTIONS: INTEGER TO ASCII CONVERSIONS IN ASSEMBLY
  935. By Chris Papademetrious
  936.    ViewPort March 1992
  937.  
  938. Converting a 16-bit integer to ASCII sounds fairly simple, but there are
  939. some factors to be aware of. Below, we will examine the design of an
  940. integer to ASCII routine, and point out problems and solutions, in the
  941. hope that they will help you to see solutions to any similar problems
  942. you may encounter. The design of such a routine is rather standard. Take
  943. the integer N, for example. If you divide it by ten, the answer will consist
  944. of two parts: a quotient, which is basically the number without its right-
  945. most digit (integers have no fractional components); and the remainder, which
  946. is actually the digit that was just lopped off the main number.
  947.  
  948. The MC68000-series processors makes this approach very easy for us, since it
  949. has a 16-bit integer division instruction, DIVU.W, which handily provides for
  950. us both the quotient and the remainder. The routine, need only continue
  951. looping until the quotient is zero; in other words, until there is no more
  952. number to convert!            
  953.                                          
  954. A side-effect of this method is that we obtain the digits of the number from
  955. right to left. Since we would much rather store the digits from left to right
  956. in our buffer, we must reverse the digits. The key to this is fairly simple,
  957. however; as we receive each digit, we push it on the stack. Then, we can pull
  958. them off in reverse order, when we're finished. We can even push an end-of-
  959. string character (a NULL) on the stack, which will be convenient (as a 
  960. moment's study of the code should reveal).        
  961.                                          
  962. A second consideration is negative numbers. Since the DIVU.W instruction is
  963. both faster and more convenient than the signed flavor, DIVS.W, we would do
  964. well to make the number positive. We must still remember if the number is
  965. negative or not, so that we can add the negative side when the time comes to
  966. stuff everything into the buffer.                         
  967.                                          
  968. If we wished, we could even write a 32-bit integer to ASCII routine.  There
  969. are two easy ways to approach it: we could use the DIVUL.L instruction, which
  970. only exists on MC68020 (and better) processors, or you could use 2.04's 
  971. utility.library, which provides a handy little UDivMod32() routine (which
  972. will use DIVUL.L whenever possible, for speed's sake).
  973.                                   
  974.                                          
  975. The routine below consists of two entry points. First, there is UIntToASCII,
  976. which immediately assumes a positive 16-bit integer, clears the negative flag,
  977. and drops down to IntToASCII. For signed numbers, use SIntToASCII, which will
  978. set the negative flag accordingly, and ensure the number is indeed positive
  979. by the time the routine falls through to IntToASCII.
  980.  
  981.   * a0 - pointer to buffer
  982.   * d0 - number to convert (WORD or
  983.          UWORD)
  984.   * d1 - negative number flag
  985.  
  986.   UIntToASCII:
  987.       clr.w   d1
  988.       beq.s   IntToASCII
  989.  
  990.   SIntToASCII:
  991.       clr.w   d             ; clear
  992.                             ; negative flag
  993.       tst.w   d0            ; test the number
  994.       bpl.s   IntToASCII    ; branch if
  995.                             ; plus...
  996.       neg.w   d0            ; make it positive
  997.                             ; again
  998.       not.w   d1            ; and invert the
  999.                             ; negative flag
  1000.                             ; fall through
  1001.                             ; to main routine
  1002.                             ; IntToASCII:
  1003.       ext.l   d0            ; ensure that it's
  1004.                             ; 32 bits for DIVU.W
  1005.                             ; (it only returns
  1006.                             ;a 16-bit quotient,
  1007.                             ; though)
  1008.       move.b  #0,-(sp)      ; store a zero
  1009.                             ; marker on the
  1010.                             ; stack
  1011.  
  1012.   1$  divu.w  #10,d0        ; divide the
  1013.                             ; number by 10
  1014.       swap    d0
  1015.       add.b   #'0',d0       ; convert it to
  1016.                             ; an ASCII digit
  1017.  
  1018.       move.b  d0,-(sp)      ; and push it on
  1019.  
  1020.       swap    d0            ; switch the
  1021.                             ; quotient and
  1022.                             ; remainder
  1023.       ext.l   d0            ; make it a full
  1024.                             ; 32-bit
  1025.                             ; value again
  1026.       bne.s   1$            ; and continue
  1027.                             ; if there's
  1028.                             ; still more
  1029.  
  1030.   2$  tst.w   d1
  1031.  
  1032.       beq.s   3$
  1033.       move.b  #'-',(a0)+ 3$              
  1034.       move.b  (sp)+,(a0)+   ; pull         
  1035.                             ;character
  1036.                             ; off stack    
  1037.                             ; and stuff it 
  1038.       bne.s   3$            ; branch       
  1039.                             ; while        
  1040.                             ; non-zero     
  1041.                             ; (non-end-    
  1042.                             ;  of-string)  
  1043.                                        
  1044.       rts                                
  1045.  
  1046.  ----------------------------------------------------------------------------
  1047.  
  1048.  
  1049.                 Pro/Am Solutions: Structuring Your C Programs
  1050.      ______     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1051.     (__  __)              by Chris Papademetrious  (April 1992 ViewPort)
  1052.       / /
  1053.      / /
  1054.     (_/he three steps to writing a program are design, coding, and de-
  1055.       bugging.  Design is the most important stage, because a proper design
  1056.   greatly eases the burden of the remaining two steps. Likewise, the coding
  1057.   and debugging of a poor design will waste precious time and effort.
  1058.   However, once your design is finalized, there are still some hints that
  1059.   can aid in the actual coding of your project.
  1060.  
  1061.   The large majority of programs share two fundamental code units:
  1062.   initialization and cleanup. In simple projects, the initialization is
  1063.   often short and uncomplicated. In larger projects, it may be broken down
  1064.   into several subsections, which may not even execute in sequential order.
  1065.   A good example of this is an application that allows multiple project
  1066.   windows, such as a word processor. While the application itself obviously
  1067.   involves initialization, each separate project opened will require its own
  1068.   initialization. Careful study of your design will help you determine the
  1069.   most efficient solution.
  1070.  
  1071.   Cleanup is often easier than initialization, since little or no error-
  1072.   checking needs to be performed; one doesn't often run into problems
  1073.   closing something! Cleanup has its own set of potential problems to look
  1074.   out for, however; be sure to avoid situations where you free something
  1075.   that's still needed, such as a message port or a memory buffer. Again, an
  1076.   analysis of your design will help a great deal in spotting such pitfalls.
  1077.  
  1078.    For very small applications, you can follow this format, which elegantly
  1079.   unifies initialization and cleanup:
  1080.  
  1081.       if (OpenResource1())
  1082.       {
  1083.           if (OpenResource2())
  1084.           {
  1085.           ... /* continue this as needed */
  1086.               CloseResource2();
  1087.           }
  1088.           else
  1089.               ErrorResource2();
  1090.           CloseResource1();
  1091.       }
  1092.       else
  1093.           ErrorResource1();
  1094.  
  1095.    A quick study of this pseudo-code fragment shows that initialization and
  1096.   cleanup complement each other very well. The main problem in this approach
  1097.   lies in the ever-rightward-shifting indentation. One solution to this
  1098.   problem would be to further break the program down into more functions; in
  1099.   other words, modularize! This code model may also break down in more
  1100.   complex situations, where an initialization failure may not require a
  1101.   complete abort or exit.
  1102.  
  1103.   Another approach for somewhat larger applications is to use isolated
  1104.   initialization and cleanup functions, removed from the main body of code.
  1105.   In my own projects, I tend to use the names OpenAll() and CloseAll()
  1106.   respectively. A code model for this method is shown below and on the next
  1107.   page:
  1108.  
  1109.   OpenAll();
  1110.   ...
  1111.   CloseAll(0); /* normal exit */
  1112.   OpenAll()
  1113.   {
  1114.       if (! OpenResource1()) /* if it fails */
  1115.           CloseAll(20);
  1116.       if (! OpenResource2())
  1117.           CloseAll(20);
  1118.       ...
  1119.   }
  1120.  
  1121.   CloseAll(int ReturnCode)
  1122.   {
  1123.       if (Resource2)
  1124.           CloseResource2();
  1125.       if (Resource1)
  1126.           CloseResource1();
  1127.       exit(ReturnCode);
  1128.   }
  1129.  
  1130.    Notice that an error anywhere during initialization will automatically
  1131.   abort with a call to CloseAll(), with a return code of 20. This will allow
  1132.   for cleanup of partial initialization in almost all cases. The CloseAll()
  1133.   function can even be expanded on, as shown below:
  1134.  
  1135.   CloseAll(char *ErrorMessage)
  1136.   {
  1137.      if (ErrorMessage)
  1138.          Show(ErrorMessage);
  1139.      ...
  1140.                                      /* Note: if you are not familiar */
  1141.      exit( ErrorMessage ? 20 : 0);   /* with conditionals, you may wish */
  1142.   }                                  /* to refer to a C-language reference
  1143.   */
  1144.  
  1145.    This flavor of CloseAll() will automatically inform the user of any
  1146.   appropriate errors during initialization, while returning with the proper
  1147.   return code automatically! Although I have not shown an example for
  1148.   calling the routine with an error message of some sort, you are welcome to
  1149.   come to the Pro/Am conferences for assistance (page 670;2, every Wednesday
  1150.   night at 10PM EST). Until (Conference || NextMonth), happy programming!
  1151.  
  1152.  ----------------------------------------------------------------------------
  1153.  
  1154.  
  1155.                You and Your Complex Interface Adapter: Part One
  1156.                      by Greg R. Guthman (a.k.a. AmigaDoc)
  1157.                             May/June 1992 Viewport
  1158.  
  1159.  
  1160.   Q: I seem to be having problems formatting disks.
  1161.  
  1162.   A: Hmmmm, it must be your 8520's!
  1163.  
  1164.   Q: My VCR is not recording as well as it used to.
  1165.  
  1166.   A: It must be your 8520's!
  1167.  
  1168.     ______
  1169.    (__  __)
  1170.      / / he most misunderstood and most maligned component in the Amiga
  1171.     / / has got to be the 8520 Complex Interface Adapter (CIA). It has
  1172.    (_/ been blamed for everything including world hunger at one point or
  1173.       another.  A discussion of what a CIA does and more importantly what
  1174.      it does NOT do is in order.
  1175.  
  1176.   There are two CIA's in every Amiga system. They are designated CIAA and
  1177.   CIAB. These 8520 IC's (Integrated Circuits) are general purpose
  1178.   Input/Output controllers that are used in other microcomputer systems as
  1179.   well. In the Amiga, they handle keyboard, serial, parallel and other I/O
  1180.   functions like portion of joystick data. The table below details the pin-
  1181.   outs for each of these IC's and their corresponding function (Pin #, Signal
  1182.   name, Amiga function).
  1183.  
  1184.    CIAA (U7 on A500/U300 on B2000)    []  CIAB(U8 on A500/U301 on B2000)
  1185.                                       []
  1186.   Pin # | Signal | Amiga Function     [] Pin # | Signal | Amiga Function
  1187.   ---------------------------------------------------------------------------
  1188.    2    | PA0    | MEM Overlay Bit    [] 2     | PA0    | Centronics Busy (1)
  1189.    3    | PA1    | LED Light DIM      [] 3     | PA1    | Paper out       (1)
  1190.    4    | PA2    | Disk change        [] 4     | PA2    | Centronics SEL  (1)
  1191.    5    | PA3    | Write protect      [] 5     | PA3    | RS232C DSR      (2)
  1192.    6    | PA4    | Disk track 00      [] 6     | PA4    | RS232C CTS      (2)
  1193.    7    | PA5    | Disk ready         [] 7     | PA5    | RS232C CD       (2)
  1194.    8    | PA6    | Game port 0 Fire(3)[] 8     | PA6    | RS232C RTS      (2)
  1195.    9    | PA7    | Game port 1 Fire(3)[] 9     | PA7    | RS232C DTR      (2)
  1196.    10   | PB0    | Data 0          (1)[] 10    | PB0    | Disk step
  1197.    11   | PB1    | Data 1          (1)[] 11    | PB1    | Disk DIR
  1198.    12   | PB2    | Data 2          (1)[] 12    | PB2    | Disk side select
  1199.    13   | PB3    | Data 3          (1)[] 13    | PB3    | Select 1st drive
  1200.    14   | PB4    | Data 4          (1)[] 14    | PB4    | Select 2nd drive
  1201.    15   | PB5    | Data 5          (1)[] 15    | PB5    | Select 3rd drive
  1202.    16   | PB6    | Data 6          (1)[] 16    | PB6    | Select 4th drive
  1203.    17   | PB7    | Data 7          (1)[] 17    | PB7    | Motor control
  1204.    18   | _PC    | Strobe(clock)   (1)[] 18    | _PC    | Not Used
  1205.    24   | _F     | Ack control     (1)[] 24    | _F     | Disk index
  1206.    26-33| D0-D7  | Input Data         [] 26-33 | D0-D7  | Input Data
  1207.    34   | _Reset | Reset line         [] 34    | _Reset | Reset line
  1208.    35-38| RS0-RS3| Register storage   [] 35-38 | RS0-RS3| Register storage
  1209.    39   | SP     | Keyboard Data      [] 39    | SP     | Tied to Busy    (1)
  1210.    40   | CNT    | Keyboard Clock     [] 40    | CNT    |  "  to Paper out(1)
  1211.   ---------------------------------------------------------------------------
  1212.  
  1213.  
  1214.       Legend for Pinout Chart:
  1215.  
  1216.   (1) Centronics compatible parallel port (printer etc.)
  1217.   (2) RS232C compatible serial port (Modem etc.)
  1218.   (3) This can either be a joystick fire button, a mouse left button or a
  1219.       light pen beam trigger.
  1220.  
  1221.   The main purpose of this chart is to show you exactly what is connected to
  1222.   these devices and more importantly what is not! For example, take the case
  1223.   of a joystick that does not respond to up and down movements or a problem
  1224.   with a mouse that seems to have a mind of it's own. Neither of these pro-
  1225.   blems could have anything to do with our friendly 8520's. Many people have
  1226.   stated that the best way to troubleshoot a problem with an 8520 is to
  1227.   exchange them and see if the problem corrects itself for moves to another
  1228.   area of the system. If you look at the CIAA and CIAB carefully, you will
  1229.   notice that many I/O functions are split between them.  For instance, the
  1230.   parallel port gets its data from the CIAA, but is controlled via the CIAB.
  1231.  
  1232.   The most common failure of an 8520 is due to ignoring the first rule of
  1233.   computing: NEVER PLUG OR UNPLUG ANYTHING INTO YOUR AMIGA WITH THE POWER ON!
  1234.   Many ports that are handled via the 8520 are directly connected to the IC.
  1235.   When you pull off a mouse cable or a serial cable that has that nice metal
  1236.   shield around it, you are asking for trouble. Just in case you decide not
  1237.   to head this warning, here are the part numbers!:
  1238.  
  1239.   8520 Commodore part #: 318029-02 These can be obtained from Commodore dir-
  1240.   ectly or by any number of mail-order dealers. In part two, we will discuss
  1241.   some easy troubleshooting methods for these critters.
  1242.  
  1243.  
  1244.   [Read the rest of this article in the next issue of ViewPort!]
  1245.  
  1246.  ============================================================================
  1247.  
  1248.  
  1249.                               ** IN THE NEWS ***
  1250.  
  1251. Q. When is an Amiga commercial not an Amiga commercial?  
  1252.  
  1253. A. When it is a commercial produced by The Church of Jesus Christ
  1254.    of Latter Day Saints.
  1255.  
  1256. The middle-school classroom is full of politically correct students
  1257. (neat, tidy, attentive as well as black, white, hispanic, asian, male
  1258. and female).
  1259.  
  1260. TEACHER:  "Today's assignment is simple...make this Earth as beautiful
  1261.            as possible."  [He rotates a monitor screen to show DPaint
  1262.            running with an outline drawing of Earth's western hemisphere.]
  1263.  
  1264. The next series of shots shows students using mice and "prettying" the
  1265. image.  They color it in, cycle colors, use animal clip-art, etc.  The
  1266. entire classroom is a network of Amiga 2000s (about twenty to thirty in
  1267. all).  *MANY* shots are shown of the computers and the screens, and
  1268. the Amiga logo and nameplate is clearly visible.
  1269.  
  1270. [One student gets up and leaves.]
  1271.  
  1272. TEACHER:  "Has any one seen {student}?"
  1273.  
  1274. OTHER STUDENT: [standing at window] "I know where she is."
  1275.  
  1276. [All students and teacher rush to window.  Lost student is picking
  1277.  up trash in the courtyard.]
  1278.  
  1279. [All students run down to help.  The teacher is left alone in a room
  1280.  full of Amiga 2000s.]
  1281.  
  1282. All in all it is a nice commercial.  It shows off the Amiga more than
  1283. anything else.  It does a good job with DPaint and showing the students
  1284. doing something creative as well as entertaining.  Commodore should
  1285. take notes.
  1286.  
  1287.  ----------------------------------------------------------------------------
  1288.  
  1289.  
  1290.                                ** VIDEOGRAPHY **
  1291.  
  1292. Q. Is it another Amiga magazine?
  1293.  
  1294. A. No.  But from the latest issue, they sure fooled me!
  1295.  
  1296. Videography magazine (April 1992  Volume 17 Number 4) has enough Amiga
  1297. articles and advertisements to make you think they are produced specifically
  1298. for the Amiga.
  1299.  
  1300. Let's start at the start:  the front cover
  1301.  
  1302. The cover has the main shot and four insets.  The main shot is of an Amiga
  1303. 3000 with 1950 monitor and a Commodore screen (not the logo alone, but one
  1304. of the standard demos) showing.  There are "boing!" balls floating in from
  1305. the left.  Of the four insets, one is of a camera; one of a DAT audio
  1306. recorder; one of a Mac; and one is a spaseship graphic done on Lightwave
  1307. from Babylon V.
  1308.  
  1309. The magazine spine reads:
  1310.  
  1311. Videography                 Video and the Amiga                   April 1992
  1312.  
  1313. The cover blasts AMIGA VIDEO 1992 (a Special Report).
  1314.  
  1315. Not enough?  There are thirteen (13) full pages of advertising directed
  1316. almost exclusively at the Amiga. You want articles?
  1317.  
  1318. PRODUCTION [commentary on production technique]:  "Keep Your Eye on the
  1319. Bouncing Amiga"  (2 full pages)
  1320.  
  1321. MULTIMEDIA [commentary on the user interface]:  "Getting Video Out of Your
  1322. Computer"  (3 full pages - about 1/3 Amiga)
  1323.  
  1324. VIDEO AND THE AMIGA [feature]:  "Amiga Video Computing Gets Down to Business"
  1325. (4 full pages)
  1326.  
  1327. CLOSING COMMENT:  Written by Leo L. Schwab
  1328.  
  1329. Finally, how about a 32 page special insert entitled "Amiga Video 1992" which
  1330. duplicates the cover but without the inset graphics.  This includes a 9 page
  1331. "Buyers Guide to Amiga Video Products" which is quite good.
  1332.  
  1333. Still, this isn't an Amiga rag.  The majority of the advertisements are
  1334. general industry and are placed by the likes of Sony, JVC and Hitachi.  They
  1335. tout the latest-and-greatest in S-VHS, 3/4", SMPTE timecoders, DAT audio,
  1336. cameras, editing and recording equipment.  Articles deal with the reality
  1337. of getting decent video output from a Mac or a PC as well as discuss 
  1338. computer-generic issues like the FCC & HDTV, set safety and other things.
  1339.  
  1340. However, after reading this magazine, you can only come to one conclusion --
  1341. the Amiga is the king of the video hill and it is *not* resting on its
  1342. laurels.
  1343.  
  1344.  ============================================================================
  1345.  
  1346.  
  1347.  
  1348.  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  1349.                   AMReport International Online Magazine
  1350.      Available through more than 10,000 Private BBS systems WorldWide!
  1351.  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  1352.  AMReport              "YOUR INDEPENDENT NEWS SOURCE"          May 31, 1992
  1353.  16/32bit Magazine            copyright 1992                    Volume 2.04
  1354.  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  1355.