DataMuseum.dk

Presents historical artifacts from the history of:

CR80 Hard and Floppy Disks

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CR80 Hard and Floppy Disks

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦ebe463cb5⟧ TextFile

    Length: 6704 (0x1a30)
    Types: TextFile
    Names: »D_UTH.I«

Derivation

└─⟦e0c43619c⟧ Bits:30005797 CR80 Disc pack ( Vol:FNJ1 861029/EC CR80 S/W Package II+III+IV+V+VII )
    └─ ⟦this⟧ »CSP004_V0801.D!CSS107.D!D_UTH.I« 

TextFile


"-----------------------------------------------------------------------
"
"
"  module name:      DAMOS UTILITYHELP
"  module id nbr:    CSS/107
"  module version:   03
"
"-----------------------------------------------------------------------
"page«ff»


" import " type
  filetype=
    record
      name: file_name;
      s   : tstream;
      f   : fd;
    end;

type
  segment_entry =
    record
      handle  : integer;
      access  : "access_type" integer;
    end;

  segmenttable = array[1..20] of segment_entry;

" import " type
  param_record =
    record
      no_of_fms       : integer;
      first_fms,
      second_fms,
      third_fms       : file_system_name;
      no_of_tms       : integer;
      first_tms,
      second_tms,
      third_tms       : file_system_name;
      work_pages,
      no_of_segments  : integer;
      segment_table   : segmenttable;
      param_offer_id  : offer_id;
      process_name    : file_name;
      TOS_user_ident  : user_ident;
    end;

import var
  default_fsn  : file_system_name; "default file system name
  default_vol  : volume_name;      "default volume name
  pfiletype    : filetype;         "param file descr
  dfiletype    : filetype;         "curr direc file descr
  cinfiletype  : filetype;         "curr input file descr
  coutfiletype : filetype;         "curr output file descr
  oinfiletype  : filetype;         "original input file descr

  prog_id :
  record
    p_fsn      : file_system_name;
    p_vol      : volume_name;
    p_namelist : namelisttype;
    p_nameno   : integer;
    p_fromadam : integer;  " 0 = no "
  end;

  param_rec    : param_record;

"page«ff»


import procedure fileerror
"========================"
               (r4;                "C K pointer to file type addr
                r5;                "C K pointer to error text
                r7;                "C K completion code
                r6);               "C K link
"Writes an errortext and terminates the program execution.
"the registers are restored before termination so TOS's
"long termination message can be utilized



import procedure initfiletype
"==========================="
               (r4;                "C   pointer to file type addr
                r5;                "C   pointer to filename addr
                r7;                "C D file descriptor
                r6);               "C K link



import procedure openfile
"======================="
               (r4;                "C   pointer to file type addr
                r0;                "C   pointer to file system name
                r1;                "C   pointer to volume name addr
                r2;                "C   name no
                r3;                "C   from adam
                r5;                "C   pointer to name list addr
                r7;                "C D directory
                r6);               "C K link



import procedure dismantlefile
"============================"
               (r4;                "C   pointer to file type addr
                r6);               "C K link



import procedure openstream
"========================="
               (r4;                "C   pointer to file type addr
                r3;                "C   mode
                r6);               "C K link



import procedure closestream
"=========================="
               (r4;                "C   pointer to file type addr
                r6);               "C K link



import procedure inb
"=================="
               (r4;                "C   pointer to file type addr
                r3;                "  R byte
                r6);               "C K link



import procedure outb
"==================="
               (r4;                "C   pointer to file type addr
                r3;                "C   byte
                r6);               "C K link

"page«ff»

import procedure acceptfiles(r6);  " all registers destroyed
"=========================="
" Fetch the file system name from the pps, and accept the
" parameter file. The user directory is read from the para-
" meter file, look_up'ed and the directory file is prepared.
" At return the files are described in the variables pfiletype
" and dfiletype. The procedure is left with an open stream
" to the parameter file.

"page«ff»
import procedure readkeyword
"=========================="
               (keyw_size :integer;"    size of keywords in words
                no_of_bytes:integer;"   numbers of significant bytes
                top       :integer;"    top of keywords
                r0;                "  R key word index
                r4;                "C   pointer to keyword table
                r6);               "C K link
" Read a keyword text from the the parameter file (incl. Trailing
" spaces and ':' or '=').
" Find a matching entry in the keyword table described in the para-
" meters. A match is found if the first 'no_of_bytes' - 1 and the last
" character of the keyword is equal to the corresponding characters
" of the keyword table entry ( a (:127:) matches all characters).
" If a '/' is met on the parameter stream, it will be interpreted as
" a repetition of the previous keyword.
" Two entries are used for special purposes:
"    index 0             is returned if an unknown keyword is read
"                        (the keyword is stored in the entry)
"    index top           is returned if eof is met
"                        (the entry does not have to exist)

"page«ff»
import procedure readsysparams(r6); "all registers destroyed
"============================"
" Read the first line ( incl. nl ) of the parameter file, and
" prepare the cin file, the cout file and the oin file for file
" access ( 'cinfiletype', 'coutfiletype', 'oinfiletype').
" if cin file = cout file then only the cin file is opened and
" the file handle is copied to coutfiletype.f
" In addition a stream is connected to the cout file.
" if cin file = oin file then only the cin file is opened and
" the file handle is copied to oinfiletype.f
" The default volume name is stored in 'default_vol'.
" The program identifier is stored in 'prog_id'.

"page«ff»
import procedure lookup_error_text
"================================"
    (r3;  "C K  @ error_text save area ( 132 char = 66 word)
     r7;  "C K  completion code
     r6):  "    link
  error_done;

" This procedure delivers an error text when given a completion code.
" The database consists of two files namely DD.T and DD.X placed in
" the same directory as the program.
"
" The database files are opened at first given opportunity.
"
" Exit:
"      done : the error text is delivered at r3
"      err  : I/O error or unknown completion code (code not in 0..#3FFF)

"page«ff» «a5»