



		    acv_restart.alm                 10/22/84  1117.2r w 10/22/84  1101.1        9801



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	acv_restart
	entry	acv_restart

acv_restart:
	push
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	mlr	(),(pr)
	desc9a	0,0
	desc9a	bp|0,1
	return
	end
   



		    acv_restart_csl.alm             10/22/84  1117.2r w 10/22/84  1101.1       10062



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	acv_restart_csl
	entry	acv_restart_csl

acv_restart_csl:
	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	eax0	10
	csl	(rl),(pr,rl)
	descb	foo,x0
	descb	bp|0,x0
	return
foo:	oct	123456701234
	end
  



		    bad_fill.alm                    10/22/84  1117.2r w 10/22/84  1101.1       11718



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	bad_fill
	entry	bad_fill

bad_fill:	push

	eppbb	ap|2,*
	eppbb	bb|0,*		"ptr to test_data1_
	eppbp	ap|4,*
	eppbp	bp|0,*		"ptr to temp seg
	ldq	4097,dl
	mlr	(pr,rl),(pr,rl),fill(777)
	desc9a	bb|0,ql
	desc9a	bp|0,ql

	call 	test_cpu$deactivate_tempseg

	cmpc	(pr,rl),(pr,rl),fill(776)
	desc9a	bb|0,ql
	desc9a	bp|0,ql
	tnz	fault
	return

fault:	oct	0		"ZOP
	return
	end
  



		    ci_mod_case_2.alm               10/22/84  1117.2r w 10/22/84  1101.1       16236



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	ci_mod_case_2
	entry	ci_mod_case_2
	temp	temp

ci_mod_case_2:
	push
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	stz	temp
	lda	tally_a_t
	sta	bp|1024
	lda	tally_b_t
	sta	bp|2048

loop:
	lda	bp|1024,ci
	cmpa	bp|2048,ci
	tnz	no_comp
	nop	bp|1024,sc
	nop	bp|2048,sc
	ttf	2,ic
	return
	aos	temp
	tra	loop

tally_a_t:
	vfd	18/string1,12/1,1/1,5/0
tally_b_t:
	vfd	18/string2,12/1,1/1,5/0
no_comp:
	oct	0

"The following bss is designed to place the label string1 at location 
"6000 octal. It is used instead of an 'org' so that test_cpu could be
"bound while maintaining the proper offsets for those segments that need
"instructions/labels at certain locations.

	bss	,3052
string1:
	acc	"This"

"This bss will place string2 at octal loc 10000.

	bss	,1022
string2:
	acc	"This"

"force fill to end of page, so next test case (tct) starts on page bndry
	bss	,1018

	end




		    cmpb_onc.alm                    10/22/84  1148.5r w 10/22/84  1147.6        4608



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1984 *
" *                                                         *
" ***********************************************************
	entry	cmpb_onc
	org 	673
data:	oct	000000000000
cmpb_onc: 
	push
	eppbp	ap|2,*
	eppbp	bp|0,*	
	ldq	52564,dl
	ldx5	2298,du
	cmpb	(pr,rl,ql),fill(1)
	descb	bp|0,x5
	descb	000(000)
	tnz	data
	return
	end




		    cmpb_with_rotate.pl1            10/22/84  1117.2r w 10/22/84  1101.1       21951



/* ******************************************************
   *                                                    *
   *                                                    *
   * Copyright (c) 1972 by Massachusetts Institute of   *
   * Technology and Honeywell Information Systems, Inc. *
   *                                                    *
   *                                                    *
   ****************************************************** */

/* ******************************************************
   *                                                    *
   *                                                    *
   *    Copyright, (C) Honeywell Information Systems    *
   *    Inc., 1980.                                     *
   *                                                    *
   *                                                    *
   ****************************************************** */

cmpb_with_rotate: proc (testcpu_tempsegp);

dcl  test_pattern char (57) aligned static initial
    ("ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿP"),
     testcpu_tempsegp pointer,
     from_ptr pointer,
     to_ptr pointer,
     len fixed bin (35),
     cmpbtest_alm ext entry (pointer, pointer, fixed bin (35));

dcl  mme1 condition,
     ioa_ ext entry options (variable),
     dump_seg_ ext entry (pointer, pointer, fixed bin, fixed bin, bit (6)),
     iox_$user_output ext pointer,
     hcs_$truncate_seg ext entry (pointer, fixed bin, fixed bin (35));

dcl  based_bits (1000) bit (1) unaligned based,
     based_word fixed bin (35) aligned based;

dcl  i fixed bin,
     lowerbound fixed bin;

dcl  based_pattern bit (510) based unaligned,
     pattern_copy char (57) aligned;

	lowerbound = binary (rel (testcpu_tempsegp)); /* in case it is a uniquenames seg in pdir */
	call hcs_$truncate_seg (testcpu_tempsegp, lowerbound, 0);

	from_ptr = addr (test_pattern);
	to_ptr = testcpu_tempsegp;

	on mme1 begin;
	     call ioa_ ("FAILURE on ^dth trial, at ^p.", i, to_ptr);
	     call dump_seg_ (iox_$user_output, to_ptr, 0, 16, "100001"b);
	     call ioa_ ("");
	     goto pass_test;
	end;

	do i = 1 to 10000;

	     call cmpbtest_alm (from_ptr, to_ptr, 510);
pass_test:
	     to_ptr -> based_word = 0;		/* makes dump easier to read if we clean up this way */
	     to_ptr = addr (to_ptr -> based_bits (7));
	end;

	call hcs_$truncate_seg (testcpu_tempsegp, lowerbound, 0);


     end;
 



		    cmpb_with_sixbit_offset.pl1     10/22/84  1117.2r w 10/22/84  1101.1       23391



/* ******************************************************
   *                                                    *
   *                                                    *
   * Copyright (c) 1972 by Massachusetts Institute of   *
   * Technology and Honeywell Information Systems, Inc. *
   *                                                    *
   *                                                    *
   ****************************************************** */

/* ******************************************************
   *                                                    *
   *                                                    *
   *    Copyright, (C) Honeywell Information Systems    *
   *    Inc., 1980.                                     *
   *                                                    *
   *                                                    *
   ****************************************************** */

cmpb_with_sixbit_offset: proc (testcpu_tempsegp);

dcl  test_pattern char (57) aligned static initial
    ("ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿP"),
     testcpu_tempsegp pointer,
     from_ptr pointer,
     to_ptr pointer,
     len fixed bin (35),
     out_of_bounds condition,
     debug entry,
     cmpbtest_alm ext entry (pointer, pointer, fixed bin (35));

dcl  mme1 condition,
     ioa_ ext entry options (variable),
     dump_seg_ ext entry (pointer, pointer, fixed bin, fixed bin, bit (6)),
     iox_$user_output ext pointer,
     hcs_$truncate_seg ext entry (pointer, fixed bin, fixed bin (35));

dcl  based_bits (1000) bit (1) unaligned based,
     based_word fixed bin (35) aligned based;

dcl  i fixed bin,
     lowerbound fixed bin;

dcl  based_pattern bit (510) based unaligned,
     pattern_copy char (57) aligned;

	lowerbound = binary (rel (testcpu_tempsegp)); /* in case it is a uniquenames seg in pdir */
	call hcs_$truncate_seg (testcpu_tempsegp, lowerbound, 0);

	from_ptr = addr (test_pattern);
	to_ptr = testcpu_tempsegp;
	to_ptr -> based_word = 0;			/* makes dump easier to read if we clean up this way */
	to_ptr = addr (to_ptr -> based_bits (7));

	on mme1 begin;
	     call ioa_ ("FAILURE on ^dth trial, at ^p.", i, to_ptr);
	     call dump_seg_ (iox_$user_output, to_ptr, 0, 16, "100001"b);
	     call ioa_ ("");
	     goto pass_test;
	end;

	on out_of_bounds begin;
	     call ioa_ ("oosb type $all for regs and .q to return");
	     call debug ();
	end;
	do i = 1 to 10000;

	     call cmpbtest_alm (from_ptr, to_ptr, 510);
pass_test:
	end;

	call hcs_$truncate_seg (testcpu_tempsegp, lowerbound, 0);


     end;
 



		    cmpbtest_alm.alm                10/22/84  1117.2r w 10/22/84  1101.1       13167



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	cmpbtest_alm
	entry	cmpbtest_alm

	include	eis_bits

cmpbtest_alm:
	lda	1,dl	"bit offset of source
	ldq	ap|6,*	"length of source in bits
	eax7	0,ql

	epp5	ap|2,*
	epp5	pr5|0,*	"source string
	epp7	ap|4,*
	epp7	pr7|0,*	"target string

	csl	(pr,rl,al),(pr,rl),fill(0),bool(move)
	descb	pr5|-1(35),ql
	descb	pr7|0,x7

	cmpb	(pr,rl),(pr,rl),fill(000)
	descb	pr5|0,ql	"try simpler descriptors
	descb	pr7|0,ql	"idea is to kill csl, not cmpb

	tnz	myzop	"fail
	epbp7	pr6|0
	short_return

