File: sub-routine.S

package info (click to toggle)
kuttypy 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,896 kB
  • sloc: python: 58,651; javascript: 14,686; xml: 5,767; ansic: 2,716; makefile: 453; asm: 254; sh: 48
file content (21 lines) | stat: -rw-r--r-- 374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <avr/io.h>


.section .text    ; denotes code section
.global main
  
disp:  	               ; subroutine 
    STS PORTB, R17       ; send R1 PORTB 
    RET

.global main                           
main:
     LDI  R16, 255
     STS  DDRB, R16     ; DDRB 

     LDI R17, 3              

     RCALL disp        ; relative call
     CALL  disp    ; direct call
.end