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

⟦77383bbce⟧ TextFile

    Length: 2160 (0x870)
    Types: TextFile
    Names: »KONTROL_LOAD.S«

Derivation

└─⟦18a2fd90d⟧ Bits:30005144 8" CR80 Floppy CR80FD_0132 ( CR/D/2479 CRD2479: En-CPU CPU/CACHE TEST- PROGRAMMER node: master: CRP5 )
    └─⟦56889de57⟧ 
        └─ ⟦this⟧ »KONTROL_LOAD.S« 

TextFile

PROCEDURE KONTROL_LOAD (R6);
"*********************************************************************
"THE PROCEDURE LOADS THE GLOBAL VARIABLE >KONTROL<,WITH THE FIRST FOUR
"HEX CHARACTERS AFTER THE SPACE IN INPUTSTRING.
"*********************************************************************
VAR

SAVE:    ARRAY[0..7] OF INTEGER;
NUMBER:  ARRAY[0..3] OF INTEGER;


LABEL NO_SPACE;

BEGIN

R7=>SAVE[7];
STC(6,ADDRESS(SAVE[7])=>R7);
"FIND SPACE IN INPUTSTRING, INPUT_POINTER WILL POINT AT SPACE+1"
"EXIT IF INPUTPOINTER>HEX E.

#0=>R4;
#20=>R1;
R4=>INPUT_POINTER;
      INPUTSTRING[R4]=>R0;
      WHILE R0<>R1 DO
         BEGIN
          R4+1;
          INPUTSTRING[R4]=>R0;
          INPUT_POINTER=>R5;
          R5+1;
          R5=>INPUT_POINTER;
            IF R4>=#F THEN
                  BEGIN
                  GOTO NO_SPACE;
                  END;
         END;

NO_SPACE:
R5+1;
R5=>INPUT_POINTER;

INPUT_POINTER=>R4;
#0=>R5;
WHILE R5<4 DO
   BEGIN
    INPUTSTRING[R4]=>R6;
    R6=>NUMBER[R5];
    R5+1;
    R4+1;
   END;


    0=>R5;                   "CONVERT FROM ASCII TO HEX
    WHILE R5<4 DO
        BEGIN
        NUMBER[R5]=>R6;
        CASE R6 OF
        #30: 0=>R6=>NUMBER[R5];
        #31: 1=>R6=>NUMBER[R5];
        #32: 2=>R6=>NUMBER[R5];
        #33: 3=>R6=>NUMBER[R5];
        #34: 4=>R6=>NUMBER[R5];
        #35: 5=>R6=>NUMBER[R5];
        #36: 6=>R6=>NUMBER[R5];
        #37: 7=>R6=>NUMBER[R5];
        #38: 8=>R6=>NUMBER[R5];
        #39: 9=>R6=>NUMBER[R5];
        #41: #A=>R6=>NUMBER[R5];
        #42: #B=>R6=>NUMBER[R5];
        #43: #C=>R6=>NUMBER[R5];
        #44: #D=>R6=>NUMBER[R5];
        #45: #E=>R6=>NUMBER[R5];
        #46: #F=>R6=>NUMBER[R5];
        OTHERWISE 0=>R6=>NUMBER[R5];

        R5+1;
        END;



NUMBER[0]=>R5;
R5 SHIFTLL #C;
R5=>NUMBER[0];
NUMBER[1]=>R5;
R5 SHIFTLL #8;
R5=>NUMBER[1];
NUMBER[2]=>R5;
R5 SHIFTLL 4;
R5=>NUMBER[2];
#0=>R5;
#0=>R6;
WHILE R5<4 DO
   BEGIN
      NUMBER[R5]=>R0;
      R6+R0;
      R5+1;
   END;
R6=>KONTROL;

OUTTEXT(ADDRESS('KONTROL:=  (:0:)')=>R3,R6);
KONTROL=>R3;
OUTHEX(R3,R6);
OUTNEWLINE(R6);
FLUSHOUT(R6);

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