myzop:	oct	0
	epbp7	pr6|0
	short_return

	end
 



		    cmpc.alm                        10/22/84  1117.2r w 10/22/84  1101.1       17604



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	cmpc
	entry	cmpc
	temp	loop_cnt

cmpc:
	push
	stz	loop_cnt
again:
	lda	=o20,dl
	ldq	=o400,dl
	cmpc	(rl),(rl),fill(040)
	desc9a	lookup,ql
	desc9a	data,al
	tnz	bad
	aos	loop_cnt
	lda	loop_cnt
	cmpa	=o400000,dl
	tnz	again
	return
bad:
	oct	0		"ZOP
	even
data:
	aci	"objectname      "
	aci	"retain          "
	aci	"indirect        "
	aci	"delete          "
	aci	"no_link         "
	aci	"synonym         "
	aci	"global          "
	aci	"table           "
	aci	"Objectname      "
	aci	"Addname         "
	aci	"Global          "
	aci	"Order           "
	aci	"Force_Order     "
	aci	"No_Old_Alm      "
	aci	"No_Table        "
	even
lookup:
	aci	"objectname      "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	aci	"                "
	end




		    cmpc7.alm                       10/22/84  1117.2r w 10/22/84  1101.1       11691



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	cmpc7
	entry	cmpc7

cmpc7:	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	adwpbp	1017,du
	eppab	CONST
	cmpc	(pr),(pr)
	desc9a	bp|0,32
	desc9a	ab|0,32
	tnz	fail
	return

fail:	oct	0		"ZOP

	org	1017
CONST:	oct	042041173074,076101102103,104105106107,110111112113
	oct	114115116117,120121122123,124125126127,130131132012

"force fill to page bound for next test
	bss	,1020

	end
 



		    cmpc_a.alm                      10/22/84  1148.6r w 10/22/84  1148.1        5841



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1984 *
" *                                                         *
" ***********************************************************
	name	cmpc_a
	entry	cmpc_a

cmpc_a:	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	epp3	bp|4402		(octal 010462)
	eppab	bp|254480		(octal 761020)
	lda	253,dl
	ldq	3921,dl

	stz	pr2|0

cmpc_loop:

	aos	pr2|0
	even
	cmpc	(pr,rl),(pr,rl),fill(040)
	desc9a	pr3|0,al
	desc9a	pr1|0,ql
	tnz	ZOP
	lxl0	pr2|0
	cmpx0	10,du
	tmi	cmpc_loop
	return

ZOP:	oct	0
	end
   



		    cmpc_adj_len.alm                10/22/84  1117.2r w 10/22/84  1101.1       16389



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	cmpc_adj_len
	entry	cmpc_adj_len

cmpc_adj_len:
	push
again:
	eppbp	ap|2,* 		"get ptr to temp seg
	eppbp	bp|0,*
	eppbb	bp|0,*
	adwpbp	1024-11,du	"start 11 wrds befor pg bnd
	adwpbb	2048-11,du	"start 11 wrds befor pg bnd
	lda	=128,dl
	ldq	=120,dl

	mlr	(rl),(pr,rl),fill(040)	"fill string 1 data for cmpc
	desc9a	STRING1,al
	desc9a	bp|0,al

	mlr	(rl),(pr,rl),fill(177)	"fill str2 data for cmpc
	desc9a	STRING1,al		"str2 sb 2 wrds less than str1
	desc9a	bb|0,ql			"strings ^=

	call	test_cpu$deactivate_tempseg  "force pgflt next access

	cmpc	(pr,rl),(pr,rl),fill(040)
	desc9a	bp|0,al
	desc9a	bb|0,al
	tnz	RET			"STRs ^match return
crump:	oct	0			"test failed ZOP it
RET:	return

STRING1:
	aci	"01234567890!$%&'()=~|-^\`{_@[_;:]+*},./<"
	aci	">? qwertyuiopasdfghjkllzxcvbnmQWERTYUIOP"
	aci	"ASDFGHJKLZXCVBNM0123456789.-+!$%&'()=~\|"
	aci	"qwertyuiop@`[{_asdfghjkl;+:*]}zxcvbnm,./"
	end
   



		    cmpc_b.alm                      10/22/84  1148.6rew 10/22/84  1148.4        5814



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1984 *
" *                                                         *
" ***********************************************************
	name	cmpc_b
	entry	cmpc_b

cmpc_b:	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	epp3	bp|4402		(octal 010462)
	eppab	bp|254670		(octal 761316)
	lda	253,dl
	ldq	3921,dl
	stz	pr2|0
cmpc_loop:
	aos	pr2|0
	even
	cmpc	(pr,rl),(pr,rl),fill(040)
	desc9a	pr3|0,al
	desc9a	pr1|0,ql
	tnz	ZOP
	lxl0	pr2|0
	cmpx0	10,du
	tmi	cmpc_loop
	return

ZOP:	oct	0
	end
  



		    cmpc_pgbnd.alm                  10/22/84  1117.2r w 10/22/84  1101.2       11907



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	cmpc_pgbnd
	entry	cmpc_pgbnd

cmpc_pgbnd:	push
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	eppbb	bp|0,*
	adwpbp	1015,du
	adwpbp	2048,du
	mlr	(),(pr),fill(040)
	zero
	desc9a	bp|0,40

	call 	test_cpu$deactivate_tempseg     "do it to the tempseg

	eax6	2
	a9bd	bp|0,x6
	lxl7	38,dl
	cmpc	(pr,rl),(pr),fill(040)
	desc9a	bp|0,x7
	desc9a	bb|0,0
	tnz	fault
	return

fault:	oct	0	"ZOP
	end
 



		    cmpc_zero_ind.alm               10/22/84  1117.2r w 10/22/84  1101.3       16731



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1982 *
" *                                                         *
" ***********************************************************
"
" Modified Nov 1983 by Rich Coppola to add test for another cmpc failure
" which is similar to the one originally covered by this test.
	

	name	cmpc_zero_ind
	entry	cmpc_zero_ind
	tempd	ARG
cmpc_zero_ind:
	push
	ldx3	100,du
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	adwpbp	17401,du
	mlr	(),(pr)
	desc9a	data,32
	desc9a	bp|0,32
	
	eppbb	ap|2,*
	eppbb	bb|0,*
	adwpbb	17073,du

	
loop:
	call 	test_cpu$deactivate_tempseg     "now deactivate it
	eppbp	data
	lda	l1
	ldq	l2
	lrl	36
	sblq	l2
	adlq	2,dl
	scd	(pr,rl,al),(pr)
	desc9a	bb|0,ql
	desc9a	bp|0
	arg	ARG
	ttn	scd_fail
	adla	1,dl
	adla	ARG
	sta	ARG
	ldq	l2

	call 	test_cpu$deactivate_tempseg     "now deactivate it again

	cmpc	(pr,rl,al),(pr,rl)
	desc9a	bb|-1(3),ql
	desc9a	bp|0,ql
	tze	flush_it
zop:	oct	0

flush_it:	call 	test_cpu$deactivate_tempseg     "now deactivate it again

	eax3	-1,3		"decrement loop count
	tnz	loop
				"Now start next test of cmpc
	ldx3	100,du
	eppbb	ap|2,*
	eppbb	bb|0,*
	eppbp	bb|0,*
	eppab	bb|0,*
	adwpbb	4402,du		"oct 10462
	adwpab	254480,du		"oct 761020
	lda	253,dl
	ldq	3921,dl

	mlr	(),(pr,rl),fill(040)
	desc9a	NUM,3
	desc9a	bb|0,al
	
	mlr	(),(pr,rl),fill(040)
	desc9a	NUM,3
	desc9a	ab|0,ql

cmpc_loop:
	call 	test_cpu$deactivate_tempseg     "now deactivate it
	even
	cmpc	(pr,rl),(pr,rl),fill(040)
	desc9a	bb|0,al
	desc9a	ab|0,ql
	tnz	ZOP
	eax3	-1,3			"decrement loop count
	tnz	cmpc_loop
	return

ZOP:	oct	0
scd_fail: mme4

NUM:	oct	061060061000

l1:	oct	000000031142
l2:	oct	000000000040
	even
data:	aci	"FORM_5                          "

	end

 



		    cmpn_tst.alm                    10/22/84  1117.2r w 10/22/84  1101.2       12249



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	cmpn_tst
	entry	cmpn_tst

num:	oct	053061067045
	bss	space,1024
