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

F/+HINT12

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/+HINT12
Read OK:
File size: 14C6 bytes
Load address: 48204556
Exec address: 38544E49
File contents
XOSBGE

XOSBGE is equivalent to OSBGET, except that ViewStore error handling is
enabled.

On entry:                       See filing system manual for OSBGET.

On exit:        VS              error occurred; error code in A.
                VC              no error; see filing system manual for
                                results.


XOSBPU

XOSBPU is equivalent to OSBPUT, except that ViewStore error handling is
enabled.

On entry:                       see filing system manual for OSBPUT.

On exit:        VS              error occurred; error code in A.
                VC              no error; see filing system manual for
                                results.


XOSCLS

XOSCLS is equivalent to OSFIND with A=0, in order to close a file. 
ViewStore error trapping is also enabled.

On entry:       Y       contains handle of file to be closed.

On exit:        VS      error occurred; error code in A.
                VC      file closed successfully.
                X,Y     undefined.


XOSGBP

XOSGBP is equivalent to OSGBPB, except that ViewStore error handling is
enabled.

On entry:                       See filing system manual for OSGBPB.

On exit:        VS              error occurred; error code in A. 
                VC              no error; see filing system manual for 
                                results.                                


CALUTI

CALUTI is provided to allow utilities to call other programs stored in
utility file format.  The SELECT utility, which is provided with ViewStore,
uses this call to call the SORT program when it is required.  Parameters can
be passed between the programs using temporaries, or other memory space. 
The CALUTI call can be thought of as the logical equivalent of the Basic
CHAIN statement. The utility should exit under the prefix given for
utilities; CALUTI applies the utility prefix to the name given
automatically.  If the utility is not found, the "Insert utility disc and
hit a key" message will be generated, and ViewStore will wait until a key is
pressed before continuing.

On entry:       A               contains low byte of address of name of 
                                utility to be loaded.  Name must be
                                terminated by Carriage Return.
                Y               contains high byte of address of name of 
                                utility to be loaded.
                TEMP14          contains the address of the first byte of
                                free memory that the utility being loaded is
                                to use.  This will normally be the same
                                value as passed to the initial utility.

On exit:        VS              error occurred; error code in A.  Otherwise, 
                                control is passed to the new utility.


Floating Point

Unfortunately, a discussion of floating point is outside the scope of this
document.  However, certain of the key routines in a floating point package
are in the ROM itself, and entry points to these routines are provided.  
The REPORT utility which is provided with ViewStore uses these routines, and
implements many more inside itself.  The routine most obviously missing from
this set is a routine to output a floating point number in ASCII.  If you
wish to do this, you will have to work out how to do it yourself.

I can refer you to the "Advanced Basic Rom User Guide", published by the
"Cambridge Microcomputer Centre", which contains useful information about
the floating point package in Basic, and how it works.  The floating point
in ViewStore works in the same way.

Remember that there is no need to understand floating point to write a
utility, since the date in ViewStore files is stored in ASCII format, not as
floating point numbers.  Use of floating is only necessary when you wish
your utility to provide floating point arithmetic.

The two accumulators, FWRK and FACC are in zero page.  If you are not using
the floating point package in your utility, you can use the zero page
allocated to the accumulators for your own purposes.


        FONE         Sets FACC to value of one.
        FTENFX       Multiplies FACC by 10 (not normalised).
        FTENGQ       Divides FACC by 10 (not normalised).
        FADDWI       Adds FACC and FWRK; answer in FACC, not rounded.
        FTENX        Multiplies mantissa by 10.
        FRDDK        Reads in ASCII number to FACC.  Low byte of address of
                     string in A; high byte of address of string in Y.
        FTST         Tests number of FACC and sets flags.
        FNEG         Swaps sign of number in FACC.
        FCLR         Sets FACC to zero.
        FADDW        Adds FACC and FWRK; answer in FACC, rounded.
        FDIVA        Divides FACC by FWRK; answer in FACC.
        FMULX        Multiples FACC by FWRK; answer in FACC. 


General

These routines are an assortment of useful subroutines for which entry
points are provided.

        GETDEC       Get a decimal number.
        KINCH        Flush keyboard buffer, and get an input character.
        MULPLY       Multiply two single byte integers.
        OUTDEC       Output a decimal number.
        PSTRNG       Output a string.
        RELLIN       Read a line of input.
        SKPCBL       Skip blanks.

