File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ module StackVM
99 include Utils
1010
1111 debug_program = Array (UInt8 | UInt16 | UInt32 | UInt64 ){
12- LOADI , DWORD , 0xff _u32,
13- LOADI , DWORD , 0xff _u32,
14- RPOP , R0 | M_C ,
15- RPOP , R0 | M_C | M_H ,
12+ LOADI , QWORD , 0xff _u64,
13+ LOADI , QWORD , 0xff _u64,
14+ RPOP , R0 ,
15+ RPOP , R1 ,
16+ RPUSH , R0 ,
17+ RPUSH , R1 ,
1618 HALT
1719 }
1820
Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ module StackVM::Machine::Utils
2020 loop do
2121 ip = @machine .regs[Reg ::IP ]
2222 address = render_hex @machine .regs[Reg ::IP ], 8 , :red
23+ frame_pointer = render_hex @machine .regs[Reg ::FP ], 8 , :green
2324
24- command = Readline .readline " [#{ address } ]> " , true
25+ command = Readline .readline " [#{ frame_pointer } : #{ address } ]> " , true
2526
2627 case command
2728 when " h" , " help"
You can’t perform that action at this time.
0 commit comments