1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Add additional asserts.

This commit is contained in:
Thomas Harte 2021-07-21 21:47:44 -04:00
parent fe10a10ac2
commit 5401744dc0

View File

@ -254,6 +254,7 @@ struct Microcycle {
currently being read. Assumes this is a read cycle.
*/
forceinline void set_value16(uint16_t v) const {
assert(operation & Microcycle::Read);
if(operation & Microcycle::SelectWord) {
value->full = v;
} else {
@ -265,6 +266,7 @@ struct Microcycle {
Equivalent to set_value16((v << 8) | 0x00ff).
*/
forceinline void set_value8_high(uint8_t v) const {
assert(operation & Microcycle::Read);
if(operation & Microcycle::SelectWord) {
value->full = uint16_t(0x00ff | (v << 8));
} else {
@ -276,6 +278,7 @@ struct Microcycle {
Equivalent to set_value16((v) | 0xff00).
*/
forceinline void set_value8_low(uint8_t v) const {
assert(operation & Microcycle::Read);
if(operation & Microcycle::SelectWord) {
value->full = 0xff00 | v;
} else {