Skip to content

erdbeermiah/Java-Dcpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages