diff options
| author | Uri Shaked | 2019-11-27 09:42:08 +0200 |
|---|---|---|
| committer | Uri Shaked | 2019-11-27 09:42:08 +0200 |
| commit | d8d169566094c70417c646275b51918458f98dbf (patch) | |
| tree | b487976bfedc19cb7509c59793d10ad4ddb8962f /src/cpu.spec.ts | |
| parent | chore: release 0.3.0 (diff) | |
| download | avr8js-d8d169566094c70417c646275b51918458f98dbf.tar.gz avr8js-d8d169566094c70417c646275b51918458f98dbf.tar.bz2 avr8js-d8d169566094c70417c646275b51918458f98dbf.zip | |
fix: SP not initialized on reset
close #2
Diffstat (limited to 'src/cpu.spec.ts')
| -rw-r--r-- | src/cpu.spec.ts | 8 |
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); + }); +}); |
