SpinAsm AND: Difference between revisions
Jump to navigation
Jump to search
Created page with "==AND== {| class="wikitable" |+ !Mnemonic !Operation !Instruction coding |- |AND |ACC & MASK |MMMMMMMMMMMMMMMMMMMMMMMM000001110 |} ======Description====== AND will perform a bit wise "and" of the current ACC and the 24bit MASK specified within the instruction word. The instruction might be used to load a constant into ACC provided ACC contains $FFFFFF or to clear ACC if MASK equals $000000. (see also the pseudo opcode section) {| class="wikitable" |+ !Name !Width !Ent..." |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
======Description====== | ======Description====== | ||
AND will perform a bit wise "and" of the current ACC and the 24bit MASK specified within the instruction word. The instruction might be used to load a constant into ACC provided ACC contains $FFFFFF or to clear ACC if MASK equals $000000. (see also the pseudo opcode section) | AND will perform a bit wise "and" of the current ACC and the 24bit MASK specified within the instruction word. The instruction might be used to load a constant into ACC provided ACC contains $FFFFFF or to clear ACC if MASK equals $000000. (see also the pseudo opcode section) | ||
====== Parameters ====== | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
Line 23: | Line 25: | ||
|Binary | |Binary | ||
Hex ($000000 - $FFFFFF) | Hex ($000000 - $FFFFFF) | ||
Symbolic | Symbolic | ||
|} | |} | ||
Line 30: | Line 33: | ||
======Coding Example====== | ======Coding Example====== | ||
< | <pre> | ||
AMASK EQU $F0FFFF ; | |||
; | |||
; | ;------------------------------------ | ||
or $FFFFFF ; Set all bits within ACC | |||
and $FFFFFE ; Clear LSB | |||
and %01111111_11111111_11111111 ; Clear MSB | |||
and AMASK ; Clear ACC[19..16] | |||
</ | and $0 ; Clear ACC | ||
</pre> |
Latest revision as of 13:46, 22 November 2024
AND
Mnemonic | Operation | Instruction coding |
---|---|---|
AND | ACC & MASK | MMMMMMMMMMMMMMMMMMMMMMMM000001110 |
Description
AND will perform a bit wise "and" of the current ACC and the 24bit MASK specified within the instruction word. The instruction might be used to load a constant into ACC provided ACC contains $FFFFFF or to clear ACC if MASK equals $000000. (see also the pseudo opcode section)
Parameters
Name | Width | Entry formats, range |
---|---|---|
M | 24 Bit | Binary
Hex ($000000 - $FFFFFF) Symbolic |
Syntax
AND M
Coding Example
AMASK EQU $F0FFFF ; ; ;------------------------------------ or $FFFFFF ; Set all bits within ACC and $FFFFFE ; Clear LSB and %01111111_11111111_11111111 ; Clear MSB and AMASK ; Clear ACC[19..16] and $0 ; Clear ACC