2N/A\ #ident "%Z%%M% %I% %E% SMI"
2N/A\ purpose:
2N/A\ copyright: Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2N/A\ copyright: Use is subject to license terms.
2N/A\ copyright:
2N/A\ copyright: CDDL HEADER START
2N/A\ copyright:
2N/A\ copyright: The contents of this file are subject to the terms of the
2N/A\ copyright: Common Development and Distribution License, Version 1.0 only
2N/A\ copyright: (the "License"). You may not use this file except in compliance
2N/A\ copyright: with the License.
2N/A\ copyright:
2N/A\ copyright: You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A\ copyright: or http://www.opensolaris.org/os/licensing.
2N/A\ copyright: See the License for the specific language governing permissions
2N/A\ copyright: and limitations under the License.
2N/A\ copyright:
2N/A\ copyright: When distributing Covered Code, include this CDDL HEADER in each
2N/A\ copyright: file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A\ copyright: If applicable, add the following below this CDDL HEADER, with the
2N/A\ copyright: fields enclosed by brackets "[]" replaced with your own identifying
2N/A\ copyright: information: Portions Copyright [yyyy] [name of copyright owner]
2N/A\ copyright:
2N/A\ copyright: CDDL HEADER END
2N/A\ copyright:
2N/A
2N/A." Byte Split tests: "
2N/A " lbsplit" h# 11223344 lbsplit
2N/A h# 11 = swap h# 22 = and swap
2N/A h# 33 = and swap h# 44 = and .passed?
2N/A " lwsplit" h# 11223344 lwsplit
2N/A h# 1122 = swap h# 3344 = and .passed?
2N/A " wbsplit" h# 31122 wbsplit
2N/A h# 11 = swap h# 22 = and .passed?
2N/A " wljoin" h# beef h# dead wljoin h# deadbeef = .passed?
2N/A " bljoin" h# 111 h# 222 h# 333 h# 444 bljoin
2N/A h# 44332211 = .passed?
2N/A " bwjoin" h# 111 h# 222 bwjoin h# 2211 = .passed?
2N/A " lbflip" h# 11223344 lbflip h# 44332211 = .passed?
2N/A " lwflip" h# 11223344 lwflip h# 33441122 = .passed?
2N/A " wbflip" h# 31122 wbflip h# 2211 = .passed?
2N/Acreate flip-area
2N/A h# 01020304 l,
2N/A " wbflips" flip-area /l wbflips flip-area l@ h# 02010403 = .passed?
2N/A " lwflips" flip-area /l lwflips flip-area l@ h# 04030201 = .passed?
2N/A " lbflips" flip-area /l lbflips flip-area l@ h# 01020304 = .passed?
2N/Acr
2N/A
2N/A." Memory ops: "
2N/A " comp +" " abcde" drop " abcd" drop 5 comp 1 = .passed?
2N/A " comp -" " abcd" drop " abcde" comp -1 = .passed?
2N/A " comp =" " abcdef" drop " abcdef" comp 0= .passed?
2N/A " alloc-mem" h# 100 dup alloc-mem ?dup
2N/A if 2swap -1 else drop false then .passed?
2N/A " free-mem" 2swap swap free-mem 1 .passed?
2N/Acr