1 " ***********************************************************
2 " * *
3 " * Copyright, C Honeywell Bull Inc., 1987 *
4 " * *
5 " * Copyright, C Honeywell Information Systems Inc., 1982 *
6 " * *
7 " * Copyright c 1972 by Massachusetts Institute of *
8 " * Technology and Honeywell Information Systems, Inc. *
9 " * *
10 " ***********************************************************
11
12 " ABSADR - Compute Absolute Address from ITS Pair.
13 " Written 06/02/67 - Noel I. Morris
14 " Other modifications made through the years by various Multicians who
15 " curiously prefer the cloak of anonymity.
16 " Modified 03/21/81, W. Olin Sibert, for ADP conversion
17
18
19
20 " Calling Sequence:
21 " absolute_address = absadr pointer error
22 "
23 " Where:
24 " pointer - its pointer.
25 " absolute_address - answer as fixed bin 24 integer.
26 " error - error code.
27 "
28 " Errors:
29 " 1. Bound fault.
30 " 2. Directed Fault in SDW.
31 " 3. Directed Fault in PTW.
32 "
33
34
35
36 name absadr
37 entry absadr
38
39
40 tempd sdw_save,temp
41 temp word_offset,temp1
42
43
44
45 include sdw
46 include ptw
47
48
49 " ^L
50
51
52 absadr: push
53 eppbp ap|2,* pick up pointer to its pair
54 epaq bp|0,* get info into aq-reg
55 anq -1,du
56 stq word_offset save word offset of effective pointer
57 ana -1,du
58 als 1 * 2
59 eax0 0,au seg no * 2 to X0
60
61 epaq abs_seg$+0
62 als 1
63 eax1 0,au
64 ldaq dseg$+0,x1 pick up previous SDW for absolute segment
65 staq sdw_save and stash it away
66
67 ldaq dseg$+0,x0 pick up SDW for segment
68 staq temp save it
69 cana sdw.valid,dl test for directed fault
70 tze error_2 ..
71
72 qrl sdw.bound_shift " Check against the SDW bound
73 anq sdw.bound_mask,dl
74 qls 18+4 " Convert to word count in QU
75 adlq =o17,du " And add 15 to get word count
76 cmpq word_offset compare against word offset
77 tnc error_1 test for bound fault
78
79 ldaq temp restore SDW to AQ
80 canq sdw.unpaged,dl paged ?
81 tnz addr no
82
83 lda word_offset get address
84 arl 10 take address mod page size - 1024
85 eax6 0,au put page number in x6
86 lda temp get page table addr from sdw
87 als 18-sdw.add_shift right justify it in au
88 ana =o17,du find its offset from a 0 mod 16 word addr
89 sta temp1 save this number a bit
90 adx6 temp1 x6 now has addr of desired page table word
91 " as an offset from a 0 mod 16 boundary
92
93 ldaq temp
94 ana =o777777607777 make address field 0 mod 16 for unpaged sdw
95 orq sdw.unpaged,dl make it unpaged
96 staq dseg$+0,x1 store in SDW for absolute segment
97 cams 0 clear assoc. memory
98 lda abs_seg$+0,x6 pick up PTW
99 cana ptw.valid,dl test for directed fault
100 tze error_3 ..
101
102
103 addr:
104 absa bp|0,* generate absolute address
105 arl 12
106 sta ap|6,* return absolute address
107
108 ldq 0,dl make error code zero
109 end:
110 stq ap|4,* return error code
111 ldaq sdw_save restore previous SDW
112 staq dseg$+0,x1 ..
113 cams 0 reset associative memory
114
115 return
116
117
118
119 error_1:
120 ldq 1,dl bound fault
121 tra end ..
122
123 error_2:
124 ldq 2,dl directed fault in SDW
125 tra end ..
126
127 error_3:
128 ldq 3,dl directed fault in PTW
129 tra end ..
130
131
132
133
134 end