! Loader/Imp specific stuff

%recordformat fe02 object fm -
  (%short flags,extra,%integer type,offset,%string(255)name)
%recordformat fe02 header fm -
  (%half tyver,flags,export,import,%integer codesize,%half reset,main,
   %integer ownsize,stack,%half dlim,chlim,spare1,spare2)
%recordformat fe02 indir fm -
  (%integer address %or -
   %half op1, %integer opd1, %half op2, %integer opd2)
%recordformat mar fm {combined file connection and module activation record} -
  (%record(mar fm)%name next,
   (%integer start %or %record(fe02 header fm)%name header),
   %integer size,gla,
   %string(255)name)

%recordformatspec fcb fm
%recordformat trap fm(%record(trap fm)%name next,%halfname mask,%integer gla,*)
%recordformat poa fm(%bytearray b(1:1024) %or-
  (%integer evlink %orrecord(trap fm)%name evtrap),
  %integerarray display(1:7),
  %byte event,sub,%short line,%integer extra,%string(255-32)message,
  %integer eventpc,%integerarray eventdisplay(1:7),eventregs(0:15),
  %integer scratch1,scratch2,*{excepth},%record(marfm)%name filelist,
  %integer heapbase,stacklimit,
  %record(fcb fm)%name curin,curout,
  %integer instream,outstream,
  %record(fcb fm)%namearray in,out(0:7),
  %string(255)cliparam)
  
%register(a5)%record(poa fm)%name poa

! Procedures provided in EPROM

@16_408 %integerfn romreadfile(%string(255)file,%integer where) {booting only}
@16_40c %routine romphex(%integer x)
@16_410 %routine romphex4(%integer x)
@16_414 %routine romphex2(%integer x)
@16_418 %routine romphex1(%integer x)
@16_41c %routine rompsym(%integer x)
@16_420 %routine rompstr(%string(255)s)

! io

%recordformat fcb fm -
  (%integer p,l,bs,bl,fs,fl,fastpc,gla,pc,mode,
   %record(fcb fm)%name next,%string(255)%name prompt,
   %integer a,b,c,d,%string(255)filename)

%constinteger -
  cbop close   = 0,
  cbop abort   = 1,
  cbop flush   = 2,
  cbop refresh = 3,
  cbop write   = 4,
  cbop read    = 5

%constinteger -
  fop logout  = 0,
  fop login   = 1,
  fop quote   = 2,
  fop pass    = 3,
  fop openi   = 4,
  fop openo   = 5,
  fop openm   = 6,
  fop opena   = 7,
  fop credir  = 8,
  fop delete  = 9,
  fop info    = 10,
  fop rename  = 11,
  fop copy    = 12,
  fop permit  = 13,
  fop stamp   = 14,
  fop time    = 15,
  fop special = 16,
  fop oldfinfo=17

