home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / MATH / XACT51.ZIP / X16.DOC < prev    next >
Encoding:
Text File  |  1991-02-01  |  85.0 KB  |  2,154 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                           XACT-16C Programmer's Calculator
  9.  
  10.  
  11.                            The Hewlett-Packard Compatible
  12.                                Programmer's Calculator
  13.                             For Your IBM PC or Compatible
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.                                 CalcTech Incorporated
  35.                                  6014 NE 60th Street
  36.                                    P.O. Box 15277
  37.                                Seattle, WA. 98115-0277
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.                                  Phone: 206-527-9950
  46.                                   Fax: 206-525-1331
  47.  
  48.                                 Description
  49.  
  50.      XACT-16C is the Programmer's Calculator of  the  XACT CALCULATORS
  51.      series.   XACT  CALCULATORS  emulate  the  functions  of Hewlett-
  52.      Packard's  handheld  HP-11C  Scientific,  HP-12C  Financial,  and
  53.      HP-16C  Programmer's calculators and include additional  features
  54.      such  as  program  store  to  disk, simulated tape  display,  and
  55.      constant memory.
  56.  
  57.      XACT CALCULATORS includes an auxiliary shell program.  XSHELL.EXE
  58.      is a Terminate-Stay-Resident (TSR) program which  loads  and runs
  59.      all three calculators.  (Note:  A TSR is a program  which remains
  60.      loaded  but  inactive  after  it  finishes execution.   TSRs  are
  61.      usually made active by  pressing  a  "hot-key"  which pops up the
  62.      program,  even  if  another program is executing  at  the  time).
  63.      XSHELL.EXE has 3 hot-keys, one for each calculator.
  64.  
  65.      Normally, the disadvantage of TSRs is that they consume a  lot of
  66.      your computer's memory, even while they're inactive.  Thus if you
  67.      have  loaded  one  or more TSRs, there may not be enough RAM left
  68.      over  to  run  your  spreadsheet,  word processor, or  other  DOS
  69.      programs.  XSHELL.EXE helps reduce "RAM Cram" because it REQUIRES
  70.      ONLY  6K BYTES OF RAM!  In fact, If you have EMS memory installed
  71.      (see section  2.2) in your computer, XSHELL requires an amazingly
  72.      small 1.5K bytes of conventional DOS memory!.
  73.  
  74.      Each  calculator  can  be  run  individually as an  ordinary  DOS
  75.      program by running either X11.EXE,  X12.EXE, or X16.EXE.  Or, all
  76.      three  calculators  can  be  run  as  a  single  TSR  by  running
  77.      XSHELL.EXE.
  78.  
  79.      XSHELL.EXE will deactivate and unload  itself  from  RAM  after 8
  80.      minutes until you register your copy.  This will allow you to try
  81.      XACT CALCULATORS as a TSR before you register.    Once XSHELL.EXE
  82.      unloads itself, your computer  will  behave  as though XSHELL had
  83.      never been loaded in  the  first  place.   To re-activate XSHELL,
  84.      simply run the program again.  It will again  remain  loaded  for
  85.      another 8 minutes.
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.                                    - 2 -
  105.  
  106.                   Quick Registration for XACT CALCULATORS
  107.  
  108.  
  109.      Registration for XACT  CALCULATORS  is only $27.00.  To register,
  110.      print  a  copy  of  the  file  ORDERFRM.DOC  and  fax or mail the
  111.      completed  form  to  us.  We will quickly fax (or mail) back your
  112.      registration serial number and personal  unlock  code.    Run the
  113.      QUICKREG.EXE program  entering  your  name,  serial  number,  and
  114.      unlock code  and  that's  it,  you're  registered!   QUICKREG.EXE
  115.      serializes XSHELL.EXE and "unlocks" it's 8 minute time limit.
  116.  
  117.      AFTER  YOU'VE  REGISTERED  AND  SUCCESSFULLY   RUN  QUICKREG.EXE,
  118.      XSHELL.EXE WILL NO LONGER HAVE AN  8  MINUTE TIME LIMIT.  It will
  119.      remain resident in your computer's  RAM (waiting for a hot-key to
  120.      become active) until you reboot or manually unload XSHELL.
  121.  
  122.      If you prefer to order your registered copy by mail, feel free to
  123.      mail in your completed form.  A copy of the file  ORDERFRM.DOC is
  124.      shown on the following page.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.                                    - 3 -
  163.  
  164.  
  165.      ----------------------------------------------------------------------
  166.                           FAX this form to: (206)-525-1331
  167.                                      or mail to:
  168.                                    CalcTech, Inc.
  169.                                  6014 NE 60th Street
  170.                                    P.O. Box 15277
  171.                               Seattle, WA.  98115-0277
  172.      ----------------------------------------------------------------------
  173.  
  174.                            XACT CALCULATORS - Version 5.1
  175.                                QUICK REGISTRATION FORM
  176.  
  177.        I wish to register  my copy of XACT CALCULATORS (includes XACT-11C
  178.        Scientific, XACT-12C Financial, and XACT-16C Programmer) today for
  179.        $27.00  (Washington  state residents add 8.2%  sales tax).  Please
  180.        (check one or more boxes below):
  181.  
  182.              [ ]  FAX  my serial number and personal unlock code
  183.                   as soon as possible.
  184.  
  185.                   My FAX number is: ____________________________
  186.  
  187.  
  188.              [ ]  Mail my serial number and personal unlock code
  189.                   as soon as possible.
  190.  
  191.  
  192.              [ ]  Send my  registered copy by mail.  (Enclose an
  193.                   an additional $5.00 for U.S. or Canada, $10.00
  194.                   for overseas air mail).  I prefer (check one):
  195.  
  196.                   [ ] 5.25"  or  [ ] 3.5"  diskettes
  197.  
  198.  
  199.      Name: ______________________________ Company:_________________________
  200.  
  201.      Phone: (Day) ______________________ (Evening) ________________________
  202.  
  203.      Address: _____________________________________________________________
  204.  
  205.      City: ______________________________ State: ________ Zip: ____________
  206.  
  207.      Comments: ____________________________________________________________
  208.  
  209.      ______________________________________________________________________
  210.  
  211.      (check one):      [ ] VISA     [ ] Mastercard     [ ] Check Enclosed
  212.  
  213.      Credit card #: ____________________________________ Expires: ____/____
  214.  
  215.      Cardholder's Name (Please print): ____________________________________
  216.  
  217.      Cardholder's Signature: ______________________________________________
  218.  
  219.  
  220.                                    - 4 -
  221.  
  222.                           Background Information
  223.  
  224.  
  225.      CalcTech,  Inc.  is  a  company  with a respected history in  the
  226.      development of software calculators.   The  article  "TSR Desktop
  227.      Organizers", (PC  Magazine, Aug. 1987), contained a review of the
  228.      leading desk  accessory programs.  Three of the fourteen products
  229.      reviewed incorporated  calculators  developed  by  CalcTech.    A
  230.      CalcTech  calculator  has  also  won  PC  Magazine's  prestigious
  231.      "Editor's Choice" award.
  232.  
  233.      CalcTech has developed calculators for publishers and  OEM's such
  234.      as  Software  Publishing  Corp.,  Bellsoft  Inc.,  DAC  Software,
  235.      Popular Programs Inc., Timeworks Inc., Practical Peripherals, and
  236.      Monogram Software.
  237.  
  238.  
  239.      Here's What A Few Industry Experts Have To Say:
  240.  
  241.      "XACT-16C...  It has power to burn."    --Johnathan  Matzkin,  PC
  242.      Magazine.
  243.  
  244.      "PC-12C's (OEM version of  XACT-12C)  emulation  of the HP-12C is
  245.      exact, it gets my vote."  --Jim Seymour, PC Magazine
  246.  
  247.      "I found Bellsoft's (OEM version)  Pop-Up  calculator  to  be the
  248.      best for office work" --Mark J. Welch, BYTE.
  249.  
  250.      "When a program performs  flawlessly,  it  makes writing a review
  251.      hard.  Such  is  the  case  with  XACT  CALCULATORS."   --Jacques
  252.      Benavente, PCM Magazine
  253.  
  254.      XACT CALCULATORS have  won  PC Brand's 1989 award for outstanding
  255.      technical merit in a shareware program.
  256.  
  257.  
  258.  
  259.                An Important Note About The Shareware Concept
  260.  
  261.      XACT CALCULATORS are copyrighted shareware  programs.    They are
  262.      not freeware or public domain  software.  Payment is made through
  263.      registration and is on the "honor  system".   We ask that you pay
  264.      for  the programs by registration if  after  a  reasonable  trial
  265.      period, you find them to be  useful  in  your work.  We hope that
  266.      you appreciate the "try  before  you  buy" concept that shareware
  267.      products like XACT CALCULATORS provide and that you will take the
  268.      time to register.
  269.  
  270.      Anyone who has ever  purchased  expensive  (or  even inexpensive)
  271.      software can attest to  the  frustration  of  being "burned" by a
  272.      lousy product.   We think XACT CALCULATORS are excellent products
  273.      and we're giving you  the  opportunity to judge for yourself.  If
  274.      you agree, please take a moment to register.
  275.  
  276.  
  277.  
  278.                                    - 5 -
  279.  
  280.                              Customer Support
  281.  
  282.      Support for XACT  CALCULATORS  is  provided  to  registered users
  283.      using our voice messaging "access code" feature.  You can call us
  284.      at (206)-527-9950  and leave your question on our voice messaging
  285.      system.  You will be given  an  "access code" which is a password
  286.      for your message.  You may then call back (usually within 1 day),
  287.      enter your access code using your touch-tone phone, and receive a
  288.      voice   message  response  to  your  question.     Alternatively,
  289.      registered users  can send your question via E-mail on CompuServe
  290.      at 71641,1721 or by U.S. mail.
  291.  
  292.      When  contacting  customer  support,  please  be  as  specific as
  293.      possible  with  your  question and be sure to mention the version
  294.      number of your copy of XACT CALCULATORS.
  295.  
  296.  
  297.            User Groups, Electronic Bulletin Boards, Disk Vendors
  298.  
  299.      User Groups, BBS SysOps, and Disk Vendors may receive an official
  300.      copy  of  the  latest shareware version of  XACT  CALCULATORS  by
  301.      submitting  a  written  request  to  CalcTech, Inc.   Please  add
  302.      CalcTech  to  your  organization's  mailing  list  and  send  any
  303.      appropriate  information  such  as  your  group's  newsletter  or
  304.      catalog.
  305.  
  306.  
  307.                       Private Labels, Custom Versions
  308.  
  309.      Private labellings and/or custom versions of XACT CALCULATORS can
  310.      be developed for your  organization.    Please  contact CalcTech,
  311.      Inc. by in writing for a quotation.
  312.  
  313.  
  314.               Government, Corporate, Academic Site Licensing
  315.  
  316.      A site license grants you the legal right to make multiple copies
  317.      of a  "master" registered version and it's documentation for your
  318.      organization or group.
  319.  
  320.      A  site   license  is  non-transferable.    We  accept  Visa  and
  321.      Mastercard, personal or corporate checks,  and  written  (fax ok)
  322.      purchase  orders  (NET  30, FOB Seattle, WA.)  for  site  license
  323.      registration.  The following page is a site license form  you can
  324.      use to fax or mail or mail to us for site licensing.
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.                                    - 6 -
  337.  
  338.      ----------------------------------------------------------------------
  339.                      FAX this form to: (206)-525-1331
  340.                                 or mail to:
  341.                               CalcTech, Inc.
  342.                             6014 NE 60th Street
  343.                                P.O.Box 15277
  344.                          Seattle, WA.  98115-0277
  345.      ----------------------------------------------------------------------
  346.  
  347.                       XACT CALCULATORS - Version 5.1
  348.                       Site License Registration Form
  349.  
  350.  
  351.           Use  this form to obtain a site license for your company or
  352.           group.  Your  registered copy  will be  sent via U.S. mail.
  353.  
  354.           I wish to register XACT CALCULATORS under a multiple (site)
  355.           license agreement.  Please license my organization to allow
  356.           us to duplicate up to: (check one)
  357.  
  358.           [ ]  10 copies .................................... $100.00
  359.  
  360.           [ ]  100 copies ................................... $350.00
  361.  
  362.           [ ]  1000 copies ................................. $1000.00
  363.  
  364.                WA. state residents add 8.2% ................ $_______
  365.  
  366.                                                        TOTAL $_______
  367.  
  368.  
  369.      Company or Group Name: _______________________________________________
  370.  
  371.      Your Name: ___________________________________ Phone: ________________
  372.  
  373.      Address: _____________________________________________________________
  374.  
  375.      City: ______________________________ State: _________ Zip: ___________
  376.  
  377.  
  378.      Method of Payment: (check one)
  379.  
  380.          [ ]  Check enclosed
  381.  
  382.          [ ]  Bill Me.  Terms are NET 30, FOB Seattle, Washington
  383.               Our  Federal  taxpayer  I.D. number is:  91-1382828
  384.  
  385.               Purchase Order Number (optional): ___________________________
  386.  
  387.          [ ]  Charge my Visa or Mastercard
  388.  
  389.               Cardholder's Name: __________________________________________
  390.  
  391.               Credit Card #: ____________________________ Expires:____/____
  392.  
  393.  
  394.                                    - 7 -
  395.  
  396.                              License Agreement
  397.  
  398.      You are hereby granted  permission  to  use  this software and to
  399.      distribute  copies  of  the  software  and  documentation  in its
  400.      original  form  as  long as it  is  not  distributed  for  profit
  401.      (handling fees  less  than  $5.00  are  ok).   ONLY COPIES OF THE
  402.      SHAREWARE VERSION  OF  THIS  SOFTWARE  AND  DOCUMENTATION  MAY BE
  403.      DISTRIBUTED  IN ANY FORM.  You are not  allowed  to  make  copies
  404.      (except for backup purposes only) or distribute this software and
  405.      documentation once the software has been registered.
  406.  
  407.      THE SOFTWARE HEREIN ARE PROVIDED  "AS IS" WITHOUT WARRANTY OF ANY
  408.      KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
  409.      THE IMPLIED  WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR A
  410.      PARTICULAR PURPOSE.   THE  ENTIRE  RISK  AS  TO  THE  QUALITY AND
  411.      PERFORMANCE OF THE PROGRAMS IS WITH YOU.
  412.  
  413.      IN  NO  EVENT  SHALL CALCTECH OR ANY OF IT'S OFFICERS, DIRECTORS,
  414.      SHAREHOLDERS, EMPLOYEES,  AFFILIATES,  OWNERS,  OR  OTHER RELATED
  415.      PARTIES BE LIABLE  TO  YOU  OR  ANY OTHER THIRD PARTY FOR DAMAGES
  416.      INCLUDING ANY  LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR
  417.      CONSEQUENTIAL DAMAGES ARISING OUT OF  THE USE OF OR THE INABILITY
  418.      TO USE THIS PRODUCT OR AS TO THE PERFORMANCE OF THIS PRODUCT EVEN
  419.      IF WE HAVE  BEEN  ADVISED  OF  THE POSSIBILITY OF SUCH DAMAGES IN
  420.      ADVANCE.
  421.  
  422.      SOME STATES DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY
  423.      FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES SO  THE  ABOVE LIMITATION
  424.      OR EXCLUSION MAY NOT APPLY TO YOU.
  425.  
  426.      THIS  AGREEMENT  IS  GOVERNED  BY   THE  LAWS  OF  THE  STATE  OF
  427.      WASHINGTON.
  428.  
  429.  
  430.                            Trademarks/Copyrights
  431.  
  432.      HP-11C, HP-12C, and HP-16C are trademarks of Hewlett-Packard Co.
  433.      Lotus is a trademark of Lotus Development Corp.
  434.      Intel is a trademark of the Intel Corp.
  435.      PC-DOS, IBM-PC, PC-XT, PC-AT and PS/2 are trademarks of IBM.
  436.      MS-DOS, Microsoft Windows and Microsoft Word are trademarks of
  437.      Microsoft Corp.
  438.  
  439.      Copyright (C) 1987-1990, 1991 by CalcTech Inc.
  440.      All rights reserved.
  441.      Specifications herein are subject to change without notice.
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.                                    - 8 -
  453.  
  454.                              TABLE OF CONTENTS
  455.  
  456.  
  457.      Section  Title                                                 Page
  458.  
  459.      1.  Getting Started  .......................................... 11
  460.  
  461.      1.1      Introduction ......................................... 11
  462.      1.2      Other Guides ......................................... 11
  463.      1.3      System Requirements .................................. 11
  464.      1.4      Installing XACT-16C and Making Backups ............... 12
  465.      1.5      Command Line Options & Changing Hot Keys ............. 12
  466.      1.6      Using XACT-16C with Microsoft Windows ................ 13
  467.      1.7      Using XACT-16C on a Network .......................... 13
  468.  
  469.      2.  Running XACT-16C .......................................... 14
  470.  
  471.      2.1      XACT-16C as a Standalone DOS Program ................. 14
  472.      2.2      XACT-16C as a TSR Program ............................ 14
  473.      2.3      XACT-16C as a Removable TSR Program .................. 15
  474.  
  475.      3.  XACT-16C Basics ........................................... 16
  476.  
  477.      3.1      Keyboard Conventions ................................. 16
  478.      3.2      Function Key Usage ................................... 16
  479.      3.3      Prefix Keys .......................................... 16
  480.  
  481.      4.  Features .................................................. 17
  482.      4.1      Getting Help ......................................... 17
  483.      4.2      Viewing the Tape ..................................... 17
  484.      4.3      Stamping the Tape .................................... 17
  485.      4.4      Printing the Tape .................................... 17
  486.      4.5      Storing the Tape ..................................... 17
  487.      4.6      Loading a Program .................................... 18
  488.      4.7      Storing a Program .................................... 18
  489.      4.8      ASCII Table .......................................... 18
  490.  
  491.      5.  USING XACT-16C ............................................ 18
  492.  
  493.      5.1      Prefix Keys .......................................... 18
  494.      5.2      Clearing the Display and Prefix Keys ................. 19
  495.      5.3      Entering Numbers ..................................... 19
  496.      5.4      Short Cut Keys ....................................... 20
  497.      5.5      RPN Logic, the Stack, and the ENTER key .............. 20
  498.      5.6      Stack Operations ..................................... 21
  499.      5.7      Memories and Memory Operations ....................... 21
  500.      5.8      The Index Register and Using Memories Indirectly ..... 22
  501.      5.9      Modes of Operation and Word Size ..................... 22
  502.      5.10     1's Complement Numbers ............................... 22
  503.      5.11     2's Complement Numbers ............................... 22
  504.      5.12     Unsigned Numbers ..................................... 23
  505.  
  506.  
  507.  
  508.  
  509.  
  510.                                    - 9 -
  511.  
  512.      Section  Title                                                 Page
  513.  
  514.      5.13     Word Size ............................................ 23
  515.      5.14     "SHOW" Functions ..................................... 23
  516.      5.15     Display Windows ...................................... 24
  517.      5.16     Flags ................................................ 24
  518.      5.17     Status ............................................... 25
  519.  
  520.      6.  Arithmetic, Bit Manipulation, and Logical Functions ....... 26
  521.  
  522.      6.1      Addition and Subtraction ............................. 26
  523.      6.2      Multiplication and Division .......................... 26
  524.      6.3      Remainder after Division ............................. 27
  525.      6.4      Square Root .......................................... 27
  526.      6.5      Absolute Value ....................................... 27
  527.      6.6      Logical Functions .................................... 27
  528.      6.7      Bit Functions ........................................ 28
  529.      6.8      Summing Bits ......................................... 29
  530.      6.9      Masking .............................................. 29
  531.      6.10     Left Justify ......................................... 29
  532.  
  533.      7.  Shifting and Rotating Bits ................................ 30
  534.  
  535.      7.1      Shift Functions ...................................... 30
  536.      7.2      Rotate Functions ..................................... 30
  537.  
  538.      8.  Floating Point Mode ....................................... 31
  539.  
  540.      8.1      Converting to Floating Point Mode .................... 31
  541.      8.2      Floating Point Calculations .......................... 31
  542.      8.3      Returning to Integer Mode ............................ 32
  543.  
  544.      9.  Programming XACT-16C ...................................... 32
  545.  
  546.      9.1      Introduction to Programming .......................... 32
  547.      9.2      Entering a Program ................................... 32
  548.      9.3      Labels in Programs ................................... 34
  549.      9.4      Using Subroutines .................................... 34
  550.      9.5      Returning from a Program or Subroutine ............... 34
  551.      9.6      Entering Data and the Run/Stop Key ................... 34
  552.      9.7      Branching Using the Index Register ................... 35
  553.      9.8      Program Loops Using the Index Register ............... 35
  554.      9.9      Program Loops and Branches Using the X and Y Registers 36
  555.      9.10     Branching Using Flags ................................ 36
  556.      9.11     Branching On Bit Set/Clear ........................... 37
  557.      9.12     The Single-Step Instruction .......................... 37
  558.      9.13     Moving to a Program Line Number ...................... 37
  559.  
  560.      10.  Appendix ................................................. 38
  561.  
  562.      10.1  Error Conditions ........................................ 38
  563.  
  564.  
  565.  
  566.  
  567.  
  568.                                    - 10 -
  569.  
  570.      1.  Getting Started
  571.  
  572.  
  573.      1.1  Introduction
  574.  
  575.  
  576.      XACT CALCULATORS  are software which emulate the functions of the
  577.      handheld  models  of  Hewlett-Packard's HP-11C Scientific, HP-12C
  578.      Financial, and  HP-16C  Programmer's  calculators.    If  you are
  579.      familiar with one or  more  of  these  calculators, you will find
  580.      that you  already  know  how  to  use  XACT CALCULATORS.  If not,
  581.      you'll find XACT CALCULATORS easy to learn and use.    They  will
  582.      become an invaluable tool in your work.
  583.  
  584.      XACT-16C   is   the   Programmer's   Calculator  program.    XACT
  585.      CALCULATORS  also incorporate the XACT-11C Scientific  Calculator
  586.      and the XACT-12C Financial Calculator.
  587.  
  588.      If you are already familiar with DOS and with the HP-16C, you may
  589.      only need to read Chapters 2 and 3.    This  will  provide enough
  590.      information to get you started.
  591.  
  592.      If you are new to DOS and/or the HP-16C, you may wish to read, or
  593.      at least skim, Chapters 1 through 8.
  594.  
  595.  
  596.      1.2  Other Guides
  597.  
  598.      There are a number  of  guides  and  references available for the
  599.      HP-16C  that  can  be  used  with  XACT-16C  as  well.  These are
  600.      generally available in bookstores and other places where Hewlett-
  601.      Packard calculators are sold.   Some  of  these  publications are
  602.      listed below
  603.  
  604.      "HP-16C  Owner's  Handbook  and  Problem  Solving  Guide"  Covers
  605.      general  operations, functions, applications, and programming  of
  606.      the HP-16C.  Published by the Hewlett-Packard Company.
  607.  
  608.      "An Easy Course in using the HP-16C" by Ed  Keefe.  Published  by
  609.      Grapevine Publishing, Inc. P.O. Box 118, Corvallis, OR, 97339.
  610.  
  611.  
  612.      1.3  System Requirements
  613.  
  614.      To operate the XACT-16C Calculator, you will need an IBM PC,  PC-
  615.      XT, PC-AT, PS/2, or close compatible equipped with  at  least the
  616.      following:
  617.  
  618.         256K RAM
  619.         PC-DOS or MS-DOS version 3.00 or later
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.                                    - 11 -
  627.  
  628.      1.4  Installing XACT CALCULATORS and Making Backups
  629.  
  630.      You  should make a copy of the programs  contained  on  the  XACT
  631.      CALCULATORS diskette for  backup  purposes.  Use  the  DOS "copy"
  632.      command to copy all the files to another diskette or to your hard
  633.      disk.  There may be a file named README.DOC on your disk.  If so,
  634.      you should examine it using your word processor or the DOS "type"
  635.      command.
  636.  
  637.  
  638.      1.5  Command Line Options & Changing Hot-Keys
  639.  
  640.      A command line option  is  an  additional  command typed when you
  641.      first load X16.EXE or  XSHELL.EXE.    There  are several of these
  642.      options available.  For example, if you wish to start XACT-16C in
  643.      octal mode, you would type:
  644.  
  645.          x16  /radix=o  [ENTER]
  646.  
  647.      ([ENTER] means press the ENTER key). As another example, to start
  648.      up XACT-16C with an 8 bit word size and the mouse disabled:
  649.  
  650.          x16   /nomouse /wsize=8
  651.  
  652.      The  following  is  a list of available command line options when
  653.      running XACT-16C.
  654.  
  655.          /mono         Force XACT-16C into monochrome mode
  656.          /sci          Start up in scientific notation (XACT-11C only)
  657.          /nomouse      Disable mouse operation
  658.          /nosignon     Disable the signon screen
  659.          /swap=<path>  Directory/Path used to store swap files
  660.          /wsize=nn     Set word size (XACT-16C only). Valid settings
  661.                        for nn are 2 to 64.
  662.          /radix=n      Set radix (XACT-16C only). Valid settings for
  663.                        n are h,d,o,b, or f (hex,dec,oct,bin,float)
  664.  
  665.      There are additional command line options available  when running
  666.      the  program  XSHELL.EXE.   The following  is  a  list  of  these
  667.      options.
  668.  
  669.          /alt          Changes invocation key to Alt-s (XACT-11C),
  670.                        Alt-f (XACT-12C), Alt-p (XACT-16)
  671.          /alt-ctrl     Change invocation key to Alt-Ctrl-s (XACT-11C),
  672.                        Alt-Ctrl-f (XACT-12C), Alt-Ctrl-p (XACT-16C)
  673.          /mono         Force XACT CALCULATORS into monochrome mode
  674.          /sci          Set scientific notation (XACT-11C only)
  675.          /noems        Disable EMS memory usage (if EMS memory present)
  676.          /nomouse      Disable mouse operation
  677.          /nosignon     Disable the signon screen
  678.          /swap=<path>  Directory/Path used for swap files.  (See section
  679.                        on using XACT CALCULATORS on a network)
  680.          /wsize=nn     Set word size (XACT-16C only). Valid settings
  681.                        for nn are 2 to 64.
  682.  
  683.  
  684.                                    - 12 -
  685.  
  686.          /radix=n      Set radix (XACT-16C only). Valid settings for
  687.                        n are h,d,o,b, or f (hex,dec,oct,bin,float)
  688.  
  689.      1.6 Using XACT-16C with Microsoft Windows
  690.  
  691.  
  692.      If you use Microsoft Windows, you  may  wish to set up Windows to
  693.      run  XACT-16C.    XACT-16C  will  run as an ordinary "text  mode"
  694.      application under Windows  which  can  be  set  up  to  be either
  695.      windowed or in full screen mode.
  696.  
  697.      To run XACT-16C under Windows, you should first create a PIF file
  698.      which is used to "describe" the program to Windows.  Use  the PIF
  699.      editor  (pifedit.exe)  to  create  an  x16.pif  file.    For  the
  700.      "optional parameters" field, type in /nosignon  so  that XACT-16C
  701.      won't  display  it's  startup screen every time you click on it's
  702.      icon.  Also make sure that the "KB required" field is set to 128.
  703.      (For additional information on using  the  PIF  editor,  see your
  704.      Windows documentation).
  705.  
  706.      Once you  have  created  a  PIF  file,  you will probably want to
  707.      create an icon  so  you  can  easily  invoke  XACT-16C  by double
  708.      clicking  on an icon.  We have supplied a custom icon you can use
  709.      to do  this.    From  the  Windows  program manager, create a new
  710.      program  item  and  in the "command line" field, type in x16.pif.
  711.      Then select the "change  icon"  button and type in xact.ico.  (If
  712.      you're unclear  on  these  procedures,  they're  also  covered in
  713.      Microsoft's Windows documentation).
  714.  
  715.      1.7  Using XACT-16C on a Network
  716.  
  717.      XACT-16C  and  all  XACT  CALCULATORS  are  compatible  with most
  718.      networks.    If  you  wish  to  use  them on a network, read  the
  719.      following information.
  720.  
  721.      All XACT CALCULATORS use a technique known as  swapping  in order
  722.      to save memory as well as save the state of each  calculator each
  723.      time  you  finish  using  it.    Swapping  creates  a  number  of
  724.      "temporary" files.  By default, these files are saved in the same
  725.      directory as the XACT CALCULATOR  programs themselves.  If two or
  726.      more  users on a network are running  a  calculator,  their  swap
  727.      files  will eventually corrupt each other, causing  unpredictable
  728.      results.  There are 2 different ways to avoid this problem.  Both
  729.      involve  changing  the  directory  in  which the swap  files  are
  730.      stored.
  731.  
  732.      The  first  method  is by using an environmental variable to tell
  733.      XACT  CALCULATORS  the  path to use to store its swap files.  For
  734.      example, assume you have  2  network users (Jan and Bill) each of
  735.      which  have access to network drive N:.   Assume  also  that  the
  736.      directorys  N:\USER\JAN\TEMP  and  N:\USER\BILL\TEMP have already
  737.      been created on drive  N:   The environmental variable can be set
  738.      by putting the following statement in Jan's AUTOEXEC.BAT file:
  739.  
  740.  
  741.  
  742.                                    - 13 -
  743.  
  744.         SET XACT=N:\USER\JAN\TEMP
  745.  
  746.      whereas Bill's AUTOEXEC.BAT file would contain the statement:
  747.  
  748.         SET XACT=N:\USER\BILL\TEMP
  749.  
  750.      Now  even though Jan and Bill may be running the same copy of one
  751.      of the calculators, they would  each have separate copies of swap
  752.      files and there would be no conflict.
  753.  
  754.      The second method uses  the  same idea, however, the swap path is
  755.      chosen from the command line.  For example:
  756.  
  757.         X16 /SWAP=C:\TEMP
  758.  
  759.      would place the swap files  in the directory C:\Temp, assuming it
  760.      existed.
  761.  
  762.  
  763.  
  764.      2.   Running XACT-16C
  765.  
  766.  
  767.      2.1  Running XACT-16C as a stand-alone DOS program
  768.  
  769.      To run XACT-16C, at the DOS prompt type:
  770.  
  771.          x16  [ENTER]
  772.  
  773.  
  774.      2.2  Running XACT-16C as a TSR program
  775.  
  776.      To run XACT-16C as a TSR program, type
  777.  
  778.          xshell  [ENTER]
  779.  
  780.      You will see  the  copyright  message  appear on the screen.  The
  781.      computer  will then return to the DOS prompt  and  appear  as  if
  782.      nothing  had  happened.    However,  the  XACT  CALCULATORS shell
  783.      program  has now been loaded into your  computer's  memory.    To
  784.      activate XACT-16C, press:
  785.  
  786.          Alt-Shift-P
  787.  
  788.      XACT-16C  will  now  appear  on  your  screen,  ready to  perform
  789.      calculations.    To  exit from XACT-16C, press the Esc key.  In a
  790.      likewise fashion, to run the XACT-11C scientific  calculator, you
  791.      would  instead  press  Alt-Shift-S,  and  to  run   the  XACT-12C
  792.      Financial calculator you  would  press Alt-Shift-F.  You can also
  793.      unload XSHELL from RAM by pressing Alt-Shift-U.
  794.  
  795.      When you run XSHELL, it will use between  1.5K  and  6K  bytes of
  796.      your computer's RAM.  To determine exactly how much memory XSHELL
  797.      is using, you can run the DOS command "chkdsk"  both  before  and
  798.  
  799.  
  800.                                    - 14 -
  801.  
  802.      after running XSHELL and  noting  the  difference in memory bytes
  803.      free.   If you are unfamiliar with this  command,  see  your  DOS
  804.      reference manual.
  805.  
  806.      EMS (Expanded memory specification)  memory  is  a type of memory
  807.      specification that was developed  jointly  by  Lotus,  Intel, and
  808.      Microsoft.   EMS memory was developed as  a  work-around  to  get
  809.      around the  640K  DOS  memory  limitation.    In order to use EMS
  810.      memory, a program must be  written specifically to use EMS memory
  811.      (if available).  XSHELL is such  a  program.   If you have an EMS
  812.      memory board installed in your  computer, XSHELL will put as much
  813.      of  itself  in  EMS memory as it can and will  also  "swap"  your
  814.      computer's memory to EMS memory  when  you  pop-up  a calculator.
  815.      With EMS memory installed, XSHELL  will require less than 1.5K of
  816.      DOS  memory!.    If  you  don't  have  EMS memory but have a  386
  817.      computer,  there are several commercial programs available  which
  818.      can "simulate" EMS memory.
  819.  
  820.      Even if you don't have EMS memory installed, XSHELL requires less
  821.      than 6K bytes  of  DOS  memory.   Without EMS memory, XSHELL will
  822.      swap to disk, creating the file XSHELL.SWP.  This file may  be as
  823.      large as 131k bytes.
  824.  
  825.      If you have not  registered  your  copy  of XACT CALCULATORS, you
  826.      will only be able to use them as  a  TSR  program  for 8  minutes
  827.      before they automatically unload themselves from memory.  After 8
  828.      minutes,  you  will  hear  a  tone  telling  you that  XSHELL  is
  829.      unloading.  You will have to run XSHELL  again  in  order  to use
  830.      XACT CALCULATORS as a TSR.  Once you have registered and received
  831.      your serial number and unlock code, you can  enter  these numbers
  832.      into  the program QUICKREG.EXE which will  remove  the  8  minute
  833.      limit from XSHELL.  You can always run X16.EXE as a (non-TSR) DOS
  834.      program without any limitations whatsoever.
  835.  
  836.  
  837.      2.3  XACT-16C as a Removable TSR Program
  838.  
  839.      When the shell program is loaded  as  a TSR program as in section
  840.      2.1 above, it remains loaded in your computer's memory until your
  841.      computer  is  rebooted  or powered off.    To  unload  the  shell
  842.      program, press:
  843.  
  844.          Alt-Shift-U
  845.  
  846.      Unloading the shell  program  will  not  work  if  any  other TSR
  847.      programs have been loaded after XSHELL.EXE.   Unfortunately, this
  848.      is a limitation of DOS itself.
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.                                    - 15 -
  859.  
  860.      3.  XACT-16C Basics
  861.  
  862.  
  863.      3.1  Keyboard Conventions
  864.  
  865.      Throughout this manual, XACT-16C function keys are denoted within
  866.      a box.  For example, the  function  key  for a left shift (SL) is
  867.      shown as [SL].    In  the  case  of function keys which require a
  868.      prefix key (discussed in the next section), the prefix key is not
  869.      given in this manual since it can easily be determined.
  870.  
  871.      Keys on the PC keyboard are listed in this  manual  using  single
  872.      quotes  such as 'a'.  Numbers to be  entered  into  XACT-16C  are
  873.      shown  in normal type, except for the hex  numbers  A  through  F
  874.      which are shown as function keys.
  875.  
  876.  
  877.      3.2  Function Key Usage
  878.  
  879.      XACT-16C has approximately 70 different function keys arranged in
  880.      the same ordering as  on  the HP-16C.  Function keys are arranged
  881.      in  groups of up to 3 functions per key; an upper, a lower and  a
  882.      middle  function  all  correspond to one function key.  The upper
  883.      and  lower  functions  are invoked by first pressing a prefix key
  884.      (discussed in the next  section)  and then the function key.  The
  885.      middle function does not require the use of a prefix key.  The PC
  886.      keystroke corresponding to function key is  shown  immediately to
  887.      the left of the function box.
  888.  
  889.      The  first  row  of function keys use the PC keys F1 through F10.
  890.      The second through  fourth  rows use the alphabetic characters as
  891.      arranged left to right on your PC keyboard.
  892.  
  893.      For example,  the XACT-16C's [Sto] (store) function key is mapped
  894.      to the letter  'v'  on  the  PC  keyboard.    Likewise, the [ A ]
  895.      function key is invoked by pressing F1.
  896.  
  897.  
  898.      3.3  Prefix Keys
  899.  
  900.      The left and the right shift  keys  on the PC keyboard operate as
  901.      prefix keys, functionally equivalent to the gold [ f  ]  and  the
  902.      blue  [ g ] keys on the HP-16C.  They let you activate the  upper
  903.      and lower sets of functions assigned to a function key.  The left
  904.      shift key on the PC is used as a prefix key to activate the upper
  905.      set of functions.  The right shift key is used as a prefix key to
  906.      activate the lower set of functions.  For example, to  invoke the
  907.      [SR]  function,  you  would press and release the left shift key,
  908.      then press  F2.    To  invoke  the  [ASR] function, you press and
  909.      release the right shift key, then F2.  Likewise,  to  invoke  the
  910.      [sqrtx] function, you would press  and  release  the  right shift
  911.      key, then press 't'.
  912.  
  913.  
  914.  
  915.  
  916.                                    - 16 -
  917.  
  918.      4.  Features
  919.  
  920.  
  921.      4.1  Getting Help
  922.  
  923.      A Help menu is available when you are working with XACT-16C.   To
  924.      obtain help press:
  925.  
  926.          Alt-F1
  927.  
  928.      An information screen will appear in a window.  The help menu can
  929.      be removed by pressing F1 again.
  930.  
  931.  
  932.      4.2  Viewing the Tape
  933.  
  934.      XACT-16C provides a  simulated  tape display which keeps a record
  935.      of your  calculations  as  you  perform  them.   To view the tape
  936.      press:
  937.  
  938.          Alt-F2
  939.  
  940.      The tape will appear in a window.  To remove  the  tape, press F2
  941.      again.
  942.  
  943.  
  944.      4.3  Stamping the Tape
  945.  
  946.      To stamp a message on the simulated tape press:
  947.  
  948.          Alt-F4
  949.  
  950.      The message will appear on the tape as  well  as  the  printer or
  951.      tape disk file if either of these options are being used.
  952.  
  953.  
  954.      4.4  Printing the Tape
  955.  
  956.      To print the tape as you make calculations press:
  957.  
  958.          Alt-F5
  959.  
  960.      To turn off printing, press F5 again.
  961.  
  962.  
  963.      4.5  Storing the Tape
  964.  
  965.      The simulated tape may be  saved  to  a  disk  file  as  you make
  966.      calculations.   Each  time  you  use  XACT-16C,  calculations are
  967.      appended to the tape file.  To store the tape, press
  968.  
  969.          Alt-F6
  970.  
  971.  
  972.  
  973.  
  974.                                    - 17 -
  975.  
  976.      The tape will be saved under the name X16.ASC  in  the  directory
  977.      which you started XACT-16C in.
  978.  
  979.  
  980.      4.6  Loading a Program
  981.  
  982.      To load a program previously saved press:
  983.  
  984.          Alt-F7
  985.  
  986.      A window  will  appear  requesting  a  file  name.  Enter the DOS
  987.      filename of the program you wish to retrieve.
  988.  
  989.  
  990.      4.7  Storing a Program
  991.  
  992.      XACT-16C  allows  you  to save programs as disk files.  To save a
  993.      program on disk, press:
  994.  
  995.          Alt-F8
  996.  
  997.      A window will appear  prompting  you for comments.  You can enter
  998.      up to 3 lines of comments, associated with the  program  you  are
  999.      saving.  Press the  Esc  key after you have entered any comments.
  1000.      Another window will appear prompting you for a  filename.   Enter
  1001.      any valid DOS filename.
  1002.  
  1003.  
  1004.      4.8 ASCII Table
  1005.  
  1006.      An ASCII table will appear in a window over XACT-16C by pressing
  1007.  
  1008.          Alt-F10
  1009.  
  1010.      Press the PgUp or PgDn keys  to  move through the ASCII table, or
  1011.      press  Esc to remove the ASCII table.
  1012.  
  1013.  
  1014.  
  1015.      5.  USING XACT-16C
  1016.  
  1017.  
  1018.      5.1  Prefix Keys
  1019.  
  1020.      The left and the right shift  keys  on the PC keyboard operate as
  1021.      prefix keys, functionally equivalent to the gold [ f  ]  and  the
  1022.      blue  [ g ] keys on the HP-16C.  They let you activate the  upper
  1023.      and  lower sets of functions assigned to each PC  key.   The left
  1024.      shift key on the PC is used as a prefix key to activate the upper
  1025.      set of functions.  Likewise, the right shift  key  is  used  as a
  1026.      prefix key to activate the lower set of functions.    The  prefix
  1027.      keys are "sticky", that is, you press a prefix key and it remains
  1028.      set, even after you release the key.  When you press  and release
  1029.      a prefix key,  the  corresponding set of prefixes will highlight,
  1030.  
  1031.  
  1032.                                    - 18 -
  1033.  
  1034.      indicating which prefix was set.  To clear a prefix key,  use the
  1035.      [PRFX] function.
  1036.  
  1037.      For example, to activate the [HEX] function, press the letter 'e'
  1038.      on the PC keyboard.  On the other hand, the [DSZ] function key is
  1039.      mapped  to  the  same PC key as the [Hex] function but requires a
  1040.      prefix key.  To invoke the [DSZ] function, press and  release the
  1041.      right  shift  key,  (the  lower  prefix key), and then press  the
  1042.      letter 'e'.
  1043.  
  1044.      The prefix keys can also be invoked using the function keys [ f ]
  1045.      and [ g ].
  1046.  
  1047.  
  1048.      5.2  Clearing the Display and Prefix Keys
  1049.  
  1050.      To  clear  a number in the display,  press  the  [CLx]  (Clear  X
  1051.      Register) key.  The display will now contain the value 0.   While
  1052.      entering a number, you may clear the last digit entered  with the
  1053.      [BKSP] key.  For example, if  you  meant to enter the number 1234
  1054.      and mistakenly entered 1235,  press  [BKSP]  and  then press 4 to
  1055.      correct  the  number.   To clear a prefix key, i.e., the lower or
  1056.      the upper prefix, press the [PREFIX] key.  To  clear  all  memory
  1057.      storage registers, press  [REG].   This key doesn't affect values
  1058.      stored in the stack or the LastX register.
  1059.  
  1060.  
  1061.      5.3  Entering Numbers
  1062.  
  1063.      Numbers  are  entered  into XACT-16C by using the numeric keys or
  1064.      the  numeric keypad for the numbers 0 through  9,  and  the  keys
  1065.      mapped to the hex numbers A  through  F  on the PC keyboard.  The
  1066.      decimal point key is only  operational in floating point mode and
  1067.      is mapped to  the  '.'  key  on  the numeric keypad.  Notice that
  1068.      XACT-16C  will  not  accept  certain  numbers  in   integer  mode
  1069.      depending on the radix value being used.   If  the  radix  is Bin
  1070.      (Binary), XACT-16C will only accept the numeric digits  0  and 1,
  1071.      all others are  ignored.    When  using the Octal radix, only the
  1072.      digits  0  through  7 are valid, and so on.  XACT-16C will accept
  1073.      only  as  many  entered  digits  as  the  current word  size  and
  1074.      complement mode will allow.  For example:
  1075.  
  1076.      Keystroke                 Display        Comment
  1077.      ================================================================
  1078.      [Dec]                                    Set decimal mode
  1079.      8 [Wsize]
  1080.      [2's]                                    2's comp. 8 bit
  1081.  
  1082.      255                       -1 Dec
  1083.      [Unsgn]                  255 Dec
  1084.  
  1085.      The  number   255  (FF  Hex)  cannot  be  represented  using  2's
  1086.      complement  8 bit math. Since the high order bit  (interpreted as
  1087.      a sign bit)  is  a 1, the 2's complement of the number is formed.
  1088.  
  1089.  
  1090.                                    - 19 -
  1091.  
  1092.      When unsigned math  is used, the number is interpreted correctly.
  1093.      Notice that if you tried  to enter the number 256 (100 Hex) while
  1094.      operating with a word size  of 8 bits, the  last  digit would not
  1095.      be accepted since 256 requires  a word size of at least 9 bits to
  1096.      be represented.
  1097.  
  1098.  
  1099.      5.4  Short Cut Keys
  1100.  
  1101.      You can use the Enter key  on  the  PC, (also known as the Return
  1102.      key)  as the XACT-16C [ENTER] key as a short cut.  Also, the '+',
  1103.      '-', '*', and '/'  keys   adjacent to the numeric keypad function
  1104.      as you would expect.
  1105.  
  1106.  
  1107.      5.5  RPN Logic, the Stack, and the ENTER key
  1108.  
  1109.      You may already  be  familiar with Reverse Polish Notation (RPN).
  1110.      RPN  is a type of  calculator  logic that eliminates the need for
  1111.      the equals   key  and for parenthesis in calculator computations.
  1112.      Instead, operands   are entered into the calculator and separated
  1113.      using the [ENTER] key.  For example, to add the numbers 3 and 4:
  1114.  
  1115.      Keystroke                 Display        Comment
  1116.      ================================================================
  1117.      [Dec]                                    Decimal mode
  1118.      3 [ENTER]                 3 Dec
  1119.      4 [ + ]                   7 Dec          Add
  1120.  
  1121.      The result, 7, is now displayed.  To multiply this result by 5:
  1122.  
  1123.      Keystroke                 Display        Comment
  1124.      ================================================================
  1125.      5 [ * ]                   35 Dec
  1126.  
  1127.  
  1128.      The way that XACT-16C performs  these calculations with RPN is by
  1129.      using a stack.  The stack consists of 4 registers:  X,  Y, Z, and
  1130.      T.   It is not generally necessary  to  understand  the  internal
  1131.      workings of the stack but for completeness they  will  briefly be
  1132.      discussed below.
  1133.  
  1134.      Any number displayed is said to be in the X  register.   When the
  1135.      [ENTER] key is pressed, a number in the X Register is pushed into
  1136.      the Y  Register  and  the  previous  number  in the Y Register is
  1137.      pushed  into  the  Z  Register.    The  previous  number in the Z
  1138.      register   is pushed into the T Register.  T stands for "Top" and
  1139.      represents the top of  the  stack of numbers.  The previous value
  1140.      of the T register   is lost.  When a function key such as the [+]
  1141.      key  is pressed, the value held in the Y register is added to the
  1142.      X register  and  this  result  is  now  stored in the X register.
  1143.      Pressing  [ENTER]  does  one  other  thing, it leaves  the  stack
  1144.      disabled. This means that a  number entered after the [ENTER] key
  1145.      has  been pressed is not pushed on the stack, it remains in the X
  1146.  
  1147.  
  1148.                                    - 20 -
  1149.  
  1150.      register.  Most operations enable the stack so that  when  a  new
  1151.      number  is  entered,  the previous contents of the X register are
  1152.      pushed into the Y register.  The most notable exceptions  to this
  1153.      rule are the [ENTER] and the [Clx] function keys.
  1154.  
  1155.  
  1156.      5.6  Stack Operations
  1157.  
  1158.      Roll Up  -  The  [R|]  (shown on XACT-16C as a 'R' followed by an
  1159.      arrow pointing up) function  rolls  up the stack.  The X register
  1160.      is copied  into the Y  register.    The Y register is copied into
  1161.      the  Z  register,   and the Z  register  is  copied  into  the  T
  1162.      register.  The T register is "rolled around" into the X register.
  1163.  
  1164.      Roll Down - The [R|] (shown on XACT-16C as a  'R'  followed by an
  1165.      arrow pointing down)  function  rolls  down  the  stack.    The T
  1166.      register  is  copied   into the Z register.  The  Z  register  is
  1167.      copied  into  the  Y register,  and the Y register is copied into
  1168.      the  X  register.  The X register  is rolled around  into  the  T
  1169.      register.
  1170.  
  1171.      X exchange Y - The [x<>y] function exchanges the contents  of the
  1172.      X and Y registers.
  1173.  
  1174.      Last X register - The [LSTx] register holds the previous contents
  1175.      of the X register before an operation was performed.   The [LSTx]
  1176.      register  is  used  to restore the number entered if an incorrect
  1177.      function key is mistakenly pressed.
  1178.  
  1179.  
  1180.      5.7  Memories and Memory Operations
  1181.  
  1182.      XACT-16C  has  16  memories that can  be  used  for  storing  and
  1183.      recalling  numbers.    These memories are called memory registers
  1184.      and  are  referred   to as registers R0 through R9 and RA through
  1185.      RF. To store  a  number  in a memory, press [Sto] n, where n is a
  1186.      number 0 through 9 (using the numeric keypad)  or hex  number [A]
  1187.      through [F].
  1188.  
  1189.      For example:
  1190.  
  1191.      Keystroke                 Display        Comment
  1192.      ================================================================
  1193.      32 [Sto] [ A ]            32 Dec         32 in register RA
  1194.      14 [Sto] 2                14 Dec         14 in register R2
  1195.      [Rcl] [ A ]               32 Dec         Recall reg. RA
  1196.      [Rcl] 2 [ + ]             46 Dec         Add to reg. R2
  1197.  
  1198.  
  1199.      Notice in the preceding example that  the  [  A ] key is a mapped
  1200.      XACT-16C  key,  not  the letter 'A' on the  PC  keyboard  (it  is
  1201.      invoked by pressing the F1 key on the PC keyboard.
  1202.  
  1203.  
  1204.  
  1205.  
  1206.                                    - 21 -
  1207.  
  1208.      5.8  The Index Register and Using Memories Indirectly
  1209.  
  1210.      Memories  can  also  be  accessed  indirectly  using   the  Index
  1211.      register.    The    index  register  is  accessed with the [ I  ]
  1212.      function key.    A  number  may  be  stored in the index register
  1213.      using  [Sto] [ I ] and recalled from  the  index  register  using
  1214.      [Rcl] [ I ].  Also, the [x<>I] function key  is  used to exchange
  1215.      the X register with the Index Register in the same fashion as the
  1216.      [x<>y] function key is used to exchange the X  and  Y  registers.
  1217.      For the examples below, assume STATUS= 2-16-0000.
  1218.  
  1219.      Keystroke                 Display        Comment
  1220.      ================================================================
  1221.      5 [Sto] [ I ]             5 Dec          Register I= 5
  1222.      20 [Sto] [(i)]           20 Dec          Register 5= 20
  1223.      [CLx]                     0 Dec          Clear X reg
  1224.      [Rcl] 5                  20 Dec          Reg 5= 20
  1225.  
  1226.  
  1227.      In the above example, the  Indirect Index Register [(i)] was used
  1228.      to store a number indirectly.  The memory register   accessed was
  1229.      determined by the contents  of  the  [I]  register.  Memories can
  1230.      also be recalled indirectly using  the operation [Rcl] [(i)], and
  1231.      exchanged  with  the  X  register  indirectly  using  the  [x(i)]
  1232.      function.
  1233.  
  1234.  
  1235.      5.9  Modes of Operation and Word Size
  1236.  
  1237.      XACT-16C operates in 2 modes, integer and floating point. Integer
  1238.      mode  is  active  when  any  of  the  following radix  conversion
  1239.      function  keys are pressed: [HEX], [DEC], [OCT], [BIN]
  1240.  
  1241.      These keys allow numbers in integer mode to be displayed  in hex,
  1242.      decimal, octal  and binary respectively.  In addition, numbers in
  1243.      integer mode may be  interpreted  as  unsigned  values, or as 1's
  1244.      complement or 2's complement numbers using word sizes  from  2 to
  1245.      64 bits.
  1246.  
  1247.  
  1248.      5.10  1's Complement Numbers
  1249.  
  1250.      To use 1's complement  arithmetic,  press  [1's]. All numbers and
  1251.      operations entered while in integer  mode  will be interpreted as
  1252.      1's complement numbers.  Pressing  the  [ChS]  function  key will
  1253.      display the 1's complement of a number  in the display.
  1254.  
  1255.  
  1256.      5.11  2's Complement Numbers
  1257.  
  1258.      Pressing [2's] will activate 2's  complement  arithmetic  when in
  1259.      integer mode.  All operations subsequently performed will be done
  1260.      using  2's complement arithmetic.  2's  complement  mode  is  the
  1261.      default mode when XACT-16C is first loaded.
  1262.  
  1263.  
  1264.                                    - 22 -
  1265.  
  1266.      5.12  Unsigned Numbers
  1267.  
  1268.      Pressing  [Unsgn]  will  activate  unsigned  arithmetic  when  in
  1269.      integer mode.   All  arithmetic  operations  will  be interpreted
  1270.      using unsigned math.   When  the [ChS] key is pressed, the result
  1271.      has  no  meaning.   However, the  2's complement of the number is
  1272.      displayed along with the Overflow flag, shown as  the  letter 'G'
  1273.      to the right of the number.
  1274.  
  1275.  
  1276.      5.13  Word Size
  1277.  
  1278.      In decimal mode, XACT-16C can operate using any word size  from 2
  1279.      to  64  bits.   To set the word size, enter a number from 2 to 64
  1280.      and  press [Wsize].  Notice that if you're  using  a  small  word
  1281.      size,  say 4 bits, you won't be able to enter the number into the
  1282.      calculator larger than +3 (if  you're  in  2's  complement mode).
  1283.      Thus, you won't be able  to increase the word size to say 16 bits
  1284.      without first resetting the word size to 64 bits.
  1285.  
  1286.      To reset the word size to  64  bits,  press 0 [Wsize].  This will
  1287.      allow    you  to then set a word size of  say  16  bits  if,  for
  1288.      example,  you  were   previously using a 4 bit word size and thus
  1289.      couldn't enter the number 16 to set a 16 bit word size.
  1290.  
  1291.      Changing  word  size  will affect numbers held  in  the  XACT-16C
  1292.      registers.  For example:
  1293.  
  1294.      Keystroke                 Display        Comment
  1295.      ================================================================
  1296.      [Dec]
  1297.      16 [Wsize]                               16 bit word size
  1298.      [2's] [Hex]                              2's compl, hex
  1299.      4E20 [ENTER]              4E20 Hex
  1300.      8 [Wsize]                   20 Hex       8 bits word size
  1301.  
  1302.      Notice when the  display  was  set  to  8 bits, the number in the
  1303.      display was truncated to 8 bits.
  1304.  
  1305.  
  1306.      5.14  "SHOW" Functions
  1307.  
  1308.      XACT-16C will display a  number  in a different radix for about 2
  1309.      seconds,  then revert  back  to  the  current radix, whenever the
  1310.      [Show]  function  key,  immediately  above  that  radix  key,  is
  1311.      pressed.   For instance, say you have  pressed  [Bin]  to  select
  1312.      binary as your default radix.  You may view a  number temporarily
  1313.      in hex by pressing the [Show] key immediately above the [Hex] key
  1314.      (press the left shift key, then press the letter 'e').
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.                                    - 23 -
  1323.  
  1324.      5.15  Display Windows
  1325.  
  1326.      In  decimal  mode,  XACT-16C  can  show  up  to  8 digits on it's
  1327.      display.  Since XACT-16C is capable of word sizes up to  64 bits,
  1328.      in  some cases, not all the digits can be shown on the display at
  1329.      a time.  For example:
  1330.  
  1331.      Keystroke                 Display        Comment
  1332.      ================================================================
  1333.      [Hex]
  1334.      10 [Wsize]                               16 bit word
  1335.      7B2 [Bin]            <- 10110010 Bin     More digits left
  1336.      [Wndo] 1                111 ->   Bin     Leftmost 8 bits.
  1337.      [Wndo] 0             <- 10110010 Bin     Reset window
  1338.  
  1339.  
  1340.      The number 7B2 Hex (11110110010 Bin) cannot be displayed within 8
  1341.      digits.  Only the lower order 8 bits are displayed.  The [Wndo] 1
  1342.      key sequence sets the display window to the next higher   order 8
  1343.      bits, bits 7 through 15.  Likewise, [Wndo]  2  would  be  used to
  1344.      display bits 8 through 23 and  so  on.   In  the current example,
  1345.      the number 7B2 is an 11 bit number. Setting [Wndo] 2 would show a
  1346.      blank display.
  1347.  
  1348.      Windows  may  also  be "scrolled" one digit at a time.  To scroll
  1349.      the   window  one  digit  to the right press [>>].  To scroll the
  1350.      digit to the left, press [<<]. Window scrolling is reset  back to
  1351.      window 0 whenever an  operation key affecting the value displayed
  1352.      is pressed.
  1353.  
  1354.  
  1355.  
  1356.      5.16  Flags
  1357.  
  1358.      XACT-16C  incorporates 6 built in "flags" which  may  be  set  or
  1359.      cleared  under either program control, or as  the  result  of  an
  1360.      operation, or both.  The flags  are  numbered 0 through 5.  Flags
  1361.      are active in integer mode.
  1362.  
  1363.      The first 3  flags,  0  through  2, are used in programming only.
  1364.      These flags can be  set,  cleared,  and  tested within a program.
  1365.      These  flags  are  discussed  in  detail  in  the  section  under
  1366.      Programming.
  1367.  
  1368.      Flag 3 is used to control the display of leading zeros in integer
  1369.      mode.  When  set,  a  number  in  the display will be padded with
  1370.      leading zeros (leading zeros will not be displayed when the [Dec]
  1371.      radix is used).  To set flag3:
  1372.  
  1373.      Keystroke                 Display        Comment
  1374.      ================================================================
  1375.      [Hex]
  1376.      10 [Wsize]                               16 bit word, hex
  1377.      3A [ENTER]                3A Hex
  1378.  
  1379.  
  1380.                                    - 24 -
  1381.  
  1382.      [SF] 3                  003A Hex         Set flag 3
  1383.      [CF] 3                    3A Hex         Clear flag 3
  1384.  
  1385.  
  1386.      Flag 4 is  also  known as the Carry (C) flag.  It is set when the
  1387.      result of an  algebraic  or bit manipulation function generates a
  1388.      carry.    When  performing a subtraction, a  carry  is  generated
  1389.      whenever there is a borrow in the most significant bit.
  1390.  
  1391.      Keystroke                 Display        Comment
  1392.      ================================================================
  1393.      [Hex]
  1394.      10 [Wsize] [2's]
  1395.      FF80 [ENTER]              FF80 Hex       (-128 Decimal)
  1396.      100  [ + ]                  80 Hex C     Carry generated
  1397.      1 [ + ]                     81 Hex       No carry
  1398.  
  1399.  
  1400.      Flag 5 is  also  known as the Overflow (G) flag.  It is set by an
  1401.      arithmetic operation which  would  result in a value which cannot
  1402.      be shown with the current word size and/or complement mode.  When
  1403.      Flag 5 is set, the letter 'G' appears in the  display, indicating
  1404.      an overflow.  For example:
  1405.  
  1406.  
  1407.  
  1408.      Keystroke                 Display        Comment
  1409.      ================================================================
  1410.      [Dec]
  1411.      16 [Wsize] [2's]
  1412.      32767 [ENTER]             32767 Dec
  1413.      16384 [ + ]              -16385 Dec G
  1414.  
  1415.  
  1416.      In the above example, the result created an overflow and  the 'G'
  1417.      flag (overflow) was displayed.
  1418.  
  1419.  
  1420.      5.17  Status
  1421.  
  1422.      Pressing the [Stat] function key temporarily  alters  the display
  1423.      to show the  current  complement  mode,  word  size  and  flags 0
  1424.      through 3. When [Stat] is pressed, the display appears similar to
  1425.      the following:
  1426.  
  1427.                2-16-0000
  1428.  
  1429.      The value above indicates 2's  complement mode, 16 bit word size,
  1430.      and flags 3,2,1,0 are all cleared.
  1431.  
  1432.      The first number, shown before the dash, indicates the complement
  1433.      mode.   It is either 0, 1, or 2, for unsigned, 1's complement, or
  1434.      2's   complement respectively.  The  next  number  indicates  the
  1435.      current word  size in bits.  It may range from 1 to 64.  The last
  1436.  
  1437.  
  1438.                                    - 25 -
  1439.  
  1440.      4  digits indicate  the status of flags 3,2,1,0 in that order.  A
  1441.      value of 1 indicates  the flag is set, 0 indicates it is cleared.
  1442.  
  1443.  
  1444.  
  1445.      6.  Arithmetic, Bit Manipulation, and Logical Functions
  1446.  
  1447.  
  1448.      6.1  Addition and Subtraction
  1449.  
  1450.      XACT-16C can perform the operations of  addition  and subtraction
  1451.      using  decimal,  hex,  binary,  and  octal radix types as well as
  1452.      floating point mode.  For example, to add the  numbers  3c0  hex,
  1453.      and 126 octal, and  then  subtract  35 decimal, (assuming STATUS=
  1454.      2-16-0000):
  1455.  
  1456.      Keystroke                 Display        Comment
  1457.      ================================================================
  1458.      [Hex]
  1459.      3C0 [ENTER]               3C0 Hex
  1460.      [Oct]                    1700 Oct
  1461.      126 [ + ]                2026 Oct
  1462.      [Dec]                    1046 Dec
  1463.      35 [ - ]                 1011 Dec
  1464.  
  1465.  
  1466.      The  result  is  1011 (decimal).  The carry flag will be set when
  1467.      the  addition  of  2  numbers  generates  a carry out of the most
  1468.      significant bit, or when the subtraction of 2 numbers generates a
  1469.      borrow from the most significant bit.
  1470.  
  1471.  
  1472.      6.2  Multiplication and Division
  1473.  
  1474.      Multiplication and division operations can  be  performed  in any
  1475.      available  radix.    Results of these operations may set or clear
  1476.      flag  4 (carry) and flag 5 (overflow) just  as  in  addition  and
  1477.      subtraction (except that multiplication does not affect  flag 4).
  1478.      In a division operation, only the integer portion  of  the result
  1479.      is returned, the decimal point part is truncated.  Flag 4 (carry)
  1480.      will  be  set  if the result  of  the  division  has  a  non-zero
  1481.      remainder.
  1482.  
  1483.      Keystroke                 Display        Comment
  1484.      ================================================================
  1485.      [Dec]
  1486.      12 [ENTER]                12 Dec         12 in X register
  1487.      4 [ * ]                   48 Dec         Multiply 12 * 4
  1488.      5 [ / ]                    9 Dec C       C Indicates remainder
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.                                    - 26 -
  1497.  
  1498.      6.3  Remainder after Division
  1499.  
  1500.      To compute the remainder after division, (also known  as  the mod
  1501.      function), use the [RMD] function key.  The [RMD] key  will yield
  1502.      the result of the Y register mod the X register  with the sign of
  1503.      the result set  to  be the same as the sign of X.  In the example
  1504.      below, assume STATUS= 2-16-0000.
  1505.  
  1506.      Keystroke                 Display        Comment
  1507.      ================================================================
  1508.      [Dec]
  1509.      52 [ENTER]                52 Dec         52 in Y register
  1510.      7 [RMD]                    3 Dec         Remainder
  1511.  
  1512.  
  1513.      6.4  Square Root
  1514.  
  1515.      The  [sqrtx]  function  can be used in either decimal or floating
  1516.      point mode.  In  decimal  mode, the fractional part of the result
  1517.      is truncated just as it is in division.  Likewise, flag 4 (carry)
  1518.      will be set if the fractional part of  the  square  root  is non-
  1519.      zero.  Assuming STATUS=  2-16-0000:
  1520.  
  1521.      Keystroke                 Display        Comment
  1522.      ================================================================
  1523.      [Dec]
  1524.      26 [sqrtx]                5 Dec C
  1525.  
  1526.  
  1527.      The carry flag indicates that a fractional part exists.
  1528.  
  1529.  
  1530.      6.5  Absolute Value
  1531.  
  1532.      This function will take the absolute  value  of a number in the X
  1533.      register  when the [Abs] key is pressed.  In unsigned  mode, this
  1534.      function has no effect.  Otherwise, a negative  number  will form
  1535.      the 1's or 2's complement of the number.
  1536.  
  1537.  
  1538.      6.6  Logical Functions
  1539.  
  1540.      The  [AND]  function  logically  and's together the corresponding
  1541.      bits in the X and Y registers  and  forms  the  result  in  the X
  1542.      register.  A particular bit of the result is set to 1 only if the
  1543.      corresponding  bits  in  both the X and Y registers was set to 1.
  1544.      For example (assume  STATUS= 2-16-0000):
  1545.  
  1546.      Keystroke                 Display        Comment
  1547.      ================================================================
  1548.      [Bin]
  1549.      1010 [ENTER]              1010 Bin
  1550.      11 [AND]                    10 Bin       Result of "and"
  1551.  
  1552.  
  1553.  
  1554.                                    - 27 -
  1555.  
  1556.      The [OR] function forms a result by or'ing together corresponding
  1557.      bits in the  X  and Y registers.  A bit in the result will be set
  1558.      to   1 if a corresponding bit in either the X or the Y  registers
  1559.      is set  to 1.  In the example below, assume STATUS= 2-16-0000:
  1560.  
  1561.      Keystroke                 Display        Comment
  1562.      ================================================================
  1563.      [Bin]
  1564.      1001 [ENTER]              1001 Bin
  1565.      11 [OR]                   1011 Bin       Result of OR
  1566.  
  1567.  
  1568.      With the [XOR] (Exclusive OR) function, a bit in  the  result  is
  1569.      set to 1 if either a corresponding bit in the X register or the Y
  1570.      register,  but  not  both, is set to 1.  In  the  example  below,
  1571.      assume STATUS= 2-16-0000:
  1572.  
  1573.      Keystroke                 Display        Comment
  1574.      ================================================================
  1575.      [Bin]
  1576.      1001 [ENTER]              1001 Bin
  1577.      11 [XOR]                  1010 Bin       Result of XOR
  1578.  
  1579.  
  1580.      The [Not] function complements all the bits of the value in the X
  1581.      register.    This  is equivalent to forming the 1's complement of
  1582.      the  number.  In the example below, assume  STATUS= 2-16-0000:
  1583.  
  1584.      Keystroke                 Display        Comment
  1585.      ================================================================
  1586.      [Hex] 9                   9 Hex
  1587.      [Not]                  FFF6 Hex          Result of NOT
  1588.  
  1589.  
  1590.      6.7  Bit Functions
  1591.  
  1592.      A specific bit can be set (1) or cleared (0) within a number.  To
  1593.      set a bit, the [SB] function key is used.   The  [CB] function is
  1594.      used to clear a bit.  A bit can also be tested   to  see  if it's
  1595.      set or cleared  with  the    [B?]  function.  (See the section on
  1596.      Programming for more information  on testing bits).  When setting
  1597.      or clearing a bit, the number in which the bit is to be set, must
  1598.      be in the Y register and the bit number in the  X  register.   In
  1599.      the example below, assume STATUS= 2-16-0000:
  1600.  
  1601.      Keystroke                 Display        Comment
  1602.      ================================================================
  1603.      [Bin]
  1604.      10000 [ENTER]             100000 Bin     100000 in Y register
  1605.      10 [SB]                    10100 Bin     Set bit 2
  1606.  
  1607.  
  1608.      To clear a bit in a number:
  1609.  
  1610.  
  1611.  
  1612.                                    - 28 -
  1613.  
  1614.      Keystroke                 Display        Comment
  1615.      ================================================================
  1616.      [Hex]
  1617.      FFFF [ENTER]              FFFF Hex       FFFF in Y register
  1618.      4 [CB]                    FFEF Hex       Clear bit 4
  1619.  
  1620.  
  1621.      6.8  Summing Bits
  1622.  
  1623.      The number of bits in a word  can  be  found  by  using  the [#B]
  1624.      function.  This function takes a number in the  X  register,  and
  1625.      returns the number of '1' bits, also in the X  register.   In the
  1626.      example below, assume STATUS= 2-16-0000:
  1627.  
  1628.      Keystroke                 Display        Comment
  1629.      ================================================================
  1630.      [Bin] 1101                1101 Bin
  1631.      [#B]                        11 Bin
  1632.      [DEC]                        3 Dec       3 bits were set
  1633.  
  1634.  
  1635.      6.9  Masking
  1636.  
  1637.      The mask functions form a mask of '1' bits in the X register. The
  1638.      number of '1' bits is set to the value in  the  X register before
  1639.      the  mask  function key was pressed.  A mask can be made as large
  1640.      as the  current word size.  The [MaskR] function  right justifies
  1641.      the mask and the [MaskL] function left justifies the  mask.    In
  1642.      the example below, assume STATUS= 2-16-0000:
  1643.  
  1644.      Keystroke                 Display        Comment
  1645.      ================================================================
  1646.      [Bin]
  1647.      100 [MaskR]               1111 Bin       Mask right
  1648.      [Hex]                        F Hex
  1649.      2 [MaskL]                 C000 Hex       Mask left
  1650.  
  1651.  
  1652.      6.10  Left Justify
  1653.  
  1654.      A word in  the  X  register  can be left-justified using the [LJ]
  1655.      function key.   This  operation returns the left justified number
  1656.      in the Y register.  The X register  contains  the  number  of '0'
  1657.      bits preceding the first '1' bit in the number before  being left
  1658.      justified.  In the example below, assume STATUS= 2-08-0000:
  1659.  
  1660.      Keystroke                 Display        Comment
  1661.      ================================================================
  1662.      [Bin]
  1663.      111 [LJ]                  101 Bin        5 leading zeros
  1664.      [R|]                 11100000 Bin        Roll Down stack
  1665.  
  1666.  
  1667.      Rolling down the stack shows the left justified number.
  1668.  
  1669.  
  1670.                                    - 29 -
  1671.  
  1672.      7.  Shifting and Rotating Bits
  1673.  
  1674.  
  1675.      7.1  Shift Functions
  1676.  
  1677.      XACT-16C can  perform shift operations on numbers when in integer
  1678.      mode.  Shifts  can  be  either  logical or arithmetic.  A logical
  1679.      shift simply shifts bits left or right, bringing in  a  zero  bit
  1680.      from  the end.  An arithmetic shift is  similar  except  that  it
  1681.      preserves the sign bit  when  shifting.  Both types of shifts can
  1682.      shift into the carry, causing flag 4 (C)  to  be  set  or cleared
  1683.      accordingly.  In the examples below, assume STATUS=  2-08-0000:
  1684.  
  1685.      Keystroke                 Display        Comment
  1686.      ================================================================
  1687.      [Bin]
  1688.      1001 [SL]                 10010 Bin      Logical shift left
  1689.      01000000 [SL]          10000000 Bin      Logical shift left
  1690.      [SL]                          0 Bin C    Shift into carry.
  1691.      100000000 [ASR]        11000000 Bin      Brings in sign bit
  1692.  
  1693.  
  1694.      7.2  Rotate Functions
  1695.  
  1696.      Rotate  functions  are  like shift functions except  that  a  bit
  1697.      shifted out of  one end of a word is brought back in at the other
  1698.      end.  As in shifting, rotations can be either left or right using
  1699.      the [RL] or the [RR] functions.  Assume STATUS= 2-08-0000:
  1700.  
  1701.      Keystroke                 Display        Comment
  1702.      ================================================================
  1703.      10000010 [RL]             101 Bin C
  1704.  
  1705.      Rotations may also be made "through the carry".   The  [RRC]  and
  1706.      the [RLC] functions respectively shift  the low order or the high
  1707.      order bit into the carry.  The carry flag (flag 4) will be set if
  1708.      the bit rotating into the carry was a '1'.  The previous state of
  1709.      the carry flag will be brought back around at the other end.
  1710.  
  1711.      Keystroke                 Display        Comment
  1712.      ================================================================
  1713.      1 [RRC]                   0 Bin C        Rotates to carry
  1714.      [RRC]              10000000 Bin          Carry rotates
  1715.  
  1716.      Rotate operations may also rotate more than 1 bit at a  time with
  1717.      the  [RRn]  [RLn]  [RRCn]  and  [RLCn] functions.  Each of  these
  1718.      functions use the value in the  X register as a count of how many
  1719.      times to rotate the value in the Y register.    Assuming  STATUS=
  1720.      2-08-0000:
  1721.  
  1722.      Keystroke                 Display        Comment
  1723.      ================================================================
  1724.      1000 [ENTER]              1000 Bin
  1725.      100 [RLn]             10000000 Bin       Rotate 4 times
  1726.  
  1727.  
  1728.                                    - 30 -
  1729.  
  1730.      8.  Floating Point Mode
  1731.  
  1732.  
  1733.      8.1  Converting to Floating Point Mode
  1734.  
  1735.      In addition to  integer  mode, XACT-16C also operates in floating
  1736.      point mode.    In  this  mode,  XACT-16C  acts much like a second
  1737.      "independent"  calculator.    Many  functions  operate  in either
  1738.      floating  point mode or integer mode,  for  example  the  [sqrtx]
  1739.      function.  However, unlike integer  mode, this function  will not
  1740.      truncate a result to an integer result, it will  return  a  value
  1741.      with up to 9 significant digits beyond the decimal point.
  1742.  
  1743.      To convert XACT-16C to floating point mode:
  1744.  
  1745.      Keystroke                 Display        Comment
  1746.      ================================================================
  1747.      [Float] 2                 0.00           2 dec pt digits
  1748.  
  1749.  
  1750.      You may press any number (using  the  numeric keypad) from 0 to 9
  1751.      after pressing the  [Float]  key.    The  number  you  press will
  1752.      determine  the  number  of  digits  past the decimal point to  be
  1753.      displayed.  For example:
  1754.  
  1755.      Keystroke                 Display        Comment
  1756.      ================================================================
  1757.      26 [sqrtx]                5.10           2 dec pt digits
  1758.      [Float] 5                 5.09902        5 dec pt digits
  1759.  
  1760.  
  1761.      Notice  that  when  using  2  digits  beyond  the decimal  point,
  1762.      XACT-16C will "round" the next digit into the number displayed.
  1763.  
  1764.  
  1765.      8.2  Floating Point Calculations
  1766.  
  1767.      Calculations in floating point mode work in the same  way  as  in
  1768.      integer  mode.  However, there are a  number  of  functions  that
  1769.      operate only in  integer  mode  and  some  that  operate  only in
  1770.      floating  point  mode.    Generally  speaking,  all  of  the  bit
  1771.      manipulation,  radix  conversion,  and  logical functions are not
  1772.      available in floating point mode.
  1773.  
  1774.      The reciprocal function [1/x] and the exponent function [EEx] are
  1775.      only available in floating point mode.  To  illustrate  them, for
  1776.      example:
  1777.  
  1778.      Keystroke                 Display        Comment
  1779.      ================================================================
  1780.      [Float] 4                                4 dec pt digits
  1781.      12 [EEx] 3                12.  +03
  1782.      [ChS]                     12.  -03
  1783.      [ENTER]                    0.0120
  1784.  
  1785.  
  1786.                                    - 31 -
  1787.  
  1788.      .001 [ - ]                 0.0110        Subtract
  1789.      [1/x]                     90.9091        Reciprocal
  1790.  
  1791.  
  1792.      8.3  Returning to Integer Mode
  1793.  
  1794.      To return to integer  mode,  press  any  of the following: [Hex],
  1795.      [Dec],  [Oct]  or [Bin].  You may  notice  that  the  same  value
  1796.      appears in the display as  before you converted to floating point
  1797.      mode.  In  fact,  all  the  memory  registers,  stack,  etc., are
  1798.      retained.
  1799.  
  1800.  
  1801.  
  1802.      9.  Programming XACT-16C
  1803.  
  1804.  
  1805.      9.1  Introduction to Programming
  1806.  
  1807.      XACT-16C may  be  programmed  to  "memorize"  keystrokes  for the
  1808.      purpose  of executing a program.  Programs may use  constructs of
  1809.      conventional   programming languages such as branching,  looping,
  1810.      data input and output,  etc.  The basics of  programming XACT-16C
  1811.      involve entering, editing,  debugging and finally  executing your
  1812.      program.
  1813.  
  1814.  
  1815.      9.2  Entering a Program
  1816.  
  1817.      To begin entering a new  program  into  XACT-16C,  the calculator
  1818.      must be placed in  program  mode  by  pressing the [P/R] function
  1819.      key.   When in program mode,  subsequent  keystrokes  are  simply
  1820.      stored in the calculator's internal memory. The [P/R] key toggles
  1821.      between program and run modes.
  1822.  
  1823.      Keystroke                 Display        Comment
  1824.      ================================================================
  1825.      [P/R]                     000-           Program mode
  1826.      [P/R]                     (as before)    Run mode
  1827.  
  1828.  
  1829.      The display shows 000-.  This represents the current program line
  1830.      number of the program you are  entering.   Line 000 is special in
  1831.      that    it  always represents the beginning  of  program  memory.
  1832.      Let's enter  a simple program:
  1833.  
  1834.      Keystroke                 Display        Comment
  1835.      ================================================================
  1836.      [P/R]
  1837.      [Prgm]                   000-            Clear pgm
  1838.      [Lbl] [ A ]              001- 43 22 A    Start pgm
  1839.      [Hex]                    002-      23
  1840.      3                        003-       3
  1841.      [ENTER]                  004-      36
  1842.  
  1843.  
  1844.                                    - 32 -
  1845.  
  1846.      4                        005-       4
  1847.      [ + ]                    006-      10
  1848.      [RTN]                    007-   43 21    Last pgm line
  1849.      [P/R]                                    Run mode
  1850.  
  1851.  
  1852.      This program simply adds the numbers 3 and 4 then finishes.   The
  1853.      first keystroke, [P/R] puts XACT-16C in program mode.  The [Prgm]
  1854.      key clears any  programs  previously in memory. Skipping over the
  1855.      [Lbl] instruction for the  moment,  the  [Hex]  key is the second
  1856.      program line in  the  program.    In the  display, 002- indicates
  1857.      program  line  2  (there  are  a  maximum  of  203  program lines
  1858.      available).  Just  to  the  right  of  the program line is a code
  1859.      which  represents  which  key was pressed. The first digit of the
  1860.      number indicates the row and the second indicates  the  column of
  1861.      where the key is positioned on the XACT-16C screen.  If you think
  1862.      of all the keystrokes on the calculator face as being in  a table
  1863.      with 4 rows and 10 columns, the [Hex] function key is  located in
  1864.      the 2nd row and  3rd  column, thus the program line displays 002-
  1865.      23.    Back  to the first line of the program,  it  contains  the
  1866.      keystrokes [Lbl] [  A ] to refer to that line as a label.  Labels
  1867.      are used in XACT-16C in much the same way as they are in assembly
  1868.      language or Basic programming.  Labels can be  locations  used to
  1869.      identify  the  start  of  a  program,  the  location  of  a  goto
  1870.      instruction,  or  the  location  to  call in a  subroutine  call.
  1871.      Programs  must  begin  with a label to identify where the program
  1872.      starts.  The program line  for our label reads 001-  43 22 A.  In
  1873.      this case, since the [Lbl] key requires a prefix, the position of
  1874.      the  prefix  key  is the first value shown to the  right  of  the
  1875.      program line number.  The number 43 indicates row  4,  column  3,
  1876.      which is the position of the [ g ] (or right shift) prefix key.
  1877.  
  1878.      The  last value displayed on program line 2  is  the  value  'A'.
  1879.      Notice that it is not referred  to by a  location  in the "table"
  1880.      of  XACT-16C function keys, but rather   by  it's  numeric  value
  1881.      itself.   All the numbers 0 through 9 and A through  F are  shown
  1882.      as their numeric values when in programming mode.
  1883.  
  1884.      Notice the use of the  [RTN]  function  key  at  the  end  of the
  1885.      program.    This  key  must  always  be  the  last entered, it is
  1886.      required to end the program.    In  the  very  last  line  of the
  1887.      program,  you will notice the [P/R] key.  It is used to exit from
  1888.      program mode so that we can  run the program.
  1889.  
  1890.      Now we have our program contained in memory,  we  can  run  it by
  1891.      typing:
  1892.  
  1893.      Keystroke                 Display        Comment
  1894.      ================================================================
  1895.      [GSB] [ A ]               7 Hex          Result
  1896.  
  1897.  
  1898.      The [GSB] (goto subroutine) function key is used to begin program
  1899.      execution at the  first  instruction in the program following the
  1900.  
  1901.  
  1902.                                    - 33 -
  1903.  
  1904.      label,   in this case the label was A.  The [GSB] instruction can
  1905.      also  be  used  within  a  program,  to  perform   a  call  to  a
  1906.      subroutine.
  1907.  
  1908.  
  1909.      9.3  Labels in Programs
  1910.  
  1911.      There are 16 labels  available  in programming, 0-9 and A-F.  The
  1912.      previous  example used a label to identify  the  beginning  of  a
  1913.      program.   In general, a label is always  necessary  to  begin  a
  1914.      program.    Labels  are also used  as  targets  of  [GTO]  (goto)
  1915.      instructions and [GSB] (goto  subroutine)  instructions.   Labels
  1916.      can  also  be  used to separate  programs  from  one  another  in
  1917.      XACT-16C's program  memory; as a way of keeping multiple programs
  1918.      in memory at one time (although this is  generally  not necessary
  1919.      since programs can be loaded as disk  files).
  1920.  
  1921.  
  1922.      9.4  Using Subroutines
  1923.  
  1924.      A program can call a subroutine from within the program  when the
  1925.      [GSB] instruction is used within  the program.  For instance, the
  1926.      instruction  [GSB]  5  will  transfer  control  to   the  program
  1927.      instruction  immediately    following  the  instruction  [Lbl]  5
  1928.      contained elsewhere within the program.  Control will transfer to
  1929.      the label that identifies the subroutine. Subroutines can "nest",
  1930.      that is one subroutine may call another which may call   another,
  1931.      and so on.  The maximum level of subroutine nesting is 4.
  1932.  
  1933.  
  1934.      9.5  Returning from a Program or Subroutine
  1935.  
  1936.      The last instruction in a program  must  always be a [RTN].  This
  1937.      tells the program to reset it's  program  line number  to 000 (go
  1938.      back to  the beginning) and stop executing. The [RTN] instruction
  1939.      is  also the last instruction in a subroutine.    In  this  case,
  1940.      after  the  execution  of  the  [RTN]  instruction,   control  is
  1941.      transferred back to the  instruction    following  the subroutine
  1942.      call.
  1943.  
  1944.  
  1945.      9.6  Entering Data and the Run/Stop Key
  1946.  
  1947.      There  are  generally  2 ways to get data into a  program.    The
  1948.      easiest  is  to  use  the  [Sto]  instruction  to store  data  in
  1949.      registers prior to running  the  program.    Then the program can
  1950.      contain [Rcl] instructions  to  fetch the data from the register.
  1951.      The second method is required when there is more data to be input
  1952.      than available storage registers.    It  involves using the [R/S]
  1953.      (run/stop) function key.  When  this  key  is  encountered during
  1954.      program execution, the program  stops.    At  this point, you can
  1955.      enter  new  data  and then press the [R/S] key.  The program will
  1956.      begin running again.
  1957.  
  1958.  
  1959.  
  1960.                                    - 34 -
  1961.  
  1962.      For  example,  let's  write  a  program which will  accept  input
  1963.      numbers, one at a  time,  and "exclusive or" each number with the
  1964.      number  3A9 Hex.  The program will  display  the  exclusive  or'd
  1965.      result after each input.
  1966.  
  1967.      Keystroke                 Display        Comment
  1968.      ================================================================
  1969.      [P/R]
  1970.      [Prgm]                                   Clear program memory
  1971.      [Lbl] 1               001-  43  22  1
  1972.      [Hex]                 002-         23
  1973.      1                     003-          1
  1974.      0                     004-          0
  1975.      [WSIZE]               005-     42  44
  1976.      0                     006-          0
  1977.      [ENTER]               007-         36
  1978.      [Lbl] 2               008-  43  22  2
  1979.      [R/S]                 009-         31
  1980.      [ENTER]               010-         36
  1981.      3                     011-          3
  1982.      A                     012-          A
  1983.      9                     013-          9
  1984.      [x<>y]                014-         34
  1985.      [XOR]                 015-     42  10
  1986.      [GTO] 2               016-     22   2
  1987.      [RTN]                 017-     43  21
  1988.      [P/R]                                    Return to RUN mode
  1989.  
  1990.  
  1991.      To execute the program:
  1992.  
  1993.      Keystroke                 Display        Comment
  1994.      ================================================================
  1995.      [Gsb] 1                   0            Wait for input data
  1996.      1 [R/S]                 3A8 Hex        Result of 3a9 xor 1
  1997.      F [R/S]                 3A6 Hex        Result of 3a9 xor F Hex
  1998.      20 [R/S]                389 Hex        Result of 3a9 xor 20 Hex
  1999.  
  2000.  
  2001.      9.7  Branching Using the Index Register
  2002.  
  2003.      In the previous example, we used a [Gto] instruction to branch to
  2004.      a label, in this  case,  label 2.  As previously mentioned, there
  2005.      are 16 available labels, 0-9 and A-F.  You can also use the index
  2006.      register [I] to indirectly branch  to a label, or indirectly call
  2007.      a subroutine.  If the [I] register contains a number representing
  2008.      a label, the instructions [GTO] [I] and [GSB] [I] will indirectly
  2009.      branch to a label or indirectly call a  subroutine.
  2010.  
  2011.  
  2012.      9.8  Program Loops Using the Index Register
  2013.  
  2014.      XACT-16C   contains  2  instructions  that  first  increment   or
  2015.      decrement  the  index  register and skip the next program line if
  2016.  
  2017.  
  2018.                                    - 35 -
  2019.  
  2020.      the  index  register  is  zero.    These  instructions are  [Isz]
  2021.      (increment  and  skip  if zero), and [Dsz] (decrement and skip if
  2022.      zero).  They can be used to control  loops  where  the  number of
  2023.      times to execute the  loop  is  contained  in the index register.
  2024.      For  example,   a  program  fragment  may  look  similar  to  the
  2025.      following:
  2026.  
  2027.         5 [STO] [ I ]
  2028.         [LBL] [ B ]
  2029.  
  2030.      (instructions within loop)
  2031.  
  2032.         [DSZ]
  2033.         [GTO] [ B ]
  2034.         [RTN]
  2035.  
  2036.      In this case, the instruction within the loop  between  the [Lbl]
  2037.      [B] program line and the [Gto] [B] program line will  be executed
  2038.      5 times.  After the 5th  time,  the index register will contain 0
  2039.      and the [Gto]  [B]    instruction  will be skipped.  Instead, the
  2040.      [Rtn] instruction will be executed.
  2041.  
  2042.  
  2043.      9.9  Program Loops and Branches Using the X and Y Registers
  2044.  
  2045.      XACT-16C can also  make  "conditional  tests"  based  upon values
  2046.      contained  in  the X and Y registers.    There  are  8  different
  2047.      possible conditions in all.   These  functions  each  execute the
  2048.      next instruction in the  program  if  the  condition is true, and
  2049.      skip over it  if  the  condition  is false.  The instructions are
  2050.      defined as
  2051.  
  2052.  
  2053.         [x<=y]   true if x less than or equal to y
  2054.         [x<0]    true if x less than 0
  2055.         [x>y]    true if x greater than y
  2056.         [x>0]    true if x greater than 0
  2057.         [x<>y]   true if x not equal to y
  2058.         [x<>0]   true if x not equal to 0
  2059.         [x=y]    true if y equal to y
  2060.         [x=0]    true if x equal to 0
  2061.  
  2062.  
  2063.      9.10  Branching Using Flags
  2064.  
  2065.      The [F?] (text flag) function can be used to branch based  on the
  2066.      status of the flags.  There are a total of  6  flags in XACT-16C,
  2067.      identified    as  flags  0-5.    The  first  3  flags  (0-2)  are
  2068.      programmable general purpose   flags.   Flag 3 is used to display
  2069.      leading  zeros. Flag 4 is the Carry  (C) flag, and Flag 5 is  the
  2070.      overflow (G) flag.  Any of the  flags  may    be  used  in branch
  2071.      tests.  The  example  below   illustrates   a   program  fragment
  2072.      utilizing flags testing:
  2073.  
  2074.  
  2075.  
  2076.                                    - 36 -
  2077.  
  2078.         (Program instructions)
  2079.  
  2080.        [Lbl] 3
  2081.        [SF] 3
  2082.        [Gto] [ B ]
  2083.  
  2084.        (Program instructions)
  2085.  
  2086.         [Lbl] 4
  2087.         [CF] 0
  2088.         [Gto] [ B ]
  2089.  
  2090.         (Program instructions)
  2091.  
  2092.  
  2093.         [Lbl] [ B ]
  2094.         [F?] 0          (test to see if flag 0 is set)
  2095.         [Gto] [ C ]     (transfer control to label C if flag 0 set)
  2096.         [Gto] [ D ]     (transfer control to label D if flag 0 clear)
  2097.  
  2098.      If  the program executes at label 3, flag 0 is set and control is
  2099.      transferred to label B.  At this point,  since  flag  0  was set,
  2100.      control  will  transfer  to  label  C.  Likewise, if the  program
  2101.      executes at label 4, flag 0    is cleared, and thus, when control
  2102.      is  transferred  to  label B, the flag test will fail.  This will
  2103.      cause the [Gto] [ D ] instruction to be executed.
  2104.  
  2105.  
  2106.      9.11  Branching On Bit Set/Clear
  2107.  
  2108.      Programs can branch on the status of a specific bit set  or clear
  2109.      using the [B?] function.  This function operates similarly to the
  2110.      [F?] function.
  2111.  
  2112.  
  2113.      9.12  The Single-Step Instruction
  2114.  
  2115.      The [SSt] (single-step) instruction can be used in either program
  2116.      mode or run mode.    In program mode, pressing [SSt] will display
  2117.      the next program  line  number  in  a  program.  In run mode, the
  2118.      [SSt] function can be used to execute a  program  one  step  at a
  2119.      time.  This is useful for program debugging.   The  [BSt]  (back-
  2120.      step) instruction works like  the  [SSt]  instruction  in program
  2121.      mode except that it displays  the previous program line number in
  2122.      a program.  The [Bst] instruction does not operate in run mode.
  2123.  
  2124.  
  2125.      9.13  Moving to a Program Line Number
  2126.  
  2127.      You can move to a specific line number in either program  mode or
  2128.      run mode.  Press [Gto] [ . ] nnn  where nnn is a  3  digit number
  2129.      between  0  and 203.  In run  mode,  pressing  [R/S]  will  begin
  2130.      execution at that line number.
  2131.  
  2132.  
  2133.  
  2134.                                    - 37 -
  2135.  
  2136.      10.  Appendix
  2137.  
  2138.  
  2139.      10.1  Error Conditions
  2140.  
  2141.      When an error  is  encountered  during  operation,  XACT-16C will
  2142.      display  the  word  "Error" in the calculator's display, followed
  2143.      by a 1 digit  error code.  These error codes are defined below:
  2144.  
  2145.  
  2146.      Error 0  -  Invalid math operation.  This  error  is  encountered
  2147.      when  an  operation  attempted division by 0 or square  root of a
  2148.      negative number.
  2149.  
  2150.      Error 1 - Invalid identifier.  A flag, window,  or  program  line
  2151.      number was out of range.
  2152.  
  2153.      Error  2  -  Invalid  Bit  Number.  This happens when  operations
  2154.      attempt to set bits, mask bits, or rotate  multiple  bits greater
  2155.      than the current word size.
  2156.  
  2157.      Error 3 -  Invalid  Register.    An  attempt was made to access a
  2158.      label or line number that is out of range.
  2159.  
  2160.      Error 4 - Invalid label or line number.  An  attempt  was made to
  2161.      access a label or line number that is out of range.
  2162.  
  2163.      Error  5  -  Invalid subroutine nesting.  A subroutine was nested
  2164.      more than 4 levels deep.
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.                                    - 38 -
  2193.