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

⟦6ca710e07⟧ TextFile

    Length: 1716 (0x6b4)
    Types: TextFile
    Names: »CONINPUT.S«

Derivation

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

TextFile

PROCEDURE CONINPUT (R6);
"*************************************************************************
"*************************************************************************

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

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

      "START OF INPUT FROM CONSOLE"

     WHILE R0=R0 DO
     BEGIN "1"


         OUTTEXT(ADDRESS('MENU:  WAKEUP ALL       WAKEUP <cpu number>       QUIT (:0:)')=>R3,R6);
         OUTNEWLINE(R6);
         FLUSHOUT(R6);
         OUTTEXT(ADDRESS('______________________________________________________ (:0:)')=>R3,R6);
         OUTNEWLINE(R6);
         FLUSHOUT(R6);
          OUTTEXT(ADDRESS('-->(: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 INITIAL CMI

     #0=>R4;
     'W'=>R1;
     INPUTSTRING[R4]=>R2;
     IF R2=R1 THEN
         BEGIN
             WAKEUP(R6);
         END
     ELSE
         BEGIN
             'Q'=>R1;
             IF R2=R1 THEN
                 BEGIN
                     QUIT(R6);
                 END
             ELSE
                 BEGIN
                     INPUTJUNK(R6);
                 END;
         END;


     END; "1"

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