;Entry_JITBREAKPOINT
;-------------------
;Sets the JIT breakpoint address
;
;Entry:
; R0 - Command tail
; R12 - pointer to module private word

.Entry_JITBREAKPOINT
 STMFD   R13!, {R0-R8, R14}

 MOV     R1, R0				;command tail
 MOV     R0, #16			;base 16 number with restricted range
 SWI     XOS_ReadUnsigned		;read the value PRM1-460
 ADDVS   R13, R13, #4			;drop R0
 LDMVSFD R13!, {R1-R8, PC}		;exit on error

 ADD     R2, R2, #jit_code_start
 TEMP    R1
 STR     R2, breakpoint
 LOCK    R1

 BL      check_JIT_and_taskID		;is the task running under the JIT?
 LDREQ   R0, branch_to_jit		;YES, reset the instruction
 STREQ   R0, [R2, #0]
LDMFD   R13!, {R0-R8, PC}
