-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathCPU.java
More file actions
52 lines (38 loc) · 1.23 KB
/
CPU.java
File metadata and controls
52 lines (38 loc) · 1.23 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
/**
* Java Grinder
* Author: Michael Kohn
* Email: mike@mikekohn.net
* Web: https://www.mikekohn.net/
* License: GPL
*
* Copyright 2014-2022 by Michael Kohn
*
*/
package net.mikekohn.java_grinder;
// This class is a bit awkward. Not sure how to make it better right now.
public class CPU
{
private CPU()
{
}
/** Set clock speed to 1MHz (internal crystal? DCO?) */
public static void setClock1() { }
/** Set clock speed to 2MHz (internal crystal? DCO?) */
public static void setClock2() { }
/** Set clock speed to 4MHz (internal crystal? DCO?) */
public static void setClock4() { }
/** Set clock speed to 8MHz (internal crystal? DCO?) */
public static void setClock8() { }
/** Set clock speed to 16MHz (internal crystal? DCO?) */
public static void setClock16() { }
/** Set clock speed to 25MHz (internal crystal? DCO?) */
public static void setClock25() { }
/** Set clock speed to XT2 (external crystal) */
public static void setClockExternal2() { }
/** Insert a CPU level NOP */
public static void nop() { }
/** Insert inline assembly */
public static void asm(String code) { }
/** Get cycle counter from CPU (if available) { } */
public static int getCycleCount() { return 0; }
}