I need to multiply two unsigned numbers(in this case the numbers are 234 and 24), however I have no idea how to do it. I need to multiply them without using registers R16, R17 and R18(the registers are present in the code bellow). I tried to multiply them by just typing mul 234, 24
, however ATMEL studios tells me that the numbers are invalid registers. The microcontroller is ATmega8.
;
; Vjezba_1.asm
;
; Created: 4/29/2020 8:57:18 PM
; Author : Ilario
;
//1. zad
.DEF rez = R18
.DEF op1 = R17
.DEF op2 = R16
//2. zad
ldi op1, 67
ldi op2, 76
ldi rez, 0
//3. zad
Inc op1
add rez, op1
add rez, op2
//4. zad
dec rez
sub rez, op2
//5. zad
add 0x0F1AC2, 0xA2320F
//6. zad
mul 234, 24
start:
inc r16
rjmp start