]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/xen/l.s
merge
[plan9front.git] / sys / src / 9 / xen / l.s
1 #include "xendefs.h"
2 #include "mem.h"
3
4 /*
5  * Some machine instructions not handled by 8[al].
6  */
7 #define OP16            BYTE $0x66
8 #define DELAY           BYTE $0xEB; BYTE $0x00  /* JMP .+2 */
9 #define CPUID           BYTE $0x0F; BYTE $0xA2  /* CPUID, argument in AX */
10 #define WRMSR           BYTE $0x0F; BYTE $0x30  /* WRMSR, argument in AX/DX (lo/hi) */
11 #define RDTSC           BYTE $0x0F; BYTE $0x31  /* RDTSC, result in AX/DX (lo/hi) */
12 #define RDMSR           BYTE $0x0F; BYTE $0x32  /* RDMSR, result in AX/DX (lo/hi) */
13 #define HLT             BYTE $0xF4
14 #define BSFL            BYTE $0xf; BYTE $0xbc; BYTE $0xc0       /* bsfl AX,AX */
15
16 /*
17  * Macros for calculating offsets within the page directory base
18  * and page tables. Note that these are assembler-specific hence
19  * the '<<2'.
20  */
21 #define PDO(a)          (((((a))>>22) & 0x03FF)<<2)
22 #define PTO(a)          (((((a))>>12) & 0x03FF)<<2)
23
24 /*
25  * Entry point from XEN's "linux" builder.
26  * At this point RAM from 0..4M ("physical") is mapped at KZERO,
27  * the kernel is loaded, we're running on a boot stack and a 
28  * boot page table.  The start_info structure describes the
29  * situation, and is pointed to by SI.
30  * The stack is the highest used address.
31  */
32 TEXT _start(SB), $0
33         MOVL    SP, xentop(SB)          /* set global for top of mapped region */
34         MOVL    SI, xenstart(SB)                /* set global to start_info_t */
35         MOVL    $0, AX                  /* clear EFLAGS */
36         PUSHL   AX
37         POPFL
38         CALL    mmumapcpu0(SB)  /* make mapping before using stack */
39         MOVL    $(MACHADDR+MACHSIZE-4), SP      /* set stack */
40         CALL    main(SB)
41
42 /*
43  * Park a processor. Should never fall through a return from main to here,
44  * should only be called by application processors when shutting down.
45  */
46 TEXT idle(SB), $0
47 _idle:
48         STI
49         HLT
50         JMP     _idle
51
52 /*
53  * Read/write various system registers.
54  * CR4 and the 'model specific registers' should only be read/written
55  * after it has been determined the processor supports them
56  */
57 TEXT _cycles(SB), $0                            /* time stamp counter; cycles since power up */
58         RDTSC
59         MOVL    vlong+0(FP), CX                 /* &vlong */
60         MOVL    AX, 0(CX)                       /* lo */
61         MOVL    DX, 4(CX)                       /* hi */
62         RET
63
64 TEXT rdmsr(SB), $0                              /* model-specific register */
65         MOVL    index+0(FP), CX
66         RDMSR
67         MOVL    vlong+4(FP), CX                 /* &vlong */
68         MOVL    AX, 0(CX)                       /* lo */
69         MOVL    DX, 4(CX)                       /* hi */
70         RET
71         
72 /* Xen doesn't let us do this */
73 TEXT wrmsr(SB), $0
74         MOVL    $-1, AX
75         RET
76
77 /*
78  * Try to determine the CPU type which requires fiddling with EFLAGS.
79  * If the Id bit can be toggled then the CPUID instruction can be used
80  * to determine CPU identity and features. First have to check if it's
81  * a 386 (Ac bit can't be set). If it's not a 386 and the Id bit can't be
82  * toggled then it's an older 486 of some kind.
83  *
84  *      cpuid(fun, regs[4]);
85  */
86 TEXT cpuid(SB), $0
87         MOVL    $0x240000, AX
88         PUSHL   AX
89         POPFL                                   /* set Id|Ac */
90         PUSHFL
91         POPL    BX                              /* retrieve value */
92         MOVL    $0, AX
93         PUSHL   AX
94         POPFL                                   /* clear Id|Ac, EFLAGS initialised */
95         PUSHFL
96         POPL    AX                              /* retrieve value */
97         XORL    BX, AX
98         TESTL   $0x040000, AX                   /* Ac */
99         JZ      _cpu386                         /* can't set this bit on 386 */
100         TESTL   $0x200000, AX                   /* Id */
101         JZ      _cpu486                         /* can't toggle this bit on some 486 */
102         MOVL    fn+0(FP), AX
103         CPUID
104         JMP     _cpuid
105 _cpu486:
106         MOVL    $0x400, AX
107         JMP     _maybezapax
108 _cpu386:
109         MOVL    $0x300, AX
110 _maybezapax:
111         CMPL    fn+0(FP), $1
112         JE      _zaprest
113         XORL    AX, AX
114 _zaprest:
115         XORL    BX, BX
116         XORL    CX, CX
117         XORL    DX, DX
118 _cpuid:
119         MOVL    regs+4(FP), BP
120         MOVL    AX, 0(BP)
121         MOVL    BX, 4(BP)
122         MOVL    CX, 8(BP)
123         MOVL    DX, 12(BP)
124         RET
125
126 /*
127  * Floating point.
128  * Note: the encodings for the FCLEX, FINIT, FSAVE, FSTCW, FSENV and FSTSW
129  * instructions do NOT have the WAIT prefix byte (i.e. they act like their
130  * FNxxx variations) so WAIT instructions must be explicitly placed in the
131  * code as necessary.
132  */
133 #define FPOFF(l)                                                 ;\
134         MOVL    CR0, AX                                          ;\
135         ANDL    $0xC, AX                        /* EM, TS */     ;\
136         CMPL    AX, $0x8                                         ;\
137         JEQ     l                                                ;\
138         WAIT                                                     ;\
139 l:                                                               ;\
140         MOVL    CR0, AX                                          ;\
141         ANDL    $~0x4, AX                       /* EM=0 */       ;\
142         ORL     $0x28, AX                       /* NE=1, TS=1 */ ;\
143         MOVL    AX, CR0
144
145 #define FPON                                                     ;\
146         MOVL    CR0, AX                                          ;\
147         ANDL    $~0xC, AX                       /* EM=0, TS=0 */ ;\
148         MOVL    AX, CR0
149         
150 TEXT fpoff(SB), $0                              /* disable */
151         FPOFF(l1)
152         RET
153
154 TEXT fpinit(SB), $0                             /* enable and init */
155         FPON
156         FINIT
157         WAIT
158         /* setfcr(FPPDBL|FPRNR|FPINVAL|FPZDIV|FPOVFL) */
159         /* note that low 6 bits are masks, not enables, on this chip */
160         PUSHW   $0x0232
161         FLDCW   0(SP)
162         POPW    AX
163         WAIT
164         RET
165
166 TEXT fpx87save0(SB), $0                         /* save state and disable */
167         MOVL    p+0(FP), AX
168         FSAVE   0(AX)                           /* no WAIT */
169         FPOFF(l2)
170         RET
171
172 TEXT fpx87restore0(SB), $0                              /* enable and restore state */
173         FPON
174         MOVL    p+0(FP), AX
175         FRSTOR  0(AX)
176         WAIT
177         RET
178
179 TEXT fpclear(SB), $0                            /* clear pending exceptions */
180         FPON
181         FCLEX                                   /* no WAIT */
182         FPOFF(l3)
183         RET
184
185 TEXT fpssesave(SB), $0                          /* save state and disable */
186         MOVL    p+0(FP), AX
187         FXSAVE  0(AX)                           /* no WAIT */
188         FPOFF(l4)
189         RET
190
191 TEXT fpsserestore(SB), $0                       /* enable and restore state */
192         FPON
193         MOVL    p+0(FP), AX
194         FXRSTOR 0(AX)
195         WAIT
196         RET
197
198 TEXT ldmxcsr(SB), $0                            /* Load MXCSR */
199         LDMXCSR mxcsr+0(FP)
200         RET
201
202 /*
203  * Test-And-Set
204  */
205 TEXT tas(SB), $0
206 TEXT _tas(SB), $0
207         MOVL    $0xDEADDEAD, AX
208         MOVL    lock+0(FP), BX
209         XCHGL   AX, (BX)                        /* lock->key */
210         RET
211
212 TEXT    getstack(SB), $0
213         MOVL    SP, AX
214         RET
215 TEXT mb386(SB), $0
216         POPL    AX                              /* return PC */
217         PUSHFL
218         PUSHL   CS
219         PUSHL   AX
220         IRETL
221
222 TEXT mb586(SB), $0
223         XORL    AX, AX
224         CPUID
225         RET
226
227 TEXT sfence(SB), $0
228         BYTE $0x0f
229         BYTE $0xae
230         BYTE $0xf8
231         RET
232
233 TEXT lfence(SB), $0
234         BYTE $0x0f
235         BYTE $0xae
236         BYTE $0xe8
237         RET
238
239 TEXT mfence(SB), $0
240         BYTE $0x0f
241         BYTE $0xae
242         BYTE $0xf0
243         RET
244
245
246 TEXT xchgw(SB), $0
247         MOVL    v+4(FP), AX
248         MOVL    p+0(FP), BX
249         XCHGW   AX, (BX)
250         RET
251
252 TEXT xchgb(SB), $0
253         MOVL    v+4(FP), AX
254         MOVL    p+0(FP), BX
255         XCHGB   AX, (BX)
256         RET
257
258 TEXT xchgl(SB), $0
259         MOVL    v+4(FP), AX
260         MOVL    p+0(FP), BX
261         XCHGL   AX, (BX)
262         RET
263
264 /* Return the position of the first bit set.  Undefined if zero. */
265 TEXT ffs(SB), $0
266         MOVL    v+0(FP), AX
267         BSFL
268         RET
269
270 TEXT cmpswap486(SB), $0
271         MOVL    addr+0(FP), BX
272         MOVL    old+4(FP), AX
273         MOVL    new+8(FP), CX
274         LOCK
275         BYTE $0x0F; BYTE $0xB1; BYTE $0x0B      /* CMPXCHGL CX, (BX) */
276         JNZ didnt
277         MOVL    $1, AX
278         RET
279 didnt:
280         XORL    AX,AX
281         RET
282
283 TEXT mul64fract(SB), $0
284         MOVL    r+0(FP), CX
285         XORL    BX, BX                          /* BX = 0 */
286
287         MOVL    a+8(FP), AX
288         MULL    b+16(FP)                        /* a1*b1 */
289         MOVL    AX, 4(CX)                       /* r2 = lo(a1*b1) */
290
291         MOVL    a+8(FP), AX
292         MULL    b+12(FP)                        /* a1*b0 */
293         MOVL    AX, 0(CX)                       /* r1 = lo(a1*b0) */
294         ADDL    DX, 4(CX)                       /* r2 += hi(a1*b0) */
295
296         MOVL    a+4(FP), AX
297         MULL    b+16(FP)                        /* a0*b1 */
298         ADDL    AX, 0(CX)                       /* r1 += lo(a0*b1) */
299         ADCL    DX, 4(CX)                       /* r2 += hi(a0*b1) + carry */
300
301         MOVL    a+4(FP), AX
302         MULL    b+12(FP)                        /* a0*b0 */
303         ADDL    DX, 0(CX)                       /* r1 += hi(a0*b0) */
304         ADCL    BX, 4(CX)                       /* r2 += carry */
305         RET
306
307 #define RDRANDAX        BYTE $0x0f; BYTE $0xc7; BYTE $0xf0
308
309 TEXT rdrand32(SB), $-4
310 _rloop32:
311         RDRANDAX
312         JCC     _rloop32
313         RET
314
315 TEXT rdrandbuf(SB), $0
316         MOVL    buf+0(FP), DI
317         MOVL    cnt+4(FP), CX
318         CLD
319         MOVL    CX, DX
320         SHRL    $2, CX
321         CMPL    CX, $0
322         JE      _rndleft
323 _rnddwords:
324         CALL    rdrand32(SB)
325         STOSL
326         LOOP _rnddwords
327 _rndleft:
328         MOVL    DX, CX
329         ANDL    $3, CX
330         CMPL    CX, $0
331         JE      _rnddone
332 _rndbytes:
333         CALL rdrand32(SB)
334         STOSB
335         LOOP _rndbytes
336 _rnddone:
337         RET
338
339 /*
340  *  label consists of a stack pointer and a PC
341  */
342 TEXT gotolabel(SB), $0
343         MOVL    label+0(FP), AX
344         MOVL    0(AX), SP                       /* restore sp */
345         MOVL    4(AX), AX                       /* put return pc on the stack */
346         MOVL    AX, 0(SP)
347         MOVL    $1, AX                          /* return 1 */
348         RET
349
350 TEXT setlabel(SB), $0
351         MOVL    label+0(FP), AX
352         MOVL    SP, 0(AX)                       /* store sp */
353         MOVL    0(SP), BX                       /* store return pc */
354         MOVL    BX, 4(AX)
355         MOVL    $0, AX                          /* return 0 */
356         RET
357
358 TEXT mwait(SB), $0
359         MOVL    addr+0(FP), AX
360         MOVL    (AX), CX
361         ORL     CX, CX
362         JNZ     _mwaitdone
363         XORL    DX, DX
364         BYTE $0x0f; BYTE $0x01; BYTE $0xc8      /* MONITOR */
365         MOVL    (AX), CX
366         ORL     CX, CX
367         JNZ     _mwaitdone
368         XORL    AX, AX
369         BYTE $0x0f; BYTE $0x01; BYTE $0xc9      /* MWAIT */
370 _mwaitdone:
371         RET
372
373 /*
374  * Interrupt/exception handling.
375  * Each entry in the vector table calls either _strayintr or _strayintrx depending
376  * on whether an error code has been automatically pushed onto the stack
377  * (_strayintrx) or not, in which case a dummy entry must be pushed before retrieving
378  * the trap type from the vector table entry and placing it on the stack as part
379  * of the Ureg structure.
380  * Exceptions to this are the syscall vector and the page fault
381  * vector.  Syscalls are dispatched seperately.  Page faults
382  * have to take care of the extra cr2 parameter that xen places
383  * at the top of the stack.
384  * The size of each entry in the vector table (6 bytes) is known in trapinit().
385  */
386 TEXT _strayintr(SB), $0
387         PUSHL   AX                      /* save AX */
388         MOVL    4(SP), AX               /* return PC from vectortable(SB) */
389         JMP     intrcommon
390
391 TEXT _strayintrx(SB), $0
392         XCHGL   AX, (SP)                /* swap AX with vectortable CALL PC */
393 intrcommon:
394         PUSHL   DS                      /* save DS */
395         PUSHL   $(KDSEL)
396         POPL    DS                      /* fix up DS */
397         MOVBLZX (AX), AX                /* trap type -> AX */
398         XCHGL   AX, 4(SP)               /* exchange trap type with saved AX */
399
400         PUSHL   ES                      /* save ES */
401         PUSHL   $(KDSEL)
402         POPL    ES                      /* fix up ES */
403
404         PUSHL   FS                      /* save the rest of the Ureg struct */
405         PUSHL   GS
406         PUSHAL
407
408         PUSHL   SP                      /* Ureg* argument to trap */
409         CALL    trap(SB)
410
411 TEXT forkret(SB), $0
412         POPL    AX
413         POPAL
414         POPL    GS
415         POPL    FS
416         POPL    ES
417         POPL    DS
418         ADDL    $8, SP                  /* pop error code and trap type */
419         IRETL
420
421 TEXT vectortable(SB), $0
422         CALL _strayintr(SB); BYTE $0x00         /* divide error */
423         CALL _strayintr(SB); BYTE $0x01         /* debug exception */
424         CALL _strayintr(SB); BYTE $0x02         /* NMI interrupt */
425         CALL _strayintr(SB); BYTE $0x03         /* breakpoint */
426         CALL _strayintr(SB); BYTE $0x04         /* overflow */
427         CALL _strayintr(SB); BYTE $0x05         /* bound */
428         CALL _strayintr(SB); BYTE $0x06         /* invalid opcode */
429         CALL _strayintr(SB); BYTE $0x07         /* no coprocessor available */
430         CALL _strayintrx(SB); BYTE $0x08        /* double fault */
431         CALL _strayintr(SB); BYTE $0x09         /* coprocessor segment overflow */
432         CALL _strayintrx(SB); BYTE $0x0A        /* invalid TSS */
433         CALL _strayintrx(SB); BYTE $0x0B        /* segment not available */
434         CALL _strayintrx(SB); BYTE $0x0C        /* stack exception */
435         CALL _strayintrx(SB); BYTE $0x0D        /* general protection error */
436         CALL _strayintrx(SB); BYTE $0x0E        /* page fault */
437         CALL _strayintr(SB); BYTE $0x0F         /*  */
438         CALL _strayintr(SB); BYTE $0x10         /* coprocessor error */
439         CALL _strayintrx(SB); BYTE $0x11        /* alignment check */
440         CALL _strayintr(SB); BYTE $0x12         /* machine check */
441         CALL _strayintr(SB); BYTE $0x13
442         CALL _strayintr(SB); BYTE $0x14
443         CALL _strayintr(SB); BYTE $0x15
444         CALL _strayintr(SB); BYTE $0x16
445         CALL _strayintr(SB); BYTE $0x17
446         CALL _strayintr(SB); BYTE $0x18
447         CALL _strayintr(SB); BYTE $0x19
448         CALL _strayintr(SB); BYTE $0x1A
449         CALL _strayintr(SB); BYTE $0x1B
450         CALL _strayintr(SB); BYTE $0x1C
451         CALL _strayintr(SB); BYTE $0x1D
452         CALL _strayintr(SB); BYTE $0x1E
453         CALL _strayintr(SB); BYTE $0x1F
454         CALL _strayintr(SB); BYTE $0x20         /* VectorLAPIC */
455         CALL _strayintr(SB); BYTE $0x21
456         CALL _strayintr(SB); BYTE $0x22
457         CALL _strayintr(SB); BYTE $0x23
458         CALL _strayintr(SB); BYTE $0x24
459         CALL _strayintr(SB); BYTE $0x25
460         CALL _strayintr(SB); BYTE $0x26
461         CALL _strayintr(SB); BYTE $0x27
462         CALL _strayintr(SB); BYTE $0x28
463         CALL _strayintr(SB); BYTE $0x29
464         CALL _strayintr(SB); BYTE $0x2A
465         CALL _strayintr(SB); BYTE $0x2B
466         CALL _strayintr(SB); BYTE $0x2C
467         CALL _strayintr(SB); BYTE $0x2D
468         CALL _strayintr(SB); BYTE $0x2E
469         CALL _strayintr(SB); BYTE $0x2F
470         CALL _strayintr(SB); BYTE $0x30
471         CALL _strayintr(SB); BYTE $0x31
472         CALL _strayintr(SB); BYTE $0x32
473         CALL _strayintr(SB); BYTE $0x33
474         CALL _strayintr(SB); BYTE $0x34
475         CALL _strayintr(SB); BYTE $0x35
476         CALL _strayintr(SB); BYTE $0x36
477         CALL _strayintr(SB); BYTE $0x37
478         CALL _strayintr(SB); BYTE $0x38
479         CALL _strayintr(SB); BYTE $0x39
480         CALL _strayintr(SB); BYTE $0x3A
481         CALL _strayintr(SB); BYTE $0x3B
482         CALL _strayintr(SB); BYTE $0x3C
483         CALL _strayintr(SB); BYTE $0x3D
484         CALL _strayintr(SB); BYTE $0x3E
485         CALL _strayintr(SB); BYTE $0x3F
486         CALL _syscallintr(SB); BYTE $0x40       /* VectorSYSCALL */
487         CALL _strayintr(SB); BYTE $0x41
488         CALL _strayintr(SB); BYTE $0x42
489         CALL _strayintr(SB); BYTE $0x43
490         CALL _strayintr(SB); BYTE $0x44
491         CALL _strayintr(SB); BYTE $0x45
492         CALL _strayintr(SB); BYTE $0x46
493         CALL _strayintr(SB); BYTE $0x47
494         CALL _strayintr(SB); BYTE $0x48
495         CALL _strayintr(SB); BYTE $0x49
496         CALL _strayintr(SB); BYTE $0x4A
497         CALL _strayintr(SB); BYTE $0x4B
498         CALL _strayintr(SB); BYTE $0x4C
499         CALL _strayintr(SB); BYTE $0x4D
500         CALL _strayintr(SB); BYTE $0x4E
501         CALL _strayintr(SB); BYTE $0x4F
502         CALL _strayintr(SB); BYTE $0x50
503         CALL _strayintr(SB); BYTE $0x51
504         CALL _strayintr(SB); BYTE $0x52
505         CALL _strayintr(SB); BYTE $0x53
506         CALL _strayintr(SB); BYTE $0x54
507         CALL _strayintr(SB); BYTE $0x55
508         CALL _strayintr(SB); BYTE $0x56
509         CALL _strayintr(SB); BYTE $0x57
510         CALL _strayintr(SB); BYTE $0x58
511         CALL _strayintr(SB); BYTE $0x59
512         CALL _strayintr(SB); BYTE $0x5A
513         CALL _strayintr(SB); BYTE $0x5B
514         CALL _strayintr(SB); BYTE $0x5C
515         CALL _strayintr(SB); BYTE $0x5D
516         CALL _strayintr(SB); BYTE $0x5E
517         CALL _strayintr(SB); BYTE $0x5F
518         CALL _strayintr(SB); BYTE $0x60
519         CALL _strayintr(SB); BYTE $0x61
520         CALL _strayintr(SB); BYTE $0x62
521         CALL _strayintr(SB); BYTE $0x63
522         CALL _strayintr(SB); BYTE $0x64
523         CALL _strayintr(SB); BYTE $0x65
524         CALL _strayintr(SB); BYTE $0x66
525         CALL _strayintr(SB); BYTE $0x67
526         CALL _strayintr(SB); BYTE $0x68
527         CALL _strayintr(SB); BYTE $0x69
528         CALL _strayintr(SB); BYTE $0x6A
529         CALL _strayintr(SB); BYTE $0x6B
530         CALL _strayintr(SB); BYTE $0x6C
531         CALL _strayintr(SB); BYTE $0x6D
532         CALL _strayintr(SB); BYTE $0x6E
533         CALL _strayintr(SB); BYTE $0x6F
534         CALL _strayintr(SB); BYTE $0x70
535         CALL _strayintr(SB); BYTE $0x71
536         CALL _strayintr(SB); BYTE $0x72
537         CALL _strayintr(SB); BYTE $0x73
538         CALL _strayintr(SB); BYTE $0x74
539         CALL _strayintr(SB); BYTE $0x75
540         CALL _strayintr(SB); BYTE $0x76
541         CALL _strayintr(SB); BYTE $0x77
542         CALL _strayintr(SB); BYTE $0x78
543         CALL _strayintr(SB); BYTE $0x79
544         CALL _strayintr(SB); BYTE $0x7A
545         CALL _strayintr(SB); BYTE $0x7B
546         CALL _strayintr(SB); BYTE $0x7C
547         CALL _strayintr(SB); BYTE $0x7D
548         CALL _strayintr(SB); BYTE $0x7E
549         CALL _strayintr(SB); BYTE $0x7F
550         CALL _strayintr(SB); BYTE $0x80         /* Vector[A]PIC */
551         CALL _strayintr(SB); BYTE $0x81
552         CALL _strayintr(SB); BYTE $0x82
553         CALL _strayintr(SB); BYTE $0x83
554         CALL _strayintr(SB); BYTE $0x84
555         CALL _strayintr(SB); BYTE $0x85
556         CALL _strayintr(SB); BYTE $0x86
557         CALL _strayintr(SB); BYTE $0x87
558         CALL _strayintr(SB); BYTE $0x88
559         CALL _strayintr(SB); BYTE $0x89
560         CALL _strayintr(SB); BYTE $0x8A
561         CALL _strayintr(SB); BYTE $0x8B
562         CALL _strayintr(SB); BYTE $0x8C
563         CALL _strayintr(SB); BYTE $0x8D
564         CALL _strayintr(SB); BYTE $0x8E
565         CALL _strayintr(SB); BYTE $0x8F
566         CALL _strayintr(SB); BYTE $0x90
567         CALL _strayintr(SB); BYTE $0x91
568         CALL _strayintr(SB); BYTE $0x92
569         CALL _strayintr(SB); BYTE $0x93
570         CALL _strayintr(SB); BYTE $0x94
571         CALL _strayintr(SB); BYTE $0x95
572         CALL _strayintr(SB); BYTE $0x96
573         CALL _strayintr(SB); BYTE $0x97
574         CALL _strayintr(SB); BYTE $0x98
575         CALL _strayintr(SB); BYTE $0x99
576         CALL _strayintr(SB); BYTE $0x9A
577         CALL _strayintr(SB); BYTE $0x9B
578         CALL _strayintr(SB); BYTE $0x9C
579         CALL _strayintr(SB); BYTE $0x9D
580         CALL _strayintr(SB); BYTE $0x9E
581         CALL _strayintr(SB); BYTE $0x9F
582         CALL _strayintr(SB); BYTE $0xA0
583         CALL _strayintr(SB); BYTE $0xA1
584         CALL _strayintr(SB); BYTE $0xA2
585         CALL _strayintr(SB); BYTE $0xA3
586         CALL _strayintr(SB); BYTE $0xA4
587         CALL _strayintr(SB); BYTE $0xA5
588         CALL _strayintr(SB); BYTE $0xA6
589         CALL _strayintr(SB); BYTE $0xA7
590         CALL _strayintr(SB); BYTE $0xA8
591         CALL _strayintr(SB); BYTE $0xA9
592         CALL _strayintr(SB); BYTE $0xAA
593         CALL _strayintr(SB); BYTE $0xAB
594         CALL _strayintr(SB); BYTE $0xAC
595         CALL _strayintr(SB); BYTE $0xAD
596         CALL _strayintr(SB); BYTE $0xAE
597         CALL _strayintr(SB); BYTE $0xAF
598         CALL _strayintr(SB); BYTE $0xB0
599         CALL _strayintr(SB); BYTE $0xB1
600         CALL _strayintr(SB); BYTE $0xB2
601         CALL _strayintr(SB); BYTE $0xB3
602         CALL _strayintr(SB); BYTE $0xB4
603         CALL _strayintr(SB); BYTE $0xB5
604         CALL _strayintr(SB); BYTE $0xB6
605         CALL _strayintr(SB); BYTE $0xB7
606         CALL _strayintr(SB); BYTE $0xB8
607         CALL _strayintr(SB); BYTE $0xB9
608         CALL _strayintr(SB); BYTE $0xBA
609         CALL _strayintr(SB); BYTE $0xBB
610         CALL _strayintr(SB); BYTE $0xBC
611         CALL _strayintr(SB); BYTE $0xBD
612         CALL _strayintr(SB); BYTE $0xBE
613         CALL _strayintr(SB); BYTE $0xBF
614         CALL _strayintr(SB); BYTE $0xC0
615         CALL _strayintr(SB); BYTE $0xC1
616         CALL _strayintr(SB); BYTE $0xC2
617         CALL _strayintr(SB); BYTE $0xC3
618         CALL _strayintr(SB); BYTE $0xC4
619         CALL _strayintr(SB); BYTE $0xC5
620         CALL _strayintr(SB); BYTE $0xC6
621         CALL _strayintr(SB); BYTE $0xC7
622         CALL _strayintr(SB); BYTE $0xC8
623         CALL _strayintr(SB); BYTE $0xC9
624         CALL _strayintr(SB); BYTE $0xCA
625         CALL _strayintr(SB); BYTE $0xCB
626         CALL _strayintr(SB); BYTE $0xCC
627         CALL _strayintr(SB); BYTE $0xCD
628         CALL _strayintr(SB); BYTE $0xCE
629         CALL _strayintr(SB); BYTE $0xCF
630         CALL _strayintr(SB); BYTE $0xD0
631         CALL _strayintr(SB); BYTE $0xD1
632         CALL _strayintr(SB); BYTE $0xD2
633         CALL _strayintr(SB); BYTE $0xD3
634         CALL _strayintr(SB); BYTE $0xD4
635         CALL _strayintr(SB); BYTE $0xD5
636         CALL _strayintr(SB); BYTE $0xD6
637         CALL _strayintr(SB); BYTE $0xD7
638         CALL _strayintr(SB); BYTE $0xD8
639         CALL _strayintr(SB); BYTE $0xD9
640         CALL _strayintr(SB); BYTE $0xDA
641         CALL _strayintr(SB); BYTE $0xDB
642         CALL _strayintr(SB); BYTE $0xDC
643         CALL _strayintr(SB); BYTE $0xDD
644         CALL _strayintr(SB); BYTE $0xDE
645         CALL _strayintr(SB); BYTE $0xDF
646         CALL _strayintr(SB); BYTE $0xE0
647         CALL _strayintr(SB); BYTE $0xE1
648         CALL _strayintr(SB); BYTE $0xE2
649         CALL _strayintr(SB); BYTE $0xE3
650         CALL _strayintr(SB); BYTE $0xE4
651         CALL _strayintr(SB); BYTE $0xE5
652         CALL _strayintr(SB); BYTE $0xE6
653         CALL _strayintr(SB); BYTE $0xE7
654         CALL _strayintr(SB); BYTE $0xE8
655         CALL _strayintr(SB); BYTE $0xE9
656         CALL _strayintr(SB); BYTE $0xEA
657         CALL _strayintr(SB); BYTE $0xEB
658         CALL _strayintr(SB); BYTE $0xEC
659         CALL _strayintr(SB); BYTE $0xED
660         CALL _strayintr(SB); BYTE $0xEE
661         CALL _strayintr(SB); BYTE $0xEF
662         CALL _strayintr(SB); BYTE $0xF0
663         CALL _strayintr(SB); BYTE $0xF1
664         CALL _strayintr(SB); BYTE $0xF2
665         CALL _strayintr(SB); BYTE $0xF3
666         CALL _strayintr(SB); BYTE $0xF4
667         CALL _strayintr(SB); BYTE $0xF5
668         CALL _strayintr(SB); BYTE $0xF6
669         CALL _strayintr(SB); BYTE $0xF7
670         CALL _strayintr(SB); BYTE $0xF8
671         CALL _strayintr(SB); BYTE $0xF9
672         CALL _strayintr(SB); BYTE $0xFA
673         CALL _strayintr(SB); BYTE $0xFB
674         CALL _strayintr(SB); BYTE $0xFC
675         CALL _strayintr(SB); BYTE $0xFD
676         CALL _strayintr(SB); BYTE $0xFE
677         CALL _strayintr(SB); BYTE $0xFF