Remove whitespace.
[coreboot.git] / src / mainboard / getac / p470 / acpi / superio.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007-2009 coresystems GmbH
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; version 2 of
9  * the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  */
21
22 /* SMSC SIO10N268 */
23
24 Device (SIO1)
25 {
26         Name (_HID, EISAID("PNP0A05"))
27         Name (_UID, 1)
28
29         OperationRegion(SIOR, SystemIO, 0x4e, 0x02)
30         Field (SIOR, ByteAcc, Nolock, Preserve)
31         {
32                 INDX,   8,
33                 DATA,   8
34         }
35
36         Mutex (SIOM, 0x00)
37
38         Method (READ, 3)
39         {
40                 Acquire (SIOM, 0xffff)
41                 If (LEqual(Arg0, 0)) {
42                         Store (0x55, INDX)
43                         Store (Arg1, INDX)
44                         Store (DATA, Local1)
45                         Store (0xaa, INDX)
46                 }
47                 And (Local1, Arg2, Local1)
48                 Release(SIOM)
49                 Return(Local1)
50         }
51
52         Method (WRIT, 3)
53         {
54                 Acquire (SIOM, 0xffff)
55                 If (LEqual(Arg0, 0)) {
56                         Store (0x55, INDX)
57                         Store (Arg1, INDX)
58                         Store (Arg2, DATA)
59                         Store (0xaa, INDX)
60                 }
61                 Release(SIOM)
62         }
63
64         Device (UAR1)
65         {
66                 Name(_HID, EISAID("PNP0501"))
67                 Name(_UID, 1)
68                 Name(_DDN, "COM1")
69                 Name(_PRW, Package() { 0x08, 0x03 })
70
71                 /* Device Status */
72                 Method (_STA, 0)
73                 {
74                         Acquire (SIOM, 0xffff)
75
76                         // Is the hardware enabled?
77                         Store (READ(0, 0x24, 0xff), Local0)
78                         If (LEqual(Local0, 0)) {
79                                 Return (0xd)
80                         } Else {
81                                 // Power Enabled?
82                                 Store (READ(0, 0x02, 0x08), Local0)
83                                 If (LEqual(Local0, 0)) {
84                                         Return (0x0d)
85                                 } Else {
86                                         Return (0x0f)
87                                 }
88                         }
89                 }
90
91                 /* Device Disable */
92                 Method (_DIS, 0)
93                 {
94                         WRIT(0, 0x24, 0x00)
95
96                         Store(READ(0, 0x28, 0x0f), Local0)
97                         WRIT(0, 0x28, Local0)
98
99                         Store(READ(0, 0x02, 0xff), Local0)
100                         Not(0x08, Local1)
101                         And(Local0, Local1, Local0)
102                         WRIT(0, 0x02, Local0)
103                 }
104
105                 /* Possible Resource Settings */
106                 Name(_PRS, ResourceTemplate() {
107                         StartDependentFn(0, 1) {
108                                 IO(Decode16, 0x3f8, 0x3f8, 0x8, 0x8)
109                                 IRQNoFlags() { 4 }
110                         } EndDependentFn()
111                 })
112
113                 /* Current Resource Settings */
114                 Method(_CRS, 0)
115                 {
116                         Name(NONE, ResourceTemplate() {
117                                 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
118                                 IRQNoFlags() { }
119                         })
120
121                         Name(RSRC, ResourceTemplate() {
122                                 IO(Decode16, 0x3f8, 0x3f8, 0x8, 0x8, _IOA)
123                                 IRQNoFlags(_IRA) { 4 }
124                         })
125
126                         And (_STA(), 0x02, Local0)
127                         If (LEqual(Local0, 0)) {
128                                 Return(NONE)
129                         }
130
131                         CreateByteField(RSRC,
132                                 \_SB.PCI0.LPCB.SIO1.UAR1._CRS._IOA._MIN, IOLO)
133                         CreateByteField(RSRC, 0x03, IOHI) // Why?
134                         CreateByteField(RSRC,
135                                 \_SB.PCI0.LPCB.SIO1.UAR1._CRS._IOA._MAX, IORL)
136                         CreateByteField(RSRC, 0x05, IORH) // Why?
137                         CreateByteField(RSRC,
138                                 \_SB.PCI0.LPCB.SIO1.UAR1._CRS._IRA._INT, IRQL)
139
140                         Store (READ(0, 0x24, 0xff), Local0)
141                         And (Local0, 0xc0, Local1)
142                         ShiftRight(Local1, 0x06, Local1)
143                         ShiftLeft(Local0, 0x02, Local0)
144                         Store(Local0, IOLO)
145                         Store(Local1, IOHI)
146                         Store(IOLO, IORL)
147                         Store(IOHI, IORH)
148
149                         /* Interrupt */
150                         Store(READ(0, 0x28, 0xf0), Local0)
151                         ShiftRight(Local0, 4, Local0)
152                         ShiftLeft(1, Local0, IRQL)
153                         Return(RSRC)
154                 }
155
156                 /* Set Resource Settings */
157                 Method(_SRS, 1)
158                 {
159                         CreateByteField(Arg0, 0x02, IOLO)
160                         CreateByteField(Arg0, 0x03, IOHI)
161                         CreateByteField(Arg0, 0x09, IRQL)
162
163                         WRIT(0, 0x24, 0)
164                         FindSetRightBit(IRQL, Local0)
165                         Decrement(Local0)
166                         ShiftLeft(Local0, 4, Local0)
167
168                         Store(READ(0, 0x28, 0x0f), Local1)
169                         Or(Local0, Local1, Local0)
170                         WRIT(0, 0x28, Local0)
171
172                         Store(IOLO, Local0)
173                         ShiftRight(Local0, 2, Local0)
174                         And(Local0, 0xfe, Local0)
175
176                         Store(IOHI, Local1)
177                         ShiftLeft(Local1, 6, Local1)
178                         Or (Local0, Local1, Local0)
179                         WRIT(0, 0x24, Local0)
180
181                         Store(READ(0, 0x02, 0xff), Local0)
182                         Or(Local0, 0x08, Local0)
183                         WRIT(0, 0x02, Local0)
184
185                         Store(READ(0, 0x07, 0xff), Local0)
186                         Not(0x40, Local1)
187                         And (Local0, Local1, Local0)
188                         WRIT(0, 0x07, Local0)
189                 }
190
191
192                 /* D0 state - Line drivers are on */
193                 Method (_PS0, 0)
194                 {
195                         Store(READ(0, 0x02, 0xff), Local0)
196                         Or(Local0, 0x08, Local0)
197                         WRIT(0, 0x02, Local0)
198
199                         Store (READ(0, 0x07, 0xff), Local0)
200                         Not(0x40, Local1)
201                         And(Local0, Local1, Local0)
202                         WRIT(0, 0x07, Local0)
203                 }
204
205                 /* D3 State - Line drivers are off */
206                 Method(_PS3, 0)
207                 {
208                         Store(READ(0, 0x02, 0xff), Local0)
209                         Not(0x08, Local1)
210                         And(Local0, Local1, Local0)
211                         WRIT(0, 0x02, Local0)
212                 }
213         }
214
215         Device (UAR2)
216         {
217                 Name(_HID, EISAID("PNP0501"))
218                 Name(_UID, 2)
219                 Name(_DDN, "COM2")
220                 Name(_PRW, Package() { 0x08, 0x03 })
221
222                 /* Device Status */
223                 Method (_STA, 0)
224                 {
225                         /* IRDA? */
226                         Store(READ(0, 0x0c, 0x38), Local0)
227                         If (LNotEqual(Local0, Zero)) {
228                                 Return (0)
229                         }
230
231                         // Is the hardware enabled?
232                         Store (READ(0, 0x25, 0xff), Local0)
233                         If (LEqual(Local0, 0)) {
234                                 Return (0xd)
235                         } Else {
236                                 // Power Enabled?
237                                 Store (READ(0, 0x02, 0x80), Local0)
238                                 If (LEqual(Local0, 0)) {
239                                         Return (0x0d)
240                                 } Else {
241                                         Return (0x0f)
242                                 }
243                         }
244                 }
245
246                 /* Device Disable */
247                 Method (_DIS, 0)
248                 {
249                         WRIT(0, 0x25, 0x00)
250
251                         Store(READ(0, 0x28, 0xf0), Local0)
252                         WRIT(0, 0x28, Local0)
253
254                         Store(READ(0, 0x02, 0xff), Local0)
255                         Not(0x80, Local1)
256                         And(Local0, Local1, Local0)
257                         WRIT(0, 0x02, Local0)
258                 }
259
260                 /* Possible Resource Settings */
261                 Name(_PRS, ResourceTemplate() {
262                         StartDependentFn(0, 1) {
263                                 IO(Decode16, 0x2f8, 0x2f8, 0x8, 0x8)
264                                 IRQNoFlags() { 3 }
265                         } EndDependentFn()
266                 })
267
268                 /* Current Resource Settings */
269                 Method(_CRS, 0)
270                 {
271                         Name(NONE, ResourceTemplate() {
272                                 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
273                                 IRQNoFlags() { }
274                         })
275
276                         Name(RSRC, ResourceTemplate() {
277                                 IO(Decode16, 0x2f8, 0x2f8, 0x8, 0x8, _IOB)
278                                 IRQNoFlags(_IRB) { 3 }
279                         })
280
281                         And (_STA(), 0x02, Local0)
282                         If (LEqual(Local0, 0)) {
283                                 Return(NONE)
284                         }
285
286                         CreateByteField(RSRC,
287                                 \_SB.PCI0.LPCB.SIO1.UAR2._CRS._IOB._MIN, IOLO)
288                         CreateByteField(RSRC, 0x03, IOHI)
289                         CreateByteField(RSRC,
290                                 \_SB.PCI0.LPCB.SIO1.UAR2._CRS._IOB._MAX, IORL)
291                         CreateByteField(RSRC, 0x05, IORH)
292                         CreateByteField(RSRC,
293                                 \_SB.PCI0.LPCB.SIO1.UAR2._CRS._IRB._INT, IRQL)
294
295                         Store (READ(0, 0x25, 0xff), Local0)
296                         And (Local0, 0xc0, Local1)
297                         ShiftRight(Local1, 0x06, Local1)
298                         ShiftLeft(Local0, 0x02, Local0)
299                         Store(Local0, IOLO)
300                         Store(Local1, IOHI)
301                         Store(IOLO, IORL)
302                         Store(IOHI, IORH)
303
304                         /* Interrupt */
305                         Store(READ(0, 0x28, 0x0f), Local0)
306                         ShiftRight(Local0, 4, Local0)
307                         ShiftLeft(1, Local0, IRQL)
308                         Return(RSRC)
309                 }
310
311                 /* Set Resource Settings */
312                 Method(_SRS, 1)
313                 {
314                         CreateByteField(Arg0, 0x02, IOLO)
315                         CreateByteField(Arg0, 0x03, IOHI)
316                         CreateByteField(Arg0, 0x09, IRQL)
317
318                         WRIT(0, 0x25, 0)
319                         FindSetRightBit(IRQL, Local0)
320                         Decrement(Local0)
321
322                         Store(READ(0, 0x28, 0xf0), Local1)
323                         Or(Local0, Local1, Local0)
324                         WRIT(0, 0x28, Local0)
325
326                         Store(IOLO, Local0)
327                         ShiftRight(Local0, 2, Local0)
328                         And(Local0, 0xfe, Local0)
329
330                         Store(IOHI, Local1)
331                         ShiftLeft(Local1, 6, Local1)
332                         Or (Local0, Local1, Local0)
333                         WRIT(0, 0x25, Local0)
334
335                         Store(READ(0, 0x0c, 0xff), Local0)
336                         Not(0x38, Local1)
337                         And(Local0, Local1, Local0)
338                         WRIT(0, 0x0c, Local0)
339
340                         Store(READ(0, 0x02, 0xff), Local0)
341                         Or(Local0, 0x80, Local0)
342                         WRIT(0, 0x02, Local0)
343
344                         Store(READ(0, 0x07, 0xff), Local0)
345                         Not(0x20, Local1)
346                         And (Local0, Local1, Local0)
347                         WRIT(0, 0x07, Local0)
348                 }
349
350                 /* D0 state - Line drivers are on */
351                 Method (_PS0, 0)
352                 {
353                         Store(READ(0, 0x02, 0xff), Local0)
354                         Or(Local0, 0x80, Local0)
355                         WRIT(0, 0x02, Local0)
356
357                         Store (READ(0, 0x07, 0xff), Local0)
358                         Not(0x20, Local1)
359                         And(Local0, Local1, Local0)
360                         WRIT(0, 0x07, Local0)
361                 }
362
363                 /* D3 State - Line drivers are off */
364                 Method(_PS3, 0)
365                 {
366                         Store(READ(0, 0x02, 0xff), Local0)
367                         Not(0x80, Local1)
368                         And(Local0, Local1, Local0)
369                         WRIT(0, 0x02, Local0)
370                 }
371         }
372
373         Device (UAR3)
374         {
375                 Name(_HID, EISAID("PNP0501"))
376                 Name(_UID, 3)
377                 Name(_DDN, "COM3")
378                 Name(_PRW, Package() { 0x08, 0x03 })
379
380                 /* Device Status */
381                 Method (_STA, 0)
382                 {
383                         Acquire (SIOM, 0xffff)
384
385                         // Is the hardware enabled?
386                         Store (READ(0, 0x1b, 0xff), Local0)
387                         If (LEqual(Local0, 0)) {
388                                 Return (0xd)
389                         } Else {
390                                 // Power Enabled?
391                                 Store (READ(0, 0x02, 0x02), Local0)
392                                 If (LEqual(Local0, 0)) {
393                                         Return (0x0d)
394                                 } Else {
395                                         Return (0x0f)
396                                 }
397                         }
398                 }
399
400                 /* Device Disable */
401                 Method (_DIS, 0)
402                 {
403                         WRIT(0, 0x1b, 0x00)
404
405                         Store(READ(0, 0x1d, 0x0f), Local0)
406                         WRIT(0, 0x1d, Local0)
407
408                         Store(READ(0, 0x02, 0xff), Local0)
409                         Not(0x02, Local1)
410                         And(Local0, Local1, Local0)
411                         WRIT(0, 0x02, Local0)
412                 }
413
414                 /* Possible Resource Settings */
415                 Name(_PRS, ResourceTemplate() {
416                         StartDependentFn(0, 1) {
417                                 IO(Decode16, 0x3e8, 0x3e8, 0x8, 0x8)
418                                 IRQNoFlags() { 5 }
419                         } EndDependentFn()
420                 })
421
422                 /* Current Resource Settings */
423                 Method(_CRS, 0)
424                 {
425                         Name(NONE, ResourceTemplate() {
426                                 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
427                                 IRQNoFlags() { }
428                         })
429
430                         Name(RSRC, ResourceTemplate() {
431                                 IO(Decode16, 0x3e8, 0x3e8, 0x8, 0x8, _IOA)
432                                 IRQNoFlags(_IRA) { 5 }
433                         })
434
435                         And (_STA(), 0x02, Local0)
436                         If (LEqual(Local0, 0)) {
437                                 Return(NONE)
438                         }
439
440                         CreateByteField(RSRC,
441                                 \_SB.PCI0.LPCB.SIO1.UAR3._CRS._IOA._MIN, IOLO)
442                         CreateByteField(RSRC, 0x03, IOHI) // Why?
443                         CreateByteField(RSRC,
444                                 \_SB.PCI0.LPCB.SIO1.UAR3._CRS._IOA._MAX, IORL)
445                         CreateByteField(RSRC, 0x05, IORH) // Why?
446                         CreateByteField(RSRC,
447                                 \_SB.PCI0.LPCB.SIO1.UAR3._CRS._IRA._INT, IRQL)
448
449                         Store (READ(0, 0x1b, 0xff), Local0)
450                         And (Local0, 0xc0, Local1)
451                         ShiftRight(Local1, 0x06, Local1)
452                         ShiftLeft(Local0, 0x02, Local0)
453                         Store(Local0, IOLO)
454                         Store(Local1, IOHI)
455                         Store(IOLO, IORL)
456                         Store(IOHI, IORH)
457
458                         /* Interrupt */
459                         Store(READ(0, 0x1d, 0xf0), Local0)
460                         ShiftRight(Local0, 4, Local0)
461                         ShiftLeft(1, Local0, IRQL)
462                         Return(RSRC)
463                 }
464
465                 /* Set Resource Settings */
466                 Method(_SRS, 1)
467                 {
468                         CreateByteField(Arg0, 0x02, IOLO)
469                         CreateByteField(Arg0, 0x03, IOHI)
470                         CreateByteField(Arg0, 0x09, IRQL)
471
472                         WRIT(0, 0x1b, 0)
473                         FindSetRightBit(IRQL, Local0)
474                         Decrement(Local0)
475                         ShiftLeft(Local0, 4, Local0)
476
477                         Store(READ(0, 0x1d, 0x0f), Local1)
478                         Or(Local0, Local1, Local0)
479                         WRIT(0, 0x1d, Local0)
480
481                         Store(IOLO, Local0)
482                         ShiftRight(Local0, 2, Local0)
483                         And(Local0, 0xfe, Local0)
484
485                         Store(IOHI, Local1)
486                         ShiftLeft(Local1, 6, Local1)
487                         Or (Local0, Local1, Local0)
488                         WRIT(0, 0x1b, Local0)
489
490                         Store(READ(0, 0x02, 0xff), Local0)
491                         Or(Local0, 0x02, Local0)
492                         WRIT(0, 0x02, Local0)
493
494                         Store(READ(0, 0x07, 0xff), Local0)
495                         Not(0x04, Local1)
496                         And (Local0, Local1, Local0)
497                         WRIT(0, 0x07, Local0)
498                 }
499
500
501                 /* D0 state - Line drivers are on */
502                 Method (_PS0, 0)
503                 {
504                         Store(READ(0, 0x02, 0xff), Local0)
505                         Or(Local0, 0x02, Local0)
506                         WRIT(0, 0x02, Local0)
507
508                         Store (READ(0, 0x07, 0xff), Local0)
509                         Not(0x04, Local1)
510                         And(Local0, Local1, Local0)
511                         WRIT(0, 0x07, Local0)
512                 }
513
514                 /* D3 State - Line drivers are off */
515                 Method(_PS3, 0)
516                 {
517                         Store(READ(0, 0x02, 0xff), Local0)
518                         Not(0x02, Local1)
519                         And(Local0, Local1, Local0)
520                         WRIT(0, 0x02, Local0)
521                 }
522         }
523
524
525         Device (UAR4)
526         {
527                 Name(_HID, EISAID("PNP0501"))
528                 Name(_UID, 4)
529                 Name(_DDN, "COM4")
530                 Name(_PRW, Package() { 0x08, 0x03 })
531
532                 /* Device Status */
533                 Method (_STA, 0)
534                 {
535                         Acquire (SIOM, 0xffff)
536
537                         // Is the hardware enabled?
538                         Store (READ(0, 0x1c, 0xff), Local0)
539                         If (LEqual(Local0, 0)) {
540                                 Return (0xd)
541                         } Else {
542                                 // Power Enabled?
543                                 Store (READ(0, 0x02, 0x04), Local0)
544                                 If (LEqual(Local0, 0)) {
545                                         Return (0x0d)
546                                 } Else {
547                                         Return (0x0f)
548                                 }
549                         }
550                 }
551
552                 /* Device Disable */
553                 Method (_DIS, 0)
554                 {
555                         WRIT(0, 0x1c, 0x00)
556
557                         Store(READ(0, 0x1d, 0x0f), Local0)
558                         WRIT(0, 0x1d, Local0)
559
560                         Store(READ(0, 0x02, 0xff), Local0)
561                         Not(0x04, Local1)
562                         And(Local0, Local1, Local0)
563                         WRIT(0, 0x02, Local0)
564                 }
565
566                 /* Possible Resource Settings */
567                 Name(_PRS, ResourceTemplate() {
568                         StartDependentFn(0, 1) {
569                                 IO(Decode16, 0x2e8, 0x2e8, 0x8, 0x8)
570                                 IRQNoFlags() { 11 }
571                         } EndDependentFn()
572                 })
573
574                 /* Current Resource Settings */
575                 Method(_CRS, 0)
576                 {
577                         Name(NONE, ResourceTemplate() {
578                                 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
579                                 IRQNoFlags() { }
580                         })
581
582                         Name(RSRC, ResourceTemplate() {
583                                 IO(Decode16, 0x2e8, 0x2e8, 0x8, 0x8, _IOA)
584                                 IRQNoFlags(_IRA) { 11 }
585                         })
586
587                         And (_STA(), 0x02, Local0)
588                         If (LEqual(Local0, 0)) {
589                                 Return(NONE)
590                         }
591
592                         CreateByteField(RSRC,
593                                 \_SB.PCI0.LPCB.SIO1.UAR4._CRS._IOA._MIN, IOLO)
594                         CreateByteField(RSRC, 0x03, IOHI) // Why?
595                         CreateByteField(RSRC,
596                                 \_SB.PCI0.LPCB.SIO1.UAR4._CRS._IOA._MAX, IORL)
597                         CreateByteField(RSRC, 0x05, IORH) // Why?
598                         CreateByteField(RSRC,
599                                 \_SB.PCI0.LPCB.SIO1.UAR4._CRS._IRA._INT, IRQL)
600
601                         Store (READ(0, 0x1c, 0xff), Local0)
602                         And (Local0, 0xc0, Local1)
603                         ShiftRight(Local1, 0x06, Local1)
604                         ShiftLeft(Local0, 0x02, Local0)
605                         Store(Local0, IOLO)
606                         Store(Local1, IOHI)
607                         Store(IOLO, IORL)
608                         Store(IOHI, IORH)
609
610                         /* Interrupt */
611                         Store(READ(0, 0x1d, 0xf0), Local0)
612                         ShiftRight(Local0, 4, Local0)
613                         ShiftLeft(1, Local0, IRQL)
614                         Return(RSRC)
615                 }
616
617                 /* Set Resource Settings */
618                 Method(_SRS, 1)
619                 {
620                         CreateByteField(Arg0, 0x02, IOLO)
621                         CreateByteField(Arg0, 0x03, IOHI)
622                         CreateByteField(Arg0, 0x09, IRQL)
623
624                         WRIT(0, 0x1c, 0)
625                         FindSetRightBit(IRQL, Local0)
626                         Decrement(Local0)
627                         ShiftLeft(Local0, 4, Local0)
628
629                         Store(READ(0, 0x1d, 0x0f), Local1)
630                         Or(Local0, Local1, Local0)
631                         WRIT(0, 0x1d, Local0)
632
633                         Store(IOLO, Local0)
634                         ShiftRight(Local0, 2, Local0)
635                         And(Local0, 0xfe, Local0)
636
637                         Store(IOHI, Local1)
638                         ShiftLeft(Local1, 6, Local1)
639                         Or (Local0, Local1, Local0)
640                         WRIT(0, 0x1c, Local0)
641
642                         Store(READ(0, 0x02, 0xff), Local0)
643                         Or(Local0, 0x04, Local0)
644                         WRIT(0, 0x02, Local0)
645
646                         Store(READ(0, 0x07, 0xff), Local0)
647                         Not(0x08, Local1)
648                         And (Local0, Local1, Local0)
649                         WRIT(0, 0x07, Local0)
650                 }
651
652
653                 /* D0 state - Line drivers are on */
654                 Method (_PS0, 0)
655                 {
656                         Store(READ(0, 0x02, 0xff), Local0)
657                         Or(Local0, 0x04, Local0)
658                         WRIT(0, 0x02, Local0)
659
660                         Store (READ(0, 0x07, 0xff), Local0)
661                         Not(0x08, Local1)
662                         And(Local0, Local1, Local0)
663                         WRIT(0, 0x07, Local0)
664                 }
665
666                 /* D3 State - Line drivers are off */
667                 Method(_PS3, 0)
668                 {
669                         Store(READ(0, 0x02, 0xff), Local0)
670                         Not(0x04, Local1)
671                         And(Local0, Local1, Local0)
672                         WRIT(0, 0x02, Local0)
673                 }
674         }
675
676 }
677