diff options
Diffstat (limited to 'problem4.asm')
-rw-r--r-- | problem4.asm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/problem4.asm b/problem4.asm new file mode 100644 index 0000000..50dd510 --- /dev/null +++ b/problem4.asm @@ -0,0 +1,23 @@ + +; n^m n at 1, m at 2. both unsigned + + mov R0, 0x1 + mov R1, 0x2 + mov R0, [R0] + mov R1, [R1] + mov R4, R0 + mov R3, 1 +outer: + mov R2, 1 + inc R3 +inner: + inc R2 + add R0, R4 + cmp R2, R4 + jne inner + cmp R3, R1 + jne outer + mov R2, 0x1E + mov [R2], R0 + halt + |