Use ROM functions

Signed-off-by: Andrey Shamis <lolnik@gmail.com>