log clear log mode commands :start set linedelay 5 readmem $x1 0x06898178 F readmem $y1 0x06898174 F readmem $x2 0x0016F388 F readmem $y2 0x0016F384 F set $zero 0 set $x1 $x1 set $y1 $y1 set $x2 $x2 set $y2 $y2 set #distance point_distance (x1 y1 x2 y2) set $x1Frac frac ($x1) while size ($x1Frac) < 3 set $x1Frac $x1Frac$zero end_while set #x1Int trunc ($x1) * 1000 + $x1Frac set $y1Frac frac ($y1) while size ($y1Frac) < 3 set $y1Frac $y1Frac$zero end_while set #y1Int trunc ($y1) * 1000 + $y1Frac set $x2Frac frac ($x2) while size ($x2Frac) < 3 set $x2Frac $x2Frac$zero end_while set #x2Int trunc ($x2) * 1000 + $x2Frac set $y2Frac frac ($y2) while size ($y2Frac) < 3 set $y2Frac $y2Frac$zero end_while set #y2Int trunc ($y2) * 1000 + $y2Frac set #distance round (point_distance (#x1Int #y1Int #x2Int #y2Int)) log #distance log $x1 $y1 $x2 $y2 log #x1Int #y1Int #x2Int #y2Int goto start