aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 315292e..f70fbe9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,7 +43,7 @@ void
43init_uxn() { 43init_uxn() {
44 // Initialize uxn. 44 // Initialize uxn.
45 u32 fill = 0; 45 u32 fill = 0;
46 dma_fill(uxn_ram, fill, 0x10300, 3); 46 dma_fill(uxn_ram, fill, sizeof(uxn_ram), 3);
47 // uxn_boot(u, uxn_ram, uxn_dei, uxn_deo); 47 // uxn_boot(u, uxn_ram, uxn_dei, uxn_deo);
48 48
49 // Copy rom to VM. 49 // Copy rom to VM.
@@ -52,13 +52,20 @@ init_uxn() {
52 // ADD test. 52 // ADD test.
53 0x80, 0x04, 0x80, 0x08, 0x18, // #04 #08 ADD -> 0c 53 0x80, 0x04, 0x80, 0x08, 0x18, // #04 #08 ADD -> 0c
54 0xa0, 0x00, 0x04, 0xa0, 0x00, 0x08, 0x38, // #0004 #0008 ADD2 -> 000c 54 0xa0, 0x00, 0x04, 0xa0, 0x00, 0x08, 0x38, // #0004 #0008 ADD2 -> 000c
55 0xa0, 0x00, 0xff, 0xa0, 0x00, 0x02, 0x38, // #00ff #0002 ADD2 -> 0101
55 // SUB test. 56 // SUB test.
56 0x80, 0x08, 0x80, 0x03, 0x19, // #08 #03 ADD -> 05 57 0x80, 0x08, 0x80, 0x03, 0x19, // #08 #03 SUB -> 05
57 0xa0, 0x00, 0x08, 0xa0, 0x00, 0x03, 0x39, // #0008 #0003 ADD2 -> 0005 58 0xa0, 0x00, 0x08, 0xa0, 0x00, 0x03, 0x39, // #0008 #0003 SUB2 -> 0005
59 0xa0, 0x01, 0x01, 0xa0, 0x00, 0x02, 0x39, // #0008 #0003 SUB2 -> 00ff
58 // MUL test. 60 // MUL test.
59 0x80, 0x03, 0x80, 0x04, 0x1a, // #03 #04 MUL -> 0c 61 0x80, 0x03, 0x80, 0x04, 0x1a, // #03 #04 MUL -> 0c
60 0xa0, 0x00, 0x03, 0xa0, 0x00, 0x04, 0x3a, // #0003 #0004 MUL2 -> 000c 62 0xa0, 0x00, 0x03, 0xa0, 0x00, 0x04, 0x3a, // #0003 #0004 MUL2 -> 000c
61 0xa0, 0x00, 0xff, 0xa0, 0x00, 0x02, 0x3a, // #00ff #0002 MUL2 -> 01fe 63 0xa0, 0x00, 0xff, 0xa0, 0x00, 0x02, 0x3a, // #00ff #0002 MUL2 -> 01fe
64 // INC test.
65 0x80, 0x09, 0x01, // #09 INC -> 0a
66 0xa0, 0x00, 0x09, 0x21, // #0009 INC2 -> 000a
67 0xa0, 0x00, 0xff, 0x21, // #0009 INC2 -> 0100
68 0xa0, 0x00, 0xff, 0x21, 0x21 // #0009 INC2 INC2 -> 0101
62 }; 69 };
63 memcpy(uxn_ram + PAGE_PROGRAM, uxn_rom, sizeof(uxn_rom)); 70 memcpy(uxn_ram + PAGE_PROGRAM, uxn_rom, sizeof(uxn_rom));
64} 71}