00000000  58 4f 53 42 47 45 0d 0d  58 4f 53 42 47 45 20 69  |XOSBGE..XOSBGE i|
00000010  73 20 65 71 75 69 76 61  6c 65 6e 74 20 74 6f 20  |s equivalent to |
00000020  4f 53 42 47 45 54 2c 20  65 78 63 65 70 74 20 74  |OSBGET, except t|
00000030  68 61 74 20 56 69 65 77  53 74 6f 72 65 20 65 72  |hat ViewStore er|
00000040  72 6f 72 20 68 61 6e 64  6c 69 6e 67 20 69 73 0d  |ror handling is.|
00000050  65 6e 61 62 6c 65 64 2e  0d 0d 4f 6e 20 65 6e 74  |enabled...On ent|
00000060  72 79 3a 20 20 20 20 20  20 20 20 20 20 20 20 20  |ry:             |
00000070  20 20 20 20 20 20 20 20  20 20 53 65 65 20 66 69  |          See fi|
00000080  6c 69 6e 67 20 73 79 73  74 65 6d 20 6d 61 6e 75  |ling system manu|
00000090  61 6c 20 66 6f 72 20 4f  53 42 47 45 54 2e 0d 0d  |al for OSBGET...|
000000a0  4f 6e 20 65 78 69 74 3a  20 20 20 20 20 20 20 20  |On exit:        |
000000b0  56 53 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |VS              |
000000c0  65 72 72 6f 72 20 6f 63  63 75 72 72 65 64 3b 20  |error occurred; |
000000d0  65 72 72 6f 72 20 63 6f  64 65 20 69 6e 20 41 2e  |error code in A.|
000000e0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
000000f0  20 56 43 20 20 20 20 20  20 20 20 20 20 20 20 20  | VC             |
00000100  20 6e 6f 20 65 72 72 6f  72 3b 20 73 65 65 20 66  | no error; see f|
00000110  69 6c 69 6e 67 20 73 79  73 74 65 6d 20 6d 61 6e  |iling system man|
00000120  75 61 6c 20 66 6f 72 0d  20 20 20 20 20 20 20 20  |ual for.        |
00000130  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000140  20 20 20 20 20 20 20 20  72 65 73 75 6c 74 73 2e  |        results.|
00000150  0d 0d 0d 58 4f 53 42 50  55 0d 0d 58 4f 53 42 50  |...XOSBPU..XOSBP|
00000160  55 20 69 73 20 65 71 75  69 76 61 6c 65 6e 74 20  |U is equivalent |
00000170  74 6f 20 4f 53 42 50 55  54 2c 20 65 78 63 65 70  |to OSBPUT, excep|
00000180  74 20 74 68 61 74 20 56  69 65 77 53 74 6f 72 65  |t that ViewStore|
00000190  20 65 72 72 6f 72 20 68  61 6e 64 6c 69 6e 67 20  | error handling |
000001a0  69 73 0d 65 6e 61 62 6c  65 64 2e 0d 0d 4f 6e 20  |is.enabled...On |
000001b0  65 6e 74 72 79 3a 20 20  20 20 20 20 20 20 20 20  |entry:          |
000001c0  20 20 20 20 20 20 20 20  20 20 20 20 20 73 65 65  |             see|
000001d0  20 66 69 6c 69 6e 67 20  73 79 73 74 65 6d 20 6d  | filing system m|
000001e0  61 6e 75 61 6c 20 66 6f  72 20 4f 53 42 50 55 54  |anual for OSBPUT|
000001f0  2e 0d 0d 4f 6e 20 65 78  69 74 3a 20 20 20 20 20  |...On exit:     |
00000200  20 20 20 56 53 20 20 20  20 20 20 20 20 20 20 20  |   VS           |
00000210  20 20 20 65 72 72 6f 72  20 6f 63 63 75 72 72 65  |   error occurre|
00000220  64 3b 20 65 72 72 6f 72  20 63 6f 64 65 20 69 6e  |d; error code in|
00000230  20 41 2e 0d 20 20 20 20  20 20 20 20 20 20 20 20  | A..            |
00000240  20 20 20 20 56 43 20 20  20 20 20 20 20 20 20 20  |    VC          |
00000250  20 20 20 20 6e 6f 20 65  72 72 6f 72 3b 20 73 65  |    no error; se|
00000260  65 20 66 69 6c 69 6e 67  20 73 79 73 74 65 6d 20  |e filing system |
00000270  6d 61 6e 75 61 6c 20 66  6f 72 0d 20 20 20 20 20  |manual for.     |
00000280  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000290  20 20 20 20 20 20 20 20  20 20 20 72 65 73 75 6c  |           resul|
000002a0  74 73 2e 0d 0d 0d 58 4f  53 43 4c 53 0d 0d 58 4f  |ts....XOSCLS..XO|
000002b0  53 43 4c 53 20 69 73 20  65 71 75 69 76 61 6c 65  |SCLS is equivale|
000002c0  6e 74 20 74 6f 20 4f 53  46 49 4e 44 20 77 69 74  |nt to OSFIND wit|
000002d0  68 20 41 3d 30 2c 20 69  6e 20 6f 72 64 65 72 20  |h A=0, in order |
000002e0  74 6f 20 63 6c 6f 73 65  20 61 20 66 69 6c 65 2e  |to close a file.|
000002f0  20 0d 56 69 65 77 53 74  6f 72 65 20 65 72 72 6f  | .ViewStore erro|
00000300  72 20 74 72 61 70 70 69  6e 67 20 69 73 20 61 6c  |r trapping is al|
00000310  73 6f 20 65 6e 61 62 6c  65 64 2e 0d 0d 4f 6e 20  |so enabled...On |
00000320  65 6e 74 72 79 3a 20 20  20 20 20 20 20 59 20 20  |entry:       Y  |
00000330  20 20 20 20 20 63 6f 6e  74 61 69 6e 73 20 68 61  |     contains ha|
00000340  6e 64 6c 65 20 6f 66 20  66 69 6c 65 20 74 6f 20  |ndle of file to |
00000350  62 65 20 63 6c 6f 73 65  64 2e 0d 0d 4f 6e 20 65  |be closed...On e|
00000360  78 69 74 3a 20 20 20 20  20 20 20 20 56 53 20 20  |xit:        VS  |
00000370  20 20 20 20 65 72 72 6f  72 20 6f 63 63 75 72 72  |    error occurr|
00000380  65 64 3b 20 65 72 72 6f  72 20 63 6f 64 65 20 69  |ed; error code i|
00000390  6e 20 41 2e 0d 20 20 20  20 20 20 20 20 20 20 20  |n A..           |
000003a0  20 20 20 20 20 56 43 20  20 20 20 20 20 66 69 6c  |     VC      fil|
000003b0  65 20 63 6c 6f 73 65 64  20 73 75 63 63 65 73 73  |e closed success|
000003c0  66 75 6c 6c 79 2e 0d 20  20 20 20 20 20 20 20 20  |fully..         |
000003d0  20 20 20 20 20 20 20 58  2c 59 20 20 20 20 20 75  |       X,Y     u|
000003e0  6e 64 65 66 69 6e 65 64  2e 0d 0d 0d 58 4f 53 47  |ndefined....XOSG|
000003f0  42 50 0d 0d 58 4f 53 47  42 50 20 69 73 20 65 71  |BP..XOSGBP is eq|
00000400  75 69 76 61 6c 65 6e 74  20 74 6f 20 4f 53 47 42  |uivalent to OSGB|
00000410  50 42 2c 20 65 78 63 65  70 74 20 74 68 61 74 20  |PB, except that |
00000420  56 69 65 77 53 74 6f 72  65 20 65 72 72 6f 72 20  |ViewStore error |
00000430  68 61 6e 64 6c 69 6e 67  20 69 73 0d 65 6e 61 62  |handling is.enab|
00000440  6c 65 64 2e 0d 0d 4f 6e  20 65 6e 74 72 79 3a 20  |led...On entry: |
00000450  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000460  20 20 20 20 20 20 53 65  65 20 66 69 6c 69 6e 67  |      See filing|
00000470  20 73 79 73 74 65 6d 20  6d 61 6e 75 61 6c 20 66  | system manual f|
00000480  6f 72 20 4f 53 47 42 50  42 2e 0d 0d 4f 6e 20 65  |or OSGBPB...On e|
00000490  78 69 74 3a 20 20 20 20  20 20 20 20 56 53 20 20  |xit:        VS  |
000004a0  20 20 20 20 20 20 20 20  20 20 20 20 65 72 72 6f  |            erro|
000004b0  72 20 6f 63 63 75 72 72  65 64 3b 20 65 72 72 6f  |r occurred; erro|
000004c0  72 20 63 6f 64 65 20 69  6e 20 41 2e 20 0d 20 20  |r code in A. .  |
000004d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 56 43  |              VC|
000004e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 6e 6f  |              no|
000004f0  20 65 72 72 6f 72 3b 20  73 65 65 20 66 69 6c 69  | error; see fili|
00000500  6e 67 20 73 79 73 74 65  6d 20 6d 61 6e 75 61 6c  |ng system manual|
00000510  20 66 6f 72 20 0d 20 20  20 20 20 20 20 20 20 20  | for .          |
00000520  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000530  20 20 20 20 20 20 72 65  73 75 6c 74 73 2e 20 20  |      results.  |
00000540  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000550  20 20 20 20 20 20 20 20  20 20 20 20 20 20 0d 0d  |              ..|
00000560  0d 43 41 4c 55 54 49 0d  0d 43 41 4c 55 54 49 20  |.CALUTI..CALUTI |
00000570  69 73 20 70 72 6f 76 69  64 65 64 20 74 6f 20 61  |is provided to a|
00000580  6c 6c 6f 77 20 75 74 69  6c 69 74 69 65 73 20 74  |llow utilities t|
00000590  6f 20 63 61 6c 6c 20 6f  74 68 65 72 20 70 72 6f  |o call other pro|
000005a0  67 72 61 6d 73 20 73 74  6f 72 65 64 20 69 6e 0d  |grams stored in.|
000005b0  75 74 69 6c 69 74 79 20  66 69 6c 65 20 66 6f 72  |utility file for|
000005c0  6d 61 74 2e 20 20 54 68  65 20 53 45 4c 45 43 54  |mat.  The SELECT|
000005d0  20 75 74 69 6c 69 74 79  2c 20 77 68 69 63 68 20  | utility, which |
000005e0  69 73 20 70 72 6f 76 69  64 65 64 20 77 69 74 68  |is provided with|
000005f0  20 56 69 65 77 53 74 6f  72 65 2c 0d 75 73 65 73  | ViewStore,.uses|
00000600  20 74 68 69 73 20 63 61  6c 6c 20 74 6f 20 63 61  | this call to ca|
00000610  6c 6c 20 74 68 65 20 53  4f 52 54 20 70 72 6f 67  |ll the SORT prog|
00000620  72 61 6d 20 77 68 65 6e  20 69 74 20 69 73 20 72  |ram when it is r|
00000630  65 71 75 69 72 65 64 2e  20 20 50 61 72 61 6d 65  |equired.  Parame|
00000640  74 65 72 73 20 63 61 6e  0d 62 65 20 70 61 73 73  |ters can.be pass|
00000650  65 64 20 62 65 74 77 65  65 6e 20 74 68 65 20 70  |ed between the p|
00000660  72 6f 67 72 61 6d 73 20  75 73 69 6e 67 20 74 65  |rograms using te|
00000670  6d 70 6f 72 61 72 69 65  73 2c 20 6f 72 20 6f 74  |mporaries, or ot|
00000680  68 65 72 20 6d 65 6d 6f  72 79 20 73 70 61 63 65  |her memory space|
00000690  2e 20 0d 54 68 65 20 43  41 4c 55 54 49 20 63 61  |. .The CALUTI ca|
000006a0  6c 6c 20 63 61 6e 20 62  65 20 74 68 6f 75 67 68  |ll can be though|
000006b0  74 20 6f 66 20 61 73 20  74 68 65 20 6c 6f 67 69  |t of as the logi|
000006c0  63 61 6c 20 65 71 75 69  76 61 6c 65 6e 74 20 6f  |cal equivalent o|
000006d0  66 20 74 68 65 20 42 61  73 69 63 0d 43 48 41 49  |f the Basic.CHAI|
000006e0  4e 20 73 74 61 74 65 6d  65 6e 74 2e 20 54 68 65  |N statement. The|
000006f0  20 75 74 69 6c 69 74 79  20 73 68 6f 75 6c 64 20  | utility should |
00000700  65 78 69 74 20 75 6e 64  65 72 20 74 68 65 20 70  |exit under the p|
00000710  72 65 66 69 78 20 67 69  76 65 6e 20 66 6f 72 0d  |refix given for.|
00000720  75 74 69 6c 69 74 69 65  73 3b 20 43 41 4c 55 54  |utilities; CALUT|
00000730  49 20 61 70 70 6c 69 65  73 20 74 68 65 20 75 74  |I applies the ut|
00000740  69 6c 69 74 79 20 70 72  65 66 69 78 20 74 6f 20  |ility prefix to |
00000750  74 68 65 20 6e 61 6d 65  20 67 69 76 65 6e 0d 61  |the name given.a|
00000760  75 74 6f 6d 61 74 69 63  61 6c 6c 79 2e 20 20 49  |utomatically.  I|
00000770  66 20 74 68 65 20 75 74  69 6c 69 74 79 20 69 73  |f the utility is|
00000780  20 6e 6f 74 20 66 6f 75  6e 64 2c 20 74 68 65 20  | not found, the |
00000790  22 49 6e 73 65 72 74 20  75 74 69 6c 69 74 79 20  |"Insert utility |
000007a0  64 69 73 63 20 61 6e 64  0d 68 69 74 20 61 20 6b  |disc and.hit a k|
000007b0  65 79 22 20 6d 65 73 73  61 67 65 20 77 69 6c 6c  |ey" message will|
000007c0  20 62 65 20 67 65 6e 65  72 61 74 65 64 2c 20 61  | be generated, a|
000007d0  6e 64 20 56 69 65 77 53  74 6f 72 65 20 77 69 6c  |nd ViewStore wil|
000007e0  6c 20 77 61 69 74 20 75  6e 74 69 6c 20 61 20 6b  |l wait until a k|
000007f0  65 79 20 69 73 0d 70 72  65 73 73 65 64 20 62 65  |ey is.pressed be|
00000800  66 6f 72 65 20 63 6f 6e  74 69 6e 75 69 6e 67 2e  |fore continuing.|
00000810  0d 0d 4f 6e 20 65 6e 74  72 79 3a 20 20 20 20 20  |..On entry:     |
00000820  20 20 41 20 20 20 20 20  20 20 20 20 20 20 20 20  |  A             |
00000830  20 20 63 6f 6e 74 61 69  6e 73 20 6c 6f 77 20 62  |  contains low b|
00000840  79 74 65 20 6f 66 20 61  64 64 72 65 73 73 20 6f  |yte of address o|
00000850  66 20 6e 61 6d 65 20 6f  66 20 0d 20 20 20 20 20  |f name of .     |
00000860  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000870  20 20 20 20 20 20 20 20  20 20 20 75 74 69 6c 69  |           utili|
00000880  74 79 20 74 6f 20 62 65  20 6c 6f 61 64 65 64 2e  |ty to be loaded.|
00000890  20 20 4e 61 6d 65 20 6d  75 73 74 20 62 65 0d 20  |  Name must be. |
000008a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000008b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 74  |               t|
000008c0  65 72 6d 69 6e 61 74 65  64 20 62 79 20 43 61 72  |erminated by Car|
000008d0  72 69 61 67 65 20 52 65  74 75 72 6e 2e 0d 20 20  |riage Return..  |
000008e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 59 20  |              Y |
000008f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 63 6f  |              co|
00000900  6e 74 61 69 6e 73 20 68  69 67 68 20 62 79 74 65  |ntains high byte|
00000910  20 6f 66 20 61 64 64 72  65 73 73 20 6f 66 20 6e  | of address of n|
00000920  61 6d 65 20 6f 66 20 0d  20 20 20 20 20 20 20 20  |ame of .        |
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  75 74 69 6c 69 74 79 20  |        utility |
00000950  74 6f 20 62 65 20 6c 6f  61 64 65 64 2e 0d 20 20  |to be loaded..  |
00000960  20 20 20 20 20 20 20 20  20 20 20 20 20 20 54 45  |              TE|
00000970  4d 50 31 34 20 20 20 20  20 20 20 20 20 20 63 6f  |MP14          co|
00000980  6e 74 61 69 6e 73 20 74  68 65 20 61 64 64 72 65  |ntains the addre|
00000990  73 73 20 6f 66 20 74 68  65 20 66 69 72 73 74 20  |ss of the first |
000009a0  62 79 74 65 20 6f 66 0d  20 20 20 20 20 20 20 20  |byte of.        |
000009b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000009c0  20 20 20 20 20 20 20 20  66 72 65 65 20 6d 65 6d  |        free mem|
000009d0  6f 72 79 20 74 68 61 74  20 74 68 65 20 75 74 69  |ory that the uti|
000009e0  6c 69 74 79 20 62 65 69  6e 67 20 6c 6f 61 64 65  |lity being loade|
000009f0  64 20 69 73 0d 20 20 20  20 20 20 20 20 20 20 20  |d is.           |
00000a00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a10  20 20 20 20 20 74 6f 20  75 73 65 2e 20 20 54 68  |     to use.  Th|
00000a20  69 73 20 77 69 6c 6c 20  6e 6f 72 6d 61 6c 6c 79  |is will normally|
00000a30  20 62 65 20 74 68 65 20  73 61 6d 65 0d 20 20 20  | be the same.   |
00000a40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a50  20 20 20 20 20 20 20 20  20 20 20 20 20 76 61 6c  |             val|
00000a60  75 65 20 61 73 20 70 61  73 73 65 64 20 74 6f 20  |ue as passed to |
00000a70  74 68 65 20 69 6e 69 74  69 61 6c 20 75 74 69 6c  |the initial util|
00000a80  69 74 79 2e 0d 0d 4f 6e  20 65 78 69 74 3a 20 20  |ity...On exit:  |
00000a90  20 20 20 20 20 20 56 53  20 20 20 20 20 20 20 20  |      VS        |
00000aa0  20 20 20 20 20 20 65 72  72 6f 72 20 6f 63 63 75  |      error occu|
00000ab0  72 72 65 64 3b 20 65 72  72 6f 72 20 63 6f 64 65  |rred; error code|
00000ac0  20 69 6e 20 41 2e 20 20  4f 74 68 65 72 77 69 73  | in A.  Otherwis|
00000ad0  65 2c 20 0d 20 20 20 20  20 20 20 20 20 20 20 20  |e, .            |
00000ae0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000af0  20 20 20 20 63 6f 6e 74  72 6f 6c 20 69 73 20 70  |    control is p|
00000b00  61 73 73 65 64 20 74 6f  20 74 68 65 20 6e 65 77  |assed to the new|
00000b10  20 75 74 69 6c 69 74 79  2e 0d 0d 0d 46 6c 6f 61  | utility....Floa|
00000b20  74 69 6e 67 20 50 6f 69  6e 74 0d 0d 55 6e 66 6f  |ting Point..Unfo|
00000b30  72 74 75 6e 61 74 65 6c  79 2c 20 61 20 64 69 73  |rtunately, a dis|
00000b40  63 75 73 73 69 6f 6e 20  6f 66 20 66 6c 6f 61 74  |cussion of float|
00000b50  69 6e 67 20 70 6f 69 6e  74 20 69 73 20 6f 75 74  |ing point is out|
00000b60  73 69 64 65 20 74 68 65  20 73 63 6f 70 65 20 6f  |side the scope o|
00000b70  66 20 74 68 69 73 0d 64  6f 63 75 6d 65 6e 74 2e  |f this.document.|
00000b80  20 20 48 6f 77 65 76 65  72 2c 20 63 65 72 74 61  |  However, certa|
00000b90  69 6e 20 6f 66 20 74 68  65 20 6b 65 79 20 72 6f  |in of the key ro|
00000ba0  75 74 69 6e 65 73 20 69  6e 20 61 20 66 6c 6f 61  |utines in a floa|
00000bb0  74 69 6e 67 20 70 6f 69  6e 74 20 70 61 63 6b 61  |ting point packa|
00000bc0  67 65 0d 61 72 65 20 69  6e 20 74 68 65 20 52 4f  |ge.are in the RO|
00000bd0  4d 20 69 74 73 65 6c 66  2c 20 61 6e 64 20 65 6e  |M itself, and en|
00000be0  74 72 79 20 70 6f 69 6e  74 73 20 74 6f 20 74 68  |try points to th|
00000bf0  65 73 65 20 72 6f 75 74  69 6e 65 73 20 61 72 65  |ese routines are|
00000c00  20 70 72 6f 76 69 64 65  64 2e 20 20 0d 54 68 65  | provided.  .The|
00000c10  20 52 45 50 4f 52 54 20  75 74 69 6c 69 74 79 20  | REPORT utility |
00000c20  77 68 69 63 68 20 69 73  20 70 72 6f 76 69 64 65  |which is provide|
00000c30  64 20 77 69 74 68 20 56  69 65 77 53 74 6f 72 65  |d with ViewStore|
00000c40  20 75 73 65 73 20 74 68  65 73 65 20 72 6f 75 74  | uses these rout|
00000c50  69 6e 65 73 2c 20 61 6e  64 0d 69 6d 70 6c 65 6d  |ines, and.implem|
00000c60  65 6e 74 73 20 6d 61 6e  79 20 6d 6f 72 65 20 69  |ents many more i|
00000c70  6e 73 69 64 65 20 69 74  73 65 6c 66 2e 20 20 54  |nside itself.  T|
00000c80  68 65 20 72 6f 75 74 69  6e 65 20 6d 6f 73 74 20  |he routine most |
00000c90  6f 62 76 69 6f 75 73 6c  79 20 6d 69 73 73 69 6e  |obviously missin|
00000ca0  67 20 66 72 6f 6d 0d 74  68 69 73 20 73 65 74 20  |g from.this set |
00000cb0  69 73 20 61 20 72 6f 75  74 69 6e 65 20 74 6f 20  |is a routine to |
00000cc0  6f 75 74 70 75 74 20 61  20 66 6c 6f 61 74 69 6e  |output a floatin|
00000cd0  67 20 70 6f 69 6e 74 20  6e 75 6d 62 65 72 20 69  |g point number i|
00000ce0  6e 20 41 53 43 49 49 2e  20 20 49 66 20 79 6f 75  |n ASCII.  If you|
00000cf0  0d 77 69 73 68 20 74 6f  20 64 6f 20 74 68 69 73  |.wish to do this|
00000d00  2c 20 79 6f 75 20 77 69  6c 6c 20 68 61 76 65 20  |, you will have |
00000d10  74 6f 20 77 6f 72 6b 20  6f 75 74 20 68 6f 77 20  |to work out how |
00000d20  74 6f 20 64 6f 20 69 74  20 79 6f 75 72 73 65 6c  |to do it yoursel|
00000d30  66 2e 0d 0d 49 20 63 61  6e 20 72 65 66 65 72 20  |f...I can refer |
00000d40  79 6f 75 20 74 6f 20 74  68 65 20 22 41 64 76 61  |you to the "Adva|
00000d50  6e 63 65 64 20 42 61 73  69 63 20 52 6f 6d 20 55  |nced Basic Rom U|
00000d60  73 65 72 20 47 75 69 64  65 22 2c 20 70 75 62 6c  |ser Guide", publ|
00000d70  69 73 68 65 64 20 62 79  20 74 68 65 0d 22 43 61  |ished by the."Ca|
00000d80  6d 62 72 69 64 67 65 20  4d 69 63 72 6f 63 6f 6d  |mbridge Microcom|
00000d90  70 75 74 65 72 20 43 65  6e 74 72 65 22 2c 20 77  |puter Centre", w|
00000da0  68 69 63 68 20 63 6f 6e  74 61 69 6e 73 20 75 73  |hich contains us|
00000db0  65 66 75 6c 20 69 6e 66  6f 72 6d 61 74 69 6f 6e  |eful information|
00000dc0  20 61 62 6f 75 74 0d 74  68 65 20 66 6c 6f 61 74  | about.the float|
00000dd0  69 6e 67 20 70 6f 69 6e  74 20 70 61 63 6b 61 67  |ing point packag|
00000de0  65 20 69 6e 20 42 61 73  69 63 2c 20 61 6e 64 20  |e in Basic, and |
00000df0  68 6f 77 20 69 74 20 77  6f 72 6b 73 2e 20 20 54  |how it works.  T|
00000e00  68 65 20 66 6c 6f 61 74  69 6e 67 20 70 6f 69 6e  |he floating poin|
00000e10  74 0d 69 6e 20 56 69 65  77 53 74 6f 72 65 20 77  |t.in ViewStore w|
00000e20  6f 72 6b 73 20 69 6e 20  74 68 65 20 73 61 6d 65  |orks in the same|
00000e30  20 77 61 79 2e 0d 0d 52  65 6d 65 6d 62 65 72 20  | way...Remember |
00000e40  74 68 61 74 20 74 68 65  72 65 20 69 73 20 6e 6f  |that there is no|
00000e50  20 6e 65 65 64 20 74 6f  20 75 6e 64 65 72 73 74  | need to underst|
00000e60  61 6e 64 20 66 6c 6f 61  74 69 6e 67 20 70 6f 69  |and floating poi|
00000e70  6e 74 20 74 6f 20 77 72  69 74 65 20 61 0d 75 74  |nt to write a.ut|
00000e80  69 6c 69 74 79 2c 20 73  69 6e 63 65 20 74 68 65  |ility, since the|
00000e90  20 64 61 74 65 20 69 6e  20 56 69 65 77 53 74 6f  | date in ViewSto|
00000ea0  72 65 20 66 69 6c 65 73  20 69 73 20 73 74 6f 72  |re files is stor|
00000eb0  65 64 20 69 6e 20 41 53  43 49 49 20 66 6f 72 6d  |ed in ASCII form|
00000ec0  61 74 2c 20 6e 6f 74 20  61 73 0d 66 6c 6f 61 74  |at, not as.float|
00000ed0  69 6e 67 20 70 6f 69 6e  74 20 6e 75 6d 62 65 72  |ing point number|
00000ee0  73 2e 20 20 55 73 65 20  6f 66 20 66 6c 6f 61 74  |s.  Use of float|
00000ef0  69 6e 67 20 69 73 20 6f  6e 6c 79 20 6e 65 63 65  |ing is only nece|
00000f00  73 73 61 72 79 20 77 68  65 6e 20 79 6f 75 20 77  |ssary when you w|
00000f10  69 73 68 0d 79 6f 75 72  20 75 74 69 6c 69 74 79  |ish.your utility|
00000f20  20 74 6f 20 70 72 6f 76  69 64 65 20 66 6c 6f 61  | to provide floa|
00000f30  74 69 6e 67 20 70 6f 69  6e 74 20 61 72 69 74 68  |ting point arith|
00000f40  6d 65 74 69 63 2e 0d 0d  54 68 65 20 74 77 6f 20  |metic...The two |
00000f50  61 63 63 75 6d 75 6c 61  74 6f 72 73 2c 20 46 57  |accumulators, FW|
00000f60  52 4b 20 61 6e 64 20 46  41 43 43 20 61 72 65 20  |RK and FACC are |
00000f70  69 6e 20 7a 65 72 6f 20  70 61 67 65 2e 20 20 49  |in zero page.  I|
00000f80  66 20 79 6f 75 20 61 72  65 20 6e 6f 74 20 75 73  |f you are not us|
00000f90  69 6e 67 0d 74 68 65 20  66 6c 6f 61 74 69 6e 67  |ing.the floating|
00000fa0  20 70 6f 69 6e 74 20 70  61 63 6b 61 67 65 20 69  | point package i|
00000fb0  6e 20 79 6f 75 72 20 75  74 69 6c 69 74 79 2c 20  |n your utility, |
00000fc0  79 6f 75 20 63 61 6e 20  75 73 65 20 74 68 65 20  |you can use the |
00000fd0  7a 65 72 6f 20 70 61 67  65 0d 61 6c 6c 6f 63 61  |zero page.alloca|
00000fe0  74 65 64 20 74 6f 20 74  68 65 20 61 63 63 75 6d  |ted to the accum|
00000ff0  75 6c 61 74 6f 72 73 20  66 6f 72 20 79 6f 75 72  |ulators for your|
00001000  20 6f 77 6e 20 70 75 72  70 6f 73 65 73 2e 0d 0d  | own purposes...|
00001010  0d 20 20 20 20 20 20 20  20 46 4f 4e 45 20 20 20  |.        FONE   |
00001020  20 20 20 20 20 20 53 65  74 73 20 46 41 43 43 20  |      Sets FACC |
00001030  74 6f 20 76 61 6c 75 65  20 6f 66 20 6f 6e 65 2e  |to value of one.|
00001040  0d 20 20 20 20 20 20 20  20 46 54 45 4e 46 58 20  |.        FTENFX |
00001050  20 20 20 20 20 20 4d 75  6c 74 69 70 6c 69 65 73  |      Multiplies|
00001060  20 46 41 43 43 20 62 79  20 31 30 20 28 6e 6f 74  | FACC by 10 (not|
00001070  20 6e 6f 72 6d 61 6c 69  73 65 64 29 2e 0d 20 20  | normalised)..  |
00001080  20 20 20 20 20 20 46 54  45 4e 47 51 20 20 20 20  |      FTENGQ    |
00001090  20 20 20 44 69 76 69 64  65 73 20 46 41 43 43 20  |   Divides FACC |
000010a0  62 79 20 31 30 20 28 6e  6f 74 20 6e 6f 72 6d 61  |by 10 (not norma|
000010b0  6c 69 73 65 64 29 2e 0d  20 20 20 20 20 20 20 20  |lised)..        |
000010c0  46 41 44 44 57 49 20 20  20 20 20 20 20 41 64 64  |FADDWI       Add|
000010d0  73 20 46 41 43 43 20 61  6e 64 20 46 57 52 4b 3b  |s FACC and FWRK;|
000010e0  20 61 6e 73 77 65 72 20  69 6e 20 46 41 43 43 2c  | answer in FACC,|
000010f0  20 6e 6f 74 20 72 6f 75  6e 64 65 64 2e 0d 20 20  | not rounded..  |
00001100  20 20 20 20 20 20 46 54  45 4e 58 20 20 20 20 20  |      FTENX     |
00001110  20 20 20 4d 75 6c 74 69  70 6c 69 65 73 20 6d 61  |   Multiplies ma|
00001120  6e 74 69 73 73 61 20 62  79 20 31 30 2e 0d 20 20  |ntissa by 10..  |
00001130  20 20 20 20 20 20 46 52  44 44 4b 20 20 20 20 20  |      FRDDK     |
00001140  20 20 20 52 65 61 64 73  20 69 6e 20 41 53 43 49  |   Reads in ASCI|
00001150  49 20 6e 75 6d 62 65 72  20 74 6f 20 46 41 43 43  |I number to FACC|
00001160  2e 20 20 4c 6f 77 20 62  79 74 65 20 6f 66 20 61  |.  Low byte of a|
00001170  64 64 72 65 73 73 20 6f  66 0d 20 20 20 20 20 20  |ddress of.      |
00001180  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 73  |               s|
00001190  74 72 69 6e 67 20 69 6e  20 41 3b 20 68 69 67 68  |tring in A; high|
000011a0  20 62 79 74 65 20 6f 66  20 61 64 64 72 65 73 73  | byte of address|
000011b0  20 6f 66 20 73 74 72 69  6e 67 20 69 6e 20 59 2e  | of string in Y.|
000011c0  0d 20 20 20 20 20 20 20  20 46 54 53 54 20 20 20  |.        FTST   |
000011d0  20 20 20 20 20 20 54 65  73 74 73 20 6e 75 6d 62  |      Tests numb|
000011e0  65 72 20 6f 66 20 46 41  43 43 20 61 6e 64 20 73  |er of FACC and s|
000011f0  65 74 73 20 66 6c 61 67  73 2e 0d 20 20 20 20 20  |ets flags..     |
00001200  20 20 20 46 4e 45 47 20  20 20 20 20 20 20 20 20  |   FNEG         |
00001210  53 77 61 70 73 20 73 69  67 6e 20 6f 66 20 6e 75  |Swaps sign of nu|
00001220  6d 62 65 72 20 69 6e 20  46 41 43 43 2e 0d 20 20  |mber in FACC..  |
00001230  20 20 20 20 20 20 46 43  4c 52 20 20 20 20 20 20  |      FCLR      |
00001240  20 20 20 53 65 74 73 20  46 41 43 43 20 74 6f 20  |   Sets FACC to |
00001250  7a 65 72 6f 2e 0d 20 20  20 20 20 20 20 20 46 41  |zero..        FA|
00001260  44 44 57 20 20 20 20 20  20 20 20 41 64 64 73 20  |DDW        Adds |
00001270  46 41 43 43 20 61 6e 64  20 46 57 52 4b 3b 20 61  |FACC and FWRK; a|
00001280  6e 73 77 65 72 20 69 6e  20 46 41 43 43 2c 20 72  |nswer in FACC, r|
00001290  6f 75 6e 64 65 64 2e 0d  20 20 20 20 20 20 20 20  |ounded..        |
000012a0  46 44 49 56 41 20 20 20  20 20 20 20 20 44 69 76  |FDIVA        Div|
000012b0  69 64 65 73 20 46 41 43  43 20 62 79 20 46 57 52  |ides FACC by FWR|
000012c0  4b 3b 20 61 6e 73 77 65  72 20 69 6e 20 46 41 43  |K; answer in FAC|
000012d0  43 2e 0d 20 20 20 20 20  20 20 20 46 4d 55 4c 58  |C..        FMULX|
000012e0  20 20 20 20 20 20 20 20  4d 75 6c 74 69 70 6c 65  |        Multiple|
000012f0  73 20 46 41 43 43 20 62  79 20 46 57 52 4b 3b 20  |s FACC by FWRK; |
00001300  61 6e 73 77 65 72 20 69  6e 20 46 41 43 43 2e 20  |answer in FACC. |
00001310  0d 0d 0d 47 65 6e 65 72  61 6c 0d 0d 54 68 65 73  |...General..Thes|
00001320  65 20 72 6f 75 74 69 6e  65 73 20 61 72 65 20 61  |e routines are a|
00001330  6e 20 61 73 73 6f 72 74  6d 65 6e 74 20 6f 66 20  |n assortment of |
00001340  75 73 65 66 75 6c 20 73  75 62 72 6f 75 74 69 6e  |useful subroutin|
00001350  65 73 20 66 6f 72 20 77  68 69 63 68 20 65 6e 74  |es for which ent|
00001360  72 79 0d 70 6f 69 6e 74  73 20 61 72 65 20 70 72  |ry.points are pr|
00001370  6f 76 69 64 65 64 2e 0d  0d 20 20 20 20 20 20 20  |ovided...       |
00001380  20 47 45 54 44 45 43 20  20 20 20 20 20 20 47 65  | GETDEC       Ge|
00001390  74 20 61 20 64 65 63 69  6d 61 6c 20 6e 75 6d 62  |t a decimal numb|
000013a0  65 72 2e 0d 20 20 20 20  20 20 20 20 4b 49 4e 43  |er..        KINC|
000013b0  48 20 20 20 20 20 20 20  20 46 6c 75 73 68 20 6b  |H        Flush k|
000013c0  65 79 62 6f 61 72 64 20  62 75 66 66 65 72 2c 20  |eyboard buffer, |
000013d0  61 6e 64 20 67 65 74 20  61 6e 20 69 6e 70 75 74  |and get an input|
000013e0  20 63 68 61 72 61 63 74  65 72 2e 0d 20 20 20 20  | character..    |
000013f0  20 20 20 20 4d 55 4c 50  4c 59 20 20 20 20 20 20  |    MULPLY      |
00001400  20 4d 75 6c 74 69 70 6c  79 20 74 77 6f 20 73 69  | Multiply two si|
00001410  6e 67 6c 65 20 62 79 74  65 20 69 6e 74 65 67 65  |ngle byte intege|
00001420  72 73 2e 0d 20 20 20 20  20 20 20 20 4f 55 54 44  |rs..        OUTD|
00001430  45 43 20 20 20 20 20 20  20 4f 75 74 70 75 74 20  |EC       Output |
00001440  61 20 64 65 63 69 6d 61  6c 20 6e 75 6d 62 65 72  |a decimal number|
00001450  2e 0d 20 20 20 20 20 20  20 20 50 53 54 52 4e 47  |..        PSTRNG|
00001460  20 20 20 20 20 20 20 4f  75 74 70 75 74 20 61 20  |       Output a |
00001470  73 74 72 69 6e 67 2e 0d  20 20 20 20 20 20 20 20  |string..        |
00001480  52 45 4c 4c 49 4e 20 20  20 20 20 20 20 52 65 61  |RELLIN       Rea|
00001490  64 20 61 20 6c 69 6e 65  20 6f 66 20 69 6e 70 75  |d a line of inpu|
000014a0  74 2e 0d 20 20 20 20 20  20 20 20 53 4b 50 43 42  |t..        SKPCB|
000014b0  4c 20 20 20 20 20 20 20  53 6b 69 70 20 62 6c 61  |L       Skip bla|
000014c0  6e 6b 73 2e 0d 0d                                 |nks...|
000014c6
F/+HINT12.m0
F/+HINT12.m1
F/+HINT12.m2
F/+HINT12.m4
F/+HINT12.m5