mirror of
https://github.com/irmen/prog8.git
synced 2024-09-09 02:54:28 +00:00
identified issue with single instruction linking in vm
This commit is contained in:
parent
ce40f6f862
commit
1aaf854ef7
@ -18,7 +18,7 @@ fun stackVmMain(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val program = Program.load(args.first())
|
val program = Program.load(args.first())
|
||||||
val vm = StackVm(traceOutputFile = null)
|
val vm = StackVm(traceOutputFile = "trace.txt") // TODO null
|
||||||
val dialog = ScreenDialog()
|
val dialog = ScreenDialog()
|
||||||
vm.load(program, dialog.canvas)
|
vm.load(program, dialog.canvas)
|
||||||
EventQueue.invokeLater {
|
EventQueue.invokeLater {
|
||||||
|
@ -275,6 +275,13 @@ class Program (val name: String,
|
|||||||
|
|
||||||
|
|
||||||
private fun connect() {
|
private fun connect() {
|
||||||
|
|
||||||
|
// TODO: because of JUMP instructions, the below doesn't work
|
||||||
|
// you cannot link instructions with just 1 instruction flow
|
||||||
|
// because JUMPS to another place will cause a RETURN to return back to different locations depending on what's called it...
|
||||||
|
// probably just need a real instruction pointer (based on index?) and call stack.
|
||||||
|
|
||||||
|
|
||||||
val it1 = program.iterator()
|
val it1 = program.iterator()
|
||||||
val it2 = program.iterator()
|
val it2 = program.iterator()
|
||||||
it2.next()
|
it2.next()
|
||||||
|
Loading…
Reference in New Issue
Block a user