You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-28Lines changed: 58 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,36 +12,66 @@ Memory consists of three sections. Two are directly accessible by code: ROM (rx)
12
12
13
13
Code begins executing at address `0x4`. Address `0x0` must contain the size of the `.text` section (ie. `__etext`) to tell the processor how much data to decode from ROM; alternatively, it can be `0` to decode the entire ROM.
The MLOG instructions are encoded with an I-type instruction format using the _custom-0_ opcode. The zero-extended immediate is used as a minor opcode (funct12) for implementation reasons.
39
+
40
+
The MLOGSYS instruction is used for simple system controls, including halt, `printchar`, `printflush`, and `drawflush`.
41
+
42
+
| funct12 | rs1 | name |
43
+
| ------- | ------- | ------------ |
44
+
| 0 |`00000`| Halt |
45
+
| 1 | char |`printchar`|
46
+
| 2 |`00000`|`printflush`|
47
+
| 3 |`00000`|`drawflush`|
48
+
49
+
The MLOGDRAW instruction is used for drawing graphics using the Mlog `draw` instruction. Arguments are passed to this instruction using registers a0 to a5 as necessary, and any return value is placed in _rd_. If _rd_ is specified as `00000` in the below table, no value will be written to `rd` in any case.
0 commit comments