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

⟦70cd477e9⟧ TextFile

    Length: 4424 (0x1148)
    Types: TextFile
    Names: »TEST_4.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⟧ »TEST_4.S« 

TextFile


PROCEDURE TEST_4 (R6);
"*********************************************************************

"    description:
"    this program tests the byte-write mechanism of the cpu/cache.
"
"    Algorithm:     - clear the page to be used.
"                   - read the page, and check that it is cleared.
"                     (the cache is loaded)
"                   - write a pattern in the lower bytes of the page.
"                     (whereby the cache-memory should be updated
"                      accordingly).
"                   - read the page, and check that the pattern is correct.
"                   - write a pattern in the upper bytes of the page.
"                     (whereby the cache should be updated accordingly).
"                   - read the page, and check that the pattern is correct.
"
"    This sequence is carried out in the logical pages #1d to 7.
"
"
"    The above test is carried out the number of times designated by
"    COUNT.
"
"

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


LOG_PAGE1:     INTEGER;
LOCAL_COUNT:   INTEGER;


BEGIN
R7=>SAVE[7];
STC(6,ADDRESS(SAVE[7])=>R7);
OUTNEWLINE(R6);
OUTTEXT(ADDRESS('BYTE-WRITE-TEST STARTED(:0:)')=>R3,R6);
OUTNEWLINE(R6);
FLUSHOUT(R6);

INIT_DTTS(R6);

COUNT=>R0;
R0=>LOCAL_COUNT;
WHILE R0<>0 DO
   BEGIN   "1
    #1D=>R1=>LOG_PAGE1;            "FOR LOGPAGES 1D TO 2 DO
    WHILE R1<>6 DO
      BEGIN "2

       #0=>R2;
       WHILE R2<#400 DO
         BEGIN "3                   WRITE ZEROS   IN LOGPAGE R1
         R1=>R3 SHIFTLL #A;        "
          R3+R2;
          0=>R4=>R3@INTEGER;
          R2+1;                    "
         END; "3                   "



         #0=>R2;
         WHILE R2<#400 DO          "READ PATTERN IN LOGPAGE R1
          BEGIN "3                 "
          R1=>R3 SHIFTLL #A;       "
          R3+R2;
          R3@INTEGER=>R5;
           IF R5<>0  THEN               "FAULTY DATA READ
            BEGIN "4
               0=>R3=>EXPECT_DATA;
               R5=>ACTUAL_DATA;
               R3=>FAULT_ADDRESS;
               ERROR_MESSAGE(R6);
            END;  "4
           R2+1;
          END; "3


     LOG_PAGE1=>R1;
       #0=>R2;
       WHILE R2<#400 DO
         BEGIN "3                   WRITE PATTERN IN LOGPAGE R1
         R1=>R6=>R6 SHIFTLL #A=>R6;    " IN LOWER BYTES
          R6+R2;
          R6 SHIFTLL 1=>R6;
          R2=>R0 EXTRACT 8=>R0;
          #8090;                 "  R0=>R6@BYTE
          R2+1;                    "
         END; "3                   "



                                   "CHECK LOWER-BYTE-PATTERN IN LOGPAGE
                                   "R1
     LOG_PAGE1=>R1;
     0=>R2;
     WHILE R2<#400 DO
          BEGIN "3
          R1=>R6 SHIFTLL #A=>R6;
          R6+R2;                   "R6:= R6+R2
          R6@INTEGER=>R3=>ACTUAL_DATA;
          R6=>FAULT_ADDRESS;
          R2=>R6 EXTRACT 8=>R6=>EXPECT_DATA;
          CHECK_ERROR(R6);
          R2+1;
          END; "3



       #0=>R2;
       WHILE R2<#400 DO
         BEGIN "3                   WRITE PATTERN IN LOGPAGE R1
         R1=>R6 SHIFTLL #A;        " IN UPPER BYTES
          R6+R2;
          R6 SHIFTLL 1;
          R6+1;
          R2=>R0 EXTRACT 8=>R0;
          #FF=>R5;
          R5-R0=>R0;
          #8090;                 "  R0=>R6@BYTE
          R2+1;                    "
         END; "3                   "




     LOG_PAGE1=>R1;
     #0=>R2;
     WHILE R2<#400 DO         "READ AND CHECK PATTERN.
          BEGIN
          R1=>R3 SHIFTLL #A;
          R3+R2;
          R3@INTEGER=>R4;
          R3=>FAULT_ADDRESS;
          R4=>ACTUAL_DATA;
          R2=>R3 EXTRACT 8=>R4;
          #FF=>R5;
          R5-R4=>R5 SHIFTLL 8;
          R5+R4=>R5=>EXPECT_DATA;
          CHECK_ERROR(R6);
          R2+1;
          END;

      TEST_CERS(R6);
      OUT_ENABLE=>R6;
      IF R6=1 THEN
      BEGIN
      OUTTEXT(ADDRESS('4(:0:)')=>R3,R6);
      FLUSHOUT(R6);
      END;
      LOG_PAGE1=>R1-1=>LOG_PAGE1;  "NEXT LOGPAGE
      END; "2



    IF (OUT_ENABLE=>R0)=1 THEN
        BEGIN
        OUTNEWLINE(R6);
        FLUSHOUT(R6);
        END;
   LOCAL_COUNT=>R0-1=>LOCAL_COUNT;
   END; "1



    IF (OUT_ENABLE=>R0)=1 THEN
        BEGIN
        OUTTEXT(ADDRESS('BYTE-WRITE-TEST TERMINATED (:0:)')=>R3,R6);
        OUTNEWLINE(R6);
        FLUSHOUT(R6);
        END;

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