HADFS D!Boot ? )@  DZL00 L L  ii3籨)_ @  00@X M5 N ,z0l  `ISK   G0S襨8 i m  8  H h )؍m8Ш0` X  LHADFSROM  Press BREAKNo SRAM Not a system disksExtras GDemoAgs N?YfDemoGPb N? x]jExamie M?@ M qFredDsk/sD?|JimDik/sH?SHNFSFrnt F?pbДNFSTeterK?pu|pYPrInf N?PUhRSImgile F?RSLin/s H?`JZ RSRAMisk F?`SideDsk/sF?` %.`Stats ? pSuppot/sM?0G6{Updats O?` 0998)a`4SoftRTC0.10 (23 Nov 1992)(Untitled_Disk) (C)JGH D?5%MCode r_zg$MDump ?0 -Mouse = ?I 5/pc8s L?Tv@q1PrLis ? 3Repai ry=p6Repea jq{x q?ROMS ? JScrLod ?@LScrol ^{6O1.00 u H h)i0   C   C L u  : . ' `ߎ Ҡ L `  `"LTitle: Option: Dir. Lib. Owner Public Support/s ct  LDA sect+1:ADC #LL4$HADFS5.50 (15 May 2007)H(C)J.G.Harston UH 09h L %#*HHH hhhHh`H hl Dhʂp݂4GJMH B 0 )ϝ H)0 h JJJJ) hı) H h `x( 8 H ނ B7)M 5 7( @ ~hȦ` )@`@ =  `H hH h`H)@M)@Mh`H h 77`-77`Hz 0IT@-y @)! qPress CTRL-BREAKLh`xԠ hH _ q No date h? =`BOOT H ݃h)H ݃`h `HZY7Q 0"@EH h   )h` q6: QLȂ Lh`L%ZLu` t ~ ч ` чѰ Ѱ`L) %`HADFS  RH h &`'`(`` _ q 5.50 ` qHarston ADFS`H < h ` ݃ h.H(` N Ɠ 7`7` L) ɓ0 ) LH.47@I 7 .h7s if it were being typed in at the keyboard. This is usually used with B*OPT4,3b to B*EXECb a !Boot file. If a file's execution address is &FFFFFFFF or the load address if &FFFFFFxx, then attempting to do B*RUN b will do B*EXEC b instead. B*EXECb without a filename closes any open B*EXECb file. D*FILES Utild B*Filesb lists the information on all the currently open files. The display shows each channel's object information, sector start, current pointer, extent, directory sector, disk ID number and allocated space. The object information will be either *CLOSED* or start IN, OT or UP for OPENIN, OPENOUT or OPENUP. The next six bits are the EOF flag, Directory, Write attribute, Read attribute, Output buffer modified, Input buffer present. An example display would be: B>*Files 25 OT..WROI 00:0004E5 PTR=0000002A EXT=00000037 Dir:00004A ID:D951 Alloc=000040 26 IN.D.... 01:000047 PTR=00000000 EXT=00000300 Dir:000047 ID:F01D Alloc=000003 27 UPE.WROI 00:000285 PTR=0000023B EXT=0000023B Dir:0000D3 ID:D951 Alloc=000003 28 *CLOSED* 00:000000 PTR=00000000 EXT=00000000 Dir:000000 ID:0000 Alloc=000000 29 *CLOSED* 00:000000 PTR=00000000 EXT=00000000 Dir:000000 ID:0000 Alloc=000000b D*FORMnn Utild This command, which needs to be B*ENABLEdb, will format a disk in drive 0 or 1. The number of tracks is specified by nn, this can be from 1 to 255, though sensible values would be 40, 80 and 160. The formatted disk is a blank data disk with the title B(Untitled)b. The command can be used without HADFS selected, and if so, the drive parameter can be 0 to 3 which will create a blank DFS disk. As an example, B*FORM160 0b will format a double-sided 80 track disk. Many disks and disk drives can actually access about 82 tracks, so you could use B*FORM164 0b to format a double-sided 82 track disk. D*FREE () Filingd This displays the free space available on the disk, or the disk the CSD is on if no drive is given. An example would be: B>*FREE 000193 Sectors = 103,168 bytes free 0004AD Sectors = 306,432 bytes usedb D*HADFS Utild This command selects the HADFS. Once selected, HADFS becomes the current filing system and all filing operations are directed to it. HADFS can also be used as a temporary filing system using the prefix B-HADFS-b. D*HELP MOSd Displays list of helpful information. HADFS responds to B*HELP HADFSb to list the HADFS Filing commands and B*HELP UTILSb to list the HADFS utility commands. `Ƚ6`Ա)[ A .Ƚ78h 6`7``HADFsFUTILs(STATUsCONFIGUReSHUtCLOSeHADFsSETDATeTIMeوACCESsޓACCOUNtBYe݊CDIrˊDELETeDIrENABLeEExFREeVINFoINSTALlI Am@LIb̋MApYMOUNtRENAMeTITLe(dd/mm/yy (( ($)) () (( ) Filingd This command is used to log on to a specified directory on a disk. An example would be: B*I AM PROGRAMSb which would set the User Root Directory and the CSD to I$.PROGRAMSi on the default user drive, normally drive 0. A directory I$.Libraryi is looked for on the default library drive and the logged on drive if different, and if found, the library directory is set to it. The autostart command is then executed (see B*OPT 4b). A drive other than the default user drive may be logged on by prefixing with a drive identifier, and subdirectories can be logged on to, eg: B*I AM :1.WORK.SHEETSb would log into the directory IWORK.SHEETSi on drive 1, and look for a library directory on drive 1 and then the default library drive. If the specified directory cannot be found, then B$b on the default user drive is logged into instead. D*INFO Filingd This displays the file information for a particular file, eg: B*INFO MATHSb produces a string of information about the file IMATHSi. The format is: For example, the above command may produce the following output: B MATHS FFFF1900 FFFF8023 000734 WR/R 22/05/1988 000092b When you do a B*INFOb on the root directory, you are given information on that drive, eg: B Drive 0: WordProcessing 06/02/1991 Size: 400K ID: 7632 HADFS 0.44b This gives the disk title, the date is was created, its size and ID code, and what version of the HADFS ROM is installed on it. D*INSTALL () ($) () (D) () Filingd This very important command creates an HADFS disk, installing on it the required DFS files to partition it and setting up the root directory (I$i). B*INSTALLb can be used on disks that already have HADFS installed on them to install the current version of the software, or to change the disk name. If the B$b parameter is given, then a new root directory is created, effectively deleting everything on the disk. You must give the drive number and a name when using the B$b parameter. Also, the command must first be B*ENABLEbd. The disk must already be formatted as an HADFS or DFS disk, either 40 or 80 track, single or double sided. You can do this with the B*FORMb command, which will create a blank HADFS Data disk. HADFS works best with 80 track double sided disks, but you can specify other size disks with the Bb parameter in either number of tracks this codeN``HHw ݂hh`(PP FGlVluu457)7 }N7.7`Hh ч` Bad option a  M)M Lǩ8 )0HH B 󎅲h%hEI𨩢Lhh`iH hI`NI-4N4NI-5 N5ӊjjjjI@ )@БHH hh`L 6L v0L a qDrive X q:   ɓ8 A q Size: 0!)!JjJJJi q*2L:­)*,0FffFffH _hK L u q ID:  y ɓ0) qData4 cL  ȩ . L } }ʽL  `Off)LoadRun)Exec A L. - , q (  q) ȑ qPublic0 qOwner  .   q Option 0 q (  I ) q Dir.  q Lib.  L, $0@ 6+ƽ ȑ0 L Γ t ) . iм Т`HH)M)M8hh`  Unsupported directory, ! )`, #ei`  `` V `H  (   ; h`Qƒ 8`RWELrwePD Γ  q ȱ) L , 0 ***j(j(j`H ϒ q t ɓ @ ɓ, 0 hL /LJJJ 8ȱ) 8(*)Q)Q****) H*hj H**hjH*hjj)iQddH h H . h 2L`ȱ  ɓ L) H v0  y 6©3ñ!:/)ߢƒ Bad attributee)INEÅÐ*&jL@ , H ş HHH)  ʔ qfree hhhh ʔ qused `8…` A q bytes ` q Sectors = ` a$0# qFree Space Map, drive X …â $0)   +   Ɠ ɓ}}и$0 `` ɂȱHHȱȱȱȱȩ˪ɀʆ P8 Ǜhhʠ ȑ`)`` e`e` - HH thhh` 敩HH Lhh` d4M)MI@4 N-5L eioZd h o/+N 55N-4 LpL`N-4LLpѥXR8ȭj jkkji mleHmm h m nlPPlee`S$KkHejHoVHVWHW7H ۅj d'o"Heikjʎl dhh7 or number of sectors. Using the BDb prefix will create a data-only disk by leaving off the DFS installation files. The Bb parameter can be one of the following: Bb number of tracks, eg 160 for 80 track double sided. BKb size in K, eg 400K. B&b the total number of sectors, eg &640 All of the above examples give a size parameter for a standard 80 track double-sided HADFS disk. If the size is followed by B*2b, then the disk is a split disk, that is, a disk with less than 80 tracks on one side. An example of this is a 40 track double-sided disk. This would be B*INSTALLbed with B40*2b as the size parameter. If no size parameter is given, then a size is looked for on the disk. If there is no size already on the disk, ie it has never been B*INSTALLbed before, a BBad numberb error will be generated. Using the BDb prefix can only be used when creating a blank disk. As an example, B*INSTALL 0 $ DataDisk D 40b would install a 40 track disk as a 98.5K HADFS data disk. If you use the command B*INSTALL ?b a brief reminder of the size parameters is displayed. The Bb can be one to sixteen characters long, but should be at least two characters and should start with a letter to distinguish it from a drive number. D*LIB () Filingd This sets the library directory to the directory given. The library directory is where machine code command files are searched for if they cannot be found in the current directory with B*b and B*/b. The search path followed to find a file to run is shown below. If a file is found, it is loaded and executed, else the search path is followed onwards towards the end. So B*KEYb is matched as the MOS command to reprogram a function key, B*/KEYb bypasses the MOS and is sent to HADFS to search for a general command file, and B*RUN KEYb would look for a machine code file in the current directory only. After a B*MOUNTb, the LIB is set to I$.Libraryi on the mounted disk if it exists, or to I$i if it doesn't. Search path used to run files B*\bname B*bcommand B*/bname B*RUNb name | | | | | MOS looks in MOS rom | | | | | | | V | | | Look at sideways rom | | | commands | | | | | | V V | | Look at filing system | | commands | | | | | | | \-----------\ | | | | | | | V V V | HADFS looks in CSD HADFS looks in CSD | | | | V | | Yes Does filename include | | /------ B$b, B%b, B&b, B@b H hhWhVpfhp[ehL`mln)H ЙhI8eLTeL`G)G0@BC*) FG,zH)I -hHG0B)?iCjjjjjj(jjjj)FD)Ej) GG0)@LlG)!cG)hH @%@ F @ @G)!hL ЙƸL0 A` A ʐhLd"$( ijqpnjȌe)cba`` he Й``Heiihegihii`H hHɎiJȽhS  6C 0 .  2Ƚ 6: .ȵ 2 L} "o1@R^ at Clock errorLate DMAID CRC errorData CRC errorDisk read onlyTrack 0 not foundWrite faultSector not foundDisk error 00Drive not presentH 9hL `LH h`H,z06.. B!Hu h)膺h(`,)H" hP檩oL)lL PH *@ʐʄ8帅ʥ( LЛ H h(h`ƅDžȅ` a7/`HH  HH hhhhL߲hhh` 1 )1`e1 Not an HADFS diskGF`HH  hhLݩ`)"H c h)`8H 1)ŷ a,1p# c  )@ 1 @11) % c  ) 1 1h`HHLґ AHH$ % , -1 ( ) 1 H hh`H **/*+*'ޠ HJJi@ h0$1&%G$h`HHHH+ 򩞅  ًhhhh( )`Library ` A 0` not found  Bad filename$` )!`@` ޞ ` 2 ۢ ͞.  L   ^A@I:I'$A2ŷHHH ahhh $`LL. , GL H h% $0L`  @  ڟ ޞ <' < ڟȅ`0:A )_/)` Bad drive')2`H , H= ȑ01#*)I  *hi` .и V$0L h` Escape `F JG`ƥ  G ,HH ') . i Broken directory hh`ȱȩ, ` Hi h`HĄŠąȱą 0h `ah Ĥ`L)g;Hiih`H8h` v ` !*-273G64H)4hj@j)$ (# ` hor B:b | | | | | | | | No | V V V V | | HADFS looks in LIB | \------\| | | | | | V V V | Master computers check | | LIBFS | | | | \-----------\ | | V V V BBad commandb error BFile not foundb error D*LIST DFS/MOSd This command displays the contents of the named file on the screen, with each line of text preceeded with a line number, starting at line 1. D*LOAD () MOSd This loads the named file into the computer's memory, starting either at the specified address, or at the file's own load address if no loading address is specified. If the high byte of the load address is &FF, ie addr=&FFxxxxxx, then the file is loaded into I/O memory. If the high byte is not &FF, then the file is loaded into language memory. If there is shadow screen memory available and the load address is &FFFDxxxx, then the file is loaded into the shadow memory, regardless of which memory is being used to display the screen. If the load address is &FFFExxxx, then the file is loaded into whichever memory is currently displaying the screen. If the load address is &FFFFxxxx, or there is no shadow screen, then the file is loaded into normal I/O memory. D*MAP () Filingd This displays the free space map for the selected drive, or the drive of the CSD, if none is given. D*MOUNT () Filingd This abandons any open files and dismounts all the disks preparatary to inserting a new disk. You should always use this command, or B*BYEb, before changing a disk, as directory information is kept in memory to speed up disk accesses. If no drive parameter is given then the default drive, usually drive 0, is mounted. After a B*MOUNTb, the CSD and URD are set to I$i on the mounted drive, and LIB is set to I$.Libraryi if it exists on the mounted drive, or I$i if is doesn't. D*OPT ( ()) MOSd This is used to set various file options. These are: B*OPT 0b - This resets OPT 1,2,3,6 and 7 to their default values. B*OPT 1b - Sets level of file information messages given on LOAD and SAVE commands: B*OPT 1,0b gives no messages (default) B*OPT 1,1b gives detailed messages B*OPT 2b - Sets the filing system number returned by OSARGS 0,0. With this you can make HADFS pretend to be a different filing system, eg setting B*OPT 2,5b will make it be recognised as NFS. Default is 16, and you cannot set to 4, as that is the value of DFS. B*OPT 3b - Sets the auxilary filing system recognit`H LhL xH)?ı)đđh H) đ hHNI3à)*&j )ÑĠ (j)à )?Ñ h)H xĈĠ Ĉ)  Ġ* פ,ih07*&ÈI3ĠĠH *hjJJà )à` ȭJJJJȩȑ` Entry locked E v0 ᤠ0 y ?H 1HHH  ) V Dir. not emptyhhh h H  )Jƭǭ m6HH  Vhh '(  d( [ h`$Ŵ%ŵ&Ŷ'ŷ ` LDSCBILDRUCan't delete HHHH)ˈʈˠȱ  dhhhh` ȑ`H ȑ0*h` is not a file File execute only Insufficient accessL { פȱ0ɢ  Llĕȱȱ)˥ƥǩȥ Û:HHHH 敩 hhhhh,z0  ` + F A`  Û`H ę8尅ȱ居ȱ岅ȱ Length too longh Ȟ$LV ' File exists   ( E Ч iʥi ݨǑƑ(  ɧ ɧ00  !HHiiđ hh 맥HHHH [ hhhh`Ʌ˩` ) `Lk '8 {       2)   ` m`  Lt `  (j`ts` Hrr ⧩ hȕ 4HHHHHH hhhhhhr tr}rɸ ⧍rt H) بhJ)ȑr q8Q)(H JJJJ ب" )?hH ) بhHJJJJ (jh s )` ! Disk full8"ʨ#˰#А Compaction required#" eʝ !e˝!# $ А` Ln, 0` ,   .`` m  VHHH  ' ݨ [ mH HHH H 2 h hhhh HHH hhh  hhh` *#` Wildcards l*L! !8 !А` \$%7e n(e!e 8ʝ !˝!"eʝ"#e˝#;} -(}!"}"}#$ `(`(}(}LŪ(АL#Ɲ ǝ!ʝ"˝#` ! ! ` ,  ҆ H)h  i` Bad rename Rename across disks v0HH ᤩion number. A filing system can be selected with service call &12, and HADFS recognises the OSARGS 0,0 number set with B*OPT 2b and the number set with this call. B*OPT 4b - This sets the autostart action as follows: B*OPT 4,0b ignores B!BOOTb B*OPT 4,1b B*LOADbs B!BOOTb B*OPT 4,2b B*RUNbs B!BOOTb B*OPT 4,3b B*EXECbs B!BOOTb B*OPT 5b - set the maximum number of channels used. Default 5. B*OPT 6/7b - set drive to use internal or external drivers: B*OPT 6,db drive d uses internal drivers B*OPT 7,db drive d uses external drivers After B*HADFSb, B*MOUNTb or B*BYEb the first access to a drive numbered 0 to 7 first tries to use an external driver with OSWORD 90. If no external driver is found for that drive a flag is set to use internal drivers for that drive. Using B*OPT 7b can force a particular drive to always use external drivers, giving the BDrive x not presentb error if there is no driver. B*OPT 6b returns to allowing internal drivers to be used. The setting for drive 1 is saved in CMOS on the Master and can be set with keyboard links on the BBC B. D*RENAME Filingd This command renames an entry to give it a new name. If the entry is locked, or the new name already exists, you will get a BFile lockedb or BFile existsb error. You cannot rename across disks, and you cannot rename the root I$i directory. If you try to rename a directory inside itself or a subdirectory, you get a BCircular renameb error. D*RUN () MOSd This command is used to load and run machine code programs. It loads a file into memory, and then jumps to its execution address, unless it is &FFFFFFFF or the load address is &FFFFFFxx when the file is B*EXECbed instead. If the file's load address and execution address disagree about which memory the file should run in, (ie, the top byte of the addresses should both be &FF or they should both be not &FF), then the error BI cannot run this codeb will be generated. Using B*b or B*/b is the same as B*RUNb, except that the library directory is also searched. See B*LIBb for more information. D*SAVE |+ ( ()) MOSd This command takes a copy of the specified section of memory and writes it to a file with the given name. If the execution or reload addresses are not given, then they are set to be the same as the start address. If the start address's high byte is not &FF, ie start<>&FFxxxxxx, then la {LV, 0г 敠 򥾍hH Ȟ EhЃ  nfſ_žX hH Ч h=   Ч   V`LkhH`HHH     Circular rename  ͥGhhh  ᤭1)1  h 8LʣL ꇅi ?HhHHi H  _ ߱h hh`X^r^3]ʰʯЮͮMP7`  @ i(  1(`` ч`Ιϙ`H' h ™``  ` _ `   ܽ ԩ```8iii½ià U ʰH ,ʰ Uh ͯHh` 4H 0 0 ,ʰh Hн 4YRH $8 (hHHHHHHH }ƽ}ǽ} sw Can't extend˩@ʹ# "@ʊH [heʝe˝e̝ lhhhhhh h`)ɂ(H ۱ h (Lᱠ ) ʰ` ͅLx}ƽ}ǽ}Ƚ` EOF8 ꇅ̊HHHIH* )  Ա8= ƱH lh,H 1H lh ƱhH Ա l ߱hhhhh`) `=` _) ۱ Is a directory 豽)@) Not open for reading 豽)Ъ Not open for update0 Outside file8HH Ƚǽ  (iȽ ȱ)  hh` 2H ah   1 Disk changed` ꇆĄ@Lw  ) *m _8 ˰O k H} ƽ} ǽ} hI ʽ ˽ ̊H lLh [ ۱VVWW` A Ȟ )H ̴h+$P)LĤ`Ʌ˩@ʊH {h a $0)L養HJ ) { פh*&È*&È*&å)IHh Hh JJJJ=) LH ʈih$P ȱ ȱ) ȱ iȱ)ii)Lˠ$8 8 k Too many openJJJJJIi` JJJJ)`II` %HiI iKhii ͩ̽` Channel ) Channel not openHk1hH=*Ŵ#ŵŶŷ File openi h`` ꇆĄŅ ę Lb u 1 j nguage processor memory is saved. With a machine with no second processor, this will be that same as I/O processor memory. If the start address's high byte is &FF, is start=&FFxxxxxx, then I/O processor memory is saved. If shadow screen memory is available, then a start address of &FFFDxxxx will save the shadow memory, regardless of whether is is being displayed or not. A start address of &FFFExxxx will save the memory currently being displayed, and a start address of &FFFFxxxx will always save the normal I/O memory, whether it is being used to display the screen or not. D*SETLOAD Utild B*SETLOADb sets the specified file's load address to the supplied hexadecimal address. D*SETEXEC Utild B*SETEXECb sets the specified file's execution address to the supplied hexadecimal address. D*SETTYPE Utild B*SETTYPEb sets the specified file's load and execution addresses to the RISC OS-compatible filetype. The load address is set to &FFFxxx00 with xxx being the supplied value. D*SETDATE (dd/mm/yy (d)) Utild When files are created, they are date-stamped. On Master computers, the date for this is fetched from the on-board Real Time Clock. The pre-Master BBCs, however, do not have this feature, and so using this command simulates the date part of it. After using the B*SETDATEb command, you can read the date using the OSWORD 14 call, as on the Master. If there is an on-board Real Time Clock, this will take precedence to the date set with B*SETDATEb as long as the code to access it is in a higher priority ROM than the HADFS. The optional parameter Bdb can specify the day of the week 1 to 7 for Sun to Sat. Using B*SETDATEb with no date disables the function. D*SHUT MOS/Filingd B*SHUTb is similar to B*CLOSEb in that is closes all open files. On Master series computers it closes all open files on all filing systems, leaving the current filing system selected. D*SPOOL () MOSd This command opens a file with the specified name to recieve all the information subsequently displayed on the screen. It is the opposite of the B*EXECb command. B*SPOOLb with no parameter closes any opened spool file. D*STAMP Transientd Sets the date attribute on the specified object to the current date. D*STATUS HADFS MOSd This displays HADFS's current configuration status, that is, the number of channels, which drives are using external drivers, and the current time and date setting. On the Master series, the}ȱ}ȱ}ȱ}ð ,ʐę"8   ½ 8ąɈę P ̹ͥ( ĈĤ`l55HHHH8ɥɰ }; Ḁ̊…˥ʤi ƛ}}} {hhhh8( (*(&ę {   (`ɥHHHHH?HV,zQiH - uh8 F  F Ahh8hɅhhh` u 8 F  F L˷ + H h J' JK1 )@ +'(+ 8( 7( )ʊ J 敄ɘH heL䙩 ` əHȽ! Jh8ɝ`ȹ J0 L` u _)L.#  ! ıƽ ȑ00 . i 8` 豾)!  (芨H hɠ LCɥ)Š`,P`HH qGo? (Y/N)  hh )Y L Not Enabled`' <?Lȱ! ş  6$ (L8 6)ȱ!L] (LA(*(LA) 6)D S(8ȭ0 6(8& ӆ()K A A  8 짭H]h}M  D"J$8J&'("1 [,p"P )  JJ 6(;l,0J.򩾅 P)H@A<ȱ 汱Ʊ辰H >hi(\   $G ( @+. L t`HADFS D!Boot ? )@  DZL00 L L  ii3籨)_ @  00@X M5 N ,z0l  `ISK   G0S襨8 i m  8  H h )؍m8Ш0` X  LHADFSROM  Press BREAKNo SRAM Not a system disks`_NullKeyboard0.12 (01 Aug 1998)O`4SoftRTC0.10 (23 Nov 1992)(Untitled_Disk) (C)JGH ! > BLib.Close 1.00 09Aug1998 :  Close Handling ( ~~~~~~~~~~~~~~ 2: <Close_All:*EXEC F"in%=in%:in%:A%=in%:in%=0:#A% P'out%=out%:out%:A%=out%:out%=0:#A% Z CmdLine H sW) # > BLib.CmdLine 1.00 09Aug1998 :  C settings are saved in CMOS RAM. On the B/B+, the settings are forgotten after power-off, except for the drive 1 status which is defined by keyboard link 2. D*TIME MOSd This command produces a standard display containing the day, date and time, if set. On Master computers, the time will be read from the Real Time Clock. If no RTC is present, then the date can be set with B*SETDATEb, and the time can be set with BTIME=((minutes*60)+hours)*60*100b. The format of the display is DDD,dd mmm yyyy.hh:mm:ss, ie Day, date, month, year, hours, minutes, seconds. D*TITLE () Filingd This will change the disk title on the currently selected or the specified drive. The title can be one to sixteen characters long, but should be at least two characters long, and should start with a letter. In some versions of HADFS, the B*TITLEb command is an alias for the B*INSTALLb command, and will accept B*INSTALLb parameters. D*TYPE <afps> DFS/MOSd This command displays the contents of the named file, as with B*LISTb, except that no line numbers are generated. Q4 Low level fileq Qentry pointsq   This chapter details the filing system entry points as well as some OSWORD and OSBYTE calls provided by HADFS. DOSFILEd DEntry address: &FFDD File and directory informationd On entry: A function code On exit: A object type XY pointer to control block XY preserved control block updated Control block: &00 Address of filename &02 Load address &06 Execution address &0A Length, or start address for SAVE &0E Attributes, or end address for SAVE, or start sector for &FD &12 Functions: &FD Read an object's extra catalogue information into the control block. The load field returns the account numbers, main account in XY+2,3 and auxillary account in XY+4,5. The contents of the execution field is currently undefined. The length field returns the length. The attributes field returns holding the start sector and drive of the object. A is returned holding the object type. &FE Verify a file. Unsupported, returns A=&FE. &FF Load a file into memory. If the low byte of the execution address is zero, it loads to the supplied load address, else it loads to the file's own load address. If the filename does not exist, or is a directSystemDisk �(C)JGH� @�B�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������$ G��������HADFSom O?5x>@�!Boot N?Ы^IJ�tr ���������У�bry ���������X�nu ���������vil ���������УK����������������������������������������������������������������������������������������8Ш0` X  LHADFSROM  Press BREAK�No SRAM �Not a system disk��`��_�NullKeyboard�0.12 (01 Aug 1998)�a�`��4�SoftRTC�0.10 (23 Nov 1992)�(Untitled_Disk) �(C)JGH�������������������������������������������������������������� D?�5%MCode �r��_z��g$MDump � ?0 �-Mouse = ?I 5/pc8s L?Tv@q1PrLis ? 3Repai �r��y��=p6Repea jq���{��x q?ROMS � ?� JScrLod ?@LScrol ^���{��6O � *Basic �CHAIN"!Boot" � *Exec �( *** �2* First three lines MUST NOT be edited �< 8BS Menu, S.Flintham. �F> Modified by J.Ripley, C.J.Richardson, J.G.Harston, v2.20 �P+&87:23;8202;0;0;0;23;2,53;0;0;0:*FX15 �Z[3:7::" at line ";:"FX21":"KEY0"+" LIST "+()+"|M",>127):"FX138,0,128":d: �d b:a:e$=f:e$<>27:g(e$) �n*e$=27:7:d:Dir$="$": "$.!Boot" �x �: �a:*FX4,1 �*FX225,128 � *FX229,1 � *FX12 � � d:*FX4 � *FX225,1 � *FX229 � �: � ݤS:P->&2000:"Too long?" �="!Boot220" 5b:run$=$&600:A%=run$+" "," "):run$=run$,A%-1) >:run$=run$,run$-1):".:",run$,1)):run$=run$,run$-1) -h%256,data%31,l%(14):X%=h%:Y%=X%256:fs "cv$="MODE3TEXT MODE7TTXT ARCHIARCHICHAINBASICLOAD LOAD LIST LIST CALL CALL LDPICLDPICSCRLOSCRLO" ,Jd%=2:i%=2:p%=4:q%=5:r%=6:s%=6:t%=2:u%=3:v%=3:w%=4:x%=3:y%=5:z%=7:aa%=7 6.: h$,n$,m$:26,12:5,2)""h$'5)""h$ @o(V%),5)="985"+n$:f%=((V%),6,2)):e%=((V%),8,2)) f%=1:e%=1:"Exec "+l$+".pc8s":"FX138,0,13":""A$ J28,2,22,37,5 T ^: h+fs:n%:fs%=fs:run$<>"":"Dir "+run$ rBfs%=4:Dir$=":"+gbpbN(5)+"."+Dir$=gbpbN(6) Dir$=Path_Name |$l$=Dir$+".Library":fs%=4:l$="%" =Dir$,1)="$":"Lib "+l$:fs%>4:A%=("%"):A%:#A%:l$="%" bt3$=l$+".7to3":t7$=l$+".3to7":sc$=l$+".Scroll":ar$=l$+".Archive":bo$=" -quit "+Dir$+".!Boot":  ݤfs:A%,Y%,E%:=(&FFDA)&FF LݤgbpbN(A%):X%!1=data%:&FFD1:A%=data%+((1+?data%)(A%>5)):A%?(1+?A%)=13 "=$(A%+1),$(A%+1)+" "," ")-1) ݤPath_Name:A%=6 ݤPath_ory, or an execute-only file, or does not have read access, then an error is generated. &00 Save a file. If a file already exists with the same name, it is overwritten. If the file is locked, or a directory exists with the same name, then an error is generated. &01 Write a file's reload address, execution address and attributes. &02 Write a file's reload address. &03 Write a file's execution address. &04 Write a file's attributes. &05 Read object's catalogue information into the control block. &06 Delete object. If the object does not exist, A returned as &00. If the object is locked, or is not owned, then an error is generated. &07 Create an empty file of defined length. Block as for SAVE. &08 Create a directory. If a directory already exists, there is no error. If a file already exists, an error is generated. &09 Object types returned in the A register are: &FF Execute-only file &00 Object not found &01 File found &02 Directory found, the length field holds the amount of disk space that the directory's catalogue takes up. When reading information on I$i, then A returns 0 if the specified drive does not exist, or 2 if it does exist. The disk size in bytes is returned at XY+2, the disk ID at XY+6,7 and the disk flags at XY+8,9. The date the disk was created is returned in the date field of the attributes. File attributes are returned in four bytes as follows: Byte &0E bit 7 Private 6 Execute only by others 5 Writable by others 4 Readable by others 3 Locked 2 Execute only for owner 1 Writable by owner 0 Readable by owner Byte &0F bits 0-4 Date: day of month 5-7 Date: years since 1981, bits 4-6 Byte &10 bits 0-3 Date: month of year 4-7 Date: years since 1981, bits 0-3 Byte &11 bits 0-3 Undefined (zero) 4-7 Undefined (zero) All the calls update the control block with the catalogue information and return the object type in A. If a call is unsupported, then A is returned preserved. DOSARGSd DEntry address: &FFDA Attribute of open objectd On entry: A function code On exit: A usually preserved X points to zero page location X preserved Y file handle or 0 Y preserved Functions: Y=0 &FD Return HADFS version*100 in A and version and capability flags in zero page. The flags show what code is available in the HADFS ROM: zp+0, b0: *COPY in ROM b4: Date provided b1: Passwords used b5: Full INSTALL b2: *COMPACT/*BACKUP inFull:A%=&106 c n$,p$::X%!1=data%: &FFD1:?(data%+2+?data%+?(data%+?data%+1))=13:n$=$(data%+2+?data%):*DIR ^ On$=n$,n$+" "," ")-1):p$=n$+"."+p$:n$="$"n$="&":p$=p$,p$-1):"DIR "+p$ VA%=6:X%!1=data%: &FFD1:?(data%+1+?data%)=13:n$=$(data%+1):n$<>"":=":"+n$+"."+p$ >X%!1=data%:A%=5: &FFD1:?(data%+1+?data%)=13:n$=$(data%+1) )n$=n$,n$+" "," ")-1):=":"+n$+"."+p$ )os(c$):c$=42 c$="":c$: c$: : ;ݤf:t$,n%,m$,s$,g%,m%::la(f%):t$,n0%:n0%>14:n0%=14 .0,0);(128+s%);1+(17.5-((t$)/2)),0);t$ &n%=0:m%=n0%:m$,s$,s$,s$ 09s$>99:s$100=fs%:s$=s$,2) s$>99:s$="0":m$="" :-o%=s$:o%=0s$<>42:o%=-1-v$,s$,5))10 Des$<>"0":n%=n%+1:l%(n%)=o%:0,1+n%)" "(128+t%)(64+n%)(128+u%)m$,32);: TAB(35,1+m%)CHR$156; N+m%=m%-1:m%<1:0,1+e%);(128+w%);157; XL0,15);(v%+128)"RETURN to select"(128+d%);2,17);(v%+128)time,15); b :*FX21 l20,15);:l%(e%)>0:"Another menu "; "Runs Code 80 Column Text40 Column TextArchive Basic Program Loads Basic Lists Basic Calls Basic LDPIC Picture ScrLoad Pictr ",-14*l%(e%)+1,14); v*g%=get(20,17):(g%&E0)=&60:g%=g%-32 F128+138+139+13+"48OPRSX",g%)(g%>64 g%<=64+n%)(g%=27-1) 0,1+e%);" "; g%=138:e%=e%n%+1 g%=139:e%=e%-1:e%=0:e%=n% g%>64g%<=64+n%:e%=g%-64 0,1+e%);(128+w%);157; $V%=985000000+n$*10000+f%*100+e% 0"48OPRSX"+128+27+13,g%):4,1+e%);">"; =(g%)+(e%) : g(e$):e$=128: "n%,x$,d$,f$,s$:la(f%):d$,n% n%=1(e$,2)) Hx$,d$,f$,s$:s$>99:s$100=fs%:s$=s$,2) s$>99:s$="0":n%=n%-1  :o%=s$:o%>0:f%=o%:e%=1: o%=0 s$="0":  26,31,0,21:e$=e$:d *d$,1)="%":d$=l$+d$,2) 4f$,1)="%":f$=l$+f$,2) >d$<>"":"Dir "+d$ Ho%=-1:u: Ro%=-2:v: \%o%=-3:os(ar$+bo$+"|M -e "+f$): f9 IFo%>-7 ANDo%<-2 ANDe$<>CHR$13:o%=INSTR("XSR",e$)-7 po%=-4:os(f$+bo$): z#o%=-5:Key("*Load "+f$+"|F|M") 0o%=-6:Key("LOAD """+f$+"""|MLIST|F|N|M|O") o%=-7:os(f$+bo$): $o%=-8:Key("*LdPic "+f$+"|F|M") &o%=-9:Key("*ScrLoad "+f$+"|F|M") *:I%=s$+"//","//"):s$,I%-1)="RUN": &os(s$,I%-1)):s$=s$,I%+2):s$=""  : #u:e$="4":os(t7$+" "+f$+bo$) / PROCos(sc$+" -lp *lp -4 "+t7$+" "+f$+bo$) os(sc$+" -lp *lp "+f$+bo$)  (v:e$="8":Z%=0:os(t3$+" "+f$+bo$) $e$="P":Z%=1:os(t3$+" "+f$+bo$) e$<>"O":d:"Run "+f$:  $;Key(A$):"KEY0 "+A$:"FX21":"FX138,0,192":22,7::: .ݤya:A%,B%:A%=&7A 87:B%=255-((&FFF4)&FF00)256:B% B%<>182B%<>?&80 B=B% L'la(f%):m$,n%::m ROM b6: Fast OSGBPB b3: Time provided b7: Random access output zp+1: b0: Scattered workspace b4: Mouse driver provided b1: New workspace b5: Only small disks supported b2: - b6: Hard disk supported b3: - b7: FRED/JIM ramdisk supported zp+2: version number x of x.yy zp+3: BCD version number yy of x.yy &FE Return last drive used to zero page. &FF Update all files to media, zero page ignored. &00 Return filing system number in A, zero page ignored: 0 No current filing system 12 Ram filing system 1 1200 baud cassette 13 2 300 baud cassette 14 3 ROM filing system 15 4 Disk filing system 16 Harston ADFS 5 Econet filing system 17 6 Teletext/Prestel telesoftware 7 IEEE filing system 29 DOS filing system 8 Acorn ADFS 45 Nexus filing system 9 Host filing system 71 BeebItFS 10 Videodisk filing system 92 LinkFS 11 Coprocessor filing system The filing system number in HADFS can be changed using B*OPT 2b to any value between 5 and 16. &01 Return address of any parameters after a filename to zero page. &02 Return version number in A, zero page ignored. &03 Return libfs number in A, zero page ignored. &04 Read disk space used to zero page. &05 Read disk free space to zero page. &06 Y<>0 &80 Read information about an open file to zero page (unimplemented). &FD Read/write system parameters to zero page. Y=&04..&0D reads the values and Y=&84..&8D writes the values: Y=&05/&85 USERNUM Y=&06/&86 CURR - current directory in memory Y=&07/&87 reserved Y=&08/&88 CSD - Currently Selected Directory disk address Y=&09/&89 LIB - Current library disk address Y=&0A/&8A URD - User Root Directory disk address Only CURR, CSD, LIB and URD are guaranteed to be valid. All other values are liable to change from version to version. &FE Unsupported, zero page ignored. &FF Update file on channel Y to media, zero page ignored. &00 Read PTR for channel Y to zero page. &01 Write PTR for channel Y from zero page. If the PTR is moved past the end of the file, the file is extended with zerosS*s and zero is returned in A. &02 Read EXT for channel Y to zero page. &03 Write EXT for channel Y from zero page. If the length of the file is reduced, the end disappears. If the length is increased, the file is extendedS*s as with &01 and zero is returned in A. &04 Read size allocated to file on channel Y to zero page. &05 Read EOF status of file on channel Y. If PTR=EXT then zero page is set to -1, el$,m$,m$:f%<2: V m$,n%: `.m$,m$,m$,m$:n%=n%-1:n%<1:f%=f%-1:f%<2: j: t' Disk name,Issue number,Issue Date ~, Harston ADFS System Disk,06,01/09/2006 :  HADFS System Main Menu ,7 1 Read Latest Updates file,,Extras.Updates,-1 ! Read HADFS Manual files,,,2  Library Programs,,,4  Utility Programs,,,3  Disk Initialisation,,,5 0 Alter Time & Date,,Utils.SetDate -force,-7 * -- Exit To Basic --,,,*Mount//*Basic :  HADFS Manual Files,10 & Introduction,,Manual.Chapter1,-1 �+ The Filing System,,Manual.Chapter2,-1  0 Filing System Commands,,Manual.Chapter3,-1 5 Low Level File Entry Points,,Manual.Chapter4,-1 5 The Filing System Utilities,,Manual.Chapter5,-1 (( Error Messages,,Manual.Chapter6,-1 24 HADFS Programming Examples,,Manual.Chapter7,-1 <5 HADFS Technical Information,,Manual.Chapter8,-1 F5 HADFS As Econet Environment,,Manual.Chapter9,-1 P& Bibliography;;Manual.ChapterA;-1 Z# -- Return To Main Menu --,,,1 d: n Utility Programs,9 x2 DMap - Display Disk Map,,Utils.DMap,-7 9 HDInit - Initialise Hard Drive,,Utils.HDInit,-7 5 HEdit - Disk Sector Editor,,Utils.HEdit,-7 5 HUtils - Utilities Program,,Utils.HUtils,-7 5 MCat - Multiple Cataloguer,,Utils.MCat,-7 / Rescue - File Rescue,,Utils.RESCUE,-7 8 Intern/s - Make Internal Disk,,Utils.Intern/s,-4 9 VisCompact - Visual Compaction,,Utils.VisCompact,-7 ) ----- Return To Main Menu -----,,,1 :  Library Programs,9  BACKUP a Disk,,%.BACKUP,-4 " COMPACT a Disk,,%.COMPACT,-4 % ETree Disk Examiner,,%.ETree,-4 + MakeLP Printer Generator,,%.MakeLP,-4 ( Scroll Text File Reader,,"""""",-1 ) TreeCopy File Copier,,%.TreeCopy,-7 "$ Filer File Manager,,%.Filer,-7 ,, Read Library Info,,Extras.Library/t,-1 6# -- Return To Main Menu --,,,1 @: J Disk Initialisation,7 T3 Format Drive 0 as 400K disk,,,*FORM160 0//RUN ^3 Format Drive 1 as 400K disk,,,*FORM160 1//RUN h, Initialise Hard Drive,,Utils.HDInit,-7 r% [ ],,,1 |1 Install System on Drive 0,,,*INSTALL 0//RUN 1 Install System on Drive 1,,,*INSTALL 1//RUN % --- Return To Main Menu ---,,,1 : (ݤtime:?X%=0:A%=14:&FFF1:?X%=0:="" X%?24=13:X%?15=13:A%=$X%,5,2)>31:$(X%+11)=($(X%+11)-16*A%-100*($(X%+11)<1981)):A%:X%?6=13:$(X%+4)="0"+($(X%+4)-32),2):X%?6=32 X%?15=46:=$X% Xݤget(x%,y%):p%,v%,A$:p%=:v%=:x%,y%);time,17);p%,v%);:A$=(100):A$<>"":=A$  getdate $"Enter the date (DD/MM/YY): "d$ -d$," ")=0 se zero page is set to 0. &06 Ensure file size of file on channel Y of at least the value in zero page. Actual size allocated is returned in zero page. Where zero page is ignored X is ignored and so can be left set to anything on entry. S*sCurrently, extending a file does not pad it with zeros. The extra length of file will contain whatever was originally on the disk. DOSBGETd DEntry address: &FFD7 Read (get) a byted On entry: Y channel number On exit: A byte read Y preserved Cy EOF status. If the byte read is after the end of file, the carry flag is set on exit. After the EOF byte has been read, the next read produces an error. DOSBPUTd DEntry address: &FFD4 Write (put) a byted On entry: A byte to be written On exit: All preserved Y channel number DOSGBPBd DEntry address: &FFD1 Read or write multiple bytesd On entry: A function code On exit: A 0 if call supported XY pointer to control block <>0 if unsupported XY preserved control block updated Control block: &00 Channel number/cycle number &01 Data address &05 Number of bytes/filenames to transfer &09 PTR for transfer/directory pointer &0D Functions: &01 Write bytes to media using new PTR &02 Write bytes to media ignoring new PTR &03 Read bytes from media using new PTR &04 Read bytes from media ignoring new PTR On exit from calls &01 to &04 the 'number of bytes' field holds the number of bytes not transfered. The 'data address' field is updated to point to the next location for data transfer. The PTR for the file is updated by the number of bytes transfered and placed in the 'PTR' field. In functions &01 and &03 the PTR is first set to the supplied value before transfering data. The carry flag is returned set if EOF was met. The EOF-error-flag is reset. &05 Get media title of CSD disk and boot option into data block: &00 length of title (n) &01 title in ASCII characters &01+n startup option &02+n drive number &03+n &06 Get currently selected directory name into data block: &00 length of drive identity (n) &01 ASCII drive identity (drive number) &01+n length of directory name (m) &02+n directory name in ASCII characters &02+n+m ownership: &00 - owner, &FF - public &03+n+m &07 Get current library name into data block: &00 length of drive identity (n) &01 ASCII drive identity (drive number) &01+n length of library name (m) &02+n library name in ASCII cha d$<>"":d$=d$+" 0"+äday(d$) "SETDATE "+d$ ""Enter the time (HH:MM): "t$ &t$<>"":=(60*t$+t$,2))*60*100  Lݤday(d$):dy%=d$:m%=d$,d$,"/")+1):y%=1900+d$,2):y%<1980:y%=y%+100 y%=y%400:=(y%*365.25+m%*30+dy%+"120112234455",m%,1)+((y%4)=0)-((y%-1)100)-(m%>2 ((y%4)=0 (y%100)<>0 y%=0))+3)7+1 Extras �������������:DemoArgs NY��W5 �  > DemoArgs 1.03 �) Demo of calling OsArgs, HADFS 5.32+ �: �(:"OsArgs &FD Demo"' �2 Y%=0 15: A$ �<""Y%=";hex(Y%,2) �  > DemoArgs 1.03 �) Demo of calling OsArgs, HADFS 5.32+ �: �(:"OsArgs &FD Demo"' �2 Y%=0 15: A$ �<""Y%=";hex(Y%,2);", ";A$;":"; �FL IFY%=0 OR Y%>3:data%=FNargs(&FD,Y%,0):PRINTSPC(31-POS);FNhex(data%,8); �P1data%=args(&FD,Y%,0):(31-);hex(data%,8); �Z :: �d: �n' OSARGS call ignoring X, returns A �x:ݤargs0(A%,Y%): E%,X%,!&70:E%=Y%:X%=&70:=(&FFDA)&FF �: �7 OSARGS call with data. Returns any returned data �4ݤargs(A%,Y%,!&70): X%,E%:?(P-3)=0:E%=Y%:Y%=0 �X%=&70: &FFDA:=!X% �: �# Hexadecimal padded with zeros �$ݤhex(A%,N%)="0000000"+~A%,N%) �: � Decimal padded with zeros �$ݤdec(A%,N%)="00000000"+A%,N%) �: � Decimal padded with spaces �%ݤDec(A%,N%)=" "+A%,N%) : + Version and flags,(TAPE),(TAPE),(ROM)  **/**/**/** " ENABLE/IAM/PRIV/USER , CURR,**/**/**/** 6! CSD,LIB,URD,**/**/OPTFLG/** @0 **/**/DRVEXT/DRVINT,,(TELESOFT),(TELESOFT) DemoGbPb N x]��W< �  > DemoGbPb 1.02 �! Check can read various info � wit �  > DemoGbPb 1.02 �! Check can read various info � with OSGBPB �(: �2*OSGBPB=&FFD1::chn%=0: :Close:: �< ctrl% 20,data% 80 �F go: �P: �Z%Close:chn%:A%=chn%:chn%=0:#A% �d �n: �xݤgbpb(A%) � X%,Y% �X%=ctrl%:Y%=X%256 �X%!1=data% �=( OSGBPB) &FF �: � pr(ad%) � l% �"Len=";?ad%;" """; �, ?ad%>0 l%=ad%+1 ad%+?ad%:v(?l%): � """";: �: �4v(A%): A%<31 A%>126 """(";~A%;")"""; A% �"ݤh(A%,N%)="0000000"+~A%,N%)  :  ݤdrv(A%) " A%<10:=A% =(A%+55) ,: 6 dir @"Drive: ";:pr(data%) J&'6"Dir: ";:pr(data%+1+?data%) T^o%=?(data%+2+?data%+?(data%+1+?data%)):'6"Owner: ";~o%;" ";:o%=00 "Owner" "Public" ^ h: rgo |"A%=5, Read disk title:" A%=gbpb(5) "A%=";A%;" ";:pr(data%) F'6)"Opt: ";?(data%+1+?data%);" Drive: ";drv(?(data%+2+?data%)) : "'"A%=6, Read directory name:" A%=gbpb(6) "A%=";A%;" ";:dir :  '"A%=7, Read library name:" A%=gbpb(7) "A%=";A%;" ";:dir : racters &02+n+m ownership: &00 - owner, &FF - public &03+n+m &08 Read filenames from current directory into data block: &00 length of filename 1 (n) &01 filename 1 in ASCII characters &01+n length of filename 2 (m) &02+n filename 2 in ASCII characters &02+n+m etc... The first call to function &08 should be made with the directory pointer set to zero. This will read the first filename, and the pointer will be updated so that the next call will read the next filename. On exit, the 'number of filenames' field holds the number of filenames EInotie returned. When no filenames are left, the call returns with the 'number of filenames' left unchanged and the carry flag set. &09 Reads work/login filename or entries from specified directory. If XY+0 is zero, reads command line parameters after a BASIC bootstrap: &00 length of text string (n) &01 Any command line parameters &02+n If XY+0 is a channel number of an open directory, reads a null- terminated list of directory entries. The function is called as for OSGBPB 8, but XY+5 returns the number of filenames read. &0A Read entries and information from the opened directory whose channel number is in XY+0 or the CSD if XY+0 contains zero. This function is called as for OSGBPB 8, but XY+5 returns the number of filenames read. Each record is a whole multiple of four bytes long: &00 Load address &04 Execution address &08 Length &0C Attributes &10 Object type (1=file, 2=directory) &14 Object name, null terminated xxx next record &0B Read entries and information from the opened directory whose channel number is in XY+0 or the CSD if XY+0 contains zero. This function is called as for OSGBPB 8, but XY+5 returns the number of filenames read. Each record is a whole multiple of four bytes long: &00 Load address &04 Execution address &08 Length &0C Attributes &10 Object type (1=file, 2=directory) &14 Sector start address &18 Five zeros (reserved for centisecond time since 1900) &1D Object name, null terminated xxx next record &0C Note: Calls with A=&09, &0A, &0B are only available from version 0.49 onwards. DOSFINDd DEntry address: &FFCE Open or close a filed On entry: A function code On exit: A channel number, or Y channel number for A=0 or 0 if no file opened XY pointer to filename XY preseved If function not supported, A is returned as zero. %'"A%=8, Read directory entries:" 11"Num: 3 Index: 0"  ctrl%!5=3:ctrl%!9=0:!data%=0 BA%=gbpb(8):"A%=";A%;11);"Num: ";ctrl%!5;" Index: ";ctrl%!9 &9d%=data%:z%=ctrl%!5 2:6;:pr(d%)::d%=d%+1+?d%: 0: :"'"Checking OSGBPB extensions" D(chn%="%":chn%=0:"Can't open '%'." N@ B%=9*2 255*2:ctrl%!5=3:ctrl%!9=0:?ctrl%=chn%((B%1)<>0) X%!data%=0:data%!8=0:A%=gbpb(B%2) b!data% data%!8:"A%=";B%2;"/";chn%((B%1)<>0);11)"Num: 3 Index: 0"'"A%=";A%;11)"Num: ";ctrl%!5;" Index: ";ctrl%!9:dump l v #chn%  : #dump:d%=data% data%+40 4 h(!d%,8);" ";::'""""; d%=data% data%+40 v(?d%)::'  Examine M@ M ��W6� �  >Examine 2.13 � Examine files in directory � (C) J.G.Harston �(< �  >Examine 2.13 � Examine files in directory � (C) J.G.Harston �(< 25-May-98 V2.05 JGH: Access displayed as --WR--wr etc. �24 23-Jun-98 V2.10 JGH: Update date read from net �<F 03-Oct-99 v2.11 JGH: Displays time&date from load&exec addresses �F3 v2.12 JGH: Can display raw fileinfo �P0 20-Sep-05 v2.13 JGH: Fixed date conversion �Z2 ctrl%31,data%100:total%=0:X%=ctrl%:Y%=X%256 �d: �n raw%=-2 �x examine � �: �4examine: end%,index%,total%:index%=0:total%=0 � fs%=fs: �.X%!1=data%:X%!5=1:X%!9=index%:A%=8: &FFD1 �(index%=X%!9:end%=X%?5: end%=0:file � end%<>0 � �: �file: f$,type% �.?(data%+?data%+1)=13:f$=strip($(data%+1)) �;X%!2=0:X%!6=0:X%!10=0:X%!14=0:X%!18=0:type%=file(f$,5) �R fs%=5:$(data%+8)=f$:osw(&14,&12002000,&40000000): data%?3=0:X%!15=data%!10 Atotal%=total%+X%!10: X%?10<>0:total%=(total% &FFFF00)+&100 E f$;(11- f$);h0(X%!2,8);" ";h0(X%!6,8);" ";h0(X%!10,8);" "; .raw%: h0(X%!14,8);" ";h0(X%!18,8);" "; "Eraw%: acc(X%?14,type%);" ";date(X%!15);" ";h0(X%?17,2);" "; ,M type%=1:"File" type%=2:"Dir." type%=&FF:"Run " "&";~type% 6LongDateToShort @t 9;d0(day%,2)"/"d0(month%,2)"/"d0(year%,4)" "d0(hour%,2)":"d0(minute%,2)":"d0(second%,2)"."d0(centi%,2) J T: ^ݤacc(a%,b%): a$ h b%=2 a$="D" a$="-" r$(a%128) a$=a$+"P" a$=a$+"-" |$(a%8) a$=a$+"L" a$=a$+"-" $(a%2) a$=a$+"W" a$=a$+"-" $(a%1) a$=a$+"R" a$=a$+"-" $(a%4) a$=a$+"E" a$=a$+"-"  a$=a$+"/" $(a%32) a$=a$+"W" a$=a$+"-" $(a%16) a$=a$+"R" a$=a$+"-" $(a%64) a$=a$+"E" a$=a$+"-" =a$+" ",10) : 5ݤdate(a%):a%=a%&FFFF: IF(a%AND&FF)=0:="Unset " J=d0(a%31,2)+"/"+d0((a%256)15,2)+"/"+(1981+(a%&1000)+(a% Functions: &00 Close the file on channel in Y. If Y=0 then close all files. &4X Open file for input. If no file exists, A is returned as 0. &8X Open file for output. If file already exists, tries to delete it first. If no file exists, a file is created with load and execution addresses set to &FFFFFFFF. &CX Open file for update. If no file exists, A is returned as 0. The bottom four bits of A control how the file is opened: If b3 is set, returns an error if file not found, instead of zero handle. If b2 is set, error is generated if attempt to open a directory. File attributes determine how a file can be opened. Directories can be opened for input, but the open channel can only be used for reading information. Trying to do a BBGETb will close the channel and return an error. DFSCVd DVectored Filing system controld This vector is only called by the operating system, and should not be called directly. This list just shows the calls implemented in HADFS. Functions: &00 B*OPTb command. X and Y hold parameters &01 EOF being checked with OSBYTE &7F. On exit, X=&FF if EOF, X=&00 otherwise. &02 B*/b command. XY points to the command text. HADFS tries to run the command from the CSD or the LIB. &03 Unrecognised OSCLI. XY points to the command text. HADFS checks the command against its own commands, then tries to run it from disk as with function &02. &04 B*RUNb command. XY points to filename. HADFS tries to run this from the CSD only. &05 B*CATb command. XY points to any pathname. &06 A new filing system is about to take over. This call is generated by filing systems themselves before they start their initialisation. &07 File handle range request. Lowest returned in X, highest in Y. HADFS uses handles 25 to 29. &08 OSCLI command being processed. This is used to facilitate the B*ENABLEb command. &09 B*EXb command. XY points to any pathname. &0A B*INFOb command. XY points to the filename. &0B B*RUNb from library. Currently not implemented. &0C B*RENAMEb command. XY points to the filenames after the command. &0D DOSWORDd DEntry address: &FFF1 OSWORD functionsd On entry: A function code On exit: A,X,Y usually preserved XY pointer to control block HADFS provides two OSWORD functions, 14 (&0E) and 90 (&5A). &0E Read real-time clock If there is no on-board clock provided (such as in the Master), then the B*SETDATEb command can be used to set a date. This date is then used by HADFS to date-stamp files,&E0)/2) #ݤh0(A%,N%)="0000000"+~A%,N%) #ݤd0(A%,N%)="0000000"+ A%,N%) !ݤfs: A%,Y%,E%:=(&FFDA)&FF Bݤfile(f$,A%):$data%=f$:?X%=data%:X%?1=data%256:=(&FFDD)&FF 6ݤstrip(f$): f$,1)=" "::f$=f$,2): f$,1)<>" " &f$=f$,f$+" "," ")-1):=f$ 0Fosw(A%,D%,E%): X%,Y%:X%=data%:Y%=X%256:!X%=D%:X%!4=E%:&FFF1: :: DLongDateToShort N8ld%=X%!2:ex%=X%!6:!X%=ex%:X%!4=ld%:Date_ToOrd(X%): X: b$Date_ToOrd(mem%): A%,B%,C%,D% l@year%=0:month%=0:day%=0:hour%=0:minute%=0:second%=0:centi%=0 v-mem%!1<0:: Problems with negatives ATM FD%=mem%!1&83D6+2447065:C%=mem%?0+256*(mem%!1&83D6):centi%=C%100 >C%=C%100:second%=C%60:C%=C%60:minute%=C%60:hour%=C%60 8B%=((D%*4+3)146097-4)+3:C%=B%14614*5+2:D%=D%*4+3 .A%=C%153+2:day%=C%1535+1:month%=A%12+1 *year%=D%146097*100+B%1461+A%12-4800  FredDisk/s D��W �  > FredDisk/s 1.02 � Provides cut-down ramdisk �" in byte-wide ramcard in FRED �(: �2WORDV=&20C �<mcode%=&FFFF0A40 �F addr=&A8:sect=addr+4 �  > FredDisk/s 1.02 � Provides cut-down ramdisk �" in byte-wide ramcard in FRED �(: �2WORDV=&20C �<mcode%=&FFFF0A40 �F addr=&A8:sect=addr+4:ptr=&AE �P P=0 1 �Z P%=mcode% �d [OPT P*3 �n.Intercept �xCMP #90:BEQ NewWord � .OldWord � JMP 0 � .NewWord �STX ptr:STY ptr+1 �\ Check &0600 id marker: � LDY #0:LDA (ptr),Y:BNE NotMe �$INY:LDA (ptr),Y:CMP #6:BNE NotMe � \ Bit7 commands go to HADFS: �!LDY #11:LDA (ptr),Y:BMI NotMe �\ Only RD & WR supported: �BEQ NotMe:CMP #3:BCS NotMe �\ Get number of sectors: �PHA:DEY:LDA (ptr),Y:TAX "\ Check drive number (27='R'): %DEY:LDA (ptr),Y:CMP #27:BEQ ForMe  .NotMe1 "PLA:.NotMe ,LDX ptr:LDY ptr+1:LDA #90 6BNE OldWord @: J .ForMe T\ 2..5=addr ^\ 6..8=sec h\ 9=drv checked r\10=num in X |$\11=type 1=write, 2=read, pushed \ Ignore top byte of sector DEY  \ Get copy of sector & addr:  .AddrLp  DEY:LDA (ptr),Y:STA addr-2,Y CPY #2:BNE AddrLp \ No Tube support: BIT &27A:BPL IOMem LDA addr+2: addr+3 CMP #&FF:BNE NotMe1  .IOMem  LDY #0  .Loop "LDA sect+1:STA &FC02:\ hi byte "LDA sect+0:STA &FC01:\ lo byte ,LDA #0:STA &FC00:\ offset into 256 bytes &PLA:PHA:LSR A:BCC Read 0 .Write :$STY &FC00:LDA (addr),Y:STA &FC03 DINY:BNE Write:BEQ Next N .Read X$STY &FC00:LDA &FC03:STA (addr),Y bINY:BNE Read l .Next v\ Point to next sector:  LDA sect:CLC:ADC #1:STA sect  LDA sect+1:ADC #0:STA sect+1 \ Point to next addr: INC addr+1  \ Loop back for each sector: DEX:BNE Loop P and can be read using the standard RTC call. The time part can be set from BASIC using: BTIME=((hours*60+minutes)*60+seconds)*100b TIME is preserved over Ctrl-Break. There may be a few seconds discrepency depending on when the last ROM service call or HADFS filing system call was made. On entry: &00 &00 - read time and date string. On exit: &00 Time and date is returned in the format: Mon,25 Oct 1987.12:24:30 On entry: &00 &01 - read time and date in BCD format. On exit: &00 year (&00-&99) &01 month (&01-&12) &02 day of month (&01-&31) &03 day of week (&01-&07, Sun-Sat) &04 hours (&00-&23) &05 minutes (&00-&59) &06 seconds (&00-&59) A year value of >&80 implies a century number of &19, a year value of <&81 implies a century number of &20. On entry: &00 &02 - convert BCD time and date to string. &01 BCD time and date as for call &01. &08 On exit: &00 Time and date string as with &00. &5A Read/Write sectors This call allows you to read and write sectors of a disk in an internal or external drive. HADFS translates this call into the required low-level calls with OSWORD &7F or OSWORD 90. On entry: &00 &00 \ These two values &01 &06 / identify this call &02 Address &06 Sector start \ Sector &09 Drive number / address &0A Number of sectors &0B Call number, and returned result byte &0C The call numbers are: &80 read sectors &81 write sectors If the call was successful, then the return byte is zero. If not, then one of the following values is returned: &12 Drive read only &14 Track zero not found &18 Sector not found &FE Drive not present HADFS low-level calls also use OSWORD 90, using call numbers 1-7. DOSBYTEd DEntry address: &FFF4 OSBYTE functionsd On entry: A function code On exit: A preserved X,Y any parameters X,Y any returned values A=127 (&7F) - Read EOF status On entry: X=channel number On exit: X=0 if EOF has not been reached X<>0 if EOF has been reached A, Y preserved If PTR=EXT on the channel specified, then EOF is returned true. This call is used to provide BASIC's EOF# function. A=90 (&5A) - JGH sideways ROM service call OSBYTE 90 - General All the ROMs that I write conform to my ROM selection standard that allows interrogation of the roms in a uniform manner. This is the OSBYTE 90 call, used to enable and disable the rom, and to ask for status information about it. The arrangement of the OSBYTE 90 call LA:LDA #0 LDY #11:STA (ptr),Y RTS :  .start% LDA WORDV:STA OldWord+1 LDA WORDV+1:STA OldWord+2 "LDA #Intercept 255:STA WORDV  )LDA #Intercept 256 &FF:STA WORDV+1 RTS  ] *<"*SAVE FredDisk ";~mcode%;" ";~P%;" ";~start%&FFFF0000 �JimDisk/s :C$=$(H%+1):P%=H%+2+C$:V%=!P%:W%=P%!4:F%=P%!8:J%=P%!12:P%=P%+16:A%=3:T:H%=P%: ,A%=2:R:H%=P%: 6'H:E$;C$;:I$="":d$=E$+C$d$=I$+C$ @C"SAVE "+d$+" "+~P%+"+"+~F%+" "+~W%+" "+~V%:D:H%=P%+F%:: TD:N%<4: UK%=4:J%=(J%1 �  > JimDisk/s 1.02 � Provides cut-down ramdisk �& in page-wide ramcard in FRED+JIM �(: �2WORDV=&20C �<mcode%=&FFFF0A40 �F addr=&A8:sect=addr+4:ptr=&AE �P P=0 1 �Z P%=mcode% �d [OPT P*3 �n.Intercept �xCMP #90:BEQ NewWord � .OldWord � JMP 0 � .NewWord �STX ptr:STY ptr+1 �\ Check &0600 id marker: � LDY #0:LDA (ptr),Y:BNE NotMe �$INY:LDA (ptr),Y:CMP #6:BNE NotMe � \ Bit7 commands go to HADFS: �!LDY #11:LDA (ptr),Y:BMI NotMe �\ Only RD & WR supported: �BEQ NotMe:CMP #3:BCS NotMe �\ Get number of sectors: �PHA:DEY:LDA (ptr),Y:TAX "\ Check drive number (27='R'): %DEY:LDA (ptr),Y:CMP #27:BEQ ForMe  .NotMe1 "PLA:.NotMe ,LDX ptr:LDY ptr+1:LDA #90 6BNE OldWord @: J .ForMe T\ 2..5=addr ^\ 6..8=sec h\ 9=drv checked r\10=num in X |$\11=type 1=write, 2=read, pushed \ Ignore top byte of sector DEY  \ Get copy of sector & addr:  .AddrLp  DEY:LDA (ptr),Y:STA addr-2,Y CPY #2:BNE AddrLp \ No Tube support: BIT &27A:BPL IOMem LDA addr+2: addr+3 CMP #&FF:BNE NotMe1  .IOMem  LDY #0  .Loop "LDA sect+1:STA &FCFE:\ hi byte "LDA sect+0:STA &FCFF:\ lo byte PLA:PHA:LSR A:BCC Read & .Write 0 LDA (addr),Y:STA &FD00,Y:INY :BNE Write:BEQ Next D .Read N LDA &FD00,Y:STA (addr),Y:INY X BNE Read b .Next l\ Point to next sector: v LDA sect:CLC:ADC #1:STA sect  LDA sect+1:ADC #0:STA sect+1 \ Point to next addr: INC addr+1  \ Loop back for each sector: DEX:BNE Loop PLA:LDA #0 LDY #11:STA (ptr),Y RTS :  .start% LDA WORDV:STA OldWord+1 LDA WORDV+1:STA OldWord+2 "LDA #Intercept 255:STA WORDV )LDA #Intercept 256 &FF:STA WORDV+1  RTS ]  ;"*SAVE JimDisk ";~mcode%;" ";~P%;" ";~start%&FFFF0000 NFSFront FpbД��WL:LI%�NFS Front End for L:LI%�NFS Front End for HADFS�0.03�(C)1992 J.G.Harston�� LH 0 hH dh`LHZ1 L ) @h�` 0з +16: � ΀L]Z� h�`hLz` +NFS Front for HADFS �`. )N h�` is: On entry: A=90 X=ID number, or zero Y=call number On exit: A=90 X=b7-b6 rom status, b5-b0 other specific info. Y=other info. All ROMs respond to X=0, Y=0 on entry (B*FX90,0b or just B*FX90b) by displaying their ID number and their name, eg: B>*FX90 6: Harston ADFS 9: Z80 BASICb With X set to non-zero, it is a specific call to a particular ROM, with Y containing the call number. All ROMs respond to calls with Y=0 to enable the ROM, Y=1 to disable the ROM and Y=255 to request the ROM's status, eg: >B*FX90,9,1b will disable the ROM with program ID 9, ie Z80 BASIC. On return from calls 0, 1 and 255, the top two bits of X hold information about whether the ROM is present, and whether it is enabled or not. Bit 7 holds if the ROM is enabled or disabled, and bit 6 holds if the ROM is actually present of not. This is summarised as: X=11xxxxxx rom not present (X returned as &FF) X=10xxxxxx rom present, but disabled X=0yxxxxxx rom present and enabled If the ROM is enabled (ie bit 7 is zero), then it must also be present, so bit 6 is an implied zero. This allows bit 6 to be used to return information on other things. The other six bits of X can be used to return specific information about the ROM. The top two bits of X hold the status of the ROM before the call, so if the ROM is disabled, and you enable it with Y=0, then X will return %10xxxxxx. When calling from a second processor using the OSBYTE call, the Y register is ignored and zero is used instead for calls below OSBYTE &80. This means that if you use a call with Y=255 to read the status, and it returns saying that the ROM was disabled, the ROM will actually have been enabled, because Y=0 has been used instead. To get round this, use something like: BA%=90:X%=number:Y%=255:S%=(USR&FFF4 AND&FF00)DIV256 IF (S% AND &C0)=&80 THEN OSCLI "FX90,"+STR$(number)+",1"b This will redisable a ROM found to be actually disabled. Some of the program IDs that I have used so far are: 1: CharROM - Character set ROM 2: NewMOS 3: 4: 5: Games Auto Boot ROM 6: HADFS - Harston Advanced Disk Filing System 7: Z80 Emulator - Emulates a Z80 CPU 8: 9: Z80 BASIC - BBC BASIC(Z80) with BBC file i/o 10: 11: Dissem ROM - Various disassembly routines 12: 13: 14: 15: 16: NFS Front End If anyone else wants to adhere to this method for a ROM that they are writing, write to me, and I will assign you a number and give you the routine I use for service call 7 to provide the OSBYTE 90 call. OSBYTE 90 - In HADFS The HADFS ROM has prL ΀h ` ΀`HJJJJ h) ii0LhhHH�歱 L9hhl�hhȱ���L��`% HHHHÁJ hhhh�ȑ`l� bnnnnoppqt`hhh�` HHH ii0: ��� бhhhHHH hHHHHG� ނii�� hhh� ނhhhi `L�* ȱ$ 1 $ ƨ`�ThisUser � �Supervisor x�STAFF.FRANK � �*-System-* � ````L (򈈩 `� ``NFSTester Kpu|��W.Y �  > NFSTester �! Tests various Osw14/0 calls �: �() ctrl% 100: dname$(3 �  > NFSTester �! Tests various Osw14/0 calls �: �() ctrl% 100: dname$(31):OSWORD=&FFF1 �2X%=ctrl%:Y%=X%256:A%=&14 �<: �F �P do14 �Z do15 �d do16 �n do21 �x do24 � do25 � do26 � �: �osw14(f%) �%!X%=&4000:X%!3=f%:A%=&14: OSWORD � �: �#ݤd(A%,N%):=" "+A%,N%) �ݤd0(A%):="0"+A%,2) �ݤn(A%):="00"+A%,3) �#ݤh(A%,N%):="0000000"+~A%,N%) �ݤs(A%,N%): A$ 6?A%<32 ?A%>126 A$=A$+"("+?A%+")" A$=A$+?A% A%=A%+1:N%=N%-1:N%=0:=A$ : " do14 ,$"Function 14 - Read disk names" 6 u%=0 31 @X%?7=u%:X%?8=1:osw14(14) J& X%?4<>0 pr14:dname$(u%)=$(X%+6) T u% ^: h pr14 r#":";(48+X%?5-7*(X%?5>9));" "; |X%?22=13:$(X%+6)  :  do15 )"Function 15 - Read logged on users" #"Station User name"11"Status"  u%=0: X%?7=u%:X%?8=1:osw14(15)  X%?4<>0 pr15 u%=u%+1: X%?4=0 :  pr15 n(X%?6);".";n(X%?5);" "; $(X%+7);(20-$(X%+7)); * ?(X%+8+$(X%+7)) "Syst" "Normal"  : & do16 0'"Function 16 - Read date and time" :osw14(16) DW"Date: ";d0(X%?4 31);"/";d0(X%?5 15);"/";1981+X%?5 16+(X%?4 &E0) 2;5; N3"Time: ";d0(X%?6);":";d0(X%?7);":";d0(X%?8) X: b: l do21 v*"Function 21 - Read user environment" $X%=50," ") osw14(21) 0"Disk name: """;s(X%+5,16);""" Len: ";X%?4 &"Directory: """;s(X%+21,10);"""" &"Library: """;s(X%+31,10);"""" : :  do24 #"Function 24 - Read user info" : : :  do25 ("Function 25 - Read server version"  osw14(25)  $(X%+4)  : *: 4 do26 >$"Function 26 - Read free space" H u%=0 31:rd26: R \ rd26 fdname$(u%)="": p d0(u%);" ";dname$(u%);" "; z:$(X%+7)=dname$(u%),dname$(u%)+" "," ")-1):osw14(26) =X%?ogram ID 6, and by default it is enabled. To disable it, you can use B*FX90,6,1b. The ROM will re-enable itself on a power-on reset or a memory-clear reset. The X register returns the following information: bit6: HADFS owns workspace from &E00 bit5,4: Number of channels - 2 bit3-0: Private workspace pointer - &14 The call values in Y used by HADFS are: Y=0 Enable ROM Y=1 Disable ROM Y=2 Enable ROM, select HADFS, and do B*I AM BOOTb Y=3 As Y=2, but without B*I AM BOOTb Y=4..Y=63 Unused HADFS calls Y=64 Look for default drive, return drive in X Y=65 Look for default library drive, return drive in X Y=66 Look for default user drive, return drive in X Y=67..Y=127 Unused external HADFS calls Y=128..Y=254 Unused HADFS calls Y=255 Return status Calls from 64 to 127 are only used from version 0.49 onwards Q5 The filing systemq Qutilitiesq   There are a number of utilities supplied on the HADFS System disk. Some of these are machine code and some are BASIC programs. Programs in subdirectories of the library directory can be run just like the main library programs. This allows you to group collections of similar commands together in subdirectories instead of creating an ever- lengthening library directory. If there is a file I%.Progs.RunMei then using B*Progs.RunMeb will call it. You have to bear in mind that some alphabetic sequences with a full stop directory separator may be interpreted as an abbreviation for a ROM-based command. For example, I*K.Progi will be matched as B*KEY Progb. The programs and utilities supplied on the system disk are as follows: Library: (HADFS utilities) BACKUP, COMPACT, Copy, Disks, Files Library: (File utilities) CLoad, CSave, ETree, FileInfo, Filer, PrList, Repeat, ScrLoad, ScrSave, SetLoad, SetExec, SetType, SrLoad, SrSave, Stamp, TreeCopy, TxSave Library: (General utilities) Break, Crunch, Disp, Explode, lp, lpS, MakeLP, MCode, MDump, MDump80, Mouse, pc8s, Repair, Roms, Scroll, Show, VList Utils: DMap, HDInit, HEdit, HUtils, Intern/s, MCat, Rescue, SetDate, VisCompact Extras: DemoArgs, DemoGbPb, Examine, Support/s, PrInfo, FredDisk/s, JimDisk/s, NFSFront, RSLink/s, Stats There may be more than the list given here. Any extra files and programs will be detailed in accompanying text files, and they will be mentioned in a I$.!ReadMei text fil3=0:"&"h(X%!3,8);" (";d(X%!3 1024,7);"K) free "; ?X%?6=0:"&"h(X%!6,8);" (";d(X%!6 1024,7);"K) disk size"  PrInfo NPU��W- �  > PrInfo 1.02 �" Prints info on current HADFS �X%=&70:Y%=0:A%=0:A%=&FD �(!&70=0:ver%=(&FFDA)&FF �  > PrInfo 1.02 �" Prints info on current HADFS �X%=&70:Y%=0:A%=0:A%=&FD �(!&70=0:ver%=(&FFDA)&FF �2"HADFS Information" �<!"Version returned: ";ver%/10 �F)"Version bytes: ";~?&72;".";~?&73 �P3"Capability bytes: ";h(?&70,2);",";h(?&71,2) �Z"!&70=0 "This is not HADFS": �dn%=?&71: l%=1 0 -1 �n m%=7 0 -1 �x< A$:"b";l%*8+m%;4);A$;29);": ";yn(n%128):n%=n%*2: � n%=?&70: �I FRED/JIM ramdisk support,Hard disk support,13,Mouse driver supplied � 11,10,9,8 �$ Random access output,Fast GBPB �7 Full *INSTALL routine,Date provided,Time provided � *COMPACT/*BACKUP in rom �" Passwords used, *Copy in rom �: �: � �"ݤh(A%,N%)="0000000"+~A%,N%) �!ݤyn(A%): A%:="Yes" ="No " RSImgFile F��W �  > �  > RSImgFile �' RS232-Link disk to partition file �: �(: buffer% 256:init �2 15:*FX15 �< *FX7,7 �F *FX8,7 �P err end: �Z:listen:0 �d: �nݤerr:*fx3 �x:" at line ";:*FX2,2 �=-1 �: � listen � *FX2,1 �A%=:A%=1 A%=2 �num%=:drv%= �sect%=*65536+*256+ �# A%=1 write:: Sending to me � A%=2 read:: Me send out � �: � read � num%=number of sectors  sect%=start sector "Reading";:disp  l%=0 num%-1 "0rd(sect%+l%): Get 256 bytes from somewhere , *FX3,7 60: All ok @* m%=0 255:buffer%?m%:: send data J*FX3 T l%: Do next sector ^: h: r write |"Writing";:disp  l%=0 num%-1 + m%=0 255:buffer%?m%=:: read data wr(sect%+l%)  *FX3,7 0: All ok *FX3  :  disp ": &";~sect%;" + ";~num%;  sect%=&46 " - FSM";  sect%=&47 " - root";  :  Specific routines: : & init 0ch%=("<HADFS$Disk4>") :*"Using HADFS partition <HADFS$Disk4>" D N: X end b ch%<>0 A%=ch%:ch%=0:#A% l v:  rd(s%)  l%,d%:#ch%=256*s% )ș "OS_GBPB",3,ch%,buffer%,256,256*s%  :  wr(s%)  l%,d%:#ch%=256*s% )ș "OS_GBPB",1,ch%,buffer%,256,256*s%  RSLink/s H`JZ ��W7 �  > RSLink/s �  > RSLink/s 1.04 �$ Provide 'drive' via RS232 link �: �(3 No Tube support, pure datastream, no checking �2C 05-Nov-98 v1.01 JGH: Sets baud, enables serial, Tube check ok �<1 07-Nov-98 v1.02 JGH: Allows multiple drives �F- 07-Nov-98 v1.03 JGH: e. The ILibraryi HADFS utilities are for using with HADFS. The ILibraryi file utilities can be used on any filing system for accessing or giving information about files. The ILibraryi general utilities can be used on any filing system. The IUtilsi and IExtrasi are HADFS programs. The library commands B*Copyb, B*Disksb, B*Filesb, B*SetExecb, B*SetLoadb, B*SetTypeb and B*Stampb are detailed in Chapter 3. XHADFS Library Programsx The following are programs designed to run with HADFS. DBACKUPd This program will copy an entire HADFS or DFS disk sector by sector, ignoring the file structure. Any faulty sectors on the source disk are ignored. The destination disk must already be formatted the same as the source disk. BBACKUPb can take the following command line parameters: BBACKUP <src> <dst> <trks> <sides> -s <spt> -t <tries> -quit <name>b If the B<src>b and B<dst>b drives are given, both must be given. If the number of tracks and sides are given then both must be given. The single character options must be given in lower case. The B<spt>b option is the number of sectors per track, currently only 10 is implemented. The B<tries>b is the number or retries BBACKUPb uses before abandoning a disk read or write. The B<src>b and B<dst>b can be filenames, in which can a disk image will be read from or written to. For example: B*BACKUP 0 -net-DiskImg 80 2b will copy the disk in drive 0 to a 400K disk image. Disk images are 'sequential/noninterleaved', that is, all the tracks on one side are used before all the tracks on the other side. Filenames can be prefixed with Bfs:b instead of B-fs-b, ef Bnet:DiskImgb. The B-quitb option can give a file to run on exit. If the name starts with a B*b, then it is called as a B*bCommand, otherwise it is CHAINed. If no parameters are given, you are prompted for the source and destination drives. These can be the same, in which case you will be prompted to change disks. You are then prompted for the size of the disk, the number of tracks, the number of sides and the maximum number of retries to use. If ERETURNe is pressed, then the defaults are used. Once all these are entered, the program waits for a keypress before starting. DCOMPACTd As a disk is used, as files are created and deleted, the free space on it may get fragmented until a stage arrives where there may be enough space to save a file, but none of the small areas of space are individually large enough. The BCOMPACTRunnable transient �P. 23-Nov-98 v1.04 JGH: Test direct writing �Z: �d *RSLink <drv><num> �n' eg: *RSLink L4 - links L M N O �x baud%=8 �: �(WORDV=&20C:OSBYTE=&FFF4:OSARGS=&FFDA �mcode%=&FFFF0BAC � addr=&A8:sect=addr+4:ptr=&AE � P=0 1 � P%=mcode% � [OPT P*3 � \ Syntax- *RSLink <drv><num> � .start% �%LDA #1:LDX #ptr:LDY #0:JSR OSARGS �)LDA (ptr),Y:CMP #"0":BCC LinkDefault �-CMP #"A":BCC LinkDigit:SBC #6:.LinkDigit � #31:STA DriveLo+1:INY *LDA (ptr),Y:CMP #"1":BCC LinkOneDrive  #7:TAY:.LinkOneDrive 'TYA:CLC:ADC DriveLo+1:STA DriveHi+1 ".LinkDefault ,: 6LDA WORDV:STA OldWord+1 @LDA WORDV+1:STA OldWord+2 J"LDA #Intercept 255:STA WORDV T)LDA #Intercept 256 &FF:STA WORDV+1 ^LDA #2:TAX:JSR OSBYTE hLDA #7:JSR SetBaud:LDA #8 r .SetBaud |LDX #baud%:JMP OSBYTE : :\ Resident code in page &C : .Intercept CMP #90:BEQ NewWord  .OldWord  JMP 0  .NewWord STX ptr:STY ptr+1 \ Check &0600 id marker:  LDY #0:LDA (ptr),Y:BNE NotMe $INY:LDA (ptr),Y:CMP #6:BNE NotMe  \ Bit7 commands go to HADFS: !LDY #11:LDA (ptr),Y:BMI NotMe \ Only RD & WR supported: BEQ NotMe:CMP #3:BCS NotMe &\ Get number of sectors: 0PHA:DEY:LDA (ptr),Y:TAX :\ Check drive number DDEY:LDA (ptr),Y N .DriveLo X'CMP #21:BCC NotMe1:\ Default 21="L" b .DriveHi l/CMP #22:BCC ForMe:\ Default only one drive v .NotMe1 PLA:.NotMe LDX ptr:LDY ptr+1:LDA #90 BNE OldWord :  .ForMe \ 2..5=addr \ 6..8=sec \ 9=drv checked \10=num in X $\11=type 1=write, 2=read, pushed BIT &27A:BPL NoTube $LDY #5:LDA (ptr),Y:DEY: (ptr),Y CMP #&FF:BNE NotMe1 \ Send parameter block:  .NoTube  LDY #11  .SendBlockLp *LDA (ptr),Y:JSR WriteByte 4DEY:CPY #5:BNE SendBlockLp >\ Get addr: H"DEY:DEY:LDA (ptr),Y:STA addr+1 RDEY:LDA (ptr),Y:STA addr \LDY #0:PLA:LSR A:BCS Write f.ReadSectors pJSR ReadByte:BNE Error z .Read *JSR ReadByte:STA (addr),Y:INY:BNE Read "INC addr+1:DEX:BNE ReadSectors BEQ FinishSectors :  .Write ,LDA (addr),Y:JSR WriteByte:INY:BNE Write JSR ReadByte:BNE Error INC addr+1:DEX:BNE Write : .FinishSectors LDA #0:\ ok  .Error .ExitRoutine %LDY #11:STA (ptr),Y:\ result byte LDX ptr:LDY ptr:LDA #90:RTS : $ .ReadByte .TXA:PHA:TYA:PHA 8.ReadAgain B!LDY #&FE:BIT &FF:BMI ReadQuit LLDA #145:LDX #1:JSR OSBYTE VBCS ReadAgain ` .ReadQuit jSTY addr+2:PLA:TAY:PLA:TAX tLDA addr+2:RTS ~: .WriteByte PHA:LDA #2 .WriteByteLp BIT &FF:BMI WriteByteQuit BIT &FE08:BEQb program tries to move all the files on a disk together so that the free space is in the largest areas possible. BCOMPACTb can take the following command line parameters: BCOMPACT <drv> -quit <name>b The B-quitb option can give a file to run on exit. If the name starts with a B*b, then it is called as a B*bCommand, otherwise it is CHAINed. If no parameters are given, you are prompted for the drive number to compact. It then looks through the entire disk and moves as much as it can to compact the disk. It can only move files that will fit into memory, so the compaction may not be the maximum possible. DRescued This program can be used to rescue a file that has been corrupted and made inaccessible due to disk errors. You are prompted for the filename of the file to rescue, the new filename to save the rescued file as (don't use the same one!) and the fill byte for bad sectors. You give a decimal number or a hexadecimal number prefixed by '&'. If you just press return, then the bad sectors are not filled, but the beginning is marked with '!!!!!!!!' and the end is marked with '********', and any control codes other than CR (13) are converted to '|'. Rescue can only rescue files that are short enough to fit into memory. It goes through the file, loading it sector by sector, listing any bad sectors. After rescuing the file, you can try to repair it. For example, with text files use either fill byte 13 or nothing, and then load or read it into a word processor to edit the damaged section. For BASIC programs, use no fill byte, and then use B*REPAIRb to repair the bad program, and then edit the damaged section. After rescuing a file, don't delete it. B*RENAMEb it somewhere out of the way, eg as I$.BadSectors.File1i. This will hide the bad sectors from other files. If you deleted it, the the free space would be returned to the Free Space Map, and you could attempt to save into the bad sectors again. If you get a lot of bad sectors on a disk, you should copy off the files to another disk and re-format it. If that doesn't solve the problem, you should throw the disk away and replace it. Regular disk-drive cleaning reduces disk errors considerably. XHADFS Utils programsx These programs provide utilities to be used with HADFS. DHUtilsd HUtils provides some extra utilities for use with HADFS disks. On running, if no date is set, you are asked to enter the date. Then the main menu appears: 1 : Initialise a new HADFS disk 2 : Alphabetically sort a directory 3 : Conver WriteByte PLA:STA &FE09:PHA .WriteByteQuit  PLA:RTS : \.WriteByte (\STA addr+2:\PHA:\TXA:\PHA:\TYA:\PHA \.WriteAgain �\BIT &FF:\BMI WriteQuit  -\LDA #138:\LDX #2:\LDY addr+2:\JSR OSBYTE \BCS WriteAgain \.WriteQuit (!\PLA:\TAY:\PLA:\TAX:\PLA:\RTS 2: <] F:"*SAVE RSLink ";~mcode%;" ";~P%;" ";~start%&FFFF0000 RSRAMDisk F`��W �  > RSRAMDisk � RS232-Link disk to memory �: �(: buffer% 256:init �2 15:*FX15 �< *FX7,8 �F *FX8,8 �P err �Z:liste �  > RSRAMDisk � RS232-Link disk to memory �: �(: buffer% 256:init �2 15:*FX15 �< *FX7,8 �F *FX8,8 �P err �Z:listen:0 �d: �nݤerr:*fx3 �x:" at line ";:*FX2,2 �=-1 �: � listen � *FX2,1 �A%=:A%=1 A%=2 �num%=:drv%= �sect%=*65536+*256+ �# A%=1 write:: Sending to me � A%=2 read:: Me send out � �: � read � num%=number of sectors  sect%=start sector "Reading";:disp  l%=0 num%-1 "0rd(sect%+l%): Get 256 bytes from somewhere , *FX3,7 60: All ok @* m%=0 255:buffer%?m%:: send data J*FX3 T l%: Do next sector ^: h: r write |"Writing";:disp  l%=0 num%-1 + m%=0 255:buffer%?m%=:: read data wr(sect%+l%)  *FX3,7 0: All ok *FX3  :  disp ": &";~sect%;" + ";~num%;  sect%=&46 " - FSM";  sect%=&47 " - root";  :  Specific routines: :  init max%=((-P-5000)&FFFC00)  mem% max% 6"Using ram-disk size: &";~max%;", ";max%1024;"K" o$buffer%=0+"(C)JGH"+0: mem%!&4610<>!buffer% mem%!&4614<>buffer%!4 "Installing fresh disk":new_disk & 0: :new_disk D$$(mem%+&4600)="LinkDisk " N,mem%!&4610=!buffer%:mem%!&4614=buffer%!4 X$mem%!&4618=0:mem%!&461C=max%256 bmem%?&461E=1: Data disk cX%=buffer%:Y%=X%256:A%=14 d!!X%=1: &FFF1: Get time/date emem%?&461A=8*(~buffer%?2) f6mem%?&461B=(~buffer%?1)+16*((~buffer%?0)-1981) lmem%!&4620=&00440002 v,mem%!&4624=&4A:mem%!&4626=(max%256)-&4A mem%!&4628=0 $(mem%+&4700)="$ G" , a%=mem%+&470B mem%+&4720 4:!a%=0:  :  rd(s%)  l%,d% d%=mem%+256*s% & l%=0 255 4:buffer%!l%=d%!l%:  :  wr(s%)  l%,d% d%=mem%+256*s%  & l%=0 255 4:d%!l%=buffer%!l%:  SideDisk/s F` %.��W �  > SideDisk/s 1.00 �$ Provide drives in sideways ram �: �(WORDV=&20C �2mcode%=&FFFF0A38 �< addr=&A8:sect=addr+4:ptr=&AE �F P=0 1 �P P%=mcode% �Z [OPT P*3 �d.Intercept �nCMP #90:BEQ NewWord �x .OldWord � JMt a DFS disk to HADFS 4 : Set drive boot options H : HADFS Info D : Disk info You can also press 'B0b' to exit, and 'B*b' to enter B*b-commands. Option 1: Initialise a new HADFS disk. This option allows you to create a new HADFS disk with a partition for DFS files. This option also allows you to reserve a partition in the HADFS disk for DFS files. The usual thing to do is, with a double-sided 80 track disk, is have HADFS files on side 2 and DFS files on side 0. You do this by starting the 'hole' in the HADFS map at sector 74, just after the I$i directory, and extending it all the way to the end of that side of the disk. The HADFS disk map then continues from sector 800 to sector 1599. You can then save up to 27 other files in the DFS catalogue. The I!Booti file is renamed as IHADFSi and the I'D I S K'i file as I'H.D I S K'i. TheIROMi file stays as IROMi. This way, you can have other DFS files, including a I!Booti, and doing B*HADFSb from DFS will either select HADFS if it is already loaded, or load the IROMi image file, as the HADFS I!Booti would do. Option 2: Alphabetically sort a directory. HADFS disks at present do not store the directories alphabetically. It is intended that in future they will be, but at present you can use this option to alphabetically sort a directory. The case of names is ignored in sorting. Option 3: Convert a DFS disk to HADFS This will convert a DFS disk to an HADFS data disk. You are asked for the size of the disk, and whether you want to convert both sides. There needs to be some space on the disk on track seven for the HADFS root directory, so if track seven is occupied, the files will be moved out of the way. If they cannot be moved (the disk is too full) you may have to B*COMPACTb the DFS disk. If that does not free up sufficient space, you will have to remove some of the files. The files from side 0 are put into directory I$.Side0i, and those from side 1 into directory I$.Side1i. DFS directories other than I$i are pre-pended to filenames in the same way as ITreeCopyi, so that IB.FREDi becomes IB/FREDi. Option 4: Set drive boot options This allows you to specify which drive HADFS defaults to on start-up or after B*MOUNTb. This disk's current settings are displayed, and you can change each of them. If more than one drive is set as the default drive, then the lowest number drive is used. The CSD drive is the drive defaulted to after startup or B*MOUNTb. The LIB drive is the drive to look for I$.Libraryi on be �  > SideDisk/s 1.00 �$ Provide drives in sideways ram �: �(WORDV=&20C �2mcode%=&FFFF0A38 �< addr=&A8:sect=addr+4:ptr=&AE �F P=0 1 �P P%=mcode% �Z [OPT P*3 �d.Intercept �nCMP #90:BEQ NewWord �x .OldWord � JMP 0 � .NewWord �STX ptr:STY ptr+1 �\ Check &0600 id marker: � LDY #0:LDA (ptr),Y:BNE NotMe �$INY:LDA (ptr),Y:CMP #6:BNE NotMe � \ Bit7 commands go to HADFS: �!LDY #11:LDA (ptr),Y:BMI NotMe �\ Only RD & WR supported: �BEQ NotMe:CMP #3:BCS NotMe �\ Get number of sectors: �PHA:DEY:LDA (ptr),Y:TAX �\ Check drive number: %DEY:LDA (ptr),Y:CMP #8:BCC NotMe1 CMP #24:BCS NotMe1  #15:CMP &DC2:BEQ ForMe " .NotMe1 ,PLA:.NotMe 6LDX ptr:LDY ptr+1:LDA #90 @BNE OldWord J: T .ForMe ^\ 2..5=addr h\ 6..8=sec r\ 9=drv in A |\10=num in X $\11=type 1=write, 2=read, pushed  \ Ignore top byte of sector:  DEY:PHA  \ Get copy of sector & addr:  .AddrLp  DEY:LDA (ptr),Y:STA addr-2,Y CPY #2:BNE AddrLp \ Get drive back:  PLA:TAY \ No Tube support: BIT &27A:BPL IOMem LDA addr+2: addr+3 CMP #&FF:BNE NotMe1  .IOMem PLA:LSR A:BCC Read  \ Swap src & dest for write: &/LDA addr:PHA:LDA sect:STA addr:PLA:STA sect 07LDA addr+1:PHA:LDA sect+1:STA addr+1:PLA:STA sect+1 : .Read D \ X=num, Y=bank (drive 15) N\ Select rom/ram bank: XLDA &FE30:PHA bSTY &FE30:LDY #0 l .Loop v!LDA (sect),Y:STA (addr),Y:INY  BNE Loop  LDA sect:CLC:ADC #1:STA sect  LDA sect+1:ADC #0:STA sect+1 $LDA addr+1:CLC:ADC #1:STA addr+1  LDA addr+2:ADC #0:STA addr+2 DEX:BNE Loop PLA:STA &FE30 LDA #0:LDY #11:STA (ptr),Y RTS :  .start% LDA WORDV:STA OldWord+1 LDA WORDV+1:STA OldWord+2 "LDA #Intercept 255:STA WORDV  )LDA #Intercept 256 &FF:STA WORDV+1 RTS  ] *<"*SAVE SideDisk ";~mcode%;" ";~P%;" ";~start%&FFFF0000 Stats �  ���W.1.00� u � � H h)i0   C   C L u  : � . ' `ߎ Ҡ L `  `"LTitle: � Option: � Dir. �  > Support/s v1.14 �# Extra drive support for HADFS �, 18-Jul-91 v1.00: 'L' serial link drive �(" 12-Jan-92 v1.10: 'R' ramdisk �2, 22-Jan-04 v1.11: Add partition support �<! 02-Feb-04 v1.12: IDE driver �F! 30-Aug-04 v1.13: MMC driver �P< 03-Nov-04 v1.14: IDE driver updated with real hardware �Z& Serial does not have Tube access �dD If command loaded into Serial buffers, drive 'L' will trash it �n: �x mcode% &800 �: � MOS Entries �7OSNEWL=&FFE7:OSWRCH=&FFEE:OSWORD=&FFF1:OSBYTE=&FFF4 fore searching the CSD drive. The URD drive is the drive to look on with B*I AMb before searching the CSD drive. Option H: HADFS Info This option shows various information about the version of HADFS in the machine. It shows the version number and capability bits returned by OSARGS &FD,0. This function is also contained in the program IExtras.PrInfoi. Option D: Disk Info This reads the flag bytes of a disk and shows what type it is. DHEditd IHEditi is a DFS/HADFS disk sector editor. When run, it loads sector &46, the root sector if an HADFS disk, or sector zero if not. Keys: cursors keys move around Shift-cursor keys move to next sector TAB swaps between ASCII entry and HEX entry COPY swaps which half of the sector is displayed f1 select drive f2 select absolute HADFS-style sector number f3 select track f4 select sector within the current track f6 Chain HUtils program Escape exits program Ctrl-D search for a Directory Ctrl-F display HADFS File information under cursor Ctrl-G Goto file's start sector Ctrl-H display Help information Ctrl-O OS command Ctrl-S Save sector Ctrl-U go Up from a directory When moving to a different sector or exiting, you are given the opportunity to save the current sector to disk, so Esc can be used as a 'save this sector' key. DDMapd IDMapi graphically shows the layout of all the files on the disk. DVisCompactd A combination of ICOMPACTi and IDMapi. Graphically shows the layout of a disk while it is being compacted! Needs quite a lot of memory, so needs shadow screen memory available. It will take the same command line parameters as BCOMPACTb. DIntern/sd IInterni creates an internal ROM-drive thet can be loaded into sideways RAM. It utilises the OSWORD 90 calls implemented by HADFS to allow extra drives to be added. When run, the following prompts are given: Drive number: The drive defaults to drive BIb. To change this, enter a drive number/letter here. Disk name: To change the default name, enter a new name here. Make default drive? Enter drive number: If set to 'Yes', then after a B*MOUNTb, then the specified drive will be the default drive. Make default library drive? Enter drive number: If set to 'Yes', then the specified drive will be looked for for a Library directory before any others. Make default user drive? Enter drive number: If set to 'Yes', then the specified drive will be looked at first when doing any B*I AMb commands. Boot option: This will set the option to use if the drive is booted fr�: � Workspace addresses �addr=&A8:sect=&AC:drive=&AF �: � RAMCard addresses �RAMaddr=&FC00:RAMdata=&FC03 �: � IDE Hard Drive addresses �?IDEdata=&FC40:IDEerror=&FC41:IDEcount=&FC42:IDEsector=&FC43 �DIDEcylinder=&FC44:IDEhead=&FC46:IDEstatus=&FC47:IDEcommand=&FC47 :  P=0 1 P%=&8000:O%=mcode% "[OPT P*3+4 ,RTS:RTS:RTS 6JMP Service @: J*EQUB &82:EQUB Copyright-&8000:EQUB &00 T!EQUS "HADFS Support":EQUB &00 ^&EQUS "1.14 (03 Nov 2004)":EQUB &00 hEQUW RAMDiskHeader-2 r.Copyright |0EQUB &00:EQUS "(C)1992 J.G.Harston":EQUB &00 :  .Service -PHA:LDA &DF0,X:ASL A:PLA:BCS ServDisabled  CMP #&07:BNE P%+5:JMP Serv07  CMP #&08:BNE P%+5:JMP Serv08  CMP #&09:BNE P%+5:JMP Serv09 .ServDisabled RTS : : 4.Serv09 :\ *Help  TYA:PHA LDX #&00:LDY #&02 JSR OSNEWL .Serv09lp1 LDA &8009,X:BEQ Serv09c &.Serv09lp2 0 JSR OSWRCH:INX:BNE Serv09lp1 : .Serv09c DLDA #&20:DEY:BNE Serv09lp2 NJSR OSNEWL XPLA:TAY:LDA #9:PHA:TYA:PHA b.ServQuitX l LDX &F4 v.ServQuitY  PLA:TAY  .ServQuit  PLA:RTS : : 5.Serv07 :\ OSBYTE PHA:TYA:PHA <LDA &EF:CMP #90:BNE ServQuitY :\ Not OSBYTE 90 ?LDA &F0:CMP #6 :BNE ServQuitY :\ Not HADFS OSBYTE @LDA &F1:CMP #64:BCC ServQuitY :\ Not drive request @CMP #67:BCS ServQuitY :\ Not drive request : G :\ Should check all devices 0LDA #0:STA &FC02:STA &FC01:LDA #16:STA &FC00  -LDA &FC03:CMP #"P":BNE ServQuitY:LDA #32 .Osb90Loop  ASTA &FC00:LDA &FC03:BPL ServQuitY :\ No more partitions *ICMP #&A0:BCS Osb90Claim :\ Should use b6/b5 as bitmap 44LDA &FC00:CLC:ADC #4:BNE Osb90Loop:BEQ ServQuitY >.Osb90Claim HB #31:STA &F0 :\ Default to this drive R: \.ServClaimY f PLA:TAY p.ServClaim zPLA:LDA #0:RTS : : 5.Serv08 :\ OSWORD PHA:TYA:PHA <LDA &EF:CMP #&5A:BNE ServQuitY :\ Not OSWORD 90 ?LDY #0:LDA (&F0),Y:BNE ServQuitY :\ Not HADFS OSWORD ?INY:LDA (&F0),Y:CMP #6:BNE ServQuitY :\ Not HADFS OSWORD @LDY #11:LDA (&F0),Y:BMI ServQuitY :\ Not device access D #63:CMP #3:BCS ServQuitY:LDY #2 :\ Not read, write or null A.Osw90Control :\ Save workspace and ALDA addr-2,Y:PHA:LDA (&F0),Y :\ copy control block -STA addr-2,Y:INY:CPY #10:BNE Osw90Control ILDA &F0:PHA:LDA &F1:PHA om. Make files externally runnable? If set to 'Yes', then any file with a public 'Brb' access will be able to be called as a ROM-based B*bcommand without HADFS being selected as a the current filing system. Once these are entered, files can be loaded into the ROM image. You are given a prompt which shows how much space and directory space is left. B*bCommands can also be given at this prompt, eg to change directory. The file I$.Extras.IntRomi is a ROM with the supplied Library in it DDemoGbPbd This demonstates calls to OSGBPB to read various information. It runs through all the calls from 5 to 255, and displays the returned information. This will also work on other filing systems to demonstrate what is returned. DDemoArgsd This demonstates calls to OSARGS to read HADFS context parameters. XGeneral Programsx These programs should work any machine, including RISC OS systems, and on any filing system. DTreeCopyd ITreeCopyi will copy files between filing systems, preserving the directory structure and file attributes. The program is quite easy and self- explanatary to use. It has been completely rewritten to be fully error-trapped, allow disk swapping, and it reads as many files as possible before writing, thereby reducing disk swaps. Some notes to bear in mind are: * The attributes have the 'W' and 'R' options added when copying from DFS. * Filenames are shortened to seven characters when copying to DFS. * If a file has no read access, ITreeCopyi will set the access to 'R', copy it, and then reset the access to what it was. Obviously, the source disk will need to be not write protected if this happens. * If copying to or from ADFS disks, put the ADFS disk in drive 0. This is because the B*ADFSb command mounts drive 0. Alternatively, use BFADFSb as the filing system. * When copying from ADFS disks, B*MOUNTb them first. * When copying from Econet, the Execute bit is masked out as it is usually just a copy of the Read bit. * Answering 'Yes' to the 'Recurse?' question will copy subdirectories. * The 'Pause to change disks?' option allows you to use the same drive for different disks. * When copying from DFS the 'Copy all DFS directories?' question allows you to copy the whole disk, creating an approximation of the DFS directory structure by putting all the non-I$i directories into subdirectories, or adding a prefix to the filename. If you answer 'Y' to the subsequent 'Put into subdirs?' question, any directory other than the DFS I$i directory is put into :\ Save control block pointer @LDA (&F0),Y:TAX:INY:LDA (&F0),Y :\ X=count, A=action HJSR DriveAccess :\ A=result, X=claim/noclaim LTAY:PLA:STA &F1:PLA:STA &F0:TYA :\ Restore control block pointer $;LDY #11:STA (&F0),Y:DEY :\ Store result .E.Osw90Result :\ Copy control block and 8@DEY:LDA addr-2,Y:STA (&F0),Y:PLA :\ Restore workspace B'STA addr-2,Y:CPY #2:BNE Osw90Result L$TXA:BEQ ServClaimY:JMP ServQuitX V: `EQUW IDEDriveHeader-2 j.RAMDiskHeader tRTS:RTS:RTS:RTS:RTS:RTS ~9EQUB &00:EQUB RAMDiskCopyright-RAMDiskHeader:EQUB &01 ;EQUS "HADFS:RAMDisk":EQUB &00:EQUS "1.00 (12 Jan 1992)" .RAMDiskCopyright +EQUB &00:EQUS "(C)J.G.Harston":EQUB &00 : .DriveAccess 2CMP #&40:PHP: #63:TAY:PLP:BCS DiskNoPartition NLDA #0:STA &FC02:STA &FC01:LDA #16:STA &FC00:\ Look for RAMDisk partitions .LDA &FC03:CMP #"P":BNE RAMDiskNoPartition LDA #32:STA &FC00 .RAMDiskPartLoop %LDA &FC03:BPL RAMDiskPartitionEnd ( #31:CMP drive:BEQ RAMDiskPartFound �"LDA &FC00:CLC:ADC #4:STA &FC00  JMP RAMDiskPartLoop =.RAMDiskPartitionEnd:.RAMDiskNoPartition:.DiskNoPartition  LDA drive (>CMP #"4"-&30:BNE P%+5:JMP HardDisk :\ '4' -> Hard drive 2>CMP #"5"-&30:BNE P%+5:JMP HardDisk :\ '5' -> Hard drive <;CMP #"M"-&37:BNE P%+5:JMP MMCDisk :\ 'M' -> MMCDisk F8CMP #"L"-&37:BNE P%+5:JMP SerialDrive:\ 'L' -> Link P;CMP #"R"-&37:BNE P%+5:JMP RAMDisk :\ 'R' -> RAMDisk Z .DiskNull dDTYA:LDX #&FF:RTS :\ No drive, don't claim n.RAMDiskPartFound xJLDA &FC00:CLC:ADC #1:STA &FC00:LDA &FC03:CLC:ADC sect+0:STA sect+0:PHP JLDA &FC00:CLC:ADC #1:STA &FC00:LDA &FC03:PLP:ADC sect+1:STA sect+1:PHP FLDA &FC00:CLC:ADC #1:STA &FC00:LDA &FC03:PLP:ADC sect+2:STA sect+2 \ Fall through into RAMDisk : \ ------------------------ \ RAM CARD ACCESS ROUTINES \ ------------------------ )\ Y=&00, &01, &02 - null, write, read \ X=sector count :  .RAMDisk .RAMDiskLoop ?LDA sect+0:STA &FC01:LDA sect+1:STA &FC02:\ RAMCard address BIT &27A:BPL RAMDiskIO .LDA addr+2: addr+3:CMP #&FF:BNE RAMDiskIO >TXA:PHA:TYA:PHA :\ Save registers "CCLC:ADC #5: #1:JSR TubeClaim :\ 1->7 write, 2->6 read ,APLA:TAX:PLA:TAX :\ Restore registers 6DEY:BEQ RAMWriteTube:DEY @.RAMReadTube J!STY &FC00:LDA &FC03:STA &FEE5 T'NOP:NOP:NOP:NOP:INY:BNE RAMReadTube ^LDY #2:BNE RAMTubeAddress h.RAMWriteTube r!STY &FC00 a subdirectory of the destination directory. Answering 'N' will put them in the destination directory, prefixed with x/, when x is the directory. Eg, DFS IB.Progi becomes IB/Progi. When copying to DFS there is the 'Expand into DFS dirs?' question. This allows you to copy files with a x/ prefix saved by answering 'N' to the 'Put into subdirs?' question into the DFS x directory. Eg, IB/Progi becomes DFS IB.Progi. ITreeCopyi can take the following command line parameters, which must be in this order: B(<fs>:)<src> (<fs>:)<dest> CPRE (-dest) (-quit <name>)b The B<src>b and B<dest>b directories can be prefixed by a filing system name terminated with a B:b, eg BHADFS::0.$b The single character options control the level of copying: C - Confirm P - Pause to change disk R - Recurse E - Expand DFS directories They can be prefixed with 'B~b' to turn off the option, eg B~Cb means no confirm. If the B-destb option is given, then BTreeCopyb will terminate with the destination filing system selected. Otherwise, the source filing system remains selected. The B-quitb option can give a file to run on exit. If the name starts with a B*b, then it is called as a B*bCommand, otherwise it is CHAINed. An example command line would be: B*TreeCopy HADFS::0.$.Disk1 ADFS::1.$ ~C~PR~E -quit %.MenuProgb If any parameters are not given, they are asked for. The B-destb and B-quitb options must be given in lower case, and only the first letter is significant. DETreed IETreei will display an expanded tree display of the directory structure. When run, IETreei asks for the path of the directory to display. At this prompt, you can also give command line option flags. If you did not given any option flags when entering the path, you are then asked whether to show files (or just directories) and file information, and whether to print out the display. If you select printing, then the characters used are those suitable for printing on a printer that has characters 128 to 255 set to PC-8 characters. If there is any information available on the disk root, it is show. At the end, the total space used by the directories and files looked at is show. If you use the B-countb option, then all directories will have their contents added up and the total shown individually. IETreei can take the following command line parameters, which can also be entered at the 'Path to show:' prompt: B*ETree path [-files] [-info] [-count] [-list] [-print]b The option flags must be :LDA &FEE5:STA &FC03 |(NOP:NOP:NOP:NOP:INY:BNE RAMWriteTube INY .RAMTubeAddress >TXA:PHA:TYA:PHA :\ Save registers <LDA #&80+14:JSR &406 :\ Release Tube APLA:TAX:PLA:TAX :\ Restore registers @JMP RAMCardAddress :\ Update addresses : E.RAMDiskIO :\ Read/Write I/O memory DEY:BEQ RAMCardWrite:DEY A.RAMCardRead :\ Read from RAMCard 8STY &FC00:LDA &FC03:STA (addr),Y:INY:BNE RAMCardRead :LDY #2:BNE RAMCardAddress :\ Y=2 - read @.RAMCardWrite :\ Write to RAMCard 9STY &FC00:LDA (addr),Y:STA &FC03:INY:BNE RAMCardWrite ;INY :\ Y=1 - write .RAMCardAddress &JSR AddressUpdateOne 0GDEX:BEQ P%+5:JMP RAMDiskLoop:TXA:RTS :\ A=&00, X=&00, ok, claim :: D.AddressUpdateOne N LDA #1 X.AddressUpdateCount b!PHA:CLC:ADC addr+1:STA addr+1 l LDA addr+2:ADC #0:STA addr+2 v LDA addr+3:ADC #0:STA addr+3 !PLA:CLC:ADC sect+0:STA sect+0  LDA sect+1:ADC #0:STA sect+1  LDA sect+2:ADC #0:STA sect+2 RTS : .TubeClaim PHA .TubeClaimLoop :LDA #&C0+14:JSR &406:BCC TubeClaimLoop :\ Claim Tube !LDX #addr:LDY #0:PLA:JMP &406 : EQUW MMCDriveHeader-2 .IDEDriveHeader RTS:RTS:RTS:RTS:RTS:RTS  ;EQUB &00:EQUB IDEDriveCopyright-IDEDriveHeader:EQUB &00 <EQUS "HADFS:IDEDrive":EQUB &00:EQUS "0.10 (01 Jan 2004)"  .IDEDriveCopyright *4EQUB &00:EQUS "(C)J.G.Harston":EQUB &00:EQUB &00 4: >.IDEAbsent HETYA:RTS :\ Return A=Y, no device R: \ .HardDisk f\ ------------------ p\ IDE DRIVE ROUTINES z\ ------------------ )\ Y=&00, &01, &02 - null, write, read \ X=sector count : DLDA IDEstatus:CMP #&FF:BEQ IDEAbsent :\ Quit if no interface DLDA #64:STA IDEcount:STA IDEsector :\ 64 sectors per track >LDA #3:STA IDEhead:LDA #&91:STA IDEcommand :\ Set geometry  .IDELoop "LDA &FF:BPL P%+5:JMP IDEEscape BLDA IDEstatus:BMI IDELoop :\ Wait for IDE ready DCLC:LDA #1:STA IDEcount :\ One sector at a time GLDA sect+0: #63:ADC #1:STA IDEsector :\ Pass 3-byte sector to IDE CLDA sect+1:ADC #0:STA IDEcylinder+0 :\ Start at cylinder 0 JLDA sect+2:ADC #0:STA IDEcylinder+1 :\ HADFS can't access b24-b27 FLDA drive:ROR A:PHP :\ Pass drive 4/5 into Cy BLDA sect+0:ROR A:ROR A:PLP:ROR A: :\ Join drive to head AROR A:ROR in lower case, and only the first letter is significant. If there are no parameters, IETreei asks for them. XLibrary File Utilitiesx These transient utilities can be used on any filing system for accessing or giving information on files. Information about these commands is given in the file I$.Extras.Library/ti. XLibrary General Utilitiesx These transient utilities and MCoded Basic programs can be used on any filing system. Information about these commands is also given in the file I$.Extras.Library/ti. XPrintout Programsx Most of the text files supplied on the System Startup disk are extended View files. These are text files created with Acorn's View word processor, using extensions to highlight two to provide easier-to-use printer functions. IMakeLPi creates the B*lpb commands to print out the files (replacing View's BPRINTb command), B*lpSb can be used to show the effects on the screen (replacing View's BSCREENb), and BScrollb can be used to scroll though a text file of any length, again showing the effects. DMakeLPd This program creates the Blpb command to print out View or text files to a printer. The name Blpb comes from Unix - it's short for ELeine EPerinter. IMakeLPi allows you to create a customised version of Blpb tailored for your printer and for what effects you wish to use. The default settings are for Epson-compatible printers. Blpb extends View's highlight 2 to give the extra facilities. After a highlight 2 you put a letter indicating an effect. A capital letter turns it on and a lower case letter turns it off. As an example: doing *Ihello*i would put the word 'hello' in italics. Pound symbols are correctly printed (hurray!!) - for this you need your printer set in US mode. This is done by setting some DIP switches somewhere, usually the endmost three to 'off'. Check your manual on this. The pound symbols are printed by switching to UK, printing a '#', and then switching back to US. As with everything else, this can be changed. The program is fairly simple to use. There is a main menu with a few options. Option 5 - Create View Driver - is not yet implemented. Options 1 and 2 allow you to change the parameters for your printer. Options 3 and 4 allow you to save and load the settings, and option 6 creates an Blpb command. The actual name can be changed to anything reasonable. I recommend creating a Ilpi directory in the Library, and naming the commands I%.lp.nlqi, etc. The System Startup Disk has various files supplied in tA:ROR A: #&13:STA IDEhead :\ Set device and head $>DEY:BEQ IDEWrite:DEY :\ Jump for write .: 88LDA #&20 :STA IDEcommand :\ &20=Read B .IDERdLp1 L>LDA &FF:BMI IDEEscape :\ Escape pressed VLLDA IDEstatus:BMI IDERdLp1 :\ Wait for command to complete `;LDA IDEstatus: #1:BNE IDEError :\ Error occured j@.IDERdLp2 :\ Fetch one sector t-LDA IDEdata:STA (addr),Y:INY:BNE IDERdLp2 ~LLDY #2:BNE IDEAddress :\ Y=2 - read, update addresses : .IDEWrite 9LDA #&30 :STA IDEcommand :\ &30=Write .IDEWrLp1 >LDA &FF:BMI IDEEscape :\ Escape pressed LLDA IDEstatus:BMI IDEWrLp1 :\ Wait for command to complete ;LDA IDEstatus: #1:BNE IDEError :\ Error occured ?.IDEWrLp2 :\ Send one sector -LDA (addr),Y:STA IDEdata:INY:BNE IDEWrLp2 ;INY :\ Y=1 - write : I.IDEAddress :\ Update addresses and loop �;LDA IDEstatus: #&21:BNE IDEError :\ Error occured JSR AddressUpdateOne GDEX:BEQ P%+5:JMP IDELoop:TXA:RTS :\ A=&00, X=&00, ok, claim : (.IDEEscape 2BLDA #&24 :\ Fake 'Abort' error < .IDEError FA IDEerror:PHA P8 #1:BNE IDENotPresent :\ 'No media' Z<PLA:PHA: #32:BNE IDENotPresent :\ 'Device fault' dAPLA:RTS :\ Return IDE status nN.IDENotPresent :\ Should really return preserved xJPLA:LDA #&FE:RTS :\ Return 'drive not present' : EQUW SerialLinkHeader-2 .MMCDriveHeader RTS:RTS:RTS:RTS:RTS:RTS ;EQUB &00:EQUB MMCDriveCopyright-MMCDriveHeader:EQUB &00 9EQUS "HADFS:GoMMC":EQUB &00:EQUS "0.10 (30 Aug 2004)" .MMCDriveCopyright 4EQUB &00:EQUS "(C)J.G.Harston":EQUB &00:EQUB &00 \.ModuleChainEnd \ \ ------------ \ GoMMC DRIVER \ ------------ )\ Y=&00, &01, &02 - null, write, read \ X=sector count  .MMCDisk " TYA: #1:STA &103 :\ Command ,!TXA:PHA:STA &10F :\ Number 6LDY #3:.MMCLp2 :\ Addr @(LDA addr,Y:STA &106,Y:DEY:BPL MMCLp2 J!LDY #2:.MMCLp3 :\ Sector T(LDA sect,Y:STA &10B,Y:DEY:BPL MMCLp3 ^7LDA #0:STA &111:STA &110:STA &10E:STA &10A:STA &105 hLDA #&01:STA &104 rLDA #&03:STA &102 |LDA #&12:STA &101:STA &100 LDA &F0:PHA:LDA &F1:PHA %LDX #0:LDY #1:LDA #&B0:JSR OSWORD PLA:JSR AddressUpdateCount PLAhe I%.lpi directory. On option 1, you have some Yes/No questions and some value questions. Pressing BRETURNb leaves them as they are. You may have to experiment a bit to find what the correct values are for your setup. There are some supplied files for different lengths of paper and number of lines on each page. Text lines Page lines Supplied files Continuous A4 70 70 I%.lp.70A4 %.lp.70A4nlqi Standard A4 66 70 I%.lp.66A4 %.lp.66A4nlqi Short A4 60 70 I%.lp.60A4 %.lp.60A4nlqi Continuous Listing 66 66 I%.lp.66 %.lp.66nlqi Standard Listing 60 66 I%.lp.60 %.lp.60nlqi These are the files used by the JGHPD ViewHello View menu system. On option 2, you select the code string you want to alter with the cursor keys. To change the string, type in the new string. The input is fairly flexible. You can put commas between everything, or not. You can enter in characters or decimal. If you want the number characters "0" to "9", they must be surrounded in quotes, otherwise they are taken as values. Examples are: 27,S,"0" \ 27,S,48 } all the same. 27,83,48 / To remove a setting, press ESPACEe followed by ERETURNe. The setting should then disappear. Pressing ECOPYe will allow you to edit the settings for punctuation and numbers. When Blpb starts it does a '@' code. This is defined to reset the printer, and can also set it to NLQ if you want. This makes the current position on the paper the top of the form (the place where Form Feeds go to). If you don't want this, set '@' to nothing. Blpb ignores View's ruler and embedded commands, etc. Tabs are to 8 character positions, as on the default ruler. The syntax of Blpb is: B*lp (+) <afsp> (<num>)b If the 'B+b' prefix is given, Blpb double spaces. If a decimal B<num>b is given, then that number of copies are printed. You can press BEscapeb at any time and the print job will be terminated, but the printer itself may continue for a while as it empties its own buffer. Hints If your printer prints everything on the same line, you need to set IAuto linefeedi to IYesi from option 1. If it doublespaces when you don't ask it to, you need to set IAuto linefeedi to INoi. If your printer form feeds to much, set IForm feedsi to INoi. The following are Highlight 2 extensions that are used in most of the text files, and so I recommend you set them to do a suitable effect on your printer. Bb BBoldb on/off Main bold effect Cc CCondensedc on/off Dd DDou:STA &F1:PLA:STA &F0 LDA #0:TAX:RTS : : EQUW ModuleChainEnd-2 .SerialLinkHeader RTS:RTS:RTS:RTS:RTS:RTS ?EQUB &00:EQUB SerialLinkCopyright-SerialLinkHeader:EQUB &01 >EQUS "HADFS:SerialLink":EQUB &00:EQUS "1.01 (18 Jul 1991)" .SerialLinkCopyright 4EQUB &00:EQUS "(C)J.G.Harston":EQUB &00:EQUB &00 .ModuleChainEnd : &: 0!\ --------------------------- :!\ SERIAL LINK ACCESS ROUTINES D!\ --------------------------- N)\ Y=&00, &01, &02 - null, write, read X\ X=sector count b: l.SerialDrive vLJSR SerInit:TYA:BCS SerReturn :\ Return A=Y, X<>0 if no driver :PHP:CLI :\ Enable IRQs APHA:JSR SerWrite:TXA:JSR SerWrite :\ Send Command,Count LDY #3 .SerCtrl :LDA sect,Y:JSR SerWrite:DEY:BPL SerCtrl :\ Send sector <PLA:CMP #&01:BEQ SerWriteLoop :\ Check command @ :\ Should reject &00 .SerReadLoop ?JSR SerRead:BNE SerResult :\ Return if ACK<>0 LDY #0 <.SerReadBytes :\ Read a sector 1JSR SerRead:STA (addr),Y:INY:BNE SerReadBytes JSR AddressUpdateOne CDEX:BNE SerReadLoop :\ Loop for each sector BEQ SerDone : .SerWriteLoop * LDY #0 4=.SerWriteBytes :\ Write a sector >3LDA (addr),Y:JSR SerWrite:INY:BNE SerWriteBytes H?JSR SerRead:BNE SerResult :\ Return if ACK<>0 RJSR AddressUpdateOne \DEX:BNE SerWriteLoop f: p .SerDone z5LDA #&00 :\ &00=ok .SerResult GPLP:LDX #0 :\ Restore IRQs, claim call .SerReturn RTS : .SerRead 7PHA:TXA:PHA:TYA:PHA :\ Save all .SerRdLp GLDY #&FE:BIT &FF:BMI SerReadEsc :\ Abort with &FE if Escape ALDA #&91:LDX #&01:JSR OSBYTE :\ Check SERIN buffer FBCS SerRdLp :\ Loop until data present .SerReadEsc =TYA:TSX:STA &103,X :\ Store on stack :PLA:TAY:PLA:TAX:PLA :\ Restore all RTS : $ .SerWrite .7PHA:TXA:PHA:TYA:PHA :\ Save all 8 .SerWrLp B>BIT &FF:BMI SerWrEsc :\ Abort if Escape LBTSX:LDA &103,X:TAY :\ Get byte from stack V>LDX #&02:LDA #&8A:JSR OSBYTE :\ Write to SEROUT `ABCS SerWrLp :\ Loop until send ok j .SerWrEsc t:PLA:TAY:PLA:TAX:PLA :\ Restore all ~RTS :  .SerInit IPHA:TXA:PHA:TYA:PHA:ble-striked on/off \ Auxilary Ee EEmphasidede on/off / bold effects Hh HDouble Heighth on/off Ii IItalicsi on/off Qq QQuad sizeq on/off This takes 3 lines (That bottom line ^^^^ has to be blank for Quad to work on the LC10/1001) Ss SSuperscripts on/off, as in dates: 3Srds March Ww WWidew on/off Xx XWide X Highx Yy YSubscripty on/off also: Highline One is used for underline Pound: ` Hash: # D*lpS (-<lines>) <afsp>d The BlpSb command will display a text file to screen, taking account of the following effects: BBoldb, IItalicsi, SSuperscripts, WWidew, YSubscripty and Underline. If a B<lines>b parameter is given, then each page is split with a line of '=' characters. DScrolld IScrolli is a scrolling textfile reader. You can scroll upwards and downwards through text files of any length. Extended View highlight codes as used by B*lpb and B*lpSb are acted on to give Bboldb, Iitalicsi, Ssuperscripts, Wwidew, Ysubscripty and underline effects. These can be turned off to give plain View extensions of *bold* and underline. IScrolli will also run on the Archimedes. If there is enough memory, IScrolli uses shadow mode 0, otherwise mode 3 is used. Unless a command line file is given, IScrolli shows the current directory and asks for a filename. At this prompt you can also give B*bcommands to change directory, etc. Once a file is given, it is loaded and displayed. The keys are simple. Cursors move up and down. Pressing EShifte will jump one screen at a time. Pressing ECtrle will jump to the ends of the file. Pressing ECOPYe will flip between extended highlights and plain highlights. Pressing EEscapee will leave. Pressing EPe and ERETURNe will let you print out the file. Before you press ERETURNe a prompt appears telling you the name of the printout command. You can change this here by deleting it and typing in another comand, but IScrolli will usually have found a suitable one. The recommended command B*lpb comand is created with the IMakeLPi program. Pressing E4e will display the file in 40 column teletext mode, if IScrolli has been told what program to use. The bottom line of the screen shows the filename of the file being scrolled, a percentage figure showing how far through the file you are, and a reminder of the keys used. IScrolli will take the following command line arguments: B*Scroll (-lp <name>) (-4 <name>) (-p <pagelen>) <afsp> (-quit <name>)b B<afsp>b is theLDX &F4:LDA &DF0,X :\ Save regs, get status byte =SEC: #7:BEQ SerInitExit:ADC #0 :\ Drive L disabled ;PHA:TAX:LDA #8:JSR OSBYTE :\ Set Rx speed ;PLA:TAX:LDA #7:JSR OSBYTE :\ Set Tx speed BLDA #&02:TAX:JSR OSBYTE:CLC :\ Enable serial input .SerInitExit ?PLA:TAY:PLA:TAX:PLA:RTS :\ Cy=1 if disabled :  EQUB 13 ?EQUS "&DF0,X b0-b2=(serial speed)-1 or 000 for OFF":EQUB 13 �,EQUS " b7 =ROM disabled":EQUB 13  BRK : : (]: 2="*Save SupportROM ";~mcode%;" ";~O%;" FFFF0000 FFFBBC00" �Updates PLA:LDA #0 LDY #11:STA (ptr),Y RTS :  .start% LDA WORDV:STA OldWord+1 LDA WORDV+1:STA OldWord+2 "LDA #Intercept 255:STA WORDV  )LDA #Intercept 256 & HADFS Version 5.30 ================== There are some errors in the second edition printed manual. Refer to the text files in $.Manual for correct information. Page 27: *SETUSER is *ACCOUNT, and can also take a file as a parameter. When used with a file, the command is ignored for future compatability. The user number is now called the account number. Any additional parameters after the account are ignored, so the command *ACCOUNT FRED 002 (004) will be accepted, ignoring the auxillary account in parentheses. In general, 'account' is used interchangably with 'user number'. Page 29: Osfile &FD: returns account infomation in load address field. XY+2 and XY+3 contain the main account number, XY+4 and XY+5 contain the auxillary account number, currently set identically to the main account number. Do not depend on the exec address field containing any specific information at this stage. The only other infomation currently returned is the length and sector address. Osfile &FF: If the low byte of the execution address is Inoti zero, the file's own load address is used. Page 32: Function &FD, Y<>0; to read and write the CSD, LIB and URD use Y=&08/&88, &09/&89, &0A/&8A. Page 38: A year value of <&81 implies a century number of &20. A year value of >&80 implies a century number of &19. Page 80: In the definition of DEFFNgbpb8 is incorrect. It should be as follows: DEFFNgbpb8(ptr%):X%!1=name%:X%!5=1:X%!9=ptr%:A%=8:CALL&FFD1 IFX%!5=1:="" name%?(1+?name%)=13:=$(name%+1) Page 82: DEFPROCConvDate is incorrect. It should be as follows: DEFPROCDate_FromOrd(mem%,d%,m%,y%,hr%,mn%,sc%,cs%):y%=y%MOD400 d%=y%*365.25+m%*30+d%+VALMID$("120112234455",m%,1) d%=d%+((y%MOD4)=0)-((y%-1)DIV100) d%=d%-(m%>2AND((y%MOD4)=0AND(y%MOD100)<>0ORy%=0))+36493 IFd% file to display. The B-lpb option gives a command to use to print out the file. If this option is not given, then a default printout command is looked for as detailed below. The B-4b option gives a command to use to display the file in 40 column teletext mode. The B-pb option gives a pagelength to use when displaying page breaks. The B-quitb option gives a command to run on exit. If the B<name>b starts with a B*b, then it is called as a B*bCommand, otherwise it is BCHAINbed, with any parameters passed via the keyboard buffer. The options must be in lower case, and only the first letter is significant. So, for instance, to call IScrolli from another program, you could use the following: B CHAIN "Scroll -4 $.3to7 "+name$+" -quit Menu"b This would run BScrollb and display the file Bname$b, and CHAIN the program I$.3to7i to display in teletext mode. On exit, it would return to the program BMenub. On starting, if no B-lpb option is given, IScrolli looks for an B*lpb printout program. The order it looks for one is: Ilpi, I%.lpi, I%.lp.#i, I%.lp.*i, I$.lpi, I:0.$.lpi. The recommended place to put the B*lpb command is in the library in a subdirectory I%.lpi, with a file I1i being a default general purpose printer. With DFS, the best place would be in the I$i directory. IScrolli consists of the following files: IScrolli - The program Idispi - Controls screen output giving display effects IScroll/ti - This text file. Q6 Error messagesq   This chapter lists all the HADFS error messages, each preceded by the appropriate error codes. The error codes are returned by the BASIC function BERRb. The errors are listed in alphabetical order, and some similar error messages have the same error number. E&CF 207 Bad attributee The B*ACCESSb command has been attempted with an access string containing characters other than WRELP. E&FE 254 Bad commande The command was not recognised by HADFS, nor was it found as a transient command in the CSD or the library. E&CD 205 Bad drivee An attempt to use an invalid drive number. Valid drives are :0 to :9 and :A to :Z. :W to :Z map onto :0 to :3. E&CC 204 Bad filenamee An illegal filename was used, eg part of the name was longer than ten characters or less than one character, or contained a control character or a character larger than B~b, or one of the special characters B%b, B&b, B^b or B@b used incorrectly. E&FC 252 Bad numbere The B<size>b parame>146066:d%=d%-146097 d%=d%*&41EB:mem%!1=d%+d%:d%=((hr%*60+mn%)*60+sc%)*100+cs% ?mem%=d%:mem%!1=mem%!1+d%DIV256:ENDPROC Page 87: When preserving directory context, the following should be used: csd%=FNargs(&FD,8,0) /// csd%=FNargs(&FD,&88,csd%) Page 88: INY:CPY #10:BNE AddrLoop Ishould readi \ RAM-based code \ ROM-based code: INY:CPY #8:BNE AddrLoop:INY:INY INY:CPY #10:BNE AddrLoop  8���������W:�P #&A0:BCS Osb90Claim :\ Should use b6/b5 as bitmap 44LDA &FC00:CLC:ADC #4:BNE OLibrary G�?m������BACKU ?i���{��I�ib ���������УBreak � ? �`CLoad � ?h raCOMPAT Jo���{�� cCOPY ?!XpCrunc � ? �(sCSave � ? itDISABE � ?@ �XvDisks � ?* qwdisp ? 40$yETree i���{��10|Exploe � ? b�FileIfo � ? p,Filer L���{��^/Files � ? vXForm10 �`?<`?xKillDS � ?@ �X ���������qlpS ?;XxMakeL D?�5%MCode �r��_z��g$MDump � ?0 �-Mouse = ?I 5/pc8s L?Tv@q1PrLis ? 3Repai �r��y��=p6Repea jq���{��x q?ROMS � ?� JScrLod ?@LScrol ^���{��6O �  >BACKUP v1.20 01-Dec-1998 � Backup program �4 v1.15 28-12-1997: More display, tidier program �(7 v1.16 11-01-1998: Countdown counts down (not up!) �2/ v1.18 20-03-1998: Command line parameters �<- v1.19 10-08-1998: Missed OR&20 replaced �F+ v1.20 01-12-1998: Can use disk images �P4&87:A$=OS_GetEnv:quit$=cl(" -q",1):::end �ZRcl("-?",0):"Syntax: "run$" (<src> <dst> (<trks> <sides>) (-t <tries>)":end �d:init:"BACKUP PROGRAM 1.20. Buffer size: &";~maxlen%' �n:Close:end �x fs%=fs:params:backup:end � �: �?init:OSWORD=&FFF1:OSGBPB=&FFD1:maxlen%=(--3000)&FFFF00 �- ctrl%30,data%maxlen%:X%=ctrl%:Y%=X%256 � �: �'Close:fs%<>fs:"FX143,18,"+fs% �"ch%=ch%:ch%:A%=ch%:ch%=0:#A% � �#ݤh0(A%,N%)="0000000"+~A%,N%) �#ݤfs:A%,X%,Y%,E%:=(&FFDA)&FF �: �,Drd(Ad%,Dv%,Sc%,Nm%):dsk(&53,sdrv$): ,Dwr(Ad%,Dv%,Sc%,Nm%):dsk(&4B,ddrv$): *dsk(Cmd%,fn$):Derr%=0:Dv%=-1:gpb: #"FX143,18,4":Nm0%=Nm%:A%=&7F: "3Num%=Nm%256:Num%+(Sc%10)>10:Num%=10-(Sc%10) ,try%=tries%: 6=?X%=Dv%:X%!1=Ad%:X%?5=3:X%?6=Cmd%:X%?7=Sc%10:X%?8=Sc%10 @;X%!9=Num%32:X%?7>79:X%?7=X%?7-80:?X%=?X% 2: Side 2 J'13:Cmd%=&53:"Read "; "Write"; TI" "h0(Dv%,1)":"h0(Sc%,6)"+"h0(Nm%256,2)" "h0(tries%-try%,1)" ter of the B*INSTALLb command or the B<nn>b parameter of the B*FORMb command was wrongly used. E&CB 203 Bad optione An invalid argument to a B*OPTb command. E&B0 176 Bad renamee Not enough parameters were given to the B*RENAMEb command, or an attempt was m