76 lines
1.4 KiB
C++
76 lines
1.4 KiB
C++
#include "test-common.h"
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0x0003
|
|
//
|
|
// MULT
|
|
// dst - 0, Direct
|
|
// a - 0, Direct
|
|
// b - 2, Immediate
|
|
{
|
|
foot::Emulator emu = run_instructions({ 0x00200003, 0x0B200220 });
|
|
if (!check(0x0006, emu.register_at(0))) { return 1; }
|
|
}
|
|
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0x0007
|
|
//
|
|
// CNST
|
|
// dst - 1, Direct
|
|
// imm = 0xFFF9 (-7)
|
|
//
|
|
// MULT
|
|
// dst - 0, Direct
|
|
// a - 0, Direct
|
|
// b - 1, Direct
|
|
{
|
|
foot::Emulator emu = run_instructions({ 0x00200007, 0x0021FFF9, 0x0B202120 });
|
|
if (!check(0xFFCF, emu.register_at(0))) { return 1; }
|
|
}
|
|
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0xFFF9 (-7)
|
|
//
|
|
// CNST
|
|
// dst - 1, Direct
|
|
// imm = 0xFFF9 (-7)
|
|
//
|
|
// MULT
|
|
// dst - 0, Direct
|
|
// a - 0, Direct
|
|
// b - 1, Direct
|
|
{
|
|
foot::Emulator emu = run_instructions({ 0x0020FFF9, 0x0021FFF9, 0x0B202120 });
|
|
if (!check(0x31, emu.register_at(0))) { return 1; }
|
|
}
|
|
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0x0007 (3.5)
|
|
//
|
|
// CNST
|
|
// dst - 1, Direct
|
|
// imm = 0x0007 (3.5)
|
|
//
|
|
// CONF
|
|
// dst - X, Immediate
|
|
// a - 1, Immediate
|
|
//
|
|
// MULT
|
|
// dst - 0, Direct
|
|
// a - 0, Direct
|
|
// b - 1, Direct
|
|
{
|
|
foot::Emulator emu = run_instructions({ 0x00200007, 0x00210007, 0x01000401, 0x0B202120 });
|
|
// 0x18 (12)
|
|
if (!check(0x18, emu.register_at(0))) { return 1; }
|
|
}
|
|
|
|
return 0;
|
|
}
|