and-byte ( lhs rhs cpu -- result )


Vocabulary
cpu.8080.emulator

Definition
USING: kernel math ;

IN: cpu.8080.emulator

: and-byte ( lhs rhs cpu -- result )
[ drop bit3or ] 3keep [ bitand ] dip [ update-flags ] 2keep
[ carry-flag clear-flag ] keep rot 0 =
[ half-carry-flag set-flag ] [ half-carry-flag clear-flag ]
if 255 bitand ;