other:	oct	053061070065
	oct	065063066071
	oct	060060060060
	oct	060060060060
	oct	060060060060
	oct	060060060060
	oct	060060060060
	oct	060060060343
cmpn_tst:
	push
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	adwpbp	1024-2,du
	mvn	(),(pr)
	desc9fl	other,32
	desc9fl	bp|0,32
	cmpn	(),(pr)
	desc9fl	num,4
	desc9fl	bp|0,32
	tmoz	ret
	oct	0
ret:	return
	end
   



		    csl_onc.alm                     10/22/84  1117.2r w 10/22/84  1101.2       11151



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	csl_onc
	entry	csl_onc
	temp	bits

csl_onc:	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	adwpbp	1017,du
	eax1	18
	ldq	=01771,dl
	stq	bits

	adwpbp	0,du
	abd	bp|0,1
	epplb	source
	lda	bits
	csl	(pr,rl),(pr,rl),bool(3)
	descb	lb|0,al
	descb	bp|0,ql

	return

	org	512
source:	oct	123456123456,0,123456123456,0

	end
 



		    csl_oob.alm                     10/22/84  1117.2r w 10/22/84  1101.2        9981



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	csl_oob
	entry	csl_oob
 csl_oob:	push
	eppbb	ap|2,*
	eppbb	bb|0,*
	adwpbb	28648,du
	csl	(),(pr),bool(3)
	desc9a	4,0	"4,0 fails ... 5,0 works
	desc9a	bb|0,2048

	return
	end
   



		    csl_pgflt.alm                   10/22/84  1117.2r w 10/22/84  1101.2       10323



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	csl_pgflt
	entry	csl_pgflt
csl_pgflt:
	push
	ldq	73728,dl
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	eppab	source
	csl	(pr,rl),(pr,rl),bool(03)
	descb	ab|0,ql
	descb	bp|0,ql
	return
	bss	source,2048
	end
 



		    csl_test.alm                    10/22/84  1117.2r w 10/22/84  1101.2       11484



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	csl_test
	entry	csl_test
csl_test:
	push
	epplb	ap|2,*
	epplb	lb|0,*	"get ptr to test_data
	adwplb	2551,du	
	eppbb	ap|4,*
	eppbb	bb|0,*	"get ptr to temp seg
	adwpbb	9836,du
	ldq	238824,dl
	csl	(pr,rl),(pr,rl),bool(03)
	descb	lb|0,ql
	descb	bb|0,ql
	cmpb	(pr,rl),(pr,rl)
	descb	lb|0,ql
	descb	bb|0,ql
	tnz	crump
	return
""
crump:	oct	0
	end




		    extra_fill.alm                  10/22/84  1117.2r w 10/22/84  1101.2       11610



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	extra_fill
	entry	extra_fill

extra_fill:
	push
	eppbp	ap|2,*		"get ptr to test_data1_
	eppbp	bp|0,*
	eppab	bp|0,*
	adwpbp	1024-6,du
	eppbb	data
	mlr	(pr),(pr),fill(757)
	desc9a	bb|0,15
	desc9a	bp|0,32
check:	ldaq	ab|2002
	tnz	error		"extra fill chars exist
	return

error:	oct	0		"ZOP

	even
data:	aci	"12345678901234567890123456789012"
	oct	0,0

	end

  



		    itp_mod.alm                     10/22/84  1148.6r w 10/22/84  1148.6        5319



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1984 *
" *                                                         *
" ***********************************************************
	name	itp_mod
	entry	itp_mod
	tempd	temp_1,temp_2
ITP:	oct	600000000041
	oct	54022000
itp_mod:	push
	sprisp	temp_1
	lda	temp_1+1
	eax5	0,au
	ldq	ITP+1
	stq	temp_1+1
	adx5	temp_1+1
	stx5	temp_1+1
	eppbp	ITP,*
	spribp	temp_2
	ldaq	temp_2
	cmpaq	temp_1
	tze	*+2
	mme1	0
	return
	end
	 



		    mlr_tst.alm                     10/22/84  1117.2r w 10/22/84  1101.2       22995



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"
"	Test to find mlr failure when doing move across 4K boundary
"	which causes out-of-bounds fault and subsequent seg-fault
"
"	To run this test, you must create fresh each time a segment
"	called testcpu_tempseg_1 and you must terminate mlr_tst. Then run the test.
"	Afterwards, type:
"
"	abc testcpu_tempseg_1
"	iomode edited
"	print testcpu_tempseg_1
"
"	The test will have failed if the output printed is as follows:
"
"	abcdefghijklmnopqrstuvwxyaABCDEFGHIJKLEFGHIJKLMNOP....etc
"
"	Note: the 8 chars EFGHIJKL are repeated
"
	name	mlr_tst
	entry	mlr_tst
	temp	eis_misc
	temp	ou_misc

mlr_tst:
	push
	stz	eis_misc
	stz	ou_misc
	lda	=o70,dl
	ldq	1,dl
	epplb	ap|2,*
	epplb	lb|0,*	"get ptr to temp seg
	eppbp	lb|0,*
	adwplb	4087,du
	eax5	2
	a9bd	lb|0,5
	eppbb	source

	mlr	(pr,rl,ql),(pr,rl),fill(040)
	desc9a	bb|0(3),al
	desc9a	lb|0,al


	cmpc	(pr,rl,ql),(pr,rl),fill(040)
	desc9a	bb|0(3),al
	desc9a	lb|0,al
	tnz	fail1

ou_check:
	lda	bp|4087
	cmpa	=o000000145146
	tnz	fail2
	eax0	0

loop:	ldaq	bp|4088,x0
	cmpaq	answer,x0
	tnz	fail2
	eax0	2,x0
	cmpx0	=o16,du
	tmi	loop

validate:
	lda	eis_misc
	cmpa	ou_misc
	tnz	eis_failed	"either the mlr or cmpc failed
	ldq	0,dl
	cmpq	eis_misc
	tnz	mlr_failed
	return

fail1:
	aos	eis_misc
	tra	ou_check
fail2:
	aos	ou_misc
	tra	validate

mlr_failed:
	drl			"mlr failed

cmpc_failed:
	mme4			"cmpc failed, mlr worked

eis_failed:
	lda	ou_misc
	cmpa	0,dl
	tze	cmpc_failed
	mme1			"MLR and CMPC failed


source:
	aci	"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890$%"
	even

answer:	aci	"ghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678"
	oct	0

RET:	return
	end




 



		    mlrstern.alm                    10/22/84  1117.2r w 10/22/84  1101.2       22113



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"This routine ckecks an MLR that failed when placing the fill character
"across a page boundary.

"If the MLR fails, a DRL fault is forced.
"Successful execution of the MLR is checked by using a CMPC AND a LDAQ/CMPAQ
"to verify that the CMPC worked correctly. If the CMPC and LDAQ/CMPAQ results
"agree, then the DRL fault is signaled if they sensed a failure. If they
"disagree then a MME4 is forced to denote that the CMPC failed. If both the MLR
"AND CMPC failed a MME1 is forced.


	name	mlrstern
	entry	mlrstern
	temp 	eis_misc
	temp	ou_misc
mlrstern:	push
	epplb	ap|2,*
	epplb	lb|0,*	"get ptr to test_data1_
	eppsb	ap|4,*
	eppsb	sb|0,*	"get ptr to test_cpu temp seg
	stz	eis_misc
	stz	ou_misc
	lda	=o235253,dl
	ldq	=o167773,dl
	eax7	6
	eax6	5

	mlr	(pr,rl,al),(pr,rl,ql),fill(040)
	desc9a	lb|-1(3),x6
	desc9a	sb|0,x7

	cmpc	(pr,rl,al),(pr,rl,ql),fill(040)
	desc9a	lb|-1(3),x6
	desc9a	sb|0,x7
	tnz	fail1
ou_check:
	ldaq	sb|15358
	cmpaq	constant1
	tnz	fail2
	ldaq	sb|15360
	cmpaq	constant2
	tnz	fail2
validate:
	lda	eis_misc
	cmpa	ou_misc
	tnz	eis_failed	"either the mlr or cmpc failed
	ldq	0,dl
	cmpq	eis_misc
	tnz	mlr_failed
	epbpsb	sp|0
	return

fail1:	aos	eis_misc		"remember cmpc miscompared
	tra	ou_check		"now validate with std instrs
fail2:	aos	ou_misc		"remember ldaq/cmpaq miscompared
	tra	validate

	even
constant1:
	oct	000000000165
	oct	166167170171
constant2:
	oct	040000000000
	oct	0
cmpc_failed:
	mme4

mlr_failed:
	drl

eis_failed:
	lda	ou_misc
	cmpa	0,dl
	tze	cmpc_failed
	mme1			"MLR and CMPC failed
	end
   



		    mpy_ofl.alm                     10/22/84  1117.2r w 10/22/84  1101.2        9333



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	mpy_ofl
	entry	mpy_ofl

