Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF » F/+HINT13

F/+HINT13

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF
Filename: F/+HINT13
Read OK:
File size: 14F9 bytes
Load address: 48204556
Exec address: 39544E49
File contents
GETDEC

GETDEC reads a number as an ASCII string and converts it into binary.  The
maximum size of a binary number that it can return is two bytes.  No errors
are generated for overflows; GETDEC will return the bottom sixteen bits of
an arbitrarily large number.

On entry:       TEMP06          points to start of string.
                Y               gives offset from beginning of string to
                                start of ASCII number; no leading blanks
                                allowed.

On exit:        A               contains low byte of number.
                X               contains high byte of number.
                Y               is updated to point to the non-numeric 
                                character that terminated the number.
                EQ              no number was found; A,X,Y undefined.


KINCH

Call this routine to get a character of input from the keyboard.  The
keyboard buffer is flushed first.  ESCAPEs are detected and acknowledged
automatically, using the OSBYTE 126 call, and the Carry flag indicates
whether ESCAPE was detected.

On entry:                       No entry conditions.

On exit:        CC              A contains input character.
                CS              ESCAPE was detected.


MULPLY

MULPLY multiplies two eight bit numbers together, giving a sixteen bit
result:

On entry:       A               contains an 8-bit number.
                Y               contains an 8-bit number.

On exit:        A               contains the low byte of the result.
                Y               contains the high byte of the result.
                CS              if Y is non-zero (the result is greater than
                                255).
                X               preserved.


OUTDEC

Call OUTDEC to output a sixteen bit decimal number to the VDU.

On entry:       X               contains the low byte of the number.
                Y               contains the high byte of the number.  

On exit:        A,X,Y           undefined.


PSTRNG

PSTRNG outputs a string in-line with the code to the VDU.  The string must
be delimited with a null, zero byte.

For example:    JSR        PSTRNG
                EQUS       "This will be output to the VDU"
                EQUB       0

On entry:                  Immediately following the JSR call, there is a
                           string delimited with a null.  The string must
                           not be more then 256 characters long, including
                           the delimiter.

On exit:        A,Y        undefined.
                X          preserved.


RELLIN

RELLIN reads a line of input, and puts it into LINBUF.  The input is
terminated with a Carriage Return or an ESCAPE.  The OSWORD 0 call is used
to get the input.  TEMP06 is left pointing to the beginning of LINBUF, and Y
gives the offset to the first non-space character in LINBUF.

On entry:                       No entry parameters.

On exit:        LINBUF          contains the line of input; maximum 256 
                                characters.
                TEMP06          points to LINBUF.
                CMDPAR          gives offset from TEMP06 to the first
                                non-space character.

                CS              ESCAPE terminated input.



SKPCBL

SKPCBL skips spaces in a line of input, terminated by a Carriage Return.

On entry:       TEMP06          points to beginning of input string.
                CMDPAR          gives offset from start of string to start
                                skipping spaces.

On exit:        CMDPAR          gives offset to first non-space character
                                after initial value.
                A               contains first non-space character.
                EQ              hit CR at end of line, before non-space
                                character was found.


The Index System

The ViewStore ROM contains a set of routines for creating and maintaining
index files.  These are used internally by code in the ROM, and also by the
INDEX utility.  They are very powerful and could be used by extra utilities
to great effect.

You will be familiar with the way the ViewStore itself uses the index
system.  A utility could use indexes side by side with the ROM, or it could
build and maintain indexes for its own purpose.

In a ViewStore index file, you can store a "key", and associate with the key
a pointer value, 4 bytes in size.  They key can be any string of ASCII
characters, and the pointer value any four byte integer, but usually the
pointer value is used to remember a record file address. 

The characters that make up an index key must be between the values 32 and
254, inclusive.  Since the alphabetical value of numbers and dates is not
the same as the value we generally wish these data types to have (that is
numbers in numerical order, and dates in age order), the ASCII number and
date fields as they are stored in ViewStore data files must be converted
into another form before being sent to the index system.  A routine, ADJVAL,
is provided to do this.  Remember, if you are building or altering an index
file, to use the ADJVAL routine on the key.

The index system uses a technique akin to that of IBM's ISAM (indexed
sequential access method) and VSAM (virtual sequential access method)
systems.

