Skip to content

Commit 421c9db

Browse files
committed
Create Input_Output
Put following text (not in comments) in txt file input.txt. Given assembly code is to find 10! Output file will have corresponding machine code
1 parent 34b7ee1 commit 421c9db

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Input_Output

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* Following code is given as input file to program to find factorial of 10
2+
* Instruction sets are defined in code itself(in comments)
3+
*/
4+
5+
movi 2 10
6+
movi 6 1
7+
movi 7 1
8+
fact
9+
slt 2 7
10+
beq exit
11+
mul 6 6 2
12+
sub 2 2 7
13+
jmp fact
14+
exit
15+
16+
17+
/* Corresponding machine code generated for given input is stored in output file.
18+
* For above input machine code generated is
19+
*/
20+
21+
1010010000001010
22+
1010110000000001
23+
1010111000000001
24+
1111111111111111
25+
1111010111000000
26+
1110000000001010
27+
0010110110010000
28+
0001010010111000
29+
0111000000000100
30+
1111111111111111

0 commit comments

Comments
 (0)