Created
May 9, 2017 22:38
-
-
Save AbstractBeliefs/da9f4103d3ceef348dba433a57bbbe5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pollux: ~ ⌚ 23:37:40 | |
$ cat main.c | |
#include <avr/io.h> | |
void main(){ | |
while (1){ | |
PORTC |= 2; | |
} | |
} | |
pollux: ~ ⌚ 23:37:42 | |
$ avr-gcc -mmcu=atmega328p -O3 -S main.c | |
pollux: ~ ⌚ 23:37:46 | |
$ cat main.s | |
.file "main.c" | |
__SP_H__ = 0x3e | |
__SP_L__ = 0x3d | |
__SREG__ = 0x3f | |
__tmp_reg__ = 0 | |
__zero_reg__ = 1 | |
.section .text.startup,"ax",@progbits | |
.global main | |
.type main, @function | |
main: | |
/* prologue: function */ | |
/* frame size = 0 */ | |
/* stack size = 0 */ | |
.L__stack_usage = 0 | |
.L2: | |
sbi 0x8,1 /* look here, and here: https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/include/avr/iom328p.h#L102 */ | |
rjmp .L2 | |
.size main, .-main | |
.ident "GCC: (GNU) 4.8.1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment