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

⟦55b8ad1c7⟧ TextFile

    Length: 2058 (0x80a)
    Types: TextFile
    Names: »WAKEUP_ALL.S«

Derivation

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

TextFile

PROCEDURE WAKEUP_ALL (R6);
"*************************************************************************
"*************************************************************************

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

BEGIN
     R7=>SAVE[7];
     STC(6,ADDRESS(SAVE[7])=>R7);
     OUTTEXT(ADDRESS('WAKEUP ALL CPUs (:0:)')=>R3,R6);
     OUTNEWLINE(R6);
     FLUSHOUT(R6);



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

      START_ADR=>R7;
      0=>R0=>R7@INTEGER;         "CLEAR START


      COMMAND_BASE=>R7;           "SETUP COMMANDS:  CPU#0 :#10,
      R7+1;                      "CPUs 1->4 :  1  (=IDLE!)
      0=>R0;
      #5=>R1;
      WHILE R0<>R1 DO
         BEGIN
            #1=>R3=>R7@INTEGER;
            R0+1;
            R7+1;
         END;
      COMMAND_BASE=>R7;
      #10=>R0=>R7@INTEGER;

      START_ADR=>R7;
      #1=>R0=>R7@INTEGER;        "SET  START

      C_STROBE_ADR=>R7;
      1=>R0=>R7@INTEGER;         "SET COMMAND STROBE


      1=>R0;
      5=>R1;
      WHILE R0<>R1 DO            "INTERRUPT CPUs 1->4
         BEGIN
            R0=>R3;
            ENABLE_INT(R3,R6);
            0=>R4;
            CPU(R4);
            DISABLE_INT(R3,R6);
            R0+1;
         END;



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

      STATUS_BASE=>R7;
      R7+1;
      1=>R1;
      5=>R2;
      WHILE R1<>R2 DO
         BEGIN
            R7@INTEGER=>R3;
            IF R3<>0 THEN
               BEGIN
                  UNIT_MAP(R6);
                  INTERPRETCOM(R6);    "(NO EXIT EVER FROM INTERPRETCOM)
               END;
            R1+1;
            R7+1;
         END;

      "AT THIS POINT, NO CPUs EXCEPT MASTER HAS BEEN AWAKENED



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

      START_ADR=>R7;
      0=>R1=>R7@INTEGER;            "CLEAR START

      OUTNEWLINE(R6);
     OUTTEXT(ADDRESS('NO CPUs AWAKENED (:0:)')=>R3,R6);
     OUTNEWLINE(R6);
     FLUSHOUT(R6);
     UNS(7,ADDRESS(SAVE[0])=>R7);
     EXIT(R6);
END;
 «a5»