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
21
Task/Even-or-odd/LC3-Assembly/even-or-odd.lc3
Normal file
21
Task/Even-or-odd/LC3-Assembly/even-or-odd.lc3
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
.ORIG 0x3000
|
||||
|
||||
LD R0,NUM
|
||||
AND R1,R0,1
|
||||
BRZ EVEN
|
||||
|
||||
LEA R0,ODD
|
||||
BRNZP DISP
|
||||
|
||||
EVEN LEA R0,EVN
|
||||
|
||||
DISP PUTS
|
||||
|
||||
HALT
|
||||
|
||||
NUM .FILL 0x1C
|
||||
|
||||
EVN .STRINGZ "EVEN\n"
|
||||
ODD .STRINGZ "ODD\n"
|
||||
|
||||
.END
|
||||
Loading…
Add table
Add a link
Reference in a new issue