Annotation of cci/d/mem/test2.c, revision 1.1

1.1     ! root        1: /* 
        !             2:        This is test  Unique address Test
        !             3: */
        !             4: #include "definitions"
        !             5: 
        !             6: extern long    maxmem,endprog;
        !             7: extern struct OPTIONS OPTIONS;
        !             8: 
        !             9: stest2()
        !            10: {      register long *mcr = (long *)0xffffb000;
        !            11: 
        !            12: if(OPTIONS.header)
        !            13:        writes("\n** Subtest2 : Unique address.");
        !            14:        writes("\nECC off");
        !            15:        *mcr = 0;
        !            16:        subtest2();
        !            17:        writes("\nECC on");
        !            18:        *mcr = 3;
        !            19:        subtest2();
        !            20:        *mcr = 0;
        !            21: }
        !            22: 
        !            23: subtest2()
        !            24: {
        !            25: 
        !            26:   register long *curadd, pattern;
        !            27: 
        !            28: 
        !            29:         for( curadd = (long *)endprog; curadd <= (long *)maxmem ; curadd++)
        !            30:                {
        !            31:                  pattern = (long)curadd;
        !            32:                  *curadd = pattern;
        !            33:                }
        !            34:         for( curadd = (long *)endprog; curadd <= (long *)maxmem ; curadd++)
        !            35:                {
        !            36: error1:                  pattern = (long)curadd;
        !            37:                  if(*curadd != pattern)
        !            38:                        if(error(curadd,pattern)) goto error1;
        !            39:                }
        !            40: 
        !            41:        /* Compl of address */
        !            42:         for( curadd = (long *)endprog; curadd <= (long *)maxmem ; curadd++)
        !            43:                {
        !            44:                  pattern = (long)curadd;
        !            45:                  *curadd = ~pattern;
        !            46:                }
        !            47:         for( curadd = (long *)endprog; curadd <= (long *)maxmem ; curadd++)
        !            48:                {
        !            49: error2:                  pattern = (long)curadd; 
        !            50:                  if(*curadd != (~pattern) ) 
        !            51:                        if(error(curadd,~pattern)) goto error2;
        !            52:                }
        !            53: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.