inital commit кек
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"opcode": 0,
|
||||
"mnemonic": "NOP",
|
||||
"args": [],
|
||||
"cycles": 1,
|
||||
"semantics": [
|
||||
{"op": "nop"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 1,
|
||||
"mnemonic": "MOV_A_B",
|
||||
"cycles": 1,
|
||||
"semantics": [
|
||||
{"op": "copy", "from": "b", "to": "a"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 2,
|
||||
"mnemonic": "MOV_IMM_A",
|
||||
"cycles": 1,
|
||||
"semantics": [
|
||||
{"op": "load_imm", "to": "a", "value": "$next"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 3,
|
||||
"mnemonic": "ADD_A_B",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "add", "from": "b", "to": "a", "result": "a"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 4,
|
||||
"mnemonic": "SUB_A_B",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "sub", "from": "a", "to": "b", "result": "a"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 5,
|
||||
"mnemonic": "JMP_A",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "jmp", "to": "a"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 6,
|
||||
"mnemonic": "JZ_A",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "jcc", "to": "a", "condition": "zero,1"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 7,
|
||||
"mnemonic": "JC_A",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "jcc", "to": "a", "condition": "carry,1"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 8,
|
||||
"mnemonic": "CMP_A_B",
|
||||
"cycles": 1,
|
||||
"semantics": [
|
||||
{"op": "cmp", "from": "a", "to": "b"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 9,
|
||||
"mnemonic": "MOV_IMM_B",
|
||||
"cycles": 1,
|
||||
"semantics": [
|
||||
{"op": "load_imm", "to": "b", "value": "$next"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 10,
|
||||
"mnemonic": "STORE_A",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "store", "from": "a", "to": "mem[$next]"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 11,
|
||||
"mnemonic": "LOAD_A",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "load", "from": "mem[$next]", "to": "a"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 12,
|
||||
"mnemonic": "JMP_IMM",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "jmp_imm"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 13,
|
||||
"mnemonic": "JZ_IMM",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "jcc_imm", "condition": "zero,1"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 14,
|
||||
"mnemonic": "JC_IMM",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "jcc_imm", "condition": "carry,1"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 15,
|
||||
"mnemonic": "INC_A",
|
||||
"cycles": 1,
|
||||
"semantics": [
|
||||
{"op": "inc", "from": "a", "to": "a"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 16,
|
||||
"mnemonic": "CALL_IMM",
|
||||
"cycles": 3,
|
||||
"semantics": [
|
||||
{"op": "call", "to": "$next"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"opcode": 17,
|
||||
"mnemonic": "RET",
|
||||
"cycles": 2,
|
||||
"semantics": [
|
||||
{"op": "ret"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"opcode": 255,
|
||||
"mnemonic": "HLT",
|
||||
"args": [],
|
||||
"cycles": 1,
|
||||
"semantics": [
|
||||
{"op": "nop"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"memory_read": [0x01, 0x00],
|
||||
"memory_write": [0x02, 0x00],
|
||||
"io_read": [0x03],
|
||||
"io_write": [0x04]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "TinyCPU",
|
||||
"arch": "tiny-8bit",
|
||||
"module_type": "cpu",
|
||||
"version": 1,
|
||||
"tdp": 5.0,
|
||||
"memory_size": 65536,
|
||||
"frequency": 1000000,
|
||||
"description": "Minimal 8-bit CPU for CBE Platform"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"a": 0,
|
||||
"b": 0,
|
||||
"c": 0,
|
||||
"d": 0,
|
||||
"pc": 0,
|
||||
"sp": 0,
|
||||
"carry": 0,
|
||||
"zero": 0
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user