102 lines
1.0 KiB
Plaintext
102 lines
1.0 KiB
Plaintext
|
1. vaja
|
||
|
|
||
|
.text
|
||
|
.org 0x20
|
||
|
stev1: .word 0x00000001
|
||
|
stev2: .word 0x00000002
|
||
|
|
||
|
.global _start
|
||
|
_start:
|
||
|
|
||
|
adr r0, stev1
|
||
|
|
||
|
ldrh r1, [r0]
|
||
|
ldrh r2, [r0, #4]
|
||
|
|
||
|
str r2, [r0]
|
||
|
str r1, [r0, #4]
|
||
|
|
||
|
|
||
|
2. vaja
|
||
|
|
||
|
.text
|
||
|
.org 0x20
|
||
|
|
||
|
tabela: .space 5
|
||
|
|
||
|
.align
|
||
|
|
||
|
.global _start
|
||
|
_start:
|
||
|
|
||
|
adr r0, tabela
|
||
|
|
||
|
mov r1, #0xffffffff
|
||
|
|
||
|
str r1, [r0]
|
||
|
strb r1, [r0, #4]
|
||
|
|
||
|
|
||
|
3. vaja
|
||
|
|
||
|
.text
|
||
|
.org 0x20
|
||
|
|
||
|
tabela: .space 6
|
||
|
|
||
|
.align
|
||
|
|
||
|
.global _start
|
||
|
_start:
|
||
|
|
||
|
adr r0, tabela
|
||
|
|
||
|
ldr r1, =0x04030201
|
||
|
str r1, [r0]
|
||
|
|
||
|
ldrh r1, =0x0605
|
||
|
str r1, [r0, #4]
|
||
|
|
||
|
@ zamenjaj 1. <-> 6.
|
||
|
ldrb r1, [r0]
|
||
|
ldrb r2, [r0, #5]
|
||
|
strb r2, [r0]
|
||
|
strb r1, [r0, #5]
|
||
|
|
||
|
@ zamenjaj 2. <-> 5.
|
||
|
ldrb r1, [r0, #1]
|
||
|
ldrb r2, [r0, #4]
|
||
|
strb r2, [r0, #1]
|
||
|
strb r1, [r0, #4]
|
||
|
|
||
|
@ zamenjaj 3. <-> 4.
|
||
|
ldrb r1, [r0, #2]
|
||
|
ldrb r2, [r0, #3]
|
||
|
strb r2, [r0, #2]
|
||
|
strb r1, [r0, #3]
|
||
|
|
||
|
|
||
|
4. vaja
|
||
|
|
||
|
.text
|
||
|
.org 0x20
|
||
|
|
||
|
stev1: .word 0x01020304
|
||
|
|
||
|
.align
|
||
|
|
||
|
.global _start
|
||
|
_start:
|
||
|
|
||
|
adr r0, stev1
|
||
|
|
||
|
ldrb r1, [r0]
|
||
|
ldrb r2, [r0, #3]
|
||
|
strb r2, [r0]
|
||
|
strb r1, [r0, #3]
|
||
|
|
||
|
ldrb r1, [r0, #1]
|
||
|
ldrb r2, [r0, #2]
|
||
|
strb r2, [r0, #1]
|
||
|
strb r1, [r0, #2]
|
||
|
|