Commit Graph

14 Commits

Author SHA1 Message Date
Torsten Ruger
a8453c126d use arm shift at runtime
arm indexes are in bytes (x4) at compile time
but at runtime we only have the array indexes, iw word indexes
arm has the nice barrel shifter to save us an extra instruction
2015-11-19 12:48:13 +02:00
Torsten Ruger
249f43ad34 translate and interpret new instructions 2015-11-19 10:09:55 +02:00
Torsten Ruger
303b7eb1f8 putstring unfolds length
which means sys call doesn’t need to
and also interpreter sometimes gets a symbol length
2015-11-16 18:03:29 +02:00
Torsten Ruger
f50d7b57a4 fix the putstring sys call indexing
index 0 is the marker word , so like in some, all indexes 1 based
works :-)
2015-11-15 22:03:06 +02:00
Torsten Ruger
8e82da0b61 fix arm (assembled) indexing
by having a dummy 0 index in salaam. when assembled
2015-11-15 20:42:07 +02:00
Torsten Ruger
458610b970 implement string length 2015-11-15 11:28:16 +02:00
Torsten Ruger
b30cf21bbd fix arm indexes
needs rethought
fixed for static use, but what about dynamic
2015-11-15 00:35:12 +02:00
Torsten Ruger
6127d92ca9 implement arm branches
which backfired into interpreter as
plus actually means 0 or plus in arm
may still change back but for now
2015-11-14 00:20:03 +02:00
Torsten Ruger
6f0d6d831e update arm and implement most operators
multiplication wasn’t implemented
and division isn’t part if arm
neither is rotate by register
2015-11-12 20:02:14 +02:00
Torsten Ruger
c38775e933 add set_internal
and the set_slot with register
very much like the get_slot for get_internal
2015-11-08 17:10:36 +02:00
Torsten Ruger
484e2d19d4 allow for registers in get slot 2015-11-07 19:38:03 +02:00
Torsten Ruger
c15445a958 let labels be constants 2015-11-03 16:20:25 +02:00
Torsten Ruger
3774f8a5a2 use translator and remove passes
the only passes that were left were reg -> arm
those are almost completely one to one, so the idea of passes didn’t fit
2015-10-24 17:11:18 +03:00
Torsten Ruger
a871f96630 remove passes and achieve the same by translating 2015-10-24 11:42:36 +03:00