.nlist .enabl lc,crf .mcall .exit .macro arggen a,b,c,d,e,f,g,h,i,j,k,l,m,n .if nb a .word a arggen b,c,d,e,f,g,h,i,j,k,l,m,n .iff .mexit .endc .endm arggen .macro print arg .if df arg .globl writec jsr r5, writec arg .iff .list .ERROR Undefined argument (arg) in PRINT .nlist .endc .endm print .macro accept no,arg .if df arg .if gt no .globl readc jsr r5, readc .word no,arg .iff .list .ERROR Illegal argument (no) in ACCEPT .nlist .endc .iff .list .ERROR Undefined argument (arg) in ACCEPT .nlist .endc .endm accept .macro readln a,b,c,d,e,f,g,h,i,j,k,l,m,n .narg $no$ .if gt $no$ .globl readd jsr r5, readd .word $no$ arggen a,b,c,d,e,f,g,h,i,j,k,l.m,n .iff .list .ERROR READLN must have an argument .nlist .endc .endm readln .macro writeln a,b,c,d,e,f,g,h,i,j,k,l,m,n .narg $no$ .if gt $no$ .globl writed jsr %5, writed .word $no$ arggen a,b,c,d,e,f,g,h,i,j,k,l,m,n .iff .list .ERROR Writeln Must have an argument .nlist .endc .endm writeln .list CHAINT:: ;## 2 # 0 ## PROCEDURE CHAINT,GLOBAL ; This routine will chain onto SUPMAC.SAV from ; SUPDIR.SAV which is the preprocessor for the ; supermac compiler. ISTR contains the name of ; the final output file from supdir. .MCALL .CHAIN ;## 9 # 0 ## .MCALL .CHAIN .GETCOR = EMT + 366 ;## 10 # 0 ## .GETCOR = EMT + 366 mov #500,R1 ;## 12 # 0 ## LET R1 := #500; Set up chain and mov #PROG,R2 ;## 13 # 0 ## LET R2 := #PROG; get device name and program name .REPT 4 ;## 14 # 0 ## .REPT 4 mov (2)+,(1)+ ;## 15 # 0 ## LET (1)+ := (2)+; Move in device and program name .ENDR ;## 16 # 0 ## .ENDR tst (R5)+ ;## 18 # 0 ## PROBE (R5)+ mov (R5)+,R3 ;## 19 # 0 ## LET R3 := (R5)+; Address of input string mov #BUF,R4 ;## 20 # 0 ## LET R4 := #BUF ll$1: ;## 21 # 0 ## REPEAT movb (3),(4)+ ;## 22 # 1 ## LETB (4)+ := (3) cmpb (R3)+,#0 ;## 23 # 0 ## UNTILB (R3)+ IS #0; Shovel over..... beq ll$4 jmp ll$3 ll$4: br ll$2 ll$3: jmp ll$1 ll$2: mov #BUF,R4 ;## 24 # 0 ## LET R4 := #BUF; Address of device and program name.. ll$5: ;## 25 # 0 ## REPEAT movb (4),(1)+ ;## 26 # 1 ## LETB (1)+ := (4) cmpb (4)+,#0 ;## 27 # 0 ## UNTILB (4)+ IS #0 beq ll$8 jmp ll$7 ll$8: br ll$6 ll$7: jmp ll$5 ll$6: mov #24.,R0 ;## 28 # 0 ## LET R0 := #24.;ASK FOR 24 KW OF CORE .GETCOR ;## 29 # 0 ## .GETCOR bcs .+6 ;## 30 # 0 ## ON.ERROR jmp ll$9 HALT ;## 31 # 1 ## HALT ll$9: ;## 32 # 0 ## FI .CHAIN ;## 33 # 0 ## .CHAIN; Chain to program PROG: .RAD50 /SY / ;## 35 # 0 ## .RAD50 /SY / .RAD50 /SUPTST/ ;## 36 # 0 ## .RAD50 /SUPTST/ .RAD50 /SAV/ ;## 37 # 0 ## .RAD50 /SAV/; Stuff needed!! BUF: .BLKB 13. ;## 38 # 0 ## .BLKB 13. ;## 39 # 0 ## .END ;SUPERMAC Errors Detected: 0 ; 1 0 0 0 8 0 0 0 0 1 ; 47 0 0 29 0 1 1 0 29 9 ; 0 9 0 0 0 29 0 1 124 0 ; 0 1 1 0 11 0 2 0 33 29 ; 4 0 0 2 2 0 2 0 0 0 ; 0 0 0 0 0 0 0 0 0 0 ; 0 0 0 0 0 0 0 0 0 0 ; 0 0 0 0 0 0 .END