Skip to content
Snippets Groups Projects
Commit 69d9b719 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Notizen und Beispiele 31.5.2022

parent 29c53e6a
No related branches found
No related tags found
No related merge requests found
#include <stdint.h>
uint8_t x = 3;
int main (void)
{
x = 7;
return 1;
}
.file "variables-01.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 ; #include <stdint.h>
ldi r24,lo8(7) ;
sts x,r24 ; uint8_t x = 3;
ldi r24,lo8(1) ;
ldi r25,0 ; int main (void)
ret ; {
.size main, .-main ; x = 7;
.global x ; return 1;
.data ; }
.type x, @object
.size x, 1
x:
.byte 3
.ident "GCC: (GNU) 5.4.0"
.global __do_copy_data
#include <stdint.h>
uint8_t x = 3;
int main (void)
{
x = 7;
return 1117;
}
.file "variables-02.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 ; #include <stdint.h>
ldi r24,lo8(7) ;
sts x,r24 ; uint8_t x = 3;
ldi r24,lo8(93) ;
ldi r25,lo8(4) ; int main (void)
ret ; {
.size main, .-main ; x = 7;
.global x ; return 1117;
.data ; }
.type x, @object
.size x, 1
x:
.byte 3 ; 4 * 256 + 93 = 1117
.ident "GCC: (GNU) 5.4.0" ; daher: 4 nach r25, 93 nach r24
.global __do_copy_data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment