diff options
Diffstat (limited to '')
| -rw-r--r-- | src/cpu.ts | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -1,6 +1,6 @@ /** * AVR 8 CPU data structures - * Part of avr8js + * Part of AVR8js * * Copyright (C) 2019, Uri Shaked */ @@ -47,4 +47,20 @@ export class CPU implements ICPU { } this.data[addr] = value; } + + get SP() { + return this.dataView.getUint16(93, true); + } + + set SP(value: number) { + this.dataView.setUint16(93, value, true); + } + + get SREG() { + return this.data[95]; + } + + get interruptsEnabled() { + return this.SREG & 0x80 ? true : false; + } } |
