Mercurial > repos > simple16
diff src/cpu.h @ 46:51672bd41cdd
Rework data segment setup to allow a stack segment and to add space for push and pop instructions
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 30 Aug 2016 20:50:54 -0700 |
parents | 6e7bfe83d2b0 |
children |
line wrap: on
line diff
--- a/src/cpu.h Mon Aug 29 21:17:41 2016 -0700 +++ b/src/cpu.h Tue Aug 30 20:50:54 2016 -0700 @@ -34,13 +34,11 @@ uint16_t regs[16]; uint16_t exception; uint16_t exception_pc; - uint16_t exception_pch; uint16_t exception_sr; uint16_t exception_ur; uint16_t vector_base; uint32_t pc_msb; - uint32_t data_low_msb; - uint32_t data_high_msb; + uint32_t exception_pc_msb; uint16_t prefetch; @@ -103,10 +101,12 @@ enum { RETI, TRAPI, + PUSH, + POP, + GETPCH, + SETPCH, GETEPC, SETEPC, - GETEPCH, - SETEPCH, GETESR, SETESR, GETEUR, @@ -115,8 +115,6 @@ SETENUM, GETVBR, SETVBR, - GETDATABANKS, - SETDATABANKS, }; enum { @@ -132,6 +130,8 @@ COND_LEQ }; +#define REG_DB 12 +#define REG_SP 13 #define REG_PC 14 #define REG_SR 15