DPDT ON/ON/ON as 3-way Switch and SpinAsm AND: Difference between pages

From PedalPCB Wiki
(Difference between pages)
Jump to navigation Jump to search
(Created page with "File:DPDT-3-Way-Switch.png")
 
 
Line 1: Line 1:
[[File:DPDT-3-Way-Switch.png]]
==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 24­bit 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
!Entry formats, range
|-
|M
|24 Bit
|Binary
Hex ($000000 - $FFFFFF)
Symbolic
|}
 
======Syntax======
AND M
 
======Coding Example======
<syntaxhighlight line="1">
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
</syntaxhighlight>

Revision as of 20:21, 6 January 2023

AND

Mnemonic Operation Instruction coding
AND ACC & MASK MMMMMMMMMMMMMMMMMMMMMMMM000001110
Description

AND will perform a bit wise "and" of the current ACC and the 24­bit 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)

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