This list of function relates to version 2.04.

The major changes instigated in version 2.05 relevant to version 2.05 are:
i) Identify discs using Service_IdentifyDisc. This mechanism isn't fully
adequate for ST506 discs as their parameters have to be read from the disc
and resupplied back to the driver. The driver cannot determine the disc's
parameters properly on its own. There is no scheme within
Service_IdentifyDisc for the parameters to be attached to the drive on a
permanent basis - sad.
ii) Detachment of the winnie internal disc numbers from the winnie internal
drive numbers. It used to be the case that winnie disc numbers equaled their
drive numbers. This is no longer the case.
iii) Treating Winnies and Floppies exactly the same (modulo having a
different controller). It used to be the case in version 2.04 that winnies
were large, had defect lists and couldn't be removed, and that floppies were
small, didn't have a defect list and could be removed. The modification
route between 2.04 and 2.05 was: (i) above (allowing floppies to be large);
(ii) above; allow winnies to be removable. The removability criterion
required the pulling in of FloppyWriteBehindDisc and associated values to
the controller blocks, and all the code changes that this entailed.
iv) permitting partial mounting of discs for DiscOps. A partial mount
involved doing a low level mount, but skipping the identification and
startuo phase. The reason this was done was to allow MultiFS formatting to
write out the structure.
v) permitting discs to be opened as images. This allows MultiFS to work.

<No routines> - no FileCore specific routines
d - makes a parameter choice on floppy/winnie
D - makes a code choice on floppy/winnie
W - As D, but code choice is read ahead/write behind algorithm choice
C - As D, but code choice is PollChange choice
x - specific to Winnie or Floppy
s - uses scratch space

AsmHdr
  <No routines>

DebugOpts
  <No routines>

Defns
  <No routines>

DevVersion
  <No routines>

Errors
  <No routines>

FileCore
  <No routines>

FileCore00
  <No routines>

FileCore05
   ClearV()->(V)
   SetV()->(V)
   SetVOnR0(r0)->(V)
   PullLinkKeepV()->(pc,V)
   DiscAddToRec(r3=disc address)->(lr=disc record^)
   Divide(r0=numerator,r1=denominator)->(r0=div,r1=rem)
   BlockMove(r0=source start^,r1=destination start^,r2=length)->()
   Move256n(r0=source start^,r1=destination start^,r2=length)->()
   ZeroRam(r0=start^,r1=length)
   Read3(r0=start^)->(lr=24 bit result)
   ReadWord(r0=start^)->(lr=32 bit result)
   Write3(r0=start^,r1=24 bit value)->()
   WriteWord(r0=start^,r1=32 bit value)->()
   CheckEscape()->(r0=escape error^,Z)
   NewRandomId(r0=old FsMap^)->()
   OldRandomId(r0=old FsMap^)->()
   Sort(r0=start^,r1=end^)->()           sort table of words

FileCore15
External
d  IndDiscOp(r1=disc op,r2=ind. disc address of file,r3=RAM start,r4=length)->(r3=next byte,r4=bytes left,r5=next offset in file,Vs:r0=error^,other flags preserved)
d  GenIndDiscOp(r1=disc op,r2=ind. disc address of file,r3=RAM start,r4=length,r5=offset into file)->(r3=next byte,r4=bytes left,r5=next offset in file,Vs:r0=error^,other flags preserved)
   DoDiscOp(r1=disc op,r2=disc address,r3=RAM start,r4=length)->(r3=next byte,r4=bytes left,r5=next offset in file,Vs:r0=error^,other flags preserved)
   RetryDiscOp(r1=disc op,r2=disc address,r3=RAM start,r4=length)->(r3=next byte,r4=bytes left,r5=next offset in file,Vs:r0=error^,other flags preserved)
W  RetryDriveOp(r1=disc op,r2=drive address,r3=RAM start,r4=length,r5=disc record^,r6=sector cache handle)->(r3=next byte,r4=bytes left,r5=next offset in file,Vs:r0=error^,other flags preserved)
   ClaimFiq()->()
   ReleaseFiq()->()
   BackgroundClaimFiq()->(Z)
Internal
   DoCachedReadSector(r1=disc op,r2=disc address,r3=RAM start,r4=length,r5=disc record^,r6=sector cache handle)->(r3=next byte,r4=bytes left,r5=next offset in file,r6=sector cache handle,Vs:r0=error^)

FileCore20
External
D  WhatDisc(r1=drive id)->(r1=drive id,r2=disc id,r3=disc record^,V)
          15,35,40,50,60,80
D  PollChange(r0=drive id)->(lr=disc id)
          15,20,40,50,60,80
   FreeDiscRec(r0=disc id)->()
          20,50
D  UpdatePriority(r0=disc id)->()
          15,20
   UnlinkByDrive(r0=drive id)->()
          20,50
   UnlinkByDisc(r0=disc id)->()
          20,50
   CheckFsMap(r3=disc record^,r4=drive record^)->(V)
          20,35
   CheckSum(r0=start^,r1=length)->(r2=checksum,V)
          05,20,35,50
