Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <avr/io.h>
- int main(void){
- int Mat[2][2]={{18,33},
- {78,129}};
- return 0;
- }
- .file "matriz.cpp"
- __SP_L__ = 0x3d
- __SREG__ = 0x3f
- __tmp_reg__ = 0
- __zero_reg__ = 1
- .section .rodata
- .LC0:
- .word 18
- .word 33
- .word 78
- .word 129
- .text
- .global main
- .type main, @function
- main:
- push r28 ; // SP = SP-1
- push r29 ; // SP = SP-1
- in r28,__SP_L__ ; // Y = SP
- clr r29 ;
- subi r28,lo8(-(-8)) ; , // Y = Y-8
- out __SP_L__,r28 ; , // SP = Y
- /* prologue: function */
- /* frame size = 8 */
- /* stack size = 10 */
- .L__stack_usage = 10
- ldi r18,lo8(8) ; tmp44, // r18 = 8
- ldi r30,lo8(.LC0) ; , // ZL = low(.LC0)
- ldi r31,hi8(.LC0) ; , // ZH = hi(.LC0)
- movw r24,r28 ; tmp46, // r24 = Y
- adiw r24,1 ; tmp46, // r25:r24 +1 = Y+1
- movw r26,r24 ; , tmp46 // X = r27:r26 = Y+1
- 0:
- ld r0,Z+ ; // load r0 = datos de flash, Z =Z+1
- st X+,r0 ; // copia r0 a pila, X = X+1
- dec r18 ; tmp44 // r18--
- brne 0b // jump to 0: if flag Z = 0
- ldi r24,0 ; D.1984 // return
- ldi r25,0 ; D.1984
- /* epilogue start */
- subi r28,lo8(-(8)) ; , // Y = Y + 8
- out __SP_L__,r28 ; , // SP = Y
- pop r29 ; // SP = SP+1
- pop r28 ; // SP = SP+1
- ret //
- .size main, .-main
- .ident "GCC: (GNU) 4.8.2"
- .global __do_copy_data // Indica que haga una copia de datos de Flash a la RAM o STack
- // antes de ejecutar cualquier codigo.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement