Trailing-Edge
-
PDP-10 Archives
-
decuslib20-05
-
decus/20-0137/lcap/lcapa.mac
There are 2 other files named lcapa.mac in the archive. Click here to see a list.
TITLE PEEK
; PRESENTLY, ONE MUST USE THE FOLLOWING:
; .R MACRO
; *ALGPRM_ALGPRM[10,6]
; *ALGSYS_ALGSYS[10,6]
; *LCAPA_LCAPA
; *LCAPB_LCAPB
; IN ORDER TO COMPILE USING THE ALGOL SYMBOLS
.CHAN=3
.FILE=4
.EXT=5
.PPN=6
.EXIT=1
.PEEK=2
EXTERNAL %ALGDR
SEARCH ALGPRM,ALGSYS
ENTRY PEEK
IFGE <MAJVNO-5>,<
PEEKPM: EXP 0
XWD 1,4
SIXBIT/PEEK/
>
PEEK: JSP AX,PARAM
IFGE <MAJVNO-5>,<
EXP PEEKPM
>
XWD 0,6
XWD $PRO!$B!$SIM,5 ; BOOLEAN PROCEDURE
XWD $VAR!$I!$FOV,.CHAN ; CHAN. NO.
XWD $VAR!$I!$FOV,.FILE ; FILE LEFT JUSTIFIED
XWD $VAR!$I!$FOV,.EXT ; EXT LEFT JUSTIFIED
XWD $VAR!$I!$FOV,.PPN ; PPN
MOVE A13,.FILE(DL)
MOVEM A13,E ; INSERT FILE NAME IN "E"
MOVE A13,.EXT(DL)
MOVEM A13,E+1 ; INSERT EXT NAME IN "E+1"
SETZM E+2 ; ZERO PROTECTION CODE
MOVE A13,.PPN(DL)
MOVEM A13,E+3 ; INSERT PPN IN "E+3"
SETOM .PEEK(DL) ; SET PEEK TRUE
MOVE A0,.CHAN(DL)
ASH A0,27 ; SHIFT INTO CORRECT BITS
IOR A0,INST ; SET UP INSTRUCTION
XCT A0 ; EXECUTE IT
SETZM .PEEK(DL) ; SET PEEK FALSE IF ERROR
JRST .EXIT(DL) ; EXIT TO MAIN
INST: LOOKUP 0,E ; DUMMY INSTRUCTION
E: BLOCK 4 ; AREA FOR LOOKUP
END PEEK