EasyManuals Logo

Atmel AVR User Manual

Atmel AVR
191 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #126 background imageLoading...
Page #126 background image
82. MULS – Multiply Signed
82.1. Description
This instruction performs 8-bit × 8-bit → 16-bit signed multiplication.
Rd Rr R1 R0
Multiplicand
×
Multiplier
Product High Product Low
8 8 16
The multiplicand Rd and the multiplier Rr are two registers containing signed numbers. The 16-bit signed
product is placed in R1 (high byte) and R0 (low byte).
This instruction is not available in all devices. Refer to the device specific instruction set summary.
Operation:
(i) R1:R0 ← Rd × Rr (signed ← signed × signed)
Syntax: Operands: Program Counter:
(i) MULS Rd,Rr 16 ≤ d ≤ 31, 16 ≤ r ≤ 31 PC ← PC + 1
16-bit Opcode:
0000 0010 dddd rrrr
82.2. Status Register (SREG) and Boolean Formula
I T H S V N Z C
C R15
Z R15 • R14 • R13 • R12 • R11 • R10 • R9 • R8R7 • R6 • R5 • R4 • R3 • R2 • R1 • R0
Set if the result is $0000; cleared otherwise.
R (Result) equals R1,R0 after the operation.
Example:
muls r21,r20 ; Multiply signed r21 and r20
mov w r20,r0 ; Copy result back in r21:r20
Words 1 (2 bytes)
Cycles 1
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
126

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR and is the answer not in the manual?

Atmel AVR Specifications

General IconGeneral
Architecture8-bit RISC
SRAMUp to 16 KB
Clock SpeedUp to 20 MHz
Operating Voltage1.8V to 5.5V
ADC10-bit ADC
Communication InterfacesSPI, I2C, USB
PackagesDIP, SOIC, QFN
Special FeaturesWatchdog Timer
Flash Memory1KB to 256KB
EEPROM64B to 4KB

Related product manuals