.TITLE IMG .IDENT /COLOR/ ; 27-nov-79 fix err in COMPRS ,move data from BUF1 to BUF when done ; modified 9-nov-79 to use TRILOG color printer ; ; IMAGE START UP INITIALIZATION ; ; MACRO LIBRARY CALLS ; .MCALL CLOSE$,CSI$,CSI$1,CSI$2,EXIT$S,GCMLD$,NBOF$L .MCALL GCML$,GPRT$S,OPEN$R,OPEN$A,OPEN$W,OPEN$M .MCALL PUT$S,PRINT$ .MCALL FDBK$R,FDRC$R,READ$,WRITE$,WAIT$ ;BLOCK R/W .MCALL ALUN$S,GLUN$S,QIO$S,QIOW$S,WTSE$S CSI$ ;DEFINE CSI CONTROL BLOCK OFFSETS GCMLD$ NBOF$L ;define filename blk offsets ; ; LOCAL MACROS ; ; ERROR MESSAGE OUTPUT ; .MACRO MSGPUT NAM CALL $ERMSG .WORD MG'NAM .ENDM ; ; LOCAL DATA ; ; CSI CONTROL BLOCK ; CSIBLK:: .BLKB C.SIZE ; ; ; TASK MEMORY LIMITS ; .IF NDF RSTS LIMIT: .LIMIT ; .IFF .PSECT FOTBF1,GBL LIMIT: .BLKB 2048. ; .PSECT FOTBF2,GBL ELIMT: ; .PSECT .ENDC ;+ ; **-$START-START UP INITIALIZATION ;- ; ; ; ; $START::MOV SP,SPSAV ;SAVE INITIAL STACK POINTER OPEN$W #TTBLK ;OPEN COMMAND OUTPUT FILE BICB #GE.CLO,TTIBLK+G.MODE ;SET TO LEAVE COMMAND INPUT FILE OPEN IMAGE:: MOV SPSAV,SP ;RESET STACK POINTER ; 10$: mov #BUFLEN,BUFSIZ ;load default raster line length ; mov MAXCOL,CPTNUM ;load number of colors on RIBBON clr COLOR ;color table index 0,1,2=Y,M,C mov #512.,MAXPXL ;normal SPOOL ,larger for color clr INITYI ;initail Y line input clr INITYO ;initail Y line OUTput mov #511.,LASTYI ;load default last line # mov #511.,LASTYO ;load default last line # mov #1.,INCRYI ;load default Y incr input mov #1.,INCRYO ;load default Y incr OUTput mov #512.,NLINES ;load normal # of lines to output mov #1.,LINES ;load number of raster lines per xfer mov #128.,BYTEO ;load std output mapping mov #0.,BYTEIL ;load std output mapping mov #0.,BYTEIH ;load std output mapping mov #ALPHA,R0 ;load address of 9 kernel params mov #9.,R1 ;load count 11$: clr (R0)+ ;zero all 9 coeffs at start sob R1,11$ ;a,b,c,d,e,f,g,h,i = 0 ; clr BASE ;/MO:a:BASE ;base to be added to result ; CLOSE$ #TTLDMY ;CLOSE INPUT FILE CLOSE$ #LSTBLK ;CLOSE OUTPUT FILE GCML$ #TTIBLK ;GET A COMMAND BCC 30$ CMPB #GE.EOF,G.ERR(R0); TOP LEVEL EOF? BNE 20$ CLOSE$ #TTBLK CLOSE$ #TTIBLK ;close cmd input file EXIT$S ; ; 20$: MSGPUT CMDE ;COMMAND ERROR BR 10$ 30$: MOV G.CMLD(R0),R1 ;GET BYTE COUNT BEQ 10$ CSI$1 #CSIBLK,TTIBLK+G.CMLD+2,R1;CHECK SYNTAX BCS 20$ ; ; ;***************************************************************** ; GET OUTPUT FILE SPECIFICATION ;****************************************************************** ; 60$: clr $SWTHO ;clr switch states clr OUTFIL ;clr flag , default to not files-11 dev MOV #1.,IMAGEO ;SET OUTPUT LOW MOV #IMGMAX,IMAGOH ;OUTPUT IMAGE HIGH CSI$2 #CSIBLK,OUTPUT,#SWTBLO BCC 71$ 70$: MSGPUT OFER ;OUTPUT FILE SPEC ERROR jmp 10$ 72$: call $ERMSG ;switch out of context SWITCH ;illgeal with this arg br 70$ 73$: call $ERMSG ;illegal switch arg SWTARG br 70$ ; 71$: BITB #CS.MOR!CS.WLD,C.STAT(R0) BNE 70$ ; mov IMGTYP,LSTFIL+N.FTYP ;initialize output file ext=IMG ; ; ;***************************************************************** ; OPEN OUTPUT FILE ;****************************************************************** ; 82$: jsr PC,TSTMOD ;tst MODIFY switch and values bcc 80$ ;if alright or not used go on br 73$ ;if switch used and in error exit ; 80$: MOV $SWTHO,R5 ;LOAD R5 WITH SWITCH CONTENTS JSR PC,TSTDEV ;GO TEST DEVICE TYPE BCC 87$ ;IF CARRY CLEAR GOTO NON CD: BM: ; 83$: ALUN$S #5,R3,R4 ;assign lun #5 to CD,BM unit = R2 bcc 400$ ;go do I/O op's br 70$ ; 87$: bit #CPTMSK,$SWTHO ;tst for COLOR PRINTER ? bne 78$ ;if so mark for PUT$ I/O bit #SPLMSK,$SWTHO ;tst for spooled output to lp: beq 81$ ;if not then honest image output bis #GRAMSK,$SWTHO ;set ON graphics output flag need 1 bit br 79$ ; ; OUTPUT TO TRILOG COLOR PRINTER ; 78$: mov COLDEV,LSTFIL+N.DVNM ;load default name of color printer mov COLUNT,LSTFIL+N.UNIT ;load default unit # " " ; mov #3,FRMBYT ;load std bytes for FORM FEED tst CPTNUM ;tst value -maxcol ;que file skip&wait BCC 450$ ;IF OK GO ON JMP 86$ ;TREAT AS OPEN ERR ; 450$: bitb #CS.EQU,CSIBLK+C.STAT ;test for input arg ? beq 451$ ;if none then set up display mux jmp 35$ ;if set then go get input ; ;***************************************************************** ; IF ONLY OUTPUT FILE ;****************************************************************** ; ; 451$: cmp LUNOUT,DEVIC2 ;tst for CD: as device ? beq 460$ ;if so then special set display mode jmp IMAGE ;go ,done with this cmd ; ; currently cd: specified with output only is a NULL function ; 460$: jmp IMAGE ;end command and get another ! ; ; ; ;***************************************************************** ; GET NEXT INPUT FILE SPECIFICATION ;****************************************************************** ; ; 35$: mov #-1,BUFCTR ;for convolver, buffer counter ;set to -1 for 1st call to init buffs ; bit #CPTMSK,$SWTHO ;tst for COLOR PRINTER ? beq 37$ ;if not go on tst COLOR ;if zero then 1st call bne 58$ ;if not 1st call ,dont CSI$2 ;just go initialize & reWIND the file ; 37$: mov #1.,IMGLOW ;load starting image # in file mov #1.,IMGHGH ;load default image # from file ;ALWAYS READ ONLY 1 FILE UNLESS OVERIDDEN ; clr $SWTHI ;clr switch states clr INFILE ;clr flag , default to not files-11 dev ; 36$: CSI$2 #CSIBLK,INPUT,#SWTBLI BCC 41$ 40$: MSGPUT IFER ;INPUT FILE SPEC ERROR jmp 10$ 41$: BITB #CS.WLD,C.STAT(R0) ;tst for wild card spec BNE 40$ ;***************************************************************** ; OPEN INPUT FILES -- one file open at a time only ;****************************************************************** ; ; 46$: BITB #IMGMSK,$SWTHI ;LOOK FOR MULTIPLE IMAGES BEQ 48$ ;IF FLAG NOT SET THEN SET LO=HI=1 TST IMGLOW ;IF LOW=-1 THEN USE WANTS ALL START AT 1 blT 40$ ;if less than zero error BGT 47$ ;IF OK GO ON MOV #1,IMGLOW ;IF ZERO KICK UP TO 1 ; 47$: CMP IMGLOW,IMGHGH ;TST HIGH VERSYUS LOW,SEE IF HIGH SET Ble 49$ ;YES USER SET IT MOV IMGLOW,IMGHGH ;DIDNT SET IT -- SO MAKE THE SAME BR 49$ 48$: MOV #1,IMGLOW ;LOAD LOW MOV #1,IMGHGH ;LOAD SAME HIGH DEFAULT TO 1ST IMAGE BR 49$ ; ; 49$: bit #BYTMSK,$SWTHI ;tst BY: switch in string? bne 51$ ;if so go tidy up lo & hi ; mov #128.,BYTEIL ;load std output mapping mov #255.,BYTEIH ;load std output mapping ;turn high half of bytes on ,low half = 0 br 52$ ;skip over tidying 51$: cmpb BYTEIH,BYTEIL ;tst hi/lo limits bhis 52$ ;if in proper ratio assume user OK mov BYTEIL,BYTEIH ;if not then assume user only load ;single value not pair,pass thru ;only that single value. 52$: MOV $SWTHI,R5 ;LOAD R5 WITH SWITCH CONTENTS JSR PC,TSTDEV ;GO MAKE DEV TYP TEST BCC 57$ ;IF CARRY CLEAR GOTO NON CD: BM: ; 53$: ALUN$S #4,R3,R4 ;assign lun #4 to CD,BM unit = R2 bcc 90$ ;go try output descriptor name jmp 40$ ;if error on aslun then give input file err ; 57$: FDRC$R #TTLDMY,#FD.RWM FDBK$R #TTLDMY,#BUF,#BUFLEN,,#4.,#IOSB4 ; setup fdb params before call to OPEN$ inc INFILE ;set flag to be files-11 OPEN$R #TTLDMY,,#CSIBLK+C.DSDS BCC 58$ 56$: MSGPUT IPER jmp 10$ ; ; ; ; COLOR PRINTER REWINDS THE INPUT FILE BY COMING HERE ; 58$: mov #1.,INVBN+2 ;load files virtual blk number clr INVBN ;clr hi part bit #IMGMSK,$SWTHI ;test for multiple or explicit img # beq 90$ ;if not use #1 mov IMGLOW,R0 ;load image # to start bgt 59$ ;if user says zero or less to start skip jmp 310$ ;skip see if another file is needed ? ;this file and get another ! 59$: dec R0 ;dec count to base 0 ble 90$ ;when zero we hit starting point add #512.,INVBN+2 ;skip 512 raster lines = 512 disk blks adc INVBN ;add to hi part br 59$ ;skip more ? ; ;************************************************************** ; SETUP FOR INPUT ;*************************************************************** ; 90$: ; ; 92$: ;here we do xfer between imaging ;devices GLUN$S #4,#LUNIN ;get lun params of input device. ; ; bit #FD.SQD,DEVIN ;test device characteristics word bne 95$ ;if sequential only device dont try ;to get size of image info. tst INFILE ;tst for input from FILES-11 device bne 94$ ;if so dont alter Nlines ; cmp LININ,NLINES ;tst device # of lines versus std bge 94$ ;if same or greater ok mov LININ,NLINES ;else substitute actual number of lines ;that actual device supports 94$: cmp BUFIN,#64. ;tst for 64 bytes per raster line ? bne 95$ ;if not then dont set graphics bit ; bis #GRAMSK,$SWTHI ;set graphics bit ; 95$: mov NLINES,LINCNT ;load number of lines to XFER ; mov INITYI,YIN ;load line # mov INCRYI,YINX ;load lines entered each xfer bne 99$ ;make sure its not = 0 mov #1,YINX 99$: mov #0,X ;load column number 98$: ;now try out put jsr pc,FASTER ;go see if we can speed up XFER ;by increasing buffer size and ;number of raster lines xfered each time ; 100$: cmp LUNIN,DEVIC3 ;tst for tape type device ? bne 102$ ;if not skip out ; bit #RWDMSK,$SWTHI ;tst for /RW switch beq 101$ ;if not leave position alone ; QIOW$S #IO.RWD,#4,#4,,#IOSB4 ;que and wait for rewind BCC 101$ ;IF OK GO ON JMP 56$ ;TREAT AS OPEN ERR ; 101$: bit #IMGMSK,$SWTHI ;tst for /IM switch beq 102$ ;if not leave position alone dec IMGLOW ;get to base zero not base 1 ble 104$ ;ignore if 1 or less ; QIOW$S #IO.SPF,#4,#4,,#IOSB4,, ;que file skip&wait BCC 104$ ;IF OK GO ON JMP 56$ ;TREAT AS OPEN ERR ; 104$: INC IMGLOW ;RESTORE IMGLOW TO PROPER PLACE ; ; ;***************************************************************** ; TOP OF RASTER LINE TRANSFER LOOP ;********************************************************************** ; ; ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; READ IN A RASTER LINE FROM INPUT FILE ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; 102$: clr YOUTX ;always clr at 1st read input,incr on ;output so output is replicated ! tst BUFCTR ;tst bufctr , if we are using CONVOLVER beq 157$ ;then this will have values of -1,0,2,4 ;but 2 is never seen . ; if not then should always be = -1 ;and theis test will fail. ;this test avoids unnecessary reads ;READ A raster line from input file ;using BYTSIN as number of bytes ;and YIN as line address jsr pc,REDLIN ;go read a raster line of input bcc 150$ jmp 300$ ;if any error scratch this file and go ;on as if EOF had occured,except for ;small errors then treat as OK lines ; ; ; ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; INPUT LINE HAS BEEN OBTAINED , PROCESS IT USING SWITCHES ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; ; 150$: ;now we have filled input buffer ; ; if graphics input and not GR output ; then expand to bytes before swapping bit #GRAMSK,$SWTHI beq 152$ ;if not graphics input skip on ; call code to expand graphics to image data ; 151$: jsr PC,EXPAND ;expand bit data to byte data ;having expanded 1 bit to byte goto filter ; 152$: bit #SWPMSK,$SWTHI ;tst byte swap? beq 155$ ;if so go do it first ; jsr pc,SWAPB ;go swap bytes in BUF ; ; 155$: bit #BYTMSK,$SWTHI ;tst for filtered input bytes ? beq 156$ ;if not skip filter ; jsr pc,FILTER ;filter data via pass thru filter ; 156$: bit #CVLMSK,CSIBLK+C.MKW1 ;tst for convolver switch ? bNE 157$ ;if not set dont convolve ;for convolve read iin 3 raster lines ;byte swap and filter data ,scale up ;to bytes and then at last call convolver ;do for all 3 lines input, then convol BIT #KERMSK,$SWTHI ;IS IT /KE ? SWITCH BNE 157$ ;ALSO CALL CONVOLVER CODE bit #DSKMSK,$SWTHI ;tst for DESPIKing filter ? /DS:n bne 157$ BR 160$ ;IF /CV OR /-CV DO IT ;ELSE GO ON 157$: jsr pc,CVLCTL ;go do CONVOLVER CONTROL bcs 160$ ;if set by CONTROL go assume convolved jmp 102$ ;if clear not all 3 lines read yet ; ; ; ==================================================== ; MODIFY -- read output line and combine with input line ; ==================================================== 160$: ;MODIFY by reading output ;and then combinig with input bit #MODMSK,$SWTHO ;tst MODIFY bit ? beq 191$ ;if not go on cmp LUNOUT,DEVIC1 ;tst for special devices that are treat beq 166$ ;with care ; ;MODIFY not legal with TAPE cmp LUNOUT,DEVIC2 ;need to have special cases here bne 170$ ;not special go assume = disk ; ; 163$: ;CD: device QIO$S #IO.RLB,#5,#5,,#IOSB5,,<#BUFTMP,BYTSOT,,,YOUT,X> bcs 180$ ;if directive error bcc 190$ ;go wait for done ; 166$: ;BM: deviceS QIO$S #IO.RLB,#5,#5,,#IOSB5,,<#BUFTMP,BUFSIZ,,,YOUT,X> bcs 180$ ;if directive error bcc 190$ ;go wait for done ; 170$: READ$ #LSTBLK,#BUFTMP,BUFSIZ,#OUTVBN,,#IOSB5 ;READ virtual blk bcc 190$ 180$: call $ERMSG OUTERR ;read error on output jmp 10$ ;if error on output then go-on ; 190$: WTSE$S #5 ;wait for I/O to complete bcs 180$ ;success ? tst OUTFIL ;tst for files-11 output ? beq 181$ ;if not skip status load movb F.ERR(R0),IOSB5 ;load errror code 181$: cmpb IOSB5,#1 beq 182$ ;SUCCESS GO ON cmpb IOSB5,#IE.EOF ;test for end of file on output? bne 183$ ;if not its just an error jmp 300$ ;go away dont output any more ? ; 183$: call $ERMSG OUTERR jmp 10$ ; 182$: ;read in both OUTPUT & INPUT files BIT #GRAMSK,$SWTHO ;IS OUTPUT IN GRAPHICS 1 BIT FORMAT ? BEQ 184$ ;IF NOT GO DO MODIFY ; JSR PC,EXPANO ;IF SO GO EXPAND OUTPUT TO BYTE DATA ; 184$: ;go data jsr pc,MODIFY ;go modify data from BUFTMP to BUF ; ; ============================================ ; end MODIFY -- read of output line ; ============================================ ; 191$: bit #SWPMSK,$SWTHO ;tst byte swap? beq 194$ ;if not skip ; jsr pc,SWAPB ;go swap bytes in BUF ; 194$: bit #CPTMSK,$SWTHO ;tst COLOR PRINT beq 192$ ;if not tst others ; jsr pc,TRANSL ;go translate using COLOR index jsr PC,SMASH ;pack 2 bits per pixel on 1st output line ;pack 2 bits per pixel on 2nd output line jsr pc,DOTLIN ;go create dots in a line to printer bytes br 200$ ;go call DOTLIN to build printer bytes 1st line ; ; 192$: bit #GRAMSK,$SWTHO ;tst gra output beq 195$ ;if not skip this ? ; jsr pc,COMPRS ;compress byte input image to graphics ; bit #SPLMSK,$SWTHO ;tst for output to spooler lp: beq 196$ jsr pc,DOTLIN ;go create dots in a line to printer bytes br 200$ ;go on done ; 196$: jsr pc,MOVBIT ;mov compressed bits from BUFT1 > BUF br 200$ ;output. ; 195$:; ; ; ; ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; WRITE OUT A RASTER LINE TO OUTPUT FILE ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; ; 200$: ; ; ; ; 202$: cmp LUNOUT,DEVIC1 ;tst for special devices that are treat beq 206$ ;with care cmp LUNOUT,DEVIC3 ;tst for special devices that are treat beq 206$ ;with care cmp LUNOUT,DEVIC2 ;need to have special cases here bne 210$ ;not special go assume = disk ; ; 203$: ;CD: device QIO$S #IO.WLB,#5,#5,,#IOSB5,,<#BUF,BYTSOT,,,YOUT,X> bcs 220$ ;if directive error bcc 230$ ;go wait for done ; 206$: ;BM: & MT: deviceS QIO$S #IO.WLB,#5,#5,,#IOSB5,,<#BUF,BUFSIZ,,,YOUT,X> bcs 220$ ;if directive error bcc 230$ ;go wait for done ; 210$: bitb #FD.RWM,LSTBLK+F.RACC ;tst record oriented file ? bne 212$ ;if fd.rwm set then do WRITE$ ; ; PUT$ record I/O ; else use PUT$ mov RECOUT,LSTBLK+F.NRBD ;load number of bytes to output PUT$S #LSTBLK,#BUFT1 ;output line to record file bcc 211$ ;if ok then skip wait and proced bcs 225$ ;if error abort ; 211$: bit #CPTMSK,$SWTHO ;is it COLOR PRINT beq 240$ ;if not done! ; jsr PC,SECLIN ;DOTLIN for 2nd line,BUF2 not BUF mov RECOUT,LSTBLK+f.NRBD ;number of bytes ; PUT$S #LSTBLK,#BUFT2 ;output 2nd line to record oriented file bcc 240$ bcs 225$ ;if error ; ; ; VIRTUAL BLOCK I/O 212$: WRITE$ #LSTBLK,#BUF,BUFSIZ,#OUTVBN,,#IOSB5 ;write virtual blk bcc 230$ bcs 220$ ; 220$: call $ERMSG ;err QUEUING write OUQERR jmp 300$ ;cattastrphe ; 225$: call $ERMSG OUTERR ;WRITE error on output jmp 10$ ;if error on output then go-on ; 230$: WTSE$S #5 ;wait for I/O to complete bcs 225$ ;success ? ; 240$: tst OUTFIL ;tst for files-11 output ? beq 241$ ;if not skip status load movb F.ERR(R0),IOSB5 ;load errror code 241$: cmpb IOSB5,#1 beq 250$ cmpb IOSB5,#IE.EOF ;test for end of file on output? beq 245$ ;if not its just an error cmpb IOSB5,#IE.EOV ;test for end of file on output? bne 243$ ;if not its just an error 245$: call $ERMSG ;eof on output ! stop OUTEOF jmp 300$ ;go away dont output any more ? ; 243$: call $ERMSG OUTERR ;write error on output ; ; ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; LINE OUTPUT , NOW PERFORM LOOP ITERATION INCR's & TESTS ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; 250$: ;now we have filled input buffer ; use specific last Y line to end loop xfer bit #IYMSK,$SWTHI ;is specific Y line # given beq 252$ ;if not let pic wrap around cmp LASTYI,YIN ;are we at specified end ? beq 300$ ;if so exit ,regardless of NLINES ; 252$: bit #IYMSK,$SWTHO ;is specific Y line # given beq 270$ ;if not let pic wrap around cmp LASTYO,YOUT ;are we at specified end ? beq 300$ ;if so exit ,regardless of NLINES ; 270$: ; add SINCYO,YOUTX ;incr y incr counter always by 1 or -1 add SINCYO,YOUT ;incr line # by 1 or -1 always 280$: bic #177000,YOUT ;if normal let y be only = 511. max ; add LINES,OUTVBN+2 ;incr y to output files-11 virtual blk adc OUTVBN ;incr carry to high part ; cmp INCRYO,YOUTX ;tst full incr with incr counter ble 283$ ;if not eq then output again jmp 202$ ;this replicates output when INCRYO ;is grater than 1 !!!!! 283$: ADD YINX,YIN ;INCR Y LINE NUMBER BY INPUT INCR 284$: bic #177000,YIN ;if normal let y be only = 511. max ; 285$: add YINX,INVBN+2 ;incrment input file if dsik adc INVBN ;incr hi order if disk ; ; 295$: sub LINES,LINCNT ;decr count of nlines to xfer ble 300$ ;go read next blk if not done yet jmp 102$ ; 300$: ; ;********************************************************************* ; at end of IMAGE data ,if its mag tape use EOF mark ;****************************************************************** cmp LUNOUT,DEVIC3 ;tst for MAG TAPE type device ? bne 305$ ;if not skip out ; ;WRITE to EOF at end of image QIOW$S #IO.EOF,#5,#5,,#IOSB5 ;que file skip&wait BCC 305$ ;IF OK GO ON br 305$ ;ignore errors ; 305$: cmp LUNIN,DEVIC3 ;tst for MAG TAPE type device ? bne 308$ ;if not skip out ; ;read to EOF at end of image QIOW$S #IO.SPF,#4,#4,,#IOSB4,,#1 ;que file skip&wait BCC 308$ ;IF OK GO ON br 308$ ;ignore errors ; 308$: bit #IMGMSK,$SWTHI ;tst for multiple images in the file beq 310$ ;if not reqested by user only give one ; inc IMGLOW ;increment image # from file to read cmp IMGHGH,IMGLOW ;are we at the high yet ? blt 310$ ;if still more to go then continue ; tst INFILE ;tst for files -11 device bne 310$ ;if not then get next from binary tape ;go use in /IM mode from unlabeled tape ; MOV NLINES,LINCNT ;RESTORE LINE COUNT jmp 102$ ;else finished this input file move on. ;go get next file from unlabeled tape ; 310$: bitb #CS.MOR,CSIBLK+C.STAT ;tst for more input file specs beq 320$ ;if not look for more cmds CLOSE$ #TTLDMY ;close current input file jmp 35$ ;and go open next input file ; 320$: bit #SPLMSK,$SWTHO ;tst SPOOLed output ? beq 330$ ;if not skip it PRINT$ #LSTBLK ;que printed output to spooler ; 322$: JMP IMAGE 330$: bit #CPTMSK,$SWTHO ;tst COLOR printer ???? beq 322$ ;if not jmp image ; ; add CALIBRATION COLOR SCALE TO END OF IMAGE ; jsr pc,BLDSCL ;create incrmenting pattern in BUF jsr pc,TRANSL ;get bytes to special code jsr pc,SMASH ;smash code to print dot pattern ;for second row jsr pc,DOTLIN ;create print cmds from dot pattern jsr pc,SECLIN ;for second row ; mov CALLIN,CALCNT ;initalize number of lines of cal 334$: mov RECOUT,LSTBLK+F.NRBD ;load printer bytes PUT$S #LSTBLK,#BUFT1 ;addres of data bcc 335$ jmp 220$ ;if error 335$: mov RECOUT,LSTBLK+F.NRBD ;load printer bytes PUT$S #LSTBLK,#BUFT2 ;addres of data bcc 336$ jmp 220$ ;if error 336$: dec CALCNT bgt 334$ ; ; ; COLOR PRINT SPECIAL REVERSE FORM FEED / ; INC COLOR ;inc to next color and tst for done cmp CPTNUM,COLOR ;2 is last if we have 3 colors=0,1,2 ble 322$ ;if last done ; mov FRMBYT,LSTBLK+F.NRBD ;load bytes for control chars LP1: PUT$S #LSTBLK,#REVFRM ;reverse form feed bcc 331$ jmp 220$ ;abort error ; 331$: jmp 400$ ;go REWIND old input file ,setup output file ;and reinitialize variables to do it again ;************************************************************ ; BOTTOM OF RASTER LINE TRANSFER LOOP ;**************************************************************** ; ; .END $START