28 lines
505 B
C++
28 lines
505 B
C++
#include <foot-emulator.h>
|
|
#include "test-common.h"
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0xFFFF
|
|
{
|
|
foot::Emulator emu = run_instruction(0x0020FFFF);
|
|
if (emu.register_at(0) != 0xFFFF) { return 1; }
|
|
}
|
|
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0xFFFF
|
|
//
|
|
// CNST
|
|
// dst - 0, Indirect
|
|
// imm = 0x7777
|
|
{
|
|
foot::Emulator emu = run_instructions({ 0x0020FFFF, 0x00807777 });
|
|
if (emu.memory_at(0xFFFF) != 0x7777) { return 1; }
|
|
}
|
|
|
|
return 0;
|
|
}
|