DataMuseum.dkPresents historical artifacts from the history of: CR80 Hard and Floppy Disks |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CR80 Hard and Floppy Disks Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 7964 (0x1f1c) Types: TextFile Names: »RTC.S«
└─⟦21011a92c⟧ Bits:30005095 8" CR80 Floppy CR80FD_0052 ( HMDIR 2 VOL: BACKUP MD: ISH.D From: HMDIR*ISH.D ) └─⟦777b1406f⟧ └─ ⟦this⟧ »ISH.D!RTC.S«
LIST BEGIN MODULE PMASK=#C413 ;**************************************************************** ; * ; NAME: ISH_RTC * ; NUMBER: CFIX/64/0100 * ; COPYRIGHT: CHRISTIAN ROVSING CORP. * ; HM/041581: REL. 01 VER. 01 * ; * ;**************************************************************** ;«ff»;PAGE ;----------------------------------------------------------------------- ; ; SET S2SYSS PARAMETERS ; ;----------------------------------------------------------------------- LOC= 0 ; RESET LOCATION COUNTER XPROGRAM= TRUE XDATA= TRUE NOLIST $@**GENS.D*S2SYSS $@**GENS.D*X2ION1 $@**GENS.D*X2GEN1 MESSAGE <:ISHNAMES.N:> $@**HMDIR*ISH*ISHNAMES.N LIST ;----------------------------------------------------------------------- ; ; SET PRCGEN PARAMETERS ; ;----------------------------------------------------------------------- XPGNAME0= <:IS:> XPGNAME1= <:HR:> XPGNAME2= <:TC:> XPROCESSNAME0=<:IS:> XPROCESSNAME1=<:HR:> XPROCESSNAME2=<:TC:> XVERSION= 1 XPGTYPE= BMREENTRANT XPRLEVEL= 2 ; USE LEVEL 2 SO THAT STREAMS WORK ;---------------------------------------------------------------------- ;---------------------------------------------------------------------- ; ; S I P R E A L-T I M E-C L O C K D A T A B A S E. ; ;---------------------------------------------------------------------- ;TUNING PARAMETERS: ;--------------------------------- BUFCNT:=10 ; NO OF SIMULTANOUSLY REQUESTS, IF BUFCNT EQ 0 THEN USE 16 FI ; ; THAT MAY BE IN PROGRESS. ; CURLOC=LOC,LOC=0 ;BUFFER DECLARATION: ;--------------------------------- BLINK: LOC=LOC+1 ; BUFFER LINK BEVENT: LOC=LOC+1 ; AMOS EVENT BTIME: LOC=LOC+1 ; TIME REQUESTED (100 MS) BUFSIZE: LOC=CURLOC ; ;BUFFER QUEUES: ;--------------------------------- FQUEUE: 0 ; POOL OF FREE BUFFERS OQUEUE: 0 ; QUEUE OF OCCUPIED BUFFERS ; ;ISHRTC WORK: ;--------------------------------- CMESBUF: ; CURRENT INBOUND MESSAGE BUFFER CANSWER: 0,REPEAT 4 ; ANSWER COPILATION BUFFER BUFAREA: 0,REPEAT(BUFSIZE*BUFCNT-1) ; BUFFER AREA ;---------------------------------------------------------------------- ;«ff»;PAGE USE PROG ;---------------------------------------------------------------------- ; ; PROGRAM "ISH REAL-TIME-CLOCK"(ISHRTC). ; ; NARRATIVE: ; ISHRTC IS INVOKED BY AMOS MESSAGES WITH THE FOLOWING FORMAT: ; MESS0: CRESTIM ; COMMAND WORD ; MESS1: TIME(1 SEC); PARAMETER ; MESS2-4: DON'T CARE ; ; ; WHEN A VALID REQUEST IS RECIEVED,AND ISHRTC IS NONE-BUSY,I.E.A FREE ; BUFFER IS AVAILABLE,THEN THE EVENT IS STORED,AND AN ANSWER RETURNED ; TO SENDER WITH COMPLETION CODE 'CCOK',WHEN THE TIME REQUESTED HAS ; EXPIRED. ; OTHERWISE AN CODE IS RETURNED TO CALLER IN MESS0,I.E.: ; ECBUSY: ALL BUFFERS USED ; ECINVCOMD: INVALID COMMAND WORD ; ; CALLS TO: SETCYCLE ; WAITEVENT ; SENDANSWER ; TERMINATE ;---------------------------------------------------------------------- ISHRTC: ;BEGIN ISHRTC MOVC BUFCNT R0 ; BEGIN INITIALIZE BUFFER POOL MOVC BUFAREA R4 ; MOVC FQUEUE R5 ; L010: ; FOR N=1,BUFCNT DO MOV R4 BLINK. X5 ; MOV R4 R5 ; LINK BUFFER(N) INTO ADDC BUFSIZE R4 ; FREE QUEUE SOB R0 L010 ; ENDDO MOVC 10-1 R0 ; (KERNAL ADD 1) MON SETCYCLE ; "SET_CYCLE"(1 SEC.) ; L100: ; WAITEVENT: MOVC 0 R0 ; DELAY=PHASE MOVC BMMSG+BMDELAY R2 ; EVENT=MSG OR DELAY MOVC CMESBUF R1 ; MON WAITEVENT ; "WAITEVENT" ; X0:R0=EVENTTYPE ; CASE_OF_EVENTTYPE SEQ R0 BNMSG ; JMP L200 ; 1.MESSAGE INE X1 CRESTIM ; IF COMD<>RESERVE TIME THEN JMP L110 ; GOTO INVALID_COMMAND: MOV FQUEUE R5 ; IEQ R5 0 ; IF FREE_QUEUE EMPTY THEN JMP L112 ; GOTO BUSY MOV BLINK. X5 R0 ; MOV R0 FQUEUE ; GET BUFFER MOV R2 BEVENT.X5 ; STORE EVENT IN BUFFER MOV CMESBUF+MSPARM R0 ; READ TIME REQUESTED ADDC 1 R0 ; MAKE PROVISIONS FOR ZERO MOV R0 BTIME. X5 ; SAVE TIME MOV OQUEUE R4 ; MOV R4 BLINK. X5 ; ENQUEUE BUFFER IN OQUEUE MOV R5 OQUEUE ; JMP L100 ; GOTO WAITEVENT ; L110: ; INVALID_COMMAND: MODC ECINVCOMD-ECBUSY ; L112: ; BUSY MOVC ECBUSY X1 ; WRITE ERRORCODE MON SENDANSWER ; "SENDANSWER" JMP L100 ; GOTO WAITEVENT: L200: ; SEQ R0 BNDELAY ; JMP L300 ; 2.DELAY MOVC OQUEUE R6 ; GET FIRST ELEMENT IN OQUEUE L210: ; UNTIL ALL ELEMENTS INSPEC. DO SON BLINK. X6 ; IF LAST ELEMENT THEN JMP L100 ; GOTO WAITEVENT: MOV BLINK. X6 R5 ; ELSE DEC BTIME. X5 ; UPDATE TIME.BUF SOZP BTIME. X5 ; IF TIME EXPIRED THEN MOV BLINK. X6 R6 ; JMP L210 ; MOV BLINK. X5 R0 ; MOV R0 BLINK. X6 ; DEQUEUE BUFFER MOV BEVENT.X5 R2 ; RETRIEVE EVENT MOVC CANSWER R1 ; WRITE ANSWER MOVC CCOK X1 ; MON SENDANSWER ; "SENDANSWER" MOV FQUEUE R0 ; MOV R0 BLINK. X5 ; RELEASE BUFFER MOV R5 FQUEUE ; JMP L210 ; ENDIF ; ENDIF ; ENDUNTIL ; L300: ; 3.UNKNOWN EVENT MOVC ECUNKNOWN R0 ; MOVC L100 R1 ; MON TERMINATE ; ;---------------------------------------------------------------------- ; ; SET PRCGEN PARAMETERS ; ;----------------------------------------------------------------------- XSTART= ISHRTC NOLIST $@**GENS.D*X2ION2 $@**GENS.D*X2GEN2 LIST ;----------------------------------------------------------------------- ; ; END OF ISHRTC SUBMODULE ; ;----------------------------------------------------------------------- END