#!/bin/sh
. Common

asm "AND reg[expr],expr (carry remains unset)" <<EOF
	and	reg[0],0x50
	halt
EOF
sim <<EOF
reg[0x100] = 0x3f
CPU_F_Carry = 0
CPU_F_XIO = 1
run
reg[0x100]
CPU_F_Zero
CPU_F_Carry
.
@
EOF
expect <<EOF
HALT
0x10 16
0x0 0
0x0 0
0x4 4
0x12 18
EOF
