-
Notifications
You must be signed in to change notification settings - Fork 2
/
asm.txt
29 lines (29 loc) · 836 Bytes
/
asm.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
lw R2 0(R5)
lw R3 0(R6)
add R1 R2 R3
addi r0 r0 1 #r0=1
addi r1 r1 2 #r1=2
addi r2 r2 3 #r2=3
addi r3 r3 4 #r3=4
addi r4 r4 5 #r4=5
addi r5 r5 6 #r5=6
sub r6 r1 r0 #r6=r1-r0=1
add r7 r1 r2 #r7=r1+r2=5
and r8 r2 r3 #r8=r2&r3=3&4=0
or r9 r2 r3 #r9=3&4=7
sw r3 8[r10] #M[r10+8]=r3
lw r11 8[r10] #r11=M[r10+8]
sub r1 r1 r1
sub r2 r2 r2
sll r12 r4 r0 #r12=r4<<r0=5<<1
sra r13 r4 r0 #r13=r4>>r0=5>>1
beq r0 r6 24 #since right now, r0==r6, branching will happen
addi r0 r0 1 #r0=1
addi r1 r1 2 #r1=2
addi r2 r2 3 #r2=3
addi r3 r3 4 #r3=4
addi r4 r4 5 #r4=5
addi r5 r5 6 #r5=6
loadnoc r4 r25 #8
sendnoc
halt