.title SHODIS .ident /01/ ; ; 6-dec-79 fix up /im:n:m switch ; ; this code controls the output display state of the image display ; it can be modified for use with displays other than COMTAL ; ; ; MACRO LIBRARY CALLS ; .MCALL CLOSE$,CSI$,CSI$1,CSI$2,EXIT$S,GCMLD$ .MCALL GCML$,GPRT$S,OPEN$R,OPEN$A,OPEN$W,OPEN$M,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$ ; ; ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; read state of COMTAL display screen control words ; modify them according to switches and then restore them ; to COMTAL comtrol registers ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SHODIS:: ;blk read 16 words of COMTAL DISPLAY QIOW$S #IO.RLB!DATBLK,#5,#5,,#IOSB5,,<#BUF,#32.> BCC 461$ ;IF OK GO ON 70$: rts pc ;return to caller with carry set ; ;now fill in what user requesT 461$: ; bit #FUNMSK,CSIBLK+C.MKW1 ;add function memory ? beq 465$ bit #FUNMSK,CSIBLK+C.MKW2 ;tst if negated bne 462$ ;its present , go turn on bic #ENAFUN,BUF+2 ;disable the feature br 465$ 462$: bis #ENAFUN,BUF+2 ;enable function memory 465$: bit #COLMSK,CSIBLK+C.MKW1 ;tst color memory on ? beq 470$ bit #COLMSK,CSIBLK+C.MKW2 bne 467$ bic #ENACOL,BUF+2 br 470$ 467$: bis #ENACOL,BUF+2 ;enable psuedo-color memory ; 470$: bit #GRAMSK,CSIBLK+C.MKW1 ;tst graphics beq 480$ ; 471$: cmp GRAPHO,#1 bne 472$ mov #ENAGR1,-(SP) 472$: cmp GRAPHO,#2 bne 473$ mov #ENAGR2,-(SP) 473$: cmp GRAPHO,#3 bne 474$ mov #ENAGR3,-(SP) 474$: cmp GRAPHO,#4 bne 475$ mov #ENAGR4,-(SP) 475$: ; bit #GRAMSK,CSIBLK+C.MKW2 ;tst polarty bne 476$ bic (SP)+,BUF+2 ;clr the enable bit br 480$ 476$: bis (SP)+,BUF+2 ; 480$: bit #ANNMSK,CSIBLK+C.MKW1 beq 485$ bit #ANNMSK,CSIBLK+C.MKW2 bne 481$ bic #ENAANN,BUF+2 br 485$ 481$: bis #ENAANN,BUF+2 BIC #300,BUF+2 ;CLR OUT PREVIOUS BITS mov ANNMEO,-(SP) ;load 0-3 value bic #177774,(SP) swab (SP) asr (SP) asr (SP) bis (SP)+,BUF+2 ;load in 2 bits ; ; 485$: bit #TPNMSK,CSIBLK+C.MKW1 beq 490$ bit #TPNMSK,CSIBLK+C.MKW2 bne 486$ bic #ENATPN,BUF+2 br 490$ 486$: bis #ENATPN,BUF+2 BIC #6,BUF+2 ;CLR OUT PREVIOUS BITS mov TPNMEO,-(SP) ;load 0-3 value bic #177774,(SP) asl (SP) bis (SP)+,BUF+2 ;load in 2 bits ; ; ************** set up IMAGE **************** 490$: ; bit #IMGMSK,CSIBLK+C.MKW1 beq 495$ 492$: cmp #0,IMAGOH ;tst for presence of split screen ? bne 493$ ;if not then spilt screen it mov IMAGEO,IMAGOH ;same image in both halves ; 493$: DEC IMAGEO ;GET TO BASE ZERO DEC IMAGOH ;GET T BASE ZERO ; bic #177770,IMAGEO bic #177770,IMAGOH mov IMAGOH,-(SP) ;load 0-7 value asl (SP) ;currently only 0,1,2 are useable asl (SP) asl (SP) bis IMAGOH,(SP) asl (SP) asl (SP) asl (SP) bis IMAGEO,(SP) ;set all 3 image numbers in reg bic #ENATPN,BUF+2 ;turn off tesp pattern allow images ; bit #IMGMSK,CSIBLK+C.MKW2 bne 491$ bic #ENAIMG,(SP) br 494$ 491$: bis #ENAIMG,(SP) 494$: mov (SP)+,BUF ;load in 2 bits 495$: ; ; ; QIOW$S #IO.WLB!DATBLK,#5,#5,,#IOSB5,,<#BUF,#32.> ;blk write 16 words of display state JMP 70$ ;ERROR IN ACESSING DATA BLK ; return to caller with carry set or clr for bad or success ; .end