uncart/source/delay.s

18 lines
339 B
ArmAsm
Raw Permalink Normal View History

2015-05-12 11:15:16 +12:00
// Copyright 2014 Normmatt
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
2015-05-04 15:32:23 -07:00
.arm
.global ioDelay
.type ioDelay STT_FUNC
@ioDelay ( u32 us )
ioDelay:
ldr r1, =0x18000000 @ VRAM
1:
@ Loop doing uncached reads from VRAM to make loop timing more reliable
ldr r2, [r1]
2015-05-04 15:32:23 -07:00
subs r0, #1
bgt 1b
bx lr