home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
harris100
/
h100ker.asm
< prev
next >
Wrap
Assembly Source File
|
1988-08-15
|
4KB
|
122 lines
* ASSEMBLY LANGUAGE SUBROUTINES:
*
* PUT1CW -- CALLED BY SNDPKT
* WRKFIL -- CALLED BY RFILE
* BKSTOR -- CALLED BY LOGOUT
*
************************************
* SUBROUTINE PUT1CW(BUF,NCHARS)
*
* WRITE AN ARRAY OF CHARACTERS TO THE TERMINAL USING 'SPECIAL' I/O
*
* BUF IS AN INTEGER ARRAY CONTAINING THE STRING, ONE CHARACTER PER WORD
*
* (SR 7/84)
*
REEN MAKE THE ROUTINE RE-ENTRANT
XDEF PUT1CW,*
GAP 1 GET LOCATION OF ARG 1 IN I, BUMP J
TIM BUFADR SAVE BUFFER ADDRESS IN PARLIST
GAP 1 GET LOCATION OF ARG 2 IN I, BUMP J
TMA 0,I GET BUFFER SIZE
TAM BUFSIZ SAVE IN PARAMETER LIST
TJM RETURN SAVE RETURN ADDRESS
TLO PARLST NAME THE PARLIST
BLU $IOW DO THE I/O
BUL* RETURN RETURN
PORG * DATA:
PARLST DATA '306 SPECIAL WRITE TO LFN 3
BUFSIZ DATA 0 SIZE OF BUFFER
BUFADR LAC 0 ADDRESS OF BUFFER
RETURN LAC 0 RETURN ADDRESS
END
* LOGICAL FUNCTION WRKFIL(LFN)
*
* DETERMINES WHETHER LFN IS ASSIGNED TO A VALID WORKFILE
*
* (FOR MORE INFO SEE SYSTEM SERVICES 3.6 & 4.8)
*
* (SR 10/83)
*
REEN MAKE THE ROUTINE RE-ENTRANT
XDEF WRKFIL,*
GAP 1 GET LOCATION OF ARG 1 IN I, BUMP J
TMA 0,I GET LFN
TAM TASCII AND SAVE IN PARAMETER LIST
TJM RETURN SAVE RETURN ADDRESS
TLO TASCII GET FILE NAME ASSIGNED TO LFN
BLU $LFNAME
CZA IS IT EVEN ASSIGNED?
BNZ NOPE NO, ERROR
TLO TASCII IS IT A WORKFILE?
BLU $CHWORK
CZA
BNZ NOPE NO, (AT LEAST NOT FOR THIS PROCESS)
* YES, IT IS A VALID WORK FILE
TNA 1 WRKFIL = .TRUE.
BUL* RETURN RETURN
NOPE TZA WRKFIL = .FALSE.
BUL* RETURN RETURN
PORG * DATA:
TASCII BLOK 4 PARAMETER LIST FOR FILE NAME
RETURN LAC 0 RETURN ADDRESS
END
*
* THIS FORTRAN CALLABLE SUBROUTINE IS USED TO SUPPLY A DATA RECORD
* SUCH THAT A SUBSEQUENT BACKSPACE RECORD AND SYMBOLIC READ WILL INPUT
* THAT RECORD. THIS IS A MEANS FOR SETTING THE COMMAND LINE BEFORE
* CHAINING TO ANOTHER PROGRAM.
*
* FORM: CALL BKSTOR(LFN,BUF,NWORDS,ISTAT)
*
* LFN IS THE LFN TO SUPPLY THE RECORD TO
* BUF IS THE BUFFER TO SUPPLY
* NWORDS IS THE NUMBER OF WORDS IN BUF()
* ISTAT IS THE STATUS RETURNED (0 = SUCCESS)
*
* AUTHOR- DAVE MCWILLIAMS
*
*************************
*
REEN MAKE THIS ROUTINE RE-ENTRANT
XDEF BKSTOR,BKSTOR
BKSTOR GAP 1 GET ADDRESS OF LFN
TMA !0,I GET THE LFN
LLA 6 SHIFT 6 BITS TO THE LEFT
TAM PLIST SAVE IN PARAMETER LIST
GAP 1 GET ADDRESS OF BUFFER
TIM BUF SAVE BUFFER ADDRESS
GAP 1 GET ADDRESS OF NUMBER OF WORDS
TMA !0,I GET NUMBER OF WORDS
TAM NWORDS SAVE IT
GAP 1 GET ADDRESS OF STATUS
TIM ISTAT SAVE ADDRESS
TJM RETURN SAVE OUR RETURN ADDRESS
*
TLO PLIST
BLU $BKSTOR CALL SERVICE TO STORE IT
TAM* ISTAT RETURN STATUS
BUC* RETURN RETURN TO CALLING PROGRAM
*
* DATA
*
PORG *
PLIST DATA 0 SHIFTED LFN
NWORDS DATA 0 NUMBER OF WORDS
BUF LAC 0 BUFFER ADDRESS
*
ISTAT LAC 0 ADDRESS FOR STATUS TO RETURN
RETURN LAC 0 RETURN ADDRESS
END