;/*                                   */
;/*  for MB9BF618T on FRK-FM3         */
;/*                                   */
;/*   Copyright (C) by Y.Ishioka.     */
;/*                                   */

    AREA    |.text|, CODE, READONLY
    ALIGN 4

    EXPORT WaitNsec


WaitNsec
        MOVS   r1,#100
        UDIV   r0, r0, r1
        CBZ    r0, _exit

        ; 100nsec/loop
_waitnsec1
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        NOP
        SUBS   r0, r0, #1
        BNE.N  _waitnsec1
_exit
        BX     LR

        END

