diff options
Diffstat (limited to 'comp')
-rw-r--r-- | comp/work/18/1.s | 1 | ||||
-rw-r--r-- | comp/work/18/2.s | 6 | ||||
-rw-r--r-- | comp/work/18/3.s | 9 | ||||
-rw-r--r-- | comp/work/18/4.s | 3 | ||||
-rw-r--r-- | comp/work/18/5.s | 2 | ||||
-rw-r--r-- | comp/work/18/6.s | 6 |
6 files changed, 27 insertions, 0 deletions
diff --git a/comp/work/18/1.s b/comp/work/18/1.s new file mode 100644 index 0000000..85c2acd --- /dev/null +++ b/comp/work/18/1.s @@ -0,0 +1 @@ +ADD R2, R0, R1 diff --git a/comp/work/18/2.s b/comp/work/18/2.s new file mode 100644 index 0000000..7a0e8a5 --- /dev/null +++ b/comp/work/18/2.s @@ -0,0 +1,6 @@ +MOV R1, R0 + +ADD R5, R0, R1 +ADD R5, R5, R1 +ADD R5, R5, R1 + diff --git a/comp/work/18/3.s b/comp/work/18/3.s new file mode 100644 index 0000000..cbd9075 --- /dev/null +++ b/comp/work/18/3.s @@ -0,0 +1,9 @@ +loop: + SUB R0, R0, 5 + CMP R0, #5 + BLT end + ADD R1, R1, 1 + B loop + +end: + STR R1, 101 diff --git a/comp/work/18/4.s b/comp/work/18/4.s new file mode 100644 index 0000000..8a5ad8a --- /dev/null +++ b/comp/work/18/4.s @@ -0,0 +1,3 @@ +LDR R0, 100 +LSR R0, R0, #1 +STR R0, 101 diff --git a/comp/work/18/5.s b/comp/work/18/5.s new file mode 100644 index 0000000..a3f5ee3 --- /dev/null +++ b/comp/work/18/5.s @@ -0,0 +1,2 @@ +LSL R0, R0, #2 +STR R0, 101 diff --git a/comp/work/18/6.s b/comp/work/18/6.s new file mode 100644 index 0000000..5e41863 --- /dev/null +++ b/comp/work/18/6.s @@ -0,0 +1,6 @@ +LDR 105, R0 +LSL R0, R0, 7 +LSR R0, R0, 7 + +STR R0, 102 + |