This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:vectors:dnam [2010/10/29 16:46] (current)
george.gwilt created
Line 1: Line 1:
 +====== IO_NAME/IOU_DNAM - Vector $122======
 +This vector can used in the OPEN routine which must be provided for a [[qdosmsq:memory:sdrives|simple device driver]].
 +^Call Parameters^^Return Parameters^^
 +|D0.L|Unused|D0.L|Error code.|
 +|D1.L|Unused |D1.L|Corrupted.|
 +|D2.L|Unused |D2.L|Corrupted.|
 +|D3.L|Unused |D3.L|Corrupted.|
 +|A0.L|Pointer to mame |A0.L|Preserved.|
 +|A1.L|Unused |A1.L|Corrupted.|
 +|A2.L|Unused |A2.L|Corrupted.|
 +|A3.L|Pointer to result block |A3.L|Preserved.|
 +===== Errors =====
 +|ERR_NF|Device not found.|
 +|ERR_BN|Bad name.|
 +===== Notes =====
 +  * 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           ; Length of NET
 +      DC.B   'NET'     
 +      DC.W           ; Two parameters
 +      DC.W   2,'OI'    ; Two options
 +      DC.W   ' _',   ; 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 16:46
  • by george.gwilt