Skip to content

Commit

Permalink
Add ELVM Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-adam committed Apr 16, 2024
1 parent b442f76 commit a56638d
Show file tree
Hide file tree
Showing 151 changed files with 56,452 additions and 236 deletions.
1 change: 1 addition & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/00exit.il
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ Exit ]
4 changes: 4 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/01putc.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ PutC
( Literal 42 )
, Exit
]
6 changes: 6 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/02mov.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[ Mov "A"
( Literal 43 )
, PutC
( Variable "A" )
, Exit
]
8 changes: 8 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/03mov_reg.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[ Mov "A"
( Literal 43 )
, Mov "B"
( Variable "A" )
, PutC
( Variable "B" )
, Exit
]
11 changes: 11 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/04getc.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[ GetC "A"
, PutC
( Variable "A" )
, GetC "B"
, PutC
( Variable "B" )
, GetC "C"
, PutC
( Variable "C" )
, Exit
]
11 changes: 11 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/05regjmp.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[ Mov "A"
( Variable "l" )
, Jmp "A"
, PutC
( Literal 78 )
, Exit
, Mark "l"
, PutC
( Literal 89 )
, Exit
]
32 changes: 32 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/06mem.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[ Mov "B"
( Literal 77 )
, Store "B"
( Literal 300 )
, Load "A"
( Literal 300 )
, Load "A"
( Literal 300 )
, PutC
( Variable "A" )
, Mov "B"
( Literal 69 )
, Store "B"
( Literal 30 )
, Store "B"
( Literal 30 )
, Load "A"
( Literal 30 )
, PutC
( Variable "A" )
, Add "A"
( Literal 8 )
, PutC
( Variable "A" )
, Load "A"
( Literal 556 )
, Add "A"
( Literal 10 )
, PutC
( Variable "A" )
, Exit
]
38 changes: 38 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/07mem.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[ Mov "B"
( Literal 77 )
, Store "B"
( Literal 300 )
, Mov "C"
( Literal 300 )
, Load "A"
( Variable "C" )
, Load "A"
( Variable "C" )
, PutC
( Variable "A" )
, Mov "B"
( Literal 69 )
, Mov "C"
( Literal 30 )
, Store "B"
( Variable "C" )
, Store "B"
( Variable "C" )
, Load "A"
( Variable "C" )
, Load "A"
( Variable "C" )
, PutC
( Variable "A" )
, Add "A"
( Literal 8 )
, PutC
( Variable "A" )
, Load "A"
( Literal 556 )
, Add "A"
( Literal 10 )
, PutC
( Variable "A" )
, Exit
]
18 changes: 18 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/08data.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[ PText
, Mov "B"
( Variable "val" )
, Load "A"
( Variable "B" )
, PutC
( Variable "A" )
, Add "B"
( Literal 1 )
, Load "A"
( Variable "B" )
, PutC
( Variable "A" )
, Exit
, PData Nothing
, Mark "val"
, PString "hi"
]
8 changes: 8 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/add_self.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[ Mov "A"
( Literal 33 )
, Add "A"
( Variable "A" )
, PutC
( Variable "A" )
, Exit
]
27 changes: 27 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/basic.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[ Mov "A"
( Literal 33 )
, PutC
( Variable "A" )
, Mov "B"
( Variable "A" )
, PutC
( Variable "B" )
, Add "B"
( Variable "A" )
, Add "B"
( Literal
( -2 )
)
, PutC
( Variable "B" )
, PutC
( Literal 88 )
, Add "A"
( Literal
( -23 )
)
, Dump
, PutC
( Variable "A" )
, Exit
]
12 changes: 12 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/bug_cmp.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[ Mov "A"
( Literal 300 )
, J CGT "ok" "A"
( Literal 255 )
, PutC
( Literal 120 )
, Exit
, Mark "ok"
, PutC
( Literal 111 )
, Exit
]
10 changes: 10 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/echo.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[ Mark "loop"
, GetC "A"
, J CEQ "done" "A"
( Literal 0 )
, PutC
( Variable "A" )
, Jmp "loop"
, Mark "done"
, Exit
]
1 change: 1 addition & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/sub.il
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
12 changes: 12 additions & 0 deletions .output/actual/eir/il/parseAssemblyApp/from-elvm/sub_bug.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[ Mov "A"
( Literal 81920 )
, Sub "A"
( Literal 81920 )
, L CEQ "A"
( Literal 0 )
, Add "A"
( Literal 48 )
, PutC
( Variable "A" )
, Exit
]
Loading

0 comments on commit a56638d

Please sign in to comment.