Handbook
Glossary
(emulate-DAA) ( cpu -- )
Vocabulary
cpu
.
8080
.
emulator
Inputs
cpu
an
object
Outputs
None
Definition
USING:
accessors
kernel
math
;
IN:
cpu.8080.emulator
:
(emulate-DAA)
( cpu -- )
[
dup
half-carry-flag
swap
flag-set?
swap
a>>
15
bitand
9
>
or
[
6
]
[
0
]
if
]
keep
[
a>>
+
]
keep
[
update-flags
]
2keep
[
swap
255
bitand
swap
a<<
]
keep
[
dup
carry-flag
swap
flag-set?
swap
a>>
-4
shift
15
bitand
9
>
or
[
96
]
[
0
]
if
]
keep
[
a>>
+
]
keep
[
update-flags
]
2keep
swap
255
bitand
swap
a<<
;