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

⟦1db42a18c⟧ TextFile

    Length: 3714 (0xe82)
    Types: TextFile
    Names: »TEST_1_MASTER.S«, »TEST_2_MASTER.S«

Derivation

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

TextFile

PROCEDURE TEST_1_MASTER (R6);

"*************************************************************************
"    TEST_1_MASTER RUNS ON THE MASTER-CPU, WHILE TEST_1_SLAVE RUNS ON SLAVE
"    CPU. TEST_1 IS A HANDSHAKE-TEST BETWEEN CPUs: EACH OF THE CPUs WAITS
"    UNTIL THE COMMON SEMAPHORE HAS THE VALUE SIGNALLING, THAT THE OTHER
"    CPU HAS FINISHED. THE SLAVE INCREMENTS SLAVE_COUNT AT EACH ROUND,
"    THE MASTER INCREMENTS THE MASTER-COUNT , CHECKS THE SLAVECOUNT, AND
"    CONTROLS THE NUMBER OF RUNS.
"
"*************************************************************************
VAR
SAVE:     ARRAY[0..7] OF INTEGER;
THIS_CPU:    INTEGER;
LOCCOUNT:    INTEGER;


LABEL STARTA;
LABEL OUT1;




BEGIN
     R7=>SAVE[7];
     STC(6,ADDRESS(SAVE[7])=>R7);

     0=>R0=>ERROR_COUNT;


     #FFFF=>R0;
     0=>R1;
     WHILE R1<>R0 DO R1+1;

     C_STROBE_ADR=>R7;                             "CLEAR COMMAND STROBE
     0=>R1=>R7@INTEGER;

     SEM_ADR=>R7;                                  "SET SEM
     1=>R1=>R7@INTEGER;

     SLC_ADR=>R7;                                  "SLAVECOUNT:=0
     0=>R1=>R7@INTEGER;

     MAC_ADR=>R7;                                  "MASTERCOUNT:=0
     0=>R1=>R7@INTEGER;

     COUNT=>R1=>LOCCOUNT;


     START_ADR=>R7;                                  "START:=1
     1=>R1=>R7@INTEGER;

STARTA:
     SEM_ADR=>R7;
     WHILE R1=1 DO R7@INTEGER=>R1;                 "WAIT UNTIL SEM=0


     MAC_ADR=>R7;
     R7@INTEGER=>R1+1=>R7@INTEGER=>R1;
     SLC_ADR=>R6;
     R6@INTEGER=>R0;

     IF R0<>R1 THEN
         BEGIN
         REPORTLEVEL=>R7;
         IF R7=1 THEN
             BEGIN
             OUTTEXT(ADDRESS('>>>>>> ERROR: MASTER-COUNT= (:0:)')=>R3,R6);
             R1=>R3;
             OUTHEX(R3,R6);
             OUTTEXT(ADDRESS('    ,   SLAVE-COUNT= (:0:)')=>R3,R6);
             R0=>R3;
             OUTHEX(R3,R6);
             OUTNEWLINE(R6);
             FLUSHOUT(R6);
             END
         ELSE
             BEGIN
             ERROR_COUNT=>R7+1=>ERROR_COUNT;
             END;

         END;


     MAC_ADR=>R7;
     R7@INTEGER=>R1;
     #0100=>R7;
     IF R1=R7 THEN
         BEGIN
             LOCCOUNT=>R7-1=>LOCCOUNT;
             MAC_ADR=>R7;
             0=>R1=>R7@INTEGER;
             SLC_ADR=>R7;
             R1=>R7@INTEGER;
             ERROR_COUNT=>R7;
             IF R7<>0 THEN
                 BEGIN
                 OUTTEXT(ADDRESS('>>>> NUMBER OF ERRORS= (:0:)')=>R3,R6);
                 R7=>R3;
                 OUTHEX(R3,R6);
                 OUTNEWLINE(R6);
                 FLUSHOUT(R6);
                 0=>R7=>ERROR_COUNT;
                 END
             ELSE
                 BEGIN
                 OUTTEXT(ADDRESS('*(:0:)')=>R3,R6);
                 FLUSHOUT(R6);
                 END;
         END;

     LOCCOUNT=>R1;
     IF R1=0 THEN
         BEGIN
             OUTNEWLINE(R6);
             OUTTEXT(ADDRESS('TEST 1 TERMINATED (:0:)')=>R3,R6);
             OUTNEWLINE(R6);
             FLUSHOUT(R6);
             SVS(R0);
             R0 SHIFTRL 8;
             R0 EXTRACT 3=>THIS_CPU;

             THIS_CPU=>R3;
             COMMAND_BASE=>R7;
             0=>R1;
             5=>R2;
             WHILE R1<>R2 DO
                 BEGIN
                     IF R1=R3 THEN #10=>R6 ELSE 1=>R6;
                     R6=>R7@INTEGER;
                     R1+1;
                     R7+1;
                 END;
             START_ADR=>R7;
             0=>R1=>R7@INTEGER;
             C_STROBE_ADR=>R7;                 "SET COMMANDSTROBE
             1=>R1=>R7@INTEGER;
             GOTO OUT1;
         END;
     SEM_ADR=>R7;
     1=>R1=>R7@INTEGER;
     GOTO STARTA;

OUT1:








     UNS(7,ADDRESS(SAVE[0])=>R7);
     EXIT(R6);
END;
 «a5»