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

⟦8cc965381⟧ TextFile

    Length: 2790 (0xae6)
    Types: TextFile
    Names: »TEST_3.S«

Derivation

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

TextFile

PROCEDURE TEST_3 (R6);
"*********************************************************************
" THE PROCEDURE REQUESTS INPUT FROM CONSOLE: SLAVENUMBER, CHECKS
" IF THE REQUESTED SLAVE IS IDLING, PREPARES COMMANDFIELD, SETS COMMAND-
" STROBE AND EXITS
"
"*********************************************************************
VAR
SAVE:    ARRAY[0..7] OF INTEGER;


LOG_PAGE1:     INTEGER;
LOCAL_COUNT:   INTEGER;


LABEL STARTA;



BEGIN
      R7=>SAVE[7];
      STC(6,ADDRESS(SAVE[7])=>R7);
      C_STROBE_ADR=>R7;
      0=>R1=>R7@INTEGER;                       "CLEAR COMMANDSTROBE

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

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





      "START OF INPUT FROM CONSOLE"

STARTA:

         OUTTEXT(ADDRESS('SLAVE NUMBER PLEASE --> (:0:)')=>R3,R6);

         FLUSHOUT(R6);
          #0=>R0;
          R0=>INPUT_POINTER;
          WHILE R3<>#D DO
          BEGIN
               IN_BYTE(R3,R6);
              R3=>R7;
               R7=>INPUTSTRING[R0];
               R7=>INPUT_LAST;
              R0+1;
          END;


          0=>R0;
          R0=>INPUT_POINTER;
          "AT THIS POINT, THE ARRAY >INPUTSTRING< CONTAINS VALID CHARACTERS,
          "THE LAST VALID CHARACTER DESIGNATED BY INPUT_LAST.
          "INPUT_POINTER POINTS AT THE FIRST BYTE.

     "START OF CMI

     0=>R4;
     INPUTSTRING[R4]=>R2;
     R2 EXTRACT 3;
     R2=>SLAVE_NUMBER;
     CASE R2 OF
     0:CHECK_IDLE(R6);
     1:CHECK_IDLE(R6);
     2:CHECK_IDLE(R6);
     3:CHECK_IDLE(R6);
     4:CHECK_IDLE(R6);
     OTHERWISE
         BEGIN
             OUTNEWLINE(R6);
             OUTTEXT(ADDRESS('?????(:0:)')=>R3,R6);
             OUTNEWLINE(R6);
             FLUSHOUT(R6);
             0=>R4=>EXIT_STATUS;
             1=>R4=>OK;
         END;

     OK=>R4;
     IF R4=1 THEN GOTO STARTA;


     SVS(R3);                                          "GENERATE COMMAND-
     R3 SHIFTRL 8;                                     "FIELD
     R3 EXTRACT 3;

     0=>R0;
     5=>R1;
     COMMAND_BASE=>R7;
     SLAVE_NUMBER=>R2;
     WHILE R0<>R1 DO
         BEGIN
             IF R0=R2 THEN
                 BEGIN
                     6=>R6;
                 END
             ELSE
                 BEGIN
                     IF R0=R3 THEN
                         BEGIN
                             7=>R6;
                         END
                     ELSE
                         BEGIN
                             1=>R6;
                         END;
                 END;
             R6=>R7@INTEGER;
             R7+1;
             R0+1;
         END;

     C_STROBE_ADR=>R7;
     1=>R0=>R7@INTEGER;
     1=>R0=>EXIT_STATUS;


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