

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


.org 0x ;Setting I/O register C and D for input LDI R16,0X OUT DDRC,R LDI R16,0X OUT DDRD,R ;Setting I/O register B for output LDI R16,0xFF OUT DDRB,R ;getting input from I/O ports IN R18, PINC IN R19,PIND ;multiplying the numbers and then storing R0 and R MUL R18,R ; Then copying the LSB and MSB from R0 and R1 to given adresses STS 0x50,R STS 0x51,R ;Output LSB to I/O register B OUT PORTB,R
- DEC R20 ; - BRNE LOOP1 ;2/ - DEC R21 ; - BRNE LOOP2 ;2/ - RET ;