Skip to content

Commit 83993de

Browse files
committed
M: update README.md, add usage tutorial & output example
1 parent 7d98822 commit 83993de

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,47 @@
2121
还是有一些东西我自我感觉很难处理,比如标号……
2222

2323
所以就先这样吧,其他有时间再说。
24+
25+
## 四、一开始居然忘了
26+
27+
### 1. 使用方法
28+
29+
```shell
30+
python main.py -d file_path_to_disassembly -o output_file_path
31+
```
32+
33+
要注意这里的输入文件不是简单的 `*.coe` 文件,需要把正常 `*.coe` 文件前两行去掉!
34+
35+
### 2. 使用例
36+
37+
```bash
38+
-----
39+
|---main.py
40+
|---tools
41+
|---mips_31_mars_simulate.txt
42+
```
43+
44+
需要注意的是这里的输入为:
45+
46+
![coe->txt](img/coe.png)
47+
48+
没有前面两行的:
49+
50+
```txt
51+
memory_initialization_radix = 16;
52+
memory_initialization_vector =
53+
```
54+
55+
还请认真比较与真正的 `*.coe` 文件的差别:
56+
57+
![真正的 coe](img/true_coe.png)
58+
59+
之后切换到 `main.py` 所在路径下,在终端运行:
60+
61+
```shell
62+
python main.py -d mips_31_mars_simulate.coe -o output.txt
63+
```
64+
65+
短暂地运行后,当前目录就会有非常 `nice` 的输出文件啦!
66+
67+
![nice!](img/nice.png)

img/coe.png

9 KB
Loading

img/nice.png

36.5 KB
Loading

img/true_coe.png

16.5 KB
Loading

0 commit comments

Comments
 (0)