-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIRQ_SER.asm
124 lines (95 loc) · 3.81 KB
/
IRQ_SER.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
119
120
121
122
XDEF IRQ_SER
XREF init_LCD,read_pot,pot_value,display_string, HEX_VALUE, port_S, HEX_READ, disp, port_T
IRQ_SER:
movb #'E',disp
movb #'m',disp+1
movb #'e',disp+2
movb #'r',disp+3
movb #'g',disp+4
movb #'e',disp+5
movb #'n',disp+6
movb #'c',disp+7
movb #'y',disp+8
movb #' ',disp+9
movb #'P',disp+10
movb #'o',disp+11
movb #'w',disp+12
movb #'e',disp+13
movb #'r',disp+14
movb #' ',disp+15
movb #'S',disp+16
movb #'h',disp+17
movb #'u',disp+18
movb #'t',disp+19
movb #' ',disp+20
movb #'D',disp+21
movb #'o',disp+22
movb #'w',disp+23
movb #'n',disp+24
movb #'.',disp+25
movb #'.',disp+26
movb #'.',disp+27
movb #' ',disp+28
movb #' ',disp+29
movb #' ',disp+30
movb #' ',disp+31
movb #0,disp+32 ;string terminator, acts like '\0'
jsr init_LCD
ldd #disp
jsr display_string
bclr port_T,%1000;turn the DC MOTOR OFF
ldx #8;loop again
FLASH:
pshx;temp save x
ldy #3
KEEP_DISPLAYING_1:;DELAY loop to keep displaying the value of wattage
movb #$0,port_S
ldd #disp
jsr display_string
movb #0,port_S
dey
bne KEEP_DISPLAYING_1
ldy #3
KEEP_DISPLAYING_2:;DELAY loop to keep displaying the value of wattage
movb #$ff,port_S
ldd #disp
jsr display_string
movb #0,port_S
dey
bne KEEP_DISPLAYING_2
pulx
dex
bne FLASH
STOP_COOLING:
bclr port_T,%1000;turn the DC MOTOR OFF
movb #'P',disp
movb #'l',disp+1
movb #'e',disp+2
movb #'a',disp+3
movb #'s',disp+4
movb #'e',disp+5
movb #' ',disp+6
movb #'R',disp+7
movb #'e',disp+8
movb #'s',disp+9
movb #'t',disp+10
movb #'a',disp+11
movb #'r',disp+12
movb #'t',disp+13
movb #' ',disp+14
movb #' ',disp+15
movb #'T',disp+16
movb #'h',disp+17
movb #'e',disp+18
movb #' ',disp+19
movb #'P',disp+20
movb #'r',disp+21
movb #'o',disp+22
movb #'g',disp+23
movb #'r',disp+24
movb #'a',disp+25
movb #'m',disp+26
jsr init_LCD
ldd #disp
jsr display_string
end