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

  1.        Input parameters: HL holds a pointer to the table; the   address of the first index                                              - C holds the check code to be looked up.                      Action: if the index is zero, return                             - compare it with the check code                                - increase the pointer; to put it on the offset                 - if the index doesn't match the check code jump back toINDEXER 1                                                               - (match found) set carry and return.                          _16DB_INDEXER_1 (no match yet): increase the pointer     again; to put it on the next index                                      - continue into INDEXER for another turn of the loop.          Exit: RET.                                                      Output parameters: the carry flag indicates that a match was found                                                               - NC that zero was reached without a match                      - A holds the same as C which is unchanged, or zero if  zero was reached                                                        - HL holds the address of the offset or of the zero.           Called from:                                                     1615 CHAN FLAG                                                  1701 CLOSE 2                                                    1767 OPEN 3                                                     24FF S LOOP 1                                                   2723 S OPERTR                                                                                                               INDEXER 1 16DB (16DC INDEXER)                                      Jumps from:                                                      16DC INDEXER                                                                                                                indexing see tables, 16DC INDEXER                                                                                               information area see channels and streams                                                                                       IN ITEM 1 subroutine 20C1                                           The main executive part of the INPUT command routine.   See 2089 INPUT.                                                        Called from:                                                     2096 INPUT 1                                                   Jumps from:                                                      auto                                                            21B2 IN NEXT 2                                                                                                              IN ITEM 2 20D8 (2089 INPUT)                                        Jumps from:                                                      20C1 IN ITEM 1                                                                                                              IN ITEM 3 20ED (2089 INPUT)                                        Jumps from:                                                      20D8 IN ITEM 2                                                                                                              initial channel information table 15AF see channels and     streams, tables                                                                                                                     initial data of channels/streams see channels and streams                                                                       INITIALISATION ROUTINE see 11B7 NEW                                                                                             initial key values see KEYBOARD SCANNING                                                                                        initial parameters of array (first four bytes) see arrays                                                                       initial parameters (CIRCLE/DRAW), INITIAL PARAMETERS         SUBROUTINE see 247D CD PRMS1                                                                                                       initial stream data table 15C6 see tables                                                                                       initial zero (in BASIC numbers) see 2DE3 PRINT FP                                                                               INK key (D9) see also colours, control characters, KEYBOARD SCANNING, 0246 extended mode key table (c)                              The X key in E mode with either shift produces the tokenINK. INK can be used either as a BASIC command or as a print    control item within a PRINT etc statement. In either case it it must be followed by a parameter, a numeric expression with the  value zero -> 9, and it uses this to set the "pixel on" colour  of any new printing on the screen: zero -> 7 are the screen     colours, INK 8 means "don't change the INK colour in this       position", INK 9 means "use black or white, whichever contrasts best with the PAPER colour".                                            As a command, it is read by 1B29 STMT L 1 referring     through the syntax offset table 1A48 to the syntax parameter    table 1A7A. 1AEB P INK causes a jump to 1C96 CLASS 07 (PERMS),  the executive routine for all the colour commands INK to OVER.          As a print control item, execution is from within the   PRINT executive routine 1FC0 PRINT; each new expression         following the PRINT command is checked by a call to 1FFC PR ITEM1 from 1FE5 PRINT 3. If it is INK, this in turn calls 21F2 CO   TEMP 3, from 2024 PR ITEM 3; here the token code D9 is convertedinto the embedded control code 10h, which is then sent through  the output routine followed by its parameter.                           The way this works when printing on screen can be seen  at 09F4 PRINT OUT; indexing with 10h for INK into the control   character table at 0A11 produces an indirect jump to 0A7A (0A1B + 5F) PO 1 OPER. See the index description of this subroutine   for the rather tricky way in which it collects the parameter andsends execution to 0A87 PO CONT, which finally executes the INK command.                                                                0BFA PO ATTR 1 handles INK 9 in screen printing                 0F38 ED LOOP only two bytes required                            0F6C ED CONTR only two bytes required                           10FA KEY CONTR code put in A register                           18C1 OUT FLASH cancel INK 9 temporarily                                                                                     ink colour see colours                                                                                                          INK control code (10h)                                              The digit keys zero -> 7 in E mode without shift producethe colour control items PAPER zero etc, with shift the items   INK zero etc. PAPER and INK 8 and 9 cannot be produced in this  way - the 8 and 9 keys in E mode control BRIGHT and FLASH, see  BRIGHT control code.                                                    These keystrokes put the control codes 10h INK or 11h   PAPER, followed by the parameter, into the BASIC line. When the line is copied to the screen, no character is printed for eithercode or parameter, but the corresponding colour command is      executed for all subsequent printing either in the lower or     upper screen display. If the codes are input as part of a       string, they will remain part of the string and will be executedwhenever the string is printed out; in this case, for all       subsequent printing executed by the same PRINT instruction.             The keyboard scanning routines at 0367 K DIGIT initiallyreturn 10h -> 17h for the eight PAPER colours, and 18h -> 1Fh   for the INK colours, and put them in 5C08 LAST K; but these are split by 10A8 KEY INPUT and 10FA KEY CONTR into 10h or 11h in   the A register and the colour number in C. The channel address  is switched so that A and C are returned in series, and both putin the BASIC.                                                           18FF OUT LINE prints out the BASIC, either in a listing or in the lower screen for editing; the PAPER or INK command is implemented for the remainder of the print, but the actual codesare skipped. They can be detected by cursor moves: the cursor   moves over the two bytes in one jump when going left, but takes two jumps going right - possibly this is a mistake in the ROM,  see 100C ED RIGHT. DELETE must be used twice to delete the code and parameter.                                                          If the cursor is placed by a right move_between the codeand parameter, and then DELETE is used - or if DELETE is used   only once from the right, which is arranged to produce the same result - the code is deleted, leaving the parameter 00 -> 07    high and dry. All these codes except 06 print out as "?", and   are ignored by both syntax checking and execution, because thereis no interpretation for them. 06 happens to be the PRINT comma,and is printed and executed as such; it can be incorporated intostrings, REMs etc as an economical way of tabulating printouts. Two such 06 codes produce a newline.                                    PAPER and INK colour codes can be used in variable      names, to give them prominence in the listing - they are ignoredwhen reading the variable for evaluation. [But see under 28B2   LOOK VAR for a minor error.]                                            In strings, instead of using the E mode digit keys, the colours can be put in by concatenation:                                  10 LET a$=CHR$ 17 + CHR$ 6 + "hello": PRINT a$          has just the same effect as                                                       10 PRINT PAPER 6; "hello"                            CHR$ 17 + CHR$ 6 alone, or even "[E mode 6]" can be madethe value of a string variable and printed in concatenation     with, or preceding, other variables. Such tricks are            occasionally useful.                                                                                                                INKEY$ key (A6) see also commands, functions and operators, KEYBOARD SCANNING, 022C extended mode table (b)                         The N key in E mode without shift produces the function INKEY$, which like PI and RND is a function without an argument:it needn't be followed by any parameter, though (hatch) with a  stream number is accepted. The value of the function is the     final code of whatever key is currently being pressed, or the   null string if "no key" is reported -_not the code currently in 5C08 LAST K, nor the next key pressed, INKEY$ doesn't wait.     However if a stream number is specified INKEY$ takes as its     value any input it finds from the specified stream.                     On execution, 24FB SCANNING indexes into the scanning   function table at 2596 to find the executive routine 2634 S     INKEY$.                                                                 028E KEY SCAN called by executive routine                       0C35 PO TRSP doesn't require trailing space                     3645 read-in                                                                                                                INKEY$ subroutine see 2634 S INKEY$                                                                                             INK to OVER see colours, BRIGHT control code (includes      FLASH), INK control code (includes PAPER), INVERSE control code (includes OVER), and individual token keys                                                                                          INK to TAB see colours etc as above, and control characters                                                                     IN NEXT 1 21AF (2089 INPUT)                                        Jumps from:                                                      20ED IN ITEM 3                                                                                                              IN NEXT 2 21B2 (2089 INPUT)                                        Exit from:                                                       20C1 IN ITEM 1, both direct and via the following               20FA IN PROMPT                                                  2174 IN VAR 5                                                   219B IN VAR 6                                                                                                               IN PK STK 34B0 (34AC peek)                                         Jumps from:                                                      34A5 in                                                                                                                     IN PROMPT 20FA (2089 INPUT)                                        Jumps from:                                                      20D8 IN ITEM 2                                                                                                              IN PR 1 211A (2089 INPUT)                                          Jumps from:                                                      20FA IN PROMPT                                                                                                              IN PR 2 211C (2089 INPUT)                                          Jumps from:                                                      20FA IN PROMPT                                                                                                              IN PR 3 2129 (2089 INPUT)                                          Jumps from:                                                      211C IN PR 2                                                                                                                INPUT key (EE) see also commands, functions and operators,  KEYBOARD SCANNING                                                       The I key in K mode produces the command INPUT. The     "INPUT statement" must include either a position controller or avariable name, string or numeric; it may include both, and in   addition:                                                              - control codes, position and colour, as for a PRINT     statement                                                              - a_prompt in quotes; it may incorporate variable names  but if it does the prompt must be in brackets                          - LINE, for string inputs only, indicating the prompt    cursor is to appear without quotes.                                     The prompt if any must come before the variable name,   and LINE must be after the prompt if any and immediately before the variable name. Print controls can come anywhere except      between LINE and the variable.                                          The variable name can be followed by another position   controller and more variable names, with or without prompts,    LINE etc.                                                               [Multiple INPUTs are quite acceptable, for example:          INPUT "a(1): ", a(1) ' "a(2): ", a(2) ' "a(3): ", a(3)      will print in turn, each on a new line,                                            a(1):           (cursor)                                        a(2):           (cursor)                                        a(3):           (cursor)                     waiting each time for the input before printing the new prompt.        Also INPUT ' or INPUT , or INPUT ; are accepted, withoutany variable name; but not INPUT alone. These merely clear the  lower screen, without waiting for any input. These options don'tseem to be mentioned in the handbooks.]                                 For each variable name, the command prints out the      prompt, if any; prints a flashing L prompt cursor, which is in  quotes for a string variable except if LINE is specified; and   awaits input of an expression, which is then assigned to the    named variable.                                                         The command is read by 1B29 STMT L 1 referring through  the syntax offset table 1A48 to the syntax parameter table 1A7A.1A9F P INPUT causes a jump via 1C11 CLASS 05 and 1C16 JUMP C R  to the executive routine 2089 INPUT.                                    1C1F CLASS 01 identifies variable for INPUT (called by                        20D8 IN ITEM 2 and 20ED IN ITEM 3)                                                                            INPUT subroutine 2089                                               Called only by the statement loop at 1C15 JUMP C R from 1A9F P INPUT in the syntax parameter table. Executes the INPUT  command by printing one or more prompts; waiting for an         expression from the keyboard, which is built up in the work     space and then evaluated as a BASIC expression by 24FB SCANNING;and assigning it to a variable. The expression from the keyboardis often referred to in the notes as the_entry, which may be a  numeric_entry or a_string_entry.                                        Much of the action is in the subroutine IN ITEM 1, whichis never called or entered from elsewhere in ROM; I can see no  reason why IN ITEM 1 shouldn't have been incorporated directly  as part of INPUT 1 instead of being called as a subroutine, and for clarity its action is included here.                                All of IN ITEM 1 down to IN NEXT 2 is a loop; each turn of the loop                                                            - executes any print position controls ; , '                    - prints any prompt from the BASIC                              - waits for input                                               - evaluates the input and assigns it to the variable in  assignment                                                             - and goes round the loop again till the end of the INPUTstatement is reached.                                                  Input parameters: none                                           - the BASIC pointer in 5C5D CH ADD is on the byte       following the INPUT command.                                           Action: in syntax checking jump on to INPUT 1                    - (run time) call 1601 CHAN OPEN with stream 01; open   channel K                                                               - call 0D6E CLS LOWER to clear the lower screen.               _2096_INPUT_1: make flags in 5C3C TV FLAG (misprinted DF SZ in the notes):                                                        "don't clear the lower screen"                                  "not automatic listing"                                         "don't copy the input"; but this will be reversed when 0E2C EDITOR calls 15D4 WAIT KEY                                          "print in the lower screen"                                   - call IN ITEM 1.                                               _20C1_IN_ITEM_1: call 204E PR POSN 1, which executes any position controller; it returns with Z if the character was a   position controller. If it reaches the end of a statement, it   drops its return address, so exiting from the IN ITEM 1 loop    altogether back into INPUT 1                                            - if it returns with Z loop back to IN ITEM 1; in case  there are more position controllers, eg INPUT '' h                      - if the next character isn't 2B ( jump on to IN ITEM 2         - (an expression in brackets is to be printed as a      prompt) move on the BASIC pointer                                       - call 1FDF PRINT 2 to print the prompt; it too can haveposition controllers in it, and also ATs or TABs, but PRINT 2   will handle them                                                        - (PRINT 2 will return on 29h ), but also on a statementterminator) if the code reached isn't 29h ) report "Nonsense in BASIC"