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 /problem1.asm | |
| download | ec327-hw1-14d88ae54bdd2a824b4172308366a3e513b29de9.tar.gz ec327-hw1-14d88ae54bdd2a824b4172308366a3e513b29de9.tar.bz2 ec327-hw1-14d88ae54bdd2a824b4172308366a3e513b29de9.zip | |
initial commit
Diffstat (limited to 'problem1.asm')
| -rw-r--r-- | problem1.asm | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/problem1.asm b/problem1.asm new file mode 100644 index 0000000..e35d134 --- /dev/null +++ b/problem1.asm @@ -0,0 +1,18 @@ +; (a-b)*c +    mov R5, 1 +    mov R1, [R5] +    inc R5 +    mov R2, [R5] +    inc R5 +    mov R3, [R5] +    sub R1, R2 +    mov R2, 1 +    mov R1, R4 +loop: +    inc R2 +    add R1, R4 +    cmp R2, R3 +    jne loop +    mov R2, 0x1E +    mov [R2], R1 +    halt | 
