foot/emulator/tests/srsh-instruction.cpp
shylie 060ca1d3cd
All checks were successful
Test / build (push) Successful in 8s
Add more tests, prep for graphical output
2025-07-08 11:53:56 -04:00

32 lines
593 B
C++

#include "test-common.h"
int main(int argc, char** argv)
{
// CNST
// dst - 0, Direct
// imm - 0x4567
//
// SRSH
// dst - 0, Direct
// a - 0, Direct
// b - 2, Immediate
{
foot::Emulator emu = run_instructions({ 0x00204567, 0x06200220 });
if (!check(0x4567 >> 2, emu.register_at(0))) { return 1; }
}
// CNST
// dst - 0, Direct
// imm - 0x8000
//
// SRSH
// dst - 0, Direct
// a - 0, Direct
{
foot::Emulator emu = run_instructions({ 0x00208000, 0x06200220 });
if (!check((-0x8000) >> 2, emu.register_at(0))) { return 1; }
}
return 0;
}