-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProjeto ISC
46 lines (37 loc) · 1.53 KB
/
Projeto ISC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.data
.include "Pista_Curva_Ready.data"
.include "tela_comeco_Ready.data"
.text
# Preenche a tela de vermelho
# li t1,0xFF000000 # endereco inicial da Memoria VGA - Frame 0
# li t2,0xFF012C00 # endereco final
# li t3,0x07070707 # cor vermelho|vermelho|vermelhor|vermelho
#LOOP: beq t1,t2,pista_Curva_Ready # Se for o último endereço então sai do loop
# sw t3,0(t1) # escreve a word na memória VGA
# addi t1,t1,4 # soma 4 ao endereço
# j LOOP # volta a verificar
# Carrega a imagem1
FORA: li t1,0xFF000000 # endereco inicial da Memoria VGA - Frame 0
li t2,0xFF012C00 # endereco final
la s1,Pista_Curva_Ready # endereço dos dados da tela na memoria
addi s1,s1,8 # primeiro pixels depois das informações de nlin ncol
LOOP1: beq t1,t2,FORA1 # Se for o último endereço então sai do loop
lw t3,0(s1) # le um conjunto de 4 pixels : word
sw t3,0(t1) # escreve a word na memória VGA
addi t1,t1,4 # soma 4 ao endereço
addi s1,s1,4
j LOOP1 # volta a verificar
# Carrega a imagem2
FORA1: li t1,0xFF100000 # endereco inicial da Memoria VGA - Frame 1
li t2,0xFF112C00 # endereco final
la s1,tela_comeco_Ready # endereço dos dados da tela na memoria
addi s1,s1,8 # primeiro pixels depois das informações de nlin ncol
LOOP2: beq t1,t2,FIM # Se for o último endereço então sai do loop
lw t3,0(s1) # le um conjunto de 4 pixels : word
sw t3,0(t1) # escreve a word na memória VGA
addi t1,t1,4 # soma 4 ao endereço
addi s1,s1,4
j LOOP2 # volta a verificar
# devolve o controle ao sistema operacional
FIM: li a7,10 # syscall de exit
ecall