Skip to content

Commit b1974fa

Browse files
Update CPU.ino
1 parent cce3ceb commit b1974fa

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

SinclairScientific1/CPU.ino

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,27 @@
77
// The goal of this project is to run the following simulator: http://righto.com/sinclair
88
// on an arduino nano powered custom pcb resembling the original Sinclair Scientific Calculator
99
// @arduinoenigma 2018
10+
//
11+
// BUG: play with .display = 0 to see what ia the absolute minimum that works
12+
//
1013

11-
//BUG: play with .display = 0 to see what ia the absolute minimum that works
12-
13-
boolean opsWithK(byte opcode) {
14-
14+
boolean opsWithK(byte opcode)
15+
{
1516
return (LISTOPSWITHK & (1UL << opcode));
1617
}
1718

18-
unsigned int getInstruction(unsigned int PC) {
19-
19+
unsigned int getInstruction(unsigned int PC)
20+
{
2021
return pgm_read_word_near(objectCode + PC);
2122
}
2223

23-
byte getMaskNum() {
24-
24+
byte getMaskNum()
25+
{
2526
return getInstruction(SinclairData.address) & 0x0f;
2627
}
2728

28-
char *getMask() {
29-
29+
char *getMask()
30+
{
3031
unsigned int instruction = getInstruction(SinclairData.address);
3132
byte classBits = instruction >> 9;
3233
byte opcode = (instruction >> 4) & 0x1f;

0 commit comments

Comments
 (0)