The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
7.6.57 @OPEN SVC-59<br />
This SVC will open an existing file or device. <strong>The</strong> Logical Record Length (LRL) passed in<br />
register B should match the LRL s<strong>to</strong>red in the direc<strong>to</strong>ry. If it does not, an "LRL open<br />
fault" error will be returned; however, the file will still be opened. If the file is<br />
already in an open state, the file's direc<strong>to</strong>ry record will indicate the condition. In<br />
this case, the file will still be opened; however, only READ access (or less depending on<br />
the access permitted by the password) will be granted. A "File already open" error will<br />
also be returned.<br />
Registers Affected: AF.<br />
Entry:<br />
HL A pointer <strong>to</strong> your buffer for disk I/O.<br />
DE A pointer <strong>to</strong> the File or Device Control Block containing the filespec or<br />
devicespec.<br />
B Should contain the Logical Record Length for the open file.<br />
Exit:<br />
A Error return code<br />
Z Set if open was successful<br />
7.6.58 @PARAM SVC-17<br />
This SVC can be used <strong>to</strong> parse an optional command line parameter string. Its primary<br />
function is <strong>to</strong> parse command parameters contained in a command line <strong>to</strong>tally enclosed<br />
within parentheses. <strong>The</strong> parameter formats acceptable for the command line entries are as<br />
follows:<br />
PARM=X'hhhh' hexadecimal entry<br />
PARM=ddddd decimal entry<br />
PARM="string" alphanumeric entry<br />
PARM=ON switch entry indicating TRUE<br />
PARM=YES switch entry indicating TRUE<br />
PARM=Yswitch entry indicating TRUE<br />
PARM=OFF switch entry indicating FALSE<br />
PARM=NO switch entry indicating FALSE<br />
PARM=N switch entry indicating FALSE<br />
<strong>The</strong> user-entered parameters that are <strong>to</strong> be accepted by your application are contained in<br />
a parameter table (PRMTBL$). This table s<strong>to</strong>res the parameter names and a pointer <strong>to</strong><br />
indicate where the user response is <strong>to</strong> be placed. Two forms of the PRMTBL$ are supported.<br />
<strong>The</strong> first form uses a fixed width table with a maximum name length of six characters. <strong>The</strong><br />
PRMTBL$ is coded as follows. A 6-character NAME left justified and filled with blanks<br />
followed by a 2-byte address VECTOR which points <strong>to</strong> the location which will receive the<br />
parsed values. <strong>The</strong> 2-byte memory address denoted by the address VECTOR field of your<br />
table receives the value of PARM if PARM is non-string. If a string is entered, the 2byte<br />
memory address receives the address of the first byte of "string". NAME and VECTOR<br />
may be repeated for as many parameters as are desired. A byte of X'00' must be placed at<br />
the end of the table <strong>to</strong> indicate its ending point.<br />
<strong>The</strong> second PRMTBL$ format permits a greater degree of flexibility in parameter handling.<br />
It also provides feedback as <strong>to</strong> each parameter entered by the user. Its format begins<br />
with a byte of X'80' <strong>to</strong> indicate the enhanced table. Each parameter is then identified<br />
with four fields. <strong>The</strong>se fields are as follows:<br />
7-30