00000000  47 45 54 44 45 43 0d 0d  47 45 54 44 45 43 20 72  |GETDEC..GETDEC r|
00000010  65 61 64 73 20 61 20 6e  75 6d 62 65 72 20 61 73  |eads a number as|
00000020  20 61 6e 20 41 53 43 49  49 20 73 74 72 69 6e 67  | an ASCII string|
00000030  20 61 6e 64 20 63 6f 6e  76 65 72 74 73 20 69 74  | and converts it|
00000040  20 69 6e 74 6f 20 62 69  6e 61 72 79 2e 20 20 54  | into binary.  T|
00000050  68 65 0d 6d 61 78 69 6d  75 6d 20 73 69 7a 65 20  |he.maximum size |
00000060  6f 66 20 61 20 62 69 6e  61 72 79 20 6e 75 6d 62  |of a binary numb|
00000070  65 72 20 74 68 61 74 20  69 74 20 63 61 6e 20 72  |er that it can r|
00000080  65 74 75 72 6e 20 69 73  20 74 77 6f 20 62 79 74  |eturn is two byt|
00000090  65 73 2e 20 20 4e 6f 20  65 72 72 6f 72 73 0d 61  |es.  No errors.a|
000000a0  72 65 20 67 65 6e 65 72  61 74 65 64 20 66 6f 72  |re generated for|
000000b0  20 6f 76 65 72 66 6c 6f  77 73 3b 20 47 45 54 44  | overflows; GETD|
000000c0  45 43 20 77 69 6c 6c 20  72 65 74 75 72 6e 20 74  |EC will return t|
000000d0  68 65 20 62 6f 74 74 6f  6d 20 73 69 78 74 65 65  |he bottom sixtee|
000000e0  6e 20 62 69 74 73 20 6f  66 0d 61 6e 20 61 72 62  |n bits of.an arb|
000000f0  69 74 72 61 72 69 6c 79  20 6c 61 72 67 65 20 6e  |itrarily large n|
00000100  75 6d 62 65 72 2e 0d 0d  4f 6e 20 65 6e 74 72 79  |umber...On entry|
00000110  3a 20 20 20 20 20 20 20  54 45 4d 50 30 36 20 20  |:       TEMP06  |
00000120  20 20 20 20 20 20 20 20  70 6f 69 6e 74 73 20 74  |        points t|
00000130  6f 20 73 74 61 72 74 20  6f 66 20 73 74 72 69 6e  |o start of strin|
00000140  67 2e 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |g..             |
00000150  20 20 20 59 20 20 20 20  20 20 20 20 20 20 20 20  |   Y            |
00000160  20 20 20 67 69 76 65 73  20 6f 66 66 73 65 74 20  |   gives offset |
00000170  66 72 6f 6d 20 62 65 67  69 6e 6e 69 6e 67 20 6f  |from beginning o|
00000180  66 20 73 74 72 69 6e 67  20 74 6f 0d 20 20 20 20  |f string to.    |
00000190  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000001a0  20 20 20 20 20 20 20 20  20 20 20 20 73 74 61 72  |            star|
000001b0  74 20 6f 66 20 41 53 43  49 49 20 6e 75 6d 62 65  |t of ASCII numbe|
000001c0  72 3b 20 6e 6f 20 6c 65  61 64 69 6e 67 20 62 6c  |r; no leading bl|
000001d0  61 6e 6b 73 0d 20 20 20  20 20 20 20 20 20 20 20  |anks.           |
000001e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000001f0  20 20 20 20 20 61 6c 6c  6f 77 65 64 2e 0d 0d 4f  |     allowed...O|
00000200  6e 20 65 78 69 74 3a 20  20 20 20 20 20 20 20 41  |n exit:        A|
00000210  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 63  |               c|
00000220  6f 6e 74 61 69 6e 73 20  6c 6f 77 20 62 79 74 65  |ontains low byte|
00000230  20 6f 66 20 6e 75 6d 62  65 72 2e 0d 20 20 20 20  | of number..    |
00000240  20 20 20 20 20 20 20 20  20 20 20 20 58 20 20 20  |            X   |
00000250  20 20 20 20 20 20 20 20  20 20 20 20 63 6f 6e 74  |            cont|
00000260  61 69 6e 73 20 68 69 67  68 20 62 79 74 65 20 6f  |ains high byte o|
00000270  66 20 6e 75 6d 62 65 72  2e 0d 20 20 20 20 20 20  |f number..      |
00000280  20 20 20 20 20 20 20 20  20 20 59 20 20 20 20 20  |          Y     |
00000290  20 20 20 20 20 20 20 20  20 20 69 73 20 75 70 64  |          is upd|
000002a0  61 74 65 64 20 74 6f 20  70 6f 69 6e 74 20 74 6f  |ated to point to|
000002b0  20 74 68 65 20 6e 6f 6e  2d 6e 75 6d 65 72 69 63  | the non-numeric|
000002c0  20 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | .              |
000002d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000002e0  20 20 63 68 61 72 61 63  74 65 72 20 74 68 61 74  |  character that|
000002f0  20 74 65 72 6d 69 6e 61  74 65 64 20 74 68 65 20  | terminated the |
00000300  6e 75 6d 62 65 72 2e 0d  20 20 20 20 20 20 20 20  |number..        |
00000310  20 20 20 20 20 20 20 20  45 51 20 20 20 20 20 20  |        EQ      |
00000320  20 20 20 20 20 20 20 20  6e 6f 20 6e 75 6d 62 65  |        no numbe|
00000330  72 20 77 61 73 20 66 6f  75 6e 64 3b 20 41 2c 58  |r was found; A,X|
00000340  2c 59 20 75 6e 64 65 66  69 6e 65 64 2e 0d 0d 0d  |,Y undefined....|
00000350  4b 49 4e 43 48 0d 0d 43  61 6c 6c 20 74 68 69 73  |KINCH..Call this|
00000360  20 72 6f 75 74 69 6e 65  20 74 6f 20 67 65 74 20  | routine to get |
00000370  61 20 63 68 61 72 61 63  74 65 72 20 6f 66 20 69  |a character of i|
00000380  6e 70 75 74 20 66 72 6f  6d 20 74 68 65 20 6b 65  |nput from the ke|
00000390  79 62 6f 61 72 64 2e 20  20 54 68 65 0d 6b 65 79  |yboard.  The.key|
000003a0  62 6f 61 72 64 20 62 75  66 66 65 72 20 69 73 20  |board buffer is |
000003b0  66 6c 75 73 68 65 64 20  66 69 72 73 74 2e 20 20  |flushed first.  |
000003c0  45 53 43 41 50 45 73 20  61 72 65 20 64 65 74 65  |ESCAPEs are dete|
000003d0  63 74 65 64 20 61 6e 64  20 61 63 6b 6e 6f 77 6c  |cted and acknowl|
000003e0  65 64 67 65 64 0d 61 75  74 6f 6d 61 74 69 63 61  |edged.automatica|
000003f0  6c 6c 79 2c 20 75 73 69  6e 67 20 74 68 65 20 4f  |lly, using the O|
00000400  53 42 59 54 45 20 31 32  36 20 63 61 6c 6c 2c 20  |SBYTE 126 call, |
00000410  61 6e 64 20 74 68 65 20  43 61 72 72 79 20 66 6c  |and the Carry fl|
00000420  61 67 20 69 6e 64 69 63  61 74 65 73 0d 77 68 65  |ag indicates.whe|
00000430  74 68 65 72 20 45 53 43  41 50 45 20 77 61 73 20  |ther ESCAPE was |
00000440  64 65 74 65 63 74 65 64  2e 0d 0d 4f 6e 20 65 6e  |detected...On en|
00000450  74 72 79 3a 20 20 20 20  20 20 20 20 20 20 20 20  |try:            |
00000460  20 20 20 20 20 20 20 20  20 20 20 4e 6f 20 65 6e  |           No en|
00000470  74 72 79 20 63 6f 6e 64  69 74 69 6f 6e 73 2e 0d  |try conditions..|
00000480  0d 4f 6e 20 65 78 69 74  3a 20 20 20 20 20 20 20  |.On exit:       |
00000490  20 43 43 20 20 20 20 20  20 20 20 20 20 20 20 20  | CC             |
000004a0  20 41 20 63 6f 6e 74 61  69 6e 73 20 69 6e 70 75  | A contains inpu|
000004b0  74 20 63 68 61 72 61 63  74 65 72 2e 0d 20 20 20  |t character..   |
000004c0  20 20 20 20 20 20 20 20  20 20 20 20 20 43 53 20  |             CS |
000004d0  20 20 20 20 20 20 20 20  20 20 20 20 20 45 53 43  |             ESC|
000004e0  41 50 45 20 77 61 73 20  64 65 74 65 63 74 65 64  |APE was detected|
000004f0  2e 0d 0d 0d 4d 55 4c 50  4c 59 0d 0d 4d 55 4c 50  |....MULPLY..MULP|
00000500  4c 59 20 6d 75 6c 74 69  70 6c 69 65 73 20 74 77  |LY multiplies tw|
00000510  6f 20 65 69 67 68 74 20  62 69 74 20 6e 75 6d 62  |o eight bit numb|
00000520  65 72 73 20 74 6f 67 65  74 68 65 72 2c 20 67 69  |ers together, gi|
00000530  76 69 6e 67 20 61 20 73  69 78 74 65 65 6e 20 62  |ving a sixteen b|
00000540  69 74 0d 72 65 73 75 6c  74 3a 0d 0d 4f 6e 20 65  |it.result:..On e|
00000550  6e 74 72 79 3a 20 20 20  20 20 20 20 41 20 20 20  |ntry:       A   |
00000560  20 20 20 20 20 20 20 20  20 20 20 20 63 6f 6e 74  |            cont|
00000570  61 69 6e 73 20 61 6e 20  38 2d 62 69 74 20 6e 75  |ains an 8-bit nu|
00000580  6d 62 65 72 2e 0d 20 20  20 20 20 20 20 20 20 20  |mber..          |
00000590  20 20 20 20 20 20 59 20  20 20 20 20 20 20 20 20  |      Y         |
000005a0  20 20 20 20 20 20 63 6f  6e 74 61 69 6e 73 20 61  |      contains a|
000005b0  6e 20 38 2d 62 69 74 20  6e 75 6d 62 65 72 2e 0d  |n 8-bit number..|
000005c0  0d 4f 6e 20 65 78 69 74  3a 20 20 20 20 20 20 20  |.On exit:       |
000005d0  20 41 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | A              |
000005e0  20 63 6f 6e 74 61 69 6e  73 20 74 68 65 20 6c 6f  | contains the lo|
000005f0  77 20 62 79 74 65 20 6f  66 20 74 68 65 20 72 65  |w byte of the re|
00000600  73 75 6c 74 2e 0d 20 20  20 20 20 20 20 20 20 20  |sult..          |
00000610  20 20 20 20 20 20 59 20  20 20 20 20 20 20 20 20  |      Y         |
00000620  20 20 20 20 20 20 63 6f  6e 74 61 69 6e 73 20 74  |      contains t|
00000630  68 65 20 68 69 67 68 20  62 79 74 65 20 6f 66 20  |he high byte of |
00000640  74 68 65 20 72 65 73 75  6c 74 2e 0d 20 20 20 20  |the result..    |
00000650  20 20 20 20 20 20 20 20  20 20 20 20 43 53 20 20  |            CS  |
00000660  20 20 20 20 20 20 20 20  20 20 20 20 69 66 20 59  |            if Y|
00000670  20 69 73 20 6e 6f 6e 2d  7a 65 72 6f 20 28 74 68  | is non-zero (th|
00000680  65 20 72 65 73 75 6c 74  20 69 73 20 67 72 65 61  |e result is grea|
00000690  74 65 72 20 74 68 61 6e  0d 20 20 20 20 20 20 20  |ter than.       |
000006a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006b0  20 20 20 20 20 20 20 20  20 32 35 35 29 2e 0d 20  |         255).. |
000006c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 58  |               X|
000006d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 70  |               p|
000006e0  72 65 73 65 72 76 65 64  2e 0d 0d 0d 4f 55 54 44  |reserved....OUTD|
000006f0  45 43 0d 0d 43 61 6c 6c  20 4f 55 54 44 45 43 20  |EC..Call OUTDEC |
00000700  74 6f 20 6f 75 74 70 75  74 20 61 20 73 69 78 74  |to output a sixt|
00000710  65 65 6e 20 62 69 74 20  64 65 63 69 6d 61 6c 20  |een bit decimal |
00000720  6e 75 6d 62 65 72 20 74  6f 20 74 68 65 20 56 44  |number to the VD|
00000730  55 2e 0d 0d 4f 6e 20 65  6e 74 72 79 3a 20 20 20  |U...On entry:   |
00000740  20 20 20 20 58 20 20 20  20 20 20 20 20 20 20 20  |    X           |
00000750  20 20 20 20 63 6f 6e 74  61 69 6e 73 20 74 68 65  |    contains the|
00000760  20 6c 6f 77 20 62 79 74  65 20 6f 66 20 74 68 65  | low byte of the|
00000770  20 6e 75 6d 62 65 72 2e  0d 20 20 20 20 20 20 20  | number..       |
00000780  20 20 20 20 20 20 20 20  20 59 20 20 20 20 20 20  |         Y      |
00000790  20 20 20 20 20 20 20 20  20 63 6f 6e 74 61 69 6e  |         contain|
000007a0  73 20 74 68 65 20 68 69  67 68 20 62 79 74 65 20  |s the high byte |
000007b0  6f 66 20 74 68 65 20 6e  75 6d 62 65 72 2e 20 20  |of the number.  |
000007c0  0d 0d 4f 6e 20 65 78 69  74 3a 20 20 20 20 20 20  |..On exit:      |
000007d0  20 20 41 2c 58 2c 59 20  20 20 20 20 20 20 20 20  |  A,X,Y         |
000007e0  20 20 75 6e 64 65 66 69  6e 65 64 2e 0d 0d 0d 50  |  undefined....P|
000007f0  53 54 52 4e 47 0d 0d 50  53 54 52 4e 47 20 6f 75  |STRNG..PSTRNG ou|
00000800  74 70 75 74 73 20 61 20  73 74 72 69 6e 67 20 69  |tputs a string i|
00000810  6e 2d 6c 69 6e 65 20 77  69 74 68 20 74 68 65 20  |n-line with the |
00000820  63 6f 64 65 20 74 6f 20  74 68 65 20 56 44 55 2e  |code to the VDU.|
00000830  20 20 54 68 65 20 73 74  72 69 6e 67 20 6d 75 73  |  The string mus|
00000840  74 0d 62 65 20 64 65 6c  69 6d 69 74 65 64 20 77  |t.be delimited w|
00000850  69 74 68 20 61 20 6e 75  6c 6c 2c 20 7a 65 72 6f  |ith a null, zero|
00000860  20 62 79 74 65 2e 0d 0d  46 6f 72 20 65 78 61 6d  | byte...For exam|
00000870  70 6c 65 3a 20 20 20 20  4a 53 52 20 20 20 20 20  |ple:    JSR     |
00000880  20 20 20 50 53 54 52 4e  47 0d 20 20 20 20 20 20  |   PSTRNG.      |
00000890  20 20 20 20 20 20 20 20  20 20 45 51 55 53 20 20  |          EQUS  |
000008a0  20 20 20 20 20 22 54 68  69 73 20 77 69 6c 6c 20  |     "This will |
000008b0  62 65 20 6f 75 74 70 75  74 20 74 6f 20 74 68 65  |be output to the|
000008c0  20 56 44 55 22 0d 20 20  20 20 20 20 20 20 20 20  | VDU".          |
000008d0  20 20 20 20 20 20 45 51  55 42 20 20 20 20 20 20  |      EQUB      |
000008e0  20 30 0d 0d 4f 6e 20 65  6e 74 72 79 3a 20 20 20  | 0..On entry:   |
000008f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 49  |               I|
00000900  6d 6d 65 64 69 61 74 65  6c 79 20 66 6f 6c 6c 6f  |mmediately follo|
00000910  77 69 6e 67 20 74 68 65  20 4a 53 52 20 63 61 6c  |wing the JSR cal|
00000920  6c 2c 20 74 68 65 72 65  20 69 73 20 61 0d 20 20  |l, there is a.  |
00000930  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000940  20 20 20 20 20 20 20 20  20 73 74 72 69 6e 67 20  |         string |
00000950  64 65 6c 69 6d 69 74 65  64 20 77 69 74 68 20 61  |delimited with a|
00000960  20 6e 75 6c 6c 2e 20 20  54 68 65 20 73 74 72 69  | null.  The stri|
00000970  6e 67 20 6d 75 73 74 0d  20 20 20 20 20 20 20 20  |ng must.        |
00000980  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000990  20 20 20 6e 6f 74 20 62  65 20 6d 6f 72 65 20 74  |   not be more t|
000009a0  68 65 6e 20 32 35 36 20  63 68 61 72 61 63 74 65  |hen 256 characte|
000009b0  72 73 20 6c 6f 6e 67 2c  20 69 6e 63 6c 75 64 69  |rs long, includi|
000009c0  6e 67 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |ng.             |
000009d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 74 68  |              th|
000009e0  65 20 64 65 6c 69 6d 69  74 65 72 2e 0d 0d 4f 6e  |e delimiter...On|
000009f0  20 65 78 69 74 3a 20 20  20 20 20 20 20 20 41 2c  | exit:        A,|
00000a00  59 20 20 20 20 20 20 20  20 75 6e 64 65 66 69 6e  |Y        undefin|
00000a10  65 64 2e 0d 20 20 20 20  20 20 20 20 20 20 20 20  |ed..            |
00000a20  20 20 20 20 58 20 20 20  20 20 20 20 20 20 20 70  |    X          p|
00000a30  72 65 73 65 72 76 65 64  2e 0d 0d 0d 52 45 4c 4c  |reserved....RELL|
00000a40  49 4e 0d 0d 52 45 4c 4c  49 4e 20 72 65 61 64 73  |IN..RELLIN reads|
00000a50  20 61 20 6c 69 6e 65 20  6f 66 20 69 6e 70 75 74  | a line of input|
00000a60  2c 20 61 6e 64 20 70 75  74 73 20 69 74 20 69 6e  |, and puts it in|
00000a70  74 6f 20 4c 49 4e 42 55  46 2e 20 20 54 68 65 20  |to LINBUF.  The |
00000a80  69 6e 70 75 74 20 69 73  0d 74 65 72 6d 69 6e 61  |input is.termina|
00000a90  74 65 64 20 77 69 74 68  20 61 20 43 61 72 72 69  |ted with a Carri|
00000aa0  61 67 65 20 52 65 74 75  72 6e 20 6f 72 20 61 6e  |age Return or an|
00000ab0  20 45 53 43 41 50 45 2e  20 20 54 68 65 20 4f 53  | ESCAPE.  The OS|
00000ac0  57 4f 52 44 20 30 20 63  61 6c 6c 20 69 73 20 75  |WORD 0 call is u|
00000ad0  73 65 64 0d 74 6f 20 67  65 74 20 74 68 65 20 69  |sed.to get the i|
00000ae0  6e 70 75 74 2e 20 20 54  45 4d 50 30 36 20 69 73  |nput.  TEMP06 is|
00000af0  20 6c 65 66 74 20 70 6f  69 6e 74 69 6e 67 20 74  | left pointing t|
00000b00  6f 20 74 68 65 20 62 65  67 69 6e 6e 69 6e 67 20  |o the beginning |
00000b10  6f 66 20 4c 49 4e 42 55  46 2c 20 61 6e 64 20 59  |of LINBUF, and Y|
00000b20  0d 67 69 76 65 73 20 74  68 65 20 6f 66 66 73 65  |.gives the offse|
00000b30  74 20 74 6f 20 74 68 65  20 66 69 72 73 74 20 6e  |t to the first n|
00000b40  6f 6e 2d 73 70 61 63 65  20 63 68 61 72 61 63 74  |on-space charact|
00000b50  65 72 20 69 6e 20 4c 49  4e 42 55 46 2e 0d 0d 4f  |er in LINBUF...O|
00000b60  6e 20 65 6e 74 72 79 3a  20 20 20 20 20 20 20 20  |n entry:        |
00000b70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 4e  |               N|
00000b80  6f 20 65 6e 74 72 79 20  70 61 72 61 6d 65 74 65  |o entry paramete|
00000b90  72 73 2e 0d 0d 4f 6e 20  65 78 69 74 3a 20 20 20  |rs...On exit:   |
00000ba0  20 20 20 20 20 4c 49 4e  42 55 46 20 20 20 20 20  |     LINBUF     |
00000bb0  20 20 20 20 20 63 6f 6e  74 61 69 6e 73 20 74 68  |     contains th|
00000bc0  65 20 6c 69 6e 65 20 6f  66 20 69 6e 70 75 74 3b  |e line of input;|
00000bd0  20 6d 61 78 69 6d 75 6d  20 32 35 36 20 0d 20 20  | maximum 256 .  |
00000be0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000bf0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 63 68  |              ch|
00000c00  61 72 61 63 74 65 72 73  2e 0d 20 20 20 20 20 20  |aracters..      |
00000c10  20 20 20 20 20 20 20 20  20 20 54 45 4d 50 30 36  |          TEMP06|
00000c20  20 20 20 20 20 20 20 20  20 20 70 6f 69 6e 74 73  |          points|
00000c30  20 74 6f 20 4c 49 4e 42  55 46 2e 0d 20 20 20 20  | to LINBUF..    |
00000c40  20 20 20 20 20 20 20 20  20 20 20 20 43 4d 44 50  |            CMDP|
00000c50  41 52 20 20 20 20 20 20  20 20 20 20 67 69 76 65  |AR          give|
00000c60  73 20 6f 66 66 73 65 74  20 66 72 6f 6d 20 54 45  |s offset from TE|
00000c70  4d 50 30 36 20 74 6f 20  74 68 65 20 66 69 72 73  |MP06 to the firs|
00000c80  74 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |t.              |
00000c90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ca0  20 20 6e 6f 6e 2d 73 70  61 63 65 20 63 68 61 72  |  non-space char|
00000cb0  61 63 74 65 72 2e 0d 0d  20 20 20 20 20 20 20 20  |acter...        |
00000cc0  20 20 20 20 20 20 20 20  43 53 20 20 20 20 20 20  |        CS      |
00000cd0  20 20 20 20 20 20 20 20  45 53 43 41 50 45 20 74  |        ESCAPE t|
00000ce0  65 72 6d 69 6e 61 74 65  64 20 69 6e 70 75 74 2e  |erminated input.|
00000cf0  0d 0d 0d 0d 53 4b 50 43  42 4c 0d 0d 53 4b 50 43  |....SKPCBL..SKPC|
00000d00  42 4c 20 73 6b 69 70 73  20 73 70 61 63 65 73 20  |BL skips spaces |
00000d10  69 6e 20 61 20 6c 69 6e  65 20 6f 66 20 69 6e 70  |in a line of inp|
00000d20  75 74 2c 20 74 65 72 6d  69 6e 61 74 65 64 20 62  |ut, terminated b|
00000d30  79 20 61 20 43 61 72 72  69 61 67 65 20 52 65 74  |y a Carriage Ret|
00000d40  75 72 6e 2e 0d 0d 4f 6e  20 65 6e 74 72 79 3a 20  |urn...On entry: |
00000d50  20 20 20 20 20 20 54 45  4d 50 30 36 20 20 20 20  |      TEMP06    |
00000d60  20 20 20 20 20 20 70 6f  69 6e 74 73 20 74 6f 20  |      points to |
00000d70  62 65 67 69 6e 6e 69 6e  67 20 6f 66 20 69 6e 70  |beginning of inp|
00000d80  75 74 20 73 74 72 69 6e  67 2e 0d 20 20 20 20 20  |ut string..     |
00000d90  20 20 20 20 20 20 20 20  20 20 20 43 4d 44 50 41  |           CMDPA|
00000da0  52 20 20 20 20 20 20 20  20 20 20 67 69 76 65 73  |R          gives|
00000db0  20 6f 66 66 73 65 74 20  66 72 6f 6d 20 73 74 61  | offset from sta|
00000dc0  72 74 20 6f 66 20 73 74  72 69 6e 67 20 74 6f 20  |rt of string to |
00000dd0  73 74 61 72 74 0d 20 20  20 20 20 20 20 20 20 20  |start.          |
00000de0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000df0  20 20 20 20 20 20 73 6b  69 70 70 69 6e 67 20 73  |      skipping s|
00000e00  70 61 63 65 73 2e 0d 0d  4f 6e 20 65 78 69 74 3a  |paces...On exit:|
00000e10  20 20 20 20 20 20 20 20  43 4d 44 50 41 52 20 20  |        CMDPAR  |
00000e20  20 20 20 20 20 20 20 20  67 69 76 65 73 20 6f 66  |        gives of|
00000e30  66 73 65 74 20 74 6f 20  66 69 72 73 74 20 6e 6f  |fset to first no|
00000e40  6e 2d 73 70 61 63 65 20  63 68 61 72 61 63 74 65  |n-space characte|
00000e50  72 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |r.              |
00000e60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000e70  20 20 61 66 74 65 72 20  69 6e 69 74 69 61 6c 20  |  after initial |
00000e80  76 61 6c 75 65 2e 0d 20  20 20 20 20 20 20 20 20  |value..         |
00000e90  20 20 20 20 20 20 20 41  20 20 20 20 20 20 20 20  |       A        |
00000ea0  20 20 20 20 20 20 20 63  6f 6e 74 61 69 6e 73 20  |       contains |
00000eb0  66 69 72 73 74 20 6e 6f  6e 2d 73 70 61 63 65 20  |first non-space |
00000ec0  63 68 61 72 61 63 74 65  72 2e 0d 20 20 20 20 20  |character..     |
00000ed0  20 20 20 20 20 20 20 20  20 20 20 45 51 20 20 20  |           EQ   |
00000ee0  20 20 20 20 20 20 20 20  20 20 20 68 69 74 20 43  |           hit C|
00000ef0  52 20 61 74 20 65 6e 64  20 6f 66 20 6c 69 6e 65  |R at end of line|
00000f00  2c 20 62 65 66 6f 72 65  20 6e 6f 6e 2d 73 70 61  |, before non-spa|
00000f10  63 65 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |ce.             |
00000f20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000f30  20 20 20 63 68 61 72 61  63 74 65 72 20 77 61 73  |   character was|
00000f40  20 66 6f 75 6e 64 2e 0d  0d 0d 54 68 65 20 49 6e  | found....The In|
00000f50  64 65 78 20 53 79 73 74  65 6d 0d 0d 54 68 65 20  |dex System..The |
00000f60  56 69 65 77 53 74 6f 72  65 20 52 4f 4d 20 63 6f  |ViewStore ROM co|
00000f70  6e 74 61 69 6e 73 20 61  20 73 65 74 20 6f 66 20  |ntains a set of |
00000f80  72 6f 75 74 69 6e 65 73  20 66 6f 72 20 63 72 65  |routines for cre|
00000f90  61 74 69 6e 67 20 61 6e  64 20 6d 61 69 6e 74 61  |ating and mainta|
00000fa0  69 6e 69 6e 67 0d 69 6e  64 65 78 20 66 69 6c 65  |ining.index file|
00000fb0  73 2e 20 20 54 68 65 73  65 20 61 72 65 20 75 73  |s.  These are us|
00000fc0  65 64 20 69 6e 74 65 72  6e 61 6c 6c 79 20 62 79  |ed internally by|
00000fd0  20 63 6f 64 65 20 69 6e  20 74 68 65 20 52 4f 4d  | code in the ROM|
00000fe0  2c 20 61 6e 64 20 61 6c  73 6f 20 62 79 20 74 68  |, and also by th|
00000ff0  65 0d 49 4e 44 45 58 20  75 74 69 6c 69 74 79 2e  |e.INDEX utility.|
00001000  20 20 54 68 65 79 20 61  72 65 20 76 65 72 79 20  |  They are very |
00001010  70 6f 77 65 72 66 75 6c  20 61 6e 64 20 63 6f 75  |powerful and cou|
00001020  6c 64 20 62 65 20 75 73  65 64 20 62 79 20 65 78  |ld be used by ex|
00001030  74 72 61 20 75 74 69 6c  69 74 69 65 73 0d 74 6f  |tra utilities.to|
00001040  20 67 72 65 61 74 20 65  66 66 65 63 74 2e 0d 0d  | great effect...|
00001050  59 6f 75 20 77 69 6c 6c  20 62 65 20 66 61 6d 69  |You will be fami|
00001060  6c 69 61 72 20 77 69 74  68 20 74 68 65 20 77 61  |liar with the wa|
00001070  79 20 74 68 65 20 56 69  65 77 53 74 6f 72 65 20  |y the ViewStore |
00001080  69 74 73 65 6c 66 20 75  73 65 73 20 74 68 65 20  |itself uses the |
00001090  69 6e 64 65 78 0d 73 79  73 74 65 6d 2e 20 20 41  |index.system.  A|
000010a0  20 75 74 69 6c 69 74 79  20 63 6f 75 6c 64 20 75  | utility could u|
000010b0  73 65 20 69 6e 64 65 78  65 73 20 73 69 64 65 20  |se indexes side |
000010c0  62 79 20 73 69 64 65 20  77 69 74 68 20 74 68 65  |by side with the|
000010d0  20 52 4f 4d 2c 20 6f 72  20 69 74 20 63 6f 75 6c  | ROM, or it coul|
000010e0  64 0d 62 75 69 6c 64 20  61 6e 64 20 6d 61 69 6e  |d.build and main|
000010f0  74 61 69 6e 20 69 6e 64  65 78 65 73 20 66 6f 72  |tain indexes for|
00001100  20 69 74 73 20 6f 77 6e  20 70 75 72 70 6f 73 65  | its own purpose|
00001110  2e 0d 0d 49 6e 20 61 20  56 69 65 77 53 74 6f 72  |...In a ViewStor|
00001120  65 20 69 6e 64 65 78 20  66 69 6c 65 2c 20 79 6f  |e index file, yo|
00001130  75 20 63 61 6e 20 73 74  6f 72 65 20 61 20 22 6b  |u can store a "k|
00001140  65 79 22 2c 20 61 6e 64  20 61 73 73 6f 63 69 61  |ey", and associa|
00001150  74 65 20 77 69 74 68 20  74 68 65 20 6b 65 79 0d  |te with the key.|
00001160  61 20 70 6f 69 6e 74 65  72 20 76 61 6c 75 65 2c  |a pointer value,|
00001170  20 34 20 62 79 74 65 73  20 69 6e 20 73 69 7a 65  | 4 bytes in size|
00001180  2e 20 20 54 68 65 79 20  6b 65 79 20 63 61 6e 20  |.  They key can |
00001190  62 65 20 61 6e 79 20 73  74 72 69 6e 67 20 6f 66  |be any string of|
000011a0  20 41 53 43 49 49 0d 63  68 61 72 61 63 74 65 72  | ASCII.character|
000011b0  73 2c 20 61 6e 64 20 74  68 65 20 70 6f 69 6e 74  |s, and the point|
000011c0  65 72 20 76 61 6c 75 65  20 61 6e 79 20 66 6f 75  |er value any fou|
000011d0  72 20 62 79 74 65 20 69  6e 74 65 67 65 72 2c 20  |r byte integer, |
000011e0  62 75 74 20 75 73 75 61  6c 6c 79 20 74 68 65 0d  |but usually the.|
000011f0  70 6f 69 6e 74 65 72 20  76 61 6c 75 65 20 69 73  |pointer value is|
00001200  20 75 73 65 64 20 74 6f  20 72 65 6d 65 6d 62 65  | used to remembe|
00001210  72 20 61 20 72 65 63 6f  72 64 20 66 69 6c 65 20  |r a record file |
00001220  61 64 64 72 65 73 73 2e  20 0d 0d 54 68 65 20 63  |address. ..The c|
00001230  68 61 72 61 63 74 65 72  73 20 74 68 61 74 20 6d  |haracters that m|
00001240  61 6b 65 20 75 70 20 61  6e 20 69 6e 64 65 78 20  |ake up an index |
00001250  6b 65 79 20 6d 75 73 74  20 62 65 20 62 65 74 77  |key must be betw|
00001260  65 65 6e 20 74 68 65 20  76 61 6c 75 65 73 20 33  |een the values 3|
00001270  32 20 61 6e 64 0d 32 35  34 2c 20 69 6e 63 6c 75  |2 and.254, inclu|
00001280  73 69 76 65 2e 20 20 53  69 6e 63 65 20 74 68 65  |sive.  Since the|
00001290  20 61 6c 70 68 61 62 65  74 69 63 61 6c 20 76 61  | alphabetical va|
000012a0  6c 75 65 20 6f 66 20 6e  75 6d 62 65 72 73 20 61  |lue of numbers a|
000012b0  6e 64 20 64 61 74 65 73  20 69 73 20 6e 6f 74 0d  |nd dates is not.|
000012c0  74 68 65 20 73 61 6d 65  20 61 73 20 74 68 65 20  |the same as the |
000012d0  76 61 6c 75 65 20 77 65  20 67 65 6e 65 72 61 6c  |value we general|
000012e0  6c 79 20 77 69 73 68 20  74 68 65 73 65 20 64 61  |ly wish these da|
000012f0  74 61 20 74 79 70 65 73  20 74 6f 20 68 61 76 65  |ta types to have|
00001300  20 28 74 68 61 74 20 69  73 0d 6e 75 6d 62 65 72  | (that is.number|
00001310  73 20 69 6e 20 6e 75 6d  65 72 69 63 61 6c 20 6f  |s in numerical o|
00001320  72 64 65 72 2c 20 61 6e  64 20 64 61 74 65 73 20  |rder, and dates |
00001330  69 6e 20 61 67 65 20 6f  72 64 65 72 29 2c 20 74  |in age order), t|
00001340  68 65 20 41 53 43 49 49  20 6e 75 6d 62 65 72 20  |he ASCII number |
00001350  61 6e 64 0d 64 61 74 65  20 66 69 65 6c 64 73 20  |and.date fields |
00001360  61 73 20 74 68 65 79 20  61 72 65 20 73 74 6f 72  |as they are stor|
00001370  65 64 20 69 6e 20 56 69  65 77 53 74 6f 72 65 20  |ed in ViewStore |
00001380  64 61 74 61 20 66 69 6c  65 73 20 6d 75 73 74 20  |data files must |
00001390  62 65 20 63 6f 6e 76 65  72 74 65 64 0d 69 6e 74  |be converted.int|
000013a0  6f 20 61 6e 6f 74 68 65  72 20 66 6f 72 6d 20 62  |o another form b|
000013b0  65 66 6f 72 65 20 62 65  69 6e 67 20 73 65 6e 74  |efore being sent|
000013c0  20 74 6f 20 74 68 65 20  69 6e 64 65 78 20 73 79  | to the index sy|
000013d0  73 74 65 6d 2e 20 20 41  20 72 6f 75 74 69 6e 65  |stem.  A routine|
000013e0  2c 20 41 44 4a 56 41 4c  2c 0d 69 73 20 70 72 6f  |, ADJVAL,.is pro|
000013f0  76 69 64 65 64 20 74 6f  20 64 6f 20 74 68 69 73  |vided to do this|
00001400  2e 20 20 52 65 6d 65 6d  62 65 72 2c 20 69 66 20  |.  Remember, if |
00001410  79 6f 75 20 61 72 65 20  62 75 69 6c 64 69 6e 67  |you are building|
00001420  20 6f 72 20 61 6c 74 65  72 69 6e 67 20 61 6e 20  | or altering an |
00001430  69 6e 64 65 78 0d 66 69  6c 65 2c 20 74 6f 20 75  |index.file, to u|
00001440  73 65 20 74 68 65 20 41  44 4a 56 41 4c 20 72 6f  |se the ADJVAL ro|
00001450  75 74 69 6e 65 20 6f 6e  20 74 68 65 20 6b 65 79  |utine on the key|
00001460  2e 0d 0d 54 68 65 20 69  6e 64 65 78 20 73 79 73  |...The index sys|
00001470  74 65 6d 20 75 73 65 73  20 61 20 74 65 63 68 6e  |tem uses a techn|
00001480  69 71 75 65 20 61 6b 69  6e 20 74 6f 20 74 68 61  |ique akin to tha|
00001490  74 20 6f 66 20 49 42 4d  27 73 20 49 53 41 4d 20  |t of IBM's ISAM |
000014a0  28 69 6e 64 65 78 65 64  0d 73 65 71 75 65 6e 74  |(indexed.sequent|
000014b0  69 61 6c 20 61 63 63 65  73 73 20 6d 65 74 68 6f  |ial access metho|
000014c0  64 29 20 61 6e 64 20 56  53 41 4d 20 28 76 69 72  |d) and VSAM (vir|
000014d0  74 75 61 6c 20 73 65 71  75 65 6e 74 69 61 6c 20  |tual sequential |
000014e0  61 63 63 65 73 73 20 6d  65 74 68 6f 64 29 0d 73  |access method).s|
000014f0  79 73 74 65 6d 73 2e 0d  0d                       |ystems...|
000014f9
F/+HINT13.m0
F/+HINT13.m1
F/+HINT13.m2
F/+HINT13.m4
F/+HINT13.m5