1\ #pragma ident	"%Z%%M%	%I%	%E% SMI"
2\ Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3\ Use is subject to license terms.
4\
5\ CDDL HEADER START
6\
7\ The contents of this file are subject to the terms of the
8\ Common Development and Distribution License, Version 1.0 only
9\ (the "License").  You may not use this file except in compliance
10\ with the License.
11\
12\ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13\ or http://www.opensolaris.org/os/licensing.
14\ See the License for the specific language governing permissions
15\ and limitations under the License.
16\
17\ When distributing Covered Code, include this CDDL HEADER in each
18\ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19\ If applicable, add the following below this CDDL HEADER, with the
20\ fields enclosed by brackets "[]" replaced with your own identifying
21\ information: Portions Copyright [yyyy] [name of copyright owner]
22\
23\ CDDL HEADER END
24\
25
26." Access test: "
270 value word-test
280 value char-test
290 value end-test
300 value end-test2
31variable var-test
32create access-test
33	h# 80004000 l,
34	here to word-test
35	h# 8000 w, h# 4000 w,
36	here to char-test
37	h# 1 c, h# 2 c, h# 3 c, h# 4 c,
38	here to end-test
39	h# a55aa55a ,
40	here to end-test2
41
42
43	" l,+"  access-test  la1+     word-test = .passed?
44        " w,+"  word-test   2 wa+     char-test = .passed?
45        " c,+"  char-test   4 ca+      end-test = .passed?
46	" ,+"   end-test    cell+     end-test2 = .passed?
47	" c@.1" char-test        c@ h#        1 = .passed?
48	" c@.2" char-test char+  c@ h#        2 = .passed?
49	" c@.3" char-test 2 ca+  c@ h#        3 = .passed?
50	" c@.4" char-test 3 ca+  c@ h#        4 = .passed?
51	" w@.1"	access-test      w@ h#     8000 = .passed?
52	" w@.2" access-test wa1+ w@ h#     4000 = .passed?
53	" w@.3" word-test        w@ h#     8000 = .passed?
54	" w@.4" word-test wa1+   w@ h#     4000 = .passed?
55	" w@.5" char-test        w@ h#     0102 = .passed?
56        " w@.6" char-test wa1+   w@ h#     0304 = .passed?
57	" <w@"	access-test     <w@ h# ffff8000 = .passed?
58	" l@.1"	access-test      l@ h# 80004000 = .passed?
59        " l@.2" word-test        l@ h# 80004000 = .passed?
60	" l@.3" char-test        l@ h# 01020304 = .passed?
61	" @!.1" h# 5a5aa5a5 var-test ! var-test @ h# 5a5aa5a5 = .passed?
62	" c@c!.1" h# 55 var-test c! var-test c@ h# 55 = .passed?
63	" w@w!.1" h# aa55 var-test w! var-test w@ h# aa55 = .passed?
64	" l@l!.1" h# 5555aaaa var-test l! var-test l@ h# 5555aaaa = .passed?
65	" @!.1" h# aaaa5555 var-test ! var-test @ h# aaaa5555 = .passed?
66	" +!.1" 2 var-test ! 3 var-test +! var-test @ 5 = .passed?
67	" 2!.1" 1 2 access-test 2! access-test @ 2 =
68                access-test cell+ @ 1 = and       .passed?
69	" 2@.1" access-test 2@ 2 = swap 1 = and   .passed?
70cr
71