0% found this document useful (0 votes)
4 views1 page

Untitled

Uploaded by

lucasdem014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Untitled

Uploaded by

lucasdem014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

.

equ DISPLAY, 0xff200020

.equ ZERO, 0x0000003f


.equ UM, 0x00000006
.equ DOIS, 0x0000005b
.equ TRES, 0x0000004f
.equ QUATRO, 0x00000066
.equ CINCO, 0x0000006d
.equ SEIS, 0x0000007d
.equ SETE, 0x00000007
.equ OITO, 0x000000ff
.equ NOVE, 0x000000ef

.global _start
_start:

ldr r1,=DISPLAY
ldr r0, =ZERO
mov r2, #10
loop:
str r0, [r1]
push {r0, r1, r2}
mov r0, #1
bl wait
pop {r0, r1, r2}
mov r0, r0, LSL #1
sub r2, #1
cmp r2, #0
bgt loop

ldr r1,=0x20026
mov r0, #0x18
svc 0x123456

wait: // funcao que espera r0 segundos


mov r3, r0 // r3 segundos a esperar
mov r0, #0x11
svc 0x123456
mov r1, r0 // r1: tempo referencia
lasso:
mov r0, #0x11
svc 0x123456
sub r0, r0, r1
cmp r0, r3
blt lasso
bx lr

You might also like