.TITLE TCRANDOM - Random DECtape exercisor .LIST MEB SEED: .BLKL 2 CHAN: .BLKL 1 IOSB: .BLKW 4 DEV: .ASCID 'TAPE:' BUFFER: .BLKB 512*32 ERRMSG: .ASCID 'Error on blocks !UL-!UL, count = !UW' DESCR: .LONG 80 .ADDRESS BUFFER START: .WORD 0 $ASSIGN_S CHAN=CHAN,DEVNAM=DEV ; assign channel to unit BLBS R0,10$ BRW 100$ 10$: $GETTIM_S TIMADR=SEED ; random seed = time CLRL SEED+4 EDIV #577,SEED,R0,R2 $GETTIM_S TIMADR=SEED ; random seed = time CLRL SEED+4 EDIV #31,SEED,R0,R3 INCL R3 MULL #512,R3 $QIOW_S CHAN=CHAN,- FUNC=#IO$_READLBLK,- IOSB=IOSB,- P1 =BUFFER,- P2 =R3,- P3 =R2 BLBS IOSB,10$ DECL R3 DIVL #512,R3 ADDL R2,R3 MOVL #80,DESCR $FAO_S ERRMSG,DESCR,DESCR,R2,R3,IOSB+2 PUSHAB DESCR CALLS #1,G^LIB$PUT_OUTPUT BICL3 #^XFFFF0007,IOSB,-(SP) CALLS #1,G^LIB$SIGNAL BRW 10$ 100$: RET .END START