Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | \ ========== Copyright Header Begin ========================================== |
2 | \ | |
3 | \ Hypervisor Software File: asi9.fth | |
4 | \ | |
5 | \ Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
6 | \ | |
7 | \ - Do no alter or remove copyright notices | |
8 | \ | |
9 | \ - Redistribution and use of this software in source and binary forms, with | |
10 | \ or without modification, are permitted provided that the following | |
11 | \ conditions are met: | |
12 | \ | |
13 | \ - Redistribution of source code must retain the above copyright notice, | |
14 | \ this list of conditions and the following disclaimer. | |
15 | \ | |
16 | \ - Redistribution in binary form must reproduce the above copyright notice, | |
17 | \ this list of conditions and the following disclaimer in the | |
18 | \ documentation and/or other materials provided with the distribution. | |
19 | \ | |
20 | \ Neither the name of Sun Microsystems, Inc. or the names of contributors | |
21 | \ may be used to endorse or promote products derived from this software | |
22 | \ without specific prior written permission. | |
23 | \ | |
24 | \ This software is provided "AS IS," without a warranty of any kind. | |
25 | \ ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, | |
26 | \ INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A | |
27 | \ PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN | |
28 | \ MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR | |
29 | \ ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR | |
30 | \ DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN | |
31 | \ OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR | |
32 | \ FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE | |
33 | \ DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, | |
34 | \ ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF | |
35 | \ SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
36 | \ | |
37 | \ You acknowledge that this software is not designed, licensed or | |
38 | \ intended for use in the design, construction, operation or maintenance of | |
39 | \ any nuclear facility. | |
40 | \ | |
41 | \ ========== Copyright Header End ============================================ | |
42 | id: @(#)asi9.fth 1.3 95/05/09 | |
43 | purpose: | |
44 | copyright: Copyright 1993-1994 Sun Microsystems, Inc. All Rights Reserved | |
45 | ||
46 | headers | |
47 | code spacec@ ( adr asi -- byte ) | |
48 | sc4 rdasi | |
49 | sp scr pop | |
50 | tos 0 wrasi | |
51 | #Sync membar | |
52 | scr 0 %asi tos lduba | |
53 | #Sync membar | |
54 | sc4 0 wrasi | |
55 | c; | |
56 | code spacew@ ( adr asi -- word ) | |
57 | sc4 rdasi | |
58 | sp scr pop | |
59 | tos 0 wrasi | |
60 | #Sync membar | |
61 | scr 0 %asi tos lduha | |
62 | #Sync membar | |
63 | sc4 0 wrasi | |
64 | c; | |
65 | code spacel@ ( adr asi -- long ) | |
66 | sc4 rdasi | |
67 | sp scr pop | |
68 | tos 0 wrasi | |
69 | #Sync membar | |
70 | scr 0 %asi tos lda | |
71 | #Sync membar | |
72 | sc4 0 wrasi | |
73 | c; | |
74 | code spacex@ ( adr asi -- xlong ) | |
75 | sc4 rdasi | |
76 | sp scr pop | |
77 | tos 0 wrasi | |
78 | #Sync membar | |
79 | scr 0 %asi tos ldxa | |
80 | #Sync membar | |
81 | sc4 0 wrasi | |
82 | c; | |
83 | code spaced@ ( adr asi -- low high ) | |
84 | sc4 rdasi | |
85 | sp scr get | |
86 | tos 0 wrasi | |
87 | #Sync membar | |
88 | scr 0 %asi sc2 ldda | |
89 | #Sync membar | |
90 | sc3 sp put | |
91 | sc2 tos move | |
92 | sc4 0 wrasi | |
93 | c; | |
94 | ||
95 | code spacec! ( byte adr asi -- ) | |
96 | sc4 rdasi | |
97 | sp 0 /n* scr nget \ adr in scr | |
98 | sp 1 /n* sc1 nget \ byte in sc1 | |
99 | tos 0 wrasi | |
100 | #Sync membar | |
101 | sc1 scr 0 %asi stba | |
102 | #Sync membar | |
103 | sp 2 /n* tos nget | |
104 | sp 3 /n* sp add | |
105 | sc4 0 wrasi | |
106 | c; | |
107 | code spacew! ( word adr asi -- ) | |
108 | sc4 rdasi | |
109 | sp 0 /n* scr nget \ adr in scr | |
110 | sp 1 /n* sc1 nget \ word in sc1 | |
111 | tos 0 wrasi | |
112 | #Sync membar | |
113 | sc1 scr 0 %asi stha | |
114 | #Sync membar | |
115 | sp 2 /n* tos nget | |
116 | sp 3 /n* sp add | |
117 | sc4 0 wrasi | |
118 | c; | |
119 | code spacel! ( long adr asi -- ) | |
120 | sc4 rdasi | |
121 | sp 0 /n* scr nget \ adr in scr | |
122 | sp 1 /n* sc1 nget \ long in sc1 | |
123 | tos 0 wrasi | |
124 | #Sync membar | |
125 | sc1 scr 0 %asi sta | |
126 | #Sync membar | |
127 | sp 2 /n* tos nget | |
128 | sp 3 /n* sp add | |
129 | sc4 0 wrasi | |
130 | c; | |
131 | code spacex! ( xlong adr asi -- ) | |
132 | sc4 rdasi | |
133 | sp 0 /n* scr nget \ adr in scr | |
134 | sp 1 /n* sc1 nget \ xlong in sc1 | |
135 | tos 0 wrasi | |
136 | #Sync membar | |
137 | sc1 scr 0 %asi stxa | |
138 | #Sync membar | |
139 | sp 2 /n* tos nget | |
140 | sp 3 /n* sp add | |
141 | sc4 0 wrasi | |
142 | c; | |
143 | code spaced! ( low high adr asi -- ) | |
144 | sc4 rdasi | |
145 | sp 0 /n* scr nget \ adr in scr | |
146 | sp 1 /n* sc2 nget \ high in sc2 | |
147 | sp 2 /n* sc3 nget \ low in sc3 | |
148 | tos 0 wrasi | |
149 | #Sync membar | |
150 | sc2 scr 0 %asi stda | |
151 | #Sync membar | |
152 | sp 3 /n* tos nget | |
153 | sp 4 /n* sp add | |
154 | sc4 0 wrasi | |
155 | c; | |
156 | ||
157 | : spacec? ( adr space# -- ) spacec@ u. ; | |
158 | : spacew? ( adr space# -- ) spacew@ u. ; | |
159 | : spacel? ( adr space# -- ) spacel@ u. ; | |
160 | : spacex? ( adr space# -- ) spacex@ u. ; | |
161 | : spaced? ( adr space# -- ) spaced@ swap u. u. ; | |
162 | ||
163 | headers |