From 14d88ae54bdd2a824b4172308366a3e513b29de9 Mon Sep 17 00:00:00 2001 From: Michael Abed Date: Fri, 27 Jan 2012 01:22:46 -0500 Subject: initial commit --- problem4.asm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 problem4.asm (limited to 'problem4.asm') 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 + -- cgit v1.2.3