Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
.orig x3000
|
||||
LD R1, x ; get x
|
||||
LD R2, y ; get y
|
||||
NOT R0, R2 ; R0 = ~y
|
||||
ADD R0, R0, 1 ; R0 = -y
|
||||
ADD R0, R0, R1 ; R0 = x - y
|
||||
BRZ BRANCH ; if (x == y) { go to BRANCH }
|
||||
LEA R0, nottaken
|
||||
PUTS ; else print "Branch Not Taken!"
|
||||
BR END
|
||||
BRANCH
|
||||
LEA R0, taken
|
||||
PUTS ; print "Branch Taken!"
|
||||
END HALT
|
||||
x .fill 1
|
||||
y .fill 1
|
||||
taken .stringz "Branch Taken!"
|
||||
nottaken .stringz "Branch Not Taken!"
|
||||
.end
|
||||
Loading…
Add table
Add a link
Reference in a new issue