SpinAsm AND

From PedalPCB Wiki
Revision as of 20:20, 6 January 2023 by PedalPCB (talk | contribs) (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 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 !Ent...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

<syntaxhighlight line="1"> Off EQU 1.0  ;

                               ; 
Halve way rectifier ­­­­­­­­

sof 0,0  ; Clear ACC rdax ADCL,1.0  ; Read from left ADC channel sof 1.0,Off  ; Subtract offset sof 1.0,Off  ; Add offset </syntaxhighlight>