Annotation of cci/d/entry/mon.s, revision 1.1.1.1

1.1       root        1:        .globl  _monitor
                      2: #
                      3: #      For looping
                      4: #
                      5:        .globl _forever
                      6:        .globl  _force_lp
                      7: #
                      8: #      For messages
                      9: #
                     10:        .globl _display
                     11:        .globl _heading
                     12:        .globl _op_mode         /* 1 : Tahoe, 0 : CP */
                     13: #
                     14: #      Counters
                     15: #
                     16:        .globl _cycle
                     17:        .globl _prog_cnt
                     18:        .globl _test_cnt
                     19:        .globl  _test_no
                     20: #
                     21: #      Little monitor for instruction tests
                     22: #
                     23:        .text
                     24: _monitor:
                     25:        movl    r0,_test_no             /* Default to 0; runs all tests */
                     26:        movl    r2,_cycle
                     27:        clrl    _prog_cnt
                     28: 
                     29:        andl3   $1,r1,_op_mode          /* Who handle error messages */
                     30:        andl3   $2,r1,_forever          /* Loop forever once got an error */
                     31:        clrl    _force_lp               /* Before exit each subtest, if this */
                     32:        clrl    _scoplp
                     33: 
                     34:        andl3   $4,r1,_display
                     35:        andl3   $8,r1,_heading
                     36:        movl    $0x80000,sp             /* set stack */
                     37:        callf   $4,_lp_init             /* Init vars. for looping */
                     38:                                        /* clear run flags back to zero */
                     39:        clrl    r2              /* may have been set by previous runs */
                     40: 2:     shal    $1,r2,r0
                     41:        movl    $0x00,_test_tbl[r0]     /* clear run flags  */
                     42:        aoblss  $notests,r2,2b
                     43: 
                     44:        movl    _test_no,r0
                     45:        bleq    1f                      /* Invalid test no; runs all tests */
                     46:        cmpl    $notests,r0
                     47:        blss    1f
                     48: 
                     49:        decl    r0                      /* subtract 1 from entered test no. */
                     50:        movl    r0,_test_no             /* save corected test number */
                     51:        shal    $1,r0,r0
                     52:        movl    $0x10000,_test_tbl[r0]  /* Set flag to run */
                     53: nolp:  brw     start
                     54: #
                     55: #      Runs all tests
                     56: #
                     57: 1:
                     58:        clrl    r2      
                     59: 2:     shal    $1,r2,r0
                     60:        movl    $0x10000,_test_tbl[r0]  /* Set run flag  */
                     61:        aoblss  $notests,r2,2b
                     62:        clrl    _test_no
                     63: #
                     64: #
                     65: #
                     66:        .globl  start
                     67: start:
                     68:        movl    _test_no,r0
                     69: loop:  movl    tst_tbl[r0],r1          /* get address of test routine */
                     70:        cmpl    r1,$0                   /* No more ? */
                     71:        jeql    end
                     72:        movl    $0x80000,sp             # reset stack, in case changed by test
                     73:        movl    $0x80000,fp             # and frame
                     74: 
                     75:        shal    $1,_test_no,r0
                     76:        movl    _test_tbl[r0],r0        # Get test flags 
                     77:        andl3   $1,r0,r2                # Is loop flag set ? 
                     78:        bneq    j_tst
                     79: 1:
                     80:        incl    _test_no
                     81: 
                     82: j_tst:
                     83:        andl3   $0x10000,r0,r2          # Is run flag set ? 
                     84:        bneq    1f
                     85:        jmp     start
                     86: 1:
                     87:        movl    r1,soap
                     88:        callf   $4,_pr_hd
                     89:        movl    soap,r1
                     90:        jmp     (r1)                    /* jump register deferred */
                     91: end:
                     92:        cmpl    $0xffffffff,_cycle      /* Loop forever if cycle = -1 */
                     93:        jeql    skp
                     94:        incl    _prog_cnt
                     95:        cmpl    _prog_cnt,_cycle
                     96:        bgeq    1f
                     97: skp:
                     98:        clrl    _test_no
                     99:        brw     start
                    100: 1:
                    101:        movl    $0xcafebabe,r0          /* R0 == cafe babe ; end of test */
                    102:        halt
                    103: #
                    104: #
                    105:        .globl  tfail
                    106: tfail: callf   $4,_M_error
                    107:        jmp     start
                    108: errhlt: halt
                    109: #
                    110: #
                    111: filler:
                    112:        .align  2
                    113: soap:  .long   0
                    114:        .globl  return
                    115: return:
                    116:        .long   start           /* return address if test passed */
                    117:        .globl  badrtn
                    118: badrtn:
                    119:        .long   tfail           /* return address if test failed */
                    120: #
                    121: 

unix.superglobalmegacorp.com

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