aboutsummaryrefslogtreecommitdiff
path: root/src/cpu.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cpu.spec.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cpu.spec.ts b/src/cpu.spec.ts
new file mode 100644
index 0000000..92df7ee
--- /dev/null
+++ b/src/cpu.spec.ts
@@ -0,0 +1,8 @@
+import { CPU } from './cpu';
+
+describe('cpu', () => {
+ it('should set initial value of SP to the last address of internal SRAM', () => {
+ const cpu = new CPU(new Uint16Array(1024), 0x1000);
+ expect(cpu.SP).toEqual(0x10ff);
+ });
+});