def read(self, size = -<NUM_LIT:1>):
if size < -<NUM_LIT:1>:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if size == -<NUM_LIT:1>:<EOL><INDENT>t = self.current_segment.remaining_len(self.current_position)<EOL>if not t:<EOL><INDENT>return None<EOL><DEDENT>old_new_pos = self.current_position<EOL>self.current_position = self.current_segment.end_address<EOL>return self.current_segment.data[old_new_pos - self.current_segment.start_address:]<EOL><DEDENT>t = self.current_position + size<EOL>if not self.current_segment.inrange(t):<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>old_new_pos = self.current_position<EOL>self.current_position = t  <EOL>return self.current_segment.data[old_new_pos - self.current_segment.start_address :t - self.current_segment.start_address]<EOL>
Returns data bytes of size size from the current segment. If size is -1 it returns all the remaining data bytes from memory segment