home *** CD-ROM | disk | FTP | other *** search
/ Outlet 54 / outlet-54.mgt / s8 < prev    next >
Text File  |  2021-04-18  |  10KB  |  1 lines

  1.         - (shifting completed) if the carry flag shows NC,      return; no rounding                                                     - (the last shift left a carry) call 3004 ADD BACK,     which adds the carry back into the four lo mantissa bytes,      returning with Z if it "rippled back" to make zero                      - return on NZ; no "ripple".                                   _2FF9_ADDEND_0 (result zero) zero A                              - get the alternate registers.                                 _2FFB_ZEROS_4/5 (this is also called as a subroutine from315E SKIP ZERO, where A isn't necessarily zero): zero the hi    byte of L'D'E'DE                                                        - put the value of A in the second byte                         - zero the remaining three bytes.                              Exit: RET, from ONE SHIFT or ZEROS 4/5.                         Output parameters: the adjusted mantissa is in L'D'E'DE          - HL, BC unchanged.                                            Called from:                                                     2ECF PF FRACTN                                                  3055 SHIFT LEN (twice)                                         Rems:                                                            303E FULL ADDN called to line up the mantissas                                                                              shift keys, shifts see also KEYBOARD SCANNING                       When the keyboard is scanned on each interrupt, by 028E KEY SCAN, the shift byte records the state of the shift keys:            FF means "no shift"                                             18h means "symbol shift"; the only even value                   27h means "caps shift", and if the_key_byte holds 18h, the combination means "E mode".                                         If one of the shift byte and the key byte holds 18h or  27h and the other holds FFh, 028E KEY SCAN returns from KEY DONEwith NZ, causing an immediate return from 02BF KEYBOARD; this is_shift_only or "shift and no key".                                      Caps shift 27h is read first from the keyboard scan, so if no other key is read it will be in the key byte, which is    loaded first, but if any other key is read it will be in the    shift byte; so when the key code is transformed to a main code  in 031E K TEST, no main code is needed for caps shift. The shiftbyte is used in 0333 K DECODE to implement caps shift,                 for letter keys by zeroing bit 5,                               for digit keys in various ways:                                   in KL modes to make an edit control from 0260 table (d)         in E mode to make a colour control code, 02/03 for     BRIGHT, 18h -> 1Fh for the seven INK colours.                           10h -> 17h for the PAPER colours are similarly produced without caps shift, and are rather cryptically referred to as   _unshifted_codes in the notes on 10FA KEY CONTR. See the list   under colours.                                                          KEY SCAN can collect symbol shift 18h in either byte,   with or without another code. However it is exchanged with the  shift byte at the end of 02AB KEY DONE, unless the shift byte isFFh or 27h; so 18h can only remain in the key byte for "shift   and no key" or "caps and symbol shift together". When the key   byte holds 18h, K TEST returns main code 0Eh, called "symbol    shift" in the notes and tables; but this is highly misleading,  because by the time K TEST is called "shift and no key" has beenrejected and the only possible combination has the shift byte   showing "caps shift", ie both shifts were being pressed, which  counts as E mode.                                                       Thus the main code 0Eh should properly be called "E     mode", and it is always treated as such.                                0205 KEY TABLES separate tables depending on shift              028E KEY SCAN value of D indicates which shift pressed          0296 KEY LINE caps shift is on first five-key line              02AB KEY DONE double key accepted if one is caps shift;                       if both shifts, symbol shift in E reg             02D1 K CH SET ignore shift key only                             02F1 K NEW affects decoding of main code                        031E K TEST shift byte transferred to B register                0333 K DECODE final code affected by                            0341 K E LET letter keys in E mode                              034F K KLC LET letter keys with caps or symbol shift            0367 K DIGIT digit keys in E mode with/without shift            0382 K 8 & 9 keys 8&9 in E mode with/without shift              0389 K GRA DGT digit keys in G mode with/without shift          039D K KLC DGT digit keys with/without shift                    10FA KEY CONTR "unshifted" codes are PAPER colours              1F54 BREAK KEY only effective with caps shift                                                                               SHIFT LEN 3055 (3014 addition)                                     Jumps from:                                                      303E FULL ADDN                                                                                                              SHIFT ONE 316E (30CA multiply)                                     Jumps from:                                                      auto                                                                                                                        shift only see shift keys                                                                                                       shifts see shift keys                                                                                                           short (integer) format of numbers see CALCULATE                                                                                 short multiplication see 2FDD SHIFT FP                                                                                          short name of variable see variables                                                                                            sign bit/byte of FP number see CALCULATE                                                                                        SIGN DONE 2CFE (2C9B DEC TO FP)                                    Jumps from:                                                      2CF2 SIGN FLAG                                                                                                              SIGN FLAG 2CF2 (2C9B DEC TO FP)                                    Jumps from:                                                      2CEB E FORMAT                                                                                                               sign marker bits see 2FDD SHIFT FP                                                                                              SIGN TO C 3507 (3506 less-0)                                       Jumps from:                                                      34F9 greater-0                                                                                                              SIGNUM FUNCTION see 3492 sgn                                                                                                    S IK$ STK 2660 (2634 S INKEY$)                                     Jumps from:                                                      2684 S INKEY$ (twice)                                                                                                       simple strings/variables see strings, variables, 2AFF LET                                                                       SIN key (B2) see also commands, functions and operators,    KEYBOARD SCANNING, 022C extended mode table (b)                         The Q key in E mode without shift produces the function SIN; it requires one numeric operand X, and the value of the    function is sin X. X is in radians, see index entry on 3783 get-argt.                                                                   On execution, 24FB SCANNING quickly leads to 26DF S     NEGATE. This converts the key code B2 first to 03, then to DF   and adds the priority 10h/16d. Code and priority 10DF are now   pushed on to the machine stack (270D S PUSH PO) while the       expression following SIN is evaluated.                                  When the code is taken off the stack (2734 S LOOP), it  is converted (2773 S TIGHTER) from DF to 1F, the calculator     offset for 37B5 sin.                                                                                                                sin subroutine 37B5                                                 Called only from 0028 FP CALC with literal 1F; the      executive routine of the SIN function, ie given X in radians,   returns sin X. Could be called direct from m/c. If you are not  sure about radians, see under 3783 get-argt.                           Input parameters: none                                           - X must be the last value on the calculator stack, evenfor direct calls.                                                      Action: use the calculator with literal 39 get-argt,     which transforms X into a "reduced argument" W; this is a numberbetween -1 and +1, the fraction of a right angle which will havethe same sin as X, ie sin [W * (pi/2)] = sin X.                        _37B7_C_ENT (the entry point from 37AA cos): transform   the argument again, this time to Z = 2W**2 - 1; the range is nowfrom zero to one, and no doubt this simplifies the Chebyshev    calculation.                                                            - use literal 86h series-06 with the six Chebyshev      coefficients: