rewrite, its now a vm for a shitty subset of assembly

This commit is contained in:
2026-09-09 00:45:52 -05:00
parent d261a49213
commit a71d73e19d
76 changed files with 703 additions and 99 deletions
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2" os="windows" target="SDL2.dll"/>
<dllmap dll="SDL2" os="osx" target="libSDL2.dylib"/>
<dllmap dll="SDL2" os="linux" target="libSDL2-2.0.so.0"/>
</configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
[0] :: variables
[1] NVAR var1, 12 :: Create 'var1' with value of '12'
[2] NVAR var2, 10 :: Create 'var2' with value of '10'
[3] NVAR outcome, 0 :: Create 'outcome' with value of '0'
[4] JMP 8 :: Jump to line 8
[5]
[6]
[7] :: setup
[8] SEA var1 :: Set Accumulator to 'var1' (12)
[9] LDX :: Load Accumulator (12) into X
[10] SEA var2 :: Set Accumulator to 'var2' (10)
[11] LDY :: Load Accumulator (10) into Y
[12] ADD :: Add X (12) and Y (10) and store into the Accumulator (22)
[13] SVAR outcome, ACC :: Set variable 'outcome' to '0'
[14] SEA outcome :: Set Accumulator to 'outcome' (0)
[15] STA 4 :: Store the Accumulator (0) into Memory address 4
[16] PRM 4 :: Print value of memory address 4
[17] JMP 21 :: Jump to line 21
[18]
[19]
[20] :: end
[21] RVAR var1 :: Remove variable 'var1'
[22] RVAR var2 :: Remove variable 'var2'
[23] RVAR outcome :: Remove variable 'outcome'
[24] HLT :: Halt execution
+25
View File
@@ -0,0 +1,25 @@
:: variables
NVAR var1, 12
NVAR var2, 10
NVAR outcome, 0
JMP 8
:: setup
SEA var1
LDX
SEA var2
LDY
ADD
SVAR outcome, ACC
SEA outcome
STA 4
PRM 4
JMP 21
:: end
RVAR var1
RVAR var2
RVAR outcome
HLT
+25
View File
@@ -0,0 +1,25 @@
[0] :: variables
[1] NVAR var1, 12 :: Create 'var1' with value of '12'
[2] NVAR var2, 10 :: Create 'var2' with value of '10'
[3] NVAR outcome, 0 :: Create 'outcome' with value of '0'
[4] JMP 8 :: Jump to line 8
[5]
[6]
[7] :: setup
[8] SEA var1 :: Set Accumulator to 'var1' (12)
[9] LDX :: Load Accumulator (12) into X
[10] SEA var2 :: Set Accumulator to 'var2' (10)
[11] LDY :: Load Accumulator (10) into Y
[12] ADD :: Add X (12) and Y (10) and store into the Accumulator (22)
[13] SVAR outcome, ACC :: Set variable 'outcome' to '0'
[14] SEA outcome :: Set Accumulator to 'outcome' (0)
[15] STA 4 :: Store the Accumulator (0) into Memory address 4
[16] PRM 4 :: Print value of memory address 4
[17] JMP 21 :: Jump to line 21
[18]
[19]
[20] :: end
[21] RVAR var1 :: Remove variable 'var1'
[22] RVAR var2 :: Remove variable 'var2'
[23] RVAR outcome :: Remove variable 'outcome'
[24] HLT :: Halt execution