29.12.2012 Views

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 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VAL EQU 80H ;Set value bit<br />

SW EQU 40H ;Set switch bit<br />

STR EQU 20H ;Set string bit<br />

ABR EQU 10H ;Set abbreviation bit<br />

;<br />

PRMTBL$ DB 80H ;Indicate format 2<br />

;<br />

DB VAL.OR.ABR.OR.6<br />

DB 'LENGTH' ;Length parameter<br />

LRESP DB 0<br />

DW LPARM+1<br />

;<br />

DB SW.OR.ABR.OR.4<br />

DB 'FEED' ;Line feed parameter<br />

FRESP DB 0<br />

DW FPARM+1<br />

;<br />

DB STR.OR.ABR.OR.5<br />

DB 'TITLE' ;Title parameter<br />

TRESP DB 0<br />

DW TPARM+1<br />

;<br />

DB SW.OR.ABR.OR.6<br />

DB 'PROMPT' ;Prompt parameter<br />

PRESP DB 0<br />

DW PPARM+1<br />

;<br />

DB VAL.OR.STR.OR.5<br />

DB 'XLATE' ;Translate parameter<br />

XRESP DB 0<br />

DW XPARM+1<br />

NOP ;This is the ending zero byte<br />

When the @PARAM service function completes its parsing and interpreting of the parameter<br />

command string, the response byte corresponding <strong>to</strong> parameter entries will be altered<br />

according <strong>to</strong> any entry parsed. Thus, your program can incorporate code <strong>to</strong> test the<br />

response byte <strong>to</strong> determine the exact type of entry made in the parameter line. By<br />

comparing the response byte <strong>to</strong> the control byte, the program can ascertain the validity<br />

of the entry. It is left for the reader <strong>to</strong> adjust the decoding routines according <strong>to</strong><br />

table format 2.<br />

8-35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!