Simplify processor bus access a little by further allowing register16_t address access.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2018-08-29 13:52:25 +01:00
parent 46b140dda1
commit 97272d650d
6 changed files with 13 additions and 10 deletions
+3 -3
View File
@@ -48,7 +48,7 @@ EightBit::register16_t EightBit::LittleEndianProcessor::popWord() {
}
EightBit::register16_t EightBit::LittleEndianProcessor::peekWord(const register16_t address) {
const auto low = BUS().peek(address.word);
const auto high = BUS().peek(address.word + 1);
return register16_t(low, high).word;
const auto low = BUS().peek(address);
const auto high = BUS().peek(address + 1);
return register16_t(low, high);
}