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

  1.     NOT key (C3) see also commands, functions and operators,    KEYBOARD SCANNING, 026A symbol code table (e)                           The S key with symbol shift produces the function NOT;  it requires one logical or numeric operand X, and the value of  the function is one if X is zero and zero for any other value.          On execution, 24FB SCANNING quickly leads to 26DF S     NEGATE. This converts the key code C3 to 14h; NOT gets special  treatment, as its priority is only 04. It is given op code F0.  Code and priority 04F0 are pushed on to the machine stack (270D S PUSH PO) while the expression following NOT is evaluated.             When the code is taken off the stack (2734 S LOOP), it  is converted (2373 S TIGHTER) from F0 to 30, the calculator     offset for 3501 not.                                                                                                                not subroutine 3501                                                 Called from 0028 FP CALC with literal 30h; executes the BASIC NOT function, but also used in other calculations,        sometimes by a direct call.                                             Given a FP number N, replaces it with one if N is zero, otherwise with zero.                                                    Used in calculator strings in combinations such as                                30 not                                                          30 not                                                          00 jump-true                           which is equivalent to a "jump on zero", see 368F jump-true.          Input parameters: HL points to N; last value on the      calculator stack if the call is from FP CALC, but it can be     anywhere in RAM for direct calls.                                      Action: call 34E9 TEST ZERO; it sets carry if N is zero.        Exit: into 350B FP 0/1, which changes the value on the   stack to zero or one depending on the carry flag.                      Output parameters: HL points to the same address as on   input, but now it holds zero or one                                     - other registers, except A, unchanged.                        Called by FP CALC from:                                          238D DE 3 PRMS (twice)                                          36B7 X NEG                                                      384A sqr                                                        3851 to-power                                                   385D XISO                                                      Direct calls from:                                               358C END TESTS (twice)                                                                                                      NOT BIN 2CB8 (2C9B DEC TO FP)                                      Jumps from:                                                      2C9B DEC TO FP                                                                                                              note (beep) see timing                                                                                                          no-&-no subroutine 3524                                             Called from 0028 FP CALC with literal 08; executes the  BASIC AND operator between two numeric expressions X AND Y. Cf  352D str-&-no, which executes X$ AND Y. Not otherwise used in   ROM, but could be called direct or through FP CALC from m/c     programs. X and Y must be in FP format; when the subroutine is  called from FP CALC, they are the last values on the calculator stack, Y last, but for direct calls they can be anywhere in RAM.        The BASIC AND is analogous to, but not quite the same   as, the Z80 AND instruction; X AND Y equals zero if Y is zero,  otherwise X AND Y = X. If X and Y are each one or zero, eg      "true" or "false", this works out the same as ANDing m/c bits,  rather than m/c bytes. Cf 351B or.                                     Input parameters: HL points to the first byte of X               - DE to that of Y.                                             Action: call 34E9 TEST ZERO for Y                                - if Y wasn't zero, return; X is made last value                - (Y was zero) clear the carry                                  - exit to 350B FP 0/1; with NC in carry it zeroes the   value at the pointer.                                                  Exit: RET or into 350B FP 0/1.                                  Output parameters: all registers except A unchanged              - Y is unchanged, X unchanged or zero                           - on return to the calculator DE becomes the stack end, deleting Y from the stack; but its bytes are still there.                                                                           NSPPC system variable 5C44 see also 5C42 NEWPPC                    Bytes: 1                                                         Normally holds FF, but if there is to be a "jump in     BASIC", ie after a GO TO, CONTINUE, GO SUB, NEXT or RETURN,     NSPPC holds the_statement number within the BASIC line to be    executed next. The line number is in 5C42 NEWPPC.                       Bit 7 of NSPPC is a flag: if bit 7 is set it signals "nojump", simply execute the next statement in the BASIC line. Bit 7 can only be set by NSPPC being set to FF, since 1B29 STMT L 1 only allows 7Fh/127d statements maximum in a line.                      NSPPC is set to FF:                                            - when BASIC execution comes to an end, at 1386 MAIN 9          - during execution, as soon as the value of NSPPC has    been collected to indicate what to do next, at 1BD1 NEXT LINE.          NSPPC is also                                                  - set to zero on loading a new program; if the program   was saved with ... LINE there is a line number in 5C42 NEWPPC          - set to one when a direct BASIC command is to be        executed. Zero and one are equivalent, because 1BBF LINE USE    reads "statement zero" as "statement one".                             - set with a statement number                                      - by 1D7C F FOUND, when the search for a NEXT command has been successful                                                       - by 1E73 GO TO 2, for CONTINUE, GO SUB, GO TO, NEXT  and RETURN commands.                                                   Written by:                                                      0873 LD PROG (00)                                               12CF MAIN 3 (01)                                                1386 MAIN 9 (FF)                                                1BD1 NEXT LINE (FF)                                             1D7C F FOUND (statement number)                                 1E73 GOTO 2 (statement number)                                 Read by:                                                         1376 MAIN 7                                                     1B7D STMT R 1                                                   1B8A LINE RUN                                                   1B9E LINE NEW                                                  Rems:                                                            1EDC CLEAR 2 as jump has been signalled, statements                          following a RUN command in the same line                        are ignored                                        1EED GOSUB set by call of GO TO 1                               1F23 RETURN set by jump to GO TO 2                                                                                          null name of save/load file see 0605 SAVE ETC                                                                                   null string see strings                                                                                                         NUMBER subroutine 18B6                                              In displaying a BASIC line, or moving the cursor along  one already displayed, the number markers and the following 5-  byte number forms are skipped; see below, number in BASIC line.        Input parameters: HL holds the BASIC pointer                     - A holds the byte in HL.                                      Action: if the byte isn't 0Eh, return                            - (number marker) increment the pointer six times               - get the byte at the new position.                            Exit: RET.                                                      Output parameters: if A was 0E, HL has been incremented  and A holds the new content of HL. Otherwise no change.                Called from:                                                     18A1 OUT LINE5                                                  199A EACH S 3                                                  Rems:                                                            1894 OUT LINE4 numbers jumped over in printing line             1F94 DEF FN 5 number marker put in DEF FN                                                                                   NUMBER AND NUMBER OPERATION see 3524 no-&-no                                                                                    number array see arrays                                                                                                         'Number array: ' message see cassette messages                                                                                  number forms (integer, 5-byte FP) see CALCULATE                                                                                 number in BASIC line, number marker (0E)                            As stored in the program area, the BASIC lines contain  6-byte insertions following every decimal, binary or E-format   number except the line numbers; the first byte contains the     _number_marker 0E, the remaining 5 the 5-byte FP equivalent of  the number in BASIC. These markers and FP forms aren't put in   after PI or other functions, only numbers written with actual   digits. They are automatically skipped over by calls to 18B6    NUMBER in printing out the line or moving the cursor.                   The markers and values are inserted in the line while itis still in the editing area, before it is copied to the        program, by 268D S BIN/DECIMAL in the SCANNING loop: the syntax checking routine 1B17 LINE SCAN calls all the same command classand command executive subroutines as the run-time 1B8A LINE RUN,and whenever numeric expressions are encountered S DECIMAL      computes and inserts the 5-byte forms. In run time, the same    routine looks for the number marker and reads the numeric value from the FP form, ignoring the decimal or similar form.                 If syntax checking finds errors in the line, its number forms are removed before it is copied back to the lower screen: this is done by 11A7 REMOVE FP, called by 12AC MAIN 2, or by    2148 IN VAR 2 in the case of an INPUT expression.                       Each DEF FN statement also has a 6-byte space after eachof its dummy variables on the left side, before the comma, with 0E in the first byte. The spaces are made and marked by 1F94 DEFFN 5, but the FP number isn't put in the remaining 5 bytes till the function is evaluated during a run, in 2852 SF ARG VL.              The presence of these number markers is often forgotten,but is important if you are trying to write BASIC which is      economical of memory: an expression such as "1/7" in the programarea actually takes up 15d bytes:                                  "1" (number form)           "/" "7" (number form)               31h 0Eh 00h 00h 01h 00h 00h 2Fh 37h 0Eh 00h 00h 07h 00h 00h   one more than 0.142857.                                                1894 OUT LINE4 numbers jumped over in printing line             26B6 S SD SKIP steps over characters till marker found          2843 SF ARG LP number marker sets string status flag            295A SFA LOOP finds number marker of variable                                                                               number of bytes in save/load block see program/data block                                                                       number of dimensions see arrays                                                                                                 "Number too big" message see REPORT 6                                                                                           numeral keys see letters and digits                                                                                             NUMERIC subroutine 2D1B see also 2C8D ALPHA, 2C88 ALPHANUM          Checks if a given character is a digit. One of the most useful of all ROM routines for the m/c programmer.                     Input parameters: character code in A.                          Action: if A < 30h "zero" return with carry                      - check A against 3Ah; "nine" is 39h                            - reverse the carry and return.                                Exit: RET.                                                      Output parameters: NC if A was a digit, carry if not             - all registers unchanged.                                     Called from:                                                     1937 OUT CHAR                                                   2C88 ALPHANUM                                                   2CB8 NOT BIN                                                    2CCB DECIMAL                                                    2CFF ST E PART                                                  2D22 STK DIGIT                                                                                                              numerical comparisons see 353B no-l-eql                                                                                         numeric argument, array, entry, expression, function, marker flag, numeric/string flag, result, status, value, variable see expressions, variables                                                                                                              NU OR STR 354E (353B no-l-eql)                                     Jumps from:                                                      3543 EX OR NOT                                                                                                              NXT DGT 1 2CDA (2C9B DEC TO FP)                                    Jumps from:                                                      auto                                                                                                                        NXT DGT 2 2D40 (2C9B DEC TO FP)                                    Jumps from:                                                      auto                                                                                                                        NXTLIN system variable 5C55                                        Bytes: 2                                                         The address in the program area of the start of the nextline in the program. It is one of the fourteen system pointers  adjusted by 1664 POINTERS.                                              It is set to a new value by 1BD1 NEXT LINE each time    execution of a new BASIC line starts, and by 1D64 F LOOP when a NEXT command has been found in performing FOR ... NEXT loops.           It is used only by 1BB3 LINE END, to read the next line number, if any.                                                        Written by:                                                      166B PTR NEXT                                                   1BD1 NEXT LINE                                                  1D64 F LOOP                                                    Read by:                                                         166B PTR NEXT                                                   1BB3 LINE END                                                   1D64 F LOOP                                                                                                                                          -----                                                                                                  offset for calculator operations see CALCULATE                                                                                  OFLOW CLR 3195 (3155 TEST NORM)                                    Exit from:                                                       3155 TEST NORM through one of:                                  315E SKIP ZERO (twice)                                          3186 NORML NOW (twice)                                                                                                      OFLW1 CLR 3146 (3155 TEST NORM)                                     Misprinted OFLW 1 CLR.                                         Jumps from:                                                      313D DIVN EXPT                                                                                                              OFLW2 CLR 3151 (3155 TEST NORM)                                    Jumps from:                                                      3146 OFLW1 CLR (twice)                                                                                                      'OK' message see REPORT 0 [zero]                                                                                                OLDPPC system variable 5C6E                                        Bytes: 2                                                         The line number to which execution jumps from CONTINUE. See also 5C70 OSPCC, the statement number within this line.             It is written by 1376 MAIN 7 each time BASIC execution  is completed. If bit 7 of 5C44 NSPPC is zero, indicating a "jumpin BASIC", 5C42-44 NEWPPC and NSPPC are copied to 5C6E-70 OLDPPCand OSPCC; if not 5C45-47 PPC and SUBPPC. The jump to the line  and statement is made by 1E5F CONTINUE.                                Written by:                                                      1376 MAIN 7                                                    Read by:                                                         1E5F CONTINUE                                                                                                               old variable see variables                                                                                                      ONE 386A (3851 to-power)                                           Jumps from:                                                      385D XISO                                                                                                                   one-byte binary arithmetic                                          Much ingenuity has been expended by the programmers on  devices to perform quite complex arithmetic with single-byte    positive integers zero -> 255d, depending usually on rotations, AND/OR/XOR, and of course the ADD/ADC/SUB/SBC operations. Novicem/c programmers would do well to study and imitate these        devices. It is impossible to give any rules, but clearly a      thorough familiarity with binary arithmetic is essential.               For instructive examples see especially 0E00 CL SCREEN, 0E44 CL LINE, 0E88 CL ATTR, 0E9B CL ADDR.                                                                                           ones complementing see twos complementing                                                                                       ONE SHIFT 2FE5 (2FDD SHIFT FP)                                     Exit from:                                                       2FDD SHIFT FP                                                  Jumps from:                                                      auto