Added unfinished code to instructions

This commit is contained in:
2026-03-31 11:21:35 -06:00
parent 6ac82b47e7
commit 4e1a601175
2 changed files with 89 additions and 0 deletions

View File

@@ -9,18 +9,69 @@ namespace spider {
void CPU::STB() {
// TODO: Implement STB
fetchOperSrc();
fetchOperDst();
switch(_size){
case 0b00: //byte
_dst->_u8 = 1;
case 0b01: //short
_dst->_u16 = 1;
case 0b10: //int
_dst->_u32 = 1;
case 0b11: //long
_dst->_u64 = 1;
}
(this->*_post)();
}
void CPU::CRB() {
// TODO: Implement CRB
fetchOperSrc();
fetchOperDst();
switch(_size){
case 0b00: //byte
_dst->_u8 = 1;
case 0b01: //short
_dst->_u16 = 1;
case 0b10: //int
_dst->_u32 = 1;
case 0b11: //long
_dst->_u64 = 1;
}
(this->*_post)();
}
void CPU::TSB() {
// TODO: Implement TSB
fetchOperSrc();
fetchOperDst();
switch(_size){
case 0b00: //byte
_dst->_u8 = 1;
case 0b01: //short
_dst->_u16 = 1;
case 0b10: //int
_dst->_u32 = 1;
case 0b11: //long
_dst->_u64 = 1;
}
(this->*_post)();
}
void CPU::BOOL() {
// TODO: Implement BOOL
fetchOperDst();
switch(_size){
case 0b00: //byte
_dst->_u8 = 1;
case 0b01: //short
_dst->_u16 = 1;
case 0b10: //int
_dst->_u32 = 1;
case 0b11: //long
_dst->_u64 = 1;
}
(this->*_post)();
}
void CPU::NOT() {