1 /******************************************************
8 * Copyright (c) 2006, 2007 Charles R. Childers
10 * Permission to use, copy, modify, and distribute this
11 * software for any purpose with or without fee is hereby
12 * granted, provided that the above copyright notice and
13 * this permission notice appear in all copies.
15 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR
16 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
19 * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
20 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
21 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
22 * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
23 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
25 ******************************************************/
32 extern VM_STACK data
, address
, alternate
;
36 /******************************************************
37 *|G| << ( ab-c ) Shift 'a' left by 'b' bits
40 *|F| Shift NOS left by TOS bits
42 ******************************************************/
45 NOS
= NOS
<< TOS
; DROP
;
49 /******************************************************
50 *|G| >> ( ab-c ) Shift 'a' right by 'b' bits
53 *|F| Shift NOS right by TOS bits
55 ******************************************************/
58 NOS
= NOS
>> TOS
; DROP
;
62 /******************************************************
63 *|G| and ( ab-c ) Perform a bitwise AND
66 *|F| Perform a bitwise AND
68 ******************************************************/
71 NOS
= TOS
& NOS
; DROP
;
75 /******************************************************
76 *|G| or ( ab-c ) Perform a bitwise OR
79 *|F| Perform a bitwise OR
81 ******************************************************/
84 NOS
= TOS
| NOS
; DROP
;
88 /******************************************************
89 *|G| xor ( ab-c ) Perform a bitwise XOR
92 *|F| Perform a bitwise XOR
94 ******************************************************/
97 NOS
= TOS
^ NOS
; DROP
;