Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-04 - decus/20-0135/06/vtsynk.mac
There are 2 other files named vtsynk.mac in the archive. Click here to see a list.
00100	COMMENT * vtsynk, SIMULA specification;
00200	OPTIONS(/E:QUICK,vtsynk);
00300	PROCEDURE vtsynk(param,horiz,vertic);
00400	NAME param; INTEGER param; INTEGER horiz,vertic;
00500	COMMENT synchronizes the cursor in the screen position
00600	identified by horiz,vertic;
00700	
00800	
00900	!*;! MACRO-10 code !*;!
01000	
01100	    TITLE   vtsynk
01200	    ENTRY   vtsynk ;! simula calling
01250	    ENTRY   masynk ;! macro calling, with xbase,xlow,xwac1,xbh loaded
01300	    SUBTTL  VIDED subroutine, Jacob Palme 1978
01400	
01500	;!*** Copyright 1978 by the Swedish Defence Research Institute. ***
01700	
01800	    sall
01900	    search  simmac,simmcr,simrpa
02200	    search  vtmvda
02300	    macinit
02350	    extern  symcur
02400	
02500	    COMMENT* REGISTER USAGE IN THIS PROCEDURE
02600	    X0   Temporary use
02700	    X1   Used by outchr and vtmcur
02800	    X2   ==XTAC when calling function procedures
02900	    X3   ==XWAC1 = first parameter used to load XBASE,
03000	         = reference to sysout used by IONB via OUTCHR
03100	    X4   == used by vtmcur
03200	    X5   ==horiz
03300	    X6   ==vertic
03400	    X7   ==XBH = used by OUTCHR, buffer header pointer
03500	    X10  free
03600	    X11  free
03700	    X12  used by vtmcur
03900	    X13  used by vtmcur
04000	    X14  ==XBASE = base of mvistax SIMULA data block
04100	    X15  ==XCB current block pointer, used by RTS
04200	    X16  ==XLOW points to static area in RTS, used by RTS
04300	    X17  ==XPDP push down list pointer
04400	    *;!
04500	
04600	    bup==OFFSET(ZBHBUP)
04700	    cnt==OFFSET(ZBHCNT)
04800	
04900	;! OUTCHR assumes XWAC1 = file ref for Sysout, XBH pointer to
05000	;! buffer header. XWAC1==AC3, XBH==AC7.
05100	;! OUTCHR moves the character in AC0 to the SYSOUT output
05200	;! file buffer. IF a parameter is given, the contents of
05300	;! the word with the given offset from xbase is loaded into
05400	;! AC0 first. xbase refers to the mvistax class block instance.
05500	
05600	DEFINE outchr(c)<
05700	IFNB <c>,<L c(xbase)>
05800	    SOSGE   cnt(XBH)
05900	     XEC    IONB
06000	    IDPB    bup(XBH)
06100	>
06200	
06800	    ;! Local definitions ;!
06900	
07000	horiz==XWAC1+2       ;! AC5
07100	vertic==horiz+1      ;! AC6
07200	
07300	xbase==X14           ;! base of mvistax class instance block
07400	xtyp== X13           ;! terminal type number
07700	
07800	vtsynk: PROC         ;! entry point when called from SIMULA
07900	    ;! Set up environment variables
08000	    LF xbase,ZFLZBI(,XWAC1) ;! Base of MVISTAX block (vtmvda offsets)
08100	    LOWADR                  ;! XLOW points to static area
08200	    L XWAC1,YSYSOUT(XLOW)   ;! XWAC1==AC3:- Sysout for OUTCHR!
08300	    LF XBH,ZFIOBH(XWAC1)    ;! XBH==AC7:- buffer header
08400	    SUBI XBH,1              ;! Compute buffer header reference
08500	    L xtyp,trmtyp(xbase)   ;! terminaltype in register xtyp
08600	
08650	masynk:             ;! entry point when called from MACRO
08795	SKIPN qdisplayoutput(xbase) ;! IF NOT q_display_output THEN
08940	GOTO moved                  ;! no terminal output
09085	;! IF NOT direct_cursor_addressing THEN local_home_the_cursor
09230	IF
09375	  SKIPE directcursoraddressing(xbase)
09520	  GOTO FALSE
09665	THEN
09810	  ;! local_home_the_ucrsor code inserted here:
09955	  IF ;! addaltmode then outchr(terminalout,altmode,1)
10100	    SKIPN addaltmode(xbase)
10378	    GOTO FALSE
10656	  THEN
10934	    LI qesc
11212	    outchr
11490	  ELSE
11768	    outchr(home)
12046	  FI
12324	  outchr(home)
12602	  SETZM qvertic(xbase)
12880	  SETZM qhoriz(xbase)
13158	  IF ;! terminaltype = cdc71310s
13436	    CAME xtyp, cdc73s(xbase)
13714	    GOTO FALSE
13992	  THEN
14270	    L X1,heim1(xbase)
14548	    ST X1,qvertic(xbase)
14826	  FI
15104	FI ;! end of "if not direct_cursor_addressing
15382	BRANCH symcur
15660	moved:
15938	RETURN
16216	EPROC
16500	END;