Main Page and SpinAsm OR: Difference between pages
(Difference between pages)
Jump to navigation
Jump to search
No edit summary Tags: Reverted Visual edit: Switched |
(Created page with "==OR== {| class="wikitable" |+ !Mnemonic !Operation !Instruction coding |- |OR |<nowiki>ACC | MASK </nowiki> |MMMMMMMMMMMMMMMMMMMMMMMM000001111 |} ======Description====== OR will perform a bit wise "or" 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 $000000 {| class="wikitable" |+ !Name !Width !Entry formats, range |- |M |24 Bit |Binary Hex ($000000 - $FFFFFF)...") |
||
Line 1: | Line 1: | ||
==OR== | |||
{| class="wikitable" | |||
|+ | |||
!Mnemonic | |||
!Operation | |||
!Instruction coding | |||
|- | |||
|OR | |||
|<nowiki>ACC | MASK </nowiki> | |||
|MMMMMMMMMMMMMMMMMMMMMMMM000001111 | |||
|} | |||
== | ======Description====== | ||
OR will perform a bit wise "or" 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 $000000 | |||
{| class="wikitable" | |||
|+ | |||
!Name | |||
!Width | |||
!Entry formats, range | |||
|- | |||
|M | |||
|24 Bit | |||
|Binary | |||
Hex ($000000 - $FFFFFF) | |||
Symbolic | |||
|} | |||
== | ======Syntax====== | ||
OR M | |||
== | ======Coding Example====== | ||
<syntaxhighlight line="1"> | |||
OMASK EQU $0F0000 ; | |||
; | |||
;------------------------------------------- | |||
sof 0,0 ; Clear all bits within ACC | |||
or $1 ; Set LSB | |||
or %10000000_00000000_00000000 ; Set MSB | |||
or OMASK ; Set ACC[19..16] | |||
and %S=[15..8] ; Set ACC[15..8] | |||
</syntaxhighlight> | |||
Revision as of 20:39, 6 January 2023
OR
Mnemonic | Operation | Instruction coding |
---|---|---|
OR | ACC | MASK | MMMMMMMMMMMMMMMMMMMMMMMM000001111 |
Description
OR will perform a bit wise "or" 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 $000000
Name | Width | Entry formats, range |
---|---|---|
M | 24 Bit | Binary
Hex ($000000 - $FFFFFF) Symbolic |
Syntax
OR M
Coding Example
OMASK EQU $0F0000 ;
;
;-------------------------------------------
sof 0,0 ; Clear all bits within ACC
or $1 ; Set LSB
or %10000000_00000000_00000000 ; Set MSB
or OMASK ; Set ACC[19..16]
and %S=[15..8] ; Set ACC[15..8]