qdosmsq:vectors:dnam

IO_NAME/IOU_DNAM - Vector $122

This vector can used in the OPEN routine which must be provided for a simple device driver.

Call ParametersReturn Parameters
D0.LUnusedD0.LError code.
D1.LUnused D1.LCorrupted.
D2.LUnused D2.LCorrupted.
D3.LUnused D3.LCorrupted.
A0.LPointer to mame A0.LPreserved.
A1.LUnused A1.LCorrupted.
A2.LUnused A2.LCorrupted.
A3.LPointer to result block A3.LPreserved.
ERR_NFDevice not found.
ERR_BNBad name.
  • All registers not shown above are not used on entry and are preserved on exit.
  • The vector returns to the address immediately following the call if error ERR_NF occurs.
  • The vector returns to the address two bytes after the call if the error ERR_BN occurs. This happens if the device is found but the parameters are faulty.
  • The vector returns to the address four bytes after the call if there is no error.
  • On entry, A0.L points to a string holding the name of the device together with any parameters.
  • A3.L points to a block of length 2*K where K is the number of possible parameters. The vector evaluates the parameters in the name and puts the results in that block.
  • The data giving the format of the device and its parameters must be set in a block starting six bytes after the call to the vector in the following form:
    • A string giving the minimum device name (eg SER).
    • The number of parameters, word length.
    • Information for each parameter in one of three ways.
      • A word containing two characters, space followed by a separator, then a word containing the default value of the parameter.
      • A word containing -1 followed by the default value.
      • A word containing the number of following options, then the list of options, each a character being either a digit or an upper case letter.
  • An example for the NET device is given later.
  • The vector evaluates each of the parameters in order and sets the numerical result in the block to which A3.L points. For the option parameters, the third type above, the value is zero if no option has been given, otherwise it is its position in the list.

Example for the NET device

      DC.W   3         ; Length of NET
      DC.B   'NET'     
      DC.W   2         ; Two parameters
      DC.W   2,'OI'    ; Two options
      DC.W   ' _',0    ; The separator is underscore
                       ; The default value is 0 

With this information IO_DNAM will decode NETi_3 in the block to which A3.L points as 2,3. The first number, 2, means that the second option, I, has been chosen. The second number, 3, is the network number.

NET, on its own would give rise to 0,0. This means network number 0, the default, with neither option being selected.

  • qdosmsq/vectors/dnam.txt
  • Last modified: 2010/10/29 17:46
  • by george.gwilt