blob: ee4571b4e7652869a63f22a64c314197d54e2e13 (
plain) (
blame)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
// license:BSD-3-Clause
// copyright-holders:hap
// SM500 opcode handlers
#include "sm500.h"
// instruction set
// RAM address instructions
void sm500_device::op_lb()
{
// LB x: load BM/BL with 4-bit immediate value (partial)
// BL bit 2 is clearned, bit 3 is param bit 2|3
m_bm = (m_op & 3);
m_bl = ((m_op << 1 | m_op) & 8) | (m_op >> 2 & 3);
}
void sm500_device::op_incb()
{
// INCB: increment BL, skip next on overflow, of 3rd bit!
m_bl = (m_bl + 1) & 0xf;
m_skip = (m_bl == 8);
}
// ROM address instructions
void sm500_device::op_comcb()
{
}
void sm500_device::op_ssr()
{
}
void sm500_device::op_trs()
{
}
// Arithmetic instructions
// Data transfer instructions
void sm500_device::op_pdtw()
{
}
void sm500_device::op_tw()
{
}
void sm500_device::op_dtw()
{
}
// I/O instructions
void sm500_device::op_ats()
{
}
void sm500_device::op_exksa()
{
}
void sm500_device::op_exkfa()
{
}
// Divider manipulation instructions
// Bit manipulation instructions
void sm500_device::op_rmf()
{
}
void sm500_device::op_smf()
{
}
void sm500_device::op_comcn()
{
}
// Test instructions
|