summaryrefslogtreecommitdiff
path: root/ROMs/logictest.c
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
commit18868128e18d38b706e7df14e8e683e1a9739c17 (patch)
tree6f0e0e5eee646f10cbad9c0c89c24d330bc58cc6 /ROMs/logictest.c
parentd87ab8af4c86a3fc6ee237444e372d87e536e3ef (diff)
chore: Initial commit
Diffstat (limited to 'ROMs/logictest.c')
-rw-r--r--ROMs/logictest.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/ROMs/logictest.c b/ROMs/logictest.c
deleted file mode 100644
index f2ef6d9..0000000
--- a/ROMs/logictest.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "std.c"
-#include "screen.c"
-
-int main()
-{
- // Test values
- char a = 0b10101010; // 170
- char b = 0b11001100; // 204
- char c;
-
- // AND
- c = a & b; // expect 0b10001000 = 136
- *((char*)0x7100) = c;
-
- // OR
- c = a | b; // expect 0b11101110 = 238
- *((char*)0x7101) = c;
-
- // XOR
- c = a ^ b; // expect 0b01100110 = 102
- *((char*)0x7102) = c;
-
- // NOT
- c = ~a; // expect 0b01010101 = 85
- *((char*)0x7103) = c;
-
- // SHL
- c = a << 2; // expect 0b10101000 = 168
- *((char*)0x7104) = c;
-
- // SHR
- c = a >> 2; // expect 0b00101010 = 42
- *((char*)0x7105) = c;
-
- // Program ends cleanly
- return 0;
-} \ No newline at end of file