A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

fibo.S - mcpaste

fibo.S

Von MC_J, 10 Jahre vorher, geschrieben in Plain Text, aufgerufen 1'625 mal.
URL https://mcpaste.de/view/83bbd154 Einbetten
Paste herunterladen oder Rohtext anzeigen
  1. @ Name:         Matrikelnummer:
  2. @ Name:         Matrikelnummer:
  3. @ Datum:
  4.  
  5.         .file   "fibo.S"
  6.         .text                   @ legt eine Textsection fuer PrgrammCode + Konstanten an
  7.         .align  2               @ sorgt dafuer, dass nachfolgende Anweisungen auf einer durch 4 teilbaren Adresse liegen
  8.                                 @ d.h. die unteren 2 Bit sind 0
  9.         .global fiborec         @ nimmt das Symbol fiborec in die globale Sysmboltabelle auf
  10.         .type   fiborec,function
  11. fiborec:
  12.         @  Code für fiborec
  13.                 STMFD   sp!,{r4-r10,fp} @Register 4-10 sowie fp und sp sichern
  14.                 MOV     r3, LR
  15. fibojmp:       
  16.                 CMP     r0, #1
  17.                 MOVLE   r1, r0
  18.                 MOVLE   PC, LR  @ return
  19.                 STMFD   sp!, {LR}
  20.                 SUB     r0, r0, #2
  21.                 BL      fibojmp
  22.                 STMFD   sp!, {r1}
  23.                 ADD     r0, r0, #1
  24.                 BL      fibojmp
  25.                 LDMFD   sp!,{r2}
  26.                 ADD     r1,r1,r2
  27.                 ADD     r0,r0,#1
  28.                 LDMFD   sp,{r4}
  29.                 CMP     r3, r4
  30.                 BEQ     ende
  31.                 LDMFD   sp!,{PC}
  32.  
  33. ende:           MOV     r0, r1
  34.                 ADD     sp, sp, #4
  35.                 LDMFD   sp!,{r4-r10,fp} @Register vom Stack wiederherstellen.                  
  36.                 MOV     PC, r3         
  37.                
  38. .Lfe1:
  39.         .size   fiborec,.Lfe1-fiborec
  40.        
  41.         .global fiboiter        @ nimmt das Symbol fiboiter in die globale Sysmboltabelle auf
  42.         .type   fiboiter,function      
  43. fiboiter:
  44.         @  Code für fiboiter
  45.                 MOV             r1, #0
  46.                 MOV             r2, #1
  47.                 MOV             r3, #0
  48.                 CMP             r0, #0
  49.                 BEQ             .return
  50.                 CMP             r0, #1
  51.                 BEQ             .return
  52. .fibo: 
  53.                 SUB             r0, #1                  @Iterative Berechnung
  54.                 CMP             r0, #0
  55.                 MOVEQ           r0, r3
  56.                 BEQ             .return
  57.                 ADD             r3, r2, r1
  58.                 MOV             r1, r2
  59.                 MOV             r2, r3
  60.                 B               .fibo
  61.                
  62.  
  63.                
  64. .return:
  65.                 MOV     PC, LR                          @Programm verlassen.
  66.  
  67. .Lfe2:
  68.         .size   fiboiter,.Lfe2-fiboiter
  69.  
  70.         .global fiboreccache    @ nimmt das Symbol fiboreccache in die globale Sysmboltabelle auf
  71.         .type   fiboreccache,function
  72. fiboreccache:          
  73.         @  Code für fiboreccache
  74.        
  75.                        
  76.                 STMFD   sp!,{r4-r10,fp} @Register 4-10 sowie fp und sp sichern
  77.                 MOV     r3, LR
  78.                 LDR     r5, =Arrayrec
  79.                 MOV     r7, r0, LSL #2
  80.                 ADD     r6, r5, r7
  81.                 LDR     r8, [r6]
  82.                 CMP     r8, #0
  83.                 BEQ     fibojmpcache
  84.                 MOV     r0, r8
  85.                 B       .exit0
  86.                
  87. fibojmpcache:  
  88.                 CMP     r0, #1
  89.                 MOVLE   r1, r0
  90.                 STR     r0, [r6]
  91.                 MOVLE   PC, LR  @ return
  92.                 STMFD   sp!, {LR}
  93.                 SUB     r0, r0, #2
  94.                 BL      fibojmpcache
  95.                 STMFD   sp!, {r1}
  96.                 ADD     r0, r0, #1
  97.                 BL      fibojmpcache
  98.                 LDMFD   sp!,{r2}
  99.                 ADD     r1,r1,r2
  100.                 ADD     r0,r0,#1
  101.                 LDMFD   sp,{r4}
  102.                 CMP     r3, r4
  103.                 BEQ     endecache
  104.                 LDMFD   sp!,{PC}
  105.  
  106. endecache:      MOV     r0, r1
  107.                 STR     r0, [r6]
  108.                 ADD     sp, sp, #4
  109. .exit0:         LDMFD   sp!,{r4-r10,fp} @Register vom Stack wiederherstellen.                  
  110.                 MOV     PC, r3
  111.  
  112. Arrayrec: .skip 11 * 4 
  113.                                        
  114. .Lfe3:
  115.         .size   fiboreccache,.Lfe3-fiboreccache
  116.  
  117.         .global fiboitercache   @ nimmt das Symbol fiboitercache in die globale Sysmboltabelle auf
  118.         .type   fiboitercache,function
  119. fiboitercache:
  120. @  Code für fiboitercache
  121.                 STMFD           sp!,{r4-r10,fp} @Register 4-10 sowie fp und sp sichern
  122.                 LDR             r4, =fiboliste
  123.                 MOV             r5, r0, LSL#2
  124.                 ADD             r6, r4, r5
  125.                 LDR             r7, [r6]
  126.                 CMP             r7, #0
  127.                 BEQ             fiboiterhelp
  128.                 MOV             r0, r7
  129.                 B               .return4
  130.                
  131. fiboiterhelp:   MOV             r1, #0
  132.                 MOV             r2, #1
  133.                 MOV             r3, #0
  134.                 MOV             r9, #1
  135.                 CMP             r0, #0
  136.                 BEQ             .return3
  137.                 CMP             r0, #1
  138.                 BEQ             .return4
  139. .fibo3:
  140.                 SUB             r0, #1                  @Iterative Berechnung
  141.                 ADD             r9, #1
  142.                 CMP             r0, #0
  143.                 MOVEQ           r0, r3
  144.                 BEQ             .return3
  145.                 ADD             r3, r2, r1
  146.                 STR             r3, [r4, r9, LSL#2]
  147.                 MOV             r1, r2
  148.                 MOV             r2, r3
  149.                 B               .fibo3
  150.                
  151.  
  152.                
  153. .return3:
  154.                 STR     r0, [r6]
  155. .return4:       LDMFD   sp!,{r4-r10,fp} @Register vom Stack wiederherstellen.
  156.                 MOV     PC, LR                          @Programm verlassen.
  157.  
  158.  
  159. .Lfe4:
  160.         .size   fiboitercache,.Lfe4-fiboitercache
  161.        
  162. .data  
  163.                         .align  2      
  164. fiboliste:      .space 100*4, 0
  165.                
  166. .end                    @ End of File
  167.  

Antwort auf "fibo.S"

Hier kannst Du auf den Paste von oben antworten

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876