Internal
x  InitRdFloppyFs(r1=drive id,r2=disc record^,r4=drive record^)->(V)
          20
   Mount(r0=controller process block^,r1=drive id,r2=disc address,r3=RAM address,r4=length,r5=disc record^,r6=controller lock bits)->(xr0,V)
          20
x  InitReadWinnieFs(r1=drive id,r4=drive record^,r5=disc record^)->(V)
          20
   ReadOldFsMisc(r5=disc record^,r9=Free space map^)
          20
D  FindDiscRec(r1=drive id)->(r1=drive id,r2=free disc id,r3=free disc record^)
          20


FileCore25
   GetDir(r3=disc address)->(r5=dir buffer^,r6=byte after dir^,V)
   FindDir(r3=disc address)->(r5=dir buffer^,r6=byte after dir^,V)
   TryCache(r3=disc address)->(r11=cache object^,V)
   TryCacheDirBuff(r3=disc address,dir buffer)->()
   CheckDirCache()->()
   RemoveCacheDir(r11=cache entry^)->()
   InsertCacheDir(r11=cache entry^)->()
   UnCacheDisc(r0=disc id)->()
   InvalidateDirCache()->()
   ValidateDirCache()->()
   LockDirCache()->()
   UnlockDirCache()->()
   ExtendFileCache()->(r11=dir cache buffer^,Z)
   FormDirCheckByte(r5=dir start^,r6=dir end^,r7=dir tail^)->(lr=check byte)
   TestDirCheckByte(r3=disc address,r5->dir start^,r6=dir end^)->(lr=check byte,Z)
   EndDirEntries(r3=disc address,r5->dir start^,r6->dir end^)->(r0=first empty entry^)


FileCore30
   DefaultMoveData(r1=source address,r2=destination address,r3=length)->(r1+=transfer,r2+=transfer,r3-=transfer,V,r0->error if Vs)
   MoveData(r0=options,r1=source address,r2=destination address,r3=length,r4=start offset)->(r1+=transfer,r2+=transfer,r3-=transfer,r4+=transfer,V,r0->error if Vs)
   InitScatter()->()
   FindBuffer(r0=options,r1=min length,r2=max length,r3=granularity)->(xr0,r1=RAM address/scatter list,r2=length claimed,xr3,V,r0->error if Vs)
   ReturnBuffer()->()
   UpCall(r0=reason,r1->discname,r4=iteration)->(xr2,xr3,r4++,C)
   IncUsage(r3=disc(top 3 bits))->()
   DecUsage(r3=disc(top 3 bits))->()
   ReadTimeDate()->(r7=load,r8=exec)
   FindErrBlock(r0=internal error)->(r0=external error^)
   HexString(r0=number,r1=# nibbles,r2=dest^)->()
   WrHex(r0=number)->(V,r0=error^)
   WrDecWidth10(r0=number)->(V,r0=error^)
   WrDec(r0=number)->(V,r0=error^)
   EntryNoErr(sp)->(sb,sp+=2,V,r0=error^)
   EntryFlagErr(sp)->(sb,sp+=2,V,r0=error^)
   DormantEntryNoErr(sp)->(sb,sp+=2,V,r0=error^)
   DormantEntryFlagErr(sp)->(sb,sp+=2,V,r0=error^)
   FileCoreExit()->()
   DoExternal()->()
   OnlyExternal()->()
   Internal()->()
   InternalFromParent()->()
   ParentMisc(r0=op,r1=drive,other params)->(results)
   DoXOS_WriteS()->(V,r0=error^)
   DoSpace()->(V,r0=error^)
   DoXOS_WriteC(r0=char)->(V,r0=error^)
   DoXOS_Write0(r0=string^)->(V,r0=error^)
   DoXOS_NewLine()->(V,r0=error^)
   DoXOS_CLI(r0=string^)->(V,r0=error^)
   DoXOS_ReadC()->(r0=char,C,V,r0=error^)
   OnlyXOS_Byte(r0,r1,r2)->(r0,r1,r2,V,r0=error^)
   DoXOS_Byte(r0,r1,r2)->(r0,r1,r2,V,r0=error^)
   OnlyXOS_Claim(r0,r1)->(r0,V)
   OnlyXOS_Release(r0,r1)->(r0,V)
   OnlyXOS_FSControl(r0,...)->(...)
   DoXOS_Find(...)->(...)
   OnlySysXOS_Heap(r0,r2,r3)->(r0-r3,V)
   OnlyXOS_Module(r0-r2)->(r0-r5,V)
   OnlyXOS_ClaimScreenMemory       ;(R0-R2->R1,R2,C)
   OnlyXOS_Word
   OnlyXOS_GetEnv
   OnlyXOS_ConvertDateAndTime      ;(R0-R3->R0-R2)
   OnlyXOS_ConvertStandardDateAndTime      ;(R0-R2->R0-R2)
   OnlyXOS_UpCall
   OnlyXOS_ReadVduVariables
   DoXOS_Confirm
   OnlyXOS_ConvertFixedFileSize
   OnlyXOS_ReadUnsigned
   OnlyXOS_ConvertHex8
   OnlyXWimp_ClaimFreeMemory


FileCore31
   NewClaimFree(lr=disc record^,
   NewRandomClaim(r1=disc record^,r3=dir,r4=dir entry^,r10=size needed,r11=create/extend)->(r2=ind disc address,r10=actual size)
   ShuffleDown(
   BytesPerCylinder(r10=new map^)->(lr=bytes in a cylinder)
   SortDir(r3=dir disc address,r5=dir start^)->(r8=table start^)

FileCore32
 s DefCompactZone(r0=zone,r1=compaction degree,r10=map start^)->(V,r0=error^)
 s CompactZone(r0=zone,r1=compaction degree,r2=option bits,r10=map start^)->(V,r0=error^)
   AddMove(r3=end of CompMoves list^,r6=source start,r7=dest start,r8=length)->(r3 updated)
   CanMove(r2=fragment add,r5=gap add,r10=map^)->(Z=move conflict)
   FillGap(r1=option,r2=log2 alloc bits,r5=best fit,r6=end of GapFrags,r7=gap to fill,r9=gap length,r10=map start^,r11=min map obj,sp->workspace)->(xr0,xr3,xr4,r5 updated,xr8)
   FindFrag(r0=frag len in bits,r4=forbidden Id,r6=GapFrags end,r7=gap entry^,r10=map start^)->(lr=gap adjacent to frag^,Z=not possible)
   FindDest(r0=frag size,r1=separation between gap and next gap,r3=frag,r6=GapFrags end,r7=gap before frag,r10=map start^,r11=min map obj)->(HS=need to try another frag)
   DefDoCompMoves(r10=map start^)->(r3=empty list^)
   DoCompMoves(r3=move end^,r9=move start^,r10=map start^)->(r3=emtpy list^)

FileCore33
   DefFindFileFragment(r2=ind disc address,r5=offset)->(r2=disc add,r4=length left in frag,r9=gap before frag^,lr=frag start disc add)
   FindFileFragment(r2=ind disc address,r5=offset,r9=alt preceding gap)->(r2=disc add,r4=length left in frag,r9=gap before frag^,lr=frag start disc add)
   DefFindFragment(r1=map bit offset,r2=ind disc add of frag start,r10=map^)->(r1=map ptr to desired offset,r9=predecessor gap,r10=map ptr to frag start,lr=length left in map bits)
   DefFindFragment(r1=map bit offset,r2=ind disc add of frag start,r9=alt preceding gap,r10=map^)->(r1=map ptr to desired offset,r9=predecessor gap,r10=map ptr to frag start,lr=length left in map bits)
   LoadNewMap(r5=disc rec^,r6=drive rec^,r8=map buffer)->(V,r0=error^)
   MapDiscAdd(r5=disc rec^,r7=log2secspertrk,r9=zones)->(r2=map disc add)
   InvalidateFragCache()->()
   NewCheck(r0=start^,r1=length)->(lr=check byte,Z=good)
   SetNewCheck(r0=start^,r1=length)->()
   RoundUp(r0=file length,r3=disc id top 3 bits)->(r0=rounded file length)
   RoundUpSector(r0=file length,r3=disc id top 3 bits)->(r0=rounded file length)
   ReadAllocSize(r3=disc id top 3 bits)->(lr=alloc size for disc)
   MapPtrToDiscAdd(r3=disc id top 3 bits,r10=map^,r11=map ptr)->(r0=disc add)
   DiscAddToMapPtr(r0=disc add,r10=map^)->(r11=map offset,lr=zone)
   CritInitReadNewFs()->(r10=map^,r11=ready for NextFree)
   InitReadNewFs(r3=disc id top 3 bits)->(r10=map^,r11=ready for NextFree,lr=disc rec^)
   InitReadFs(r3=disc id top 3 bits)->(r9-r11 ready for NextFs)
   NextFs(r3=disc id top 3 bits,r9-r11 map position)->(r7=gap length,r8=gap ind disc add,r9-r11 map position,Z=done)
   InitZoneObj(r0=zone,r10=map^)->(r8=map bit of free link,r9=map bit of first space,r11=map bit of first map entry,lr=map bit of start of next zone)
   InitZoneFree(r0=zone,r10=map^)->(r11=map offset to free link)
   NextFree(r10=map^,r11=map offset to gap)->(r9=map ptr to next gap predecessor,r10=next gap,Z=exhausted all,C=exhausted a zone)
   RdLenLinkBits(r10=map^,r11=map offset)->(r7=len,r8=link)
   RdLenBits(r10=map^,r11=map offset)->(r7=len)
   RdLinkBits(r10=map^,r11=map offset)->(r8=link,Z=is 0)
   WrLenBits(r0=len in bits,r1=map offset,r10=map^)->()
   WrLinkBits(r0=link bits,r1=map offset,r10=map^)->()
   WrFreeNext(r0=map offset of next,r1=map offset of this,r10=map^)->()
   IdsPerZone(r10=map^)->(r1=ids per zone)
   IndDiscAddToZone(r0=ind disc add,r10=map^)->(r0=zone)
 s UnusedId(r0=zone,r10=map^)->(lr=unused id for that zone)
   DefFindIdThenClaim(r3=disc id top 3 bits,r4=length to claim,r6=predecessor gap of start gap,r10=map^)->(r2=ind disc add of obj,r11=map ptr of obj)
   FindIdThenClaim(r3=disc id top 3 bits,r4=length to claim,r5=do not use first gap of this size,r6=predecessor gap of start gap,r10=map^)->(r2=ind disc add of obj,r11=map ptr of obj)
   DefChainClaim(r2=link bits in bits 8-22,r4=length to claim,r6=predecessor gap of start gap,r10=map^)->(r11=map ptr of obj)
   DefChainClaim(r2=link bits in bits 8-22,r4=length to claim,r5=do not use first gap of this size,r6=predecessor gap of start gap,r10=map^)->(r11=map ptr of obj)
   ShortenFrag(r0=new len in bits,r1=old len in bits,r2=map bit of frag start,r3=map bit of start of gap before frag,r10=map^)->()
   ReallyShared(r2=ind disc add,r3=dir,r4=dir entry^,r5=dir start^)->(Z=file in shared frag and is sharing)
   MarkZone(r1=map ptr,r10=map^)->()
   ZoneFlagsPtr(r10=map^)->(lr=zone flags table^)
   Log2AllocBits(r10=map^)->(lr=log2 bits per alloc unit)
   AllocBitWidth(r10=map^)->(lr=bits per alloc unit)
   MinMapObj(r10=map^)->(lr=bits per smallest map object)

FileCore35
   BeforeReadFsMap(r3=top 3 bits disc num)->(V,r0=error)
W  BeforeAlterFsMap(r3=top 3 bits disc num)->(V,r0=error)
x  UnlockMap()->()
   EnsureNewFloppyId(r3=top 3 bits disc num)->(V,r0=error)
   PrelimFreeCheck(r3=ind disc add of dir,r4=entry for old obj^,r5=dir start^,r6=dir end^,r10=size required)->(C=can use old obj space,r2=old obj ind disc add if r0=0, else corruptV,r0=error)
   ClaimFreeSpace(r0=old extent (RAExtend),r3=top 3 bits disc num,r4=dir entry^ (RAExtend),r5=dir start^ (save/create/close),r10=size needed,r11=fsfile_reason or RAcreate or RAExtend)->r2=ind disc add of file,r10 length claimed(RAblah),V,r0=error)
   ReturnWholeSpace(r1=old file length,r2=ind disc add of file,r3=dir ind disc add,r4=dir entry^,r5=dir start^)->(V,r0=error)
   ReturnSpace(r0=new file length,r1=old file length,r2=ind disc add of file,r3=dir ind disc add,r4=dir entry^,r5=dir start^)->(V,r0=error)
   RemoveDirEntryOnly(r3=ind disc add of file,r4=dir entry^,r5=dir start^,r6=dir end^)->(V,r0=error)
   RemoveDirEntry(r3=ind disc add of file,r4=dir entry^,r5=dir start^,r6=dir end^)->(V,r0=error)
   TotalFree(r3=top 3 bits disc num)->(r0=total free)
   SizeLessDefects(r3=top 3 bits disc)->(lr=disc size less defects)
   InitReadOldFs(r3=top 3 bits disc id)->(r9,r10->first free space entry,r11=bytes left of free list)
   NextOldFs(r3=top 3 bits disc id,r10=map^,r11=bytes left)->(r7=length of space,r8=disc add of space,r10+=3,r11-=3,Z=none left)
   RemoveOldFsEntry(r3=top 3 bits disc id,r9=map^,r10=entry^,r11=#free spaces >= this)->()
   WriteOldFsEntry(r3=top 3 bits disc id,r7=length,r8=disc add,r10=entry^)->()
   UpdateFsMapCheckSum()->()
   WriteFsMap()->()
   WriteDirThenFsMap()->()
   WriteFsMapThenDir()->()
   InvalidateFsMap(r3=top 3 bits disc id)->()
   MakeDirEntry(r0=atts,r1=name^,r2=add of file,r3=add of dir,r4=entry^,r5=dir start^,r7=load,r8=exec,r10=length)->(V,r0=error)
   WriteName(r1=name^,r4=entry^)->()
   InvalidateBufDir()->()
   ValidateBufDir()->()
   IdentifyCurrentDisc()->(r3=top 3 bits disc num)

FileCore40
   CheckPath(r1=path^,r2=restriction bits)->(V,r0=error,C=bit 7 chars used)
   CheckName(r0=first char,r1=first char^)->(r0=first char after delimiter,r1=pointer to it)
   SkipSpaces(r1=string^)->(r0=first non-space char,r1=pointer to it,C=is terminator)
   ThisChar(r1=current char^)->(r0=the char,C=is a terminator)
   NextChar(r1=current char^)->(r0=next char,r1++,C=is a terminator)
   FullLookUp(r1=string^,r2=restriction bits)->(r1=point to stopping point in str,r3=dir's disc add,r4=entry^,r5=dir start^,r6=byte after dir^,V,r0=error,C=is a dir)
   ToParent(r3=dir disc add,r6=dir end^)->(r3=disc add of parent)
C  FindDiscByName(r1=name^,r2=restriction bits)->(r0=result code,r1=stopping point^,r3=dir disc add)
   SkipTerm(r0=term start^)->(r0=term or delim,r1=pointer to it)
   TermStart(r0=string start^,r1=char after term^)->(r1=1st char of term^)
   ParseAnyDrive(r1=string^)->(r0=drive,LO=1 char string and good drive,EQ=1 char string bad drive,HI=not 1 char string)
d  ParseDrive(r1=string^)->(r0=drive,LO=1 char string and good drive,EQ=1 char string bad drive,HI=not 1 char string)
   LookUp(r1=term^,r2=restriction bits,r3=dir disc add,r4=entry^)->(r4=entry^,C=found,Z=is file)
   LexEqv(r1=term^,r4=name^,r5=name chars bit mask)->(~C~Z~V=LT, CZ~V=EQ, C~Z~V=GT)
   ReadLoad(r4=entry^)->(lr=load)
   ReadExec(r4=entry^)->(lr=exec)
   ReadLen(r3=dir disc add,r4=entry^)->(lr=len)
   ReadIndDiscAdd(r3=dir disc add,r4=entry^)->(lr=ind disc add)
   ReadIntAtts(r3=dir disc add,r4=entry^)->(lr=atts)
   ReadExtAtts(r3=dir disc add,r4=entry^)->(lr=atts)
   WriteLoad(r0=load,r4=entry^)->()
   WriteExec(r0=exec,r4=entry^)->()
   WriteLen(r0=len,r4=entry^)->()
   WriteIndDiscAdd(r0=disc add,r1=entry^)->()
   WriteExtAtts(r0=atts,r3=dir disc add,r4=entry^)->()
   WriteIntAtts(r0=atts,r3=dir disc add,r4=entry^)->()
   SetIntAtts(r0=atts,r3=dir disc add,r4=entry^)->()
   WriteParent(r3=parent disc add,r6=dir end^)->()
   TestDir(r3=disc add)->(Z=is new,lr=disc rec^)
   TestMap(r3=disc add)->(Z=is new,lr=disc rec^)
   CheckDir(r3=dir disc add,r5=dir start^,r6=dir end^)->(V,r0=error^)
   QuickCheckDir(r3=dir disc add,r5=dir start^,r6=dir end^)->(V,r0=error^)
   IncDirSeqNum(r5=dir start^,r6=dir end^)->()
   IncObjSeqNum(r3=dir ind disc add,r4=entry^,r5=dir start^)->()
   NextDirSeqNum(r5=dir start^)->(lr=next dir seq num)
   IsDirFull(r3=top 3 bits disc id,r5=dir start^,r6=dir end^)->(V,r0=error)
   MakeDirSpace(r3=dir ind disc add,r4=entry^,r5=dir start^,r6=dir end^)->()
   WriteDir()->()

FileCore45
   OsFileEntry
   MyOsFile(r1=name^,r2=load,r3=exec,r4=len,r5=atts,r6=reason)->(r1-r5=atts,r6=type,V,r0=error^)
   OsFileBack(r3=dir disc add,r4=entry^,V,r0=error)->(r1-r5=atts,V,r0=error^)
   DoOsFileSave
   DoOsFileCreate
   LockedOrOpen(r3=dir disc add,r4=entry^)->(V,r0=error)
   DoOsFileWriteInfo
   DoOsFileWriteLoad
   DoOsFileWriteExec
   DoOsFileWriteAttr
   DoOsFileReadInfo
   DoOsFileDelete
   WriteNames(r5=dir start^,r6=dir end^,Z=new map)->()
   DoOsFileCreateDir
   DoOsFileLoad
   SaveCreate(r1=last term of name^,r3=dir in disc add,r4=entry^,r5=dir start^,r6=dir end^,r7=load,r8=exec,r9=ram start,r10=ram end,r11=reason,~Z=exists,C=and it's a dir)->(r0=result)
   StartCritical(r11=resume)->(xr7,xr8,xr9,xr10)
   SetResumeCritical()->(xr7,xr8,xr9,xr10)
   ExitCritical()->(xr7,xr8,xr9,xr10)
   DisableBreak()->(V,r0=error^)
   RestoreBreak()->(V,r0=error^)
   CriticalWriteFsMap()->(xall)
   CriticalWriteDir()->(xall)
   CriticalWriteDirThenFsMap()->(xall)
   CriticalWriteFsMapThenDir()->(xall)

FileCore50
D  InitEntry(as per module init entry)->(as per module init entry)
D  DieEntry(as per module final entry)->(as per module final entry)
   DeclareFS(r11=private word^)->(V,r0=error^)
d  ServiceEntry(as per module service entry)->(as per module service entry)
   DoSwiDiscOp(as per module swi entry)->(as per module swi entry)
   DoSwiCreate(as per module swi entry)->(as per module swi entry)
   ParentFiqRelease(r1)->()
   DoNulSwi(as per module swi entry)->(as per module swi entry)
d  DoSwiDrives(as per module swi entry)->(as per module swi entry)
   DoSwiFreeSpace(as per module swi entry)->(as per module swi entry)
x  DoSwiFloppyStructure(as per module swi entry)->(as per module swi entry)
   DoSwiDescribeDisc(as per module swi entry)->(as per module swi entry)
   DoSwiDiscardReadSectorsCache(as per module swi entry)->(as per module swi entry)
   SwiEntry(as per module swi entry)->(as per module swi entry)
   DoBack(as per command entry)->(as per command entry)
xs DoBackup(as per command entry)->(as per command entry)
   DoBye(as per command entry)->(as per command entry)
   DoCheckMap(as per command entry)->(as per command entry)
ds DoCompact(as per command entry)->(as per command entry)
   AgeDir(r7=ind disc add of dir)->(V,r0=error)
D  DoDefect(as per command entry)->(as per command entry)
   DoDismount(as per command entry)->(as per command entry)
   DriveContentsUnknown(r0=drive)->()
D  DoDismountDisc(r1=disc)->(V,r0=error)
   DoDrive(as per command entry)->(as per command entry)
   Confirm()->(V,r0=error,C=confirmed)
   FlushAndReadChar()->(r0=char)
   DoFree(as per command entry)->(as per command entry)
   DoMap(as per command entry)->(as per command entry)
   DoMount(as per command entry)->(as per command entry)
   DoNameDisc(as per command entry)->(as per command entry)
   DoNameDisk(as per command entry)->(as per command entry)
   DoNoDir(as per command entry)->(as per command entry)
   DoNoLib(as per command entry)->(as per command entry)
   DoNoURD(as per command entry)->(as per command entry)
   DoTitle(as per command entry)->(as per command entry)
   DoURD(as per command entry)->(as per command entry)
   DoVerify(as per command entry)->(as per command entry)

FileCore60
   OsFunEntry(r0=reason,...)->(...)
   CatHead(r3=dis add of dir)->(V,r0=error)
   MultiInfoText(r2=short/long,r3=dir disc add)->(xr1,V,r0=error)
   WildInfoText(r1=wild match^,r2=short/long,r3=dir disc add,r4=start offset)->(V,r0=error)
   SetTimeLen()->(r1=timelen)
   InfoText(r2=short/long,r3=dir ind disc add,r4=entry^,r7=string buf^)->(r0=string length)
   PutString(r4=string^,r7=string buf^)->()
   PutPaddedString(r4=string^,r6=max length,r7=string buf^)->(r7+=max length)
   PutPaddedStringAllowSpaces(r4=string^,r6=max length,r7=string buf^)->(r7+=max length)
   PutMaskedString(r3=top 3 bits disc num,r4=string^,r6=max length,r7=string buf^)->(r7+=max length)
   PutSpaceHexWord(r0=number,r7=buffer^)->(r7=new buffer^)
   PutHex2(r0=number,r7=buffer^)->(r7=new buffer^)
   PutHexWord(r0=number,r7=buffer^)->(r7=new buffer^)
   PutHexChar(r0=char,r7=buffer^)->(r7=new buffer^)
   PutSpace(r7=buffer^)->(r7=new buffer^)
   ScreenFormat(r0=field width)->(r9=# fields,r10=width slack,r9=# fields)
   NextField(r9=fields per row,r10=# separating spaces,r11=fields left)->(r9-r11 updated,V,r0=error^)
   WriteString(r7=string^)->(V,r0=error)
   DoOsFunDir
   ParseDir(r1=dir^)->(as per FullLookUp)
   SetDir(r3=dir disc add,r6=dir end^)->()
   UseRootLibIfUnset()->(V,r0=error)
   DoOsFunLib(r1=path^)->(V,r0=error)
   DoOsFunCat(r1=path^)->(V,r0=error)
   DoOsFunEx(r1=path^)->(V,r0=error)
   DoOsFunLCat(r1=path^)->(V,r0=error)
   DoOsFunFileInfo(r1=path^)->(V,r0=error)
   DoOsFunInfo(r1=path^)->(V,r0=error)
   DoOsFunOpt(r1=param1,r2=param2)->(V,r0=error)
   DoOsFunRename(r1=from^,r2=to^)->(V,r0=error)
   DoOsFunAccess(r1=path^,r2=att string^)->(V,r0=error)
   DoOsFunBootup()->(V,r0=error)
   DoOsFunReadDiscName(r2=buffer^)->(V,r0=error)
   DoOsFunReadCSDName(r2=buffer^)->(V,r0=error)
   DoOsFunReadLIBName(r2=buffer^)->(V,r0=error)
   DoOsFunReadDirEntries(r1=dir name^,r2=buffer^,r3=#names,r4=start index,r5=buffer len)->(r3=number read,r4=1st not read,V,r0=error)
   DoOsFunReadDirEntriesInfo(r1=dir name^,r2=buffer^,r3=#names,r4=start index,r5=buffer len)->(r3=number read,r4=1st not read,V,r0=error)
   DoOsFunCatalogObjects(r1=dir name^,r2=buffer^,r3=#names,r4=start index,r5=buffer len)->(r3=number read,r4=1st not read,V,r0=error)
   DoOsFunShutdown
   DoOsFunSetContexts
   PutStringToBuf(r3=top 3 bits disc,r4=string^,r6=max len,r7=buffer^,r10=buffer end^)->(r7+=len copied,C=buffer too small)
   Put0ToBuf(r7=buffer^,r10=buffer end^)->(r7+=len copied,C=buffer too small)
   PutByteToBuf(r0=byte,r7=buffer^,r10=buffer end^)->(r7+=len copied,C=buffer too small)
   DoOsFunCanonicaliseSpecialAndDisc
   DoOsFunResolveWildcard

FileCore70
   OpenFileEntry(r0=openmode,r1=name^,r2=special field^,r3=exthandle)->(r0=fileinfo,r1=handle,r2=buffer size,r3=extent,r4=allocated size,V,r0=error)
d  MyOpenFile(r0=openmode,r1=name^,r2=special field^,r3=exthandle)->(r1=inthandle,r2=buffer size,r3=extent,r4=alloc size,lr=fileinfo,V,r0=error)
   CloseFileEntry(r1=handle,r2=load,r3=exec)->(V,r0=error)
   MyCloseFile(r1=handle,r2=load,r3=exec)->(V,r0=error)
   CloseAllByDisc(r1=disc#)->(V,r0=error)
   OsArgsEntry
   DoOsArgsSetEXT
   DoOsArgsFlush
   DoOsArgsEnsureSize
W  DoOsArgsWriteZeroes
   DoOsArgsReadLoadExec
 s WriteZeroes(r7=start,r8=ind disc add of file,r9=length)->(V,r0=error)
   HandleCheck(r1=handle)->(r1=fcb,lr=earlier fcb^,V,r0=error)
   GetFilesDir(r1=handle)->(r3=dir ind disc add,r4=entry^,r5=dir start^,r6=dir end^)
   OpenCheck(r3=file ind disc add,r4=entry^)->(r8=prev fcb^/x,f9=fcb^/-1,Z=not open,V,r0=error)
   HasDiscOpenFiles(r0=disc #)->(Z=open files on disc)

FileCore80
d  GetBytesEntry(r1=handle,r2=ram start,r3=number,r4=file offset)->(r1-r4 updated,V,r0=error)
   ExtendUp(r0=buffer^,r1=suggested end)->(xr1)
   ExtendDown(r0=buffer^,r1=suggested start,r3=min start)->(xr1)
   IncReadAhead(fcb)->()
d  GetPutCommon(r0=read/write,r1=handle,r2=ram start,r3=bytes,r4=file offset)->(r0=process block,r2=ram adjust,r3=ind disc add,bufsz,fileoff,r6=disc rec^,transferend,fcb,r10=log2 sectorsize,V,r0=error,Z=is harddisc)
W  PutBytesEntry(r1=handle,r2=start^,r3=bytes,r4=file address)->(r1-r4 updated,V,r0=error)
d  Flush(r1=handle)->(V,r0=error)
   BackgroundFileCacheOp(r0=process block^,r1=ram/disc adjust,r2=initial transfer,r3=read/write,FileOff,r6=background length,TransferEnd,FragEnd,Fcb,r10=initial transfer to buffer len,BufPtr)->(xr1,V,r3=error)
   BackgroundFileCacheOp1(r0=process block^,r1=ram/disc adjust,r2=initial transfer,r3=read/write,FileOff,r6=background length,TransferEnd,FragEnd,Fcb,BufPtr)->(xr1,V,r3=error)
   BackgroundFileCacheOp2(r0=process block^,r1=ram/disc adjust,r2=initial transfer,r3=read/write,FileOff,TransferEnd,FragEnd,Fcb,BufPtr)->(xr1,V,r3=error)
   BackgroundOps(r0=process block^,r1=lock bit)->(xr3-r11)
   FcbCommon(Fcb)->(r2=drive,r3=ind disc add of file,BufSz,lr=disc rec^,C=disc probably not in drive/map under modification)
C  ReadAheadCommon(r2=drive,BufSz,FileOff,FragEnd/-1,Fcb,BufOff,BufPtr)->(TransferEnd/-1,xFragEnd,BufOff,BufPtr,V=don't read ahead)
x  RestartFloppyCheck(r2=drive,r3=file ind disc add)->(HI=don't restart)
x  FloppyOpDone()->()
x  WinnieOpDone()->()
D  TickerEntry
      TickerEvent
        Notes: TickerState seems to be a word with two fields:
                      &ccccpppp
               cccc is the count-down counter for timing a period to
               next BackgroundOp check, and pppp is the period to reload
               into the counter next time the timer is delayed (due to
               going off with TimerLock set).
        Count TickerState lsb down, return if still too big (it can't be!)
        If Interlocks:TimerLock set then
          inc TickerState lsb upper bounded by &ffffffff
          store lsb + lsb<<16 in TickerState
        else
          drop to SVC mode and push loads o'registers
          Set Interlocks:TimerLock
          TickerState=lsb + lsb<<16
          if ~Interlocks:NoOpenFloppy then
            BackgroundOps(FloppyProcessBlk,FloppyLock)
          if ~Interlocks:NoOpenWinnie then
            BackgroundOps(WinnieProcessBlk,WinnieLock)
          Pull loads o'registers
          Back to IRQ mode
          clear TimerLock:Interlocks
      Return
   R3LoadNewMap( R3=ind disc add,BufSz,Fcb)->(xr8,V,r0 _preserved_)
   BufsToRam(R1=RAM adjust,r2=end file offset,BufSz,FileOff,Fcb)->()
D  UpdateProcesses()->()
W  UpdateProcess(r0=process block^)->()
W  BackgroundTidyUp(r0=process block^,r3=read/write,BufSz,Fcb)->()
x  ReduceFloppyWriteBehind(r1=reduction amount)->(xr1)
   AddBuffer(r0=process block^,r3=length,FileOff,BufOff,BufPtr)->(C=succeeded,FileOff)
   AddPair(r0=process block^,r1=RamAdjust,FileOff)->(C=succeeded)
   ScanBuffers(BufSz,FileOff,FragEnd,BufOff,BufPtr)->(FileOff,BufOff,BufPtr,LO=cached,EQ=empty,HI=ReadAhead)
   SkipEmpty(BufSz,FileOff,FragEnd,BufOff,BufPtr)->(FileOff,BufOff,BufPtr)
   SkipWriteBehind(BufSz,FileOff,FragEnd,BufOff,BufPtr)->(FileOff,BufOff,BufPtr)
   BackwardsSkipWriteBehind(r0=frag start,BufSz,FileOff,BufOff,BufPtr)->(FileOff,BufOff,BufPtr)
   DefFileFrag(FileOff,Fcb)->(r0=frag start,DiscAdjust,FragEnd)
   FileFrag(r0=read start,FileOff,Fcb)->(r0=frag start,DiscAdjust,FragEnd)
   FragLeft(FileOff,Fcb)->(LR=rest of frag len,Z=new frag discontinuity)
   FindFreeBuf(r0=highest freeable priority,FileOff,BufPtr,Fcb)->(r2=old BufPtr,BufPtr,~Z=success)
   FindSubBuf(FileOff,Fcb,BufPtr)->(BufPtr,BufOff)
   UpdateBufState(r2=new state,BufSz,BufPtr)->()
W  EmptyBuffers(BufSz,FileOff,TransferEnd,Fcb)->(BufOff,BufPtr)
   UnlinkAllocChain(BufPtr)->()
   LinkAllocChain(R2=buffer^,BufPtr)->()
   UnlinkFileChain(BufPtr)->()
   LinkFileChain(R2=buffer^,Bufptr)->()
   LessValid()->()
   MoreValid()->()
   WaitForControllerFree(r0=process block^)->()
x  FloppyDiscWriteBehindWait(r3=top 3 bits disc)->()
x  FloppyDriveWriteBehindWait(r1=drive)->()
W  LockDisc(r3=top 3 bits disc)->(r1=drive,V,r0=error)
D  FindDisc(r3=top 3 bits disc)->(r1=drive,V,r0=error)
   FreeFcb(r8=previous Fcb in chain^,r9=Fcb^)->(xr0,V,r0=error)
d  ClaimController(r0=process block^)->()
d  ReleaseController(r0=process block^)->()
   ClaimFileCache()->()
   ReleaseFileCache()->()

Identify
   IdentifyDisc(r5=disc rec^)->(V,r0=error)
   IdentifyFileCoreDisc(r1=Service_IdentifyDisc,r5=disc rec^,r6=sector cache handle,r8=private word^)->(in, possibly claimed with r2=filetype and disc rec filled in)
   IdentifyFileCoreFloppyDisc
   IdentifyFileCoreHardDisc
   SanityCheckBadBlockList
   SanityCheckEFormat
   SanityCheckEDiscRecord
   SanityCheckNewMap
   SanityCheckLFormat
   SanityCheckDFormat
   SanityCheckOldMap
   EnsureSequenceSides
   EnsureInterleavedSides
