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: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4751

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

Re: AFUGABE3 - mcpaste

Re: AFUGABE3

Von Lars Keim, 8 Jahre vorher, geschrieben in ARM Assembler, aufgerufen 1'830 mal. Dieser Paste ist eine Antwort auf AFUGABE3 von HUMPALUM!!!!! - Unterschiede zeigen
URL https://mcpaste.de/view/9df5d1f5 Einbetten
Paste herunterladen oder Rohtext anzeigen
  1. // Loesung Aufgabe 3 und 4 von Termin4 Rechnerarchitektur SS2013
  2. // Name:        Matrikelnummer:
  3. // Name:        Matrikelnummer:
  4. // Datum:
  5.         .file "aufgabe3.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.                         @ unteren 2 Bit sind 0
  9.         .global main    @ nimmt das Symbol main in die globale Sysmboltabelle auf
  10.         .type main,function
  11. main:
  12.         stmfd sp!, {r4, r5, lr} @ Ruecksprungadresse und Register sichern
  13. kopieren:
  14. @ hier Ihr Programm zum Kopieren einer Byte-Tabelle (je 8Bit) in eine Word-Tabelle (je 32Bit) einfuegen
  15.  .copy: LDR r1, TAB1
  16.         LDR r2, TAB2
  17.        
  18.         LDRB r3,[r1],#1
  19.         STR r3,[r2],#4 
  20.  .loop: LDRB r0,[r1],#1
  21.         MOV r4,r0
  22.         MOVS r0,r0,LSL#25
  23.         BCC  .pos
  24.         MVN r9,#0xFF
  25.         ORR r0,r0,r9
  26.         ADD r0,r0,r4
  27.         B .fert
  28.                
  29.  .pos:  MOV r0,r4
  30.  .fert: STR r0,[r2],#4
  31.         SUBS r3,r3,#1
  32.         BNE .loop
  33.  
  34. vorzeichen:
  35. @ hier Ihr Programm um die 8Bit-Zahlen auf vorzeichenrichtige 32Bit-Zahlen zu wandeln
  36.  
  37.                
  38.        
  39. sortieren:
  40. @ hier Ihr Programm um die vorzeichenrichtige Zahlen in Liste2 zu sortieren
  41. .bblsrt: LDR r4,TAB2
  42.         LDR r5,[r4]
  43.         sub r4,r4,#4   
  44.         ADD r6,r4,r5,LSL#2
  45. .2:     MOV r7,r6
  46.         SUB r7,r7,#4
  47.         LDR r8,[r6]
  48. .1:     LDR r9,[r7]
  49.         CMP r8,r9
  50.         BMI .nicht
  51.         STR R8,[R7]
  52.         MOV R8,R9
  53. .nicht: SUB r7,r7,#4
  54.         CMP R7,R4
  55.         bne .1
  56.         ADD R4,R4,#4
  57.         CMP R4,R6
  58.         bne .2
  59.        
  60. fertig:
  61.         ldmfd sp!, {r4, r5, pc} @ Ruecksprungadresse und Register
  62.  
  63. TAB2: .word Liste2 @ Beispiel um an Adressen aus anderen Segmenten zu kommen
  64. TAB1: .word Liste1
  65. .Lfe1:
  66.         .size main,.Lfe1-main
  67.  
  68. // .data-Section fuer initialisierte Daten
  69.         .data
  70. // Erster Wert der Tabelle steht fuer die Anzahl (max. 64) der Werte der Tabelle
  71. Liste1: .byte (Liste1Ende-Liste1), -9, 8, -7, 6, -5, 4, -3, 2, -1, 0, 127, 128
  72. Liste1Ende:
  73.  
  74. // .comm-Section fuer nicht initialisierte Daten
  75.         .comm Liste2, ((Liste1Ende-Liste1)*4)   @ Speicherbereich mit der Groesse*4 von Liste1 reservieren
  76.  
  77. // End of File
  78.  

Antwort auf "Re: AFUGABE3"

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