forked from erdbeermiah/Java-Dcpu
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
48 lines (36 loc) · 1.4 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
LET THERE BE COMPILER ^.^ (with missing features :-[... but i need it for unit tests)
Input:
SET A, 0x1
:loop
MUL A, 0x2
IFN A, 0x4
SET PC, loop
Output:
30721 1 30724 2 30733 4 33217
Execution output:
|_OP_|_A__|_B__|||__PC__|__SP__|__OV__|__A___|__B___|__C___|__X___|__Y___|__Z___|__I___|__J___|
| 04 | 00 | 1E ||| 0002 | 0000 | 0000 | 0001 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 |
| 0D | 00 | 1E ||| 0004 | 0000 | 0000 | 0002 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 |
| 01 | 1C | 20 ||| 0006 | 0000 | 0000 | 0002 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 |
| 04 | 00 | 1E ||| 0002 | 0000 | 0000 | 0002 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 |
| 0D | 00 | 1E ||| 0004 | 0000 | 0000 | 0004 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 |
| 00 | 00 | 00 ||| 0007 | 0000 | 0000 | 0004 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 |
===========================
Compiler infos
- Working lables (:jump)
- Missing variable evaluations for
- 0x10-0x17: [next word + register]
- 0x1f: next word (literal)
- 0x20-0x3f: literal value 0x00-0x1f (literal)
- Missing opcode evaluation for 0x0
- ugly code :)
===========================
Just another DCPU implementation.
Language: Java
Inspiration: https://github.com/swetland/dcpu16
: http://0x10c.com/
: http://0x10c.com/doc/dcpu-16.txt
>> TODO <<
- Unit tests
- A lot of funny stuff ^.^
gz Miah