| 1 |
|
| 2 |
#include <avr/io.h> |
| 3 |
|
| 4 |
|
| 5 |
.section .text ; denotes code section |
| 6 |
.global main |
| 7 |
|
| 8 |
disp: ; subroutine |
| 9 |
STS PORTB, R17 ; send R1 PORTB |
| 10 |
RET |
| 11 |
|
| 12 |
.global main |
| 13 |
main: |
| 14 |
LDI R16, 255 |
| 15 |
STS DDRB, R16 ; DDRB |
| 16 |
|
| 17 |
LDI R17, 3 |
| 18 |
|
| 19 |
RCALL disp ; relative call |
| 20 |
CALL disp ; direct call |
| 21 |
.end |