-
Notifications
You must be signed in to change notification settings - Fork 1
/
temperature.asm
118 lines (76 loc) · 1.11 KB
/
temperature.asm
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
;;HAKKI EGEMEN GULPINAR 17-155-014 TEMPERATURE CONTROL PROJECT 8086
org 100h
CONTROL EQU 8006H
A EQU 0080H
B EQU 0082H
C EQU 0084H
inic1:
mov dx,C
in al,dx
cmp al,11111110b
je stop1
cmp al,11111101b
je decision
jmp inic1
decision:
mov dx,B
in al,dx
cmp al,00010001b
jge enfriar
cmp al,00001011b
jle warm
jmp stop
enfriar:
mov dx,A
mov al,11111110b
out dx,al
nop
nop
nop
jmp emergency
warm:
mov dx,A
mov al,11111101b
out dx,al
nop
nop
nop
nop
jmp emergency
stop:
mov dx,A
mov al,11111111b
out dx,al
nop
nop
nop
mov dx,B
in al,dx
cmp al,00010001b
jge enfriar
cmp al,00001011b
jle warm
jmp stop
stop1:
mov dx,A
mov al,11111111b
out dx,al
nop
nop
nop
mov dx,C
in al,dx
cmp al,11111110b
je stop1
cmp al,11111101b
je inic1
jmp stop1
emergency:
mov dx,C
in al,dx
cmp al,11111110b
je stop1
cmp al,11111101b
je inic1
jmp decision
ret