.TITLE SETDEFAULT PUNCHING FORMAT .IDENT /V1.01/ .NLIST TOC,SYM .ENABL LC ; Part of Sira Paper Tape Punch Despooler. ; ; COPYRIGHT(C) 1981,1982, Sira Institute Ltd., ; South Hill, Chislehurst, Kent, BR7 5EH, England. ; ; Author: C.J. Doran ; ; Assemble as: ; >MAC PPPSETDEF=PPPSETDEF ;+ ; If the form type, set by /LENGTH=n, is zero, select an appropriate default:- ; 5-track tape is always Murray-converted, ; 7-track tape is always ASCII, parity clear, ; For 8-track tape, use the filetype according to the rules for FLX. ;- ; MODIFICATIONS RECORD ; ==================== ; V1.01 13-Jul-82 CJD ; Default to odd parity EIA tape if filetype is .EIA .PSECT CODE,I,RO SETDEF::MOV #QMFORM,%3 ; Address format byte from QMG MOVB (%3)+,@%3 ; Copy to working FORM, seeing if specified? BNE 50$ ; Yes, don't need to select default MOVB #F.MURR,@%3 ; Not given, Murray code if CMPB TAPE,#T.5 ; Five-track tape? BEQ 50$ ; Yes, exit 10$: MOVB #F.CLR,@%3 ; Try 7-track CMPB TAPE,#T.7 ; Is it? BEQ 50$ ; Yes, exit ; 8-track tape. Select format according to FLX rules (see Utilities Manual), ; except that, for Sira, .LDA is the normal output of the SAL assemblers, and ; requires ASCII treatment, not formatted binary, and .EIA is a tape ; needing conversion to EIA code (odd parity). ; IMAGE: .TSK, .OLB, .MLB, .SYS, .SML, .ULB ; Formatted binary: .OBJ, .STB, .BIN, {.LDA} ; ASCII (even parity): all others MOV FDB+F.FNB+N.FTYP,%1 ; Get filetype MOV #IMTAB,%2 ; Address list of types for image O/P MOVB #F.IMAG,@%3 ; Assume will be image form JSR PC,SEARCH ; Search table BCS 50$ ; Exit if found MOVB #F.BINA,@%3 ; No, try formatted binary MOV #FBTAB,%2 ; Address table JSR PC,SEARCH ; Look up filetype BCS 50$ ; Found, exit MOVB #F.EVEN,@%3 ; Not found, default to even-parity ASCII CMP %1,#^REIA ; But is filetype .EIA? BNE 50$ ; No, that was it MOVB #E.ODD,@%3 ; Yes, select odd parity EIA conversion 50$: RTS PC ; Return ; Look up filetype in table addressed by %2. Return carry set if found, ; clear otherwise. ; SEARCH is globally accessible, for use by a user-written delete check. ; Enter with %1 containing a Radix-50 word, and %2 addressing a table ; to search through, ending with zero. SEARCH::TST @%2 ; 0 word = end of table BEQ 10$ ; Yes, exit with carry clear CMP %1,(%2)+ ; No, Does key match? BNE SEARCH ; Try next if not SEC ; Found, say so in carry 10$: RTS PC ; Return to caller .PSECT STATIC,D,RO,LCL ; Filetypes defaulting to image format: IMTAB: .WORD ^RTSK, ^ROLB, ^RMLB, ^RSYS, ^RSML, ^RULB, 0 ; Filetypes defaulting to formatted binary: FBTAB: .WORD ^ROBJ, ^RSTB, ^RBIN, 0 ; {LDA} .END