-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwindowsLcd.s
More file actions
192 lines (143 loc) · 3.32 KB
/
windowsLcd.s
File metadata and controls
192 lines (143 loc) · 3.32 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
@R5: Tela da temperatura ou umidade atual
showSensorValue:
push {r2, r3, r4, r5, lr}
bl writeString @Escreve a tela de boas vindas
mov r2, #0b111000110
mov r3, #0
bl instructionCode
ldr r4, =now_address
ldr r4, [r4]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
mov r2, #0b111001010 @Mover cursor para escolha do Sensor
mov r3, #0
bl instructionCode
ldr r4, =now_value
ldr r4, [r4]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
pop {r2, r3, r4, r5, pc}
@R5: Tela da sensor OK ou sensor não ok
showSensorStatus:
push {r2, r3, r4, r5, lr}
bl writeString @Escreve a tela de boas vindas
mov r2, #0b110000110
mov r3, #0
bl instructionCode
ldr r4, =now_address
ldr r4, [r4]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
pop {r2, r3, r4, r5, pc}
@R7: valor inicial da dupla de continuos, ex: 0 mostra o 0 e o 1
showTwoConstant:
push {r2, r3, r4, r6, r7, lr}
mov r2, #0b110000000 @Seta o cursor para a primeira posição da linha
mov r3, #0
bl instructionCode
mov r4, r7 @ carregando o endereco que sera printado
bl convertBinaryToAscii
mov r3, #0
mov r2, r0 @Primeiro dígito
bl instructionCode
mov r3, #0
mov r2, r1 @Segundo dígito
bl instructionCode
mov r2, #0b110000110 @ cursor para a sexta posição
mov r3, #0
bl instructionCode
mov r6, #4 @Offset de 4 bytes na memória
mul r6, r7, r6
ldr r4, =last_temp
ldr r4, [r4, r6]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
mov r2, #0b110001101 @ Cursor para linha 1, posição 13
mov r3, #0
bl instructionCode
ldr r4, =last_hum
ldr r4, [r4, r6]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
@ linha de baixo
add r7, #1
mov r2, #0b111000000 @ cursor move para a primeira posição da segunda linha
mov r3, #0
bl instructionCode
mov r4, r7 @ carregando o endereco que sera printado
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
mov r2, #0b111000110 @ cursor move para sexta posição na segunda linha
mov r3, #0
bl instructionCode
mov r6, #4 @Offset de 4 bytes da memória
mul r6, r7, r6
ldr r4, =last_temp
ldr r4, [r4, r6]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
mov r2, #0b111001101 @cursor move para a 13 posição da segunda linha
mov r3, #0
bl instructionCode
ldr r4, =last_hum
ldr r4, [r4, r6]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
pop {r2, r3, r4, r6, r7, pc}
@R5: Tela da sensor OK ou sensor não ok
showActivate:
push {r2, r3, r4, r5, lr}
bl writeString @Escreve a tela de boas vindas
mov r2, #0b111000110
mov r3, #0
bl instructionCode
ldr r4, =now_address
ldr r4, [r4]
bl convertBinaryToAscii
mov r3, #0
mov r2, r0
bl instructionCode
mov r3, #0
mov r2, r1
bl instructionCode
pop {r2, r3, r4, r5, pc}