Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0027/common.mac
There are 22 other files named common.mac in the archive. Click here to see a list.
00100 TITLE COMMON SUBROUTINES VERSION #2 SEPT. 1 '69
00200 SUBTTL DON WITCRAFT 3-11-66
00300
00400
00500
00600
00700 ENTRY EFLG3,EFLG4,EFLG5,EFLG6,EFLG7,SREAD,SWRITE
00800
00900 ;SIMULATOR READ
01000 ;CALL MOVEI FDB,ADDRESS OF FILE DATA BLOCK
01100 ; PUSHJ PDP,SREAD
01200 ; EOF RETURN, FILE HAS BEEN CLOSED
01300 ; NORMAL RETURN
01400
01500 ;IF SIMULATOR ERRORS ARE ENCOUNTERED, GOES TO ERROR.
01600 ;DOES NOT CHECK FOR IODERR.
01700 ;IF IMAGE MODE FROM DTA,MTA OR DSK, AFTER FILLING BUFFER
01800 ;CONVERTS BYTE POINTER TO 8 BIT BYTES AND MULTIPLIES ITEM
01900 ;COUNT BY 4.
02000
02100 EXTERNAL ERROR
02200
02300 SREAD: PUSH PDP,AC3 ;SAVE AC3
02400 JSP SRR,FIN ;EXECUTE READ IN FILEIO
02500 MOVE AC3,CFSTAT(FDB)
02600 TRNE AC3,-1 ;FILE ERROR?
02700 PUSHJ PDP,ERROR ;YES
02800 EFLG3: MOVE AC3,CDSTAT(FDB)
02900 TRNE AC3,ERRORS-IODERR ;SIMULATOR ERROR?
03000 PUSHJ PDP,ERROR ;YES
03100 EFLG4: TRNN AC3,IODEND ;NO. EOF?
03200 JRST SREAD1 ;NO.
03300 JSP SRR,FCLOSE ;YES
03400 MOVE AC3,CDSTAT(FDB)
03500 TRNE AC3,ERRORS-IODERR
03600 PUSHJ PDP,ERROR
03700 EFLG5: SOS -1(PDP) ;CONVERT SKIP RETURN TO NORMAL
03800 SREAD1: POP PDP,AC3 ;RESTORE AC3
03900 AOS (PDP) ;SKIP
04000 POPJ PDP, ;RETURN
04100 ;SIMULATOR WRITE
04200 ;CALL MOVEI FDB,ADDRESS OF FILE DATA BLOCK
04300 ; PUSHJ PDP,SWRITE
04400 ; RETURN
04500
04600
04700 SWRITE: JSP SRR,FOUT
04800 PUSH PDP,AC3
04900 MOVE AC3,CFSTAT(FDB)
05000 TRZN AC3,IOIDM ;ILLEGAL MODE?
05100 JRST SWRIT1
05200 MOVEI AC3,AL ;MAKE IT ASCII
05300 HRRM AC3,CINI(FDB)
05400 POP PDP,AC3
05500 JSP SRR,FCLOSE
05600 JRST SWRITE
05700 SWRIT1: TRNE AC3,-1
05800 PUSHJ PDP,ERROR
05900 EFLG6: MOVE AC3,CDSTAT(FDB)
06000 TRNE AC3,ERRORS-IODERR
06100 PUSHJ PDP,ERROR
06200 EFLG7: POP PDP,AC3
06300 POPJ PDP,
06400