mpy_ofl:	push
	ldq	number
	mpy	number
	return

number:	oct	400000000000
	end
   



		    mvn.alm                         10/22/84  1117.2r w 10/22/84  1101.2       15597



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	mvn
	entry	mvn
	temp	OU_MISC
	temp	CMPC_MISC

mvn:	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	adwpbp	1024,du
	stz	OU_MISC
	stz	CMPC_MISC
	mvn	(),(pr),round
	desc9fl	a,25
	desc9fl	bp|0,23

	cmpc	(),(pr)
	desc9a	answer,23
	desc9a	bp|0,23

	tnz	cmpc_misc

ou_check:
	eax0	0
LOOP:	ldaq	bp|0,x0
	cmpaq	answer,x0
	tnz	ou_misc
	eax0	2,x0
	cmpx0	6,du
	tze	validate
	tra	LOOP
cmpc_misc:
	aos	CMPC_MISC
	tra	ou_check		"validate cmpc operation

ou_misc:	aos	OU_MISC

validate:
	ldx1	OU_MISC
	cmpx1	CMPC_MISC
	tze	tst_mvn
	szn	OU_MISC
	tze	cmpc_failed
	szn	OU_MISC
	tnz	cmpc_mvn_failed
tst_mvn:	szn	OU_MISC
	tnz	mvn_failed
	return

cmpc_failed:
	mme4

cmpc_mvn_failed:
	mme1

mvn_failed:
	drl

a:	aci	"+05242880000000000000000"
	oct	360000000000
	even
answer:	aci	"+5242880000000000000"
	oct	060060361000
	oct	0
	end

   



		    mvn_ofl.alm                     10/22/84  1117.2r w 10/22/84  1101.2       10053



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	mvn_ofl
	entry	mvn_ofl

mvn_ofl:	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	adwpbp	1024,du
	eppbb	x
	mvn	(pr),(pr)
	desc9fl	bb|0,14
	desc9ls	bp|0,6

	return

x:	aci	"+000000000000"
	end



   



		    mvnoosb.alm                     10/22/84  1117.2r w 10/22/84  1101.2       10062



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************


	name	mvnoosb
	entry	mvnoosb
mvnoosb:
	push
	eppab	ap|2,* "get ptr to temp seg
	eppab	ab|0,*
	mvn	(),(pr)
	desc9ns	foo,20
	desc9ns	ab|2046,20
	return
foo:	aci	"12345678901234567890"
	end
  



		    mvt_tst.pl1                     10/22/84  1117.2r w 10/22/84  1101.2      125874



/* ******************************************************
   *                                                    *
   *                                                    *
   * Copyright (c) 1972 by Massachusetts Institute of   *
   * Technology and Honeywell Information Systems, Inc. *
   *                                                    *
   *                                                    *
   ****************************************************** */

/* ******************************************************
   *                                                    *
   *                                                    *
   *    Copyright, (C) Honeywell Information Systems    *
   *    Inc., 1980.                                     *
   *                                                    *
   *                                                    *
   ****************************************************** */

mvt_tst: proc;

dcl (init_temp, asc_mas, bcd_mas, ftn_mas, ntf_mas, eas_mas, aes_mas)
     bit (1) unaligned int static init ("0"b);
