naloga_05
This commit is contained in:
parent
3d325f02fe
commit
844a8fd108
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_add_16bit.s
Normal file
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_add_16bit.s
Normal file
|
@ -0,0 +1,22 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .hword 10
|
||||
stev2: .hword 5
|
||||
rez: .space 2
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev1
|
||||
ldrh r1, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldrh r2, [r0]
|
||||
|
||||
add r1, r2
|
||||
|
||||
adr r0, rez
|
||||
str r1, [r0]
|
20
sprotne_naloge/naloga_05/vaja_01/vaja_01_add_32bit.s
Normal file
20
sprotne_naloge/naloga_05/vaja_01/vaja_01_add_32bit.s
Normal file
|
@ -0,0 +1,20 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .word 10
|
||||
stev2: .word 5
|
||||
rez: .space 4
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev1
|
||||
ldr r1, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldr r2, [r0]
|
||||
|
||||
add r1, r2
|
||||
|
||||
adr r0, rez
|
||||
str r1, [r0]
|
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_add_8bit.s
Normal file
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_add_8bit.s
Normal file
|
@ -0,0 +1,22 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .byte 10
|
||||
stev2: .byte 5
|
||||
rez: .space 1
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev1
|
||||
ldrb r1, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldrb r2, [r0]
|
||||
|
||||
add r1, r2
|
||||
|
||||
adr r0, rez
|
||||
str r1, [r0]
|
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_sub_16bit.s
Normal file
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_sub_16bit.s
Normal file
|
@ -0,0 +1,22 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .hword 10
|
||||
stev2: .hword 5
|
||||
rez: .space 2
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev1
|
||||
ldrh r1, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldrh r2, [r0]
|
||||
|
||||
sub r1, r2
|
||||
|
||||
adr r0, rez
|
||||
str r1, [r0]
|
20
sprotne_naloge/naloga_05/vaja_01/vaja_01_sub_32bit.s
Normal file
20
sprotne_naloge/naloga_05/vaja_01/vaja_01_sub_32bit.s
Normal file
|
@ -0,0 +1,20 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .word 10
|
||||
stev2: .word 5
|
||||
rez: .space 4
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev1
|
||||
ldr r1, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldr r2, [r0]
|
||||
|
||||
sub r1, r2
|
||||
|
||||
adr r0, rez
|
||||
str r1, [r0]
|
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_sub_8bit.s
Normal file
22
sprotne_naloge/naloga_05/vaja_01/vaja_01_sub_8bit.s
Normal file
|
@ -0,0 +1,22 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .byte 10
|
||||
stev2: .byte 5
|
||||
rez: .space 1
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev1
|
||||
ldrb r1, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldrb r2, [r0]
|
||||
|
||||
sub r1, r2
|
||||
|
||||
adr r0, rez
|
||||
str r1, [r0]
|
25
sprotne_naloge/naloga_05/vaja_02.s
Normal file
25
sprotne_naloge/naloga_05/vaja_02.s
Normal file
|
@ -0,0 +1,25 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .word 0x50
|
||||
stev2: .word 100
|
||||
stev3: .word 0x2f
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev3
|
||||
ldr r3, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldr r2, [r0]
|
||||
|
||||
adr r0, stev1
|
||||
ldr r1, [r0]
|
||||
|
||||
add r2, r3
|
||||
sub r1, r2, r1
|
||||
|
||||
str r1, [r0]
|
24
sprotne_naloge/naloga_05/vaja_03.s
Normal file
24
sprotne_naloge/naloga_05/vaja_03.s
Normal file
|
@ -0,0 +1,24 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .word 0x12345678
|
||||
stev2: .byte 128
|
||||
.align
|
||||
stev3: .hword 0xf123
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev1
|
||||
ldr r1, [r0]
|
||||
|
||||
adr r0, stev2
|
||||
ldrb r2, [r0]
|
||||
|
||||
ldrsb r3, [r0]
|
||||
|
||||
adr r0, stev3
|
||||
ldrh r4, [r0]
|
||||
|
||||
ldrsh r5, [r0]
|
20
sprotne_naloge/naloga_05/vaja_04/vaja_04_a.s
Normal file
20
sprotne_naloge/naloga_05/vaja_04/vaja_04_a.s
Normal file
|
@ -0,0 +1,20 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .byte 15
|
||||
stev2: .byte 130
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev2
|
||||
ldrb r2, [r0]
|
||||
|
||||
adr r0, stev1
|
||||
ldrb r1, [r0]
|
||||
|
||||
add r1, r2
|
||||
|
||||
str r1, [r0]
|
20
sprotne_naloge/naloga_05/vaja_04/vaja_04_b.s
Normal file
20
sprotne_naloge/naloga_05/vaja_04/vaja_04_b.s
Normal file
|
@ -0,0 +1,20 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .byte 15
|
||||
stev2: .byte 130
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev2
|
||||
ldrsb r2, [r0]
|
||||
|
||||
adr r0, stev1
|
||||
ldrsb r1, [r0]
|
||||
|
||||
add r1, r2
|
||||
|
||||
str r1, [r0]
|
20
sprotne_naloge/naloga_05/vaja_04/vaja_04_c.s
Normal file
20
sprotne_naloge/naloga_05/vaja_04/vaja_04_c.s
Normal file
|
@ -0,0 +1,20 @@
|
|||
.text
|
||||
.org 0x20
|
||||
|
||||
stev1: .word 128
|
||||
stev2: .byte 128
|
||||
|
||||
.align
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
adr r0, stev2
|
||||
ldrb r2, [r0]
|
||||
|
||||
adr r0, stev1
|
||||
ldrb r1, [r0]
|
||||
|
||||
add r1, r2
|
||||
|
||||
str r1, [r0]
|
Loading…
Reference in New Issue
Block a user