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

⟦6b6745351⟧ TextFile

    Length: 1666 (0x682)
    Types: TextFile
    Names: »SWITCH_CPU.S«

Derivation

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

TextFile

PROCEDURE SWITCH_CPU (R3;R6);
"*************************************************************************
"*************************************************************************

VAR
SAVE:     ARRAY[0..7] OF INTEGER;
TEMPB:    INTEGER;


LABEL OUTT;

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

     R3=>TEMPB;
     R3=>SLAVE_NUMBER;
     1=>R0=>EXIT_STATUS;
     CHECK_IDLE(R6);             "IT IS CHECKED IF CPU NUMBER <SLAVE_NUMBER>
                                 "IS IDLING. IF SO R4:=0, ELSE R4:=1
     IF R4=1 THEN
         BEGIN
             OUTNEWLINE(R6);
             OUTTEXT(ADDRESS('NEW MASTER IS NOT IDLING (:0:)')=>R3,R6);
             OUTNEWLINE(R6);
             FLUSHOUT(R6);
             0=>R4=>EXIT_STATUS;     "RETURN TO CONSOLE-INPUT-PART OF
                                     "CONINPUT1
             GOTO OUTT;
         END;


      C_STROBE_ADR=>R7;
      0=>R1=>R7@INTEGER;         "CLEAR COMMANDSTROBE

      #FFF0=>R0;                 "WAIT UNTIL ALL CPUs ARE CAUGHT IN
                                 "TESTING COMMANDSTROBE
      WHILE R0<>R1 DO R1+1;

      TEMPB=>R3;
      COMMAND_BASE=>R7;          "GENERATE COMMENDFIELD.
      0=>R0;
      5=>R1;
      WHILE R0<>R1 DO
         BEGIN
            IF R0=R3 THEN
                  BEGIN
                     #10=>R6;
                  END
            ELSE
                  BEGIN
                     1=>R6;
                  END;
            R6=>R7@INTEGER;
            R7+1;
            R0+1;
         END;


OUTT:


     C_STROBE_ADR=>R7;
     1=>R0=>R7@INTEGER;                       "SET COMMANDSTROBE


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