; * * * * * TF: a program to Type Files ; MACLIB CPMEQU ; include standard names MACLIB PROG ; prolog, service macros MACLIB COSUB ; console output routines MACLIB CISUB ; cisub for citest macro ; PROLOG 20,TF ; set up stack ; TF EQU $ LDA CPMFCB+1; first filename byte CPI BLANK ; no operand given? RZ ; all done if so ; SERVICE 15,CPMFCB ; open the file INR A ; check for error (FFH) RZ ; exit if open failed ; TFTOP EQU $ SERVICE 20,CPMFCB ; read a record to 0080h ORA A ; ..if there is another RNZ ; (there wasn't -- exit) ; CITEST TFABORT ; abort if a key's been hit ; LXI H,CPMBUFF ; start of buffer MVI B,128 ; ..and its length ; TFLOOP MOV A,M ; next file byte.. CPI EOF ; is it an EOF mark? RZ ; quit iof so, CALL COUT ; ..else type it and INX H ; point to next byte DCR B JNZ TFLOOP ; do another if there is one, JMP TFTOP ; ..or get next record ; TFABORT RET ; exit when CITEST finds a key hit. ; ; SUBROUTINES: COSUBM END