diff options
author | Michael Abed <michaelabed@gmail.com> | 2012-01-27 01:22:46 -0500 |
---|---|---|
committer | Michael Abed <michaelabed@gmail.com> | 2012-01-27 01:22:46 -0500 |
commit | 14d88ae54bdd2a824b4172308366a3e513b29de9 (patch) | |
tree | b03ec96bd13ad22d6a6b4b984fb58cd73faea670 /problem4.asm | |
download | ec327-hw1-14d88ae54bdd2a824b4172308366a3e513b29de9.tar.gz ec327-hw1-14d88ae54bdd2a824b4172308366a3e513b29de9.tar.bz2 ec327-hw1-14d88ae54bdd2a824b4172308366a3e513b29de9.zip |
initial commit
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 + |