Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF » F/+HINT10
F/+HINT10
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/+HINT10 |
Read OK: | ✔ |
File size: | 1701 bytes |
Load address: | 48204556 |
Exec address: | 36544E49 |
File contents
GETKYW This routine finds the key width for a given field. It uses the value defined in the format file, if any; otherwise a system of defaults operates: Key width defined Key width No key width, display width defined Display width No key width or display width 10 On entry: X contains number of field for which width is required. On exit: CS field doesn't exist. CC field found; A has already width. X preserved. Y undefined. GETKYW This routine finds the key width for a given field. It uses the value defined in the format file, if any; otherwise a system of defaults operates: Key width defined Key width No key width, display width defined Display width No key width or display width 10 On entry: X contains the field number for which the key width is required. On exit: A contains key width; if field doesn't exist, a default key width of 10 is returned. X preserved. Y undefined. CALSBN This routine is used when displaying numeric fields, to calculate the number of spaces to be output before the number in order to right justify the number within its field width. This also takes into account the decimal places specified in the format file. On entry: X contains the field number. TEMP07 points to the beginning of the field in question. TEMP03 contains the field display width, as returned by the GETWID routine. On exit: A gives number of spaces to output, zero if the number is wider than the field, or there are too many decimal places. X undefined. Y undefined. TEMP03 preserved. TEMP07 preserved. File Control File handling in ViewStore is centred around three things: error handling, FBLOCK and prefixes. Since the error handling provided by the normal filing system interface provided is completely unsatisfactory for a program such as ViewStore, I have developed a system which gives control of what happens after a disc or filing system error. For the utility writer, this system is transparent: you can forget about it as long as you use the calls provided, and don't call the filing system directly. If you do this, you can forget all about BRK errors and handlers. The system is the same for all file calls: the state of the Overflow (V) flag indicates after a call whether an error has occurred. If there has been an error, then the V flag is set, and the A register contains the error code. If you detect an error, you should unravel yourself from any routines, report the error by calling the REPERL routine, and then close any files that you have opened yourself, before returning to control of the ROM. You shouldn't close the intermediate file: this is done automatically when control is passed back to the ROM. Filenames FBLOCK is a small of memory used to store and manipulate filenames. Several routines are provided which work on the filename in FBLOCK, altering directories and prefixes. A filename in ViewStore is made up of three parts: Prefix Directory Name ViewStore maintains a list of the current prefixes for each different file type: data; format; sort and so on. A routine which adds a specified prefix to a directory and name stored in FBLOCK is available. The maximum length of a prefix is 13 characters, excluding delimiter. The current prefixes can only be altered with the PREFIX command in ViewStore's Command Mode. ViewStore considers directories to be single character; of course the prefix can include multiple character directories, but the filenames of data and format files, for example, begin with directories, and these are always single character directory names, whatever the filing system. Directories must be separated from the name itself by a dot, making the total size of the directory section of a filename 2 characters. The name part of the filename can be up to 10 characters long. This does not include the directory and separator, or the delimiter. Names are always delimited with a Carriage Return character. Part Max. Size (exc. delimiter) Example Prefix 13 :2. Director 2 d. Name 10 datafile MOVFBK Moves a filename from the store area into FBLOCK. MOVNAY Moves a filename out of FBLOCK into the store area. CHKDIR Checks for the presence of a directory in a filename in FBLOCK, and returns the directory character, if there is one. SETDIR Sets a directory into a filename in FBLOCK. STXPRE Stores the required prefix with a filename in FBLOCK. OPFILE Gives access to the filing system OSFIND call. OSHCAL Gives access to the filing system OSFILE call. XOSARG Vector with error trapping to OSARGS. XOSBGE Vector with error trapping to OSBGET. XOSBPU Vector with error trapping to OSBPUT. XOSCLS Vector with error trapping to OSFIND with A=0; used to close a file. XOSGBP Vector with error trapping to OSGBPB. CALUTI Loads and runs a utility format file.
00000000 47 45 54 4b 59 57 0d 0d 54 68 69 73 20 72 6f 75 |GETKYW..This rou| 00000010 74 69 6e 65 20 66 69 6e 64 73 20 74 68 65 20 6b |tine finds the k| 00000020 65 79 20 77 69 64 74 68 20 66 6f 72 20 61 20 67 |ey width for a g| 00000030 69 76 65 6e 20 66 69 65 6c 64 2e 20 20 49 74 20 |iven field. It | 00000040 75 73 65 73 20 74 68 65 20 76 61 6c 75 65 0d 64 |uses the value.d| 00000050 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 66 6f |efined in the fo| 00000060 72 6d 61 74 20 66 69 6c 65 2c 20 69 66 20 61 6e |rmat file, if an| 00000070 79 3b 20 6f 74 68 65 72 77 69 73 65 20 61 20 73 |y; otherwise a s| 00000080 79 73 74 65 6d 20 6f 66 20 64 65 66 61 75 6c 74 |ystem of default| 00000090 73 20 6f 70 65 72 61 74 65 73 3a 0d 0d 4b 65 79 |s operates:..Key| 000000a0 20 77 69 64 74 68 20 64 65 66 69 6e 65 64 20 20 | width defined | 000000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000c0 20 20 20 20 20 20 20 20 20 20 20 20 20 4b 65 79 | Key| 000000d0 20 77 69 64 74 68 20 20 0d 4e 6f 20 6b 65 79 20 | width .No key | 000000e0 77 69 64 74 68 2c 20 64 69 73 70 6c 61 79 20 77 |width, display w| 000000f0 69 64 74 68 20 64 65 66 69 6e 65 64 20 20 20 20 |idth defined | 00000100 20 20 20 20 20 20 20 20 20 44 69 73 70 6c 61 79 | Display| 00000110 20 77 69 64 74 68 0d 4e 6f 20 6b 65 79 20 77 69 | width.No key wi| 00000120 64 74 68 20 6f 72 20 64 69 73 70 6c 61 79 20 77 |dth or display w| 00000130 69 64 74 68 20 20 20 20 20 20 20 20 20 20 20 20 |idth | 00000140 20 20 20 20 20 20 20 31 30 0d 0d 4f 6e 20 65 6e | 10..On en| 00000150 74 72 79 3a 20 20 20 20 20 20 20 20 20 20 20 20 |try: | 00000160 20 20 20 58 20 20 20 20 20 20 20 63 6f 6e 74 61 | X conta| 00000170 69 6e 73 20 6e 75 6d 62 65 72 20 6f 66 20 66 69 |ins number of fi| 00000180 65 6c 64 20 66 6f 72 20 77 68 69 63 68 20 77 69 |eld for which wi| 00000190 64 74 68 20 69 73 0d 20 20 20 20 20 20 20 20 20 |dth is. | 000001a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000001b0 20 20 20 20 20 20 20 72 65 71 75 69 72 65 64 2e | required.| 000001c0 0d 0d 4f 6e 20 65 78 69 74 3a 20 20 20 20 20 20 |..On exit: | 000001d0 20 20 20 20 20 20 20 20 20 20 43 53 20 20 20 20 | CS | 000001e0 20 20 66 69 65 6c 64 20 64 6f 65 73 6e 27 74 20 | field doesn't | 000001f0 65 78 69 73 74 2e 0d 20 20 20 20 20 20 20 20 20 |exist.. | 00000200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 | C| 00000210 43 20 20 20 20 20 20 66 69 65 6c 64 20 66 6f 75 |C field fou| 00000220 6e 64 3b 20 41 20 68 61 73 20 61 6c 72 65 61 64 |nd; A has alread| 00000230 79 20 77 69 64 74 68 2e 0d 20 20 20 20 20 20 20 |y width.. | 00000240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000250 20 58 20 20 20 20 20 20 20 70 72 65 73 65 72 76 | X preserv| 00000260 65 64 2e 0d 20 20 20 20 20 20 20 20 20 20 20 20 |ed.. | 00000270 20 20 20 20 20 20 20 20 20 20 20 20 59 20 20 20 | Y | 00000280 20 20 20 20 75 6e 64 65 66 69 6e 65 64 2e 0d 0d | undefined...| 00000290 0d 47 45 54 4b 59 57 0d 0d 54 68 69 73 20 72 6f |.GETKYW..This ro| 000002a0 75 74 69 6e 65 20 66 69 6e 64 73 20 74 68 65 20 |utine finds the | 000002b0 6b 65 79 20 77 69 64 74 68 20 66 6f 72 20 61 20 |key width for a | 000002c0 67 69 76 65 6e 20 66 69 65 6c 64 2e 20 20 49 74 |given field. It| 000002d0 20 75 73 65 73 20 74 68 65 20 76 61 6c 75 65 0d | uses the value.| 000002e0 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 66 |defined in the f| 000002f0 6f 72 6d 61 74 20 66 69 6c 65 2c 20 69 66 20 61 |ormat file, if a| 00000300 6e 79 3b 20 6f 74 68 65 72 77 69 73 65 20 61 20 |ny; otherwise a | 00000310 73 79 73 74 65 6d 20 6f 66 20 64 65 66 61 75 6c |system of defaul| 00000320 74 73 20 6f 70 65 72 61 74 65 73 3a 0d 0d 4b 65 |ts operates:..Ke| 00000330 79 20 77 69 64 74 68 20 64 65 66 69 6e 65 64 20 |y width defined | 00000340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000350 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4b 65 | Ke| 00000360 79 20 77 69 64 74 68 0d 4e 6f 20 6b 65 79 20 77 |y width.No key w| 00000370 69 64 74 68 2c 20 64 69 73 70 6c 61 79 20 77 69 |idth, display wi| 00000380 64 74 68 20 64 65 66 69 6e 65 64 20 20 20 20 20 |dth defined | 00000390 20 20 20 20 20 20 20 20 44 69 73 70 6c 61 79 20 | Display | 000003a0 77 69 64 74 68 0d 4e 6f 20 6b 65 79 20 77 69 64 |width.No key wid| 000003b0 74 68 20 6f 72 20 64 69 73 70 6c 61 79 20 77 69 |th or display wi| 000003c0 64 74 68 20 20 20 20 20 20 20 20 20 20 20 20 20 |dth | 000003d0 20 20 20 20 20 20 31 30 0d 0d 4f 6e 20 65 6e 74 | 10..On ent| 000003e0 72 79 3a 20 20 20 20 20 20 20 58 20 20 20 20 20 |ry: X | 000003f0 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 61 69 | contai| 00000400 6e 73 20 74 68 65 20 66 69 65 6c 64 20 6e 75 6d |ns the field num| 00000410 62 65 72 20 66 6f 72 20 77 68 69 63 68 20 74 68 |ber for which th| 00000420 65 20 6b 65 79 0d 20 20 20 20 20 20 20 20 20 20 |e key. | 00000430 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000440 20 20 20 20 20 20 77 69 64 74 68 20 69 73 20 72 | width is r| 00000450 65 71 75 69 72 65 64 2e 0d 0d 4f 6e 20 65 78 69 |equired...On exi| 00000460 74 3a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 |t: A | 00000470 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 61 69 | contai| 00000480 6e 73 20 6b 65 79 20 77 69 64 74 68 3b 20 69 66 |ns key width; if| 00000490 20 66 69 65 6c 64 20 64 6f 65 73 6e 27 74 20 65 | field doesn't e| 000004a0 78 69 73 74 2c 0d 20 20 20 20 20 20 20 20 20 20 |xist,. | 000004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000004c0 20 20 20 20 20 20 61 20 64 65 66 61 75 6c 74 20 | a default | 000004d0 6b 65 79 20 77 69 64 74 68 20 6f 66 20 31 30 20 |key width of 10 | 000004e0 69 73 20 72 65 74 75 72 6e 65 64 2e 0d 20 20 20 |is returned.. | 000004f0 20 20 20 20 20 20 20 20 20 20 20 20 20 58 20 20 | X | 00000500 20 20 20 20 20 20 20 20 20 20 20 20 20 70 72 65 | pre| 00000510 73 65 72 76 65 64 2e 0d 20 20 20 20 20 20 20 20 |served.. | 00000520 20 20 20 20 20 20 20 20 59 20 20 20 20 20 20 20 | Y | 00000530 20 20 20 20 20 20 20 20 75 6e 64 65 66 69 6e 65 | undefine| 00000540 64 2e 0d 0d 0d 43 41 4c 53 42 4e 0d 0d 54 68 69 |d....CALSBN..Thi| 00000550 73 20 72 6f 75 74 69 6e 65 20 69 73 20 75 73 65 |s routine is use| 00000560 64 20 77 68 65 6e 20 64 69 73 70 6c 61 79 69 6e |d when displayin| 00000570 67 20 6e 75 6d 65 72 69 63 20 66 69 65 6c 64 73 |g numeric fields| 00000580 2c 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 20 74 |, to calculate t| 00000590 68 65 20 6e 75 6d 62 65 72 0d 6f 66 20 73 70 61 |he number.of spa| 000005a0 63 65 73 20 74 6f 20 62 65 20 6f 75 74 70 75 74 |ces to be output| 000005b0 20 62 65 66 6f 72 65 20 74 68 65 20 6e 75 6d 62 | before the numb| 000005c0 65 72 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 72 |er in order to r| 000005d0 69 67 68 74 20 6a 75 73 74 69 66 79 20 74 68 65 |ight justify the| 000005e0 0d 6e 75 6d 62 65 72 20 77 69 74 68 69 6e 20 69 |.number within i| 000005f0 74 73 20 66 69 65 6c 64 20 77 69 64 74 68 2e 20 |ts field width. | 00000600 20 54 68 69 73 20 61 6c 73 6f 20 74 61 6b 65 73 | This also takes| 00000610 20 69 6e 74 6f 20 61 63 63 6f 75 6e 74 20 74 68 | into account th| 00000620 65 20 64 65 63 69 6d 61 6c 0d 70 6c 61 63 65 73 |e decimal.places| 00000630 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 | specified in th| 00000640 65 20 66 6f 72 6d 61 74 20 66 69 6c 65 2e 0d 0d |e format file...| 00000650 4f 6e 20 65 6e 74 72 79 3a 20 20 20 20 20 20 20 |On entry: | 00000660 58 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |X | 00000670 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 66 69 65 |contains the fie| 00000680 6c 64 20 6e 75 6d 62 65 72 2e 0d 20 20 20 20 20 |ld number.. | 00000690 20 20 20 20 20 20 20 20 20 20 20 54 45 4d 50 30 | TEMP0| 000006a0 37 20 20 20 20 20 20 20 20 20 20 70 6f 69 6e 74 |7 point| 000006b0 73 20 74 6f 20 74 68 65 20 62 65 67 69 6e 6e 69 |s to the beginni| 000006c0 6e 67 20 6f 66 20 74 68 65 20 66 69 65 6c 64 20 |ng of the field | 000006d0 69 6e 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |in. | 000006e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000006f0 20 20 20 71 75 65 73 74 69 6f 6e 2e 0d 20 20 20 | question.. | 00000700 20 20 20 20 20 20 20 20 20 20 20 20 20 54 45 4d | TEM| 00000710 50 30 33 20 20 20 20 20 20 20 20 20 20 63 6f 6e |P03 con| 00000720 74 61 69 6e 73 20 74 68 65 20 66 69 65 6c 64 20 |tains the field | 00000730 64 69 73 70 6c 61 79 20 77 69 64 74 68 2c 20 61 |display width, a| 00000740 73 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |s. | 00000750 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000760 20 20 72 65 74 75 72 6e 65 64 20 62 79 20 74 68 | returned by th| 00000770 65 20 47 45 54 57 49 44 20 72 6f 75 74 69 6e 65 |e GETWID routine| 00000780 2e 0d 0d 4f 6e 20 65 78 69 74 3a 20 20 20 20 20 |...On exit: | 00000790 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 | A | 000007a0 20 20 20 67 69 76 65 73 20 6e 75 6d 62 65 72 20 | gives number | 000007b0 6f 66 20 73 70 61 63 65 73 20 74 6f 20 6f 75 74 |of spaces to out| 000007c0 70 75 74 2c 20 7a 65 72 6f 20 69 66 0d 20 20 20 |put, zero if. | 000007d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000007e0 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 | the| 000007f0 20 6e 75 6d 62 65 72 20 69 73 20 77 69 64 65 72 | number is wider| 00000800 20 74 68 61 6e 20 74 68 65 20 66 69 65 6c 64 2c | than the field,| 00000810 20 6f 72 20 74 68 65 72 65 0d 20 20 20 20 20 20 | or there. | 00000820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000830 20 20 20 20 20 20 20 20 20 20 61 72 65 20 74 6f | are to| 00000840 6f 20 6d 61 6e 79 20 64 65 63 69 6d 61 6c 20 70 |o many decimal p| 00000850 6c 61 63 65 73 2e 0d 20 20 20 20 20 20 20 20 20 |laces.. | 00000860 20 20 20 20 20 20 20 58 20 20 20 20 20 20 20 20 | X | 00000870 20 20 20 20 20 20 20 75 6e 64 65 66 69 6e 65 64 | undefined| 00000880 2e 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. | 00000890 20 20 59 20 20 20 20 20 20 20 20 20 20 20 20 20 | Y | 000008a0 20 20 75 6e 64 65 66 69 6e 65 64 2e 0d 20 20 20 | undefined.. | 000008b0 20 20 20 20 20 20 20 20 20 20 20 20 20 54 45 4d | TEM| 000008c0 50 30 33 20 20 20 20 20 20 20 20 20 20 70 72 65 |P03 pre| 000008d0 73 65 72 76 65 64 2e 0d 20 20 20 20 20 20 20 20 |served.. | 000008e0 20 20 20 20 20 20 20 20 54 45 4d 50 30 37 20 20 | TEMP07 | 000008f0 20 20 20 20 20 20 20 20 70 72 65 73 65 72 76 65 | preserve| 00000900 64 2e 0d 0d 0d 46 69 6c 65 20 43 6f 6e 74 72 6f |d....File Contro| 00000910 6c 0d 0d 46 69 6c 65 20 68 61 6e 64 6c 69 6e 67 |l..File handling| 00000920 20 69 6e 20 56 69 65 77 53 74 6f 72 65 20 69 73 | in ViewStore is| 00000930 20 63 65 6e 74 72 65 64 20 61 72 6f 75 6e 64 20 | centred around | 00000940 74 68 72 65 65 20 74 68 69 6e 67 73 3a 20 65 72 |three things: er| 00000950 72 6f 72 20 68 61 6e 64 6c 69 6e 67 2c 0d 46 42 |ror handling,.FB| 00000960 4c 4f 43 4b 20 61 6e 64 20 70 72 65 66 69 78 65 |LOCK and prefixe| 00000970 73 2e 20 20 53 69 6e 63 65 20 74 68 65 20 65 72 |s. Since the er| 00000980 72 6f 72 20 68 61 6e 64 6c 69 6e 67 20 70 72 6f |ror handling pro| 00000990 76 69 64 65 64 20 62 79 20 74 68 65 20 6e 6f 72 |vided by the nor| 000009a0 6d 61 6c 20 66 69 6c 69 6e 67 0d 73 79 73 74 65 |mal filing.syste| 000009b0 6d 20 69 6e 74 65 72 66 61 63 65 20 70 72 6f 76 |m interface prov| 000009c0 69 64 65 64 20 69 73 20 63 6f 6d 70 6c 65 74 65 |ided is complete| 000009d0 6c 79 20 75 6e 73 61 74 69 73 66 61 63 74 6f 72 |ly unsatisfactor| 000009e0 79 20 66 6f 72 20 61 20 70 72 6f 67 72 61 6d 20 |y for a program | 000009f0 73 75 63 68 20 61 73 0d 56 69 65 77 53 74 6f 72 |such as.ViewStor| 00000a00 65 2c 20 49 20 68 61 76 65 20 64 65 76 65 6c 6f |e, I have develo| 00000a10 70 65 64 20 61 20 73 79 73 74 65 6d 20 77 68 69 |ped a system whi| 00000a20 63 68 20 67 69 76 65 73 20 63 6f 6e 74 72 6f 6c |ch gives control| 00000a30 20 6f 66 20 77 68 61 74 20 68 61 70 70 65 6e 73 | of what happens| 00000a40 0d 61 66 74 65 72 20 61 20 64 69 73 63 20 6f 72 |.after a disc or| 00000a50 20 66 69 6c 69 6e 67 20 73 79 73 74 65 6d 20 65 | filing system e| 00000a60 72 72 6f 72 2e 20 20 46 6f 72 20 74 68 65 20 75 |rror. For the u| 00000a70 74 69 6c 69 74 79 20 77 72 69 74 65 72 2c 20 74 |tility writer, t| 00000a80 68 69 73 20 73 79 73 74 65 6d 20 69 73 0d 74 72 |his system is.tr| 00000a90 61 6e 73 70 61 72 65 6e 74 3a 20 79 6f 75 20 63 |ansparent: you c| 00000aa0 61 6e 20 66 6f 72 67 65 74 20 61 62 6f 75 74 20 |an forget about | 00000ab0 69 74 20 61 73 20 6c 6f 6e 67 20 61 73 20 79 6f |it as long as yo| 00000ac0 75 20 75 73 65 20 74 68 65 20 63 61 6c 6c 73 20 |u use the calls | 00000ad0 70 72 6f 76 69 64 65 64 2c 0d 61 6e 64 20 64 6f |provided,.and do| 00000ae0 6e 27 74 20 63 61 6c 6c 20 74 68 65 20 66 69 6c |n't call the fil| 00000af0 69 6e 67 20 73 79 73 74 65 6d 20 64 69 72 65 63 |ing system direc| 00000b00 74 6c 79 2e 20 20 49 66 20 79 6f 75 20 64 6f 20 |tly. If you do | 00000b10 74 68 69 73 2c 20 79 6f 75 20 63 61 6e 20 66 6f |this, you can fo| 00000b20 72 67 65 74 0d 61 6c 6c 20 61 62 6f 75 74 20 42 |rget.all about B| 00000b30 52 4b 20 65 72 72 6f 72 73 20 61 6e 64 20 68 61 |RK errors and ha| 00000b40 6e 64 6c 65 72 73 2e 0d 0d 54 68 65 20 73 79 73 |ndlers...The sys| 00000b50 74 65 6d 20 69 73 20 74 68 65 20 73 61 6d 65 20 |tem is the same | 00000b60 66 6f 72 20 61 6c 6c 20 66 69 6c 65 20 63 61 6c |for all file cal| 00000b70 6c 73 3a 20 74 68 65 20 73 74 61 74 65 20 6f 66 |ls: the state of| 00000b80 20 74 68 65 20 4f 76 65 72 66 6c 6f 77 20 28 56 | the Overflow (V| 00000b90 29 0d 66 6c 61 67 20 69 6e 64 69 63 61 74 65 73 |).flag indicates| 00000ba0 20 61 66 74 65 72 20 61 20 63 61 6c 6c 20 77 68 | after a call wh| 00000bb0 65 74 68 65 72 20 61 6e 20 65 72 72 6f 72 20 68 |ether an error h| 00000bc0 61 73 20 6f 63 63 75 72 72 65 64 2e 20 20 49 66 |as occurred. If| 00000bd0 20 74 68 65 72 65 20 68 61 73 0d 62 65 65 6e 20 | there has.been | 00000be0 61 6e 20 65 72 72 6f 72 2c 20 74 68 65 6e 20 74 |an error, then t| 00000bf0 68 65 20 56 20 66 6c 61 67 20 69 73 20 73 65 74 |he V flag is set| 00000c00 2c 20 61 6e 64 20 74 68 65 20 41 20 72 65 67 69 |, and the A regi| 00000c10 73 74 65 72 20 63 6f 6e 74 61 69 6e 73 20 74 68 |ster contains th| 00000c20 65 20 65 72 72 6f 72 0d 63 6f 64 65 2e 20 20 49 |e error.code. I| 00000c30 66 20 79 6f 75 20 64 65 74 65 63 74 20 61 6e 20 |f you detect an | 00000c40 65 72 72 6f 72 2c 20 79 6f 75 20 73 68 6f 75 6c |error, you shoul| 00000c50 64 20 75 6e 72 61 76 65 6c 20 79 6f 75 72 73 65 |d unravel yourse| 00000c60 6c 66 20 66 72 6f 6d 20 61 6e 79 0d 72 6f 75 74 |lf from any.rout| 00000c70 69 6e 65 73 2c 20 72 65 70 6f 72 74 20 74 68 65 |ines, report the| 00000c80 20 65 72 72 6f 72 20 62 79 20 63 61 6c 6c 69 6e | error by callin| 00000c90 67 20 74 68 65 20 52 45 50 45 52 4c 20 72 6f 75 |g the REPERL rou| 00000ca0 74 69 6e 65 2c 20 61 6e 64 20 74 68 65 6e 20 63 |tine, and then c| 00000cb0 6c 6f 73 65 20 61 6e 79 0d 66 69 6c 65 73 20 74 |lose any.files t| 00000cc0 68 61 74 20 79 6f 75 20 68 61 76 65 20 6f 70 65 |hat you have ope| 00000cd0 6e 65 64 20 79 6f 75 72 73 65 6c 66 2c 20 62 65 |ned yourself, be| 00000ce0 66 6f 72 65 20 72 65 74 75 72 6e 69 6e 67 20 74 |fore returning t| 00000cf0 6f 20 63 6f 6e 74 72 6f 6c 20 6f 66 20 74 68 65 |o control of the| 00000d00 20 52 4f 4d 2e 20 0d 59 6f 75 20 73 68 6f 75 6c | ROM. .You shoul| 00000d10 64 6e 27 74 20 63 6c 6f 73 65 20 74 68 65 20 69 |dn't close the i| 00000d20 6e 74 65 72 6d 65 64 69 61 74 65 20 66 69 6c 65 |ntermediate file| 00000d30 3a 20 74 68 69 73 20 69 73 20 64 6f 6e 65 20 61 |: this is done a| 00000d40 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 77 68 65 |utomatically whe| 00000d50 6e 0d 63 6f 6e 74 72 6f 6c 20 69 73 20 70 61 73 |n.control is pas| 00000d60 73 65 64 20 62 61 63 6b 20 74 6f 20 74 68 65 20 |sed back to the | 00000d70 52 4f 4d 2e 0d 0d 0d 46 69 6c 65 6e 61 6d 65 73 |ROM....Filenames| 00000d80 0d 0d 46 42 4c 4f 43 4b 20 69 73 20 61 20 73 6d |..FBLOCK is a sm| 00000d90 61 6c 6c 20 6f 66 20 6d 65 6d 6f 72 79 20 75 73 |all of memory us| 00000da0 65 64 20 74 6f 20 73 74 6f 72 65 20 61 6e 64 20 |ed to store and | 00000db0 6d 61 6e 69 70 75 6c 61 74 65 20 66 69 6c 65 6e |manipulate filen| 00000dc0 61 6d 65 73 2e 20 20 53 65 76 65 72 61 6c 0d 72 |ames. Several.r| 00000dd0 6f 75 74 69 6e 65 73 20 61 72 65 20 70 72 6f 76 |outines are prov| 00000de0 69 64 65 64 20 77 68 69 63 68 20 77 6f 72 6b 20 |ided which work | 00000df0 6f 6e 20 74 68 65 20 66 69 6c 65 6e 61 6d 65 20 |on the filename | 00000e00 69 6e 20 46 42 4c 4f 43 4b 2c 20 61 6c 74 65 72 |in FBLOCK, alter| 00000e10 69 6e 67 0d 64 69 72 65 63 74 6f 72 69 65 73 20 |ing.directories | 00000e20 61 6e 64 20 70 72 65 66 69 78 65 73 2e 0d 0d 41 |and prefixes...A| 00000e30 20 66 69 6c 65 6e 61 6d 65 20 69 6e 20 56 69 65 | filename in Vie| 00000e40 77 53 74 6f 72 65 20 69 73 20 6d 61 64 65 20 75 |wStore is made u| 00000e50 70 20 6f 66 20 74 68 72 65 65 20 70 61 72 74 73 |p of three parts| 00000e60 3a 0d 0d 20 20 20 20 20 20 20 20 50 72 65 66 69 |:.. Prefi| 00000e70 78 0d 20 20 20 20 20 20 20 20 44 69 72 65 63 74 |x. Direct| 00000e80 6f 72 79 0d 20 20 20 20 20 20 20 20 4e 61 6d 65 |ory. Name| 00000e90 0d 20 20 20 20 20 20 20 20 0d 56 69 65 77 53 74 |. .ViewSt| 00000ea0 6f 72 65 20 6d 61 69 6e 74 61 69 6e 73 20 61 20 |ore maintains a | 00000eb0 6c 69 73 74 20 6f 66 20 74 68 65 20 63 75 72 72 |list of the curr| 00000ec0 65 6e 74 20 70 72 65 66 69 78 65 73 20 66 6f 72 |ent prefixes for| 00000ed0 20 65 61 63 68 20 64 69 66 66 65 72 65 6e 74 20 | each different | 00000ee0 66 69 6c 65 0d 74 79 70 65 3a 20 64 61 74 61 3b |file.type: data;| 00000ef0 20 66 6f 72 6d 61 74 3b 20 73 6f 72 74 20 61 6e | format; sort an| 00000f00 64 20 73 6f 20 6f 6e 2e 20 20 41 20 72 6f 75 74 |d so on. A rout| 00000f10 69 6e 65 20 77 68 69 63 68 20 61 64 64 73 20 61 |ine which adds a| 00000f20 20 73 70 65 63 69 66 69 65 64 20 70 72 65 66 69 | specified prefi| 00000f30 78 0d 74 6f 20 61 20 64 69 72 65 63 74 6f 72 79 |x.to a directory| 00000f40 20 61 6e 64 20 6e 61 6d 65 20 73 74 6f 72 65 64 | and name stored| 00000f50 20 69 6e 20 46 42 4c 4f 43 4b 20 69 73 20 61 76 | in FBLOCK is av| 00000f60 61 69 6c 61 62 6c 65 2e 20 20 54 68 65 20 6d 61 |ailable. The ma| 00000f70 78 69 6d 75 6d 20 6c 65 6e 67 74 68 0d 6f 66 20 |ximum length.of | 00000f80 61 20 70 72 65 66 69 78 20 69 73 20 31 33 20 63 |a prefix is 13 c| 00000f90 68 61 72 61 63 74 65 72 73 2c 20 65 78 63 6c 75 |haracters, exclu| 00000fa0 64 69 6e 67 20 64 65 6c 69 6d 69 74 65 72 2e 20 |ding delimiter. | 00000fb0 20 54 68 65 20 63 75 72 72 65 6e 74 20 70 72 65 | The current pre| 00000fc0 66 69 78 65 73 20 63 61 6e 0d 6f 6e 6c 79 20 62 |fixes can.only b| 00000fd0 65 20 61 6c 74 65 72 65 64 20 77 69 74 68 20 74 |e altered with t| 00000fe0 68 65 20 50 52 45 46 49 58 20 63 6f 6d 6d 61 6e |he PREFIX comman| 00000ff0 64 20 69 6e 20 56 69 65 77 53 74 6f 72 65 27 73 |d in ViewStore's| 00001000 20 43 6f 6d 6d 61 6e 64 20 4d 6f 64 65 2e 0d 0d | Command Mode...| 00001010 56 69 65 77 53 74 6f 72 65 20 63 6f 6e 73 69 64 |ViewStore consid| 00001020 65 72 73 20 64 69 72 65 63 74 6f 72 69 65 73 20 |ers directories | 00001030 74 6f 20 62 65 20 73 69 6e 67 6c 65 20 63 68 61 |to be single cha| 00001040 72 61 63 74 65 72 3b 20 6f 66 20 63 6f 75 72 73 |racter; of cours| 00001050 65 20 74 68 65 20 70 72 65 66 69 78 0d 63 61 6e |e the prefix.can| 00001060 20 69 6e 63 6c 75 64 65 20 6d 75 6c 74 69 70 6c | include multipl| 00001070 65 20 63 68 61 72 61 63 74 65 72 20 64 69 72 65 |e character dire| 00001080 63 74 6f 72 69 65 73 2c 20 62 75 74 20 74 68 65 |ctories, but the| 00001090 20 66 69 6c 65 6e 61 6d 65 73 20 6f 66 20 64 61 | filenames of da| 000010a0 74 61 20 61 6e 64 0d 66 6f 72 6d 61 74 20 66 69 |ta and.format fi| 000010b0 6c 65 73 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 |les, for example| 000010c0 2c 20 62 65 67 69 6e 20 77 69 74 68 20 64 69 72 |, begin with dir| 000010d0 65 63 74 6f 72 69 65 73 2c 20 61 6e 64 20 74 68 |ectories, and th| 000010e0 65 73 65 20 61 72 65 20 61 6c 77 61 79 73 0d 73 |ese are always.s| 000010f0 69 6e 67 6c 65 20 63 68 61 72 61 63 74 65 72 20 |ingle character | 00001100 64 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 73 2c |directory names,| 00001110 20 77 68 61 74 65 76 65 72 20 74 68 65 20 66 69 | whatever the fi| 00001120 6c 69 6e 67 20 73 79 73 74 65 6d 2e 20 20 44 69 |ling system. Di| 00001130 72 65 63 74 6f 72 69 65 73 0d 6d 75 73 74 20 62 |rectories.must b| 00001140 65 20 73 65 70 61 72 61 74 65 64 20 66 72 6f 6d |e separated from| 00001150 20 74 68 65 20 6e 61 6d 65 20 69 74 73 65 6c 66 | the name itself| 00001160 20 62 79 20 61 20 64 6f 74 2c 20 6d 61 6b 69 6e | by a dot, makin| 00001170 67 20 74 68 65 20 74 6f 74 61 6c 20 73 69 7a 65 |g the total size| 00001180 20 6f 66 0d 74 68 65 20 64 69 72 65 63 74 6f 72 | of.the director| 00001190 79 20 73 65 63 74 69 6f 6e 20 6f 66 20 61 20 66 |y section of a f| 000011a0 69 6c 65 6e 61 6d 65 20 32 20 63 68 61 72 61 63 |ilename 2 charac| 000011b0 74 65 72 73 2e 0d 0d 54 68 65 20 6e 61 6d 65 20 |ters...The name | 000011c0 70 61 72 74 20 6f 66 20 74 68 65 20 66 69 6c 65 |part of the file| 000011d0 6e 61 6d 65 20 63 61 6e 20 62 65 20 75 70 20 74 |name can be up t| 000011e0 6f 20 31 30 20 63 68 61 72 61 63 74 65 72 73 20 |o 10 characters | 000011f0 6c 6f 6e 67 2e 20 20 54 68 69 73 20 64 6f 65 73 |long. This does| 00001200 0d 6e 6f 74 20 69 6e 63 6c 75 64 65 20 74 68 65 |.not include the| 00001210 20 64 69 72 65 63 74 6f 72 79 20 61 6e 64 20 73 | directory and s| 00001220 65 70 61 72 61 74 6f 72 2c 20 6f 72 20 74 68 65 |eparator, or the| 00001230 20 64 65 6c 69 6d 69 74 65 72 2e 20 20 4e 61 6d | delimiter. Nam| 00001240 65 73 20 61 72 65 20 61 6c 77 61 79 73 0d 64 65 |es are always.de| 00001250 6c 69 6d 69 74 65 64 20 77 69 74 68 20 61 20 43 |limited with a C| 00001260 61 72 72 69 61 67 65 20 52 65 74 75 72 6e 20 63 |arriage Return c| 00001270 68 61 72 61 63 74 65 72 2e 0d 0d 50 61 72 74 20 |haracter...Part | 00001280 20 20 20 20 20 20 20 20 20 20 20 4d 61 78 2e 20 | Max. | 00001290 53 69 7a 65 20 28 65 78 63 2e 20 64 65 6c 69 6d |Size (exc. delim| 000012a0 69 74 65 72 29 20 20 20 20 20 20 45 78 61 6d 70 |iter) Examp| 000012b0 6c 65 0d 0d 50 72 65 66 69 78 20 20 20 20 20 20 |le..Prefix | 000012c0 20 20 20 20 31 33 20 20 20 20 20 20 20 20 20 20 | 13 | 000012d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000012e0 20 20 20 20 3a 32 2e 0d 44 69 72 65 63 74 6f 72 | :2..Director| 000012f0 20 20 20 20 20 20 20 20 32 20 20 20 20 20 20 20 | 2 | 00001300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001310 20 20 20 20 20 20 20 20 64 2e 0d 4e 61 6d 65 20 | d..Name | 00001320 20 20 20 20 20 20 20 20 20 20 20 31 30 20 20 20 | 10 | 00001330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001340 20 20 20 20 20 20 20 20 20 20 20 64 61 74 61 66 | dataf| 00001350 69 6c 65 0d 0d 4d 4f 56 46 42 4b 20 20 20 20 20 |ile..MOVFBK | 00001360 20 20 20 20 20 4d 6f 76 65 73 20 61 20 66 69 6c | Moves a fil| 00001370 65 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 73 |ename from the s| 00001380 74 6f 72 65 20 61 72 65 61 20 69 6e 74 6f 20 46 |tore area into F| 00001390 42 4c 4f 43 4b 2e 20 0d 4d 4f 56 4e 41 59 20 20 |BLOCK. .MOVNAY | 000013a0 20 20 20 20 20 20 20 20 4d 6f 76 65 73 20 61 20 | Moves a | 000013b0 66 69 6c 65 6e 61 6d 65 20 6f 75 74 20 6f 66 20 |filename out of | 000013c0 46 42 4c 4f 43 4b 20 69 6e 74 6f 20 74 68 65 20 |FBLOCK into the | 000013d0 73 74 6f 72 65 20 61 72 65 61 2e 20 0d 43 48 4b |store area. .CHK| 000013e0 44 49 52 20 20 20 20 20 20 20 20 20 20 43 68 65 |DIR Che| 000013f0 63 6b 73 20 66 6f 72 20 74 68 65 20 70 72 65 73 |cks for the pres| 00001400 65 6e 63 65 20 6f 66 20 61 20 64 69 72 65 63 74 |ence of a direct| 00001410 6f 72 79 20 69 6e 20 61 20 66 69 6c 65 6e 61 6d |ory in a filenam| 00001420 65 20 69 6e 0d 20 20 20 20 20 20 20 20 20 20 20 |e in. | 00001430 20 20 20 20 20 46 42 4c 4f 43 4b 2c 20 61 6e 64 | FBLOCK, and| 00001440 20 72 65 74 75 72 6e 73 20 74 68 65 20 64 69 72 | returns the dir| 00001450 65 63 74 6f 72 79 20 63 68 61 72 61 63 74 65 72 |ectory character| 00001460 2c 20 69 66 20 74 68 65 72 65 20 69 73 0d 20 20 |, if there is. | 00001470 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6e | on| 00001480 65 2e 20 0d 53 45 54 44 49 52 20 20 20 20 20 20 |e. .SETDIR | 00001490 20 20 20 20 53 65 74 73 20 61 20 64 69 72 65 63 | Sets a direc| 000014a0 74 6f 72 79 20 69 6e 74 6f 20 61 20 66 69 6c 65 |tory into a file| 000014b0 6e 61 6d 65 20 69 6e 20 46 42 4c 4f 43 4b 2e 20 |name in FBLOCK. | 000014c0 0d 53 54 58 50 52 45 20 20 20 20 20 20 20 20 20 |.STXPRE | 000014d0 20 53 74 6f 72 65 73 20 74 68 65 20 72 65 71 75 | Stores the requ| 000014e0 69 72 65 64 20 70 72 65 66 69 78 20 77 69 74 68 |ired prefix with| 000014f0 20 61 20 66 69 6c 65 6e 61 6d 65 20 69 6e 20 46 | a filename in F| 00001500 42 4c 4f 43 4b 2e 20 0d 4f 50 46 49 4c 45 20 20 |BLOCK. .OPFILE | 00001510 20 20 20 20 20 20 20 20 47 69 76 65 73 20 61 63 | Gives ac| 00001520 63 65 73 73 20 74 6f 20 74 68 65 20 66 69 6c 69 |cess to the fili| 00001530 6e 67 20 73 79 73 74 65 6d 20 4f 53 46 49 4e 44 |ng system OSFIND| 00001540 20 63 61 6c 6c 2e 20 0d 4f 53 48 43 41 4c 20 20 | call. .OSHCAL | 00001550 20 20 20 20 20 20 20 20 47 69 76 65 73 20 61 63 | Gives ac| 00001560 63 65 73 73 20 74 6f 20 74 68 65 20 66 69 6c 69 |cess to the fili| 00001570 6e 67 20 73 79 73 74 65 6d 20 4f 53 46 49 4c 45 |ng system OSFILE| 00001580 20 63 61 6c 6c 2e 20 0d 58 4f 53 41 52 47 20 20 | call. .XOSARG | 00001590 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 20 77 | Vector w| 000015a0 69 74 68 20 65 72 72 6f 72 20 74 72 61 70 70 69 |ith error trappi| 000015b0 6e 67 20 74 6f 20 4f 53 41 52 47 53 2e 20 0d 58 |ng to OSARGS. .X| 000015c0 4f 53 42 47 45 20 20 20 20 20 20 20 20 20 20 56 |OSBGE V| 000015d0 65 63 74 6f 72 20 77 69 74 68 20 65 72 72 6f 72 |ector with error| 000015e0 20 74 72 61 70 70 69 6e 67 20 74 6f 20 4f 53 42 | trapping to OSB| 000015f0 47 45 54 2e 20 0d 58 4f 53 42 50 55 20 20 20 20 |GET. .XOSBPU | 00001600 20 20 20 20 20 20 56 65 63 74 6f 72 20 77 69 74 | Vector wit| 00001610 68 20 65 72 72 6f 72 20 74 72 61 70 70 69 6e 67 |h error trapping| 00001620 20 74 6f 20 4f 53 42 50 55 54 2e 20 0d 58 4f 53 | to OSBPUT. .XOS| 00001630 43 4c 53 20 20 20 20 20 20 20 20 20 20 56 65 63 |CLS Vec| 00001640 74 6f 72 20 20 77 69 74 68 20 65 72 72 6f 72 20 |tor with error | 00001650 74 72 61 70 70 69 6e 67 20 74 6f 20 4f 53 46 49 |trapping to OSFI| 00001660 4e 44 20 77 69 74 68 20 41 3d 30 3b 20 75 73 65 |ND with A=0; use| 00001670 64 20 74 6f 0d 20 20 20 20 20 20 20 20 20 20 20 |d to. | 00001680 20 20 20 20 20 63 6c 6f 73 65 20 61 20 66 69 6c | close a fil| 00001690 65 2e 0d 58 4f 53 47 42 50 20 20 20 20 20 20 20 |e..XOSGBP | 000016a0 20 20 20 56 65 63 74 6f 72 20 77 69 74 68 20 65 | Vector with e| 000016b0 72 72 6f 72 20 74 72 61 70 70 69 6e 67 20 74 6f |rror trapping to| 000016c0 20 4f 53 47 42 50 42 2e 20 0d 43 41 4c 55 54 49 | OSGBPB. .CALUTI| 000016d0 20 20 20 20 20 20 20 20 20 20 4c 6f 61 64 73 20 | Loads | 000016e0 61 6e 64 20 72 75 6e 73 20 61 20 75 74 69 6c 69 |and runs a utili| 000016f0 74 79 20 66 6f 72 6d 61 74 20 66 69 6c 65 2e 0d |ty format file..| 00001700 0d |.| 00001701