diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-06-27 21:56:05 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-06-27 21:56:05 +0100 |
| commit | 6f87feb0c835589adcd566323e058a9158860071 (patch) | |
| tree | 2ccfd21db561892d6b1ec1d3209f0dc72a00151b /src/main/kotlin/cpu/Registers.kt | |
| parent | 155c200400ac80be1113e35df6637e2f77296d1a (diff) | |
| download | KGB-6f87feb0c835589adcd566323e058a9158860071.tar.xz KGB-6f87feb0c835589adcd566323e058a9158860071.zip | |
Add 16-Bit pop commands
Diffstat (limited to 'src/main/kotlin/cpu/Registers.kt')
| -rw-r--r-- | src/main/kotlin/cpu/Registers.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/cpu/Registers.kt b/src/main/kotlin/cpu/Registers.kt index 5f45e87..70c7f06 100644 --- a/src/main/kotlin/cpu/Registers.kt +++ b/src/main/kotlin/cpu/Registers.kt @@ -123,4 +123,12 @@ class Registers { } } + fun getAndIncrementSP(): Int { + val currentSP = SP + if(SP < 0xFFFF) { + SP++ + } + return currentSP + } + }
\ No newline at end of file |