debugging positions

This commit is contained in:
Torsten Ruger
2018-05-05 19:32:01 +03:00
parent d49d2665c5
commit 43d5521cfc
9 changed files with 30 additions and 17 deletions

View File

@ -21,11 +21,16 @@ module Arm
ret
end
def set_position( position )
def set_position( position , count )
Positioned.set_position(self,position)
position += byte_length
if self.next
self.next.set_position( position )
count += 1 #assumes 4 byte instructions, as does the whole setup
if( 0 == count % 12) # 12 is the amount of instructions that fit into a BinaryCode
count = 0
position += 12 # 12=3*4 , 3 for marker,type,next words to jump over
end
self.next.set_position( position , count )
else
position
end