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

  1.         - (str-&-no) set the argument flag in the op code, now  01010000b/50h; its second argument will be numeric                      - jump on to S NEXT.                                           _2788_S_NOT_AND: if the op code was less than 10h report "Nonsense in BASIC"; operators before 10h in the literal list   can't have a string argument                                            - if the op code was "+" jump on to S NEXT; this is the only one that produces strings from strings                             - set bit 7 of the op code, the result flag; numeric    result.                                                                _2790_S_NEXT: push the new o/p on the op stack                   - move on the BASIC pointer                                     - loop back to S LOOP 1; not S LOOP, don't confuse them!       _[27BD_S_FN_SBRN: secondary routine to handle FN.]              Exit: the_only exit, apart from error reports, is into   0018 GET CHAR from S LOOP, when the op stack has been executed  down to the bottom.                                                    Output parameters: none                                          - the result of evaluating the expression is on the     calculator stack                                                        - 0018 GET CHAR on exit will read the code following theexpression.                                                            Called from:                                                     1C59 VAL FET 2                                                  1C82 EXPT 1 NUM                                                 1C8C EXPT EXP                                                   1E2C DATA 1                                                     1FA6 DEF FN 6                                                   2024 PR ITEM 1                                                  25E8 S BRACKET                                                  27D9 SF ARGMTS                                                  2852 SF ARG VL                                                  288D SF VALUE                                                   35DE val                                                        360C V RPORT C                                                 Rems:                                                            Introduction rather slow since many variants checked            028E KEY SCAN called by S INKEY$ routine                        22CB POINT SUB called by S POINT routine                        27BD S FN SBRN evaluates DEF FN by calls to SCANNING            2831 SF VALUES evaluates DEF FN by calls to SCANNING            2951 STK F ARG used to calculate value of variable              2981 SFA MATCH leaves SCANNING to calculate numerics            2CA2 BIN DIGIT leaves SCANNING to check syntax                  32D7 address table literals come from SCANNING                  33A2 fp-calc-2 sole ROM use is in SCANNING                      33B4 STACK NUM used twice by SCANNING                           34B3 usr-no omits to ensure return into SCANNING                3645 READ IN called by S INKEY$ in SCANNING                                                                                 scanning attributes subroutine see 2580 S ATTR S                                                                                scanning BRACKET routine see 25E8 S BRACKET                                                                                     scanning DECIMAL routine see 268D S BIN                                                                                         SCANNING FUNCTION ROUTINES see 25AF S U PLUS                                                                                    SCANNING FUNCTION SUBROUTINE see 27BD S FN SBRN                                                                                 scanning loop                                                       In the notes, this may mean either the statement        checking/execution loop 1B17 LINE SCAN/1B8A LINE RUN, or the    expression evaluation loop 24FB SCANNING.                                                                                           scanning PI routine see 2627 S PI                                                                                               scanning QUOTE routine see 25B3 S QUOTE, 250F S QUOTE S                                                                         scanning SCREEN$ subroutine see 2535 S SCRN$ S                                                                                  scanning the keyboard see KEYBOARD SCANNING                                                                                     SCANNING VARIABLE ROUTINE see 26C9 S LETTER                                                                                     scanning 2 coordinates subroutine see 2522 S 2 COORD                                                                            S CONT 1 26DD (24FB SCANNING)                                      Jumps from:                                                      26C3 S NUMERIC                                                  26C9 S LETTER                                                                                                               S CONT 2 2712 (24FB SCANNING)                                      Jumps from:                                                      25DB S STRING                                                   25E8 S BRACKET                                                  2665 S INK$ EN                                                  26DD S CONT 1                                                   27F4 SF SYN EN                                                  288D SF VALUE                                                                                                               S CONT 3 2713 (24FB SCANNING)                                      Jumps from:                                                      auto                                                                                                                        SCR CT system variable 5C8C                                        Bytes: 1.                                                        The_scroll_counter: decremented each time a line is     scrolled or a screen line filled. When it reduces to zero, the  "scroll?" message is printed, and the counter reset to 18h/24d, in 0C88 PO SCR 2.                                                       POKing any number more than one into SCR CT inhibits    printing of the message: eg at 0767 LD LOOK H. This may also be done from m/c programs or from BASIC.                                   When the screen is cleared, SCR CT is set to one by 0DAFCL ALL; this is changed to the correct value for the number of  lines currently on screen by 12CF MAIN 3 or 20AD INPUT 2.               The scroll counter isn't the same as the_scroll_numbers:there are two of these, one being the number of lines to be     scrolled counted from the top of the screen, and the other the  number of times the scrolling subroutine is to be called to     scroll the screen up by one line. These aren't kept in svs, but calculated each time scrolling is called for. The notes don't   always succeed in distinguishing these three numbers clearly.          Written by:                                                      0767 LD LOOK H                                                  0C88 PO SCR 2 (twice)                                           0DAF CL ALL                                                     12CF MAIN 3                                                     20AD INPUT 2                                                   Read by:                                                         0C88 PO SCR 2 (tested for zero)                                Rems:                                                            0D02 PO SCR 4 when AT used in lower screen, scroll                            number is 19h less the AT line number                           less the value of DF SZ                           0D1C PO SCR 4A number is 18h to scroll whole screen             0D2D PO SCR 4B scroll B lines                                                                                               screen, screen address see DISPLAY AREA                                                                                         SCREEN AND PRINTER HANDLING ROUTINES see 09F4 PRINT OUT                                                                         screen colours see colours                                                                                                      SCREEN$ key (AA) see also commands, functions and operators,KEYBOARD SCANNING, 0246 extended mod table (c)                          The K key in E mode with either shift produces the tokenSCREEN$; it can be used either as a function or as an "adverb"  after LOAD/SAVE commands.                                               As a function, it requires two numeric operands (X,Y),  which must be in brackets, and the value of the function is the single-character string consisting of the character at the BASICAT position (X,Y) on the screen. On execution, 24FB SCANNING    indexes into the scanning function table at 2596 to find the    executive routine 2668 S SCREEN$, and its secondary subroutine  2525 S SCRN$ S.                                                         After a LOAD/SAVE command it isn't read as a function   but as an abbreviation for CODE 16384,6912, ie the bytes of the display area. This can also be used with VERIFY, though not withMERGE.                                                                  06A0 SA SCR$ executes LOAD/SAVE SCREEN$                         0710 SA TYPE 3 codes LOAD/SAVE SCREEN$ as type 3                07AD LD CH PR loading handled as verifying                      07CB VR CONTRL loading handled as verifying                                                                                 scroll counter see 5C8C SCR CT                                                                                                  scrolling                                                           The display operation in which all the lines or some    lines on the screen are reprinted one line higher than before.  Because the order of the display bytes in the display area is   far from straightforward, this is a complex operation. See the  index entry on 0C55 PO SCR, which I hope clarifies the rather   confusing notes.                                                        The screen is scrolled:                                        a) when input to the lower screen calls for printing on aline outside the present range of the lower screen, either      because the last line of the lower screen is full and charactersare still being input, or because of an AT or TAB control or    position controls such as comma or ' in an INPUT command.              b) in listings, when the last position on the screen has been printed and there are more to come, or when a newline is tobe printed on the last available line. This may be in an        ordinary listing, after the "scroll?" prompt has appeared and   scrolling has been accepted; or in an automatic listing if the  screen is full and the current line hasn't yet appeared on      screen. TV FLAG bit 4 is cleared for ordinary listing, set for  automatic.                                                             c) in executing a PRINT command in the upper screen; thisis treated like an ordinary listing, because TV FLAG bit 4 will be zero.                                                                All these cases arise in execution of the 09F4 PRINT OUTscreen output routine when for one reason or another the print  position line number has been decremented, bringing it nearer tothe bottom of the screen. Wherever in ROM this is done, a call  is made to 0C55 PO SCR to check the need for scrolling; if      scrolling is required, it calls                                        either 0DFE CL SC ALL, from 0CD2 PO SCR 3, to scroll 17h/23d lines, ie the whole screen_except the bottom line; to avoid scrolling the "screen?" prompt                                         or 0E00 CL SCROLL, from 0D2D PO SCR 4B, to expand the    lower screen; it scrolls                                                  either 18h/24d lines, ie the whole screen_including   the bottom line, which probably has input on it - this is done  when the upper screen is full                                          or the number of lines in 5C6B DF SZ, ie the lower screenonly, including its bottom line - this is done when the upper   screen isn't full.                                                      For the scroll counter and the other scroll numbers, seeunder 5C8C SCR CT.                                                      0A4F PO ENTER checks whether scrolling required                 0AAC PO AT ERR may be needed in lower screen on "AT"            0B93 PR ALL 1 may be needed when line end reached               0C55 PO SCR sr to scroll if required                            0C88 PO SCR 2 "scroll" prompt printed and response                            interpreted                                       0CD2 PO SCR 3 prepares to execute scroll                        0D02 PO SCR 4 prepares to scroll lower screen                   0D1C PO SCR 4A prepares scroll counter                          0D2D PO SCR 4B counts scrolls                                   0DFE CL SC ALL entry to sr after "scroll?" prompt               0E00 CL SCROLL executes single line scroll                      0E05 CL SCR 1 start of 8-pixel scrolling loop                   0E19 CL SCR 3 checks for boundary of "thirds"                   17ED AUTO L 4 ends auto list loop if no scrolling               1835 LIST ALL scroll till "current line" appears                                                                            SCROLLING SUBROUTINE see 0DFE CL SC ALL                                                                                         'scroll?' message 0CF8                                              This message isn't included with the main message list  at 1391, mainly though not exclusively report messages, but is  inserted as a one-item list on its own. This is to avoid having more than 32d messages in the main list, see the remarks on     leading spaces under 0C0A PO MSG.                                       0A4F PO ENTER checks for, before transferring line to                         main display                                      0C88 PO SCR 2 prints if required                                0DFE CL SC ALL entry to scrolling sr after                      10A8 KEY INPUT clears "scroll?" from lower screen                                                                           scroll number see 5C8C SCR CT                                                                                                   S DECIMAL see 268D S BIN                                                                                                        SECND LOW 356B (353B no-l-eql)                                     Jumps from:                                                      3575 SEC PLUS                                                                                                               second byte of FP number, second number, second operand,     second value on calculator stack see CALCULATE                                                                                     SEC PLUS 3575 (353B no-l-eql)                                      Jumps from:                                                      3564 BYTE COMP                                                                                                              security                                                            "One disadvantage of the [cassette handling] system is  that it is not possible to produce programs with any 'security' whatever" (Introduction). However, commercial producers of      programs have managed to overcome this imagined limitation.                                                                         SEED system variable 5C76 see also 1E4F RANDOMIZE, random   numbers and 25F8 S RND                                                 Bytes: 2.                                                        The argument of the RND function, which is the remainderon dividing (SEED + 1) * 75 by 65537, less one, divided by      65536.                                                                  RND always uses SEED, it doesn't accept a value from    BASIC. SEED can be set to X by RANDOMIZE X, or to the present   value of the two lo bytes of 5C78 FRAMES by RANDOMIZE zero.             For most purposes it doesn't matter at all to the       working of the Spectrum what number is in SEED, and it is only  disturbed by RANDOMIZE and RND, so it is a suitable address for flags etc to be used in m/c programming; it is IY+50.                  Written by:                                                      1E5A RAND 1                                                     25F8 S RND                                                     Read by:                                                         25F8 S RND                                                                                                                  semicolon see control characters, ";" (3B) after end of     alphabet                                                                                                                            SEPARATOR subroutine 1B6F                                           So far as this subroutine is concerned, the_separators  are those items in the parameter table at 1A7A which aren't     command class indexes, so they have codes greater than 20h, and not subroutine addresses:                                                          2C ,     in 1AFC P OPEN                                                     1B0A P MOVE                                         3D =     in 1A7A P LET                                                      1A90 P FOR                                          CB THEN  in 1A81 P IF                                           CC TO    in 1A90 P FOR                               This subroutine checks that the command being read does in fact contain a code corresponding to the required separator.         However in other parts of the notes,_separators means   the codes checked for in 1BF4 STMT NEXT, the statement          separators newline and colon. In 2712 S CONT 2 it isn't clear   what is meant: "a carriage return character, a colon, a         separator or a THEN" seems to imply duplications with either of the above interpretations.                                              It would also make sense to use the term for the        position controllers comma, semicolon and single quote, which   are used as "separators" between items in a PRINT statement; butso far as I can see it never is so used in the notes.                  Input parameters: none                                          Action: read the code in BASIC                                   - compare it with the separator in the parameter table          - if it doesn't match report "Nonsense in BASIC"                - move on the BASIC pointer.                                   Exit: RET.                                                      Output parameters: none.                                        Exit from:                                                       1B55 GET PARAM