Advertisement
lukhavi

Atiny2313_MatrizC++

May 6th, 2020
4,820
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 1.93 KB | None | 0 0
  1. #include <avr/io.h>
  2. int main(void){
  3. int Mat[2][2]={{18,33},
  4.                 {78,129}};
  5. return 0;
  6. }
  7.  
  8.         .file   "matriz.cpp"
  9. __SP_L__ = 0x3d
  10. __SREG__ = 0x3f
  11. __tmp_reg__ = 0
  12. __zero_reg__ = 1
  13.  
  14.         .section        .rodata
  15. .LC0:  
  16.         .word   18
  17.         .word   33
  18.         .word   78
  19.         .word   129
  20.         .text
  21. .global main
  22.         .type   main, @function
  23. main:
  24.         push r28         ;              // SP = SP-1
  25.         push r29         ;              // SP = SP-1
  26.         in r28,__SP_L__  ;              // Y = SP
  27.         clr r29  ;
  28.         subi r28,lo8(-(-8))      ; ,    // Y = Y-8
  29.         out __SP_L__,r28         ; ,    // SP = Y
  30. /* prologue: function */
  31. /* frame size = 8 */
  32. /* stack size = 10 */
  33. .L__stack_usage = 10
  34.         ldi r18,lo8(8)   ;  tmp44,      // r18 = 8
  35.         ldi r30,lo8(.LC0)        ; ,    // ZL = low(.LC0)
  36.         ldi r31,hi8(.LC0)        ; ,    // ZH = hi(.LC0)
  37.         movw r24,r28     ;  tmp46,      // r24 = Y
  38.         adiw r24,1       ;  tmp46,      // r25:r24 +1 = Y+1
  39.         movw r26,r24     ; , tmp46      // X = r27:r26 = Y+1
  40.         0:
  41.         ld r0,Z+         ;              // load r0 = datos de flash, Z =Z+1
  42.         st X+,r0         ;              // copia r0 a pila, X = X+1
  43.         dec r18  ;  tmp44               // r18--
  44.         brne 0b                         // jump to 0: if flag Z = 0
  45.         ldi r24,0        ;  D.1984      // return
  46.         ldi r25,0        ;  D.1984
  47. /* epilogue start */
  48.         subi r28,lo8(-(8))       ; ,    // Y = Y + 8
  49.         out __SP_L__,r28         ; ,    // SP = Y
  50.         pop r29  ;                      // SP = SP+1
  51.         pop r28  ;                      // SP = SP+1
  52.         ret                             //
  53.         .size   main, .-main
  54.         .ident  "GCC: (GNU) 4.8.2"
  55. .global __do_copy_data                  // Indica que haga una copia de datos de Flash a la RAM o STack
  56.                                         // antes de ejecutar cualquier codigo.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement