DataMuseum.dk

Presents historical artifacts from the history of:

CR80 Hard and Floppy Disks

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CR80 Hard and Floppy Disks

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦d9873631b⟧ TextFile

    Length: 4138 (0x102a)
    Types: TextFile
    Names: »INTERPRETCOM.S«

Derivation

└─⟦17728abc9⟧ Bits:30005143 8" CR80 Floppy CR80FD_0130 ( CR/D/1422 FLERCPU Source )
    └─⟦1815caf3d⟧ 
        └─ ⟦this⟧ »INTERPRETCOM.S« 

TextFile

PROCEDURE INTERPRETCOM (R6);
"*************************************************************************
"*************************************************************************

"******************************************************************
"
"    THIS PROCEDURE INTERPRETS COMMANDS TAKEN FROM DP61
"
"     I ********************************************************
"     I WORD            FIELD               MEANING
"     I ********************************************************
"     I
"     I 0               STATUS CPU#0        0:NON EXISTENT
"     I 1               STATUS CPU#1        1:IDLING
"     I                                     2:TEST 1 SLAVE
"     I                                     3:TEST 1 MASTER
"     I                                     4:TEST 2 SLAVE
"     I                                     5:TEST 2 MASTER
"     I                                     6:TEST 3 SLAVE
"     I                                     7:TEST 3 MASTER
"     I                                    10: MASTER
"     I 2               STATUS CPU#2
"     I 3               STATUS CPU#3
"     I 4               STATUS CPU#4
"     I
"     I
"     I F               COMMAND STROBE      0: NO VALID COMMAND
"     I                                     <>0: VALID COMMAND
"     I
"     I #10             COMMAND CPU#0       0: NO COMMAND
"     I #11             COMMAND CPU#1       1: IDLE!
"     I #12             COMMAND CPU#2       10: TAKE MASTERSHIP
"     I                                     2:TEST 1 SLAVE
"     I                                     3:TEST 1 MASTER
"     I #13             COMMAND CPU#3       4:TEST 2 SLAVE
"     I #14             COMMAND CPU#4       5:TEST 2 MASTER
"     I
"     I
"     I #20             MESSAGE FROM CPU#0 (TO MASTER)
"     I #21             MESSAGE FROM CPU#1
"     I #22             MESSAGE FROM CPU#2
"     I #23             MESSAGE FROM CPU#3
"     I #24             MESSAGE FROM CPU#4
"     I
"     I
"     I #2F             START!                  0:WAIT
"     I                                         <>0: START
"     I                                     (SLAVES MUST NOT START ACTION
"     I                                     TAKEN FROM COMMAND FIELD BEFORE
"     I                                     START <> 0 IE SYNCRONIZATION.
"     I
"     I
"     I
"     I #30             CONSOLE SEMAPHOR        0:CONSOLE NOT OCCUPIED
"     I                                         1:CONSOLE OCCUPIED
"     I
"     I #31             SEM                     USED IN TEST 1:
"     I                                          1: GOAHEAD SLAVE!
"     I                                          0: GOAHEAD MASTER!
"     I
"     I #32             SLAVE COUNT (SLC)       USED IN TEST 1
"     I
"     I #33             MASTER COUNT (MAC)      USED IN TEST 1
"     I                                         1:CONSOLE OCCUPIED
"     I ********************************************************
"
"
"******************************************************************



BEGIN

     WHILE R0=R0 DO
         BEGIN
             CAD;
             SVS(R0);
             R0 SHIFTRL 8;
             R0 EXTRACT 3;               "R0:=CPU NUMBER
             #F40F=>R7;
             #0000=>R5;
             R7@INTEGER=>R1;
             WHILE R1=0 DO           "WAIT UNTIL COMMAND STROBE <> 0
                  BEGIN
                     R7@INTEGER=>R1;
                  END;

             #F410=>R7;       "READ COMMAND =>R1
             R0+R7=>R7;
             R7@INTEGER=>R1;
             CASE R1 OF
             0:IDLE(R6);
             1:IDLE(R6);
             2:TEST_1_SLAVE(R6);
             3:TEST_1_MASTER(R6);
             4:T_2_SLAVE(R6);
             5:T_2_MASTER(R6);
             6:T_3_SLAVE(R6);
             7:T_3_MASTER(R6);
            #10:BEGIN
                  CLAIM_MASTERSHIP(R6);
                  C_STROBE_ADR=>R7;
                  1=>R1=>R7@INTEGER;
                END;
             OTHERWISE IDLE(R6);

             CAE;
             #0200=>R1;
             0=>R0;
             WHILE R0<>R1 DO R0+1;     "WAIT

         END;




         "FROM THIS PROCEDURE, NOONE EXITS
END;