-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrom.cpp
More file actions
61 lines (60 loc) · 1.06 KB
/
rom.cpp
File metadata and controls
61 lines (60 loc) · 1.06 KB
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
#include<iostream>
#include"class.h"
#include"instr.h"
void rom(int n)
{
switch(n)
{
case 0:
fetch();
break;
case 1:
iopr('+'); // Immediate operation iopr
break;
case 2:
iopr('-');
break;
case 3:
iopr('^');
break;
case 4:
iopr('&');
break;
case 5:
iopr('|');
break;
case 6:
iopr('~');
break;
case 7: // STOP function
CP++; // To be finished later
return;
case 8:
// ret(); return flag function
break;
case 9:
nopr('+');
break;
case 10:
nopr('-');
break;
case 11:
nopr('^');
break;
case 12:
nopr('&');
break;
case 13:
nopr('|');
break;
case 14:
nopr('~');
break;
case 15:
movs();
break;
case 16:
movd();
break;
}
}