home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / Information / CHACKING14 < prev    next >
Encoding:
Text File  |  2019-04-13  |  262.5 KB  |  5,617 lines

  1. @(#)top:
  2.   
  3.                    ########
  4.              ##################
  5.          ######            ######
  6.       #####
  7.     #####  ####  ####      ##      #####   ####  ####  ####  ####  ####   #####
  8.   #####    ##    ##      ####    ##   ##   ##  ###     ##    ####  ##   ##   ##
  9.  #####    ########     ##  ##   ##        #####       ##    ## ## ##   ##
  10. #####    ##    ##    ########  ##   ##   ##  ###     ##    ##  ####   ##   ##
  11. #####  ####  ####  ####  ####  #####   ####  ####  ####  ####  ####   ######
  12. #####                                                                     ##
  13.  ######            ######            Issue #14
  14.    ##################               Version 1.0
  15.        ########                    November 1996
  16.                      
  17. -------------------------------------------------------------------------
  18.  
  19. @(#)contents: Table of Contents
  20.   
  21.  
  22. Features
  23.    6. The Commodore Telnet BBS by Bo Zimmerman
  24.       (Reference: net)
  25.         In this age of internetworked computer systems, is the 
  26.         Commodore left out?  No way, as Bo Zimmerman describes how to
  27.         coax your Commodore BBS system to play the networking game.
  28.         Bo shows how to set up your BBS so that Internet users can
  29.         "telnet" to your BBS from anywhere on the 'Net.
  30.    8. Menu Toolbox III by Jeff Jones
  31.       (Reference: toolbox)
  32.         You've got this neat idea for a game, utility, or productivity
  33.         application.  The engine is complete and working, but the user
  34.         interface is a mess.  Do you scrap the project because you're
  35.         not up to the task of writing a whole UI engine?  Nonsense.  Jeff
  36.         presents a rich set of functions and subroutines to tame that
  37.         killer application.
  38.   11. The CMD Nirvana: The Guts and Glory by Todd Elliott
  39.       (Reference: hw)
  40.         Has your computer system started looking like the multi-headed
  41.         beast from a "B" movie?  Are you tired of having so many items
  42.         on your desk?  Do you envy IBM PC owners with their all-in-one
  43.         computer?  Well, if you answered YES! to any of the above, let
  44.         Todd show you his souped up C128DCR.  Learn how you, too, can
  45.         "upgrade" your computer system and refine its image.
  46.   13. Jim Butterfield: The Commodore Guru - An Interview by Jim Lawless
  47.       (Reference: jb)
  48.         Jim Butterfield has long been associated with the Commodore
  49.         computer system, from the days of the KIM-1 to the present.
  50.         Many of us learned machine language through Jim's articles or
  51.         books, while most have benefitted from his early work on
  52.         creating memory maps and documenting KERNAL routines for the 
  53.         Commodore line.  Jim Lawless talks to the ubiquitous Commodore
  54.         Guru.
  55.  
  56. Columns
  57.    4. Hi Tech Trickery by Alan Jones
  58.       (Reference: trick)  
  59.         In part II of Alan's "Heavy Math" series, he moves right into
  60.         Linear Programming and how to accomplish it on the C64.  If you're
  61.         still not sure what LP math is, read on, as you'll be surprised 
  62.         at which everyday problems fall into this category of mathematics.
  63.   15. Hacking BASICs by Richard T. Cunningham
  64.       (Reference: basic)
  65.         Even as more and more programmers take up the ML flag and wave it
  66.         proudly, there are many who either use BASIC entirely, or prototype
  67.         pieces of code in BASIC before converting to ML.  Richard outlines
  68.         some common "gotchas" in the ever-present programming language.
  69.   17. Twiddling the Bits by Ward Shrake
  70.       (Reference: bits)
  71.         OK, VIC-20 enthusiasts, listen up.  Resident VIC-20 cartridge expert
  72.         Ward Shrake details exactly how the VIC-20 and its cartridges work
  73.         together to allow the user to play games and use applications on
  74.         cartridge.  Ward details how to archive your collection of VIC
  75.         carts, as well as how the computer recognizes and executes code on
  76.         a cartridge.
  77.         
  78. Departments
  79.    1. The (cough, cough) Hacking Editor
  80.       (Reference: editor)
  81.    2. Input/Output
  82.       (Reference: io)
  83.    3. Newsfront
  84.       (Reference: news)
  85.    5. Hacking the Mags
  86.       (Reference: mags)
  87.    7. UseNuggets
  88.       (Reference: usenet)
  89.    9. FIDO's Nuggets
  90.       (Reference: fido)
  91.   10. The Hacking Review
  92.       (Reference: review)
  93.   12. Hack Surfing
  94.       (Reference: surf)
  95.   14. Commodore Trivia
  96.       (Reference: trivia)
  97.   16. ? DS, DS$: rem The Error Channel
  98.       (Reference: error)
  99.   18. The Next Hack
  100.       (Reference: next)
  101.   19. Hacking the Code
  102.       (Reference: code)
  103.  
  104. -------------------------------------------------------------------------
  105.  
  106. @(#)legal: Commodore Hacking Legal Notice
  107.  
  108. Commodore and the respective Commodore product names are trademarks or 
  109. registered trademarks of ESCOM GmbH or Visual Information Services 
  110. Corporation.  Commodore Hacking is in no way affiliated with ESCOM GmbH 
  111. or Visual Information Services Corporation (VISCorp), owners of said 
  112. trademarks.  Commodore Hacking is published 4 times yearly by:              
  113.                                    
  114. Brain Innovations Inc. 
  115. 10710 Bruhn Avenue
  116. Bennington, NE  68007
  117.  
  118. The magazine is published on on-line networks free of charge, and a nominal 
  119. fee is charged for alternate mediums of transmission.  
  120.  
  121. Permission is granted to re-distribute this "net-magazine" or "e-zine" in
  122. its entirety for non-profit use.  A charge of no more than US$5.00 may be 
  123. charged by redistribution parties to cover printed duplication and no more
  124. than US$10.00 for other types of duplication to cover duplication and media
  125. costs for this publication.  If this publications is included in a
  126. for-profit compilation, this publication must be alternately available
  127. separately or as part of a non-profit compilation.
  128.         
  129. This publication, in regards to its specific ordering and compilations of
  130. various elements, is copyright (c) 1995-96 by Brain Innovations,
  131. Incorporated, unless otherwise noted.  Each work in this publication
  132. retains any and all copyrights pertaining to the individual work's contents.
  133. For redistribution rights to individual works, please contact the author
  134. of said work or Brain Innovations, Inc.
  135.        
  136. Brain Innovations, Inc. assumes no responsibility for errors or omissions
  137. in editorial, article, or program listing content.  
  138.   
  139. -------------------------------------------------------------------------
  140.  
  141. @(#)info: Commodore Hacking Information
  142.   
  143. Commodore Hacking is published via the Internet 4 times yearly, and is 
  144. presented in both ISO-8859-1 and HTML versions.  This and previous issues
  145. can be found at the Commodore Hacking Home Page 
  146. (http://www.msen.com/~brain/chacking/), as well as via FTP 
  147. (ftp://ccnga.uwaterloo.ca/pub/cbm/hacking.mag/)
  148.  
  149. In addition, the Commodore Hacking mail server can be used to retrieve each 
  150. issue.  To request a copy of an issue, please send the following electronic 
  151. mail message:
  152.  
  153. To: brain@mail.msen.com
  154. Subject: MAILSERV
  155. Body of Message:
  156.  
  157. help
  158. catalog
  159. send c=hacking13.txt 
  160. quit
  161.  
  162. To retrieve a PKZIP 1.01 archive of the individual articles in Commodore
  163. Hacking, request the file c=hacking13.zip
  164.  
  165. To subscribe to the Commodore Hacking and receive new issues as 
  166. they are published, add the following command to you MAILSERV message 
  167. prior to the quit command:
  168.  
  169. subscribe c=hacking Firstname Lastname msglen
  170.  
  171. (msglen is largest size of email message in line you can receive.  Each
  172. line is roughly 50 characters, so 600 lines is about 30000 bytes.  When
  173. in doubt, choose 600)
  174.  
  175. example:
  176.  
  177. subscribe c=hacking Jim Brain 600
  178.  
  179. Although no fee is charged for this magazine, donations are gladly accepted 
  180. from corporate and individual concerns.  All moneys will be used to defray 
  181. any administrative costs, subscribe to publications for review, and 
  182. compensate the individual authors contributing to this issue.
  183.  
  184. As part of a magazine promotion, Commodore Hacking Issue #12 was 
  185. professionally laid out on printed format.  These printed copies are for
  186. sale.  
  187.  
  188. If you can not obtain Commodore Hacking through any other means and wish
  189. to purchase a copy on disk or would like to purchase the professionally
  190. printed Issue #12, please address a check or money order to "Jim Brain" 
  191. and mail to:
  192.                  
  193. Jim Brain
  194. 10710 Bruhn Avenue
  195. Bennington, NE  68007
  196.  
  197. Disk copies of each issue:                 USD$5.00
  198. Professionally printed copy of Issue #12:  USD$6.00
  199.  
  200. All prices cover only duplication and materials and include shipping in
  201. the United States.  For disk copies, please specify format:
  202.  
  203. Computer     Disk Size     Capacity   Notes
  204.                       
  205. CBM/PETSCII  5.25 inch     170 kB     1541 format
  206.                            340 kB     1571 format
  207.              3.50 inch     800 kB     1581/FD2000 format
  208.                            1.6 MB     FD2000/FD4000 format
  209. IBM/ASCII    3.50 inch     720 kB     Double Density
  210.                            1.4 MB     High Density
  211.                            
  212. Any persons wishing to author articles for inclusion in Commodore Hacking
  213. are encouraged to view the submission guidelines on the WWW
  214. (http://www.msen.com/~brain/pub/c-hacking-submit.txt) or via the MAILSERV 
  215. server (send c-hacking-submit.txt).  
  216.  
  217. =========================================================================
  218.  
  219. @(#)rch: Reading C=Hacking
  220.   
  221. Starting with Issue 11 of Commodore Hacking, the new QuickFind indexing 
  222. system is utilized to aid readers of the text version in navigating the
  223. magazine.  At the top  of each article or other important place in the
  224. magazine, a word prefixed with a special string is present.  (See the
  225. title of this article for an example.)  Throughout the magazine, if an
  226. article is mentioned, it will be followed by a reference string.  For
  227. example, if we mentioned this article, we would add (Reference: rch) after
  228. the name.  By using your favorite editor's search function and searching
  229. for the string after the word "Reference:", prefixed by the magic prefix
  230. string, will move you directly to the article of choice.  To merely skip to
  231. the next article in the magazine, search only for the magic prefix string.
  232.  
  233. Some handy indexing strings possibly not referenced anywhere are:
  234.  
  235. top      top of issue
  236. bottom   bottom of issue
  237. contents table of contents
  238. legal    legal notice
  239.  
  240. For those with access to a UNIX system, the command "what" can be
  241. run on the issue, which will result in all the article titles being
  242. printed.
  243.  
  244. A slightly different magic prefix string "@(A)" is used to delimit
  245. sub-topics or main heading in articles.  The text after the magic string
  246. differs depending on article content.  For the Input/Output column
  247. (Reference: io), the text after the magic prefix will either be "c" for 
  248. comment, or "r" for response.  In features and columns, a number after
  249. the prefix indicates the ordinal of that heading or sub-topic in the
  250. article.  If a specific sub-topic is referenced elsewhere in the article,
  251. a sub-topic reference will be indicated.  A reference to "@(A)r" would
  252. be written as "(SubRef: r)".
  253.  
  254. As time goes on, the role of this indexing system will be expanded and
  255. changed to ease navigation of the text version, but minimize the clutter
  256. added by these extra items.
  257.  
  258. =========================================================================
  259.  
  260. @(#)editor: The Hacking Editor
  261.             by Jim Brain (j.brain@ieee.org)
  262.  
  263. Sometimes, it's important to look back and see how far we've come.  
  264. The following story comes to mind:
  265.  
  266. A young boy sits in the living room and flips earnestly through a 
  267. Montgomery Wards catalog looking for some item.   The year is 1983.
  268. At last he finds the item and presents the book to his father, who 
  269. is reading a periodical in his easy chair.  "Dad," the boy begins,
  270. "I want to buy one of these with my savings."  The father, startled
  271. upon hearing of such a prospective purchase, looks up and reaches for
  272. the catalog.  "What is it you want to buy?" he asks.  "That video game
  273. on the top of the page is what I want," the boy explains.  The father
  274. looks at the pertinent page and notices a glossy picture of an Atari 
  275. VCS2600 console system, complete with options.  Frowning, the father
  276. raises his head and look in the boy's eyes.  "Son," he starts, "I am
  277. not going to let you buy one of these video game systems.  All they are
  278. good for is playing games, and that's too much money to spend to buy a 
  279. game."  The boy protests, stating that "all his friends" own one and
  280. that it the "thing" to own today.  The father, known for being stubborn,
  281. refuses to budge on the issues, but concludes the exchange by handing the
  282. catalog back and saying, "If you want to buy a machine that plays games, 
  283. buy one of those new computer systems.  That way, you can play games with
  284. it and also use it for other things when the games get old and boring."
  285. The boy takes back the book and sulks for a while as he flips through the
  286. pages.  As the hurt wears off, he notices a section near the video console
  287. page that shows off those new computer systems his Dad referred to.  At 
  288. first, the kid's eye is drawn to the shiny silver Texas Instruments TI-99/4
  289. computer system pictured in the catalog.  He is about to jump up and
  290. again hand the catalog to his Dad when he realizes the "new-fangled"
  291. item is priced at $322.00.  His heart sinks, for his savings account only
  292. holds a bit over $250.00 and the machine looked so impressive.  So, beaten
  293. again, the young boy flips the page and resigns himself to never owning
  294. anything "cool".  However, the next page pictures a different computer
  295. system and a quick check confirms the price is within budget: $233.00.
  296. The computer isn't as impressive looking as the TI, but the boy will not
  297. be without a "video game", and this fits the bill.
  298.  
  299. Needless to say, the computer was a Commodore VIC-20, and the boy bought
  300. a few games for the unit, including a Space Invaders clone and a Pac-Man
  301. clone.  As the father predicted, the boy lost interest in the unit after a
  302. while and packed the system away.  However, as the boy entered 7th grade, he
  303. again pulled the unit out when he learned that one of his classrooms was
  304. equipped with Commodore VIC machines.  His interest in computers as tools
  305. started there and grew with the years.
  306.                   
  307. As I finish my first year of editorship of Commodore Hacking, I am looking
  308. back at the events that have occurred in the last year and those that have
  309. occurred over the years since I first learned about Commodore computers.
  310. Commodore owners have come from 3.5kB and 22 by 23 screens with the
  311. VIC-20 to CBM machines with features like multiple megabytes of RAM, 33.6
  312. kbps FaxModems, gigabyte hard drives, 8-20 MHz operation, and a host of 
  313. other options.  No, I don't think Commodore computers can solve all the
  314. world's problems. However, they and their owners should be commended on
  315. their loyalty and dedication to the market and to the advances that have
  316. kept the machines out of closets and dumpsters.  While I won't doubt that
  317. there are more IBM PC clones in the world today, I wonder how many PC
  318. units are resting under tons of refuse in the city dump.  
  319.  
  320. Here at Hacking Headquarters, I am impressded by what we have accomplished
  321. with the publication, but I have already outlined improvements that can be
  322. made and things I didn't quite get implemented this past year.  As always,
  323. your letters and comments are always appreciated.  The publication depends
  324. on reader feedback to ensure that covers subjects of interest to the 
  325. Commodore enthusiast.  Of course, some things, like the technical focus
  326. of Commodore Hacking, define the magazine and its place among the various
  327. Commodore publications.  However, even that can be continually improved.
  328. So, as you look back on the past year of Commodore usage, take a look at
  329. our progress or lack thereof and send us a note, if only to tell us to
  330. change nothing.  Remember, we can't increase the publication's usefulness
  331. to you if we don't know where it currently falls short.
  332.  
  333. As for the boy in the above story, I think he's come a long way since that
  334. fateful day in 1983.  He no longer thinks TI's look better than CBM's.  In
  335. fact, I think he has earned an impressive reputation as a Commodore 
  336. advocate. Then again, I might be a bit biased, so you be the judge.  The
  337. boy in the story was a youngster named Jimmy.  Jimmy Brain.
  338.  
  339. Enjoy YOUR magazine,
  340.             
  341. Jim Brain (j.brain@ieee.org)
  342. editor     
  343.  
  344. =========================================================================
  345.  
  346. @(#)io: Input/Output 
  347.          
  348. Obviously, Commodore Hacking depends on the comments and article 
  349. submissions from the Commodore community to flourish.  Everyone sees the 
  350. articles, but let's not forget those comments.  They are very helpful, 
  351. and every attempt is made to address concerns in them.  Address any 
  352. comments, concerns, or suggestions to: 
  353.  
  354. Commodore Hacking 
  355. 10710 Bruhn Avenue
  356. Bennington, NE  68007
  357. j.brain@ieee.org (Internet) 
  358.        
  359. @(A)c: Hey! You Characters! Sit Down!
  360.            
  361. From: Adam Vardy (abe0084@InfoNET.st-johns.nf.ca)
  362.                          
  363. Dear C=Hacking,
  364.        
  365. In the last issue there was some source code for printing very big 
  366. numbers.  This source code is all in uppercase.  This seems to be true 
  367. whenever source code is included in the magazine.  I am wondering why 
  368. that is.  This makes it rather difficult for me to extract the source and 
  369. put it into a form that my assembler can deal with.  I can't load the 
  370. source right into Power Assembler.  It only accepts lowercase code.  It 
  371. is puzzling to me why you do this, because I would think any assembler 
  372. that accepts plain text would work this way too.
  373.  
  374. Another thing is this.  In the last issue one of the uuencoded files in 
  375. the magazine was dim4.  The source code for the included files is for the 
  376. Merlin Assembler.  OK.  So I try to read these files.  I'm having 
  377. problems with this.  If I try to More them in ACE, I can't.  It's 
  378. unreadable.  They seem to be text, but however I try to read them, I get 
  379. weird characters or other stuff.  Loading them into a word processor or 
  380. into ZED, or anything doesn't work.
  381.  
  382. I don't have Merlin.  But I would think it must have some way to save 
  383. plain text source.  That way, everyone can at least read it, right?
  384.  
  385. @(A)r: 
  386. Code is printed in the magazine as it is received by Commodore Hacking.
  387. The only formatting done to source code in articles and columns is to
  388. indent each line 3 spaces.  The source code to which you refer above was
  389. in a USENET posting and was captured from the comp.sys.cbm newsgroup in
  390. uppercase.  Our theory is that some folks who upload code to the Internet
  391. do not do an PETSCII-ASCII translation, which would cause the effect of
  392. switching all lowercase characters to uppercase.  However, we are not
  393. certain that there all assemblers expect lowercase, which is why we do
  394. not try to alter case of source code.
  395.  
  396. As for your second problem, we accept part of the blame.  We are attempting
  397. to obtain allof the source code used in the publciation in ASCII or
  398. PETSCII format.  However, a number of assemblers, including Turbo-Assembler,
  399. do have an internal format that is neither ASCII nor PETSCII.  Merlin may
  400. also have such a format.  However, we are unfamiliar with Merlin, so it
  401. may not have an option to output code in ASCII or PETSCII, as Turbo-
  402. Assembler does.  Our suggestion is to contact the author of the article
  403. directly and ask for an ASCII copy of the source and accept our apologies.
  404.  
  405.  
  406. @(A)c: A Plea for Information
  407.            
  408. From: MICHAEL I DEMING <m.deming@genie.geis.com>
  409.  
  410. Dear C=Hacking,
  411.  
  412. An article or series of articles on the 80 column chip would be very helpful
  413. e.g. how to use sprites, a screen dump and other things like that. If I knew
  414. how to do this I would write the articles but I don't so I am begging for
  415. any info on this chip.
  416.  
  417. @(A)r:
  418. Always check back issues of Commodore Hacking for prior articles on topics.
  419. See Commodore Hacking Information (Reference: info) for directions on how
  420. to access back issues.  VDC information is included in Issue 1 as part of
  421. Craig Bruce's "Simple Hires Line Drawing Package for the C128" and as part
  422. of Craig Taylor's "An In-Depth Look at the 8563 Video Chip on the C= 128" in
  423. issue 2.  As for the other topics, other articles in Commodore Hacking touch
  424. on those issues, but we always appreciate new articles dealing with these
  425. topics.
  426.  
  427. @(A)c: All I Can Say is Wow!
  428.            
  429. From: George Szaszvari <gsz@dial.pipex.com>
  430.  
  431. In Commodore Hacking #13 Preface:
  432.  
  433. >Whew! Folks, here is the long awaited Issue #13 of Commodore Hacking.
  434. >Hacking Headquarters has produced an issue overflowing with technical
  435. >articles sure to satisfy even the most discerning Commodore enthusiast.  
  436. >In fact, this issue is OVERFLOWING with 384 kB of material, so empty out
  437. >that mailbox.  Here it comes...
  438.  
  439. Yeah, a real BUMPER issue, thanks!
  440.  
  441. @(A)r:
  442. Well, the size is a both a blessing and a curse.  While we are happy about
  443. the number and diversity of articles, we know there are those who can't
  444. handle a large issue like #13, so we are trimming the size a bit from #14.
  445. However, thanks for the comments.
  446.  
  447. @(A)c: Speaking of Kudos!
  448.            
  449. From: Brett Tabke
  450.  
  451. Dear C=Hacking,
  452.  
  453. Thank you!  One of, if not THE, best issues yet!
  454.       
  455. I can't thank you enough for all the work you've done here Jim.
  456. Between Hacking, The FAQ, and the CBM product documetation, you have
  457. put out more valuable information in 6 months than most of the pay
  458. magazines to in their lifetime.  The CBM products listing is a rare
  459. treasure that every CBM owner should take time to read.
  460.  
  461. @(A)r:
  462. We don't know what to say.  We're just happy that everyone stood by us
  463. during the move and the delay in getting #13 out.  By th way, for those who
  464. have not seen.  The CBM Products List to which Brett Tabke refers is 
  465. available as "cbmmodel.txt" on the MAILSERV and through the WWW.
  466. (http://www.msen.com/~brain/pub/cbmmodel.txt)  If you prefer to wait, an
  467. updated copy will be presented in Commodore Hacking #15.
  468.  
  469. @(A)c: Who's Got the Right Copyright?
  470.  
  471. From: Ruth Hackley (fgm@rosenet.net)
  472.  
  473. Dear C=Hacking,
  474.  
  475. I am Ruth Hackley, Ron's wife, and newsletter editor for the L.C.C.U.G. in 
  476. Eugene. Are there any portions of C=Hacking that can be used in the 
  477. newsletter.  We plan to provide the magazine on disk to our library as
  478. well.
  479.  
  480. @(A)r:
  481. The entire publication can be redistributable as a complete work, as
  482. explained in the Commodore Hacking Legal Notice (Reference: legal).  As
  483. well, individual articles can be reprinted with permission from the author
  484. of the article.  Commodore Trivia is a special case.  Permission has been
  485. given by the author to reprint Commodore Trivia in newsletters and
  486. publications, just as _Commodore World_ and this publication do.
  487.  
  488. @(A)c: A Little Lacking
  489.            
  490. From: Scott Brockway <fungus@eskimo.com>
  491.  
  492. Dear C=Hacking,
  493.  
  494. I thought the magazine was sort of a transactor replacement. When I 
  495. downloaded issue 12 of C=Hacking I was not just a bit disappointed. I 
  496. like all the technical stuff and now I fear the mag is no longer for me. 
  497.               
  498. Hey C=H, Put the code back in!
  499.  
  500. @(A)r:
  501. We are sorry you felt this way.  It was not, nor is it currently, our 
  502. intention to leave technical readers without articles of interest.  We ask
  503. that you take a good look at the magazine.  Others have initially thought
  504. the magazine lacked technical content, but later determined that the style
  505. of some articles had changed and the technical articles were separated by
  506. a few less technical offerings.  However, be aware that due to the time and
  507. space constraints we are trying to fit Commodore hacking in will reduce the
  508. number of technical articles by 1 or possibly 2 each issue over the old
  509. issues. Also, some technical articles do not contain any code pieces.
  510.  
  511. In the case of Issue 12, we were forced to redo the issue after an important
  512. technical article from a semi-regular writer did not appear.  The resulting
  513. rework might have shown through.  We hope Issue 13 provided enough 
  514. technical content.  Our most technical readers might find the current 
  515. issue a bit light on content, due to problems associated with Commodore 
  516. Hacking's recent relocation efforts.  We ask that the technical readers 
  517. bear with us as we ramp up in our new location.  
  518.  
  519. One of our continual problems, and one of Craig Taylor's (the previous
  520. editor) as well was finding quality technical articles to publish.  One way
  521. to solve the problem is to delay the publication date, a tactic Craig might
  522. have used.  However, we are trying to get back on a stable schedule.  So,
  523. if you are up to it, write up a technical piece for inclusion in the next
  524. issue.
  525.  
  526. @(A)c: A Bit of Their Own Medicine
  527.            
  528. From: wanderer_rtc@usa.pipeline.com (R. T. Cunningham)
  529.  
  530. Dear C=Hacking,
  531.  
  532. I just read CHacking #13 and was very impressed with the amount of work 
  533. put into it.  While I was reading the HTML tutorial, I came to a
  534. not quite brilliant idea.                       
  535.  
  536. While working on an HTML viewer, take time to see if you can work standard
  537. C/G viewing.  I would love to do up a bunch of web pages using C/G with the
  538. familiar disclaimer up on top, previously posted by someone else and
  539. plagiarized by me, <best viewed using a Commodore 8 Bit Computer>.  This
  540. would please quite a few people (besides me of course).  Who says we have
  541. to be able to see 256 colors! 
  542.  
  543. @(A)r:
  544. Oh, do we detect a bit of revenge here?  I am sure Jim Brain can arrange C/G
  545. graphics in the HTML viewer he is working on, but we can see a problem:
  546.                                            
  547. The eventual goal of the HTML viewer is to grow the application into a 
  548. full fledge WWW Browser.  If a site uses C/G graphics exclusively, the 
  549. large number of Commodore enthusiasts that view WWW sites with non-CBM
  550. graphical browsers will not see the C/G graphics.
  551.  
  552. In addition, some would-be Commodore enthusiasts who explore these C/G
  553. graphics enabled sites might leave thinking we are snobs and never return.
  554. We don't need that.
  555.  
  556. We think a slightly altered suggestion is better.  When designing the 
  557. "<IMG>" tag in he HTML viewer, allow it to understand the optional 
  558. attribute "CBMSRC".  That way, a Commodore site can safely display graphics
  559. to non-CBM browsers and still put the "Best Viewed with a C64" on the 
  560. page.  All the graphics on the page would then be specified by an image tag
  561. looking like:  <IMG SRC="junk.gif" CBMSRC="better.cg">.  The CBMSRC attribute
  562. could then be used on a CBM browser to display the alternate C/G graphic.
  563. A non=CBM browser would ignore the CBMSRC attribute, and a tag like:
  564. <IMG CBMSRC=...> would be ignored by the browser as well, since it contains
  565. no SRC attribute.  And, best of all, if you really wanted to keep the 
  566. Netscape browsers out, simply put <IMG SRC="better.cg">.  
  567.                 
  568. @(A)c: UU what?
  569.            
  570. From: Cameron Kaiser <ckaiser@sdcc13.ucsd.edu>
  571.  
  572. Dear C=Hacking,
  573.  
  574. I noticed that the last C-Hacking had a number of uuencoded
  575. files concatenated to each other. This presents a problem in unix
  576. because a number of crufty uudecoders don't recognize them together
  577. (only the first one). I have made a PERL script that folks can use to
  578. fix this.  I'll leave it in
  579. ftp.armory.com/pub/user/spectre/UNIX/multiuu.pl
  580.  
  581. @(A)r:
  582. We appreciate the utility.  If someone wants to take advantage of this
  583. helpful utility, simply FTP the file to your local UNIX account and execute:
  584. chmod u+x multiuu.pl
  585. Then you should be able to uudecode multiple part files with this program.
  586.  
  587. @(A)c: Comfortable Reading
  588.  
  589. From: rbthomas@freenet.edmonton.ab.ca
  590.  
  591. I have d-loaded a few issues of C= Hacking and converted them to GEOS and 
  592. looked at them with geoWrite but that is a clumsy process.  Also, I 
  593. understand some of the issues have program files in them and these need 
  594. to be extracted for use.  How does a person go about this?
  595. Thanks in advance for any help you can offer.
  596. I have a 1581 and an FD-2000 drive so the space isn't a problem with 
  597. storing the file.  I would like to read it in comfort also.  TWS won't 
  598. handle it. 
  599.  
  600. @(A)r:
  601. To help people who can't handle the large size of Commodore Hacking, 
  602. each issue is now available as an archive of individual articles and already
  603. decoded executable files.  Commodore Hacking Information (Reference: info)
  604. has information on how to obtain and dowload the archive files.
  605.  
  606. =========================================================================
  607.  
  608. @(#)news: Newsfront
  609.  
  610. @(A): Commodore Hacking CANCELED!
  611.  
  612. As many know, one of the distribution mediums for Commodore Hacking is
  613. USENET, which is a services that operates primarily on the Internet.
  614. After dutifully "posting" Issue #13, Hacking Headquarters was informed
  615. that the posting had been "canceled".  Since normally only the original
  616. poster can delete or "cancel" a posting, we were alarmed.  The culprit
  617. turned out to be a automated program that had been installed on USENET
  618. since Issue #12 was published.  The program, called a "cancel robot" or
  619. "cancelbot" for short, had been created by an individual and installed
  620. on one USENET node.  This specific cancelbot watches for large postings
  621. to non-binary newsgroups (newsgroups that do not have "binary" or 
  622. "binaries" in their names) that contain large UUencoded binary files.
  623. It then "forges" a cancel message by masquerading as the original poster.
  624. Since USENET contains very little security, this notion of "forging"
  625. postings can be done quite easily.  
  626.  
  627. Without detailing the technical side of USENET, suffice it to say that
  628. a posting from one site immediately begins its journey to all other sites
  629. on USENET, being replicated along the way.  The cancelbot canceled the 
  630. posting immediately after it showed up on its server.  The cancel message
  631. then began its journey to each server, canceling the article at each site.
  632. Given the propogation delay of USENET, the posting was up long enough for
  633. some readers to acquire it, but not everyone.  Therefore, a pointer to
  634. the location of the issue was posted later.
  635.  
  636. Along with the pointer posting, Commodore Hacking asked the USENET newgroup
  637. comp.sys.cbm how it should ahndle the situation.  We offered three
  638. suggestions and asked for comment.  They were:
  639.  
  640. 1. Request an exclusion for the publication from the cancelbot 
  641. 2. Publish only a pointer to the location of the new issue.
  642. 3. Publish the issue stripped of UUencoded binary files.
  643.  
  644. Suggestions 1 and 2 received an equal number of votes, with suggestion 3
  645. receiving a couple of votes and 1 person voting to split the issue into
  646. multiple parts.  Needless to say, the issue is still undecided.
  647.  
  648. Therefore, for the current issue, we have requested an exclusion from the
  649. USENET cancelbot.  However, since most readers can now access the 
  650. publication via the World Wide Web, Electronic Mail, and FTP, we are
  651. considering publishing only an announcement in the future.  The
  652. announcement will highlight the newest issue and detail where to obtain
  653. it.  
  654.  
  655. Some of the survey respondents mentioned that a few readers may only have
  656. access to USENET as a means of receiving the magazine.  If you are one of
  657. those folks, PLEASE WRITE US!  We are continuing to post the entire issue
  658. on USENET for your benefit and may not continue to do so if we don't hear 
  659. from you.  The postal mail address is located in this issue (Reference:
  660. legal).  If Commodore Hacking does not receive any aformentioned letters
  661. or objections, we will consider posting only new issue announcements in
  662. the future.  Doing so would relieve some burden on the USENET system,
  663. which was really not designed to handle a posting of C=Hacking's size.
  664. If you have any questions about the potential impact of this change,
  665. please mail us at Hacking Headquarters.
  666.      
  667. @(A): The The Underground Went South!
  668.  
  669. Shortly after the release of Commodore Hacking #13, Underground Magazine
  670. editor Scott Eggleston informed his subscribers that changes in his life 
  671. had forced him to cut back on the time devoted to publishing, and that he
  672. was merging The Underground with the newly announced LOADSTAR LETTER
  673. commercial publication.  As reported in the last issue, Scott will co-
  674. edit the new expanded LOADSTAR LETTER with Jeff Jones and unfilled 
  675. Underground subscriptions will be filled with LOADSTAR LETTER 
  676. subscriptions on a 1 for 1 basis. 
  677.  
  678. @(A): Get Yer QWKRR128 5.0! Read All About It!
  679.   
  680. In Commodore Hacking #13, Gaelyne Gasson (formerly Gaelyne Moranec), 
  681. described how to read Internet electronic mail offline by using an 
  682. offline mail reader like QWKRR128.  Hot on the heels of that article,Rod 
  683. Gasson has announced the availability of a beta of version 5.0 of the 
  684. QWKRR128 software.  Available to all registered users of QWKRR128, the 
  685. beta includes a number of enhancements and bug fixes, including:
  686.  
  687. 1.  Supports full 255byte character sets.
  688. 2.  Reads messages of ANY length (including the ability to print, export, 
  689.     or small.dat them).
  690. 3.  Separate VIP & TWIT lists.
  691. 4.  UUdecodes messages of any length as long as the UUencode is in a 
  692.     single message. (It won't decode if the file is split over several 
  693.     messages).
  694. 5.  Decodes MIME messages  (Base64).   Same restriction as UUdecodes.
  695. 6.  Added keyboard tables so it can be configured to 'international 
  696.     standards'.
  697. 7.  Updated the 'auto-netmail' routines to include Internet Email as well 
  698.     as fido netmail.
  699. 8.  Improved the address book so it will handle both the fidonet format 
  700.     addresses and email style addresses.
  701. 9.  Added the ability to ATTACH files to a message or reply. These 
  702.     attaches are limited in length to about 8megs (the max that the QWK 
  703.     format can handle).
  704. 10. Improved the routines to detect a valid Q.NDX file (the name of the 
  705.     new QWKRR index file).  This means these no longer have to be manually 
  706.     scratched prior to reading a new mail packet.
  707. 11. Added code so that you no longer have to quit QWKRR in order to read 
  708.     a different mail packet.
  709. 12. Improved the macros so that whole words can be used as a 'trigger'. 
  710.     This can be used as a 'simple' spell corrector. (eg, a macro such as 
  711.     "Ismeal=Ismael" will ensure that you'll never transpose the "a" and "e" 
  712.     in Ismael again.
  713. 13. Added a 'scrap macro' that can be defined and used while in the 
  714.     editor itself, without the need to add it to your macro file).
  715. 14. Added code so that quote initials can be changed 'on the fly' (This 
  716.     is useful when quoting from Email messages where the default initials are 
  717.     often meaningless).
  718. 15. Added time/date stamping to the zipped REP packets. (Some BBS's 
  719.     didn't like having the same date/time stamp on all mail packets).
  720. 16. Improved access speed by about 3 times for Ramlink users.
  721. 17. Improved tagline handling. You can have up to 10,000 taglines in one 
  722.     category. Tagline files are now numbered from .000 to 999.
  723. 18. Several cosmetic changes and bug fixes.
  724.  
  725. The new beta version is available from the 221b Baker Street BBS in the 
  726. US and GEOZ BBS in Australia and at:
  727.  
  728. ftp://ccnga.uwaterloo.ca/pub/cbm/INCOMING/telecomm/qwkrrv5b.lzh
  729. ftp://hal9000.net.au/pub/cbm/qwkrr/qwkrrv5b.lzh
  730.  
  731. More complete information is available at:
  732.  
  733. http://www.hal9000.net.au/~moranec/qwkrr10.html
  734.  
  735. @(A): Centsible Software Address Update (And Some Bad News)
  736.   
  737. The folks at Centsible Software have moved!  Well, they are still at the
  738. same location, but they have "electronically moved", to sprynet.com.  The
  739. new information appears below:
  740.  
  741.    Centsible Software 
  742.    PO Box 930
  743.    St. Joseph, MI 49085
  744.    616-428-9096 (Orders and Information 12-6pm EST)
  745.    616-429-7211 (Bulleting Board System and Facsimile)
  746.    Cents@sprynet.com (Internet Contact)
  747.    http://home.sprynet.com/sprynet/cents (WWW URL)
  748.    
  749. On a sad note, Centsible contacted Hacking Headquarters later to note 
  750. that they will soon be closing down Centsible Software.  All outstanding
  751. orders will be completed, and the closure won't happen immediately, but
  752. soon Centsible will be all but a memory.
  753.  
  754. @(A): Brace Yourself, There's More
  755.       
  756. Software Support International (SSI), has recently decided that they will 
  757. start focusing more on IBM compatible sales.  In an initial announcement, 
  758. SSI indicated that they would no longer carry Commodore products after 
  759. January 1, 1997, but later announced that they would continue to sell 
  760. products as long as existing stock holds up.  However, they will no 
  761. longer promote the CBM or Amiga product lines.  The latest catalog from 
  762. SSI will be the last to carry CBM and Amiga merchandise.
  763.  
  764. @(A): And Now for Some Good News
  765.  
  766. Arkanix Labs, a West Coast hardware and software developer, recently 
  767. announced that they had acquired Threshold Productions International. 
  768. Petar Strinic (note the 'a' in Petar) announced that the acquisition 
  769. would expand their presence in the market.  Arkanix Labs develops for the 
  770. MS-DOS and C64/128 systems, and is working on SuperCPU products.  To find 
  771. out more about the company, visit their WWW Site at: www.arkanixlabs.com
  772. or contact Mr. Strinic at: petars@arkanixlabs.com 
  773.                                            
  774. @(A): The Underground To Live on in LOADSTAR LETTER
  775.                      
  776. Scott Eggleston, editor of The Underground, has recently sent notice to
  777. all Underground readers that recent changes in his life have prompted him 
  778. to discontinue publishing of The Underground.  Determined that 
  779. Underground subscribers would not be left in the lurch, Scott has 
  780. arranged for each subscriber to receive issues of the newly launched 
  781. commercial LOADSTAR LETTER publication (See Newsfront in C=H #13).  While 
  782. the size of each issue will be smaller, the issues will arrive monthly, 
  783. as opposed to The Underground's bimonthly schedule.  
  784.  
  785. Scott, not bowing out of publishing entirely, will be brought on as
  786. Associate Editor of LOADSTAR LETTER. Subscribers should expect to 
  787. receive their first issue of the merged publication at the same time The 
  788. Underground #15 would have arrived.
  789.            
  790. As well, Scott will continue to offer back issues of The Underground for 
  791. US$2.50 per issue. The Underware disk will no longer be available from 
  792. Eggleston, although reader Tom Adams (tom.adams@neteast.com) has agreed 
  793. to copy the disks as long as he is able to do so.
  794.  
  795. If you need to contact Scott Eggleston, you may do so at: 
  796.  
  797.    egglest1@cougarnet.byu.edu                 
  798.                              
  799. @(A): Video Interface Computer (VIC) Software Available
  800.   
  801. Ghislain deBlois (dh374@freenet.carleton.ca) is currently releasing a 
  802. number of games and utilities for the avid Commodore VIC-20 user 
  803. community. Intending to release them in "cassette/disk of the month" 
  804. fashion, deBlois' first installment contains:
  805.  
  806. o Meteor Zone
  807. o Mini Assembler
  808. o Vicfall!
  809. o Ringside
  810.  
  811. Future installments promise titles like: Realms of Quest, Ice Hockey, 
  812. Bosing, and Screen Magic (a multi-color hi-res drawing program). All 
  813. programs are written for the unexpanded VIC-20 computer system (VC-20 in 
  814. Europe) to better serve VIC enthusiasts.  For more information, contact 
  815. deBlois at his electronic mail address.
  816.  
  817. @(A): Get on the Super CPU list!
  818.  
  819. Brett Tabke, of PHD Software, has created a mailing list for owners of 
  820. the CMD SuperCPU accelerator cartridge.  To subscribe to the list, send a
  821. message to:
  822.  
  823.    listserve@giga.or.at
  824.  
  825. with a message body of:
  826.  
  827.    subscribe super-cpu firstname lastname
  828.  
  829. @(A): Mailing Lists, Take Two!
  830.  
  831. For those who live in on the OTHER side of that little pond from the US, 
  832. or if you just want to keep up on the developments there, there is a new 
  833. electronic mailing list for European 64 enthusiasts.  Simply send email 
  834. to:
  835.  
  836.    listserv@lentil.demon.co.uk
  837.  
  838. with a subject of:
  839.  
  840.    MAILSERV
  841.  
  842. and a body of:
  843.  
  844.    subscribe 64EUROPE
  845.    END
  846.    
  847. The list address is: 64europe@lentil.demon.co.uk
  848.             
  849. @(A): It's Better than Novaterm 9.6!
  850.  
  851. Nick Rossi has recently announced that patch "A" for the latest version 
  852. of Novaterm (9.6) is now available.  Citing the help of early purchasers 
  853. of the product, Nick noted a list of bug fixes that have been 
  854. incorporated in the new release, including:
  855.  
  856. * Estimated file length omitted from Zmodem upload, to avoid confusing BBS's.
  857. * The "funny ASCII" problem when capturing to the buffer in ANSI or VT102 
  858.   mode has been fixed.
  859. * Due to the above, you should remove the ".opt ansi" line from all your 
  860.   scripts and recompile them.
  861. * A bug in the script function that checks for incoming strings was 
  862.   fixed.
  863. * The "Save buffer when full" option now works properly with hardware 
  864.   flow control.
  865. * A bug in the recovery function of the BBGRam driver was fixed.
  866. * A bug in one ANSI screen clearing function was fixed.
  867. * Several errors in the font81.ANSI character set were fixed: ASCII 160 
  868.   was changed to a, and the fractions &188;, &189;, and &190; were put in 
  869.   their proper order.
  870. * Typing a shift-space now sends a space, rather than the a character.
  871. * Color was added to the VT102 terminal emulation.
  872. * A real-time clock driver was added to read from the CMD SmartMouse and 
  873.   SmartTrak.
  874. * Functions in the text editor were fixed: loading/saving in the buffer 
  875.   and changing the device number.
  876.  
  877. If you have already purchased Novaterm 9.6, you can receive a free 
  878. upgrade by making a backup of your master disk and sending the master 
  879. disk back to:
  880.   
  881.    Nick Rossi
  882.    10002 Aurora Ave. N. #3353
  883.    Seattle, WA 98133  U.S.A.
  884.  
  885. Copies of the latest release are available in either 1541 or 1581 disk
  886. formats for USD$29.95 plus USD$1.50 for shipping and handling.  The 
  887. software is accompanied by a 90 page user manual.
  888.  
  889. For more information on the upgrade or Novaterm in general, visit the
  890. Novaterm 9.6 WWW Site: http://www.eskimo.com/~voyager/novaterm.html or 
  891. contact Mr. Rossi via email at: voyager@eskimo.com.
  892.                    
  893. @(A): Who's Got the Rights to the Commodore 8-bit line?
  894.  
  895. That is a very good question.  Ever since Commodore was sold to ESCOM
  896. GmbH, Commodore 8-bit users have wondered who owns the intellectual 
  897. rights to the Commodore 8-bit line of computers.  Now that ESCOM has 
  898. declared bankruptcy and initiated the sale of the Amiga line to US based 
  899. Visual Information Service Corporation (VISCorp), CBM enthusiasts are 
  900. even more curious.  The sale, evidently drawn up before the bankruptcy 
  901. declaration, would place Amiga technology into the hands of VISCorp, 
  902. which was started by several ex-Commodore engineers.  However, even if or 
  903. when the deal is finalized, who owns the rights to the CBM 8-bit line may 
  904. still be a mystery.  
  905.  
  906. @(A): New Address for Meeting 64/128 Users Through the Mail
  907.  
  908. Tom Adams, president of the mail correspondence club called Meeting
  909. 64/128 Users Through the Mail, asks that all electronic correspondence
  910. for either him or the club be addressed to:
  911.  
  912.    tom.adams@neteast.com
  913.  
  914. @(A): Complete you Transactor Collection!
  915.  
  916. Karl Hildon, one of the producers of the now-defunct _Transactor_ 
  917. publication, has announced that he is now able to provide electronic 
  918. copies of any issue of the technical magazine for USD$5.00.  Issues can 
  919. be scanned in the format of your choice, and will be electronically 
  920. mailed to the purchaser.
  921.  
  922. To order, mail Karl Hildon your Visa Card account number (visa only) and
  923. expiration date and issue number request to karl@inforamp.net.  If you
  924. need to consult an index first, there is one located at:
  925. http://vanbc.wimsey.com/~danf/cbm/transactor.idx
  926.  
  927. Mr. Hildon also mentioned that if demand warrants, he will also make
  928. available the _Transactor_ companion disks.
  929.  
  930. Also, Mr. Hildon has announced that he can also make available copies of 
  931. _The Inner Space Anthology_ for USD$20.00 or CAN$20.00.  Follow the above 
  932. directions to obtain copies of this out of print resource.
  933.  
  934. @(A): "Ultimate" Demonstration Contest Announced
  935.  
  936. Commodore Zone and Tim Wright have announced the Commodore 64 Golden 
  937. Fleece Award 1997 contest. An award of $100.00 will be presented to the 
  938. author of a demo program that represents the best in demo construction 
  939. and captures the spirit that have made demos a staple of Commodore 
  940. history. The deadline for entry is February 1, 1997, and entries should 
  941. be sent to "Binary Zone P.D.  Entries must fit on a single side of a 1541 
  942. disk, and will be judged as complete works.  Authors can enter as many 
  943. works as they wish.  Entries will be judged on programming ability, 
  944. graphics expertise, and musical content as well as overall presentation.  
  945. All entries must be previously unreleased material.  Entries should be 
  946. accompanied by contact details, and the winner will be featured in Binary 
  947. Zone P.D.  For further information, or to enter the contest, contact:
  948.  
  949.    Jason 'Kenz' Mackenzie
  950.    Binary Zone P.D.
  951.    34 Portland Road
  952.    Droitwich
  953.    Worcestershire
  954.    England
  955.    WR9 7QW
  956.  
  957. @(A): Possible Products for SuperCPU 'Puter
  958.  
  959. PROTOVISION, a game development company, is currently working on 
  960. compression tools for the SuperCPU, as well as some utilities for the
  961. new unit that are designed to take full advantage of the 16 bit 
  962. processing power of the 65C816.  In addition, the company is 
  963. investigating the possibility of developing a new graphical operating 
  964. system for the unit that will run in 16 bit mode and take advantage of 
  965. the 16 megabytes of addressing and the new opcodes available in the 
  966. accelerator. The new system will be able to multitask and offer several 
  967. graphics modes and capabilities.
  968.  
  969. @(A): New OS Version Available
  970.  
  971. For those who enjoyed reading about Andre Fachat's OS/A65 operating 
  972. system in the last issue of Commodore Hacking (Issue 13, Section: os), 
  973. Andre has updated his multitasking OS to version 1.3.10b.  New in this 
  974. version is:
  975.             
  976. * MORE AVAILABLE TASKS and STACK SPACE for systems w/o MMU (C64): New 
  977.   compile option STACKCOPY for systems without MMU. Allows more tasks and 
  978.   gives each task more stack space. 
  979.   
  980. * new 9600 baud RS232 driver for C64! (see comp.sys.cbm FAQ)
  981.  
  982. * new 6551 ACIA driver for the C64 (connected to IRQ line)
  983.  
  984. * new 16550A UART driver for all supported machines!
  985.  
  986. * New GETB and PUTB kernel calls, to get and put a whole data block from 
  987.   and to a stream. It is used by the FSIEC filesystem currently. 
  988.  
  989. * Better NMI handling: 
  990.   New CTRLNMI kernel call, and modified SETNMI call. SETNMI now sets the 
  991.   NMI routine address, and enables NMI routine chaining. There also must be 
  992.   a link to a control routine that can enable and disable the NMI line. 
  993.   Therefore FSIEC and FSIBM now call CTRLNMI to switch the NMI on and off 
  994.   around their time critical regions. 
  995.  
  996. * Introduced return code to device IRQ routines. This allows to return 
  997.   from the IRQ routines prematurely, if one IRQ routine signals that it has 
  998.   removed an IRQ source (if SYSINPORT is not available). 
  999.  
  1000. It is available on the World Wide Web at:
  1001.           
  1002.    http://www.tu-chemnitz.de/~fachat/csa/
  1003.  
  1004. @(A): Current Releases for the Commodore from CWI
  1005.  
  1006. Computer Workshops, Inc., is currently distributing NewView, an image
  1007. effects generato, and HyperLink, a hypermedia authoring system. More
  1008. information on these titles and their upcoming 3D Game, "Nether", are
  1009. available at:
  1010.       
  1011.    http://www.armory.com/~spectre/
  1012.  
  1013. @(A): Commodore Hacking Selected for Inclusion in PC Webopaedia
  1014.               
  1015. Sandy Bay Software, Incorporated has selected Commodore Hacking's
  1016. World Root WWW Site to be included in a virtual encyclopedia of WWW 
  1017. sites.  Visit the PC Webopaedia at:
  1018. Dear Webmaster:
  1019.  
  1020.    http://www.sandybay.com/pc-web
  1021.  
  1022. @(A): LOADSTAR's Pass Around Issue is Available
  1023.  
  1024. J and F Publishing has announced that LOADSTAR Issue #148 has been
  1025. selected to be a "pass-around" issue.  This issue is available for free
  1026. and is intended to allow non-subscribers a chance to see what is in the 
  1027. disk-based monthly magazine.  Issue #148 is available at:
  1028.  
  1029.    http://www.loadstar.com/pass.html
  1030.  
  1031. Wraptorized and ARCed versions are available for 1541 and 1581, while
  1032. Compression Kit, .d64 images, and PKZip version are available in 1541 
  1033. format.
  1034.  
  1035. Screen shots of the issue are available at:
  1036.  
  1037.    http://www.loadstar.com/148contents.html
  1038.  
  1039. The issue is packed, filling over 700 kB, and includes articles like:
  1040.  
  1041. * How to Copy Files
  1042. * Super Snapshot Bypass Switch Installation
  1043. * 'Lectronic Formulator
  1044. * Directomeister II Directory Editor
  1045. * Menu Toolbox III, as published in C=Hacking #14 (Reference: toolbox)
  1046. * GEOS Fonts (Ronda and Triana)
  1047.  
  1048. Download the issue today, and share it with your friends and user groups.
  1049.  
  1050. @(A): Hey! It's the Commodore Man!
  1051.  
  1052. If you're in the market for some used equipment or require some service
  1053. on your CBM system, contact:
  1054.  
  1055.    Jon Searle, The Commodore Man
  1056.    Service and Software
  1057.    1307 Golfview Drive
  1058.    Grain Valley, MO  64029
  1059.  
  1060. Jon offers over 1000 titles, documentation, books, magazines, and 
  1061. hardware. A catalog can be requested for a nominal fee.  Until December 
  1062. 31, 1996,  Jon is offering a "Buy 3, Get 1 Free" offer on software 
  1063. titles.  Write for details and restrictions.
  1064.  
  1065. @(A): GEOS III, Revenge of the 8-bit GUI!
  1066.  
  1067. Maurice Randall, creator of such GEOS offerings as GeoFAX and many 
  1068. utilities for CMD, has announced that he is formally working on GEOS 3.0.  
  1069. He has successfully reverse engineered GEOS 2.0 and is now working to 
  1070. incorporate changes into the OS that will provide more seamless support 
  1071. for peripherals announced since the release of GEOS 2.0.  Among the 
  1072. changes is a number of bug fixes to the original GEOS OS code and some 
  1073. enhancements to allow shortening of the OS code or faster execution.  A 
  1074. time or formal name for the project has not been determined, but the new 
  1075. version will require some type of RAM expansion.
  1076.  
  1077. At a recent Lansing Area Commodore Club meeting, Maurice demonstrated 
  1078. some of the changes that may show up in the final GEOS 3.0 system.  They 
  1079. include:
  1080.                      
  1081. o Removal of 15 file limit in file lists.
  1082. o Ability to use CMD devices in Native Mode.
  1083. o Ability to read CMD FD DD disks in a 1581 drive.
  1084. o Ability to create CMD Native partitions on a RAMDisk.
  1085. o Ability to read/write MS-DOS floppies as native files on 1571,81, or 
  1086.   FD.
  1087. o Ability to read single bytes from drives.
  1088. o Ability to utilize 4 separate disk drives simultaneously
  1089.  
  1090. These changes are incorporated in new disk driver code that can be used
  1091. by any existing GEOS application.  The new drivers utilize a radically
  1092. different Configure program with more options than the current setup
  1093. application of the same name.
  1094.  
  1095. Maurice stated that he will likely take a half-written desktop 
  1096. replacement he has written titled "Dashboard" and develop it into what 
  1097. will become the replacement for DeskTop in GEOS 2.0.
  1098.  
  1099. Although the new system will require the use of RAM expansion, the system
  1100. will not require a SuperCPU or other speed enhancement unit to operate.
  1101.  
  1102. @(A): Explosive Commodore Surfing Power
  1103.  
  1104. Brain Innovations, Inc., recently announced that they had revamped the
  1105. popular WWW Links pages on Jim Brain's Commodore home Page.  The new 
  1106. site, completely automated, offers many advantages over the older set of 
  1107. pages. The new site, called CaBooM!, can display links in either HTML 
  1108. TABLE or UNORDERED LIST format, include or exclude graphics, and include 
  1109. or exclude link descriptions.  The site is organized into categories and 
  1110. sub-categories.  Surfers can automatically add new sites to the system 
  1111. and specify which categories fit the site.  Users can also update sites 
  1112. at a later date by specifying their user ID and password used to create 
  1113. the site.  New and updated entries are identified with appropriate 
  1114. comments, and sites can be listed in multiple categories.  Check out the 
  1115. new system at:
  1116.  
  1117.    http://www.msen.com/~brain/cbmlinks/index.html
  1118.                    
  1119. =========================================================================
  1120.  
  1121. @(#)trick: HEAVY MATH - Part  1: Introduction to Linear Programming (LP)
  1122.            by Alan Jones (alan.jones@qcs.org)                        
  1123.  
  1124. This article describes the Linear Programming problem.  LP software is 
  1125. being developed for the C64 to emphasize that the C64 is capable of 
  1126. solving HEAVY MATH problems.  It describes some of the C64 program design 
  1127. issues and gives readers an opportunity it influence the development of 
  1128. the software. 
  1129.  
  1130. @(A): Introduction
  1131.       
  1132. Linear Programming, LP, is the simplest type of constrained numerical 
  1133. optimization problem.  It's simplest (standard) form is: 
  1134.  
  1135.      max P = c'x 
  1136.  
  1137.      s.t. Ax  = b 
  1138.            x >= 0 
  1139.  
  1140. That is, we want to find the solution vector x which maximizes the 
  1141. function P, which is a linear combination of elements of x, while 
  1142. satisfying the linear equation Ax = b, and with each element of x >= 0.  
  1143. A is a matrix with typically more columns than rows.  The maximization 
  1144. problem itself is easy, except for the inequalities and determining which 
  1145. elements of x are fixed at a bound and which are free. 
  1146.  
  1147. Assume x is a vector of 20 variables and we have 10 equality constraints 
  1148. making A a 10 by 20 matrix.  Solving the problem involves choosing 10 of 
  1149. the variables to be bound (at zero), eliminating those 10 columns from A 
  1150. and solving the reduced linear system, say B*xb = b, for the other 10 
  1151. elements of x, xb.  Then sort through the solutions to find the feasible 
  1152. solutions that satisfy all of the constraints, x >= 0, and chose from  
  1153. them the solution that will maximize the function P.  Taking 20 columns 
  1154. of A 10 at a time we will have 184,756 solutions to solve and evaluate! 
  1155.  
  1156. @(A): LP Development
  1157.           
  1158. LP is an important problem that requires a computer and clever algorithms 
  1159. to solve non-trivial problems.  The development of LP algorithms 
  1160. parallels the early development of computers.  George Dantzig published 
  1161. his first paper on his simplex method in 1947.  LP problems have long 
  1162. been studied in mathematics, economics, and business fields, but the 
  1163. simplex method and the computer were the big breakthroughs.  Just imagine 
  1164. the problem of allocating and distributing limited resources to millions 
  1165. of soldiers in WW II.  There are many types of problems that can be 
  1166. solved as LP problems, and some have specialized algorithms for their 
  1167. efficient solution. 
  1168.  
  1169. @(A): LP Examples
  1170.  
  1171. The inequality constraint occurs naturally. Many processes are 
  1172. irreversible. For example you can burn fuel in rocket at a positive fuel 
  1173. flow rate to produce thrust, but you can't unburn the exhaust to refill 
  1174. the tanks. A table leg can push on the floor but not pull (unless 
  1175. bolted). A rope, cable, or chain can pull but not push. You can't buy or 
  1176. sell negative quantities of a new item. You can't start assembling a 
  1177. machine before the parts arrive. 
  1178.  
  1179. LP problems can also be written in more general forms.  Perhaps the most 
  1180. general is: 
  1181.  
  1182.     max P = c'x 
  1183.  
  1184.     s.t. bl <= Ax <= bu 
  1185.          xl <= x  <= xu 
  1186.  
  1187. Where bl an xl are vectors of lower bounds and bu and xu are vectors of 
  1188. upper bounds. 
  1189.  
  1190. The LP forms can be manipulated with simple algebraic operations and by 
  1191. adding constraints and "slack" variables.  Most numerical optimization 
  1192. problems are set up to minimize a cost function.  Historically, LP 
  1193. problems are set up as maximization problems.  If your function P is a 
  1194. total cost to be minimized, simply multiply the vector c by -1 and 
  1195. maximize instead.  Multiplying the i'th constraint equation by -1 will 
  1196. change the sign of all the elements of the i'th row of A, bl, bu, and 
  1197. change the direction of the inequalities, but not change x(i).  The i'th 
  1198. constraint above is actually two equations and can be written (neglecting 
  1199. the subscripts): 
  1200.  
  1201.      Ax <= bu 
  1202.      Ax >= bl 
  1203.  
  1204. To convert them to equality constraints: 
  1205.  
  1206.      Ax +  y1 = bu 
  1207.      Ax + -y2 = bl 
  1208.  
  1209. y1 and y2 are additional variables both >= 0 added to take up the "slack" 
  1210. in the inequality equations.  When the constraint is free (i.e. could be 
  1211. ignored) the slack variable is >0.  When the constraint is active, the 
  1212. slack variable is constrained to zero.  The slack variables are simply 
  1213. appended to the vector x and treated as normal variables. 
  1214.  
  1215. Lower bounds on x can be removed with a change of variable, x = y - xl, 
  1216. without adding more rows or variables. 
  1217.  
  1218.     xl <= x <= xu,  becomes  0 <= y <= xu - xl 
  1219.  
  1220. Upper bounds on x can be handled by adding slack variables.  The expanded 
  1221. problem could look like: 
  1222.  
  1223.     Ax = b 
  1224.     x + xs = xu 
  1225.     x >= 0, xs >= 0 
  1226.  
  1227. This can double the length of the x vector and add an equal number of 
  1228. equality constraints.  A fair amount of algebraic manipulation is 
  1229. possible to get a LP into the form required by the solution software.  
  1230. This can significantly increase the problem size.  Good software will use 
  1231. the more general forms of the LP program and use a more sophisticated 
  1232. solution logic instead of increasing the problem size. 
  1233.  
  1234. Mixture problems are probably the easiest to describe for illustrating 
  1235. the importance of LP.  Suppose you are producing cans of mixed nuts.  You 
  1236. want to find the percentage of each nut to mix and package at the lowest 
  1237. cost, or maximum profit.  You check the commodities prices of the various 
  1238. nuts available at different times and places.  c(i) could be the price 
  1239. per pound of each nut, i, and x(i) would be the percent of that nut to be 
  1240. mixed.  One constraint is that the percentages total 100.  The Marketing 
  1241. Department may demand no more than 25% peanuts and no less than 5% of 
  1242. Cashews, pecans, and almonds.  Each nut may be scored for crunchiness, 
  1243. and other aspects of taste to meet other constraints.  Of course no x(i) 
  1244. can be less than zero.  You can do the same thing with "real fruit juice" 
  1245. drinks.  Mix the cheapest available fruit juices while balancing 
  1246. sweetness, acidity, color, taste, and other factors. 
  1247.  
  1248. Another type of problem is project scheduling.  Suppose you are going to 
  1249. design and build a bridge, or spacecraft. You identify all of the 
  1250. tasks that must be accomplished, and then estimate their completion time 
  1251. and constraints.  E.g. task 43 can't begin until tasks 16, 17, and 41 
  1252. have been completed.  You could then set up a LP problem to schedule each 
  1253. task so as to complete the project in the minimum time.  Various other 
  1254. performance criteria can be embedded in a LP problem. 
  1255.  
  1256. @(A): Non Linear Programming (NLP)
  1257.  
  1258. LP is also a special case of Non Linear Programming, NLP.  The NLP 
  1259. problem is similar to the LP problem except that the objective function P 
  1260. and constraint equations can be nonlinear functions.  NLP is a much more 
  1261. expensive problem to solve.  An approach to solving a NLP is to linearize 
  1262. the problem at a point to get a LP subproblem.  Solving the LP gives a 
  1263. search direction for the NLP problem.  You then advance in the search 
  1264. direction until you have made sufficient improvement in the objective 
  1265. function or diverged too far from the constraints.  You then correct back 
  1266. to the constraints and linearize again.  The sequence is repeated until 
  1267. the solution is found. 
  1268.  
  1269. @(A): C64 Software?
  1270.        
  1271. Computers were not created by secretaries and typesetters.  Although 
  1272. computers can do a lot of things, they were created to do Heavy Math.  
  1273. The first electronic computer, the Attanasoff-Berry Computer, ABC, was 
  1274. built to solve systems of up to 29 linear equations, although it could be 
  1275. adapted to solve other problems as well.  The second and third, ENIAC and 
  1276. EDVAC, were intended to solve ODEs (Ordinary Differential Equations, i.e. 
  1277. computing artillery range tables), as well as more general usage.(ENIAC's 
  1278. first operational use was solving a 25 by 25 set of linear equations from 
  1279. Los Alamos to see if an atomic bomb might be feasible.  The ABC could 
  1280. have solved this problem, but it had a read/write reliability problem and 
  1281. Attanasoff was called up for other war related work instead of perfecting 
  1282. the ABC.)  And I have already discussed the LP problem. 
  1283.  
  1284. Software for the C64 has been readily available and published in the C64 
  1285. related literature for solving systems of linear equations and 
  1286. numerically integrating differential equations (4th order Runge-Kutta 
  1287. being typical).  However nothing is available or published for solving LP 
  1288. problems on a C64.  I do recall seeing a one inch ad in some Commodore 
  1289. magazines trying to sell software to solve small LP problems on a C64, 
  1290. maybe 15-20 equations, but I never read any reviews of it and I always 
  1291. suspected it to be poor software.  I intend to plug this hole by writing 
  1292. a good LP program for the C64. 
  1293.  
  1294. This is Part 1 of at least a two part series on LP for the C64.  Part 2  
  1295. will include the presentation of the C64 LP program.  I usually hate 
  1296. multi-part articles that could have been published as one large article.  
  1297. However, in this case Part 2, and indeed the C64 LP computer program, has 
  1298. not been written yet.  Part 2 will be dependent on reader feedback!
  1299. No feedback means no reader or user interest and I won't bother to submit 
  1300. Part 2.  I have not written a LP program before, or even used one much 
  1301. on other systems.  There is a very good chance that some readers will 
  1302. have experience with LP software and can offer practical suggestions 
  1303. for writing C64 LP software.  I would also like to hear from any reader 
  1304. who may have some type of LP problem that they would like to be able to 
  1305. solve, perhaps something related to a hobby or home computing application.
  1306. Also, someone may be able to point me to an ideal LP reference book or 
  1307. even provide suitable source code to examine. 
  1308.                           
  1309. Choosing a LP solution method for the C64 is not an easy task. 
  1310. Appropriate reference books and papers are hard to come by.  There is 
  1311. nothing in the CBM literature that I am aware of.  Many books have been 
  1312. published on the LP subject.  However, most are old books written for 
  1313. business students or for training clerks to solve small problems by hand, 
  1314. and they use outdated methods.  These are easily found in local libraries 
  1315. and at small colleges.  LP is still an active research area and many new 
  1316. journal articles are still being written, as well as new books.  However, 
  1317. the focus in on solving VERY large LP problems using sparse matrix 
  1318. algebra techniques, and newer methods such as Karmarker or interior-point 
  1319. methods.  There is even a LP FAQ available.  Two of the best references 
  1320. that I have found so far are: "Computer Solution of Linear Programs", J. 
  1321. L. Nazareth (1987), and "Advanced Linear Programming", B. A. Murtagh 
  1322. (1981).  The LP source codes that I have looked at were either too crude, 
  1323. suitable only for small problems, too poorly documented, or suited only 
  1324. for large problems on large computers.  This gives you some idea of where 
  1325. I am at, should you want to provide helpful feedback. 
  1326.  
  1327. Our C64 (and 128) does arithmetic slowly, but reliably, and has limited 
  1328. memory. We would not want to solve a large LP problem with thousands of 
  1329. constraints and variables on a C64 even if we could.  Still, we want to 
  1330. be able solve problems as large as practical using efficient methods.  At 
  1331. the heart of the solution algorithm we must be able to solve an n by n 
  1332. system of equations, where n is the number of constraint equations.  For, 
  1333. say n = 70, we will need 24,500 bytes to store the full matrix, leaving 
  1334. the rest for the OS/language/LP program.  The simplex type solutions 
  1335. typically require computation time = K * n~3, so we will not likely want 
  1336. to solve any LP problems on the C64 with more than 70 constraints. 
  1337.  
  1338. The desire to solve huge LP problems also motivated the development of 
  1339. sparse matrix algebra techniques.  Matrices associated with LP tend be 
  1340. very sparse.  The idea is to be able to store only the non-zero elements, 
  1341. to store them in data structures that can be used effectively by linear 
  1342. equation solvers, and  to use larger but often slower external memory 
  1343. efficiently.  These codes have a higher overhead in terms of code size 
  1344. and computation/FP multiply.  However, these codes can compute the same 
  1345. results with substantially fewer multiplies than simpler code for dense 
  1346. or full matrices.  They often perform faster overall, at least on scalar 
  1347. computers.  Our 6502 can zip through complicated data structures and ML 
  1348. code fairly fast compared to the cost of a FP multiply.  Using sparse 
  1349. matrix techniques is possible with the C64, but not required.  I think 
  1350. the complications of using sparse matrix methods is not warranted in this 
  1351. case.  Users wanting to solve large sparse problems are free to disagree. 
  1352.  
  1353. @(A): Types of LP Problems
  1354.        
  1355. There are several LP solution methods: (primal) simplex, revised simplex, 
  1356. dual simplex, primal-dual simplex, Karmarker, and others.  There are also 
  1357. many variations among these.  I have chosen the revised simplex method 
  1358. for the C64 program.  Some other choices might be better for some types 
  1359. of LP problems, and I may also write a primal-dual simplex program. 
  1360.  
  1361. In the revised simplex method, the constraint matrix A can be stored 
  1362. outside of main memory (on disk or REU) and brought in a column at a 
  1363. time. The matrix A can be stored in a sparse matrix form.  This is 
  1364. probably a good idea for our slow disk storage, but unnecessary for our 
  1365. REU storage.  A square matrix B will be based on a set of n columns of A.  
  1366. At each iteration a new column of A is chosen to enter B and an old 
  1367. column is re moved.  Each column represents an element of x and the 
  1368. objective is to get the unbound variables selected into B  with the 
  1369. remaining variables set to their limits.  At each iteration we have to 
  1370. solve many linear systems using B with different right hand side vectors 
  1371. and then update B to account for the column addition and removal. 
  1372.  
  1373. There are several ways to work with the matrix B.  B can be explicitly 
  1374. inverted.  The inverse can then be explicitly updated using the Sherman-
  1375. Morrison-Woodburry formula, or updated in product form by storing a 
  1376. sparse matrix factor that accounts for the update.  The later is 
  1377. preferred for sparse implementations, but the storage used grows with 
  1378. each iteration and eventually a new explicit inverse of B will have to be 
  1379. computed. Both methods are numerically unstable and can have excessive 
  1380. growth of roundoff errors, necessitating error checks and occasional 
  1381. reinversion. 
  1382.  
  1383. B can also be efficiently used in an LU factored form.  B = LU where L is 
  1384. lower triangular and U is upper triangular.  The updating is difficult, 
  1385. especially when exploiting sparcity and external storage.  Bartels and 
  1386. Golub (1969) developed a numerically stable way of updating the L and U 
  1387. factors that enabled L to be stored externally, with U stored in main 
  1388. memory.  Forrest and Tomlin (1972) developed a method that allows both L 
  1389. and U to use external storage.  This is the method used in most 
  1390. commercial codes for solving large LP problems.  However, it is not 
  1391. numerically stable and needs to be monitored and refactored. Sanders 
  1392. (1976) developed a variation of the Bartels-Golub method that is stable 
  1393. and allows most of U to be stored externally.  Fletcher and Matthews 
  1394. (1984) developed a stable method for updating the LU factors explicitly 
  1395. in main memory. 
  1396.  
  1397. In the Fletcher-Matthews update we have: PBQ = LU.  B is the unfactored 
  1398. matrix, P is a row permutation matrix, Q is a column permutation matrix, 
  1399. L is a unit lower triangular matrix, and U is an upper triangular matrix.  
  1400. L and U are stored explicitly (not in a factored form) in a square matrix 
  1401. B.  L and U are first formed using a normal LU factorization (Gaussian 
  1402. elimination). P is a row permutation matrix that represents the partial 
  1403. pivoting normally used to stabilize Gaussian elimination.  Q is an 
  1404. optional column permutation that represents the full pivoting that could 
  1405. be done with Gaussian elimination to get better numerical stability.  P 
  1406. and Q are completely defined by integer arrays.  In the update, one 
  1407. column of B is removed, the rest of the vectors are shifted left to fill 
  1408. the gap, and the entering vector placed in the right most column of B.  
  1409. L, U, and P are then updated to a stable factorization of the new B 
  1410. matrix. Pivoting is still required for stability, but only two adjacent 
  1411. rows can be exchanged.  This is a weaker form of stability than Gaussian 
  1412. elimination with partial pivoting.  It may be advisable to use some more 
  1413. extreme measures to assure greater accuracy, such as preliminary scaling 
  1414. of the problem (equilibration), full pivoting in the initial 
  1415. factorization, or doing a final refactorization.  Q is not changed during 
  1416. the update (no column pivoting for stability), but we will have to keep 
  1417. track of where each column of A is located in B (or the LU factorization 
  1418. of B).  The update is also cheaper when the column of B removed is 
  1419. farther to the right. 
  1420.  
  1421. I have chosen to use the Fletcher-Matthews update.  This choice is ideal 
  1422. for dense LP problems, but less so for sparse problems.  It limits the 
  1423. number of constraints that we can handle.  It also has consequences for 
  1424. other program design choices that must be made for the C64 LP program. 
  1425. Using the simple standard form keeps the program logic simple, but 
  1426. converting problems with inequality constraints and upper and lower 
  1427. bounds to standard form will make the problem size bigger.  This will be 
  1428. more expensive to solve when not taking advantage of sparcity, and make 
  1429. our size limit more significant.  I am leaning  toward solving LP 
  1430. problems in the form: 
  1431.  
  1432.     Max P = c'x 
  1433.  
  1434.     s.t.   Ax = b 
  1435.            xl <= x <= xu 
  1436.  
  1437. There are many more program design choices to make.  There are different 
  1438. strategies for selecting the entering and leaving variables (columns). 
  1439. There are different ways to pick a starting B matrix.  There are 
  1440. different ways to perform "Phase 1" of the revised simplex algorithm.  
  1441. Many of the internal tests of floating point results involve tolerances.  
  1442. These tolerances do affect the performance of the program.  However, I 
  1443. have only seen arbitrary suggested tolerances.  These tolerances should 
  1444. be determined by the floating point precision used, the problems size, 
  1445. matrix condition number, and perhaps some problem specific parameters.  I 
  1446. have not seen any numerical analyses indicating how to set the 
  1447. tolerances. 
  1448.  
  1449. I have completed the subroutines to perform the Fletcher-Matthews update, 
  1450. matrix factorization, and solving linear systems.  Your interest and 
  1451. feedback can influence other major parts of the program, or even convince 
  1452. me to use a different updating method.  Or perhaps everyone would rather 
  1453. not see the sequel?  You can reach me via e-mail at:  alan.jones@qcs.org 
  1454.  
  1455. Since I am writing this software it will be developed in the COMAL 2.0 
  1456. language, which is fast and very readable (and thus easily translated to 
  1457. other languages).  A typical commercial LP code represents about 10 man 
  1458. years of development.  The C64 software will represent perhaps 10 days, 
  1459. plus past research, or 10 weeks of part time effort, and be submitted for 
  1460. the next issue of C=Hacking.  It won't be the best software, but it will 
  1461. be good.  Over a period of perhaps a year, we can incorporate and publish 
  1462. changes (hopefully not actual bugs).  Then it can be translated be to ACE 
  1463. assembly or some other language to make it available to more C64/128 
  1464. users. 
  1465.  
  1466. @(A): Conclusion
  1467.       
  1468. The C64 LP software is being developed simply to fill an empty slot in 
  1469. C64 software.  It is also to emphasize that the C64 can indeed be used 
  1470. for HEAVY MATH, subject only to constraints of limited speed, memory, and 
  1471. software.  There is little demand for solving LP problems on a C64, 
  1472. otherwise it would have been done many times already.  This article will 
  1473. not interest many C64/128 users.  It does not even come close to 
  1474. describing how to write a working LP program.  It does describe what LP 
  1475. is and some of the issues involved in designing a LP program for the C64.  
  1476. I do thank those that read this far.  Don't forget to write. 
  1477.  
  1478. =========================================================================
  1479.  
  1480. @(#)mags: Hacking the Mags
  1481.  
  1482. Not everything good and/or technical comes from Commodore Hacking, which
  1483. is as it should be.  (We still think we have the most, though...)  Thus,
  1484. let's spotlight some good and/or technical reading from the other
  1485. Commodore publications.
  1486.  
  1487. If you know of a magazine that you would like to see summarized here, let 
  1488. C=Hacking know about it.  These summaries are only limited by Commodore 
  1489. Hacking's inability to purchase subscriptions to all the Commodore 
  1490. publications available.  We are very grateful to those publications that
  1491. send complimentary copies of their publications for review.
  1492.  
  1493. @(A): Commodore World (http://www.the-spa.com/cmd/cwhome.html)
  1494.    Although a bit late, Issue 15 made its way to our mailbox and opened
  1495.    with an apology from VP Charles Christianson detailing why the current
  1496.    issue took so long to reach subscribers.  As we suspected, it was due
  1497.    to SuperCPU shipments and general bug-swatting.  However, another factor
  1498.    that wasn't as obvious was some personnel changes in the publication.
  1499.    Gaelyne Gasson goes over the various graphics formats and how to 
  1500.    convert them to viewable formats on the Commodore. The GEOS programmers
  1501.    will appreciate Maurice Randall's article on VLIR files, and Doug Cotton
  1502.    presents Part 2 of his discussion on file transfer utilities.  The
  1503.    demo scene gets a little press with Sherry Freedline's piece on
  1504.    demos, including a section on _Driven_, reviewed below.  Commodore
  1505.    Hacking even got a mention or two in Max Cottrell's report on the
  1506.    Lansing Area Commodore Club Expo '96.
  1507.            
  1508. @(A): DisC=overy (http://www.eskimo.com/~drray/discovery.html)
  1509.    Arriving on the Internet October 1st, Issue 2 of this new publication
  1510.    maintains the level of content started in Issue 1.  We suppose it's
  1511.    too early to tell, but it looks like one will show up every 4 months.
  1512.    The issue starts with three detailed pieces on VIC video techniques, 
  1513.    including a discussion of the Super Hires FLI technique by Roland
  1514.    Toegal and 'Count Zero', a starter article on using raster interrupts 
  1515.    by Mike Gordillo and 'Dokken', and how to use simple text scroll
  1516.    routines in programs by Mike Gordillo. Steve Judd details the basics of
  1517.    using the SID chip, and Andreas Varga steals the issue with an
  1518.    interview with SID creator Bob Yannes.  The article is a must read.
  1519.    The highlights of the hardware section is a Atari 2600 cartridge
  1520.    reader for the VIC-20 by Ravid Noam and how to upgrade a Commodore
  1521.    16 to 64 kB by Martin Gierich.
  1522.  
  1523. @(A): Driven (http://soho.ios.com/~coolhnd/)
  1524.    In addition to the funky banner on Driven #15, the issue mentions
  1525.    the resurgence of the Demo Scene and congratulates all the recent
  1526.    Driven 4kB Competition entrants.  If you are interested in demos and
  1527.    what effects are possible, be sure to check out the recent entries.
  1528.    #15 details the CMD Swiftlink in an article by Perry Eidelbus.  
  1529.    Users undecided on purchasing a SL, or programmers unsure of whether to
  1530.    develop for the unit should read this piece.  In a look back, 'The Hobbitt'
  1531.    runs through the history of the NTSC demo scene.  Also, if you
  1532.    didn't get a chance to take a look at DisC=overy yet, there's an
  1533.    interview with editor Mike Gordillo in this issue.
  1534.    
  1535.    In between #15 and #16, Driven published the "Driven 4K Compo Edition",
  1536.    containing reviews and comments on the entries submitted for the recent
  1537.    Driven competition.
  1538.                                    
  1539.    Driven #16 contains a look into the world of Computer Workshops, Inc.
  1540.    (CWI) by Cameron Kaiser, as well as a detailed description of Craig
  1541.    Bruce's ACE OS, available on the Internet.  As well, there are the 
  1542.    usual notices of new demo releases and groups.  The editors remark that
  1543.    they feel #16 is the best Driven yet.  
  1544.    
  1545. @(A): LOADSTAR (http://www.loadstar.com)
  1546.    Sometimes, we read LOADSTAR purely for the entertainment factor.  And
  1547.    I don't mean the games on the disk.  In Issue 145, Jeff Jones outlines
  1548.    his top ten email pet peeves.  #145 delves into a rare topic in C64
  1549.    circles: Musical Instrument Digital Interface (MIDI).  Fender goes over
  1550.    the protocol and how it can be used with a 64/128.  On the heels of that
  1551.    article is a piece by John Serafino that creates MIDI tracks for
  1552.    your own enjoyment.  Bo Zimmerman presents a "Presenter" for LOADSTAR
  1553.    that utilizes GEOS.  In addition, Bo gives GEOS users a handy utility
  1554.    that archives files and can even create .d64 images.  To supplement
  1555.    Maurice Randall's _Commodore World_ article on VLIR files, Roger
  1556.    Detaille details the revisions in the directory that GEOS disks dictate.
  1557.    As a bonus, Issue #145 contains Driven 12, reviewed in C=Hacking Issue
  1558.    13 (Reference: mags) as well as DisC=overy #1, also reviewed last time. 
  1559.    
  1560.    Issue 146 starts off on an apologetic note, as Jeff repents for
  1561.    redistributing DisC=overy #1 not in its entirety.  It brings up an
  1562.    important point that compilations like DisC=overy and C=Hacking can
  1563.    only be freely redistributed in their entirety.  Diving into the issue,
  1564.    developers looking to design their own fonts might find use in Anthony
  1565.    Rose's Font Studio, Bob Markland's Font Viewer II, or Bob's Font Studio
  1566.    Printer.  Jeff presents his entry in the Directory Editor arena:
  1567.    DirectoMeister I.  
  1568.    
  1569.    Demo Scene folks will enjoy "Omni's First Demo" on Issue 147.
  1570.    Continuing with the video theme, Andrew Martin present Hires Sketch II,
  1571.    an art creation application.  Of interest to GEOS DTP (Desktop
  1572.    Publishing) folks is a set of two GEOPaint documents containing
  1573.    some clip-art.
  1574.                       
  1575.    As mentioned in Newsfront (Reference: news), Issue 148 has been released
  1576.    to the Commodore community as a "pass-around" issue.  Distribution is
  1577.    encouraged.  Although not technical in nature, everyone should read the
  1578.    piece describing this issue.  It gives some insight into the workings
  1579.    of LOADSTAR and its ex-parent company, SOFTDISK.  Fender Tucker shows 
  1580.    how to add a bypass switch to a Super Snapshot cartridge, while Jeff
  1581.    revamps his Directomeister I into version II.  As well, Menu Toolbox III,
  1582.    included in this issue (Reference: toolbox) is available on LS148.  
  1583.    As well, Commodore Hacking #13 is included on the 3.5" disk version.
  1584.    
  1585. @(A): The Underground
  1586.    Issue #14 is the last issue for this publication.  It has merged with
  1587.    LOADSTAR LETTER.  See Newsfront (Reference: news) for more information.
  1588.    We were hoping to get the last issue in to review it, but C=Hacking's
  1589.    recent relocation sent the issue off into never-never land.  Anyway,
  1590.    we wish Scott Eggleston and his family the best.  He will continue to
  1591.    edit LOADSTAR LETTER.
  1592.  
  1593. Other magazines not covered in this rundown include:
  1594.  
  1595. *  _64'er_ 
  1596. *  _Atta Bitar_ (_8 bitter_)
  1597. *  _COIN!_
  1598. o  _Commodore 64/128 Power User Newsletter (CPU)
  1599. o  _COMMODORE CEE_
  1600. o  _Commodore Gazette_
  1601. *  _Commodore Network_
  1602. *  _Commodore Zone_
  1603. o  _LOADSTAR 128_
  1604. o  _LOADSTAR LETTER_ (We received an electronic copy, but couldn't print it)
  1605. *  _Gatekeeper_
  1606. o  _Vision_
  1607.  
  1608. Notes on Legend:
  1609. * = We have never received an issue of this publication.
  1610. o = We have not received a new issue of this publication to review.
  1611. + = We will begin reviewing this magazine in the next issue.
  1612.  
  1613. In addition, others exist that C=Hacking is simply not aware of.  As soon
  1614. as we can snag a copy of any of these, or get the foreign language ones 
  1615. in English :-), we will give you the scoop on them.  
  1616.  
  1617. ============================================================================
  1618.  
  1619. @(#)net: The Commodore Telnet BBS 
  1620.          by Bo Zimmerman (ez13942@swt.edu)
  1621.          
  1622. @(A): Overview  
  1623.  
  1624. The following are instructions for setting up a Commodore computer as a 
  1625. telnet-able BBS.  It relies on a modem connection with a PC running LINUX 
  1626. with a telnet daemon.  The Commodore is connected to the PC via a null 
  1627. modem cable.  The LINUX box has a modified version of minicom, which 
  1628. comes with the slackware distribution (and others I would imagine), and a   
  1629. shell script, all described in greater detail below.  The essential goal  
  1630. is this:  when a user telnets to the LINUX machine and logs in as the BBS  
  1631. user, the PC will run the modified minicom, which is set up to 
  1632. communicate with the COM port connected to the Commodore.  When minicom  
  1633. starts up, it will signal the Commodore that a connection has been made  
  1634. by setting the modem port's DTR signal.  The Commodore BBS program goes  
  1635. online because the DTR line is attached to the DCD line in the cable.  So  
  1636. long as the user is still in minicom, the connection remains, and wa-la!  
  1637. A Commodore on the net!  
  1638.   
  1639. Part I  : Required Components                  (SubRef: 1) 
  1640. Part II : RS232 Adapter Instructions           (SubRef: 2)  
  1641. Part III: Setting up the LINUX box             (SubRef: 3) 
  1642. Part IV : Setting up the Commodore BBS program (SubRef: 4)
  1643. Part V  : What's missing                 (SubRef: 5)
  1644. Part VI : Credits                              (SubRef: 6)
  1645.  
  1646. @(A)1: Part I: Required Components  
  1647.     
  1648. 1) Commodore 64/128/VIC-20  
  1649. 2) Sufficient Commodore drives for your BBS software.  
  1650. 3) Commodore BBS software with DCD initiation capabilities (see part IV)  
  1651. 4) Standard RS232 null modem cable adaptor for the Commodore  
  1652. 5) PC 386 or better running Linux  
  1653. 6) Network capabilities for the Linux machine (ethernet card, PPP 
  1654.    connection,  or other connection)  
  1655.   
  1656. @(A)2: Part II: RS232 Adaptor Instructions  
  1657.   
  1658. (This is cut and pasted from some instructions I downloaded off of 
  1659. ftp.funet.fi and then modified for a standard 9 pin female COM port on a  
  1660. PC).  
  1661.   
  1662.    
  1663. USER PORT                         STD. DB9 COM              NULL DB9 COM  
  1664.                          CABLE                       CABLE  
  1665.    
  1666.    |                  +------\         |                            |  
  1667.    |                2 |       \  3     |                            |  
  1668. M -|------------------|  U1-A  O-------|- 2   TX          ----------|- 3 RX
  1669.    |                  |       /        |                            |         
  1670.    |                  +------/         |                            |  
  1671.    |    \                              |                            |  
  1672.    |   |  \                            |                            |  
  1673.    |  3|    \  4     4+------\         |                            |  
  1674. D -|---|U3-B O----+---|       \ 6      |                            |  
  1675.    |   |    /     |  5|  U1-B  O-------|- 7   RTS         ----------|- 8 CTS
  1676.    |   |  /       +---|       /        |                            |           
  1677.    |    /             +------/         |                            |  
  1678.    |                                   |                            |  
  1679.    |    \                              |                            |  
  1680.    |   |  \                            |                            |  
  1681.    |  5|    \  6     9+------\         |                            |  
  1682. E -|---|U3-C O----+---|       \ 8      |                            |  
  1683.    |   |    /     | 10|  U1-C  O-------|- 4  DTR          ------+---|- 6 DSR
  1684.    |   |  /       +---|       /        |                        |   |          
  1685.    |    /             +------/         |                        |   |  
  1686.    |                                   |                        |   |  
  1687.    |                                   |                        |   |  
  1688.    |                      /            |                        |   |  
  1689. B -|---+                /  |           |                        |   |  
  1690.    |   |           3  /    | 1         |                        |   |  
  1691. C -|-----------------O U2-A -----------|- 2   RX          ------|---|- 3 TX
  1692.    |                  \    |           |                        |   |         
  1693.    |                    \  |           |                        |   |  
  1694.    |                      \            |                        |   |  
  1695.    |                                   |                        |   |  
  1696.    |                                   |                        |   |  
  1697.    |                                   |                        |   |  
  1698.    |         /            /            |                        |   |  
  1699.    |       /  |         /  |           |                        |   |  
  1700.    | 10  /    |11  6  /    | 4         |                        |   |  
  1701. L -|----O U3-E ------O U2-B -----------|- 6   DSR         ---+  +---|- 1 DCD
  1702.    |     \    |       \    |           |                     |      |          
  1703.    |       \  |         \  |           |                     |      |  
  1704.    |         \            \            |                     |      |  
  1705.    |                                   |                     |      |  
  1706.    |                                   |                     |      |  
  1707.    |         /            /            |                     |      |  
  1708.    |       /  |         /  |           |                     |      |  
  1709.    | 12  /    |13  8  /    | 10        |                     |      |  
  1710. K -|----O U3-F ------O U2-C -----------|- 8   CTS         ---|------|- 7 RTS
  1711.    |     \    |       \    |           |                     |      |          
  1712.    |       \  |         \  |           |                     |      |  
  1713.    |         \            \            |                     |      |  
  1714.    |                                   |                     |      |  
  1715.    |                                   |                     |      |  
  1716.    |         /            /            |                     |      |  
  1717.    |       /  |         /  |           |                     |      |  
  1718.    |  8  /    | 9 11  /    | 13        |                     |      |  
  1719. H -|----O U3-D ------O U2-D -----------|- 1   DCD         ---+------|- 4 DTR
  1720.    |     \    |       \    |           |                            |          
  1721.    |       \  |         \  |           |                            |  
  1722.    |         \            \            |                            |  
  1723.    |                                   |                            |  
  1724.    |                                   |                            |  
  1725. N -|-----------------------------------|- 5    SIG GND    ----------|- 5   
  1726.    |                                   |                            |  
  1727.    |  +5V                              |                            |  
  1728. 2 -|----+------------+          +------|-  PROTECTIVE GND   --------|-    
  1729.    |    |            |          |      |                            |  
  1730.    |    |            |          |      |                            |  
  1731.    |  --+-- 0.1uF    |       -------   |                            |  
  1732.    |  --+-- 10V      |         ---     |                            |  
  1733.    |    |            |          -      |   ********************************* 
  1734. A -|----+            |                 |   *                               *
  1735.    |    |            |                 |   *    U-1    1488   RS-232 XMTR  *
  1736.    | -------         | 14 +----+ 7     |   *                               *
  1737.    |   ---           +----| U2 |--+    |   *    U-2    1489   RS-232 RCVR  *
  1738.    |    -            |    +----+  \    |   *                               *
  1739.    |                 |            \    |   *    U-3    7404   HEX INVERTER *  
  1740.    |                 | 14 +----+ 7\    |   *                               *  
  1741.    |                 +----| U3 |--+    |   *    DIODES  SIGNAL DIODES      * 
  1742.    |    |\  |             +----+  |    |   *            WILL WORK HERE     *
  1743.    |    |  \|                     |    |   *                               *
  1744. 10-|----|   |---+--------+        |    |   *    NOTE: THE RS-232 VOLTAGE   *
  1745.    |    |  /| + |        |     ------- |   *          BE APPX +/- 10 VOLTS *  
  1746.    |    |/  | --+--      |       ---   |   *          WHICH IS OK TO USE   *
  1747.    |   100uF  --+--   14 |        -    |   *          PER RS-232 STANDARD  *
  1748.    |   15V      |     +--|--+          |   *                               *
  1749.    |            |     |     | 7        |   *                               *
  1750.    |         -------  | U1  +----+     |   *********************************  
  1751.    |           ---    |     |    |     |  
  1752.    |            -     +--|--+    |     |  
  1753.    |                   1 |    -------  |  
  1754.    |                     |      ---    |  
  1755.    | 120uF               |       -     |  
  1756.    | 15V        |  /|    |             |   *********************************  
  1757.    | +||        |/  |    |             |   *                               *  
  1758. 11-|--||----+---|   |----+----+        |   * Commodore User Port to RS-232 *  
  1759.    |  ||    |   |\  |         |        |   * Adaptor designed by Stephen   *
  1760.    |        |   |  \|         |        |   * Coan, Version 2, 03-NOV-83.   *
  1761.    |        |                 |        |   *                               *
  1762.    |    --------    100uF  ---+---     |   * This general design has also  *
  1763.    |     \    /     15V    ---+---     |   * been used in other devices    *
  1764.    |       \/               + |        |   * where a negative voltage was  *
  1765.    |    --------              |        |   * not available for the RS-232  *
  1766.    |       |                  |        |   *                               *
  1767.    |       |                  |        |   * The  user port is a 44 pin    *
  1768.    |       +-------+----------+        |   * edge connector and the PC COM *  
  1769.    |               |                   |   * port is a female DB 9 (as on  *
  1770.    |               |                   |   * on a joystick)                *
  1771.    |            -------                |   *                               *
  1772.                   ---                  |   *                               *
  1773.                    -                   |   *                               *
  1774.                                        |   *                               *
  1775.                                        |   *********************************  
  1776.                                        |    
  1777.                                        |   
  1778.   
  1779.   
  1780. You'll want to follow the instructions for the NULL modem cable for the  
  1781. sake of this project, so use the pin settings on the right hand side.  
  1782.   
  1783. @(A)3: Part III: Setting up the LINUX box  
  1784.   
  1785. You should know now that if you don't have root access to the LINUX  
  1786. machine, you should give up now.  Secondly, you need to have the machine  
  1787. already configured with respect to its network hardware and the telnet  
  1788. daemon. The popular slackware distribution sets all this up during its  
  1789. installation process.  
  1790.   
  1791. The first step will be to create the above shell "new_minicom" and its  
  1792. accompanying configuration "cua0".  
  1793.   
  1794. 1. Log on as root, and enter the  /usr/bin directory.  
  1795. 2. Run minicom by entering its name followed by the name of the port  
  1796.    you'll be using.  For instance, enter:  
  1797.    
  1798.       "minicom -l -o cua0" for com port 1.  
  1799.       "minicom -l -o cua1" for com port 2.  
  1800.       
  1801. 3. Enter CTRL-A followed by 'z' to view a menu of options.  
  1802. 4. Enter CTRL-A,P for communication parameters.  You'll want the  
  1803.    parameters to be: 2400 baud, 8 bits, no parity, 1 stop bit.  Exit this  
  1804.    menu when done.  
  1805. 5. Enter CTRL-A,T for terminal parameters. ANSI, Backspace, and enabled  
  1806.    are fine settings.  
  1807. 6. Enter CTRL-A,O for configuration parameters.  Select the third option- 
  1808.    communication port setup.  Make sure the serial device reads "/dev/cua0"  
  1809.    for com port 1 or "/dev/cua1" for com port 2.  Baud/parity/bits should  
  1810.    read as you set them above.  Hardware and software flow control should  
  1811.    BOTH be turned OFF!    
  1812. 7. Exit back to the parameters menu and select "modem and dialing."  The  
  1813.    reset and initialization strings should be blank.  Auto baud detect,  
  1814.    hang-up drops DTR, and modem has DCD line should all read YES.  
  1815. 8. Exit back to the parameters menu again and hit the option "save  
  1816.    configuration as cua0" (or cua1 if you are using com 2).  
  1817. 9. Exit minicom altogether by entering CTRL-A,X.  
  1818. 10.We will make this our TEMPORARY new_minicom by entering from the  
  1819.    shell:  
  1820.    
  1821.       cp minicom new_minicom  
  1822.      
  1823. If you want to test the RS232 cable, now would be a good time.  Run  
  1824. minicom with the following options:  
  1825.  
  1826.    new_minicom -l -o cua0    (or cua1 for com port 2)  
  1827.   
  1828. The next step is to create the BBS "user."  
  1829.   
  1830. 1. Log on as root and run the program "adduser."  Call your account "bbs"  
  1831.    and give it the name "bbs." After the user is created, you should have a  
  1832.    directory called "/home/bbs."  
  1833.   
  1834. 2. Now load the file "/etc/passwd" into emacs and find the line 
  1835.    containing the information about your BBS.  The characters between the  
  1836.    first and second colons in the line are the encrypted password.  Delete  
  1837.    these characters.  Next change the default shell (the part following the  
  1838.    last colon) to point to the file /usr/bin/new_minicom -l -o cua0.  
  1839.   
  1840. 3. When complete, excepting the ID number (504), your line should look  
  1841.    identical to this one:  
  1842.  
  1843.       bbs::504:100:bbs:/home/bbs:/usr/bin/new_minicom -l -o cua0  
  1844.   
  1845.    If you are using com 2, change the shell command to read "cua1" instead  
  1846.    of cua0.  
  1847.   
  1848. The next step is a little tricky.  You'll need to make some changes to   
  1849. minicom to make it much more secure against abuse by users.  Without  
  1850. changes, the user can enter all the commands you did above!  It will be  
  1851. necessary to have extensive knowledge of C and knowledge of compiling in  
  1852. LINUX to perform these changes.  ;)  
  1853.   
  1854. Now that you're frightened, you'll be glad to know that the necessary  
  1855. files are available at:  
  1856.  
  1857.    147.26.162.107  
  1858.    
  1859. in the "lib" subdirectory.  
  1860.   
  1861. The only files you'll really need are "new_minicom", which must be copied  
  1862. to your /usr/bin directory, and the file "wb.rc" (discussed below), which  
  1863. must be copied to /home/bbs. Also available is the file "newminicom.zip"  
  1864. which contains all the modified source code.   
  1865.   
  1866. The following changes, to the best of my memory, were made:  
  1867.  
  1868. 1. All CTRL-A commands have been disabled, with the exception of CTRL- 
  1869.    A,X.  
  1870. 2. Minicom will automatically exit on the reception of the sequence CTRL- 
  1871.    A,CTRL-B,CTRL-C,CTRL-D from the modem.  
  1872. 3. Spawning out has been disabled.  
  1873. 4. The status windows have been removed.  
  1874. 5. ANSI has been made permanent.  
  1875. 6. A "busy" message for already connected processes has been added.  
  1876. 7. A "cleaning up" message for the com port has been added in the event  
  1877.    of an abnormal exit.  
  1878.   
  1879. After new_minicom is set up in the /usr/bin directory, you may think  
  1880. you're done.  Well, you almost are!  You may need to make sure there are  
  1881. no protections on the com port, on minicom, or on other necessary files.  
  1882. Do this with the "chmod" command.  You'll want to turn on read and write  
  1883. for the com port as follows:  
  1884.  
  1885.    chmod +r /dev/cau0     (or cua1)  
  1886.    chmod +w /dev/cau0     (or cua1)  
  1887.   
  1888. Read and execute abilities can be added to minicom similarly:  
  1889.  
  1890.    chmod +x /usr/bin/new_minicom  
  1891.   
  1892. Now you're done, right?  No, but the last step requires a bit of  
  1893. explanation. Our telnet session is maintained because we have an actual  
  1894. user logged on and running a program.  Should this user disconnect  
  1895. themselves from their telnet session without logging off, we are actually  
  1896. left with an open session of new_minicom still running in LINUX. Normally 
  1897. we wouldn't care, except that so long as new_minicom is running, the com 
  1898. port is protected from use, such that the system will be eternally busy!  
  1899. What we need to do then is to have a shell script, with root privileges, 
  1900. that will keep an eye on copies of new_minicom running without a telnet 
  1901. daemon connection.  The following shell script will do that.  
  1902.   
  1903. From the /home/bbs directory, create the file "wb.rc" (I call it the  
  1904. watch-boy) and enter the following lines:  
  1905.   
  1906.    set temp=1  
  1907.    while (temp=1)  
  1908.    do  
  1909.       pid=`ps -auxg | grep 'new_minicom' | grep -v 'grep' | grep 'bbs' \
  1910.       | grep '?'| awk '{print $2}'`  
  1911.       tty=`ps -auxg | grep 'new_minicom' | grep -v 'grep' | grep 'bbs' \
  1912.       | grep '?' | awk '{print $7}' | grep '?'`  
  1913.       if [ 'expr $tty : "?"' ]   
  1914.       then  
  1915.         kill -9 $pid  
  1916.       fi  
  1917.       sleep 60  
  1918.    done  
  1919.   
  1920.   
  1921. [!NOTE!:  The two lines with the backslash (\) are extensions of the 
  1922. prior lines. For instance, the characters "| awk '{print $2}'`" should  
  1923. immediately follow  the end of the line that reads "...grep '?'".  Do not  
  1924. include the backslashes!]  
  1925.   
  1926. What this actually does is to look for occurrences of "new_minicom" being  
  1927. run by a user called "bbs" in which there is no terminal connection.  It  
  1928. then kills those processes and goes to sleep for awhile before checking  
  1929. again.  
  1930.   
  1931. This file can also be downloaded from 147.26.162.107 in the "lib" 
  1932. subdirectory.  
  1933.   
  1934. Last thing to do then is to activate the watchboy by adding the following  
  1935. line to the file /etc/rc.d/rc.local /home/bbs/wb.rc &  
  1936.   
  1937. You can start up the watch boy as root without rebooting the machine,   
  1938. but the above will make sure it is started up whenever the LINUX box is  
  1939. restarted.  
  1940.   
  1941. Now on to the Commodore side.  
  1942.   
  1943. @(A)4: Part IV: Setting up the Commodore BBS program  
  1944.   
  1945. Thankfully, doing this is MUCH easier than setting up the LINUX box. The  
  1946. requirements on the Commodore end are actually very few, since what we  
  1947. end up doing is have the LINUX machine act as our modem and phone  
  1948. connection. As far as the BBS program is concerned (with few exceptions),  
  1949. it is acting completely as normal.  
  1950.   
  1951. You'll first want to select the BBS program to work with.  Make sure it  
  1952. is one that is written in BASIC so that you can modify it easily.  The  
  1953. BBS should also support ASCII, and preferably ANSI as well.  For the time  
  1954. being, ANSI is the only way we'll get any color at all out of LINUX.  The  
  1955. BBS program should support 2400 baud through the modem port.  If not,  
  1956. you'll need to lower the set baud rate in minicom above.  
  1957.   
  1958. Detecting a connection is accomplished by simply watching the Data  
  1959. Carrier Detect line on the modem port.  That will be bit 4 in location  
  1960. 56577.  When the following BASIC condition becomes true, the BBS should  
  1961. go online:  
  1962.  
  1963.    (peek(56577)and16)=16  
  1964.   
  1965. The BBS program should go online by swinging its Data Terminal Ready  
  1966. signal high.  This can be done with the following:  
  1967. poke56577,6:poke56579,6  
  1968.   
  1969. The BBS program should hang up whenever it detects the Data Carrier  
  1970. Detect line go low.  That's done with something similar to the peek  
  1971. above:  
  1972.  
  1973.    (peek(56577)and16)=0  
  1974.   
  1975. Lastly, the program will hang-up by doing two things.  The first thing is  
  1976. to tell minicom to terminate.  This is done by the following:  
  1977. print#2,chr$(1);chr$(2);chr$(3);chr$(4);  
  1978.   
  1979. Where print#2 is above you should substitute the proper modem channel for  
  1980. the number 2.  
  1981.   
  1982. The second is to drop the Data Terminal ready signal by entering:   
  1983.  
  1984.    poke56577,0:poke56579,32  
  1985.   
  1986. If the BBS program does all these things, it will perform admirably.  
  1987.   
  1988. @(A)5: Part V: What's to Come  
  1989.   
  1990. There are two current problems with this configuration for a telnet  
  1991. Commodore BBS.  One is that Commodore graphics do not work.  For a long  
  1992. time this baffled me, and I looked all over the minicom source for the  
  1993. solution.  It wasn't there.  Now I'm thinking it has something to do with  
  1994. the telnet daemon itself, which is the next place to check.  When it's  
  1995. solved, I'll let you know.  
  1996.   
  1997. The other problem concerns time lag. Normally, lag is unimportant, but
  1998. some transfer protocols are now especially sensitive to lag time.  For
  1999. this reason, along with translation problems mentioned above and the
  2000. sensitivity of minicom to its termination codes, make the operation 
  2001. of the stream transfer protocols on the telnet BBS impossible.  Perhaps
  2002. some modified uuencoding packet based protocol could be written and 
  2003. patched in to the BBS program.  If any such solution presents itself,  
  2004. it will be pursued.                             
  2005.   
  2006. @(A)6: Part VI: Credits  
  2007.   
  2008. Very few of these are my original ideas.  Special thanks to Matt Beall of  
  2009. California (mathew@cinenet.net) for most of the modifications done to  
  2010. minicom. The project itself is the brain child of Henry Knoepfle of  
  2011. Arizona, who helped me through all the linux changes.  Early in August,  
  2012. as soon as I get my own BBS program properly configured, I'll be putting  
  2013. it back up on the same machine that the ftp files are on.  Telnet to it  
  2014. and log on as user "bbs" with no password.  Good luck! 
  2015.  
  2016. =========================================================================
  2017.  
  2018. @(#)usenet: UseNuggets 
  2019.    
  2020. COMP.SYS.CBM:  The breeding ground of programmers and users alike.  Let's 
  2021. see what topics are showing up this month: 
  2022.  
  2023. @(A): To C or Not To C, That Is The Question 
  2024.  
  2025. Over the past few months, there has been some discussion of the C 
  2026. programming language, a common language used in the development of many 
  2027. UNIX, Windows, and Macintosh applications.  We're not exactly sure what 
  2028. sparked the discussion, but GNU C came up very early.  For those who 
  2029. don't know, the Free Software Foundation (FSF) is an organization that 
  2030. sponsors the creation and maintenance of many fine applications and  
  2031. utilities.  One such group of applications are known as the GNU (GNU's 
  2032. Not UNIX) applications.  Many people use the GNU utilities because they 
  2033. can be compiled and run on many different machines.  One of the more 
  2034. popular apps is GNU C, which can be run on many computer systems as well 
  2035. as create object code for all the supported environments.  The system is 
  2036. highly customizable, which explains why there was talk of both porting 
  2037. GNU C to the Commodore 64, and/or using a DOS or UNIX version of the 
  2038. compiler to create object code that would run on the C64.  The thread 
  2039. has drug on for quite a while, but seems to be winding down.  We're not 
  2040. sure there was a general consensus, but many remarked that GNU C is 
  2041. simply too large to run on a C64.  In addition, the assumptions it makes 
  2042. about the supported hardware architectures makes cross-compilation a near 
  2043. impossibility.  Still, many are searching for a way to bring ANSI C 
  2044. to the Commodore system.   
  2045.  
  2046. Success may come from CMD, as Doug Cotton mentioned that they were 
  2047. looking into a 65C816 cross compiler with the hopes of porting a small 
  2048. free C compiler to the 64 environment.   
  2049.  
  2050. @(A): The SuperCPU this and the SuperCPU that.... 
  2051.  
  2052. Now that the SuperCPU has started shipping from CMD, the newsgroup has 
  2053. been abuzz with questions and thoughts about the units.  However, it 
  2054. seems the group is always one step ahead of CMD.  Now that the units have 
  2055. started appearing on user's doorsteps, questions about the planned 128 
  2056. unit and the SCPU RamCard have dominated the topics.  The fact that the 
  2057. 64 unit actually contains 128 kB or RAM confused some folks, who wanted 
  2058. to know why they were paying for this extra RAM, and how they could take  
  2059. advantage of it now that they have it.  Then, as fast as folks described 
  2060. that the extra RAM was actually used to "shadow" the ROM so that the 
  2061. KERNAL could run at full speed, the topic switched from present RAM to 
  2062. planned RAM.   
  2063.  
  2064. Questions ranging from how much RAM would be available on the RamCard, to 
  2065. how fast the RAM could be accessed, to what style of modules could be 
  2066. used have been debated.  CMD, the developers of the RamCard, acknowledged 
  2067. that the full address space of 16 megabytes would be available on the 
  2068. unit and that they would try to provide speeds as fast as economically 
  2069. possible. CMD has also stated that they will be utilizing the same 30 pin 
  2070. SIMM technology that is used in the company's RamLink product.  Some 
  2071. Usenetters debated that 72 pin SIMMs were becoming more cost effective, 
  2072. but CMD countered that only those that upgrade to the full capacity of 
  2073. the unit would realize any cost savings.   
  2074.  
  2075. The substantial increase in power the SuperCPU provides the programmer 
  2076. brought many questions and comments on planned or potential new operating 
  2077. systems for the unit.  As of yet, none have surfaced, but only time will 
  2078. tell.  For its part, CMD has made GEOS compatibility a staple of the new 
  2079. unit, so that OS will run correctly.  At least one commercial venture, 
  2080. PROTOVISION, is allegedly planning an all GUI OS for the unit.  See 
  2081. Newsfront (Section: news) for more information.           
  2082.  
  2083. Brett Tabke, of PHD Software Systems, announced that he is busy upgrading 
  2084. his Karma assembler for the 128 to run on the new unit and praised the 
  2085. virtues of the new opcodes, modes, and options available when operating 
  2086. the unit in "Native mode."  This started some discussion on writing code 
  2087. that only runs on the new processor.  The sides were split almost 
  2088. immediately, as all noted that while the new applications would run very 
  2089. well on the SCPU, they would not run at all on a stock 64.  Proponents 
  2090. noted that new software demands the purchase of the SCPU, while purists 
  2091. maintained that that would limit the software to a small market segment.   
  2092.  
  2093. @(A): The "Virtual 1541"! 
  2094.  
  2095. Now, before you start thinking of 3-dimensional plastic cases and track 
  2096. 0 head knocking in quadrophonic sound, let's explain the topic.  Many 
  2097. users have expressed a desire to virtualize the IBM PC as a glorified 
  2098. 1541 drive with full emulation.  The closest thing as yet is the 64NET 
  2099. package, which allows you to load and save programs to the IBM PC hard 
  2100. drive like it was a regular CBM drive.  The drawback to 64NET is its non-
  2101. standard access method. Before you can access the emulated CBM drive, you 
  2102. have to load special software on the 64 and use a special user port 
  2103. cable.  So, for users who demand perfect emulation, no choices exist yet.  
  2104. The lack of options haven't dented the dreams of many who outlined the 
  2105. "technical specifications" of such a virtual disk drive.   
  2106.  
  2107. ========================================================================= 
  2108.  
  2109. @(#)toolbox: Menu Toolbox III 
  2110.              by Jeff Jones (jeff@loadstar.com)
  2111.              Copyright 1996: J and F Publishing
  2112.  
  2113. @(A): Introduction
  2114.              
  2115. This toolbox has the most versatile menu commands I've ever coded, and
  2116. will make your BASIC and ML programs scream with speedy scrolling menus 
  2117. and file selectors with multi- item selectability. That's right. I said 
  2118. scrolling! Because of its size, there are only two versions of MENU 
  2119. TOOLBOX III:  
  2120.       
  2121. Filename           SYS Location  Notes
  2122.  
  2123. MENUTOOLS 1000      4096         (Reference: code, SubRef: menucode1)
  2124. MENUTOOLS 8000     32768         (Reference: code, SubRef: menucode2)
  2125.                                    
  2126. These are the optimal locations for BASIC. It's 8K (33 blocks) in length,
  2127. but your programs will be much smaller, and have access to RAM under ROM
  2128. for array, screen and menu storage. You won't suffer for memory.
  2129.  
  2130. There are four types of menus: 
  2131.  
  2132. o Custom Item Menus
  2133. o File Requestors
  2134. o Screen Menus
  2135. o Instant Pages (from BASIC only)  
  2136.         
  2137. @(A): ML and Compiler Users
  2138.  
  2139. You usually can't use SYS 32768,1,2,3,4,5 from ML or compiled programs so
  2140. you'll have to POKE the parameters into a location and then tell the
  2141. toolbox where to get the parameters. You tell MENU TOOLBOX II where to find
  2142. the parameters by loading the .X and .Y registers with the low and high
  2143. bytes of the location and then SYSing. From BASIC, the .X register is
  2144. location 781 and the .Y register is 782. Here I'll use $033C (+828) as an
  2145. example. The high/low bytes for location 828 are 3 high and 60 low. The
  2146. following BASIC example of the lattice command works equally well as BASIC
  2147. or compiled. 
  2148.  
  2149.    poke828,x1
  2150.    poke829,x2
  2151.    poke830,y1
  2152.    poke831,y2
  2153.    poke832,t1
  2154.    poke833,t2
  2155.    poke834,c1
  2156.    poke835,c2
  2157.    poke781,60
  2158.    poke782,3
  2159.    sys32768+102
  2160.  
  2161. This may look slow, but in compiled programs, POKE commands are executed
  2162. at near ML speeds. If there is a chance that you're going to compile your
  2163. program, you may want to use the ML/compiler protocols from the start. It's
  2164. heck converting a program. I know (Directomeister).
  2165.  
  2166. ML programmers can embed parameters within their programs. It's actually
  2167. easier from ML than compiled: 
  2168.  
  2169.    background ldx <b'lattice
  2170.               ldy >b'lattice
  2171.               jsr 32768+102
  2172.               rts 
  2173.    b'lattice  .byt 0,39,0,24,9,10,15,12  
  2174.  
  2175. @(A): Instant Pages
  2176.       
  2177.    SYS 32768+198,PAGENAME$, items,list$..., hotkeys$
  2178.  
  2179. Since it's by far the easiest to use, we'll discuss instant pages
  2180. first. A page is a computer screen with a user interface setup. Instant
  2181. page allows you to create with one SYS a screen with a tiled background, a
  2182. title bar, and a centered working menu complete with hotkeys. Consider the
  2183. following code: 
  2184.  
  2185.    10 T$="M  Y   D A T A B A S E"
  2186.    20 A$(1)="OPEN DATABASE       (O)"
  2187.    30 A$(2)="DEFINE FIELDS       (D)"
  2188.    40 A$(3)="ADD RECORD          (A)"
  2189.    50 A$(4)="SEARCH RECORDS      (S)
  2190.    60 A$(5)="PRINT RECORDS       (P)"
  2191.    70 A$(6)="RETURN TO LOADSTAR  (Q)"
  2192.    80 A$(7)="odaspq"
  2193.    90 sys32768+198,T$,6,A$(1),A$(2),A$(3),A$(4),A$(5),A$(6),a$(7)
  2194.    100 onf%gosub200,300,400,500,600,700      
  2195.    110 goto 10
  2196.   
  2197. Make sure the number of items in your list$ matches the number declared
  2198. with ITEMS. If you RUN this program, a typical LOADSTAR type program will
  2199. pop up on the screen: 
  2200.  
  2201.    M Y   D A T A B A S E 
  2202.    OPEN DATABASE       (O)
  2203.    DEFINE FIELDS       (D)
  2204.    ADD RECORD          (A)
  2205.    SEARCH RECORDS      (S)
  2206.    PRINT RECORDS       (P)
  2207.    RETURN TO LOADSTAR  (Q)
  2208.  
  2209.    CRSR/RETURN TO SELECT
  2210.  
  2211. You'll have a CRSR/RETURN menu with hotkeys for each menu item, and more
  2212. hotkeys if you simply include them. The menu is automatically centered left
  2213. to right and top to bottom. CRSRing to ADD RECORD or pressing [A] will exit
  2214. the menu and the variable, F%, will be 3. This is how you know which item
  2215. or hotkey was selected by the user. There can be up to 40 hotkeys defined
  2216. so that your page goes beyond the items presented on the menu. If hotkey
  2217. #20 is pressed, the menu is exited, and F%'s value is 20. It's not
  2218. mandatory for your menu to have alternative hotkeys, but if you do, list
  2219. the menu's hotkeys first, and in the same order that they appear in the menu
  2220. so that F% is always the same as the menu choices and the hotkeys.
  2221.  
  2222. Lines 10-80 set up the data for the menu into variables since you can see
  2223. that there's no way all this text could fit on one line. Just imagine it
  2224. with 20 hotkeys.
  2225.  
  2226. Line 90 calls the routine. Program flow is transferred to MENU TOOLBOX II
  2227. until a menu item or hotkey is pressed.
  2228.  
  2229. Line 100 is one way of dispatching flow of the program based on the user
  2230. input.
  2231.  
  2232. Ironically, this feature will only work from BASIC. I wrote the INSTANT
  2233. PAGE feature as a simple driver to test MENU TOOLBOX II's ability to take
  2234. commands from ML. I liked the routine I ended up with and decided it should
  2235. be added to the package. Adding links for ML for this routine could be done
  2236. -- but since I wrote the routine with many parameters intending for it to
  2237. be called from BASIC, it becomes more difficult, even convoluted, to write
  2238. ML links for a program which is essentially a series of ML links. Plus
  2239. there's no time left this month.  
  2240.  
  2241. @(A): Instant Page Setup: SYS 32768+201, tilea, tileb, colora, colorb, 
  2242.                               title color, highlight color, menu color, 
  2243.                               message color, frame color, frame on, 
  2244.                               background, border
  2245.                                
  2246. You can use my bland default colors or you can use your own. This command
  2247. simply changes the presets.
  2248.  
  2249. Your background is made up of a mesh of two characters, A & B, in two
  2250. colors.  TILE A is one of the characters in the tiled background (0-255) 
  2251. TILE B is the other tile in the background 
  2252.  
  2253. COLOR A is the color of TILE A, 0-15 where COLOR A has the following
  2254. effect: 
  2255.  
  2256.    COLOR A VALUE  COLOR
  2257.  
  2258.        0        BLACK
  2259.        1        WHITE
  2260.        2        RED
  2261.        3        CYAN
  2262.        4        PURPLE
  2263.        5        GREEN
  2264.        6        BLUE
  2265.        7        YELLOW
  2266.        8        ORANGE
  2267.        9        BROWN
  2268.       10        LIGHT RED
  2269.       11        DARK GRAY
  2270.       12        MED GRAY
  2271.       13        LIGHT GREEN
  2272.       14        LIGHT BLUE
  2273.       15        LIGHT GRAY
  2274.  
  2275. This chart applies to all subsequent color values mentioned in the
  2276. documentation. 
  2277.  
  2278. COLOR B is the color of TILE B 
  2279.  
  2280. TITLE COLOR is the color of the title of the page. 
  2281.  
  2282. HIGHLIGHT COLOR is the color of the highlight bar of the menu 
  2283.  
  2284. MENU COLOR is the color of the menu 
  2285.  
  2286. MESSAGE COLOR is the color of the message at the bottom of the screen,
  2287. "CRSR/RETURN To Select." 
  2288.         
  2289. FRAME COLOR is the color of the frames surrounding the title and menu. 
  2290.  
  2291. FRAME ON turns the frame around the menu on with a nonzero value. You
  2292. might need to turn off the frame to squeeze in extra menu items. Maybe you
  2293. don't like frames, either. 
  2294.  
  2295. BACKGROUND is the background color 
  2296.  
  2297. BORDER is the border color  
  2298.  
  2299. @(A): Change Message: SYS 32768+204,New Message$
  2300.                       
  2301. In case your page needs a custom message at the bottom of the screen,
  2302. change it here. Keep it less than 38 characters.  
  2303.  
  2304. @(A): Screen To Menu: SYS 32768+63,y,x1,x2,n,t,h,"keys"
  2305.              
  2306. Screen To Menu is an easy way to create a CRSR/RETURN menu from a vertical
  2307. list of options that you've previously printed on the screen. So any list
  2308. on your screen can be made to "spring to life" as a CRSR/RETURN menu. There
  2309. may be up to 24 items, as wide as the entire screen. It's up to you to
  2310. write the subroutines that correspond to each menu item.
  2311.  
  2312. After an item is selected, the variable, F%, tells you which item was
  2313. selected. It will hold a value between 1 and the number of items in the
  2314. menu. Here it is in use: 
  2315.  
  2316.    150 sysaddr,y,x1,x2,n,t,h,"hotkeys"
  2317.    160 on f% goto200,300,400,500,600...
  2318.  
  2319. "f%" is the nth item selected. 
  2320.  
  2321. Y is the starting row on the screen. 
  2322.  
  2323. X1 is the left extreme of the highlight bar. 
  2324.  
  2325. X2 is the right extreme of the highlight bar. 
  2326.  
  2327. N is the number of items in the menu. 
  2328.  
  2329. T is the text color of the unhighlighted items in the menu. 
  2330.  
  2331. H is the highlight bar color. 
  2332.  
  2333. NOTE: If you don't want the highlight bar to reverse items, add 128 to
  2334. the color codes (0-15) of parameters T and H.
  2335.  
  2336. The MENU command has been extended per imperial order of Maurice Jones.
  2337. Maurice likes to press one key instead of using CRSR/RETURN menus, which
  2338. force you to press more than one key. The new "keys" field allows you to
  2339. define hotkeys for each menu item, and also for flow control beyond the
  2340. CRSR/RETURN menu.
  2341.  
  2342. For instance, you have five items on your menu, but "keys" is defined as
  2343. "12345qlprt". 1-5 happen to be hotkeys for the menu in this example. You
  2344. can use mnemonic keys if you like. If the user CRSRs to item 4 and presses
  2345. RETURN, F% will become 4. If they press 4, f% becomes 4. But as a bonus, if
  2346. the user presses "l", which is seventh in the KEYS string, F% becomes 7. If
  2347. they press "r", F% becomes 9, and so on. MENU now has the power of
  2348. BRANCHER. You can have up to 40 hotkeys in the string.
  2349.  
  2350. What would you use these hotkeys for?  Well you might have a CRSR/RETURN
  2351. menu, but also "q" to quit and SPACE to go to another menu. The only new
  2352. requirement is that you now have to define hotkeys for each of your menus.
  2353. It's a good idea to let your users know about the hotkeys. 
  2354.  
  2355. To use screen menus from ML: 
  2356.  
  2357.    ldx <parameters
  2358.    ldy >parameters
  2359.    jsr 32768+162
  2360.  
  2361. User input is returned in 253
  2362.  
  2363. Parameters is a stream of legal parameter bytes followed by the length of
  2364. the hotkey string, followed by the hotkey string.  
  2365.  
  2366.  
  2367. @(A): Introduction to Scrolling Menus
  2368.       
  2369. These menus are more involved to implement, but well worth the setup time.
  2370. The multi-file selector in DISKMEISTER is an example of a quirky BASIC/ML
  2371. slow POKE (pardon the pun). You need self-contained ML to handle your
  2372. menus, especially scrolling ones. MENU TOOLBOX will create its own pointers
  2373. for the menu items you define. Normally these pointers will be right at the
  2374. end of the ML. Each item in your menu will take up 4 bytes. The pointers
  2375. can extend under ROM and IO with no problem. If you don't want the pointers
  2376. to be at their default location, you can change the array location with the
  2377. following SYS.  
  2378.  
  2379. @(A): Change Location: SYS 32768+27,location 
  2380.  
  2381. From ML           
  2382.  
  2383.    ldx <location
  2384.    ldy >location
  2385.    jsr 32768+126
  2386.  
  2387. Since the default pointers will begin around $a000, you will want to
  2388. change the location if you have data such as a screen stored there.
  2389. Typically you'll want the pointers somewhere where they won't cost you
  2390. anything, which is usually under some ROM.
  2391.  
  2392. You'll also want to use this command if you want to switch between
  2393. pointers for different menus.  
  2394.  
  2395. @(A): Declaring Menu Items
  2396.       
  2397. Before MENU TOOLBOX can create a menu for you, you must either BLOAD a
  2398. directory, an EDSTAR PRG text file with a list of menu items in it, or
  2399. declare items from DATA statements. I've included tools to make this
  2400. process easy. Since directories are so structured, they don't need pointers
  2401. so all you have to do is tell MENU TOOLBOX where to BLOAD the directory:  
  2402.  
  2403. @(A): Bload Directory: SYS 32768+39,"$:*",device,location
  2404.               
  2405. Before you can show a file requestor, you must first have a directory in
  2406. memory. You can BLOAD a directory anywhere in RAM, even under IO at
  2407. $D000-$DFFF. There is NO NEED to use the CHANGE LOCATION command after
  2408. BLOADing a directory. F% holds the number of files, but keep in mind that
  2409. counting starts from 0, not 1.
  2410.  
  2411. From ML: 
  2412.  
  2413.    ldx <filename
  2414.    ldy >filename
  2415.    lda namelength
  2416.    jsr 32768+138 
  2417.    
  2418. the directory filename, usually "$:*" must be followed immediately in
  2419. memory by the device number byte and then the low/high bytes of the load
  2420. address.  
  2421.  
  2422. @(A): File Requestor: SYS 32768+45,x,y1,y2,r,c,h,s,m
  2423.                     
  2424. This command will pop up a scrolling (if necessary) menu on your screen.
  2425. Your users will be able to CRSR up and down or page with the + and - keys.
  2426. You should print this somewhere on the screen so that your users will know.
  2427. Lotta parameters? Here's what they mean: 
  2428.  
  2429. X is the upper left hand corner of the requestor box. Since directories
  2430. are always going to be about 32 columns across, you would never have a
  2431. number more than 6 here. 
  2432.  
  2433. Y1 is the top row of the menu, 0- 20. 
  2434.  
  2435. Y2 is the bottom row in the menu. Y2 determines how much of your screen
  2436. will be taken up by the file requestor. 
  2437.  
  2438. R stands for REVERSE mode. If you want all the items in the menu to be
  2439. printed in reverse, put a 1 here. Highlighted items will appear unreversed.
  2440.  
  2441.  
  2442. C is the color of the menu and all unhighlighted menu items. 
  2443.  
  2444. H is the color of the highlighted (current) item. 
  2445.  
  2446. S is the color of selected files (if the menu is in multi-file select
  2447. mode. 
  2448.  
  2449. M is for MULTI MODE. It allows the user to select more than one file. Make
  2450. this a 0 for a normal single file and 1 for multi-file selection ability.
  2451. Files are selected with SPACE or RETURN. To exit the requestor you must
  2452. press F1. Your program should inform the user of this if they are in the
  2453. multi file mode.
  2454.  
  2455. When in single mode the file name is returned in W$, the position in the
  2456. directory is in I% and the block size of the selected file is in B%.
  2457.  
  2458. From ML: 
  2459.  
  2460.    ldx <location
  2461.    ldy >location
  2462.    jsr 32768+144
  2463.  
  2464. Have parameters as a stream of bytes in the order and extremes presented
  2465. above. When in single mode, .X and .Y point to the filename and .A holds
  2466. the file length. Compiler users, .A is location 780, .X is 781 and .Y is
  2467. 782.
  2468.  
  2469. You can find F% at 253, I% at $14 and b% at $22  
  2470.  
  2471. @(A): Index Items: SYS32768+33,item 
  2472.           
  2473. This command works best with bloaded directories, but can be used on
  2474. normal scrolling menu data. It returns the filename or menu item string of
  2475. ITEM into w$. When f% <> 0, it means the item or file has been selected. So
  2476. when you have a multi file menu, do a loop to check each file. If f% <> 0,
  2477. act on that file.
  2478.  
  2479. [Big note:] if you're hurting for string array space or suffering from
  2480. garbage collection blues, why not store/load lists into menu item slots in
  2481. high memory?  You can use INDEX to check your hidden pseudo arrays, and
  2482. DEFINE MENU ITEM (below) to store/flag items. Such arrays won't be dynamic,
  2483. but they can come in handy. 
  2484.  
  2485. From ML: 
  2486.  
  2487.    ldx <item
  2488.    ldy >item
  2489.    jsr 32768+132
  2490.  
  2491. .X and .Y point to the returned string and .A holds the string length. F%
  2492. is in locations 253 and 254 always.  
  2493.  
  2494.  
  2495. @(A): Menus from BASIC Strings
  2496.       
  2497. Menu items can also exist in BASIC, but preferably in DATA lines and not
  2498. in dynamic strings since some dynamic strings can change location after a
  2499. garbage collection.
  2500.  
  2501. MENU TOOLBOX has to know a few things about your menu items before it can
  2502. make a menu out of them. It has to know each item's place in the menu. Is
  2503. it item number one or three hundred? If you have many items, you can tell
  2504. MENU TOOLBOX all about your menu in a FOR loop with the following command.
  2505. This isn't difficult to do. All you have to do is:  
  2506.  
  2507. @(A): Define Menu Item: SYS32768+30,item$,index,selected
  2508.               
  2509. Here you're telling the system the place of a certain string in your menu.
  2510. If you're doing this from an array, you can use a FOR loop.
  2511.  
  2512. ITEM$ will always be a string variable, probably from an array or from
  2513. DATA read into a string. If your menu items are in DATA statements, you
  2514. don't need to DIMension an array to hold the strings. You can READ the data
  2515. into a throwaway variable like a$ and then 
  2516.  
  2517.    sys32768+42,a$,index,selected 
  2518.  
  2519. in a FOR loop. If you will want to print the menu item somewhere outside
  2520. of the menu, you will probably want and need an array. In any case, string
  2521. DATA in arrays doesn't take up any memory except for pointers.
  2522.  
  2523. INDEX is just the item's place in the menu.
  2524.  
  2525. SELECTED is whether or not the item should be considered selected when the
  2526. menu pops up. You can use this even when not in multi-select mode to show
  2527. that some items are not available or to highlight items to show that some
  2528. pending action is needed. 
  2529.  
  2530. From ML:
  2531.  
  2532.    ldx <parameters
  2533.    ldy >parameters
  2534.    lda string'length
  2535.    jsr 32768+129
  2536.    parameters .asc "item name"
  2537.    .word index
  2538.    .byt selected 
  2539.  
  2540. @(A): Menu COmmand: SYSaddr+42,x1,x2,y1,y2,r,c,h,s,o,l,m 
  2541.            
  2542. This command will pop up a scrolling (if necessary) menu on your screen.
  2543. Your users will be able to CRSR up and down or page with the + and - keys.
  2544. You should print this somewhere on the screen so that your users will know.
  2545. Here's what the parameters mean: 
  2546.  
  2547. X1 is the upper left hand corner of the requestor box. 
  2548.  
  2549. X2 is the right extreme of the menu. Any menu item that exceeds the width
  2550. defined by X1 and X2 will be truncated. 
  2551.  
  2552. Y1 is the top row of the menu, 0- 20. 
  2553.  
  2554. Y2 is the bottom row in the menu. Y2 determines how much of your screen
  2555. will be taken up by the menu. 
  2556.  
  2557. R stands for REVERSE mode. If you want all the items in the menu to be
  2558. printed in reverse, put a 1 here. Highlighted items will appear unreversed.
  2559.  
  2560. C is the color of the menu and all unhighlighted menu items. 
  2561.  
  2562. H is the color of the highlighted (current) item. 
  2563.  
  2564. S is the color of selected menu items. 
  2565.  
  2566. O is the offset, in case you've sectioned off your menu items, generally
  2567. zero. If you want to pop into the menu at a particular point (say at the
  2568. last item selected which you've preserved), use offset to do so. The rest
  2569. of the menu is still accessible. 
  2570.  
  2571. L is the limit or the highest menu item allowed. Note that this will
  2572. usually be one less than f% when you use the Rack Em Up command. 
  2573.  
  2574. M is for MULTI MODE, which allows the user to be able to select more than
  2575. one item. Outside of a file requestor, there are few uses for this. Make
  2576. this a 0 for a normal single item and 1 for multi-item selection ability.
  2577. Items are selected with RETURN or SPACE. To exit a multi-select menu you
  2578. must press F1. Your program should inform the user of this if they are in
  2579. the multi item mode.
  2580.  
  2581. When RETURN is pressed in single mode, the item number is returned in F%. 
  2582.  
  2583. From ML: 
  2584.  
  2585.             ldx <parameters
  2586.             ldy >parameters
  2587.             jsr 32768+141
  2588.  parameters .byt x1,x2,y1,y2,,r,c,h,s
  2589.             .word o,l
  2590.             .byt m  
  2591.      
  2592.  
  2593. @(A): Set Mode: SYS32768+48,n 
  2594.            
  2595. Sometimes you may have a regular menu and a directory set up in memory.
  2596. You may want to set the proper mode for FIND AND CLEAR with this command
  2597. before using it. N is 0 for normal retrieval and 1 for file requestor
  2598. retrieval.  
  2599.  
  2600.  
  2601. @(A): BLOADT Text File: SYS32768+15,file$,device,location
  2602.                
  2603. This command will BLOAD a standard EDSTAR text file into memory and place
  2604. a zero at the end of the file to mark the end. It can also be used as a
  2605. regular BLOAD.
  2606.  
  2607. FILE$ is the filename of the file you want to BLOAD.
  2608.  
  2609. DEVICE is any legal device number.
  2610.  
  2611. LOCATION is anywhere in RAM except the IO area $D000-$DFFF. Again, you
  2612. really should take advantage of areas outside of BASIC and beneath ROM.
  2613.  
  2614. You can indeed use packed text if you BLOAD it with DTEXT, published on
  2615. LOADSTAR #122 and the COMPLEAT PROGRAMMER. 
  2616.  
  2617. From ML: 
  2618.  
  2619.               ldx <parameters
  2620.               ldy >parameters
  2621.               lda filename'length
  2622.               jsr 32768+114 
  2623.    parameters .asc "filename"
  2624.               .byt device
  2625.               .word location 
  2626.  
  2627. @(A): Rack 'em Up: SYS32768+36,location
  2628.           
  2629. This command simply itemizes every line in a text file that you've BLOADed
  2630. so that it can be used as a menu. Pointers for each line in the text file
  2631. will be located starting from the end of the file. So don't BLOAD a file
  2632. that ends too close to $FFFF or the beginning of important data.
  2633.  
  2634. F% tells you the number of lines it has itemized. Save this into another
  2635. variable because you will need the value to set a limit (bottom) to any
  2636. menu made with the BLOADed data.
  2637.  
  2638. The longest length of a line is stored in $14 (decimal 20). If you want
  2639. your resulting menu properly centered, check out this location immediately
  2640. after the call as this location is heavily trafficked by Menu Toolbox and
  2641. BASIC.  
  2642.  
  2643. From ML: 
  2644.  
  2645.    ldx <location
  2646.    ldy >location
  2647.    jsr 32768+135  
  2648.  
  2649. @(A): Text File Reader
  2650.  
  2651. You would simply BLOAD a text file using the aformentioned command, and
  2652. then RACK IT UP. Next just define a regular menu wide enough to accommodate
  2653. the text anywhere on the screen. Don't forget to prompt your users to press
  2654. RETURN to exit the reader (which is really a big menu).
  2655.  
  2656.     
  2657. @(A): Report Location: SYS32768+54          
  2658.               
  2659. If you don't want to rack up a text file again, you can find out and store
  2660. exactly where the menu pointers begin with this command. The location will
  2661. be reported in F%. Remember that F% is an integer variable, and has a max
  2662. of 32767. So if F% is negative, subtract it from 32768:
  2663.  
  2664.    SYSAD+69:ad=f%:iff%<0thenad=32768- f  %
  2665.  
  2666. From ML: 
  2667.  
  2668.    jsr 32768+153 
  2669.    
  2670. Location returned in .X and .Y  
  2671.  
  2672.  
  2673. @(A): Get Word: SYS32768+51,color,cursor,limit,text$  
  2674.            
  2675. Your program will probably need input from the user. Here you have the
  2676. best input routine I've ever done. It allows you to cursor through
  2677. already-typed text, and it allows you to predefine the text from a variable
  2678. or static string, allowing the user to just hit RETURN if they don't want
  2679. to change the text as it appears at the blinking cursor. The results of
  2680. editing (or non-editing) is returned in W$.
  2681.  
  2682. COLOR is the color of text that is typed by the user.
  2683.  
  2684. CURSOR is the color of the flashing cursor.
  2685.  
  2686. LIMIT is the maximum length of the input.
  2687.  
  2688. TEXT$ will usually be null. If not, the contents of the variable will be
  2689. printed at the current location of the cursor, respecting the COLOR
  2690. parameter. The length of TEXT$ overrides LIMIT only if it's longer than
  2691. LIMIT. 
  2692.  
  2693. From ML: 
  2694.  
  2695.               ldx <parameters
  2696.               ldy >parameters
  2697.               jsr 32768+150
  2698.               rts
  2699.    parameters .byt color,cursor,limit
  2700.               .byt length of default string
  2701.               .asc "default string" 
  2702.             
  2703. Returns location of edited string in .X and .Y. .A holds the length of
  2704. the string.  
  2705.  
  2706. @(A): Start Memory Print: SYS32768+60,location,string$  
  2707.              
  2708. @(A): Continue Memory Print: SYS32768+63,string$        
  2709.                        
  2710. Use START MEMORY print to start a list of text in memory. This command
  2711. allows you to print to memory in case you want to build a menu from
  2712. software instead of a table or file. You can print a list in memory, RACK
  2713. it up, and make a scrolling menu out of it. Works beneath ROMs, too. A
  2714. carriage return is appended to the string in memory.
  2715.  
  2716. Once you've started memory printing, just keep sending strings with
  2717. continue memory print. The updated address of the end of your menu is kept
  2718. in locations 251 and 252. USE NO OTHER COMMANDS while building your list
  2719. with memory print! You might corrupt 251 and 252.
  2720.  
  2721. The final item in your menu should end with a character string 0 so that
  2722. RACK IT UP knows where the end of your list is. 
  2723.  
  2724.    sys32768+63,final$+chr$(0). 
  2725.  
  2726. START From ML: 
  2727.  
  2728.    lda <string'loc
  2729.    sta $22
  2730.    lda >string'loc
  2731.    sta $23
  2732.    lda string'length
  2733.    ldx <start
  2734.    ldy >start
  2735.    jsr 32768+156 
  2736.  
  2737. CONTINUE From ML: 
  2738.  
  2739.    lda <string'loc
  2740.    sta $22
  2741.    lda >string'loc
  2742.    sta $23
  2743.    lda string'length
  2744.    jsr 32768+159  
  2745.  
  2746. @(A): Scroll Up: SYS32768+18,x1,x2,y1,y1
  2747.         
  2748. This scrolls a section of the screen defined by the extremes above. Scroll
  2749. need not be used with menus. That's done automatically, but since the code
  2750. exists for the MENU command, I thought I'd give you direct access to it if
  2751. you want. The cursor is placed right where new screen text would appear
  2752. according to the parameters of the scroll. 
  2753.  
  2754. From ML: 
  2755.  
  2756.               ldx <parameters
  2757.               ldy >parameters
  2758.               jsr 32768+117
  2759.               rts
  2760.    parameters .byt x1,x2,y1,y2  
  2761.  
  2762. @(A): Scroll Down: SYS32768+21,x1,x2,y1,y1
  2763.           
  2764. This scrolls a section of the screen defined by the extremes above. 
  2765.  
  2766. From ML: 
  2767.  
  2768.               ldx <parameters
  2769.               ldy >parameters
  2770.               jsr 32768+120
  2771.               rts
  2772.    parameters .byt x1,x2,y1,y2  
  2773.  
  2774. @(A): Clear Row: SYS32768+24,code,color
  2775.         
  2776. In case you have to blank a duplicated line in the scroll area, this
  2777. command will do it using the screen code and color you specify. Cursor
  2778. position isn't changed. 
  2779.  
  2780. From ML: 
  2781.  
  2782.    ldx code
  2783.    ldy color
  2784.    jsr 32768+123  
  2785.  
  2786. @(A): Titles
  2787.  
  2788. In order to make use of the internal tiles, you MUST use a custom font in
  2789. your program. The use of fonts in programs is beyond the scope of this
  2790. article. FOr information on fonts, please see LOADSTAR's Compleat
  2791. Programmer or Font Finale on LOADSTAR #92.
  2792.  
  2793. Here is the command structure of the tile functions. Since I made three
  2794. versions of the program, I'll refer to only the $C000 version. Replace
  2795. 32768 with the other addresses if you will be using other versions.  
  2796.  
  2797. @(A): Lattice: SYS 32768,x1,x2,y1,y2,t1,t2,c1,c2
  2798.           
  2799. This command will create a colorful pattern on the screen. If T1 and T2
  2800. were 1 and 2, the grid would consist of As and Bs in the following fashion:
  2801.  
  2802.    abababababababa
  2803.    bababababababab
  2804.    ababababbababab
  2805.  
  2806. These lattices can be any dimension, as thin as a column or row and as
  2807. large as the entire screen. They can be very colorful and eye-catching as
  2808. you will see in DIRECTOMEISTER on our pass-around issue, available from our
  2809. web page at http://www.loadstar.com/
  2810.  
  2811. X1 is the leftmost column of the lattice, 0-39.
  2812.  
  2813. X2 is the rightmost column of the screen, 0-39 > X1.
  2814.  
  2815. Y1 is the top row of the lattice, 0-24.
  2816.  
  2817. Y2 is the bottom of the lattice, 0-24 > Y1. Note that if Y2 is greater
  2818. than 24, the lattice can overwrite your BASIC program at $0801 (+2049).
  2819.  
  2820. T1 is the screen code of the tile in your lattice, 0-255. You can find the
  2821. screen code of any character by printing it at HOME and then issuing the
  2822. command: 
  2823.  
  2824.    print peek(1024)
  2825.  
  2826. T2 is the screen code of the other tile in your lattice. It can be the
  2827. same as T1 if you like. You can still get a lattice effect by using the
  2828. same tile with a lattice of color only.
  2829.  
  2830. C1 is the color of T1, 0-15.
  2831.  
  2832. C2 is the color value of T2 in your lattice. As with tile selection, C1
  2833. and C2 can have identical values with T1 and T2 having different values,
  2834. creating a lattice of tiles and not color. If T1, T2, C1 and C2 are all the
  2835. same, then what you have is a block. There's a simpler way to get a block. 
  2836.  
  2837. From ML:
  2838.  
  2839.           ldx <params
  2840.           ldy >params
  2841.           jsr 32768+102
  2842.           rts
  2843.    params .byt x1,x2,y1,y1,t1,t2,c1,c2  
  2844.  
  2845. @(A): Block: SYS 32768+3,x1,x2,y1,y2,code,color 
  2846.               
  2847. This routine will draw a block of characters on the screen. It will also
  2848. paint an area of the screen without changing the characters if you use a
  2849. CODE of 255. It can erase portions of the screen if you use spaces, and it
  2850. can draw single lines or rows of characters if you like. It is a mainstay
  2851. of my programming. Can't do without it.
  2852.  
  2853. X1 is the leftmost column of the block, 0-39.
  2854.  
  2855. X2 is the rightmost column of the screen, 0-39 > X1.
  2856.  
  2857. Y1 is the top row of the block, 0-24.
  2858.  
  2859. Y2 is the bottom of the block, 0-24 > Y1. Note that if Y2 is greater than
  2860. 24, the block can overwrite your BASIC program at $0801 (+2049).
  2861.  
  2862. CODE is the screen code of the tile in your block, 0-254. You can find the
  2863. screen code of any character by printing it at HOME and then issuing the
  2864. command: 
  2865.  
  2866.    print peek(1024)
  2867.  
  2868. When a CODE of 255 is issued, the BLOCK program will not alter the screen
  2869. at all, only the color. This allows you to change (PAINT) colors of
  2870. portions of the screen without having to re-print them. If you must use
  2871. character #255 on the screen, use LATTICE with both screen codes set to
  2872. 255. With both codes and both colors set the same, LATTICE becomes BLOCK.
  2873.  
  2874. COLOR is the color of CODE, 0-15. 
  2875.  
  2876. From ML: 
  2877.  
  2878.    ldx <params
  2879.    ldy >params
  2880.    jsr 32768+105
  2881.    rts
  2882.    params .byt x1,x2,y1,y2,code,color  
  2883.  
  2884. @(A): Outline Box: SYS 32768+6,x1,x2,y1,y2,color
  2885.           
  2886. This routine will pop up a box on the screen using the CMDR-A,S,Z,X,
  2887. SHIFT-ASTERISK and SHIFT-MINUS characters. The area inside the box will not
  2888. be affected.
  2889.  
  2890. X1 is the leftmost column of the box, 0-39.
  2891. X2 is the rightmost column of the screen, 0-39 > X1.
  2892.  
  2893. Y1 is the top row of the box, 0-24.
  2894.  
  2895. Y2 is the bottom of the box, 0-24 > Y1. Note that if Y2 is greater than
  2896. 24, the box can overwrite your BASIC program at $0801 (+2049).
  2897.  
  2898. COLOR is the color of the box, 0-15. 
  2899.  
  2900. From ML: 
  2901.  
  2902.           ldx <params
  2903.           ldy >params
  2904.           jsr 32768+108
  2905.           rts
  2906.    params .byt x1,x2,y1,y2,color  
  2907.  
  2908. @(A): Copy Tile: SYS32768+9,FONT LOCATION,TILE,CHAR
  2909.         
  2910. This is a magic command. Within the ML are 60 tiles, lifted from TILE
  2911. STYLIST. This command will copy any of those tiles to any character in your
  2912. font. All you have to do is tell the command where your font is.
  2913.  
  2914. FONT LOCATION is the location of your font in memory.
  2915.  
  2916. TILE is the built in tile 0-9, that you want to have copied into your
  2917. font.
  2918.  
  2919. CHAR is the screen code of the character you want replaced with the tile. 
  2920.  
  2921. From ML: 
  2922.  
  2923.          ldx <parms
  2924.          ldy >parms
  2925.          jsr 32768+111
  2926.          rts
  2927.    parms .word font'location
  2928.          .byt tile,char  
  2929.  
  2930. @(A): More Than Sixty Tiles?: SYS32768+12           
  2931.  
  2932. If you use this command, you must be a tile fanatic. You can use values
  2933. greater than 99 for TILE if you BLOAD a tile font into the proper location.
  2934. This will only work with the $9000 and $0800 versions of TILE TOOLBOX. It
  2935. can work with the $C000 version, but under normal circumstances, you can't
  2936. BLOAD to the $D000 area, which is where the VIC chip and I/O are.
  2937.  
  2938. To get the proper BLOAD location, SYS32768+12. The address will be
  2939. returned in the .X and .Y registers. For BASIC users, the address will be
  2940. returned in locations 781 and 782.
  2941.  
  2942. ML users would simply insert the JSR before a LOAD:
  2943.  
  2944.    jsr 32768+12
  2945.    jsr LOAD
  2946.    
  2947. BASIC users would BLOAD their font into place this way: 
  2948.  
  2949.    20 sys57812"tiles",8,0:poke780,0: sys32768+12:sys65493
  2950.  
  2951. This would give you a total of 266 tiles in memory if your tile font is 9
  2952. blocks long, but you will only be able to access the first 256, including
  2953. the ten already in the ML.  
  2954.  
  2955. @(A): Animation
  2956.                   
  2957. You can use the COPY TILE command for animation by copying a series of
  2958. tiles into the same CHAR. This will be much faster than drawing new
  2959. characters or re-drawing an entire lattice or block. Of course if you're
  2960. changing just one character, you can poke one byte on the screen, but the
  2961. advantage of copying is that you have information [outside] of your font so
  2962. your font isn't crowded and barely usable for text.  
  2963.  
  2964. @(A): Shade: SYS 32768+96,x1,x2,y1,y2
  2965.         
  2966. SHADE paints with intelligence. I have always used BLOCK to shade an area
  2967. with a uniform color just beneath and to the left of a box I'm about to
  2968. draw. This gives a nice 3-D effect. SHADE does one better. If there are
  2969. multiple colors in the area, each color is assigned a darker shade. So your
  2970. overlapping windows will have a consistent shading effect.
  2971.  
  2972. SHADE can have a flash-type cycling effect when used repeatedly on the
  2973. same section of a screen. Eventually it will only cycle between blacks and
  2974. all the shades of white. 
  2975.  
  2976. From ML: 
  2977.  
  2978.          ldx <parms
  2979.          ldy >parms
  2980.          jsr 32768+192
  2981.          rts
  2982.    parms .byt x1,x2,y1,y2 
  2983.  
  2984. @(A): Screen Stash: SYS 32768+66,page
  2985.  
  2986. @(A): Screen Restore: SYS 32768+69,page 
  2987.  
  2988. @(A): Screen Merge: SYS 32768+87,page
  2989.                                   
  2990. Without screen swapping, pop-up help screens and menus would be
  2991. cumbersome. These two routines will store a screen at any page (256 byte
  2992. section) in memory. To store the current screen at $d000 (53248), you
  2993. would: 
  2994.  
  2995.    SYS 32768+66,53248/256 
  2996.  
  2997. To get the screen back: 
  2998.  
  2999.    SYS 32768+99,53248/256
  3000.  
  3001. $D000 is at page 208. Note that each screen takes up 8 pages, and should
  3002. be kept 8 pages apart.
  3003.  
  3004. Note that screen stash stores the current border and background colors, as
  3005. well as cursor position per imperial order of Maurice Jones. Screen restore
  3006. will bring back the border and background colors of the stored screen.
  3007.  
  3008. SCREEN MERGE will restore a screen "under" an existing screen, meaning
  3009. that every place where there's a SPACE can be written to by the screen
  3010. being merged. Background and border colors aren't changed by MERGE.
  3011.  
  3012. In case you're confused about what screen merge does, MERGE would be a
  3013. simple screen restore on a blank screen. On a screen with something,
  3014. anything that's not a SPACE or SHIFT SPACE, MERGE allows restored screen to
  3015. bleed through without wiping out the current screen.
  3016.  
  3017. You can use MERGE in games like Concentration, where you only want to
  3018. reveal part of the screen at a time. 
  3019.  
  3020. STASH From ML: 
  3021.  
  3022.    lda page
  3023.    jsr32768+165  
  3024.  
  3025. RESTORE From ML:  
  3026.  
  3027.    lda page
  3028.    jsr32768+168  
  3029.  
  3030. MERGE From ML: 
  3031.  
  3032.    lda page
  3033.    jsr32768+183 
  3034.  
  3035. @(A): Link: SYS 32768+72
  3036.               
  3037. Though all TOOLBOX routines that affect the screen use LINX and keep line
  3038. links clear, you can call LINX directly with a SYS 32768+72. Same from ML. 
  3039.  
  3040. @(A): Print At: SYS32768+75,x,y,string$
  3041.                        
  3042. This will print text anywhere on the screen. X and Y are your screen
  3043. parameters. STRING can be a literal or a string variable. 
  3044.  
  3045. From ML: 
  3046.  
  3047.    lda <string'loc
  3048.    sta $22
  3049.    lda >string'loc
  3050.    sta $23
  3051.    ldx row
  3052.    ldy column
  3053.    jsr 32768+171
  3054.  
  3055. From ML the string must terminate in a zero.  
  3056.  
  3057. @(A): Center: SYS 32768+78,row,string$
  3058.                             
  3059. Centers a string (fewer than 41 bytes) on a specified line. 
  3060.  
  3061. From ML: 
  3062.  
  3063.    lda <string'loc
  3064.    sta $22
  3065.    lda >string'loc
  3066.    sta $23
  3067.    ldx row
  3068.    jsr 32768+174
  3069.  
  3070. String must terminate in zero.  
  3071.  
  3072. @(A): UPcase: SYS 32768+81,variable$
  3073.                                  
  3074. Converts all characters in a string to upper case. "We, The People"
  3075. becomes "WE, THE PEOPLE"
  3076.  
  3077. Note UPCASE will not print the string for you. 
  3078.  
  3079. From ML: 
  3080.  
  3081.    lda <string'loc
  3082.    sta $22
  3083.    lda >string'loc
  3084.    sta $23
  3085.    jsr 32768+177
  3086.  
  3087. String must terminate in zero.  
  3088.  
  3089. @(A): LCase: SYS 32768+84,variable$
  3090.                               
  3091. Converts all characters in a string to lowercase. "We, The People" becomes
  3092. "we, the people". Great for use before a test of input like Y and y or N
  3093. and n to consistently lowercase input. 
  3094.  
  3095. From ML: 
  3096.  
  3097.    lda <string'loc
  3098.    sta $22
  3099.    lda >string'loc
  3100.    sta $23
  3101.    jsr 32768+180
  3102.  
  3103. String must terminate in zero.  
  3104.  
  3105. @(A): CHARACTER SWAP: SYS32768+90,a,b,c
  3106.                              
  3107. CHAR SWAP will search the screen for parameter A and change it to
  3108. parameter B with the color, C. Here A and B are screen codes as revealed in
  3109. LOADSTAR LETTER #34 or page 376 of your Programmer's Reference Guide. But
  3110. the quickest way to find out a screen code is to print the character in the
  3111. HOME position and then: 
  3112.  
  3113.    print peek(1024) 
  3114.  
  3115. or if your screen is moved: 
  3116.  
  3117.    print peek(peek(648)*256)
  3118.  
  3119. In a flash, you can change every instance of a character to another
  3120. character, or you can leave the character the same and just change its
  3121. color. This is good for font animation where absolute speed isn't a factor.
  3122.  
  3123. Note: if you want to change characters, but not their colors, send a color
  3124. code of 128. 
  3125.  
  3126. From ML: 
  3127.  
  3128.          ldx <parms
  3129.          ldy >parms
  3130.          jsr 32768+186
  3131.    parms .byt a,b,c  
  3132.  
  3133. @(A): COLOR SWAP:SYS32768+93,c1,c2
  3134.                         
  3135. This changes every instance of a target color on the screen to another
  3136. color. 
  3137.  
  3138. From ML: 
  3139.  
  3140.          ldx <parms
  3141.          ldy >parms
  3142.          jsr 32768+189
  3143.    parms .byt a,b,c  
  3144.  
  3145. @(A): BRANCHER:SYS32768+99,"string"
  3146.                          
  3147. BRANCHER adds very quick flow control to BASIC programs. Send this routine
  3148. a string and it will wait until a key, included in that string, is pressed.
  3149. The string can be up to 207 bytes long. Imagine the BASIC code necessary to
  3150. check 207 hot keys! This call will handle it in one command -- and much,
  3151. MUCH faster.
  3152.  
  3153. When a valid key is pressed, BRANCHER will inform you which key was
  3154. pressed by passing its instring position to the F% variable 
  3155.  
  3156.    1000 SYS 32768+99,"mdvc":on f% goto100,200,300,400 
  3157.  
  3158. Here's the BASIC equivalent:
  3159.  
  3160.    1000 geta$:if a$<>"m"anda$<>"d" anda$<>"v"anda$ <>"c"then1000
  3161.    1010 ifa$="m"then100
  3162.    1020 ifa$="d"then200
  3163.    1030 ifa$="v"then300
  3164.    1040 ifa$="c"then400
  3165.  
  3166. Not only is this code more bulky, but imagine how clunky it would be if
  3167. you had 25 active keys. 
  3168.  
  3169. From ML: 
  3170.    
  3171.    ldx <string'loc
  3172.    ldy >string'loc
  3173.    stx $22
  3174.    sty $23
  3175.    jsr 32768+195
  3176.  
  3177. String must terminate in a zero.  
  3178.  
  3179. @(A): License Agreement
  3180.  
  3181. As with all LOADSTAR tools, we encourage you to use them in your
  3182. programming endeavors. You can do so without a licensing fee as long as you
  3183. mention somewhere briefly in the docs that you got the routines from
  3184. LOADSTAR. If you'd prefer not to mention us, write for permission.
  3185. LOADSTAR's tools may be used in commercial products, and programs published
  3186. in other magazines under the same provisions.
  3187.  
  3188. ========================================================================
  3189.  
  3190. @(#)fido: FIDO's Nuggets
  3191.           by Geoff Sullivan (sunfish@gis.net)
  3192.                                       
  3193. Summer slows things down everywhere, except perhaps in Zone 3, and the 
  3194. Commodore FIDO Echos are no different. I like to think we Commodore users 
  3195. have other interests beside our computers, and that we pursue them at this 
  3196. time of year. Message flow was slow, and at times sporadic. There was some 
  3197. discussion of a hitch in the system, and even now, I've been over a week 
  3198. without one new message arriving at my node. There is also concern that 
  3199. the Internet has absorbed some of the Echo traffic too. More of us have 
  3200. access to it, and there is no doubt that it's faster.   
  3201.                                     
  3202. @(A): Warning: Killer App.  Movie at 11.
  3203.       
  3204. The C128 killer application with a life of it's own, QWKRR, by Rod Gasson, 
  3205. is in version 5.0b at this writing. There are known bugs in it and Rod has 
  3206. posted the symptoms and cautions frequently on the Echos. Users are able to 
  3207. respond and help Rod work out the bugs from his Australian lab, while most 
  3208. of us in the Northern Hemisphere are enjoying a warm summer!   
  3209.     
  3210. @(A): The Canon Is of Little Use, Sir.
  3211.       
  3212. Traffic has been light in the Geos Echo, but a major topic has been the use 
  3213. of Canon InkJet printers with Geos. Manufacturers are now catering more and 
  3214. more to Microsoft's Plug-n-Play concept, while we plug-n-pray. Only the 
  3215. older InkJet printers, such as the BJ-200 and 600 series, have actual DIP 
  3216. switches for manual configuration. Until software is available for us to 
  3217. configure the newer printers, their use will be limited.   
  3218.     
  3219. @(A): Catch What WAVE?
  3220.       
  3221. Discussion of Maurice Randall's Wave for Geos 128 has been centered around   
  3222. speculation as to what it will end up being. Will it be a SLIP/PPP 
  3223. connection to the Web, or a high speed terminal program? Only Maurice knows 
  3224. for sure, and lately he's been busy tweaking software for CMD's Super CPU, 
  3225. the C64 version of which has begun shipping.   
  3226.     
  3227. @(A): Speed Thrills....
  3228.       
  3229. Speaking of the Super CPU, the few users that have them by now are raving.  
  3230. I expect the message base to have more information as more SCPU's are put 
  3231. into service. We have all read the hype before, but actual user experiences 
  3232. posted on the Echos are confirming the awesome speed of this accelerator 
  3233. cartridge.   
  3234.     
  3235. @(A): Ingenious Commodore Usage
  3236.       
  3237. Finally, an often asked question is, "What do you DO with a Commodore   
  3238. computer?". There is much to do, and recently a thread addressing that 
  3239. subject was begun. John Davis' story of how he and his VIC-20 increased his 
  3240. Union participation by using a mail-merge program to personalize meeting   
  3241. announcements brought a smile. He also has used his SX-64 to do sing-alongs  
  3242. for kids at a local campground. SID is his only instrument!   
  3243.     
  3244. So, that's a glimpse into the world of FIDO, the wonder dog of networks, 
  3245. for this time. 
  3246.  
  3247. Here, boy.... 
  3248.  
  3249. =========================================================================
  3250.  
  3251. @(#)review: The Hacking Review
  3252.             by Tom Warnes
  3253.             
  3254. @(A): The Compleat Crossword, published by J and F Publishing.
  3255.                                                                                      
  3256. This is a collection of crossword games which are made a little simpler 
  3257. because the computer is watching to make sure you don't cheat. To start,
  3258. simply load the disk just like any LOADSTAR offering: LOAD"!",8,1
  3259. (substitute 8 with whatever device you are accessing).  You'll find
  3260. most of the actions and key mappings identical to those found on the
  3261. LOADSTAR menu program.
  3262.  
  3263. The start up screen gives you the option of finding out about the 
  3264. people are who created the puzzles in "All About This Disk". The other 
  3265. choices are "Change Title", "Change Music" and "Exit to Basic". The 
  3266. Change Title only allows you to change the background screen. The 
  3267. Change Music becomes a heaven sent option after you've been playing this 
  3268. game for a few hours, or even minutes. You may find yourself really 
  3269. hating the background music; therefore, I'll give a few tips on turning 
  3270. the music off completely. The music doesn't come on until you've loaded a 
  3271. puzzle into your computer off of the disk. To turn the music off 
  3272. completely hold down the CNTR key while pressing the S key or press the 
  3273. CLR/HOME key. The CLR/HOME key acts as a toggle as does the CNTR-S 
  3274. combination. 
  3275.  
  3276. There were a few minor bugs on the disk that I found annoying. In the 
  3277. option "All About This Disk" only a summary of the creators of the puzzles 
  3278. is given. They don't attempt to explain the different functions or how to 
  3279. access them. My suggestion would be to add an extra subgroup called 
  3280. something like "Credit to the Creators" to put their names in, and in the 
  3281. "All About This Disk" put a more complete description of the choices 
  3282. available to the user. The "Change Title" had me stumped for a short while 
  3283. until I discovered it only changes the texture of the background screen, 
  3284. not the color to help someone who has been staring at the screen trying to 
  3285. solve these puzzles. 
  3286.  
  3287. The puzzles themselves are interesting even if sometimes they don't stick 
  3288. to the theme of the puzzle. There is a small hiccup in the music presenter, 
  3289. as it had a small problem playing the last song on the list available to 
  3290. the user. It acted like a cassette player playing a cassette that has the 
  3291. tape wound to tight on the spools. 
  3292.  
  3293. Except for these minor problems it was interesting having the computer 
  3294. keeping me honest.  One big thing that has bothered me for years is the 
  3295. fact no one has found a way to reward the player for successfully 
  3296. completing a game on the computer. I've seen a simple message flashed on 
  3297. the screen or even a colorful display. This is not for everyone. A 
  3298. possible reward would be to have a timed series of puzzles so the player 
  3299. could compete against time.  A feature I liked was the fact that you could 
  3300. mark a puzzle as having been completed, or if you're like me, one that 
  3301. you've worked on and still have to complete. You are given this option 
  3302. each time you go from a puzzle to the start-up screen. Most of these 
  3303. puzzles seem to have come from the mind of Barbara Schulak, a name you 
  3304. will recognize from the Loadstar 128 collection. 
  3305.                
  3306. @(A): The Compleat Lee O., distributed by J and F Publishing.
  3307.        
  3308. Speaking of the Loadstar 128 collection the next group of programs 
  3309. came from those disks. It is called the complete Lee O. This is a 
  3310. collection of programs submitted to Loadstar to be put out on their 128 
  3311. Loadstar disks. The programmer, Leo O. Clinton, tried to help fill the 
  3312. barren field of 80 column programming.  They are all utility programs. 
  3313. Their titles are "Mutual Funds", "Resumes", "Genealogy", "Auto Expense 
  3314. Tracking", "Kitchen Upkeep" (Recipes), and "Home Finances". All of these 
  3315. programs come on one disk and it is highly recommended that you copy 
  3316. each onto a dedicated disk. To explain the working of the programs, 
  3317. I sometimes borrowed heavily from the text that Leo O. Clinton typed in 
  3318. to explain the workings of his programs.                 
  3319.                   
  3320. @(A)subapp: Mutual Funds
  3321.     
  3322. Works with drive 8 only. Keeps 253 transactions in each of 16 Mutual 
  3323. Fund Accounts. Computes profit/loss, investment and total returns and 
  3324. investment and fund performers. Output can be to screen, disk or printer 
  3325. if you have included all the recommended files on your disk. Escape will 
  3326. take you one level back from the level youre working on. You can add 
  3327. accounts, delete accounts, modify accounts, or add transactions. This 
  3328. program works on the trade date of your accounts and must be entered in 
  3329. the request for date.  
  3330.                         
  3331. @(A)subapp: Resume Writer
  3332.  
  3333. This program is important in today's shifting job market. It works with 
  3334. a wide range of disk drives. It can create a resume after you type in 
  3335. the answers to a range of questions. It creates a resume to your personal 
  3336. preference. The chronological option lists last job first, or you can go 
  3337. with most  important job first and on down to the least important. All 
  3338. information can be saved to disk and then recalled and printed when you 
  3339. need it.         
  3340.                      
  3341. @(A)subapp: Pedigree 128
  3342.  
  3343. Keeps track of 5 generations of your family. Gives you the option of 
  3344. creating a full page of information for each member. If you get stuck 
  3345. and don't know how to answer a question, the help screens will steer you 
  3346. in the right direction. After the title screen is displayed a chart will 
  3347. show you the relationship of the people you are entering. Drives 8 through 
  3348. 11 are supported. This is really a fine program for someone interested 
  3349. in his or her family relations.
  3350.                        
  3351. @(A)subapp: Auto Expense
  3352.  
  3353. If you're one of the people you see at the gas pumps jotting down 
  3354. mileage, cost and quantity of gas in a little book, this program is for 
  3355. you. This program keeps a record of 18 cars with the possibility of 252 
  3356. entries for each car per disk. The program is menu driven. After you enter 
  3357. data you can use what you have entered to create graphs or print a 
  3358. record for the car you pick. The graphs will show you Actual mileage, 
  3359. Cumulative mileage, or a Cents per mile Pie Chart.
  3360.                              
  3361. @(A)subapp: Cook's Helper
  3362.  
  3363. This program is a electronic recipe box with a lot of extra features 
  3364. thrown in. It allows you to make up a weekly menu and will help make 
  3365. up a shopping list so you can get all the ingredients you will need. 
  3366. There is a conversion calculator to help you go from metric to American 
  3367. Standard, and also an option to convert to different quantities.  
  3368. Entering the recipes into this program is a little different, as you must 
  3369. use various buttons to access certain menus. For example, you press the 
  3370. F1 key whenever you want to print quantities. A list will appear and you 
  3371. use the cursor keys to select the proper quantity. I have used this 
  3372. program since it first came out on Loadstar 128 and it saves on the 
  3373. number of piles of paper I have laying around.
  3374.  
  3375. @(A)subapp: Fiduciary
  3376.  
  3377. The closest program that I can relate to this program is Sylvia Porter's
  3378. Personal Finance 128 series put out by Timeworks. Sylvia Porter's has a 
  3379. few more small functions this program doesn't have. This program allows 
  3380. you to know what your transactions have been, balance your checkbook, 
  3381. create a budget and show you how close you are to staying within that 
  3382. budget. It shows you what Assets/Liabilities you have, and allows you to 
  3383. see in a chart where your money is going. A 30+ page manual that explains 
  3384. what functions this program is capable of is available for you to print out.                       
  3385.  
  3386. =========================================================================
  3387.  
  3388. @(#)hw: The CMD Nirvana: The Guts and Glory 
  3389.         by Todd Elliott (telliott@ubmail.ubalt.edu)
  3390.         http://ubmail.ubalt.edu/~telliott/commodore.html
  3391.         
  3392. @(A): Introduction
  3393.                                    
  3394. Before you begin, download the CMD Nirvana picture off of my WWW site! 
  3395. Take a good look at the picture, and if it doesn't whet your appetite, 
  3396. this article will! This is the computer that I use at home for my various 
  3397. programming projects and good old fashioned entertainment. It consists of 
  3398. a C128DCR with three built-in foreign components: a 12 VDC fan, CMD HD 85
  3399. megabyte drive and a FD 4000 3.5 disk drive. The case is painted obsidian 
  3400. black. It does have a 4MB RAMLink hooked up with a 1750 REU and a 
  3401. Swiftlink or Action Replay cartridge. Other peripherals circling the CMD 
  3402. Nirvana's universe are an 1541, 1571, a SlikStik, MW350 printer interface,
  3403. in addition to a host of books and magazines dedicated solely to the 
  3404. c64/128 line. (Soon, it will have a SuperCPU 20!) It is a very powerful 
  3405. computer, but it doesn't cure my malady of starting programming projects,
  3406. but only to leave them unfinished to do the next one. All of this power
  3407. is corrupting, indeed!
  3408.               
  3409. @(A): Disclaimer:
  3410.  
  3411. This article, while resembling a how-to-do-it-yourself article, is only 
  3412. meant for entertainment and informational purposes and is to be used at 
  3413. the reader's own risk. Mr Elliott, Commodore Hacking, nor Brain
  3414. Innovations, Inc. can be held responsible for any damages and/or injuries 
  3415. occurring as a result of following this information contained in this 
  3416. document. Electronic circuitry is fragile and can be damaged easily. 
  3417. Users must use ground strips or some other means of protecting their 
  3418. circuitry from accidental discharges of static electricity. Also, 
  3419. soldering equipment, electronic outlets, etc. pose a significant danger 
  3420. to self, and extreme care should be used in operating these items or 
  3421. working on electronic circuitry. Be sure to unplug the electronic 
  3422. circuitry before commencing work. I also disclaim any and all warranties, 
  3423. both express or implied. 
  3424.  
  3425. Tremendous thanks goes to Al Anger, who, with his substantial assistance,
  3426. made this CMD Nirvana computer a reality. Thanks, Al Anger! For those who
  3427. don't know him, take a peek at Commodore World's Issue Ten cover, and 
  3428. you'll see his C128T (Tower) computer, plus a host of other hardware 
  3429. projects. But, Mr. Anger did not write this article and is not 
  3430. responsible for its contents, in which the disclaimer above still 
  3431. applies. You can reach Al Anger at coyote@bridge.net. Thanks also go to 
  3432. Max Cottrell, who did the scans of the photographs, courtesy of MC 
  3433. Photography, mcphoto@izzy.net. The standard disclaimer also applies to 
  3434. Max Cottrell and MC Photography.
  3435.  
  3436. @(A): A Verbal Tour
  3437.  
  3438. Let's begin with a visual inspection of the front panel: The plastic 
  3439. panel contains a sticker overlay for the CMD HD, which is located on the 
  3440. left side of the panel. The HD sticker overlay is located next to the 
  3441. C128D's POWER-ON LED on its right. The FD 4000 occupies the right side of 
  3442. the plastic panel. The right side of the plastic front panel is used to 
  3443. house a receptacle for the C128D's built-in 1571 disk drive, with a 
  3444. swinging gate. But, the built-in 1571 drive was removed, and the left 
  3445. side panel was cut and filed smoothly with the correct dimensions to fit 
  3446. a FD 4000 disk drive snugly. (Well,almost.)
  3447.  
  3448. Continuing with the visual inspection, we turn to the left side of the 
  3449. C128D. The metal casing was cut to allow for the fan, power cord and 
  3450. off/on switch to be accessible. If you note the picture carefully, the 
  3451. cuts on the case aren't in perfect sync with the interior. I guess the 
  3452. design won't be winning any art awards anytime soon. ;) The main thing is 
  3453. that I can access the off/on switch, and be able to plug/unplug the power 
  3454. cord without any difficulty. As for the fan opening, a circular opening 
  3455. as shown in the picture is not needed. In fact, a wave of lines cut on 
  3456. the case would be sufficient to allow air circulation. Going to the back 
  3457. end of the C128D, you will see wires snaking out of the receptacle in 
  3458. which the power cord formerly went through.
  3459.  
  3460. @(A): Opening the Hood
  3461.  
  3462. Let's dispense with the visual inspection and actually open the 'hood' of
  3463. the CMD Nirvana computer! Yes, I know it's not a pretty sight and may 
  3464. look daunting to you, but it can be done! From the top view, it looks 
  3465. like the power supply for the C128D has been moved from its original 
  3466. position 90 degrees counterclockwise. The CMD HD motherboard now occupies 
  3467. the lower left corner of the C128D case. The FD 4000 juts across the 
  3468. lower right corner of the C128D front panel and the C128D case. As you 
  3469. can see, the internal 1571 disk drive has been ripped out. Wires are 
  3470. everywhere, but most of them settle down in the blank area in the upper 
  3471. right corner of the C128D case.
  3472.  
  3473. @(A): Digging In
  3474.  
  3475. Ah, where will we start? Let's take a closer look at the plastic front 
  3476. panel of the C128D. The CMD HD front panel was inserted and attached to 
  3477. the plastic front panel of the C128D, and is not attached to the metal 
  3478. case of the C128D. The marriage of the CMD HD front panel and the C128D's 
  3479. plastic front panel was accomplished by four screws and three pieces of 
  3480. plastic. First, I used masking tape to cover the CMD HD's metal case on 
  3481. the front side. This front side already has holes drilled on it by CMD or 
  3482. some OEM manufacturer. I used an X-Acto. knife to cut holes in the 
  3483. masking tape, popping through the holes in the metal case. When finished 
  3484. with the poking of the holes in the masking tape, I have a 'drill image', 
  3485. so I peel off the tape from the CMD HD's metal case, and affix it to the 
  3486. C128D's plastic front panel on the left side. Making sure that 
  3487. everything's aligned, I proceeded to drill holes, following the 'drill 
  3488. image', in the plastic front panel. After peeling off the masking tape, 
  3489. and then doing a test fit with the CMD HD's front panel with its 
  3490. protruding LEDs, and swap buttons,  it was a perfect fit! I then made the 
  3491. connection more solid with four screws and pieces of plastic, by 
  3492. attaching the CMD HD's front panel to the left side of the C128D's 
  3493. plastic front panel. Then, I superimposed the sticker overlay for the CMD 
  3494. HD perfectly with the LED's and the push-buttons, and used spray-on glue 
  3495. to make the overlay a permanent part of the C128D's plastic front panel.
  3496.  
  3497. @(A): Preparing the FD-4000
  3498.       
  3499. As for the FD 4000, I used a saw to cut off portions of the plastic front
  3500. panel of the C128D where the internal 1571 disk enclosure used to be, cut 
  3501. in correct dimensions to fit the FD 4000. It was still rough, so I used a 
  3502. file to smooth the edges, on a gradual basis, until the FD 4000 made a 
  3503. snug fit. I measured the front cavity of the FD 4000 and used those same
  3504. measurements to make the cut on the C128D's plastic front panel on the 
  3505. right side. As you can see from the picture, there is little room for 
  3506. error, especially at the top of the plastic front panel. Generally, the 
  3507. cut was made as far as to the right side of the C128D's plastic front 
  3508. panel as possible.
  3509.  
  3510. @(A): Preparing for the CMD Hard Drive
  3511.         
  3512. Now, to the internals of the C128D. I had to move the power supply
  3513. counterclockwise 90 degrees to make room for the CMD HD. I quickly ran 
  3514. into a snag, as the power connector between the PCB and the power supply 
  3515. was too short. I had to cut off all the wires on the power connector, 
  3516. then enlarged it by soldering all wiring to a cannibalized wiring from a 
  3517. power supply wire to both ends of the power connectors. For further 
  3518. clarification, a close-up of both ends is supplied. The cannibalized 
  3519. power wiring was very convenient, as they were color marked, and it was 
  3520. easy for me to make sure that the wiring corresponded with each end of 
  3521. the power supply connectors. Next, I spliced the +-12 VDC wires on the 
  3522. power supply connector to supply continuous power to the fan. Usually a 
  3523. fan comes with black and red wires. Splice the black wire of the fan to 
  3524. the black wire of the power supply. Splice the red wire of the fan to the 
  3525. yellow wire of the power supply. Next, the fan was attached to the power 
  3526. supply with screws, to the right of the power cord connector.
  3527.  
  3528. The structural improvements to the PCB was made by bending the PCB power
  3529. connector end at a 45 degree angle, for it would collide with the 
  3530. position of the CMD HD's PCB. Last, I connected one end of the entire 
  3531. power supply to the back edge of the C128D's metal case. This was 
  3532. accomplished by bending the end of the power supply at a 90 degree angle 
  3533. and screwing it together to the metal case of the C128D. However, one end 
  3534. of the power supply remained unsupported and would tip over onto the PCB, 
  3535. causing possible malfunctions for the C128D. So, a makeshift support was 
  3536. propped upon the C128D's PCB to support the remaining end of the power 
  3537. supply. This support, like all other supports used, were fitted with 
  3538. black electrical tape at the bottom to prevent shorts on the PCB. The 
  3539. massive heat sink covering the VIC - II chip and the 80 column display 
  3540. chip supported the other end of the power supply.
  3541.  
  3542. @(A): Installing the HD
  3543.  
  3544. With the power supply situated 90 degrees counterclockwise, we now have 
  3545. room to insert the PCB for the CMD HD 85 megger. I took the CMD HD's PCB 
  3546. out of its original metallic case that CMD supplied. (NOTE: If you do 
  3547. that, you may void CMD's warranty on the unit.) But the CMD HD's PCB 
  3548. could not just sit atop the C128D's motherboard, for there may be 
  3549. accidental electrical shorts or other problems. So, the CMD HD's PCB just 
  3550. hovered above the C128D's motherboard by approximately 1/4 of an inch. 
  3551. This was accomplished by erecting two support beams above the C128D's 
  3552. motherboard. The beams were obtained at a hardware store. They are 
  3553. aluminum and are easily malleable with pliers. I screwed down one end of 
  3554. the beam to the middle edge of the motherboard, leaving the other end of 
  3555. the beam covered with electrical tape. I could have screwed down the 
  3556. other end, but might have cut the motherboard in a way that Commodore 
  3557. never intended and screwed up the whole thing. All supports listed in 
  3558. this article are screwed down on existing 'drilled holes' in the c128d's 
  3559. PCB. Please note that the support beam is nearly aligned with the 
  3560. motherboard's power connector. I put electrical tape on top of the 
  3561. support beam, as this top will support the CMD HD's PCB. This is to 
  3562. ensure a smooth operation of the unit without any electrical shorts or 
  3563. other problems.  Also, look at the rear view of the support beam in the 
  3564. picture, for it can give you a clear idea of how tall it is in relation
  3565. to the C128D's motherboard.
  3566.  
  3567. As for the other support beam, it is screwed down on both ends to the
  3568. C128D's motherboard on the far left side. This support beam is taller 
  3569. than the one explained earlier. The reason is that the CMD HD's PCB will 
  3570. be screwed on that support beam, so this support beam would have to be 
  3571. aligned parallel to the top of the first support beam. Then the second 
  3572. support beam is covered with electrical tape and two holes are drilled at 
  3573. both ends, which align perfectly with the CMD's HD PCB's drilled holes. 
  3574. (See photo for further clarification.)
  3575.  
  3576. Finally, to attach the CMD HD's PCB to the two support beams, I made sure
  3577. that both beams were in alignment and supported the PCB in a level 
  3578. fashion, almost parallel to the C128D's motherboard. I attached one end 
  3579. of the CMD HD's PCB, which has no cable connectors, to the second support 
  3580. beam on the far left of the C128D's motherboard. Two screws were used to 
  3581. make a secure connection to the support beam. The other end of the CMD 
  3582. HD's PCB, the one with all the cable connectors, rested on the first 
  3583. support beam, but was not screwed down. It could be done, but as the PCB 
  3584. was already secured, I didn't bother. The cables running out of the CMD 
  3585. HD's PCB are in a tight space, due to the FD 4000. As you may note from 
  3586. the picture, there is no room for the internal 1571. If you decide to do 
  3587. an internal CMD HD operation on your C128D, you must sacrifice your 
  3588. internal 1571 drive.
  3589.  
  3590. @(A): Installing the FD
  3591.  
  3592. With the CMD HD PCB out of the way, I began work on the FD 4000. Before 
  3593. the FD 4000 was inserted, I cut off pin one of the C128D's chip U113. 
  3594. This pin gives a signal that the internal 1571 drive is in existence. 
  3595. With that pin cut, the C128D no longer recognizes the existence of the 
  3596. internal 1571 drive. It will, however, recognize any peripherals using 
  3597. the serial bus, as I use a external 1571 as Drive #8 in my system. I took 
  3598. the FD 4000 mechanism and the motherboard (it's built as a single unit) 
  3599. out of its original case that CMD supplied. (NOTE: Doing so may void 
  3600. CMD's warranty on the FD x000 unit.) I used trial and error to position 
  3601. the FD 4000 drive in the C128D's metal casing. This is to ensure that the 
  3602. FD 4000 would not protrude too far out of the C128D's plastic front 
  3603. panel, or intrude too far inside the C128D's plastic front panel. As you 
  3604. can see from the following picture, the FD 4000 unit protrudes from the 
  3605. C128D's metal case by approximately 1 1/2 inches.
  3606.  
  3607. Lastly, I attached a support beam to the bottom right in front of the
  3608. C128D's metal case. This involved some cutting on the edge of the bottom 
  3609. of the C128D's metal case in order to make the FD 4000 fit the C128D's 
  3610. metal case. The bottom edge of the C128D's metal case was not cut out 
  3611. completely, rather, it was bent inwards with pliers, creating a small 
  3612. surface for the FD 4000 to rest upon. Again, trial and error was used to 
  3613. determine how much to cut and bend the bottom edge, so that the FD 4000 
  3614. unit would fit the C128D's metal case and the plastic front panel. 
  3615. Finally, the FD 4000 unit was screwed upon the support beam. This FD 4000 
  3616. also rests upon the bent in bottom edge. This creates a stable surface 
  3617. for the FD 4000 unit to operate without having to insert a second support 
  3618. beam onto the C128D's motherboard to support the other edge of the FD 
  3619. 4000 unit.
  3620.  
  3621. Finally, I connected the cables to the CMD HD's PCB and the FD 4000, and 
  3622. attached the ribbon cables to the CMD HD's PCB, including that of the 
  3623. hard disk drive and the front panel controls. I extended the length of 
  3624. the power-on LED wire for the C128D's power supply. This extension was 
  3625. made by adding more wire and resoldering the connections. This was 
  3626. necessitated because the 90 degree turn of the power supply made all the 
  3627. wiring too short. :( Ah, the wisdom of CBM to cut costs by making 
  3628. everything short and sweet! I made sure that the CMD HD and the FD 4000's 
  3629. on/off switches were already in the ON position. Last, I bought Velcro. 
  3630. from an art supply store, and liberally applied it to the CMD HD 85 MB 
  3631. drive mechanism. The opposite end of the Velcro. attachment was pasted on 
  3632. the inside of the top metallic case of the C128D. This was positioned 
  3633. roughly 3 inches from the front edge of the top metallic case. Trial and 
  3634. error was used here to determine the optimum measurements. The CMD HD 85 
  3635. mechanism was then attached to the inside of the top metallic case of the 
  3636. C128D unit by Velcro.. This is a safe method, for the CMD HD has been 
  3637. running for almost a year without any glitches. Close the case carefully 
  3638. (The HD is on the case, after all!), and attach all the power to a power 
  3639. control center with individual switches. The individual switches then can 
  3640. be used to control a specific peripheral such as the internal FD 4000 or 
  3641. the CMD HD 85, without having to open the unit to access the off/on 
  3642. switches, or drilling holes in the case of the C128D to attach these same 
  3643. switches. Convenient, isnt it?
  3644.  
  3645. @(A): Lessons Learned
  3646.  
  3647. Before concluding the article, it seems possible that one could put a 
  3648. 1581 drive in lieu of the FD x000 drives. It's possible, but I do not own 
  3649. a 1581, so I really cannot comment. I would guess that the general 
  3650. guidelines for the FD x000 drives would apply to the 1581. Granted, all 
  3651. of this looks quick and dirty. But when I first started out with this 
  3652. project with Al Anger, we didn't have step-by-step manuals, or other 
  3653. references.  It was truly a new territory for me. (Al has already done 
  3654. such hacks for his C= computers before me, and his experience was 
  3655. invaluable.) However, there were some bloopers.  One, the c128d died upon 
  3656. powering up. It turned out that the fan +- 12 VDC wiring was connected to 
  3657. the wrong wire, and shut down the system. With that fixed, the c128d 
  3658. powered up okay, but now, the CMD HD died. If that wasn't frustrating 
  3659. enough, it was difficult to find out what went wrong, and I was wondering 
  3660. if the FD 4000 would be next.  The culprit was a break on the CMD HD PCB. 
  3661. I accidentally drilled a cut on the PCB. With some soldering, I fixed it 
  3662. by building a bridge between the break in the CMD HD PCB. Whew! 
  3663. Everything now worked, and has worked since. Consider those bloopers 
  3664. invaluable lessons learned in dealing with sensitive electronic 
  3665. circuitry.
  3666.  
  3667. @(A): Conclusion
  3668.  
  3669. These are just general guidelines and are meant for entertainment 
  3670. purposes only. It serves as an inspiration to those who always dreamed of 
  3671. building their own C= beasts. I'm sure that there are countless users 
  3672. that have customized their computers, and with these general guidelines, 
  3673. undoubtedly, some users will want to create such a monster with rich C= 8 
  3674. bit computing power! 
  3675.  
  3676. @(A): Postscript
  3677.  
  3678. For those Commodore users who do not have access to graphical browsers,
  3679. you can contact the author for a Word v7.0 document printout with
  3680. pictures. The cost is $3 dollars for people living in the U.S. Canadian
  3681. readers will have to pay slightly more in U.S. dollars.
  3682.  
  3683. =========================================================================
  3684.                                      
  3685. @(#)surf: Hack Surfing 
  3686.    
  3687. For those who can access that great expanse of area called the World 
  3688. Wide Web, here are some new places to visit that are of interest to the 
  3689. Commodore community.  In early 1994, when the US Commodore WWW Site 
  3690. started, the number of sites online that catered to Commodore numbered 
  3691. in the 10's.  Now, the number is in the 100's.  What a change. 
  3692.  
  3693. If you know of a site that is not listed here, please feel free to send 
  3694. it to the magazine.  The following links have been gleaned from those 
  3695. recently changed or added to _CaBooM! - Your One Stop Commodore Links Site_.
  3696. (http://www.msen.com/~brain/cbmlinks/).   
  3697.  
  3698. To encourage these sites to strive to continually enhance their 
  3699. creations, and because we like to gripe :-), we'll point out  
  3700. improvements that could be made at each site.  
  3701.  
  3702. @(A): Companies 
  3703.  
  3704. o  Centsible Software
  3705.    URL: http://home.sprynet.com/sprynet/cents/
  3706.    Centsible Software has been a common name in Used Software Distribution
  3707.    for a while now.  their WWW Site contains catalogs for the different
  3708.    platforms they support.  C=Hacking gripe:  Although the site is
  3709.    very informative and works well for either text or graphical
  3710.    browsers, it is rather plain.  A bit of text here and some judicious
  3711.    use of HTML 1.0 tags would spice it up immensely.  Text Browser 
  3712.    compatibility shouldn't force WWW sites to be dull.
  3713.  
  3714. o  Arkanix Labs, Inc.
  3715.    URL: http://www.arkanixlabs.com/
  3716.    Arkanix Labs recently purchased Threshold Productions International in
  3717.    order to expand their presence in the Commodore Market.  They have a 
  3718.    stocked WWW Site, complete with a catalog and recent news press
  3719.    releases.  C=H gripe: For the graphical set, the site is heavy
  3720.    on graphics, although it does offer text link alternatives.
  3721.  
  3722. o  Herne Data Systems, Inc.
  3723.    URL: http://ourworld.compuserve.com/homepages/herne_data/cpm.htm
  3724.    In the 1980's, HDS created some utilities for the C128's CP/M
  3725.    mode.  Jugg'ler 128 allowed the CP/M user to read over 140 different
  3726.    disk formats, while Scramb'ler 128 encrypted files and disks.  Although
  3727.    HDS doesn't support these products anymore, they do provide them
  3728.    and numerous reference works on their WWW Site.  C=H gripe: text
  3729.    based browsers might not handle the HTML TABLE very well.
  3730.  
  3731. @(A): Demo Groups 
  3732.  
  3733. o  Demolition
  3734.    URL: http://www.cei.net/~rreed/
  3735.    As the Webmaster puts it, " Demolition is currently more of a concept
  3736.    than anything."  Demolition is slated to become a disk based demo
  3737.    programming resource magazine.  However, at present, the site contains
  3738.    a few articles on topics like boolean logic and VIC internals.  In
  3739.    addition, the site contains a comprehensive bibliography of basic and
  3740.    demo related programming articles. C=H gripe: The bibliography is on
  3741.    the main page, making it a lengthy piece of text.
  3742.    
  3743. @(A): Reference Works 
  3744.  
  3745. o  The Commodore Web Ring
  3746.    URL: http://www.ncf.carleton.ca/~ag090/HomePage.ringpage.html
  3747.    Although not a WWW site per se, this site starts you off on a journey
  3748.    through various Commodore WWW sites.  It's entertaining and will
  3749.    undoubtedly take you somewhere you wouldn't have been before. C=H 
  3750.    gripe: Graphical surfers might find the large "buttons" annoying.
  3751.  
  3752. o  Info and Files for Commodore GEOS
  3753.    URL: http://www.radiks.net/irv_cobb/geos2.html
  3754.    This, a sub page under Irv Cobb's home page, offers various GEOS
  3755.    utilities that were either programmed by Irv or that he finds useful. GEOS
  3756.    users should bookmark this page.  C=H gripe: As above.  A bit of
  3757.    HTML 1.0 would spice this page right up.
  3758.  
  3759. o  The History of Commodore
  3760.    URL: http://www.geocities.com/SiliconValley/Heights/8329/History.html
  3761.    A sub page of "The Commodore Haven", this sites gives the low-down
  3762.    on Commodore, from its inception to its demise. C=H gripe: well done
  3763.    page.
  3764.  
  3765. o  Commodore Pictures
  3766.    URL: http://www.swt.edu/~ez13942/commie/cbmpics.htm
  3767.    Although the author of the page is not mentioned, he takes us on a tour
  3768.    of his various Commodore computer systems.  It's always interesting
  3769.    to see how folks use their machine. C=H gripe:  The graphics and the
  3770.    captions are all on one page, which makes the page a bit lengthy.  
  3771.  
  3772. o  The KIM-1 page
  3773.    URL: http://www.magic.ca/~yhpun/ianpun.html
  3774.    For anyone who doesn't know what a KIM is or how it relates to Commodore,
  3775.    this page is for you.  Featuring pictures and explanations of both
  3776.    the KIM-1 and the author's home-made expansion board, this site offers
  3777.    a glimpse of the life of the 6502 pre-CBM. C=H gripe: The KIM-1 stuff
  3778.    is on the same page as the author's personal and business information.
  3779.  
  3780. o  CBMSearch - a search engine for searching Commodore related software. 
  3781.    URL: http://www.ts.umu.se/~yak/cccc/cbmsearch/
  3782.    Bookmark this site.  Now.  Offering a concise way to find Commodore
  3783.    software quickly and easily, CBMSearch can relieve the headache of
  3784.    trying to find CBM titles on the Internet. C=H gripe: Can't really
  3785.    say there is a gripe.  The page is concise and could be spruced up
  3786.    a bit, but in this case, function overrules form.
  3787.  
  3788. @(A): User Groups
  3789.  
  3790. o  Bronx User's Group (BUG) 
  3791.    URL: http://www.mediaworks.com/bug/
  3792.    As Commodore Authorized User Group #0065, BUG's WWW site contains
  3793.    links to mail each of the officers and some links to other sites.
  3794.    A phone number is given for information.  C=H gripe:  The site's a
  3795.    bit low on content.  We applaud the presence, but a map or some info
  3796.    about the group would be nice.
  3797.  
  3798. o  Stone Mountain User's Group - Contains information on when and where we meet. 
  3799.    URL: http://www.cris.com/~Derektp/
  3800.    Although supporting all orphaned computer systems, SMUG (love the 
  3801.    acronym) appears to focus on the CBM systems and contains information
  3802.    on meeting places and times.  C=H gripe: As above, the content is a bit
  3803.    low, but at least directions and times are given.
  3804.  
  3805. o  ICPUG Independent Commodore Products User Group
  3806.    URL: http://www.icpug.org.uk/
  3807.    Although not devoted exclusively to the CBM 8-bit line, ICPUG does
  3808.    support them.  A wealth of information, including the ability to join
  3809.    and club news is available.  C=H gripe:  For the graphical set, the
  3810.    site is a bit heavy on graphics. (For these sites, viewing with Lynx
  3811.    offers faster response.)
  3812.  
  3813. @(A): Individual Commodore Users 
  3814.  
  3815. o  Commie web page -- Better red than IBM 
  3816.    URL: http://www.swt.edu/~ez13942/commie/
  3817.    Bo Zimmerman titles his page this peculiar way.  He offers some history
  3818.    on his use of Commodore systems and offers some pictures of his
  3819.    various equipment.  He also presents the Commodore Pictures page,
  3820.    detailed above. C=H gripe: the background makes for hard reading on
  3821.    some graphical browsers.
  3822.    
  3823. o  Don's Page
  3824.    URL: http://people.delphi.com/novan/
  3825.    In an effort to offer people with text browsers some picture content,
  3826.    Don has included ASCII art in his page.  We are impressed.  Basically,
  3827.    the site details Don's hobbies and how the Commodore fits in. C=H
  3828.    gripe:  We really think the ASCII is great, but there's no reason to
  3829.    make all the text in the document mono-spaced.
  3830.  
  3831. o  Dave's Commodore 64 page
  3832.    URL: http://www.csun.edu/~hbbuse08/c64.html
  3833.    This page is for those looking for game information, SID tunes, and
  3834.    emulators.  (Note: some of the files on this site are copyrighted.)
  3835.    C=H gripe:  The top says "This page looks best when viewed with 
  3836.    Microsoft's Internet Explorer or Netscape!"
  3837.  
  3838. o  John Elliott's Home Page
  3839.    URL: http://www.nsis.com/~prof/
  3840.    John has a very extensive site detailing computers in education, 
  3841.    including a piece on using "obsolete computers" in the classroom.
  3842.    A number of pieces available on the site include education conference
  3843.    highlights, and a discussion of how he finally hooked up to the
  3844.    Internet.  The site is best viewed with Lynx, as it is enhanced for
  3845.    Lynx! (that's a switch) C=H gripe:  The layout of the pages seems a
  3846.    bit haphazard, but maybe it's just us.
  3847.  
  3848. o  Irv Cobb's home page
  3849.    URL: http://www.radiks.net/irv_cobb/
  3850.    If you want to know about Irv or where he grew up, it's all here.  
  3851.    Hyperlinks are spread throughout the text to direct you to different
  3852.    topics.  C=H gripe: none.  Although it isn't as "splashy" as some
  3853.    pages, it is laid out well, and looks fine, although simplistic, on a
  3854.    graphical browser.
  3855.  
  3856. o  Commodore 64 Online
  3857.    URL: http://www.geocities.com/SiliconValley/Park/4645/
  3858.    Tim Plelp's site is brimming with links to his favorite utilities and
  3859.    applications. Also included is a comprehensive list of PD/Shareware
  3860.    titles. C=H gripe: use unordered lists instead of "*" for the various
  3861.    items.
  3862.  
  3863. o  Commodore Connection
  3864.    URL: http://www.gis.net/~sunfish/crcbm.html
  3865.    Geoff Sullivan's  personal site offers articles and software to make
  3866.    using a C64 or 128 more enjoyable.  Besides links to other sites, 
  3867.    he also offers up Perfect Print fonts and articles on how to expand your
  3868.    REU to 2MB and how to build a simple RS-232 converter. Of special
  3869.    interest is a collection of customized GEOS mouse pointer icons and a
  3870.    program called QWIKSTASH that will copy files in GEOS on bootup.
  3871.    C=H gripe: Great resource, but little information about Geoff and how
  3872.    he uses his CBM.
  3873.  
  3874. =========================================================================
  3875.  
  3876. @(#)jb: Jim Butterfield: The Commodore Guru - An Interview 
  3877.         by Jim Lawless (jimbos@radiks.net)
  3878.                
  3879. @(A): Introduction
  3880.  
  3881. My initial interest in the Commodore 64 computer began in 1983.  At the  
  3882. time, my primary source of information pertaining to the C64 came from 
  3883. Compute! and Compute!'s Gazette publications.  One author's name stood 
  3884. from the rest; Jim Butterfield. 
  3885.  
  3886. I used to turn to Jim's articles immediately when I managed to get my 
  3887. hands on a new magazine.  Mr. Butterfield has the rare ability to  
  3888. describe complex subjects in simple terms. 
  3889.  
  3890. I'm certain that I'm not alone when I credit Jim with having taught me 
  3891. a lot about the inner workings of the Commodore 64.  As important as 
  3892. the specifics of writing code for the C64 was Jim's style.  He would  
  3893. often write code that was readily portable to multiple CBM machines.   
  3894. His code had longevity and purpose.  The solidity of his programs left  
  3895. me with a lasting impression pertaining to how software should be  
  3896. developed. 
  3897.  
  3898. The following interview with Jim was conducted via e-mail. 
  3899.  
  3900. Q: What was the first programming language that you learned?  
  3901.   
  3902. A: In about 1963, an assembly language called COGENT for a computer that  
  3903. few people have ever heard of: a Collins Radio C-8401. That was shortly  
  3904. followed by work on an IBM 1401, which had a machine language that was  
  3905. alphanumeric. (Honest! You could keypunch M/L directly!)  
  3906.  
  3907. Q: Were numbers expressed in Base-36?  
  3908.   
  3909. A: No. Decimal.  
  3910.   
  3911. The basic machine had 1000 bytes (not 1K) of (7-bit) memory (core, not  
  3912. RAM!) so addresses ranged from 000 to 999 (and were given in decimal, of  
  3913. course). Expanded machines had 4K, then 16K ... the addresses were  
  3914. slightly more complex in that case.  
  3915.  
  3916. Thus, to move bytes from an area at, say address 123 to address 456 the  
  3917. instruction would be M123456. I AM NOT MAKING THIS UP!!!!  
  3918.  
  3919. Q: Did you guys have contests to spell out goofy words as part of a  
  3920. program? (I know of a programmer who used to regularly use the return  
  3921. code $0BAD to indicate a problem...)  
  3922.  
  3923. A: No (the addresses mixed in with the op codes ruled that out), but you  
  3924. could do fun things on a 1401 if the system manager wasn't looking ..  
  3925. such as play music.  
  3926.  
  3927. Q: What was the first computer that you owned?  
  3928.   
  3929. A: Not counting the TUTAC-1, which was powered by rubber bands and was  
  3930. more correctly a logic machine: The KIM-1, a single-board microcomputer  
  3931. made by MOS Technologies, Inc., of Norristown PA. MOS Technologies was  
  3932. subsequently acquired by Commodore.  
  3933.  
  3934. Q: When did you first encounter a Commodore computer?  
  3935.   
  3936. A: When Commodore acquired MOS Technologies, the computer that I had  
  3937. owned for over a year became a Commodore computer. Subsequently, an  
  3938. employee of MOS Technologies, Chuck Peddle, convinced Jack Tramiel of  
  3939. Commodore that they should launch a personal computer called "The PET".  
  3940. I got one of those not long after they started production.  
  3941.  
  3942. Q: Did you have formal training in computer programming?  
  3943.   
  3944. A: Yes, on that long-ago Collins C-8401. But this was more a process- 
  3945. control machine; it didn't use of any the newfangled (at the time)  
  3946. languages such as Fortran and Cobol. So my training was in machine  
  3947. language/assembler.  
  3948.  
  3949. Q: What was the first book that you wrote?  
  3950.   
  3951. A: A couple of enthusiasts and I collaborated on a volume called "The  
  3952. First Book of KIM", a book describing how to do things with the KIM-1  
  3953. single board computer. That computer was powered by a 6502,by the way;  
  3954. in fact the KIM-1 board itself was designed as a engineering prototype  
  3955. for people who wanted to try out the chip.  
  3956.  
  3957. Q: Was it similar to the Altair where you had to manually increment an  
  3958. address-counter before you could throw the switches to set the byte at  
  3959. that address?  
  3960.  
  3961. A: No, the KIM-1 had an operating system in ROM. That's one of the  
  3962. things that made all KIM users "equal" and able to share programs, while  
  3963. the other early micro owners had quite a scattering of stuff.  
  3964.  
  3965. Q: What COULD you do with a KIM-1?  
  3966.   
  3967. A: Hey, watch it! That's like saying, "What could you do with a  
  3968. Commodore 64"? Although the KIM-1 came with a hexadecimal keypad rather  
  3969. than a keyboard, and output to a six-digit LED display, you could use  
  3970. those to good advantage AND hook up extra stuff. Play music? Play  
  3971. Blackjack? Hunt the Wumpus? Skeet shoot? Unless you had the budget for a  
  3972. printer, you'd have a hard time doing an accounts receivable, of course.  
  3973. But this is the 6502 we're talking about! And we all know it can do  
  3974. ANYTHING!  
  3975.  
  3976. Q: What was the last book that you wrote?  
  3977.   
  3978. A: It's probably the revised version of "Machine Language For the  
  3979. Commodore 64, 128, and Other Commodore Computers". In 1985 and 1986,  
  3980. however, I did produce a "pocket diary" reference guide for Commodore 8- 
  3981. bit computers.  
  3982.  
  3983. Q: Have you ever written articles or books on subjects that are not  
  3984. computer-related?  
  3985.  
  3986. A: My first writing experience was a treatise on transistor theory,  
  3987. published by Popular Electronics in August of 1959. Not much else.  
  3988.  
  3989. Q: Did you write commercial software for any of the Commodore computers?  
  3990.  
  3991. A: As a general rule, no. All my stuff is public domain. At one time, I  
  3992. had written a simple spell-checking engine that was incorporated into a  
  3993. word processing package for a while.  
  3994.  
  3995. Q: SuperMon was a tool that I used daily when developing ML routines or  
  3996. exploring the C64. What prompted you to write SuperMon?  
  3997.  
  3998. A: In the early days of Commodore personal computers, there were quite a  
  3999. few machine language monitors around. They were partly based on some  
  4000. publicly published code by Steve Wozniak (of Apple!), and partly based  
  4001. on the MOS Technology TIM monitor, from KIM-1 days.  
  4002.  
  4003. Two variants of the basic monitor caught my eye: NewMon, which added  
  4004. several useful features to the basic Machine Language Monitor; and  
  4005. HiMon, which sited the monitor in upper memory where it wouldn't  
  4006. conflict with BASIC programs. I decided to put the two together and  
  4007. generate a self-relocating MLM. That was desirable in early PET/CBM  
  4008. days, where some computers would come with 8K RAM, some with 16K, and  
  4009. others with 32K; you couldn't assume where the top of memory would be.  
  4010.  
  4011. In those days, almost every Commodore computer came with a small built- 
  4012. in MLM, and the first Supermon was an add-on. Later, as Commodore  
  4013. changed the style of the MLM packages they built into newer machines  
  4014. such as the 128, I went back and modified those earlier versions so that  
  4015. they would work the same across all platforms.  
  4016.  
  4017. Q: Did you ever expand the mini-assembler in SuperMon into a full-blown  
  4018. assembler development package?  
  4019.  
  4020. A: No. I hustled Brad Templeton into writing PAL, so that there would be  
  4021. an assembler available for those who needed it. There had been a few  
  4022. assemblers around before that - Commodore had one, and another was the  
  4023. MAE system - but I was sure that somebody like Brad could do better.  
  4024.  
  4025. Q: Even Superman had to put up with Kryptonite. Describe your worst  
  4026. experience as a software developer / technical writer.  
  4027.  
  4028. A: My first publication of SuperMon in Compute! magazine had the wrong  
  4029. end-of-address supplied (my fault). I got a LOT of mail and phone calls  
  4030. on that one.  
  4031.  
  4032. Q: I had heard a rumor pertaining to your software development habits  
  4033. that indicated you would approach a given project with full force. You  
  4034. would focus your undivided attention on it until it was complete. Is  
  4035. this rumor accurate?  
  4036.  
  4037. A: Possibly. If I have a project under way, it "follows me around" until  
  4038. it's complete; I fret over it and can't put it away until all the pieces  
  4039. are in place.  
  4040.  
  4041. Q: If so, did you ever change this methodology?  
  4042.  
  4043. A: Not to any great extent. A half-written program bugs me, and I won't  
  4044. rest until it's finished.  
  4045.  
  4046. I might, however, decide that I'm taking the wrong track, and scrap a  
  4047. program completely in order to start over. This isn't a loss: the first  
  4048. attempt can show you what's really wanted.  
  4049.  
  4050. Q: Your articles made you seem a bit omniscient. You always had the  
  4051. inside info on the newest CBM computers and always seemed to be able to  
  4052. explain their complexities in a manner that would suggest that you had a  
  4053. lot of time to study them. I don't know a whole lot about your  
  4054. employment during the mid/late 80's. Were you affiliated with CBM? A  
  4055. beta-tester?  
  4056.  
  4057. A: I had many friends in Commodore Canada, but I never worked for the  
  4058. company, although I did contract work for them on occasion.  
  4059.  
  4060. The big problem was not getting information from Commodore; it was  
  4061. learning to ignore most of it. Commodore was bubbling over with ideas  
  4062. and plans that never came to fruition. There was no point in writing  
  4063. about projects that never happened (the Commodore music box? the cash  
  4064. register? the videotape/disk storage device?). I took the position:  
  4065. "Don't tell me about it until it's a real product!".  
  4066.  
  4067. Commodore Canada was an excellent source of information, and I relied on  
  4068. them to keep me from straying too far into technical speculation.  
  4069.  
  4070. Q: Did you use any high-level languages on CBM computers?  
  4071.  
  4072. A: BASIC, of course. COMAL, a BASIC derivative language from Denmark,  
  4073. was nicely constructed. Played around a little with C, but that language  
  4074. doesn't fit comfortably into an 8-bit environment.  
  4075.  
  4076. Q: What was your favorite computer that CBM produced?  
  4077.  
  4078. A: I don't know that I have a single favorite. The early PET/CBM  
  4079. machines were great "discovery" platforms, where we could investigate  
  4080. these wonderful new computers. The advent of the VIC-20 and the  
  4081. Commodore 64 brought color and sound, which added to the charm of these  
  4082. home computers; but they paid a penalty in slow disk access and screen  
  4083. width limitations. Today, perhaps the Commodore 128 ranks as the best,  
  4084. or at least the computer with most general usability. But it wasn't  
  4085. produced in quantities as great as some of the earlier machines, and so  
  4086. the user community hasn't been quite as furious.  
  4087.  
  4088. Q: What kind of home computer do you currently use?  
  4089.  
  4090. A: C128 .. Amiga .. Pentium system. All three.  
  4091.  
  4092. Q: Who were your influences as related to writing?  
  4093.  
  4094. A: Nobody specific. Just tried to write it as I would say it.  
  4095.  
  4096. Q: Who were your influences as related to programming?  
  4097.  
  4098. A: I've worked with a lot of sharp programmers over the years. Not one I  
  4099. can pick out especially.  
  4100.  
  4101. Q: If you could relive the CBM glory years, would you do anything  
  4102. differently?  
  4103.  
  4104. A: I don't think so. On another path, I could have gone for big bucks;  
  4105. but making money carries a responsibility to support and service, and  
  4106. that would have taken the fun out of it.  
  4107.  
  4108. Q: Is your current job computer-related?  
  4109.  
  4110. A: I'm currently more or less retired.  
  4111.  
  4112. Q: If you had not chosen a career in computing, what field of endeavor  
  4113. would you most likely have pursued?  
  4114.  
  4115. A: Before computers, I worked in electronics and telecommunications.  
  4116.  
  4117. Q: What are your current hobbies?  
  4118.  
  4119. A: Reading; travel; films; raising my daughter. (That's a hobby???)  
  4120.  
  4121. Q: What sort of technical literature do you currently read?  
  4122.  
  4123. A: Mostly reference material. Current magazines are heavy on the "what's  
  4124. for sale" stream; to my mind, that's not the fun part of computing.  
  4125.  
  4126. Q: Are you surprised that a sort of "CBM renaissance" has been taking  
  4127. place the last few years ( ...availability of C64 emulators on multiple  
  4128. platforms and such...the SuperCPU from CMD...).  
  4129.  
  4130. A: It's a shame that Commodore wasn't able to/interested in keeping the  
  4131. 8-bit line going. It's good to see that is happening.  
  4132.  
  4133. Surprised? A little. But enthusiasts and user groups have always had a  
  4134. stronger effect than manufacturers are willing to admit.  
  4135.  
  4136. Q: What is your opinion on the way consumer computing has evolved since  
  4137. the inception of the early PET machines?  
  4138.  
  4139. A: The average computer user today has a lot less fun than we still have  
  4140. with the early machines. The industry message today is "Buy it and use  
  4141. it, and then turn it off .. don't worry or think about how it all  
  4142. works". That's sure a lot less fun for tinkerers.  
  4143.  
  4144. Q: What words of wisdom would you care to impart on a new (or  
  4145. revitalized) generation of CBM hackers?  
  4146.  
  4147. A: Enjoy what you're doing! If it becomes drudgery, you're doing it  
  4148. wrong!  
  4149.  
  4150. =========================================================================
  4151.  
  4152. @(#)trivia: Commodore Trivia
  4153.             by Jim Brain (j.brain@ieee.org)
  4154.                     
  4155. @(A): Introduction
  4156.  
  4157. As some may know, these questions are part of a contest held each month on
  4158. the Internet, in which the winner receives a donated prize.  I encourage
  4159. those who can received the newest editions of trivia to enter the contest.
  4160.  
  4161. This article contains the questions and answers for trivia editions #29-32,
  4162. with questions for edition #33.
  4163.                                       
  4164. If you wish, you can subscribe to the trivia mailing list and receive the
  4165. newest editions of the trivia via Internet email.  To add your name to the
  4166. list, please mail a message:
  4167.    
  4168. To: brain@mail.msen.com
  4169. Subject: MAILSERV
  4170. Body:
  4171. subscribe trivia Firstname Lastname
  4172. help
  4173. quit
  4174.    
  4175. @(A): Trivia Questions and Answers
  4176.  
  4177.         This edition should be sub-titled "Programmer's Trivia".
  4178.            
  4179. Q $1C0) What are the two configurations for the LORAM, HIRAM, GAME, and EXROM
  4180.         pins that will allow the use of a full 64kB of RAM in the C64?
  4181.         
  4182. A $1C0) There are actually 4 configurations, in two categories:
  4183.  
  4184.         LORAM   0   0   (X means either 1 or 0)
  4185.         HIRAM   0   0
  4186.         GAME    1   X
  4187.         EXROM   X   0
  4188.         
  4189. Q $1C1) What is the first thing that the C64 (and VIC) KERNAL does upon
  4190.         powerup?
  4191.         
  4192. A $1C1) The first thing each does is reset the stack pointer to $ff.
  4193.      
  4194. Q $1C2) What KERNAL routine is used to set a DOS channel to input?  
  4195.         
  4196. A $1C2) CHKIN ($ffc6)
  4197.      
  4198. Q $1C3) What KERNAL routine is used to set a DOS channel to output?  
  4199.         
  4200. A $1C3) CHKOUT ($ffc9)
  4201.      
  4202. Q $1C4) Before calling the routines in $1C2 and $1C3, what register must
  4203.         you load?
  4204.         
  4205. A $1C4) You must load .X with the logical file number.
  4206.      
  4207. Q $1C5) What 3 devices can the KERNAL NOT load from?
  4208.         
  4209. A $1C5) keyboard (0), RS-232 (2), or screen (3).  The first and last are
  4210.         somewhat obvious, but allowing RS-232 loads would have made
  4211.         loading from a remote machine possible.  Incidentally, you can't
  4212.         save to any of these devices, either.
  4213.      
  4214. Q $1C6) In the Commodore KERNAL, there are "high" and "low" level routines.
  4215.         To which class of routines does "SECOND" belong?
  4216.         
  4217. A $1C6) low.  It is used to specify the secondary address, as the '7' in
  4218.         open 4,4,7.
  4219.      
  4220. Q $1C7) If a programmer calls the KERNAL routine "STOP" and the RUN/STOP
  4221.         key is NOT pressed, what is returned in the .A register?
  4222.         
  4223. A $1C7) .A will contain a byte representing the last row of the keyboard
  4224.         scan.
  4225.      
  4226. Q $1C8) The Commodore KERNAL routines are all accessed via a jump table.
  4227.         What routine is used to change the values in the KERNAL jump table?
  4228.         
  4229. A $1C8) The appropriately named VECTOR ($ff8d) call, which few programmers
  4230.         actually use.
  4231.      
  4232. Q $1C9) A call is made to a KERNAL routine, the call returns with the C
  4233.         bit set and the .A register holds $02.  What error does this 
  4234.         indicate?
  4235.         
  4236. A $1C9) "File already open"
  4237.            
  4238. Q $1CA) If a call to READST is made, and a $40 is returned in .A, what 
  4239.         does this indicate?
  4240.         
  4241. A $1CA) End of File.
  4242.               
  4243. Q $1CB) What routine can be called to determine the physical format of the
  4244.         Commodore 64 screen in characters?
  4245.         
  4246. A $1CB) The also appropriately named SCREEN ($ffed) call.
  4247.      
  4248. Q $1CC) The Commodore 64 starts a non-destructive RAM test at what location?
  4249.         
  4250. A $1CC) $0300.
  4251.      
  4252. Q $1CD) Which way does the RAM test proceed: up or down?
  4253.         
  4254. A $1CD) up.
  4255.      
  4256. Q $1CE) Which KERNAL routine is used ONLY in conjunction with a Commodore
  4257.         IEEE card? 
  4258.            
  4259. A $1CE) SETTMO ($ffa2), which sets the IEEE bus card timeout flag.  I infer
  4260.         that Commodore thought many people would use the IEEE interface.
  4261.         (Anyone know any more about this?)
  4262.      
  4263. Q $1CF) Many hybrid BASIC/ML programs use SYS to transfer control from BASIC
  4264.         to ML.  However, a few use USR(X).  When using the latter function,
  4265.         where does BASIC fetch the ML routine's starting address from?
  4266.  
  4267. A $1CF) 785 and 786, in classic LO:HI format.
  4268.      
  4269.         The "BASIC" Trivia Set
  4270.                        
  4271. Q $1D0) To load a program from the current location on a cassette tape, what
  4272.         two key combination must a user press on a VIC-20 or C64.
  4273.         
  4274. A $1D0) SHIFT and the RUN/STOP key.  Note that the same key sequence loads
  4275.         a file from disk on the SX-64 or C128 in 128 mode.
  4276.  
  4277. Q $1D1) If I issue the BASIC statement OPEN "JIM,S,W", What type of file
  4278.         am I opening?
  4279.         
  4280. A $1D1) A sequential file.
  4281.      
  4282. Q $1D2) Is BASIC in the Commodore computer systems an "interpreted" or 
  4283.         "compiled" language
  4284.         
  4285. A $1D2) interpreted.  When a program has been "Blitzed!", it is then
  4286.         compiled.
  4287.      
  4288. Q $1D3) What type of variable is A%?
  4289.         
  4290. A $1D3) An integer variable.
  4291.      
  4292. Q $1D4) If I issue the BASIC line PRINT:PRINT "A","B" what column does
  4293.         the "B" show up on when run on a C64?
  4294.         
  4295. A $1D4) Column 11, if we number columns from 1.
  4296.      
  4297. Q $1D5) What column does "B" show up on if I run the BASIC line in $1D4 on
  4298.         a VIC-20?
  4299.         
  4300. A $1D5) Column 12.  Since the VIC has 22 columns, the natural column spacing
  4301.         was 11 positions, instead of 10 on 40 and 80 column CBMs.
  4302.      
  4303. Q $1D6) Alphebetically, what is the first BASIC 2.0 command to have a 3 
  4304.         letter abbreviation?
  4305.               
  4306. A $1D6) CLOSE.
  4307.      
  4308. Q $1D7) How many times does the statement FOR T=1TO0 execute?
  4309.         
  4310. A $1D7) once.  A BASIC for loop always executes at least once.  This is
  4311.         different from languages like 'C', which would not execute the loop
  4312.         at all.  Feature or bug, who knows...
  4313.      
  4314. Q $1D8) What base does the BASIC LOG command use for its logarithm 
  4315.         function?
  4316.         
  4317. A $1D8) base e. (2.7....)  (one of the entrants claims that "e" in the 64 
  4318.         isn't quite as accurate as we think.  He was quoting 2.85....
  4319.      
  4320. Q $1D9) A = NOT B can be written as which expression:
  4321.          
  4322.         a) A = -B
  4323.         b) A = -(B+1)
  4324.                 
  4325. A $1D9) b.  NOT computes the twos-complement of the number, not the simple
  4326.         ones-complement negation.  This feature simpleifies subtraction in a
  4327.         CPU, since subtractions can be performed as additions.
  4328.      
  4329. Q $1DA) What does INT(-15.43) return?
  4330.         
  4331. A $1DA) -16.  INT returns the next LOWER integer.
  4332.      
  4333. Q $1DB) What does ASC$("JIM") return?
  4334.               
  4335. A $1DB) ASC$ returns an error.  That's what I get for writing these late
  4336.         at night. What I menat was "ASC", returns the value of the first 
  4337.         character of a string, in this case 'J'.  Since I didn't specify 
  4338.         if this was a uppercase 'j' or lowercase 'J' in graphics mode, the 
  4339.         result could either be 74 or 202.
  4340.                            
  4341. Q $1DC) What is the abbreviation for GET#?
  4342.         
  4343. A $1DC) Technically, there is none.  However, on the C128 at least, GET#
  4344.         shares the same token as GET, so typing gE# will indeed work.
  4345.         This is different from PRINT and PRINT#, which have different
  4346.         tokens.
  4347.                   
  4348. Q $1DD) What is the largest integer value that Commodore BASIC can handle?
  4349.         
  4350. A $1DD) Again, this was a little ambiguous.  I was looking for the maximum
  4351.         value that an integer variable can hold, which is 32767, but line
  4352.         numbers (which are integers) can be up to 63999.
  4353.                                          
  4354. Q $1DE) What is the ONLY Commodore Editor key not affected by "quote mode"
  4355.  
  4356. A $1DE) The DEL key.  I would have answered return, but the 64 PRG spells
  4357.         it out that only this key is unaffected.
  4358.      
  4359. Q $1DF) What is the range of RND?
  4360.  
  4361. A $1DF) 0.0 <= RND < 1.0, or [0,1).  Both mean that the range is from 0 to
  4362.         1, including 0, but not 1.0.
  4363.  
  4364.         The "VIC Chip" Trivia Set
  4365.  
  4366. Q $1E0) We all know that VIC stands for Video Interface Chip.  However,
  4367.         in what computer was a VIC chip first used?
  4368.                   
  4369. A $1E0) The VIC-I was used in the VIC-20.
  4370.  
  4371. Q $1E1) What is the difference between the 6566 and 6567 VIC chips?
  4372.         
  4373. A $1E1) The 6566 has fully decoded address lines.  The '67 has multiplexed
  4374.         address lines for connection to DRAM.
  4375.      
  4376. Q $1E2) On what computer would one find a VIC-II chip?
  4377.      
  4378. A $1E2) C64, C64C, 64SX.
  4379.      
  4380. Q $1E3) On what computer would one find a VIC-IIe chip?
  4381.         
  4382. A $1E3) C128, C128D
  4383.      
  4384. Q $1E4) On what computer would one find a VIC-III chip?
  4385.         
  4386. A $1E4) C65 (64DX)
  4387.      
  4388. Q $1E5) Versions of each VIC chip exist for each computer model/video
  4389.         standard combinations suppoerted by Commodore.  What model/video
  4390.         standard would the 6569 work with?
  4391.                                 
  4392. A $1E5) C64 type machine using the PAL-B standard.  Note that there are also
  4393.         PAL-N and PAL-M standards, which required different VIC-II models.
  4394.        
  4395. Q $1E6) How much memory could be directly addressed by a VIC-II chip?
  4396.         
  4397. A $1E6) 16 kilobytes.
  4398.      
  4399. Q $1E7) How many control registers does the VIC-I contain?
  4400.         
  4401. A $1E7) 16 control registers.
  4402.      
  4403. Q $1E8) How many control registers does the VIC-II contain?
  4404.         
  4405. A $1E8) 47 control registers.
  4406.      
  4407. Q $1E9) The VIC-II series introduced Movable Object Blocks to the
  4408.         Commodore programmer.  By what common name are MOBs known?
  4409.          
  4410. A $1E9) "sprites"
  4411.      
  4412. Q $1EA) What are the dimensions of a MOB?
  4413.         
  4414. A $1EA) 24 dots wide by 21 tall.
  4415.      
  4416. Q $1EB) What difference between the VIC-I and VIC-II causes VIC-II equipped
  4417.         systems to potentially operate slightly slower than VIC-I equipped
  4418.         systems, all other items held constant?
  4419.                            
  4420. A $1EB) Even with all of the fancy features of the VIC-II (like sprites)
  4421.         turned off, the VIC-II doesn't have quite enough time to do all
  4422.         of its work, which includes refreshing the DRAM ICs in addition to
  4423.         the work of drawing the screen and reading the Paddle inputs. So,
  4424.         every 8th rasterline, the VIC has to "steal cycles" from the CPU to
  4425.         fetch character data from RAM.  Since this time is not available to
  4426.         the CPU to execute programs, a simple program written on each
  4427.         machine will execute faster on the VIC because its CPU doesn't 
  4428.         have to fight the video IC for cycles.
  4429.          
  4430. Q $1EC) In addition to supporting graphical output to an external display,
  4431.         what other vitally important function do the VIC chips (starting
  4432.         with the VIC-II) perform?
  4433.         
  4434. A $1EC) They refresh the Dynamic RAM of the computer periodically.  If the
  4435.         DRAM is not refreshed, it would lose its contents.
  4436.      
  4437. Q $1ED) Many people know that the VIC-II can deliver up to 320x200
  4438.         resolution without much trouble.  What is the maximum resolution of
  4439.         the VIC-III chip?
  4440.         
  4441. A $1ED) According to the specifications, it is supposed to handle 1280H by
  4442.         400V interlaced and non-interlaced.  
  4443.          
  4444. Q $1EE) Between the development of the VIC-II and the VIC-IIe, there was a
  4445.         related, though not very similar video IC developed for CBM machines.
  4446.         Name its TLA (three letter acronym).
  4447.           
  4448. A $1EE) TED (Text Editting Device).  It was developed for the 264 series
  4449.         (Plus/4, C16).
  4450.      
  4451. Q $1EF) How many pins does a VIC-II chip contain?
  4452.  
  4453. A $1EF) Every VIC-II has 40 pins.  
  4454.      
  4455.         The "BASIC Tokens" Trivia Set
  4456.         
  4457.         The following questions refer to the way Commodore "crunched"
  4458.         BASIC programs by substituting one of more bytes called "tokens"
  4459.         for BASIC keywords in a BASIC program.  The resulting code was 
  4460.         smaller, since multiple character keywords were internally replaced
  4461.         with smaller length tokens.
  4462.         
  4463.         (All the answers were taken from _Commodore Magazine_, April 1987,
  4464.         pp 82-85.)
  4465.                             
  4466. Q $1F0) Commodore BASIC tokens start at what number?
  4467.  
  4468. A $1F0) $80, or 128.
  4469.         
  4470. Q $1F1) BASIC 2.0 defines tokens without gaps up to $ca. What keyword
  4471.         is represented by $cb?
  4472.                                     
  4473. A $1F1) GO.
  4474.          
  4475. Q $1F2) Why is the token for PI strange?
  4476.         
  4477. A $1F2) It is token $ff, or 255.
  4478.          
  4479. Q $1F3) All versions of Commodore BASIC contain at least a subset of
  4480.         tokens.  At what number does this subset end?
  4481.         
  4482. A $1F3) $ca.
  4483.          
  4484. Q $1F4) BASIC 4.0 defines tokens beyond $cb.  What is the last token
  4485.         included in BASIC 4.0?
  4486.         
  4487. A $1F4) $da.
  4488.          
  4489. Q $1F5) There was a BASIC 4.0+ included in the B series.  It extends the
  4490.         BASIC with some new commands not in 4.0.  What token range are
  4491.         these new commands at?
  4492.         
  4493. A $1F5) $db-$e8.
  4494.          
  4495. Q $1F6) When a user plugs a Super Expander into a Commodore 64, he or 
  4496.         she gains access to 25 new BASIC commands.  The tokens for these
  4497.         commands are defined differently from the previous tokens.  What
  4498.         is the difference?
  4499.             
  4500. A $1F6) They are two byte tokens of the form: $fe XX, where XX ranges from
  4501.         $80 to $9e.
  4502.         
  4503. Q $1F7) When the Plus/4 and C-16 was developed, new commands were added
  4504.         to BASIC.  In addition, many commands from BASIC 4.0 were also
  4505.         included.  Unfortunately, the tokens for BASIC 4.0 commands included
  4506.         in these new machines differed from those in the older BASIC 4.0.
  4507.         If a user lists a program written in BASIC 4.0 on a Plus/4, what 
  4508.         will the BASIC 4.0 CONCAT command show up as?
  4509.         
  4510. A $1F7) CONCAT is $cc in BASIC 4.0, and is RGR in BASIC 3.5.
  4511.          
  4512. Q $1F8) What is the last token used in the Plus/4 line?
  4513.          
  4514. A $1F8) $fd.
  4515.      
  4516. Q $1F9) If you list a program written on the Plus/4 with the keyword
  4517.         SCALE on a BASIC 4.0/4.0+ machine, what happens?
  4518.          
  4519. A $1F9) SCALE on BASIC 3.5 is token $e9, which is not in the BASIC 4.0(+)
  4520.         list.  The PET will crash.  Interstingly, tokens above $e9 do not
  4521.         crash the PET.
  4522.         
  4523. Q $1FA) When the C128 was released, it shared many tokens with the Plus/4.
  4524.         However, at $ce, the 128 differs from the Plus/4.  The Plus/4 token
  4525.         $ce corresponds to RLUM, but the C128 uses the token another way.
  4526.         What is peculiar about the C128 usage?
  4527.         
  4528. A $1FA) The C128 uses $ce as a prefix byte for a range of two-byte tokens
  4529.         that range from $02 to $0a.
  4530.         
  4531. Q $1FB) The C128 shares many keywords with the Super Expander cartridge
  4532.         for the C64.  As with the Plus/4, though, keywords don't map to
  4533.         the same token.  To what token does the C128 keyword SPRITE
  4534.         (token: $fe $07) correspond to on the Super Expander equipped 64?
  4535.                            
  4536. A $1FB) $fe $93.
  4537.          
  4538. Q $1FC) What keyword was not included in BASIC v1, but was included in
  4539.         BASIC v2?
  4540.         
  4541. A $1FC) GO, token $cb.
  4542.          
  4543. Q $1FD) The C128 defines all the tokens from $fe $02 to $fe $26, with the
  4544.         exception of two tokens.  Name one of them.
  4545.  
  4546. A $1FD) $fe $20 and $fe $22.
  4547.          
  4548. Q $1FE) The Plus/4 line had the ability to add keywords dynamically when
  4549.         running cartridges.  At what point in the token list do these
  4550.         "added" keywords show up in the Plus/4 line?
  4551.           
  4552. A $1FE) They use $fe as a prefix byte for two-byte tokens.
  4553.          
  4554. Q $1FF) If a programmer want to write a single program to run on a
  4555.         B128, a plus/4, and a C128, what version of BASIC is the lowest
  4556.         common denominator?
  4557.         
  4558. A $1FF) Unfortunately, BASIC 2.0 is it.
  4559.  
  4560.           The C128 Set:
  4561.  
  4562. Q $200) How many general purpose central processin units does a C128
  4563.         contain?
  4564.         
  4565. Q $201) The Commodore 128 contains a MMU IC.  What does MMU stand for?
  4566.          
  4567. Q $202) What Commodore produced cartridge is specifically mentioned in
  4568.         the 128 PRG as being incompatible with the 128?
  4569.          
  4570. Q $203) The C128 introduces the concepts of "banks"  How many such banks
  4571.         are recognized by the C128 BASIC?
  4572.          
  4573. Q $204) What version is the BASIC included in the C128 in native mode?
  4574.          
  4575. Q $205) Can any of the BASIC graphics commands be used on the 80 column
  4576.         screen?
  4577.          
  4578. Q $206) How many high-level graphics commands are available on the C128
  4579.         in C128 mode?
  4580.          
  4581. Q $207) In C128 mode, at what location does screen memory start?
  4582.          
  4583. Q $208) The 80 column IC in the 128 can display how many full character
  4584.         sets of 256 characters each at one time?
  4585.          
  4586. Q $209) Many have scorned the C128's 80 column video IC.  What about this
  4587.         IC makes it so hard to use?
  4588.          
  4589. Q $20A) What number is the 80 column IC referenced by?
  4590.          
  4591. Q $20B) What machine language addressing modes cannot be used with the
  4592.         80 column chip?
  4593.          
  4594. Q $20C) The C128 contains keyboard keys not present on the C64.  What IC
  4595.         is used to read these keys? (besides the CIA, as on the 64)
  4596.          
  4597. Q $20D) Following the introduction of the C128, a new version of was
  4598.         developed.  Name it.
  4599.  
  4600. Q $20E) Many people refer to C128s as 16k or 64k units.  To what does this
  4601.         refer?
  4602.          
  4603. Q $20F) According to the C128 literature, the C128 can be expanded to use
  4604.         how much memory?
  4605.  
  4606. =========================================================================
  4607.  
  4608. @(#)basic: Hacking BASICs
  4609.            by R. T. Cunningham (wanderer_rtc@usa.pipeline.com) 
  4610.  
  4611. @(A): Introducation
  4612.  
  4613. Although BASIC is not an "advanced" language, such as Assembly or C, it's  
  4614. been used far more often than any other since the first Commodore computer  
  4615. was introduced.  It is not my intent to provide information here that is  
  4616. widely available in user manuals, newsletters, or other forums.  What I am  
  4617. going to present is what I have learned from "The School of Hard Knocks" 
  4618. or, in other words, by trial and error.  
  4619.   
  4620. @(A): Detecting Drives Connected  
  4621.                                      
  4622. If your program attempts to access a device number that is not connected to 
  4623. computer in the serial chain, like fetching a directory, your program will  
  4624. halt with "?device not present error in (line number)".  How do we prevent  
  4625. this from happening?  The answer is to open the device number, close the  
  4626. device number, and check the status variable:  
  4627.   
  4628.    open15,10,15:close15:ifst<>0then (act on device not being present)  
  4629.   
  4630. Any number returned by the status variable other than 0 will indicate that  
  4631. the device is either not connected or not turned on.  
  4632.   
  4633. In my own programs, I like to do this check for all of the drives early in 
  4634. the program by stashing the device numbers in an array.  Legal device 
  4635. numbers for disk drives are 8 to 30, with 30 being used as configuration 
  4636. mode for a CMD drive.  Since I know of no other drive that can use device 
  4637. #30, I won't include that device number in the loop.  The array should be 
  4638. dimensioned to at least 21.  I prefer 22 and to use the first variable (0) 
  4639. to hold the number of devices.  I keep the "start up" device number in a  
  4640. non-array variable so that I can return to it after the drive checking  
  4641. routine has been completed:  
  4642.   
  4643.    10 dimdv(22):dv(0)=0:rem set number of devices to 0  
  4644.    20 dv=peek(186):rem current device # of last drive accessed  
  4645.    30 ifdv<8thendv=8:rem prevents non-disk device #s  
  4646.    40 fora=1to22:rem device #s 8-29 minus 7 so that array starts at 1  
  4647.    50 open15,a+7,15:close15  
  4648.    60 ifst<>thendv(0)=dv(0)+1:dv(dv(0))=a+7:rem increment number of devices 
  4649.    and store device numbers  
  4650.    70 next  
  4651.   
  4652. If I have device number 8, 10, 12 and 14 connected, dv(0) will now contain 
  4653. 4,  dv(1) through dv(4) will contain those device numbers.  You can now use  
  4654. this array to check for a valid device number prior to an access command:  
  4655.   
  4656.    100 rem d equals the device number selected in this example  
  4657.    110 fl=0:rem set flag to 0  
  4658.    120 fora=1todv(0):rem check total number of drives attached  
  4659.    130 ifd=(dv(a))thenfl=1:rem set flag to 1 if a match is found  
  4660.    140 next  
  4661.    150 rem continue with drive access only if flag is set to 1  
  4662.   
  4663. @(A): Selective GOTO (GO TO) Routine:  
  4664.   
  4665. When acting on a number the ON/GOTO command set works by either using a  
  4666. numeric variable or the value of a string, if the string contains a number: 
  4667.  
  4668.    10 onagoto100,200,300,400  
  4669.   
  4670. or  
  4671.   
  4672.    10 onval(a$)goto100,200,300,400  
  4673.   
  4674. What if we want to use a non-numeric character with ON/GOTO, especially 
  4675. with a list of choices presented to the user?  
  4676.   
  4677. In the C128's native mode the INSTR function can be used:  
  4678.   
  4679.    10 rem keys accessible by user are A,B,C,D and stored in a$ response  
  4680.    20 oninstr("ABCD",a$)goto100,200,300,400  
  4681.   
  4682. or  
  4683.   
  4684.    20 a=instr("ABCD",a$):onagoto100,200,300,400  
  4685.   
  4686. On the 64, since INSTR is not an available function, we can emulate the  
  4687. function with a different routine:  
  4688.   
  4689.    20 on-1*(a$="A")-2*(a$="B")-3*(a$="C")-3*(a$="D")goto100,200,300,400  
  4690.   
  4691. or  
  4692.   
  4693.    20 a=-1*(a$="A")-2*(a$="B")-3*(a$="C")-3*(a$="D"):onagoto100,200,300,400  
  4694.   
  4695. Note that the first 1* is not necessary but the - is.  I've added it for  
  4696. clarity only.  
  4697.   
  4698. In the first example, INSTR returns the place number (sequence) of each  
  4699. character in the string.  In the second example, the place number is 
  4700. obtained by multiplying the negative sequence number by the signed value of 
  4701. a$.  The signed value of a string is always -1 (I think!).   
  4702.   
  4703. When working with a program that is designed to work in both 64 and 128  
  4704. modes, the INSTR function should not be used since the other method will 
  4705. also work in 128 mode.  
  4706.   
  4707. More proficient readers might want to demonstrate the machine language 
  4708. equivalents of both drive detection and INSTR routines?  I for one would 
  4709. like to add them to my ML arsenal. 
  4710.  
  4711. =========================================================================
  4712.  
  4713. @(#)error: ? DS, DS$: rem The Error Channel
  4714.  
  4715. We are not aware of any errors with issue 13.
  4716.  
  4717. =========================================================================
  4718.                                        
  4719. @(#)bits: Twiddling the Bits: VIC-20 ROM Cartridge Exploration and Archiving
  4720.           by Ward Shrake (wshrake@aol.com)
  4721.  
  4722. @(A): Introduction
  4723.         
  4724. This article's primary purpose is to enable you to understand the basic 
  4725. principles of making an archival backup of a ROM cartridge. However, I do 
  4726. wish to point out the following important points, before I begin: 
  4727.  
  4728. @(A): Disclaimer
  4729.  
  4730. 1. This is NOT intended for any sort of illegal purposes! The  
  4731.    information can be misused, if one wants to badly enough. However, so can  
  4732.    virtually every other piece of information on the planet. Fire is a good  
  4733.    thing, as are hammers, saws, and other tools, but all of them can be  
  4734.    misused. I urge the reader to use this information in a proper fashion  
  4735.    and to take the time to reflect on what you are doing, to avoid hurting  
  4736.    anyone or anything. 
  4737.  
  4738. 2. I am releasing this information for two basic reasons (besides basic  
  4739.    hacker pride in obscure technical knowledge).  First, the Vic20 died many  
  4740.    years ago. Commodore helped accelerate its death, by pushing the C64  
  4741.    computer onto the market, at a time when all the companies out there had  
  4742.    a lot at stake. I don't blame Commodore from a marketing sense; they just  
  4743.    wanted to stay alive themselves in a cutthroat market environment.  
  4744.    However, this means a lot of people still have the idea that the Vic20  
  4745.    was/is a piece of obsolete junk. This is not true, but the public acts as  
  4746.    if it were. The end result is that a lot of perfectly good hardware and  
  4747.    software is thrown away on a regular basis. Once it is in a landfill  
  4748.    somewhere, its rather difficult for anyone to use it! Hence my two-fold  
  4749.    concern: to help show the public (and Commodore Guru types) the Vic20 is  
  4750.    a very cool gaming machine, and to physically rescue the software for the  
  4751.    system before all of it is lost forever. I take little pleasure in  
  4752.    thinking that 50,000 years from now some archaeologist will dig up our  
  4753.    landfills and think we must have had some really cool stuff! 
  4754.  
  4755. 3. I really like the term "Digital Archaeology." (I wasn't the first to  
  4756.    use it, however.) Basically, it means that with the many rapid advances  
  4757.    in the computer sciences, lots of stuff gets lost or forgotten in the  
  4758.    rush to replace everything every few years. Whereas an entire  
  4759.    civilization might take hundreds or even thousands of years to die out  
  4760.    and be all but forgotten, the history, lore, and software of computers  
  4761.    can be gone in just a few years. If we don't revive it now, who will  
  4762.    remember how to use any of this stuff? There are only a few people around  
  4763.    now that can do it, and their memories are getting fuzzy with the passage  
  4764.    of time. I don't mean to preach; I just think this is as good a time as  
  4765.    ever! 
  4766.  
  4767. A small group of concerned individuals, myself included, have begun the
  4768. task of archiving all the VIC-20 cartridges known to exist.  The project
  4769. also includes documenting every aspect of the VIC-20 hardware and how
  4770. it operates.
  4771.  
  4772. @(A): General information about Vic20 cartridge software 
  4773.  
  4774. A Vic20 cartridge is approximately 5.5 inches wide, 3 and 3/8ths inches  
  4775. deep, and 5/8ths inches tall, when viewed as if ready to be installed.  
  4776. Most of the cartridges that were made by Commodore are either a beige or  
  4777. dark brown colored plastic with a tan or metallic all-text label. Some  
  4778. third-party companies had more interesting looking cartridges; most of  
  4779. the plastic cases were black as a general rule, with white also being  
  4780. used at times. In rare cases, oddly-shaped carts existed, for example,  
  4781. carts by UMI. Some of these seem to be more epoxy-based than plastic,  
  4782. with glitter inside it! Only a few companies really had fancy, full- 
  4783. colored labels on their cartridges. 
  4784.  
  4785. The most common memory configuration, inside the casing, is one bank of  
  4786. 8k. ROM was standard for the larger companies, but EPROM's were also used 
  4787. at times, even by Commodore themselves. Four-kilobyte cartridges do 
  4788. exist, as do 8k cartridges made up of two banks of 4k chips. (Memory was  
  4789. expensive then, as you can no doubt imagine, and some companies had to  
  4790. make due with whatever they could get cheap enough.) 16K cartridges do  
  4791. exist as well, although the bulk of these were done by the largest  
  4792. companies. Commodore made a few 16k carts, as did Atari, Sega, Hes, and a  
  4793. few others. 
  4794.  
  4795. If other standard cartridge memory configurations existed in the Vic's  
  4796. day, the author is currently unaware of them. (I would like to hear of  
  4797. any, if they do/did exist, especially if they were once made  
  4798. commercially.) There may be a few exceptions, for instance, for carts  
  4799. that modified the Vic20's own inherent abilities; for example, 40 and 80  
  4800. column boards. But the rule of thumb here is that 8k was the accepted  
  4801. standard, with 4k and 16k at times. All of these cartridge 
  4802. configurations, by the way, are using 8-bit memory because the Vic20 is  
  4803. an 8-bit computer. 
  4804.  
  4805. Inside a typical Vic20 cartridge is one double-sided, etched circuit  
  4806. board, with some form of memory chip(s) on it. This may be a "standard"  
  4807. IC chip as we are used to seeing (24 or 28 pin ROM, in a DIP package), or  
  4808. it could be a blank circuit board, with a tiny blob of black epoxy  
  4809. material on it, under which are presumably the internal components of a  
  4810. typical, normal ROM chip. 
  4811.  
  4812. The standard circuit board size is approximately 3 and 9/16ths inches  
  4813. wide, and 1 and 3/4 inches deep. A cart fits into a 44-position, double- 
  4814. sided card edge connector, located in the back, left hand side of the  
  4815. Vic20. 
  4816.  
  4817. On the cart circuit board itself, there might be several wire traces or 
  4818. jumpers, which, if there, are meant to configure the cartridge to a  
  4819. certain memory arrangement. These jumpers are meant to connect the BLK or  
  4820. RAM lines to the system ground. These lines, when connected, tell the  
  4821. Vic20 where to place the cartridge within the Vic20's internal memory  
  4822. mapping scheme. 
  4823.  
  4824. While all "normal," autostart game cartridges are located in one fixed  
  4825. area of memory, this is not true with all cartridges. A rare few of the  
  4826. total Vic20 cart collection did not use the autostart procedure; you had  
  4827. to type in a systems number to start the program running after inserting  
  4828. it. These are very rare, however (6 out of 150+ so far). Most cartridges  
  4829. all autostart after insertion and power-up, just as cartridges do in game  
  4830. console systems. 
  4831.  
  4832. All this memory banking may seem confusing. If it does, remember this:  
  4833. Every cartridge that autostarts must have at least one bank of memory in  
  4834. Block 5, or the autostart procedure will not function. If it autostarts,  
  4835. there has to be some memory in Block 5. That may help relieve some  
  4836. confusion. There may be additional memory installed as well, in some  
  4837. cases, for more storage space. The location of this additional memory is  
  4838. less important than the location of the autostart bank.  However, there  
  4839. are only three additional 8k banks left, for a total of four banks of  
  4840. user-added RAM or ROM memory. The Vic20 was built when memory was  
  4841. expensive, and computers were designed to be bare-bones memory-wise with  
  4842. the capability to expand on later. This may take some getting used to at  
  4843. first, but understanding it gets easier in time. Take it in stride for  
  4844. now. 
  4845.  
  4846. @(A): The Cartridge Auto-Starting Feature
  4847.                                
  4848. Please note that if you already understand the autostarting system used  
  4849. in the Commodore 64, this is nearly identical in procedure. Only certain 
  4850. codes and memory locations differ; the rest applies to both machines. 
  4851.  
  4852. The "normal" spot for an 8K cartridge to be located in memory is in  
  4853. "Block 5"(which is located at $A000 to $BFFF). Again, this is not the  
  4854. only possible spot in memory for a cartridge to be located, but it is the  
  4855. only spot where the Vic20 will look for a cartridge that automatically  
  4856. starts on power-up. This is because (at power up) the Vic20 looks for a  
  4857. precise code in a precise spot to see if it should autostart a cartridge  
  4858. or not. If the Vic20 finds this EXACT five-byte code, EXACTLY where it is  
  4859. supposed to be located in memory, the Vic20 turns control over to the  
  4860. cartridge. If not, it gives over control to the user, via the normal,  
  4861. power-up Basic READY prompt screen. 
  4862.  
  4863.  
  4864.    This 8K autostart sequence code is shown below: 
  4865.  
  4866.    Address      Hex value     Decimal value    ASCII values 
  4867.                              
  4868.    $A004        $41           65               Capitol "A" 
  4869.    $A005        $30           48               Digit "zero" 
  4870.    $A006        $C3           195              Reverse "C" character 
  4871.    $A007        $C2           194              Reverse "B" character 
  4872.    $A008        $CD           205              Reverse "M" character 
  4873.  
  4874. (You may note that the code above is symbolically saying $A000, and  
  4875. Commodore Business Machines. In other words, that this is the right  
  4876. software, for the right machine. The C64 uses $8000 instead.) 
  4877.  
  4878. If the computer finds this five-byte sequence exactly as shown, it turns  
  4879. its control over to the machine language program in the cartridge. To do  
  4880. so, it needs to know where the program begins. There are four bytes which  
  4881. determine this, as shown in the chart below. Note that this is in the  
  4882. cart, not the Vic20.  
  4883.  
  4884.    Address      What this byte of information contains
  4885.    
  4886.    $A000        Low-byte  of 16-bit "cold start" address (power-up) 
  4887.    $A001        High-byte of 16-bit "cold start" address 
  4888.    $A002        Low-byte  of 16-bit "warm start" address (restore key) 
  4889.    $A003        High-byte of 16-bit "warm start" address 
  4890.  
  4891. Let's do a quick summary of this before we go on. You plug a cartridge  
  4892. into the Vic20. You turn the power on. The Vic20 starts its own built-in  
  4893. operating system software. It gets itself ready to be used, either by the  
  4894. user (in BASIC) or by a cartridge's program. 
  4895.  
  4896. One of the last steps in the computer's start-up sequence is to look at a 
  4897. certain spot in memory, to see (A) if there is a cartridge inserted  
  4898. there, and (B) if it is the proper type. It does both these tasks through  
  4899. simple assumptions. Assuming that the existence of an autostart code
  4900. sequence at a certain memory address implies a cartridge is present, the
  4901. computer looks for the "A0CBM" code sequence. If it finds it, it then
  4902. transfers control to the locations specified at $A000-$A003, as defined
  4903. above.  (In many cases, this address is $A009 or 40969 ... the next  
  4904. byte possible after all the start-up codes.) 
  4905.  
  4906. @(A): How to Archive Vic20 ROM Cartridges
  4907.                                   
  4908. Now that we know how the autostart process works, what can we do with  
  4909. that information? Well, to archive a cartridge's internal ROM memory to  
  4910. either tape or diskette, you have to know how the autostart process  
  4911. works. This is necessary because you have to figure some way around it to  
  4912. be able to get to that "no carts inserted" normal power-up screen. This  
  4913. means that you then have full control of the machine, instead of the  
  4914. cartridge being in full control. 
  4915.  
  4916. Simply put, there are only two steps to archiving a cartridge from its  
  4917. cart to disk or tape. 
  4918.  
  4919. 1. Find some method of defeating the autostart process, so that the  
  4920.    Vic20 powers up with the cartridge in memory, but does not start it up.  
  4921.    So that you are in control, instead of the cartridge running the show. 
  4922.  
  4923. 2. Copy that area in memory where the cartridge resides, to tape or  
  4924.    disk. The resulting program is called an "image" of the cartridge's  
  4925.    memory. 
  4926.  
  4927. After that, assuming there is no copy-protection coded into the original,  
  4928. you have a working version of the program stored on disk/tape instead of  
  4929. on ROM. 
  4930.  
  4931. Some problems may arise, but don't worry, they are easy to get around if  
  4932. you know how to do it. 
  4933.  
  4934. A. There may be more than one block of memory to copy. The one found at 
  4935.    Block 5 is easy, because if the cart auto-starts, there must be memory  
  4936.    that needs to be copied. However, additional memory may be present. You  
  4937.    will need to determine where it is, and how much of it there is. 
  4938.  
  4939. B. Depending on how you transferred the image to disk (assume I mean  
  4940.    "disk or tape" from now on), was the loading address information stored  
  4941.    with the image? If it was you can reload it easily next time. Without  
  4942.    those two important address bytes (these are separate from those we  
  4943.    discussed earlier), the software won't load properly, and so will not  
  4944.    work. 
  4945.  
  4946. OK, so now you're convinced its impossible, right? For every problem,  
  4947. there is always a number  of solutions. I wrote a small program that  
  4948. eliminates most of the problems inherent in archiving carts, and have  
  4949. figured out ways of eliminating most of the hassles. The program also  
  4950. makes the process more reliable, since archiving rare and cool things is  
  4951. the main idea. I'll make that program publicly available, soon, after a  
  4952. bit of polishing. 
  4953.  
  4954. But you still have to get around that auto-start procedure. Without doing  
  4955. that first, you are dead in the water before you've even started. So,  
  4956. here's how you get around the autostart procedure. After that, its all  
  4957. downhill!  
  4958.  
  4959. There are a number of suggested methods shown below. My suggestion is to  
  4960. pick out the method you like best and stick with it. The rest will just  
  4961. be to satisfy your built-in hacking curiosity, OK? Other methods exist  
  4962. but I didn't feel they warranted the space here. These are some of the  
  4963. best ways. 
  4964.  
  4965. @(A)method1: Inserting a Cartridge Into a Powered Computer
  4966.       
  4967. Please pay attention to what I am about to say: this is the only method I  
  4968. DO NOT recommend! I mention it mainly because it represents a very real  
  4969. risk of killing your hard-to-replace Vic20 computer system. This is 
  4970. supposed to be an exercise in keeping things alive and usable, not 
  4971. killing more off! If you feel you want to try this, you do it at your own  
  4972. risk!  
  4973.  
  4974. I once knew a guy that wanted to archive Vic20 carts, but wasn't willing  
  4975. to go to a lot of effort to find a good way to get around the autostart  
  4976. feature. When he told me what he was doing, I tried to warn him. He kept  
  4977. on doing it, saying he'd "just be careful."  The next thing I know, he is  
  4978. asking me how to repair a computer that died suddenly. I told him the  
  4979. truth: (A) you don't, you go find and buy another one, and (B) you listen  
  4980. to me the next time I tell you that you're risking your almost  
  4981. irreplaceable hardware. 
  4982.  
  4983. If that didn't convince you, well, I tried. There are better methods, by  
  4984. far! If you can't find a better one than this, pay someone to modify your  
  4985. Vic20, or just loan the cart in question to someone who is more used to  
  4986. doing this! 
  4987.  
  4988. @(A)method2: Altering Your Computer's Operating System ROM
  4989.  
  4990. What this method does is change the copy of the code to check for, inside  
  4991. the Vic20, so that no cartridge's unaltered code ever matches it. So no  
  4992. autostart. 
  4993.  
  4994. No cart will ever match the modified start-up code in your new operating  
  4995. system, so none will ever be seen as a cart. However, having one of these  
  4996. chips installed permanently could be a bad idea, as you cannot test or  
  4997. start your saved images quite as easily. The image won't autostart  
  4998. either, unless you are willing to keep swapping chips back and forth, or  
  4999. unless you know how to decode the starting addresses and type in systems  
  5000. numbers. 
  5001.  
  5002. This is an elegant way to solve the problem, providing you possess tools
  5003. to read and program EPROM ICs and can obtain replacement ICs that
  5004. are pin-compatible.  Thus, the elegant solution requires a substantial
  5005. amount of resources.
  5006.  
  5007. However, one chip does exist, which is expensive if you buy it new, and  
  5008. may be hard to find as well. (Try posting to "comp.sys.cbm.") If you can  
  5009. find a Motorola 68764 chip, you're almost there! Just copy the Kernal rom  
  5010. to disk, modify the "A0CBM" code found there to be anything but that, and  
  5011. burn a new EPROM of your modified Kernal rom. The manual to the Promenade  
  5012. EPROM-writing machine makes programming these chips a snap. And the  
  5013. Promenade is still available today, from it makers, Jason-Ranheim Co.  
  5014. (Phone: 916-878-0785, or 1-800-421-7731.) These same 68764 chips work  
  5015. with C64's internals, too. 
  5016.  
  5017. This does work. It has the advantage of requiring no modifications to  
  5018. your Vic20 which can't be easily reversed. Before I got tired of swapping  
  5019. Kernal chips back and forth, this was my preferred method of archiving  
  5020. cartridges. 
  5021.  
  5022. @(A)method3: Using a Cartridge Port Epander
  5023.  
  5024. I've come to feel that a plug-in board is the best way to modify things  
  5025. just long enough to get past the start-up process, skip the autoboot  
  5026. phase, and get down to business. If you can find one, buy it! It makes  
  5027. life so much easier and nicer, in more ways than just this one. I highly  
  5028. recommend buying one. 
  5029.  
  5030. Basically, this device lets you plug in lots of carts at once, and with  
  5031. just a button press, decide which one to use at any given time. Well,  
  5032. that switch is all you need! Just (A) turn the computer off and insert a  
  5033. cartridge, (B) make sure all the switches are de-activated, (C) turn the  
  5034. computer on. You should now be looking at a normal, BASIC power-up 
  5035. screen. Now (D) press the button that activates the slot that your  
  5036. cartridge is plugged into, so that the cartridge is now mapped into  
  5037. memory properly, although belatedly, and (E) follow the instructions in  
  5038. the next part of this text, to archive the cart.  
  5039.  
  5040. Note that you can modify your Vic20 to do the same thing if you are handy 
  5041. with a soldering iron. But as I don't want anyone killing their only  
  5042. Vic20, maybe I'll save that for another article ... this one is almost at  
  5043. deadline, and I don't want to rush things and make any mistakes!(Besides,  
  5044. I don't know yet if anyone is interested enough to modify their Vic20's  
  5045. to do this??) 
  5046.  
  5047. @(A): Saving One or More Blocks of cartridge Memory to Disk or Tape
  5048.  
  5049. Once you've defeated the auto-start feature of the Vic20, the memory  
  5050. contained in the cartridge is just another block of memory as far as the  
  5051. Vic20 is concerned. You have full access privileges, with all that goes  
  5052. with it, including the ability to save it to external storage. 
  5053.  
  5054. You have three basic choices to save the block of memory to tape/disk.  
  5055. You can either (A) wait until I release my program that does it  
  5056. automatically, or (B) use a "memory save" feature of a machine language  
  5057. monitor program (not built in) to save the 8K block of ROM memory, or you  
  5058. can (C) just change four POKE's in the Vic20's memory. With this, your  
  5059. cartridge is seen as if it were in the BASIC program memory area so that  
  5060. the built-in "SAVE" command works. 
  5061.  
  5062. It really works. The beauty of it all is that no additional programs are  
  5063. needed. To save any block of cartridge-usable memory in the Vic20, just  
  5064. type in four easy POKE commands, then tell the Vic to SAVE the program as  
  5065. it would normally save any BASIC program. (You can even copy the system  
  5066. ROMs that way, if you want to.) 
  5067.  
  5068. For those of you already familiar enough with Commodore's style and  
  5069. memory arrangement schemes to make sense of this, bytes 43 and 44  
  5070. (decimal, not hex) are the pointers to the Start of Basic memory area,  
  5071. and bytes 45 and 46 are the pointers to the Start of Variables, or in  
  5072. other words, the End of Basic. Follow this chart, to save a block of  
  5073. memory from these areas via pokes: 
  5074.  
  5075.    Block #   Hex Address     Poke 43,x   Poke 44,x    Poke 45,x  Poke 46,x 
  5076.      5       $a000-bfff      x = 0       x = 160      x = 0      x = 192 
  5077.      3       $6000-7fff      x = 0       x = 96       x = 0      x = 128 
  5078.      2       $4000-5fff      x = 0       x = 64       x = 0      x = 96 
  5079.      1       $2000-3fff      x = 0       x = 32       x = 0      x = 64 
  5080.  
  5081. Here's an example: to save block 5 (the most commonly used memory block)  
  5082. you do the following steps.  
  5083.  
  5084. 0. Follow the previous instructions, to get to this point. (The  
  5085.    cartridge has been inserted, power is now turned on, and the autostart 
  5086.    has been defeated. The Vic20 is showing you its normal BASIC power-up  
  5087.    screen.) 
  5088.  
  5089. 1. Type the following, hitting RETURN after each line. (Type  
  5090.    carefully!) 
  5091.  
  5092.      POKE 43,0                  (and return) 
  5093.      POKE 44,160                (and return) 
  5094.      POKE 45,0                  (and return) 
  5095.      POKE 46,192                (and return) 
  5096.      SAVE "FILENAME.EXT",8      (and return) 
  5097.  
  5098. 2. Wait for the disk drive to finish its saving process. (Be patient.) 
  5099.  
  5100. 3. If you have more 8k blocks to copy, repeat all the previous steps,  
  5101.    but adjust the POKE statements, according to the information in the  
  5102.    chart. Note that the pokes to 43 and 45 are always zero; even page  
  5103.    increments. Also, note that the computer will get confused or lock up if  
  5104.    you try to copy another block of memory without starting completely over. 
  5105.  
  5106. 4. When the busy light turns off again, turn the Vic20's power back  
  5107.    off. Remove the cartridge, and if you have a modified 8k or 16k RAM  
  5108.    expander insert it or activate it. If you have a 32k RAM expander, you  
  5109.    can use it. 
  5110.  
  5111. 5. Load the disk's directory up, (or rewind the tape), and see if the  
  5112.    file has been properly saved to the disk. It should show a file size of  
  5113.    33 blocks, if all has gone well ... 32 blocks x 256 bytes each = 8k, plus  
  5114.    one block for the disk drive's overhead and the file loading address. 
  5115.  
  5116. 6. If everything looks fine so far, just load the newly created "image" 
  5117.    into RAM memory, to see if it runs. Remember a few tips: as with the C64,  
  5118.    you always have to use the  ,8,1  loading conventions for any machine  
  5119.    language program to reload into memory back where it came from. 
  5120.  
  5121.    Also, to properly load up an image that has more than one 8k bank, you  
  5122.    will have to type NEW after each load to reset some memory pointers.  
  5123.    Otherwise, it moves BASIC to where the cart now is and gets confused. So  
  5124.    multi-loads are: (A) LOAD"file1",8,1   (B) NEW   (C) LOAD"file2",8,1 
  5125.  
  5126. 7. The last step is starting up the image, to see it in all its new  
  5127.    glory! To do this, all you have to do is (A) press the reset button  
  5128.    you've installed yourself, or if you don't have one installed, (B) type  
  5129.    the following "reset" command into the computer...  SYS 64802  (and  
  5130.    return). 
  5131.  
  5132. 8. At this point, your image is probably running. If it is not,  
  5133.    carefully recheck all the previous instructions. You may have made a  
  5134.    mistake or two there, somewhere. (One mistake I have often made is to  
  5135.    forget to re-activate the expansion chassis' slot, and essentially save  
  5136.    empty air.) 
  5137.    
  5138. @(A): Troubleshooting
  5139.                    
  5140. But if you recheck everything, and it STILL doesn't work, try archiving  
  5141. another cartridge. If the first does not work, but the second one does,  
  5142. you have likely found one of the few protected carts out there. How to  
  5143. "break" the copy protection is way out of the scope of this article, so I  
  5144. can't help you there! Sorry. But usually, everything will be fine by now,  
  5145. if you've followed the instructions carefully, step-by-step. Only about
  5146. 10% of the VIC-20 cartridges were copy protected.
  5147.  
  5148. =========================================================================
  5149.  
  5150. @(#)next: The Next Hack
  5151.   
  5152. What?  Why are you reading this?  Aren't you happy with the issue you
  5153. have?  We walked through the snow with no shoes uphill both ways to
  5154. deliver this to you and you are still asking for more?  Have you even
  5155. read the issue you have in your hot little hands?  Demanding reader,
  5156. aren't you.  OK, here's what's coming up:
  5157.  
  5158. o  We continually receive comments from folks trying to learn ML
  5159.    programming.  They have copies of C=Hacking in hand, but lament that
  5160.    the concepts are too advanced for them.  Well, next time we'll review
  5161.    some resources for the beginning ML programmer.  Two of them, _Coder's
  5162.    World_ and _Bonkers_ are organized in publication format and go
  5163.    over many of the details that every ML programmer must learn.  
  5164.    
  5165. o  We're not sure which one will get here first, but Frank Kontros
  5166.    is writing up some of his impressive hardware and software projects
  5167.    as we write.  It might be the EPROM programmer, the Digital I/O
  5168.    board, or one of his many software exploits.  WE'll spotlight one
  5169.    next time.
  5170.  
  5171. o  For many years, Commodore 64/128 users have been able to purchase
  5172.    stereo SID cartridges like the SID Symphony by CMD.  However, there's
  5173.    not an overabundance of games or applications that take advantage
  5174.    of the second SID.  Frank Kontros overcomes that problem in a non-
  5175.    obvious way by showing how to build a "pseudo'stereo" adaptor for
  5176.    your C64 or 128. The effect is noticeable and it requires no programming
  5177.    changes.
  5178.      
  5179. o  And, of course, C=Hacking's regular goodies.
  5180.  
  5181. Now, go back and re-read those articles.  We need some sleep....
  5182.  
  5183. =========================================================================
  5184.                                        
  5185. @(#)code: Hacking the Code
  5186.  
  5187. Being a technical, developer oriented magazine, some articles featured
  5188. in C=H include executables or other binary files as part of the article. 
  5189. All such binary files are included on the soft copy of this issue in this
  5190. section.  In an effort to retain the integrity of such binary files through
  5191. distribution over various computer networks, the binaries in this section 
  5192. have been encoded using the UUcode format, a popular Internet 
  5193. binary-to-readable text encoding method. In order to execute or otherwise
  5194. utilize these binary files, one must feed this section of the magazine
  5195. to a UUdecoding application.  Typical examples include UUXFER for the 64,
  5196. uudecode on the ACE OS for the 64 and 128, and uudecode on most UNIX OS 
  5197. machines.  Some encoders can decode multiple files, while others will
  5198. require the user to manually split this section into individual pieces
  5199. prior to decoding.
  5200.  
  5201. In addition to this section, there are other ways to retrieve the
  5202. binary files featured in this issue.  For those with World Wide Web
  5203. access, the files are available at http://www.msen.com/~brain/pub/
  5204. To retrieve "dim4.lnx", simply access the URL: 
  5205.  
  5206. http://www.msen.com/~brain/pub/dim4.lnx
  5207.  
  5208. For those with electronic mail access only, the Commodore Hacking
  5209. MAILSERV server also contains a copy of these files.  To retrieve a 
  5210. copy of "dim4.lnx", send the following email message:
  5211.  
  5212. To: brain@mail.msen.com
  5213. Subject: MAILSERV
  5214. Body of Message:
  5215.  
  5216. send dim4.lnx
  5217. help
  5218. quit
  5219.  
  5220. For some articles published in Commodore, the author or authors may also
  5221. have other methods for accessing files mentioned in the article.  These
  5222. methods are described in the respective article.
  5223.  
  5224. Commodore Hacking always attempts to provide the reader with as many
  5225. options as possible to retrieve uncorrupted binary files.  Although none
  5226. of these above methods is foolproof, the added redundancy helps overcome
  5227. any shortcomings.
  5228.                        
  5229. WARNING:  The UUCode format translates files from binary to ASCII, not
  5230. PETSCII.  Therefore, either decode this section before downloading this
  5231. section to a PETSCII mode computer system, or download this section without
  5232. translation to PETSCII.  Some decoder programs can handle PETSCII converted
  5233. UUCode files, but the practice is not recommended because conversion is
  5234. typically done in a telecommunications program and accuracy in
  5235. translation cannot be guaranteed.
  5236.  
  5237. @(A)menucode1: Menu Toolbox at $1000 (4096)
  5238.  
  5239. begin 644 mbox1000.bin
  5240. M`!!,>1M,]!M,&QU,0!U,$1M,WR9,^1U,;AY,XQY,)R%,%1],0Q],!B=,AB!,
  5241. M,2%,WR5,=BA,?2A,"2M,%BM,'2M,TQ%,SQ!,3!%,O11,$A-,<1-,.Q-,6!-,
  5242. ME!-,G!-,^Q-,/11,FQ1,'!M,+1M,/AM,3QM,RQ1,]A1,!Q5,&!5,(15,*!5,
  5243. M7!5,>!5,B!5,K15,.A9,P!9,Q!9,!Q=,$!=,%Q=,&A=,;A=,@A=,BQ=,EA=,
  5244. MO1=,PQ=,R1=,TA=,YQ=,]A=,$1A,)AE,3QA,[QHX(/#_CLHLC,DL(-T;A/R8
  5245. MP`2P`6`8:02%_JD`A?V%^ZD3(-+_(`4?>*D`A0&B`Z``L=&1^\8!L?/F`9']
  5246. MR-#QYM+F_.;TYO[*$.;&_J#IQ@&M(-#F`9']R,8!K2'0Y@&1_<BMRBR1_<BM
  5247. MR2R1_:EWA0%8KLHLK,DL&$SP_ZD`C:HL(-T;A/R8&&D$A?ZI`(7]A?NI$R#2
  5248. M_R`%'WBI`(4!H@.@`+'1C5`L+*HL$`FM4"PIO\D@T`RQ^Y'1L?W&`9'SY@'(
  5249. MT-[FTN;\YO3F_LH0T\;^+*HL,!^@Z;']Q@&-(-#(Y@&Q_<8!C2'0Y@'(L?V%
  5250. MULBQ_873J7>%`:D`C:HL6$QLY:D`A?V%_HU0+(W$+"#=&YBL4"R9HRSN4"S`
  5251. M!=#O(*@=R1F0`JD9C<4LH`"Q(IEF+,C,Q2S0]2"]%*ZC+*``C+LL&"#P_R`%
  5252. M'ZVH+(V\+"#<$B#D__#[H@"-Q"RNNRR.4"S)$?`0R9'P'R#U$LD-\"_0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U0+*``(!H@L2*1^R#T(\C,4"S0\ZD-D?L@(B!,
  5395. M]".M62R-HRNM5RR-I"NM6"R-I2NI`(U7+(U8+(U9+""C)NY7+-`#[E@LK5@L
  5396. MS40LD.VM5RS-0RR0Y?#CK:,KC5DLK:0KC5<LK:4KC5@L(),EK:,KC5DLK:0K
  5397. MC5<LK:4KC5@L3/LC``````!&!P$`04)#1$5&1TA)2DM,34Y/4%%24U155E=8
  5398. M65K!PL/$Q<;'R,G*R\S-SL_0T=+3U-76U]C9VB`Q,C,T-38W.#DP*RU<(2,D
  5399. M)28G*"E>*BXO.CT-%`````````````````````````!7)```ORT````````(
  5400. M```````````````````````````````````````!`>\O````````````````
  5401. M````````````````````````````````````````````````````````````
  5402. M`````````````````````````````````0$!``````!4````````````````
  5403. M`````````0\)#@(&``4)"P(`"P4&#`````````````````````````!?:0$"
  5404. M#PP")!<7`R46%J`#P]+3TB_2Q=35TLX@U$\@TT5,14-4````````````````
  5405. M````````````!P$```$/`P,$`````````````````````*`#```G`!@#`28!
  5406. M%U]I`PX"(P,%`R0"!`$$(P,#H`$`````````````````````````````````
  5407. M````````````````````````````````````````````````````````````
  5408. M````````````````````````````````````````````````````````````
  5409. M````````````````````````````````````````````````````````````
  5410. M````````````````````````````````````````````````````````````
  5411. M`````````````$*))!I8))%"B'-P<(AG!P>!&!AF9A@8@8!D1@@08B8!!Q@@
  5412. M,`P$&.`D),,8&,,D)%6J5:I5JE6JS#/,,\PSS#-F@68\9H%F/%K;&.?G&-M:
  5413. M$1$B(D1$B(@1$2(R3$2(B,`P#`/`,`P#P#`,"]`P#`,1$:JJ1$2JJO5$1$!?
  5414. M1$0$B%`@4(@```"J5:I5JE6J5:JJJJI55555`@H(*""@@((!`0$"`@49X0$"
  5415. M'.`!`AS@B!$B1(A$(A$B1(A$(D2(1`000@@A!!``0*1*!"!2)0)!(A2(%")!
  5416. M"$$JE"*4*D$4@1@89F88&($!)F(0"$9D@(/&;#@8#`8#*!""1((0*`#=$7=$
  5417. MW1%W1`Q@`QC`!C"!4HA2`"6()0`4$LDDDT@H*!ADK()J3#``_\#>WL;V]@9T
  5418. M(A>[<2)'[G6NU;I7ZEVKP]L8?GX8V\.`1`@0($0"`?__________`1$0?!`1
  5419. M`<<1$1'^$1$1[_]@9F9F9F8&P_`\#\/P/`\0.$2"`8)$.(1F2!`DS$(!<(@'
  5420. M`'"(!P`B290B22*42:2DI*1*2DI*$43N1!%$[D0!;6T0;6T![J2DI.1*2DI.
  5421. @*`!4`"@``0`2"81"0H0)$D2(1(A$B$2(B@4B4*A0(@50
  5422. `
  5423. end
  5424.  
  5425. @(A)menucode2: Menu Toolbox at $8000 (32768)
  5426.  
  5427. begin 644 mbox8000.bin
  5428. M`(!,>8M,](M,&XU,0(U,$8M,WY9,^8U,;HY,XXY,)Y%,%8],0X],!I=,AI!,
  5429. M,9%,WY5,=IA,?9A,"9M,%IM,'9M,TX%,SX!,3(%,O81,$H-,<8-,.X-,6(-,
  5430. ME(-,G(-,^X-,/81,FX1,'(M,+8M,/HM,3XM,RX1,]H1,!X5,&(5,(85,*(5,
  5431. M7(5,>(5,B(5,K85,.H9,P(9,Q(9,!X=,$(=,%X=,&H=,;H=,@H=,BX=,EH=,
  5432. MO8=,PX=,R8=,TH=,YX=,]H=,$8A,)HE,3XA,[XHX(/#_CLJ<C,F<(-V+A/R8
  5433. MP`2P`6`8:02%_JD`A?V%^ZD3(-+_(`6/>*D`A0&B`Z``L=&1^\8!L?/F`9']
  5434. MR-#QYM+F_.;TYO[*$.;&_J#IQ@&M(-#F`9']R,8!K2'0Y@&1_<BMRIR1_<BM
  5435. MR9R1_:EWA0%8KLJ<K,F<&$SP_ZD`C:J<(-V+A/R8&&D$A?ZI`(7]A?NI$R#2
  5436. M_R`%CWBI`(4!H@.@`+'1C5"<+*J<$`FM4)PIO\D@T`RQ^Y'1L?W&`9'SY@'(
  5437. MT-[FTN;\YO3F_LH0T\;^+*J<,!^@Z;']Q@&-(-#(Y@&Q_<8!C2'0Y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S%R<T/"EULU?G/`+YM8@;.4@!8],
  5454. M;81HA=-HA=9,;.4@J(V%^R#D__#[H`#1(M`+R)B%_:D`A?Y,*I#(Q/O0[/#C
  5455. MH!BYV0`)@)G9`(@0]6!(J0&-S9QH("F(JJD!H``@NO\@1XB%%"!'B(45IA2D
  5456. M%:D`(-7_H`"8D:Y@AON$_*`#L?N9!YR($/A,_(V&^X3\H`.Q^YD'G(@0^$QQ
  5457. MCHX,G(P-G$SOCHX]G(P^G&`@&I".%YR,&)R-&9R&^X3\&&7[A?NI`&7\A?R@
  5458. M`+'[C56<($>(C5:<($>(C1J<("*03#"/CE6<C%:<J0&-S9RI`(T/G(U7G(U8
  5459. MG(U9G$Q?CX;[A/RD^Z7\H@&.S9Q,"9=(J0&-S9QH("F(KAV<J0&@`""Z_R!'
  5460. MB(44($>(A16F%*053**0J0&-S9R&^X3\H``@&I"I`(T>G(T/G+'[C4J<C1^<
  5461. MC0><($>(C4N<C0B<C2"<($>(C4R<C0F<C2&<($>(C4V<C0J<C2*<($>(C4:<
  5462. M($>(C4><C22<C0V<($>(C4B<($>(C4F<($>(C5><C4&<($>(C5B<C4*<($>(
  5463. MC4.<($>(C42<($>(C46<("*03*B1AON$_"`:D*D!C1Z<J0"-#YR@`+'[C4J<
  5464. MC1^<C0><&&D=C4N<C0B<C2"<($>(C4R<C0F<C2&<($>(C4V<C0J<C2*<($>(
  5465. MC4:<($>(C4><C22<C0V<($>(C4B<($>(C4F<J0"-5YR-09R-6)R-0IRN/YRM
  5466. M0)R.0YR-1)P@1XB-19P@(I!,J)&-'IQ@AON$_*D!C<V<H`"Q^XVJFXV&`B!'
  5467. MB(VIFR!'B(VKFZ73C02<J0"-`YR-%)P@1XB-4)P@1XBE^X4BI?R%(ZU0G$RB
  5468. MF*X]G*P^G$P'BX;[A/Q,()M,()NI`8W-G(;[A/RI`(7]A?Z-4)R-Q)R@`+'[
  5469. MC:.<($>(C:2<($>(C:6<($>(C::<($>(C:><($>(C:B<($>(C5"<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(S!2<\/60\ZT#G!AM!)R%TR!L
  5580. MY4S:F*7]..D!A?FE_ND`A?JL`YS([A2<L?V1^<C,%)SP]I#TSA2<K02<A=,@
  5581. M;.7.`YR@`;'](-+_R,P4G-#UJ2`@TO_.%)RM`YP8;02<A=-,;.6M/9R%_:T^
  5582. MG(7^3"J0(-V+A/N%_""HC8U0G*``(!J0L2*1^R#TD\C,4)S0\ZD-D?L@(I!,
  5583. M]).M69R-HYNM5YR-I)NM6)R-I9NI`(U7G(U8G(U9G""CENY7G-`#[EB<K5B<
  5584. MS42<D.VM5YS-0YR0Y?#CK:.;C5F<K:2;C5><K:6;C5B<().5K:.;C5F<K:2;
  5585. MC5><K:6;C5B<3/N3``````!&!P$`04)#1$5&1TA)2DM,34Y/4%%24U155E=8
  5586. M65K!PL/$Q<;'R,G*R\S-SL_0T=+3U-76U]C9VB`Q,C,T-38W.#DP*RU<(2,D
  5587. M)28G*"E>*BXO.CT-%`````````````````````````!7)```OYT````````(
  5588. M```````````````````````````````````````!`>^?````````````````
  5589. M````````````````````````````````````````````````````````````
  5590. M`````````````````````````````````0$!``````!4````````````````
  5591. M`````````0\)#@(&``4)"P(`"P4&#`````````````````````````!?:0$"
  5592. M#PP")!<7`R46%J`#P]+3TB_2Q=35TLX@U$\@TT5,14-4````````````````
  5593. M````````````!P$```$/`P,$`````````````````````*`#```G`!@#`28!
  5594. M%U]I`PX"(P,%`R0"!`$$(P,#H`$`````````````````````````````````
  5595. M````````````````````````````````````````````````````````````
  5596. M````````````````````````````````````````````````````````````
  5597. M````````````````````````````````````````````````````````````
  5598. M````````````````````````````````````````````````````````````
  5599. M`````````````$*))!I8))%"B'-P<(AG!P>!&!AF9A@8@8!D1@@08B8!!Q@@
  5600. M,`P$&.`D),,8&,,D)%6J5:I5JE6JS#/,,\PSS#-F@68\9H%F/%K;&.?G&-M:
  5601. M$1$B(D1$B(@1$2(R3$2(B,`P#`/`,`P#P#`,"]`P#`,1$:JJ1$2JJO5$1$!?
  5602. M1$0$B%`@4(@```"J5:I5JE6J5:JJJJI55555`@H(*""@@((!`0$"`@49X0$"
  5603. M'.`!`AS@B!$B1(A$(A$B1(A$(D2(1`000@@A!!``0*1*!"!2)0)!(A2(%")!
  5604. M"$$JE"*4*D$4@1@89F88&($!)F(0"$9D@(/&;#@8#`8#*!""1((0*`#=$7=$
  5605. MW1%W1`Q@`QC`!C"!4HA2`"6()0`4$LDDDT@H*!ADK()J3#``_\#>WL;V]@9T
  5606. M(A>[<2)'[G6NU;I7ZEVKP]L8?GX8V\.`1`@0($0"`?__________`1$0?!`1
  5607. M`<<1$1'^$1$1[_]@9F9F9F8&P_`\#\/P/`\0.$2"`8)$.(1F2!`DS$(!<(@'
  5608. M`'"(!P`B290B22*42:2DI*1*2DI*$43N1!%$[D0!;6T0;6T![J2DI.1*2DI.
  5609. @*`!4`"@``0`2"81"0H0)$D2(1(A$B$2(B@4B4*A0(@50
  5610. `
  5611. end
  5612.  
  5613. =========================================================================
  5614. @(#): bottom
  5615.  
  5616.  
  5617.