Trailing-Edge
-
PDP-10 Archives
-
decuslib20-07
-
decus/20-0162/josh.mac
There is 1 other file named josh.mac in the archive. Click here to see a list.
UNIVERSAL JOSH
SEARCH MONSYM,MACSYM
;MACRO TO BUILD COMMAND STATE BLOCKS FOR COMND JSYS
DEFINE .CMDBK (.REPAR,PROMPT,.BUFFR,.ATOM,.GTBLK) <CM%RAI+.REPAR
.PRIIN,,.PRIOU
POINT 7,[ASCIZ/PROMPT/]
POINT 7,.BUFFR
POINT 7,.BUFFR
200
0
POINT 7,.ATOM
200
.GTBLK>
;MACRO TO PRINT ERROR MESSAGE IN STANDARD FORM AND RETURN
DEFINE .ERROR (.RETUR,.ERSTR) <HRROI 1,.ERSTR
MOVE 2,[.FHSLF,,-1]
SETZ 3,
ERSTR
JFCL
JFCL
HRROI 1,.ERSTR
ESOUT
JRST .RETUR>
;MACRO TO PARSE A CARRIAGE RETURN USING COMND (REQUIRES BLOCK)
DEFINE CONFRM (.retu) <MOVEI 2,[FLDDB.(.CMCFM)]
COMND
TXNE 1,CM%NOP
JRST .RETU>
;MACRO TO PARSE A FIELD WITH COMND JSYS
DEFINE PARSE (.REPA) <COMND
TXNE 1,CM%NOP
JRST .REPA>
;MACRO TO OUTPUT ANY STRING
DEFINE PRINT (STRING) <HRROI 1,[ASCIZ/STRING/]
PSOUT>
;MACRO TO SAVE ALL AC'S IN SPECIFIED BLOCK
DEFINE SAVACS (BLOCK) <MOVEM 17,BLOCK+17
MOVEI 17,BLOCK
BLT 17,BLOCK+16>
;MACRO TO RESTORE AC'S STORED IN A BLOCK WITH SAVACS
DEFINE RESTAC (BLOCK) <MOVSI 17,BLOCK
BLT 17,17>
;MACRO TO OUTPUT A NUMBER IN DECIMAL
DEFINE NUMOUT (NUMBER,.ERROR) <MOVEI 1,.PRIOU
MOVE 2,NUMBER
MOVEI 3,^D10
NOUT
JRST .ERROR>
;MACRO TO OUTPUT ONE CHARACTER
DEFINE OUTCHR (CHAR) <MOVEI 1,"CHAR"
PBOUT>
;MACRO TO PRINT CARRIAGE RETURN AND LINE FEED
DEFINE PRICR <HRROI 1,[ASCIZ/
/]
PSOUT>
;MACRO TO TURN OFF ECHOING FOR PASSWORDS
DEFINE ECHOFF <MOVEI 1,-1
RFMOD
TXZ 2,TT%ECO
SFMOD>
;MACRO TO TURN ON ECHOING AFTER ECHOFF
DEFINE ECHON <MOVEI 1,-1
RFMOD
TXO 2,TT%ECO
SFMOD>
;MACRO to output an error message: ERROUT (Error message)
DEFINE ERROUT (MESG$),<HRROI 1,[ASCIZ/MESG$/]
ESOUT>
;MACRO to dismiss program for specified seconds: SLEEP (Number of seconds)
DEFINE SLEEP (SEC),<MOVEI 1,^D<SEC>*^D1000
DISMS>
;MACRO to set the CCOC words for ^H instead of backspace (for COMND).
DEFINE SCTRLH,<MOVEI 1,-1
RFCOC
TXO 2,1B17
TXZ 2,1B16
SFCOC>
;MACRO TO SET CCOC WORDS FOR ALL CTRL-CHARS (FOR GAMES AND GRAPHICS).
DEFINE SCTRLA,<MOVEI 1,-1
MOVE 2,[^B101010101010101010101010101010101010]
MOVE 3,[^B101010101010101010101010101010101010]
SFCOC>
END