dcl (tptrs (9), asp, bcdp, esp, ebp, ftnp, ntfp, wkp1, wkp2, wkp3) int static ptr;
dcl  code fixed bin (35);
dcl (i, j, k, m) fixed bin;
dcl (divide, fixed, addr, hbound, bit, string, null) builtin;
dcl (ascln, bcdln, aesln, easln, ftnln, ntfln) fixed bin (24) int static;
dcl (cln, bln) fixed bin (24);
dcl  char_temp char (cln) aligned based;
dcl  bit_temp bit (bln) aligned based;
dcl  ae_temp char (aesln/9) based (esp);
dcl  ea_temp char (easln/9) based (ebp);
dcl  tp ptr;
dcl  cleanup condition;
dcl  NL char (1) int static init ("
");

dcl (ioa_, com_err_) entry options (variable);
dcl  get_temp_segments_ entry (char (*), (*) ptr, fixed bin (35));
dcl  hcs_$delentry_seg entry (ptr, fixed bin (35));
dcl  translate_strings_$nine_to_six entry (char (*) aligned, bit (*) aligned, ptr);
dcl  translate_strings_$six_to_nine entry (bit (*) aligned, char (*) aligned, ptr);
dcl  translate_strings_$nine_to_four_ entry (char (*) aligned, bit (*) aligned, ptr);
dcl  translate_strings_$four_to_nine_ entry (bit (*) aligned, char (*) aligned, ptr);
dcl  ebcdic_to_ascii_ entry (char (*), char (*));
dcl  ascii_to_ebcdic_ entry (char (*), char (*));

dcl  ascii_to_ebcdic_$ae_table (0 : 127) bit (9) unaligned ext static;

dcl  ascii_to_bcd_table (0:127) bit (9) unaligned static initial
    ((10) (9) "0"b, "000001100"b, (21) (9) "0"b,
     "000010000"b, "000111111"b, "000111110"b, "000001011"b, "000101011"b, "000111100"b, "000011010"b, "000101111"b,
     "000011101"b, "000101101"b, "000101100"b, "000110000"b, "000111011"b, "000101010"b, "000011011"b, "000110001"b,
     "000000000"b, "000000001"b, "000000010"b, "000000011"b, "000000100"b, "000000101"b, "000000110"b, "000000111"b,
     "000001000"b, "000001001"b, "000001101"b, "000101110"b, "000011110"b, "000111101"b, "000001110"b, "000001111"b,
     "000001100"b, "000010001"b, "000010010"b, "000010011"b, "000010100"b, "000010101"b, "000010110"b, "000010111"b,
     "000011000"b, "000011001"b, "000100001"b, "000100010"b, "000100011"b, "000100100"b, "000100101"b, "000100110"b,
     "000100111"b, "000101000"b, "000101001"b, "000110010"b, "000110011"b, "000110100"b, "000110101"b, "000110110"b,
     "000110111"b, "000111000"b, "000111001"b, "000001010"b, "000011111"b, "000011100"b, "000100000"b, "000111010"b,
     "000011111"b, "000010001"b, "000010010"b, "000010011"b, "000010100"b, "000010101"b, "000010110"b, "000010111"b,
     "000011000"b, "000011001"b, "000100001"b, "000100010"b, "000100011"b, "000100100"b, "000100101"b, "000100110"b,
     "000100111"b, "000101000"b, "000101001"b, "000110010"b, "000110011"b, "000110100"b, "000110101"b, "000110110"b,
     "000110111"b, "000111000"b, "000111001"b, "000001010"b, "000111111"b, "000011100"b, "000000000"b, "000000000"b);

dcl  bcd_to_ascii_table (0:63) bit (9) unaligned static initial
    ("000110000"b, "000110001"b, "000110010"b, "000110011"b, "000110100"b, "000110101"b, "000110110"b, "000110111"b,
     "000111000"b, "000111001"b, "001011011"b, "000100011"b, "000001010"b, "000111010"b, "000111110"b, "000111111"b,
     "000100000"b, "001000001"b, "001000010"b, "001000011"b, "001000100"b, "001000101"b, "001000110"b, "001000111"b,
     "001001000"b, "001001001"b, "000100110"b, "000101110"b, "001011101"b, "000101000"b, "000111100"b, "001011100"b,
     "001011110"b, "001001010"b, "001001011"b, "001001100"b, "001001101"b, "001001110"b, "001001111"b, "001010000"b,
     "001010001"b, "001010010"b, "000101101"b, "000100100"b, "000101010"b, "000101001"b, "000111011"b, "000100111"b,
     "000101011"b, "000101111"b, "001010011"b, "001010100"b, "001010101"b, "001010110"b, "001010111"b, "001011000"b,
     "001011001"b, "001011010"b, "001011111"b, "000101100"b, "000100101"b, "000111101"b, "000100010"b, "000100001"b);

dcl  nine_to_four_table (0:15) bit (9) unaligned static init
    ("000000000"b, "000000001"b, "000000010"b, "000000011"b, "000000100"b, "000000101"b, "000000110"b, "000000111"b,
     "000001000"b, "000001001"b, "000001010"b, "000001011"b, "000001100"b, "000001101"b, "000001110"b, "000001111"b);

/*  */
mvt_tst_ascii_to_bcd: entry;				/* test nine to six conversion with MVT instruction */

	if ^init_temp then
	     call init_temp_segs;			/* make our temp segs */
	if ^asc_mas then
	     call init_asc_mas;			/* fill in ascii master seg */
	if ^bcd_mas then
	     call cv_bcd;				/* go do non eis conversion for bcdmaster */

/* now do eis (MVT) conversion on 3 segments */

	cln = divide (ascln, 9, 17, 0);
	bln = bcdln;
	do tp = wkp1, wkp2, wkp3;
	     call translate_strings_$nine_to_six (asp -> char_temp, tp -> bit_temp, addr (ascii_to_bcd_table));
	end;

/* now compare the 3 segments to bcd master seg */

	call compare (bcdp, bcdln);
	return;					/* that's it folks */

mvt_tst_bcd_to_ascii: entry;				/* test six to nine conversion with MVT instruction */

	if ^init_temp then
	     call init_temp_segs;			/* make our temp segs */
	if ^asc_mas then
	     call init_asc_mas;			/* fill in ascii master seg */
	if ^bcd_mas then
	     call cv_bcd;				/* go do non eis conversion for bcdmaster */

/* now do eis (MVT) conversion on 3 segments */

	cln = divide (ascln, 9, 17, 0);
	bln = bcdln;
	do tp = wkp1, wkp2, wkp3;
	     call translate_strings_$six_to_nine (bcdp -> bit_temp, tp -> char_temp, addr (bcd_to_ascii_table));
	end;

/* mow compare the 3 segments to the ascii master seg */

	call compare (asp, ascln);
	return;

mvt_tst_ascii_to_ebcdic: entry;				/* test nine to nine conversion with MVT instruction */

	if ^init_temp then
	     call init_temp_segs;			/* make our temp segs */
	if ^aes_mas then
	     call init_aes_mas;			/*  fill in our ascii to ebcdic master seg */
	if ^eas_mas then
	     call cv_asc_to_ebc;			/* go do non eis conversion on ascii seg */

/* now do eis (MVT) conversion on 3 segments */

	do tp = wkp1, wkp2, wkp3;
	     call ascii_to_ebcdic_ (ae_temp, tp -> ea_temp);
	end;

/* Now compare the 3 segments to the ebcdic master */
	call compare (ebp, easln);
	return;

mvt_tst_ebcdic_to_ascii: entry;				/* test nine to nine conversion with the MVT instruction */

	if ^init_temp then
	     call init_temp_segs;			/* make our temp segs */
	if ^aes_mas then
	     call init_aes_mas;			/*  fill in our ascii to ebcdic master seg */
	if ^eas_mas then
	     call cv_asc_to_ebc;			/* go do non eis conversion on ascii seg */

/* now do eis (MVT) conversion on 3 segments */

	do tp = wkp1, wkp2, wkp3;
	     call ebcdic_to_ascii_ (ea_temp, tp -> ae_temp);
	end;

/* Now compare the 3 segments to the ascii master */

	call compare (esp, aesln);
	return;

mvt_tst_nine_to_four: entry;				/* test nine to four conversion with the MVT instruction */

	if ^init_temp then
	     call init_temp_segs;			/* make our temp segs */
	if ^ntf_mas then
	     call init_ntf_mas;			/* Fill in our four to nine master seg */
	if ^ftn_mas then
	     call cv_ntf;				/* go do non eis conversion for four to nine master */

/* now do eis (MVT) conversion on 3 segments */

	cln = divide (ntfln, 9, 17, 0);
	bln = ftnln;
	do tp = wkp1, wkp2, wkp3;
	     call translate_strings_$nine_to_four_ (ntfp -> char_temp, tp -> bit_temp, addr (nine_to_four_table));
	end;

/* Now compare the 3 segments to the four to nine master */

	call compare (ftnp, ftnln);
	return;

mvt_tst_four_to_nine: entry;				/* test four to nine conversion with the MVT instruction */

	if ^init_temp then
	     call init_temp_segs;			/* make our temp segs */
	if ^ntf_mas then
	     call init_ntf_mas;			/* Fill in our four to nine master seg */
	if ^ftn_mas then
	     call cv_ntf;				/* go do non eis conversion for four to nine master */

/* now do eis (MVT) conversion on 3 segments */

	cln = divide (ntfln, 9, 17, 0);
	bln = ftnln;
	do tp = wkp1, wkp2, wkp3;
	     call translate_strings_$four_to_nine_ (ftnp -> bit_temp, tp -> char_temp, addr (nine_to_four_table));
	end;

/* Now compare the 3 segments with the nine to four master */

	call compare (ntfp, ntfln);
	return;

mvt_tst_release_t_segs: entry;				/* entry to release temp segs */
	do i = 1 to hbound (tptrs, 1);		/* delete temp segments */
	     call hcs_$delentry_seg (tptrs (i), code);
	     tptrs (i) = null;
	end;
	asp, bcdp, esp, ebp, ftnp, ntfp, wkp1, wkp2, wkp3 = null;
	init_temp, asc_mas, bcd_mas, ftn_mas, ntf_mas, eas_mas, aes_mas = "0"b;
	return;

/*  */
init_temp_segs: proc;				/* porcedure to make all our temp segs */

	     call get_temp_segments_ ("mvt_st", tptrs, code);
	     if code ^= 0 then do;
		call com_err_ ("mvt_tst", code, " creating temp segs ");
		return;
	     end;

	     asp = tptrs (1);			/* set up segment pointers */
	     bcdp = tptrs (2);
	     esp = tptrs (3);
	     ebp = tptrs (4);
	     ftnp = tptrs (5);
	     ntfp = tptrs (6);
	     wkp1 = tptrs (7);
	     wkp2 = tptrs (8);
	     wkp3 = tptrs (9);
	     init_temp = "1"b;			/* set switch */
	end init_temp_segs;

/*  */
compare:	proc (mptr, mln);				/* procedure to compare temp segments to master segments */
dcl  mptr ptr;
dcl  mln fixed bin (24);
dcl (i, j, k, ln) fixed bin;
dcl  tempp ptr;
dcl  mas_seg (0 : ln) bit (36) based (mptr);
dcl  temp_seg (0 : ln) bit (36) based (tempp);
dcl  esw bit (1);

	     ln = divide (mln, 36, 17, 0) -1;		/* ln = word count - 1 */
	     k = 0;
	     do tempp = wkp1, wkp2, wkp3;
		k = k + 1;
		j = 0;
		esw = "0"b;
		do i = 0 to ln;			/* compare the segments */
		     if temp_seg (i) ^= mas_seg (i) then do;
			if ^esw then do;
			     esw = "1"b;
			     call ioa_ (" Discrepencies exist in the number ^d converted segment", k);
			     call ioa_ ("^4xoffset^4xcontents^4xoffset^4xcontents");
			end;
			j = j + 1;
			if j < 10 then
			     call ioa_ ("^4x^6o^2x^w^2x^6o^2x^w", i, mas_seg (i), i, temp_seg (i));
		     end;
		end;
		if j ^= 0 then
		     call ioa_ ("Total of ^d discrepencies found", j);
	     end;
	end compare;

/*  */
init_asc_mas: proc;					/* procedure to initilize ascii master data seg */

dcl  asc_dta char (79) int static init
    ("THIS IS A SEVENTY-NINE-CHARACTER FIELD FULL OF RANDOM TEST DATA. LINE X OF 10.");
dcl  asctemp (333) char (80) based (asp);

	     do i = 1 to hbound (asctemp, 1);
		asctemp (i) = asc_dta || NL;
	     end;
	     ascln = hbound (asctemp, 1) * 80 * 9;
	     asc_mas = "1"b;			/* set flag  so we don't init this seg again */
	end init_asc_mas;

init_aes_mas: proc;					/* proc to init_ascii_to ebcdic master */

dcl  aes_dta char (230) int static init
    ("this is a test of ascii to ebcdic and ebcdic to ascii conversion.
lower case keyboard: |{1234567890-_}~qwertyuiop`:;lkjhgfdsazxcvbnm,./
UPPER CASE KEYBOARD: \[! #$%&'() =_]^@POIUYTREWQASDFGHJKL+*?><MNBVCXZ

9_");
dcl  aestemp (130) char (230) based (esp);

	     do i = 1 to hbound (aestemp, 1);
		aestemp (i) = aes_dta || NL;
	     end;
	     aesln = hbound (aestemp, 1) * 230 * 9;
	     aes_mas = "1"b;
	end init_aes_mas;


init_ntf_mas: proc;					/* proc to init nine to four master */

dcl 1 ntf_temp (1800) based (ntfp) aligned,
    2 ntf_char (0:15) unaligned,
      3 ntf_fb fixed bin (8);

	     do i = 1 to divide (hbound (ntf_temp, 1), 16, 17, 0);
		do j = 0 to 15;
		     m = j;
		     do k = 0 to 15;
			ntf_temp (i).ntf_char (k).ntf_fb = m;
			m = m + 1;
			if m > 15 then m = 0;
		     end;
		end;
	     end;
	     ntfln = hbound (ntf_temp, 1) * 16 * 9;
	     ntf_mas = "1"b;
	end init_ntf_mas;

/*  */
convert:	proc;					/* procedure to do non EIS conversion */

dcl  six_seg (sln) bit (6) based unaligned;
dcl  nine_seg (nln) bit (9) based unaligned;
dcl 1 cvfour aligned,
    2 pad bit (1) init ("0"b) unaligned,
    2 chr1 bit (4) unaligned,
    2 chr2 bit (4) unaligned;
dcl (inptr, otptr) ptr;
dcl (sln, nln) fixed bin (24);

cv_bcd:	     entry;				/* convert ascii to bcd */
	     inptr = asp;
	     otptr = bcdp;
	     nln = divide (ascln, 9, 17, 0);
	     sln = 262000;
	     do i = 1 to nln;			/* convert ascii char */
		otptr -> six_seg (i) = bit (fixed (ascii_to_bcd_table (fixed (inptr -> nine_seg (i), 9)), 6));
	     end;
	     bcdln = i * 6;				/* set up bcd seg length */
	     bcd_mas = "1"b;
	     return;

cv_asc_to_ebc: entry;				/* convert ascii to ebcdic */
	     inptr = esp;
	     otptr = ebp;
	     nln = divide (aesln, 9, 17, 0);
	     do i = 1 to nln;			/* convert ascii to ebcdic */
		otptr -> nine_seg (i) = bit (fixed (ascii_to_ebcdic_$ae_table (fixed (inptr -> nine_seg (i), 9)), 9));
	     end;
	     easln = i * 9;				/* set up ebcdic seg length */
	     eas_mas = "1"b;
	     return;

cv_ntf:	     entry;				/* convert 9 bit to 4 bit (packed decimal */
	     inptr = ntfp;
	     otptr = ftnp;
	     nln = divide (ntfln, 9, 17, 0);
	     do i = 1 to nln;			/* convert nine to four */
		j = i * 2;
		cvfour.chr1 = bit (fixed (inptr -> nine_seg (j - 1), 4));
		cvfour.chr2 = bit (fixed (inptr -> nine_seg (j), 4));
		otptr -> nine_seg (i) = string (cvfour);
	     end;
	     ftnln = i * 9 / 2;			/* set up packed decimal segment length */
	     ftn_mas = "1"b;
	     return;
	end convert;

     end mvt_tst;
  



		    rpd_test.alm                    10/22/84  1117.2r w 10/22/84  1101.2       12672



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"
"	T&D to find RPD with page-fault problem on MIT CPU B on 1/2/74.
"	The cpu has failed if you get a ZOP fault. If no fault, it worked.
"
	name	rpd_test
	entry	rpd_test

rpd_test:
	push
	eppbp	name
	epplb	table
	even
	eax2	0
	rpda	8,1,tnz
	lda	bp|0,2
	cmpa	lb|0,2
	ttf	failure
	return
failure:
	oct	0
	even
name:	aci	"abcdefghijklmn                  "

	org	1024-3
table:	aci	"abcdefghijklmn                  "

"force fill to page bound for next test 'cmpc7'

	bss	,1016
	end




		    rpt_test_evn.alm                10/22/84  1117.2r w 10/22/84  1101.3        7677



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1982 *
" *                                                         *
" ***********************************************************

	temp 	otherp
	name 	rpt_test_evn
	entry	rpt_test_evn
	
rpt_test_evn:	push
	ldq	0,dl
	eppap	ap|2,*	"get ptr to temp seg
	eppap	ap|0,*
	tra	loop

	org	1036
loop:
	call	test_cpu$deactivate_tempseg
	lda	place
	sta	otherp
	sta	otherp
	sta	otherp
	ada	1,du
	sta	otherp
	ada	1,du
	sta	otherp
	nop	0,du
	ldx1	special
	call	test_cpu$deactivate_tempseg
	even
	oct	634200520201
	stz	ap|0,x1
	ldx3	-2,du
	ldx1	206,du
	ldx2	0,du
	ldx0	8,du
	adx3	3,du
	adq	1,dl
special:  oct	053601235011
	tra	quit
quit:	return


	org	2000
place:	oct	033335000000

	end

   



		    rpt_test_odd.alm                10/22/84  1117.2r w 10/22/84  1101.3        7542



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1982 *
" *                                                         *
" ***********************************************************

	temp 	otherp
	name 	rpt_test_odd
	entry	rpt_test_odd
	
rpt_test_odd:	push
	ldq	0,dl
	eppbp	ap|2,*
	eppbp	bp|0,*	"ptr to temp seg
	tra	loop

	org	1036
loop:
	call	test_cpu$deactivate_tempseg
	lda	place
	sta	otherp
	sta	otherp
	sta	otherp
	ada	1,du
	sta	otherp
	ada	1,du
	sta	otherp
	ldx1	special
	call	test_cpu$deactivate_tempseg
	odd
	oct	634200520201
	stz	bp|0,x1
	ldx3	-2,du
	ldx1	206,du
	ldx2	0,du
	ldx0	8,du
	adx3	3,du
	adq	1,dl
special:  oct	053601235011
	tra	quit
quit:	return


	org	2000
place:	oct	033335000000

	end

  



		    scd_con_flt.alm                 10/22/84  1117.2r w 10/22/84  1101.2       12096



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	scd_con_flt
	entry	scd_con_flt
	temp	INDEX
	temp	loop_cnt
scd_con_flt:

	push
	stz	loop_cnt
loop:
	aos	loop_cnt
	scd	(),(du)
	desc9a	string1,2
	desc9a	32832,2
	arg	INDEX
	ldq	INDEX
	ttf	check1
	lcq	1,dl
check1:

	adq	1,dl
	cmpq	1,dl
	tze	test2
	oct	0	"ZOP

test2:
	scd	(),(du)
	desc9a	string2,3
	desc9a	32832,2
	arg	INDEX
	ldq	INDEX
	ttf	check2
	lcq	1,dl
check2:
	adq	1,dl
	cmpq	2,dl
	tze	test3
	oct	0	"ZOP

test3:
	scd	(),(du)
	desc9a	string3,4
	desc9a	32832,2
	arg	INDEX
	ldq	INDEX
	ttf	check3
	lcq	1,dl
check3:
	adq	1,dl
	cmpq	3,dl
	tze	test4
	oct	0	"ZOP

test4:
	scd	(),(du)
	desc9a	string4,5
	desc9a	32832,2
	arg	INDEX
	ldq	INDEX
	ttf	check4
	lcq	1,dl
check4:
	adq	1,dl
	cmpq	4,dl
	tze	test_loop
	oct	0	"ZOP

test_loop:

	lda	=o200000,dl
	cmpa	loop_cnt
	tze	RET
	tra	loop
RET:	return

string1:	aci	"@@"
string2:	aci	".@@"
string3:	aci	"..@@"
string4:	aci	"...@@"
	end




		    scd_oob_tst.alm                 10/22/84  1117.2r w 10/22/84  1101.4       10116



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1982 *
" *                                                         *
" ***********************************************************
	name	scd_oob_tst
	entry	scd_oob_tst
scd_oob_tst:	push

	eppab	ap|4,*	"get ptrs to temp segs for d1, 2, & 3
	eppab	ab|0,*	"d3 (arg) MUST reside in a different segment
	eppbp	ab|0,*	"d1 &2 may share the same seg.
	eppbb	ap|2,*
	eppbb	bb|0,*
	adwpab	62380,du
	adwpbp	62320,du
	lda	allones
	sta	bp|0
	ldx4	=o300,du
	lda	=o26207,dl
	ldq	=o2303,dl
	mlr	(),(pr,rl,al),fill(000)	"clear to zeroes
	desc9a	0,0
	desc9a	ab|0,ql

loop:
	call 	test_cpu$deactivate_tempseg     "now deactivate both
	
	ldi	0,dl		"ensure tally ind is OFF
	scd	(pr,rl,al),(pr,,)
	desc9a	ab|0,ql
	desc9a	bp|0
	arg	bb|62
	lxl3	bb|62
	cmpx3	=o2302,du			"tally SB 1 less than orig len
	tnz	zop1
	ttn	tally_ok
	ttf	zop2
tally_ok: 
	eax4	-1,4
	tze	done
	tra	loop
done:
	return
zop1:	oct	111111000000
zop2:	oct	222222000000
allones:	oct	777777777777
	end




		    scm_pgflt.alm                   10/22/84  1117.2r w 10/22/84  1101.2       11790



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	scm_pgflt
	entry	scm_pgflt
scm_pgflt:
	push
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	lda	=o427612
	ldq	=o012000,du
	stq	sp|temp
	ldq	1000,dl
	scm	(pr,rl,al),(pr),mask(000)
	desc9a	bp|-1(3),ql
	desc9a	sp|temp,1
	arg	sp|result
	ldq	sp|result
	ttf	2,ic
	lcq	1,dl
	adq	1,dl
	cmpq	133,dl
	stq 	bp|100

	tnz	fail
	return

fail:	oct	0	"ZOP
	return

	temp	temp,result
	end
  



		    scm_tally.alm                   10/22/84  1117.2r w 10/22/84  1101.2       10575



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	scm_tally
	entry	scm_tally
	temp	temp

scm_tally: push
	stz	temp
	eppbp	ap|2,*	"get ptr to temp seg
	eppbp	bp|0,*
	ldq	=1024473
	scm	(pr,rl),(du),mask(000)
	desc9a	bp|0,ql
	zero	16384,1
	arg	temp
	ttf	fail
	return

fail:	oct	0		"ZOP

	end
 



		    scm_tro.alm                     10/22/84  1117.2r w 10/22/84  1101.3       12069



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1982 *
" *                                                         *
" ***********************************************************
	name	scm_tro
	entry	scm_tro
	tempd	temp1,temp2,temp3,temp4
scm_tro:	push
	eppab	ap|2,*
	eppab	ab|0,*
	adwpab	1,du
	stz	temp1
	eax1	0
	aos	temp1
loop:	call	test_cpu$deactivate_tempseg
	ldq	temp1
	tra	inst


	org	323
	oct	000001002003
	oct	004005006007
	oct	010011012013
	oct	014015016017
	oct	020021022023
	oct	024025026027
	oct	030031032033
	oct	034035036037
	oct	040041042043
	oct	044045046047
	oct	050051052053
	oct	054055056057
	oct	060061062063
	oct	064065066067
	oct	070071072073
	oct	074075076077
	oct	100101102103
	oct	104105106107
	oct	110111112113
	oct	114115116117
	oct	120121122123
	oct	124125126127
	oct	130131132133
	oct	134135136137
	oct	140141142143
	oct	144145146147
	oct	150151152153
	oct	154155156157
	oct	160161162163
	oct	164165166167
	oct	170171172173
	oct	174175176177



	org	444
inst:
	scm	(ic),(pr,ql),mask(000)
	desc9a	-121,128
	desc9a	ab|-1(3),1
	arg	temp4
	ttf	2,ic
	oct 	0
	ldaq	temp1
	ada	1,dl
	cmpa	54,dl
	tnz	2,ic
	lda	1,dl
	adlx1	1,du
	cmpx1	=o1000,du
	tze	3,ic
	staq	temp1
	tra	loop
	return
	end
   



		    sreg.alm                        10/22/84  1117.2r w 10/22/84  1101.2       10107



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	sreg
	entry	sreg
	temp8	regs

sreg:	push
	lda	regs
	tra	label

	org	1024-3
label:	nop
	nop
	sreg	regs
	nop
	return

"force fill to page bound for next test case 'test_ci
	bss	,1018

	end
 



		    sreg_no_write.alm               10/22/84  1148.6r w 10/22/84  1148.5       12861



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1984 *
" *                                                         *
" ***********************************************************
	entry	sreg_no_write
	name	sreg_no_write

sreg_no_write:
	push

	tra	START
	org	1014

START:
	epp2 	pr6|18,*	next frame ptr
	epbp7	pr6|0	stack base
	epp3 	pr2|32	next frame area
	nop  	0,du
	inhibit	on
	spri3	pr6|18	NEW next frame ptr
	spri3	pr7|20	NEW stack end ptr
	inhibit	off
	epp1 	pr6|20,*	return ptr
	spri1	pr2|30	save return ptr in new frame
" The following instruction will fail with a access violation
" no_write_permission, because it asks for PR2's segment number
" and gets THIS segment number instead.
" The placement of this instruction is also very important. It must
" be two locations prior to the page boundary in the inst. segment.
	sreg 	pr2|16	save regs in new frame
	sti  	pr2|26	save indicators in new frame
	spri5	pr2|28	save pr5 in new frame

	epp2 	pr6|18,*	next frame ptr (= NEW frame)
	epp2 	pr2|-32	remove frame area
"	spbp7	pr6|0	?????
"	epp3 	pr2|30,*	get return ptr
"	spri3	pr6|20	restore return ptr

"	ldi  	pr2|26	resotre indicators
"	lreg 	pr2|16	restore regs
	inhibit	on
	spri2	pr6|18	restore next frame ptr
	spri2	pr7|20	restore stack end ptr
	inhibit	off
	return
	org	2048-3
	end
   



		    tct.alm                         10/22/84  1117.2r w 10/22/84  1101.2       12240



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	tct
	entry	tct


tct:	push
	eppab	string
	eppbp	ap|2,*
	eppbp	bp|0,*

	tct	(pr),()
	desc9a	ab|0,168
	arg	table-*,ic
	arg	bp|2048

	return

string:	aci	"when in the course of human events it becomes necessary"
	aci	"when in the course of human events it becomes necessary"
	aci	"when in the course of human events it becomes necessary"

	bss	,1515	"was an org	1561+5
table:	oct	000001002003
	oct	000001002003
	bss	,476

	end




		    test_ci.alm                     10/22/84  1117.2r w 10/22/84  1101.2       12132



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"
"	T&D to find ci modifier hardware design bug. If you get illegal_opcode
"	the test failed. If you get a return, it worked.
"
	name	test_ci
	entry	test_ci
test_ci:
	push
	tra	lda
	even
lda:	lda	tally_word,ci
	cmpa	=o33,dl
	tze	worked
	oct	0
worked:
	return
	org	1024

tally_word:
	vfd	18/data,o12/7477,o6/02
	org	2048
data:	oct	112233445566

"force fill to page boundary for next test case 'rpd_test
	bss	,1020
	end




		    test_cmpc_fill.alm              10/22/84  1117.2r w 10/22/84  1101.2       12411



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	test_cmpc_fill
	entry	test_cmpc_fill

test_cmpc_fill: push
	eppbp	data1-1
	eppbb	data2-1
	ldx6	31,du
	ldx7	31,du
	cmpc	(pr,rl),(pr,rl),fill(040)
	desc9a	bp|1,x6
	desc9a	bb|1,x7
	tnz	error
	return

error:	oct	0		"ZOP

	org	1026
data1:	aci	"when in the course of human eve                         "

	org	2048-7
data2:	aci	"when in the course of human eve........................."

"force fill to page bound for next test case
	bss	,1014

	end
 



		    test_sc2.alm                    10/22/84  1117.2r w 10/22/84  1101.2       15525



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"
"	This version of sc test does a rpd before going into sc mode. It
"	Takes page faults on the data and on the indirect word
"
"
	name	test_sc2
	entry	test_sc2
test_sc2:
	push
	eppbp	ap|2,*
	eppbp	bp|0,*
	eax1	FILED
	odd
	rpd	4,1,tnz,tze
	lda	0,1
	ldq	0,2
	tra	skip_FILED
FILED:	oct	1,0,1,1
skip_FILED:
	lda	tally_word_model
	sta	bp|10195
	stz	bp|0
loop:	lda	bp|0
	ana	=o77,dl
	aos	bp|0
	sta	bp|10195,sc
	nop
	nop
	ttf 	loop
	lda	tally_word_model
	sta	bp|10195
	stz	bp|0
loop1:
	lda	bp|10195,sc
	ttf	test
	return
test:
	cmpa	bp|0
	tze	*+2
	oct	0		"ZOP
	aos	bp|0
	lda	bp|0
	ana	=o77,dl
	sta	bp|0
	tra	loop1
tally_word_model:
	vfd	18/field,o12/7777,6/0
	even
	org	2000
field:	oct
	bss	x,4096
	oct	525252525252
	bss	y,4096
	oct	252525252525

"force fill to page bound for next test
	bss	,42

	end
   



		    test_xed.alm                    10/22/84  1117.2r w 10/22/84  1101.3       10584



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	test_xed
	entry	test_xed
	tempd	temp(2)

test_xed:	push
	eppbp	0
	spribp	temp
	eaa	0
	xed	double_word,au
	spribb	temp+2
	ldaq	temp+2
	cmpaq	temp
	tze	error
	return
error:	oct	0		"ZOP
	return
	even
double_word:
	ldx0	2,du
	eppbb	bp|0,0
	end




		    tmlr.alm                        10/22/84  1117.2r w 10/22/84  1101.3       11664



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	tmlr
	entry	tmlr
	segdef	tmlr_data

tmlr:	push

	eppbp	tmlr_data
	lda	ap|6,*
	ldq	ap|6,*
	eppab	ap|8,*
	eppab	ab|0,*
	adwpab	4096+1024-11,du
	lxl0	ap|2,*
	a9bd	ab|0,x0
	spriab	ap|4,*
	mlr	(pr,rl),(pr,rl),fill(040)
	desc9a	bp|0,al
	desc9a	ab|0,ql

	return


tmlr_data:
	aci	"0.01.012.0123.01234.012345.0123456.01234567.012345678.0123456789.0123456789|||"

	end




		    tnz.alm                         10/22/84  1148.6r w 10/22/84  1148.5        8343



" ***********************************************************
" *                                                         *
" * Copyright, (C) Honeywell Information Systems Inc., 1984 *
" *                                                         *
" ***********************************************************
	name	tnz
	entry	tnz

tnz:	push

	spri	pr6|64
	epp2	ap|2,*
	epp2	bp|0,*
	epp3	pr2|1026
	spri3	pr2|36
	lda	PATTERN
	sta	pr2|64
	lda	0,dl
	stz	pr2|8

tnz_loop:
	tra	start

	org	1018
start:
	ldq	pr2|64
	epp3	pr2|36,*
	cmpq	pr3|540,*
	tze	2177,ic		= 3198 (=6176o)
	ldq	pr2|64
	tnz	2142,ic		= 3165 (=6135o)
	tra	ZOP

	org	3165
	adla	1,dl
	cmpa	=o400,dl
	tnz	CHECK
	lpri	pr6|64
	return

CHECK:	cmpa	pr2|8
	tmi	BAD1
	aos	pr2|8
	cmpa	pr2|8
	tnz	BAD2
	tra	tnz_loop

BAD1:	oct	010101000000
BAD2:	oct	020202000000
	
PATTERN:	oct	077777013521
ZOP:	oct	252525000000
	org	4096-3   " force next test to be bound at a mod 1024.
	end
 



		    translate_strings_.alm          10/22/84  1117.2r w 10/22/84  1101.3       33273



"  ******************************************************
"  *                                                    *
"  *                                                    *
"  * Copyright (c) 1972 by Massachusetts Institute of   *
"  * Technology and Honeywell Information Systems, Inc. *
"  *                                                    *
"  *                                                    *
"  ******************************************************

"  ******************************************************
"  *                                                    *
"  *                                                    *
"  *    Copyright, (C) Honeywell Information Systems    *
"  *    Inc., 1980.                                     *
"  *                                                    *
"  *                                                    *
"  ******************************************************

	name	translate_strings_

	equ	p1,1
	equ	p2,2
	equ	p3,3
	equ	p4,4

	temp	temp,temp1,temp2

	include eis_bits

	entry	nine_to_six			" a ninebit string to a sixbit string
nine_to_six: save
	tsx0	get_args				" get args in convenient regs
	sta	temp				" change length of sixbit string from
	div	6,dl				" length in bits to length in
	lda	temp				" sixbit chars and put back
	mvt	(ar+rl),(ar+rl),(ar),fill(000)	" Do the magic
	desc9a	p2|0,a
	desc6a	p3|0,q
	arg	p1|0
	return

	entry	six_to_nine			" The other way
six_to_nine: save
	tsx0	get_args
	stq	temp				" change length of sixbit string from
	lrl	36
	div	6,dl				" length in bits to length in
	lls	36
	ldq	temp				" sixbit chars and put back
	mvt	(ar+rl),(ar+rl),(ar),fill(000)	" wham.
	desc6a	p2|0,a
	desc9a	p3|0,q
	arg	p1|0
	return

	entry	nine_to_nine
nine_to_nine: save
	tsx0	get_args
	mvt 	(ar+rl),(ar+rl),(ar),fill(000)	" faster than speeding bit
	desc9a	p2|0,a
	desc9a	p3|0,q
	arg	p1|0
	return

	entry	nine_to_four_			" a ninebit string to a fourbit string
nine_to_four_: save
	tsx0	get_args				" get args in convenient regs
	sta	temp				" change length of fourbit string from
	div	36,dl				"get number of words
	sta	temp1				"store remainder
	mpy	8,dl				"q contains number of 4bit chars
						"per number of words - remainder
	stq	temp2
	ldq	temp1				"now lets take care of remainderr
	div	9,dl
	mpy	2,dl				"q now contains the number of 4 bit chars
						"in the remainder
	adq	temp2				"add in even chars
	lda	temp				" fourbit chars and put back
	mvt	(ar+rl),(ar+rl),(ar),fill(000)	" Do the magic
	desc9a	p2|0,a
	desc4a	p3|0,q
	arg	p1|0
	return

	entry	four_to_nine_			" The other way
four_to_nine_: save
	tsx0	get_args
	stq	temp				" change length of fourbit string from
	lrl	36
	div	36,dl				"get number of words
	sta	temp1				"store remainder
	mpy	8,dl				"q contains number of 4bit chars
						"per number of words - remainder
	stq	temp2
	ldq	temp1				"now lets take care of remainderr
	div	9,dl
	mpy	2,dl				"q now contains the number of 4 bit chars
						"in the remainder
	adq	temp2				"add in even chars
	lls	36
	ldq	temp				" fourbit chars and put back
	mvt	(ar+rl),(ar+rl),(ar),fill(000)	" wham.
	desc4a	p2|0,a
	desc9a	p3|0,q
	arg	p1|0
	return

get_args:						" subr to get args into convenient regs
	epp2	ap|2,*				" get ptr to first arg
	epp4	ap|8,*				" get ptr to descriptor for first arg
	lda	p4|0				" pick out length element into a
	ana	=o000077777777			" get rid of description bits
	epp3	ap|4,*				" get ptr to second arg
	epp4	ap|10,*				" get ptr to descriptor for second arg
	ldq	p4|0				" pick out length element into q
	anq	=o000077777777			" get rid of description bits
	epp4	ap|6,*				" get ptr to table ptr
	epp1	p4|0,*				" get table ptr into p1
	tra	0,x0				" and return

	end
   



		    xed_dirflt_even.alm             10/22/84  1117.2r w 10/22/84  1101.4        7623



" ************************************************************
" *                                                          *
" * Copyright, (C) Honeywell Information Systems Inc., 1982  *
" *                                                          *
" * Copyright, (C) Honeywell Information Systems Inc., 1980. *
" *                                                          *
" ************************************************************

	name	xed_dirflt_even
	entry	xed_dirflt_even
xed_dirflt_even:
	push
	lda	=o212121,dl
	ldq	=o505050,dl
	eppap	ap|2,*
	eppap	ap|0,*	"get ptr to test_cpu tempseg
	nop
	even		" align xed instruction
	xed	eeven_
	lda	ap|0
	cmpa	=o212121,dl
	tze	*+2
	oct	0		"test failed
	ldq	ap|4000
	cmpq	=o505050,dl
	tze	*+2
	oct	0
	lda	0,dl
	ldq	0,dl
	sta	ap|0
	stq	ap|4000
	return
	even
eeven_:	asa	ap|0
	asq	ap|4000

	end
 



		    xed_dirflt_odd.alm              10/22/84  1117.2r w 10/22/84  1101.3        7353



" ************************************************************
" *                                                          *
" * Copyright, (C) Honeywell Information Systems Inc., 1982  *
" *                                                          *
" * Copyright, (C) Honeywell Information Systems Inc., 1980. *
" *                                                          *
" ************************************************************

	name	xed_dirflt_odd
	entry	xed_dirflt_odd
xed_dirflt_odd:
	push
	lda	=o212121,dl
	ldq	=o505050,dl
	eppap	ap|2,*	"get ptr to temp seg
	eppap	ap|0,*
	nop
	odd		" align xed instruction
	xed	oddd
	lda	ap|0
	cmpa	=o212121,dl
	tze	*+2
	oct	0
	ldq	ap|4000
	cmpq	=o505050,dl
	tze	*+2
	oct	0
	lda	0,dl
	ldq	0,dl
	sta	ap|0
	stq	ap|4000
	return
	even
oddd:	asa	ap|0
	asq	ap|4000

	end






		    bull_copyright_notice.txt       08/30/05  1008.4r   08/30/05  1007.3    00020025

                                          -----------------------------------------------------------


Historical Background

This edition of the Multics software materials and documentation is provided and donated
to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. 
as a contribution to computer science knowledge.  
This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology,
Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull
and Bull HN Information Systems Inc. to the development of this operating system. 
Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970),
renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership
of Professor Fernando Jose Corbato.Users consider that Multics provided the best software architecture for 
managing computer hardware properly and for executing programs. Many subsequent operating systems
incorporated Multics principles.
Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., 
as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. .

                                          -----------------------------------------------------------

Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without
fee is hereby granted,provided that the below copyright notice and historical background appear in all copies
and that both the copyright notice and historical background and this permission notice appear in supporting
documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining
to distribution of the programs without specific prior written permission.
    Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc.
    Copyright 2006 by Bull HN Information Systems Inc.
    Copyright 2006 by Bull SAS
    All Rights Reserved

