; * * * * * XCMD -- EXAMINE THE COMMAND OPERANDS ; MACLIB CPMEQU ; include standard names MACLIB PROG ; prolog, service macros MACLIB COSUB ; console output routines MACLIB HEXSUB ; hex display routines ; PROLOG 20,XCMD ; FCBMSG DB 'Default FCB --',CR,LF,CR,LF+80H TAILMSG DB CR,LF,'Command tail --',CR,LF,CR,LF+80H ; XCMD EQU $ LXI H,FCBMSG ; print FCB heading CALL COSTR LXI H,CPMFCB MVI B,16 ; dump default FCB CALL HEXDUMP ; ..in two lines CALL COCRLF CALL HEXDUMP ! CALL COCRLF ; LXI H,TAILMSG ; print tail heading CALL COSTR LXI H,CPMBUFF MOV A,M ; get length of tail and ADI 00FH ; ..round to multiple of ANI 0F0H ; ..sixteen RZ ; (exit if no operands) XCMD2 MOV C,A ; ..save length in [C] CALL HEXDUMP ; dump 16 bytes of tail CALL COCRLF MOV A,C ! SUB B ; count 16 bytes JNZ XCMD2 ; ..continue if more RET ; ; COMMON SUBROUTINES ; HEXSUBM COSUBM END