mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
94 lines
1.2 KiB
C
94 lines
1.2 KiB
C
// The OS/K Team licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
#include <in/instrs.h>
|
|
|
|
IMPL_START_1(not)
|
|
{
|
|
v1 = ~v1;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
IMPL_START_2(test)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
SET_ZSF(v1 & v2);
|
|
}
|
|
IMPL_END;
|
|
|
|
IMPL_START_2(and)
|
|
{
|
|
v1 &= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(andf)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
v1 &= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
IMPL_START_2(or)
|
|
{
|
|
v1 |= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(orf)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
v1 |= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
IMPL_START_2(xor)
|
|
{
|
|
v1 ^= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(xorf)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
v1 ^= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
IMPL_START_2(shl)
|
|
{
|
|
v1 <<= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(shlf)
|
|
{
|
|
v1 <<= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
IMPL_START_2(shr)
|
|
{
|
|
v1 >>= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(shrf)
|
|
{
|
|
v1 >>= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|