From j.brain@ieee.org Fri Oct 4 11:32:23 EET DST 1996 Article: 59964 of comp.sys.cbm Path: news.cs.tut.fi!news.funet.fi!news.kbfi.ee!news.latnet.lv!newsfeed.sunet.se!news00.sunet.se!sunic!news.sprintlink.net!news-stk-200.sprintlink.net!www.nntp.primenet.com!nntp.primenet.com!news.mindspring.com!cssun.mathcs.emory.edu!pravda.aa.msen.com!conch.aa.msen.com!not-for-mail From: j.brain@ieee.org (Jim Brain) Newsgroups: comp.sys.cbm,comp.sys.amiga.advocacy,alt.folklore.computers Subject: Commodore Trivia Edition #32 Answers for September 1996 Date: 4 Oct 1996 01:55:52 -0400 Organization: Brain Innovations, Inc. Lines: 200 Sender: brain@msen.com Message-ID: NNTP-Posting-Host: conch.aa.msen.com X-Newsreader: Yarn 0.90 with YES 0.22 X-URL: http://www.msen.com/~brain/ Xref: news.cs.tut.fi comp.sys.cbm:59964 comp.sys.amiga.advocacy:172676 alt.folklore.computers:153789 -------Commodore Trivia Edition #32 Questions and Answers Preface-------- Not to leave you in the dark for too long, here are the trivia answers to the previous edition of Commodore Trivia. I am posting the answers at this time, and will post the scores and winners in a few days. This time frame is set up to allow time for any discussions on the correctness of these answers. By this time, the newest edition of trivia has been posted. I encourage you to enter it. This edition of trivia answers has been posted to the USENET newsgroups: comp.sys.cbm, alt.folklore.computers, and comp.sys.amiga.advocacy. It has also been posted to the FidoNET CBM Echo. Feel free to use these trivia answers in newsletters, magazines, and other publications (please see disclaimer). If you use the trivia, I would appreciate knowing where it has ended up. If you intend to use this information, please wait a few days after the posting date to allow for major errors to be corrected. Please mail any new questions for upcoming trivia (with answers) to my address. This edition and previous editions the trivia can be obtained from my mailserver. To: brain@mail.msen.com Subject: MAILSERV Body: send trivia1 quit This will retrieve the first edition of the trivia. Replace the number with the edition you want. **NEW** Interested persons can now subscribe to the Trivia Mailing List. To add your name to the list, please mail a message: To: brain@mail.msen.com Subject: MAILSERV Body: subscribe trivia Firstname Lastname help quit Each new edition of the trivia will be automatically mailed to you when it is made available on the Internet. I try to post the answers for the questions shortly after the monthly contest has ended. However, I usually wait a few days for any errors I may have made to be worked out before scoring the contest. -------Commodore Trivia Edition #32 Questions and Answers (BEGIN)-------- The "BASIC Tokens" Trivia Set The following questions refer to the way Commodore "crunched" BASIC programs by substituting one of more bytes called "tokens" for BASIC keywords in a BASIC program. The resulting code was smaller, since multiple character keywords were internally replaced with smaller length tokens. (All the answers were taken from _Commodore Magazine_, April 1987, pp 82-85.) Q $1F0) Commodore BASIC tokens start at what number? A $1F0) $80, or 128. Q $1F1) BASIC 2.0 defines tokens without gaps up to $ca. What keyword is represented by $cb? A $1F1) GO. Q $1F2) Why is the token for PI strange? A $1F2) It is token $ff, or 255. Q $1F3) All versions of Commodore BASIC contain at least a subset of tokens. At what number does this subset end? A $1F3) $ca. Q $1F4) BASIC 4.0 defines tokens beyond $cb. What is the last token included in BASIC 4.0? A $1F4) $da. Q $1F5) There was a BASIC 4.0+ included in the B series. It extends the BASIC with some new commands not in 4.0. What token range are these new commands at? A $1F5) $db-$e8. Q $1F6) When a user plugs a Super Expander into a Commodore 64, he or she gains access to 25 new BASIC commands. The tokens for these commands are defined differently from the previous tokens. What is the difference? A $1F6) They are two byte tokens of the form: $fe XX, where XX ranges from $80 to $9e. Q $1F7) When the Plus/4 and C-16 was developed, new commands were added to BASIC. In addition, many commands from BASIC 4.0 were also included. Unfortunately, the tokens for BASIC 4.0 commands included in these new machines differed from those in the older BASIC 4.0. If a user lists a program written in BASIC 4.0 on a Plus/4, what will the BASIC 4.0 CONCAT command show up as? A $1F7) CONCAT is $cc in BASIC 4.0, and is RGR in BASIC 3.5. Q $1F8) What is the last token used in the Plus/4 line? A $1F8) $fd. Q $1F9) If you list a program written on the Plus/4 with the keyword SCALE on a BASIC 4.0/4.0+ machine, what happens? A $1F9) SCALE on BASIC 3.5 is token $e9, which is not in the BASIC 4.0(+) list. The PET will crash. Interstingly, tokens above $e9 do not crash the PET. Q $1FA) When the C128 was released, it shared many tokens with the Plus/4. However, at $ce, the 128 differs from the Plus/4. The Plus/4 token $ce corresponds to RLUM, but the C128 uses the token another way. What is peculiar about the C128 usage? A $1FA) The C128 uses $ce as a prefix byte for a range of two-byte tokens that range from $02 to $0a. Q $1FB) The C128 shares many keywords with the Super Expander cartridge for the C64. As with the Plus/4, though, keywords don't map to the same token. To what token does the C128 keyword SPRITE (token: $fe $07) correspond to on the Super Expander equipped 64? A $1FB) $fe $93. Q $1FC) What keyword was not included in BASIC v1, but was included in BASIC v2? A $1FC) GO, token $cb. Q $1FD) The C128 defines all the tokens from $fe $02 to $fe $26, with the exception of two tokens. Name one of them. A $1FD) $fe $20 and $fe $22. Q $1FE) The Plus/4 line had the ability to add keywords dynamically when running cartridges. At what point in the token list do these "added" keywords show up in the Plus/4 line? A $1FE) They use $fe as a prefix byte for two-byte tokens. Q $1FF) If a programmer want to write a single program to run on a B128, a plus/4, and a C128, what version of BASIC is the lowest common denominator? A $1FF) Unfortunately, BASIC 2.0 is it. The information in this between the lines marked by (BEGIN) and (END) is copyright 1996 by Jim Brain. Provided that the information between the (BEGIN) and (END) lines is not changed except to correct typographical errors, the so marked copyrighted information may be reproduced in its entirety on other networks or in other mediums. For more information about using this file, please contact the address shown below. Jim Brain j.brain@ieee.org Some are easy, some are hard, try your hand at: -------------Commodore Trivia Edition #32 Questions (END)--------------- The information in this between the lines marked by (BEGIN) and (END) is copyright 1996 by Jim Brain. Provided that the information between the (BEGIN) and (END) lines is not changed except to correct typographical errors, the so marked copyrighted information may be reproduced in its entirety on other networks or in other mediums. For more information about using this file, please contact the address shown below. Jim Brain brain@mail.msen.com 602 North Lemen Fenton, MI 48430 (810) 737-7300 x8528 --------Commodore Trivia Edition #32 Questions and Answers (END)--------- -- Jim Brain, Embedded System Designer, Brain Innovations, Inc. (BII)(offline sig) j.brain@ieee.org "Above views DO reflect my employer, since I'm my employer" Dabbling in WWW, Embedded Systems, VR, Old CBM computers, and Good Times! -Me- Jim Brain: BII, VR, and CBM info