home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-07-24 | 22.9 KB | [TEXT/MPCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Jul 24 17:34:54 1995, modified Mon Jul 24 17:34:54 1995, creator 'MPCC', type ASCII, 22684 bytes "NCRScriptManager.c" , at 0x591c 410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 4e 43 52 53 63 72 | 69 70 74 4d 61 6e 61 67 |..NCRScr|iptManag|
|00000010| 65 72 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |er.c....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 43 | 43 01 00 00 00 00 00 00 |.TEXTMPC|C.......|
|00000050| 00 00 00 00 00 58 9c 00 | 00 01 9a ac 39 c2 7e ac |.....X..|....9.~.|
|00000060| 39 c2 7e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |9.~.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f9 8e 00 00 |........|........|
|00000080| 2f 2a 09 09 09 09 09 09 | 09 09 09 4e 43 52 53 63 |/*......|...NCRSc|
|00000090| 72 69 70 74 4d 61 6e 61 | 67 65 72 2e 63 09 09 09 |riptMana|ger.c...|
|000000a0| 09 09 09 09 09 2a 2f 0d | 2f 2a 0d 20 2a 20 4e 43 |.....*/.|/*. * NC|
|000000b0| 52 53 63 72 69 70 74 55 | 74 69 6c 69 74 69 65 73 |RScriptU|tilities|
|000000c0| 2e 63 0d 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |.c. * Co|pyright |
|000000d0| a9 20 31 39 39 34 2d 39 | 35 20 41 70 70 6c 65 20 |. 1994-9|5 Apple |
|000000e0| 43 6f 6d 70 75 74 65 72 | 20 49 6e 63 2e 20 41 6c |Computer| Inc. Al|
|000000f0| 6c 20 72 69 67 68 74 73 | 20 72 65 73 65 72 76 65 |l rights| reserve|
|00000100| 64 2e 0d 20 2a 2f 0d 2f | 2a 09 2e 5f 5f 5f 5f 5f |d.. */./|*.._____|
|00000110| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000120| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000130| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000140| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000150| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 2e 0d |________|______..|
|00000160| 20 20 09 7c 20 54 68 69 | 73 20 66 69 6c 65 20 69 | .| Thi|s file i|
|00000170| 73 20 73 70 65 63 69 66 | 69 63 20 74 6f 20 74 68 |s specif|ic to th|
|00000180| 65 20 4e 43 52 20 63 68 | 69 70 3a 20 69 74 20 63 |e NCR ch|ip: it c|
|00000190| 6f 6e 74 61 69 6e 73 20 | 74 68 65 20 73 63 72 69 |ontains |the scri|
|000001a0| 70 74 73 20 74 68 61 74 | 20 74 68 65 20 63 68 69 |pts that| the chi|
|000001b0| 70 20 77 69 6c 6c 09 7c | 0d 09 7c 20 65 78 65 63 |p will.||..| exec|
|000001c0| 75 74 65 20 61 6e 64 20 | 73 6f 6d 65 20 75 74 69 |ute and |some uti|
|000001d0| 6c 69 74 69 65 73 20 74 | 6f 20 70 61 74 63 68 20 |lities t|o patch |
|000001e0| 74 68 65 20 73 63 72 69 | 70 74 20 6c 61 62 65 6c |the scri|pt label|
|000001f0| 73 2e 20 49 6e 20 61 20 | 70 72 6f 64 75 63 74 69 |s. In a |producti|
|00000200| 6f 6e 20 73 79 73 74 65 | 6d 2c 09 7c 0d 09 7c 20 |on syste|m,.|..| |
|00000210| 74 68 65 20 73 63 72 69 | 70 74 20 77 69 6c 6c 20 |the scri|pt will |
|00000220| 62 65 20 70 72 65 2d 63 | 6f 6d 70 69 6c 65 64 20 |be pre-c|ompiled |
|00000230| 61 6e 64 20 73 74 6f 72 | 65 73 20 69 6e 20 72 65 |and stor|es in re|
|00000240| 61 64 2d 6f 6e 6c 79 20 | 6d 65 6d 6f 72 79 2e 20 |ad-only |memory. |
|00000250| 57 65 6c 6c 2c 20 74 68 | 61 74 27 73 20 74 68 65 |Well, th|at's the|
|00000260| 09 7c 0d 09 7c 20 74 68 | 65 6f 72 79 3a 20 69 6e |.|..| th|eory: in|
|00000270| 20 72 65 61 6c 69 74 79 | 2c 20 4e 43 52 20 35 33 | reality|, NCR 53|
|00000280| 43 38 32 35 20 73 63 72 | 69 70 74 73 20 77 69 6c |C825 scr|ipts wil|
|00000290| 6c 20 70 72 6f 62 61 62 | 6c 79 20 6e 65 65 64 20 |l probab|ly need |
|000002a0| 74 6f 20 62 65 20 70 61 | 74 63 68 65 64 20 77 68 |to be pa|tched wh|
|000002b0| 65 6e 20 74 68 65 09 7c | 0d 09 7c 20 73 79 73 74 |en the.||..| syst|
|000002c0| 65 6d 20 69 73 20 69 6e | 69 74 69 61 6c 69 7a 65 |em is in|itialize|
|000002d0| 64 20 69 6e 20 6f 72 64 | 65 72 20 74 6f 20 73 74 |d in ord|er to st|
|000002e0| 6f 72 65 20 73 63 72 61 | 74 63 68 20 61 72 65 61 |ore scra|tch area|
|000002f0| 20 70 68 79 73 69 63 61 | 6c 20 61 64 64 72 65 73 | physica|l addres|
|00000300| 73 65 73 2e 20 57 65 20 | 64 6f 6e 27 74 09 7c 0d |ses. We |don't.|.|
|00000310| 09 7c 20 64 6f 20 74 68 | 69 73 2c 20 68 6f 77 65 |.| do th|is, howe|
|00000320| 76 65 72 2e 09 09 09 09 | 09 09 09 09 09 09 09 09 |ver.....|........|
|00000330| 09 09 09 09 09 7c 0d 09 | 2e 5f 5f 5f 5f 5f 5f 5f |.....|..|._______|
|00000340| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000350| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000360| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000370| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000380| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 2e 0d 2a 2f |________|____..*/|
|00000390| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 22 4e 43 52 44 |..#inclu|de "NCRD|
|000003a0| 72 69 76 65 72 50 72 69 | 76 61 74 65 2e 68 22 0d |riverPri|vate.h".|
|000003b0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 64 65 66 |#include| <stddef|
|000003c0| 2e 68 3e 0d 0d 2f 2a 20 | 2a 20 2a 20 2a 20 2a 20 |.h>../* |* * * * |
|000003d0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000003e0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000003f0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00000400| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00000410| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 0d 20 2a 0d 20 |* * * * |* *. *. |
|00000420| 2a 20 54 68 65 20 73 63 | 72 69 70 74 20 69 73 20 |* The sc|ript is |
|00000430| 67 65 6e 65 72 61 74 65 | 64 20 62 79 20 6d 61 63 |generate|d by mac|
|00000440| 72 6f 73 2e 20 41 73 20 | 73 68 6f 77 6e 20 68 65 |ros. As |shown he|
|00000450| 72 65 2c 20 69 74 20 69 | 73 20 69 6e 20 4d 61 63 |re, it i|s in Mac|
|00000460| 69 6e 74 6f 73 68 20 42 | 69 67 2d 65 6e 64 69 61 |intosh B|ig-endia|
|00000470| 6e 0d 20 2a 20 6f 72 64 | 65 72 2e 20 54 68 65 20 |n. * ord|er. The |
|00000480| 4e 43 52 20 63 68 69 70 | 20 72 65 61 64 73 20 69 |NCR chip| reads i|
|00000490| 74 20 6f 6e 65 20 6c 6f | 6e 67 77 6f 72 64 20 61 |t one lo|ngword a|
|000004a0| 74 20 61 20 74 69 6d 65 | 20 75 73 69 6e 67 20 44 |t a time| using D|
|000004b0| 4d 41 2e 20 42 65 63 61 | 75 73 65 20 74 68 65 20 |MA. Beca|use the |
|000004c0| 50 43 49 20 62 75 73 0d | 20 2a 20 69 73 20 6c 69 |PCI bus.| * is li|
|000004d0| 74 74 6c 65 2d 65 6e 64 | 69 61 6e 2c 20 77 65 20 |ttle-end|ian, we |
|000004e0| 6d 75 73 74 20 72 65 76 | 65 72 73 65 20 62 79 74 |must rev|erse byt|
|000004f0| 65 73 2e 20 54 68 69 73 | 20 77 69 6c 6c 20 62 65 |es. This| will be|
|00000500| 20 64 6f 6e 65 20 74 68 | 65 20 66 69 72 73 74 20 | done th|e first |
|00000510| 74 69 6d 65 20 74 68 61 | 74 0d 20 2a 20 74 68 65 |time tha|t. * the|
|00000520| 20 64 72 69 76 65 72 20 | 69 73 20 63 61 6c 6c 65 | driver |is calle|
|00000530| 64 2e 20 49 6e 20 61 20 | 70 72 6f 64 75 63 74 69 |d. In a |producti|
|00000540| 6f 6e 20 64 72 69 76 65 | 72 2c 20 74 68 65 20 73 |on drive|r, the s|
|00000550| 63 72 69 70 74 20 77 6f | 75 6c 64 20 62 65 20 67 |cript wo|uld be g|
|00000560| 65 6e 65 72 61 74 65 64 | 20 62 79 20 61 6e 0d 20 |enerated| by an. |
|00000570| 2a 20 65 78 74 65 72 6e | 61 6c 20 74 6f 6f 6c 20 |* extern|al tool |
|00000580| 61 6e 64 20 73 74 6f 72 | 65 64 20 69 6e 20 74 68 |and stor|ed in th|
|00000590| 65 20 64 72 69 76 65 72 | 20 69 6e 20 69 74 73 20 |e driver| in its |
|000005a0| 66 69 6e 61 6c 20 6c 69 | 74 74 6c 65 2d 65 6e 64 |final li|ttle-end|
|000005b0| 69 61 6e 20 66 6f 72 6d | 2e 0d 20 2a 0d 20 2a 20 |ian form|.. *. * |
|000005c0| 54 68 65 20 73 63 72 69 | 70 74 20 22 63 6f 6d 70 |The scri|pt "comp|
|000005d0| 69 6c 65 72 22 20 75 73 | 65 73 20 74 68 65 20 66 |iler" us|es the f|
|000005e0| 6f 6c 6c 6f 77 69 6e 67 | 20 63 6f 6e 76 65 6e 74 |ollowing| convent|
|000005f0| 69 6f 6e 73 3a 0d 20 2a | 09 09 6f 66 66 73 65 74 |ions:. *|..offset|
|00000600| 58 58 58 09 09 09 41 6e | 20 6f 66 66 73 65 74 20 |XXX...An| offset |
|00000610| 69 6e 74 6f 20 74 68 65 | 20 70 65 72 2d 72 65 71 |into the| per-req|
|00000620| 75 65 73 74 20 64 61 74 | 61 20 61 72 65 61 2e 20 |uest dat|a area. |
|00000630| 54 68 65 20 6f 66 66 73 | 65 74 20 77 69 6c 6c 0d |The offs|et will.|
|00000640| 20 2a 09 09 09 09 09 09 | 09 72 65 66 65 72 65 6e | *......|.referen|
|00000650| 63 65 20 61 20 54 61 62 | 6c 65 20 65 6e 74 72 79 |ce a Tab|le entry|
|00000660| 20 66 6f 72 20 61 20 4d | 6f 76 65 20 6f 72 20 53 | for a M|ove or S|
|00000670| 65 6c 65 63 74 20 6f 70 | 65 72 61 74 69 6f 6e 2e |elect op|eration.|
|00000680| 0d 20 2a 09 09 27 58 58 | 58 58 27 09 09 09 09 41 |. *..'XX|XX'....A|
|00000690| 20 6c 61 62 65 6c 20 77 | 69 74 68 69 6e 20 74 68 | label w|ithin th|
|000006a0| 65 20 73 63 72 69 70 74 | 20 69 74 73 65 6c 66 2e |e script| itself.|
|000006b0| 20 54 68 69 73 20 69 73 | 20 75 73 65 64 20 66 6f | This is| used fo|
|000006c0| 72 20 6a 75 6d 70 0d 20 | 2a 09 09 09 09 09 09 09 |r jump. |*.......|
|000006d0| 72 65 73 6f 6c 75 74 69 | 6f 6e 73 2e 20 54 6f 20 |resoluti|ons. To |
|000006e0| 73 69 6d 70 6c 69 66 79 | 20 74 68 65 20 22 63 6f |simplify| the "co|
|000006f0| 6d 70 69 6c 65 72 2c 22 | 20 74 68 65 73 65 20 61 |mpiler,"| these a|
|00000700| 72 65 0d 20 2a 09 09 09 | 09 09 09 09 70 6f 73 74 |re. *...|....post|
|00000710| 2d 70 72 6f 63 65 73 73 | 65 64 20 77 68 65 6e 20 |-process|ed when |
|00000720| 74 68 65 20 66 69 72 73 | 74 20 74 69 6d 65 20 74 |the firs|t time t|
|00000730| 68 65 20 73 63 72 69 70 | 74 20 69 73 20 65 78 65 |he scrip|t is exe|
|00000740| 63 75 74 65 64 3a 0d 20 | 2a 09 09 09 09 09 09 09 |cuted:. |*.......|
|00000750| 4c 61 62 65 6c 73 20 61 | 72 65 20 66 6f 75 72 2d |Labels a|re four-|
|00000760| 62 79 74 65 20 63 68 61 | 72 61 63 74 65 72 20 63 |byte cha|racter c|
|00000770| 6f 6e 73 74 61 6e 74 73 | 2e 20 54 68 65 20 63 6f |onstants|. The co|
|00000780| 64 65 20 74 68 61 74 0d | 20 2a 09 09 09 09 09 09 |de that.| *......|
|00000790| 09 72 65 73 6f 6c 76 65 | 73 20 6c 61 62 65 6c 73 |.resolve|s labels|
|000007a0| 20 69 73 20 6d 6f 64 65 | 72 61 74 65 6c 79 20 63 | is mode|rately c|
|000007b0| 72 75 64 65 2e 0d 20 2a | 20 54 68 65 20 6d 61 63 |rude.. *| The mac|
|000007c0| 72 6f 73 3a 0d 20 2a 09 | 09 4c 61 62 65 6c 28 6e |ros:. *.|.Label(n|
|000007d0| 61 6d 65 29 0d 20 2a 09 | 09 09 09 09 09 09 44 65 |ame). *.|......De|
|000007e0| 66 69 6e 65 20 61 20 6c | 61 62 65 6c 2e 20 54 68 |fine a l|abel. Th|
|000007f0| 69 73 20 61 63 74 75 61 | 6c 6c 79 20 63 72 65 61 |is actua|lly crea|
|00000800| 74 65 73 20 61 20 4e 4f | 50 20 73 63 72 69 70 74 |tes a NO|P script|
|00000810| 0d 20 2a 09 09 09 09 09 | 09 09 6f 70 65 72 61 74 |. *.....|..operat|
|00000820| 69 6f 6e 20 77 69 74 68 | 20 74 68 65 20 6c 61 62 |ion with| the lab|
|00000830| 65 6c 20 69 6e 20 74 68 | 65 20 73 65 63 6f 6e 64 |el in th|e second|
|00000840| 20 6c 6f 6e 67 77 6f 72 | 64 2e 0d 20 2a 09 09 4a | longwor|d.. *..J|
|00000850| 75 6d 70 28 6c 61 62 65 | 6c 29 0d 20 2a 09 09 4a |ump(labe|l). *..J|
|00000860| 75 6d 70 57 68 65 6e 50 | 68 61 73 65 28 70 68 61 |umpWhenP|hase(pha|
|00000870| 73 65 2c 20 6c 61 62 65 | 6c 29 0d 20 2a 09 09 4a |se, labe|l). *..J|
|00000880| 75 6d 70 49 66 50 68 61 | 73 65 28 70 68 61 73 65 |umpIfPha|se(phase|
|00000890| 2c 20 6c 61 62 65 6c 29 | 0d 20 2a 09 09 4a 75 6d |, label)|. *..Jum|
|000008a0| 70 49 66 56 61 6c 75 65 | 28 76 61 6c 75 65 2c 20 |pIfValue|(value, |
|000008b0| 6c 61 62 65 6c 29 0d 20 | 2a 09 09 4a 75 6d 70 49 |label). |*..JumpI|
|000008c0| 66 4e 6f 74 43 61 72 72 | 79 28 6c 61 62 65 6c 29 |fNotCarr|y(label)|
|000008d0| 0d 20 2a 09 09 09 09 09 | 09 09 4a 75 6d 70 20 28 |. *.....|..Jump (|
|000008e0| 61 6c 77 61 79 73 2c 20 | 6f 72 20 69 66 20 74 68 |always, |or if th|
|000008f0| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 20 69 73 20 74 |e condit|ion is t|
|00000900| 72 75 65 29 20 74 6f 20 | 74 68 65 20 6c 61 62 65 |rue) to |the labe|
|00000910| 6c 2e 0d 20 2a 09 09 53 | 68 69 66 74 52 69 67 68 |l.. *..S|hiftRigh|
|00000920| 74 28 72 65 67 69 73 74 | 65 72 29 0d 20 2a 09 09 |t(regist|er). *..|
|00000930| 09 09 09 09 09 54 68 69 | 73 20 65 78 65 63 75 74 |.....Thi|s execut|
|00000940| 65 73 20 4d 4f 56 45 20 | 72 65 67 69 73 74 65 72 |es MOVE |register|
|00000950| 20 53 48 52 20 74 6f 20 | 72 65 67 69 73 74 65 72 | SHR to |register|
|00000960| 0d 20 2a 09 09 4d 6f 76 | 65 57 68 65 6e 28 6f 66 |. *..Mov|eWhen(of|
|00000970| 66 73 65 74 2c 20 63 6f | 75 6e 74 2c 20 70 68 61 |fset, co|unt, pha|
|00000980| 73 65 29 0d 20 2a 09 09 | 4d 6f 76 65 46 72 6f 6d |se). *..|MoveFrom|
|00000990| 57 68 65 6e 28 6f 66 66 | 73 65 74 2c 20 70 68 61 |When(off|set, pha|
|000009a0| 73 65 29 0d 20 2a 09 09 | 09 09 09 09 09 4d 6f 76 |se). *..|.....Mov|
|000009b0| 65 20 64 61 74 61 20 74 | 6f 2f 66 72 6f 6d 20 74 |e data t|o/from t|
|000009c0| 68 65 20 53 43 53 49 20 | 62 75 73 20 75 73 69 6e |he SCSI |bus usin|
|000009d0| 67 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |g the sp|ecified |
|000009e0| 64 61 74 61 0d 20 2a 09 | 09 09 09 09 09 09 6f 66 |data. *.|......of|
|000009f0| 66 73 65 74 20 61 6e 64 | 20 63 6f 75 6e 74 2c 20 |fset and| count, |
|00000a00| 6f 72 20 74 61 62 6c 65 | 2e 20 54 68 65 20 2e 2e |or table|. The ..|
|00000a10| 2e 57 68 65 6e 20 76 61 | 72 69 61 6e 74 20 69 6e |.When va|riant in|
|00000a20| 74 65 72 72 75 70 74 73 | 0d 20 2a 09 09 09 09 09 |terrupts|. *.....|
|00000a30| 09 09 69 66 20 61 20 70 | 68 61 73 65 20 6d 69 73 |..if a p|hase mis|
|00000a40| 6d 61 74 63 68 20 6f 63 | 63 75 72 73 20 28 74 68 |match oc|curs (th|
|00000a50| 69 73 20 77 6f 75 6c 64 | 20 62 65 20 61 20 73 65 |is would| be a se|
|00000a60| 72 69 6f 75 73 20 65 72 | 72 6f 72 29 2e 0d 20 2a |rious er|ror).. *|
|00000a70| 09 09 4d 6f 76 65 56 61 | 6c 75 65 54 6f 52 65 67 |..MoveVa|lueToReg|
|00000a80| 69 73 74 65 72 28 63 6f | 6e 73 74 61 6e 74 2c 20 |ister(co|nstant, |
|00000a90| 72 65 67 69 73 74 65 72 | 29 0d 20 2a 09 09 09 09 |register|). *....|
|00000aa0| 09 09 09 53 74 6f 72 65 | 20 61 20 63 6f 6e 73 74 |...Store| a const|
|00000ab0| 61 6e 74 20 76 61 6c 75 | 65 20 69 6e 74 6f 20 61 |ant valu|e into a|
|00000ac0| 20 72 65 67 69 73 74 65 | 72 2e 0d 20 2a 09 09 4d | registe|r.. *..M|
|00000ad0| 6f 76 65 52 65 67 69 73 | 74 65 72 28 73 72 63 52 |oveRegis|ter(srcR|
|00000ae0| 65 67 2c 20 64 73 74 52 | 65 67 29 0d 20 2a 09 09 |eg, dstR|eg). *..|
|00000af0| 09 09 09 09 09 4d 6f 76 | 65 20 76 61 6c 75 65 73 |.....Mov|e values|
|00000b00| 20 62 65 74 77 65 65 6e | 20 72 65 67 69 73 74 65 | between| registe|
|00000b10| 72 73 2e 20 4e 6f 74 65 | 20 74 68 61 74 20 6f 6e |rs. Note| that on|
|00000b20| 65 20 6f 66 20 74 68 65 | 0d 20 2a 09 09 09 09 09 |e of the|. *.....|
|00000b30| 09 09 72 65 67 69 73 74 | 65 72 73 20 6d 75 73 74 |..regist|ers must|
|00000b40| 20 62 65 20 53 46 42 52 | 20 74 6f 20 6d 6f 76 65 | be SFBR| to move|
|00000b50| 20 62 65 74 77 65 65 6e | 20 61 6e 79 20 74 77 6f | between| any two|
|00000b60| 20 72 65 67 69 73 74 65 | 72 73 2e 0d 20 2a 09 09 | registe|rs.. *..|
|00000b70| 09 09 09 09 09 09 4d 6f | 76 65 52 65 67 69 73 74 |......Mo|veRegist|
|00000b80| 65 72 28 66 6f 6f 2c 20 | 53 46 42 52 29 0d 20 2a |er(foo, |SFBR). *|
|00000b90| 09 09 09 09 09 09 09 09 | 4d 6f 76 65 52 65 67 69 |........|MoveRegi|
|00000ba0| 73 74 65 72 28 53 46 42 | 52 2c 20 62 61 72 29 0d |ster(SFB|R, bar).|
|00000bb0| 20 2a 09 09 49 6e 74 28 | 76 61 6c 75 65 29 0d 20 | *..Int(|value). |
|00000bc0| 2a 09 09 09 09 09 09 09 | 49 6e 74 65 72 72 75 70 |*.......|Interrup|
|00000bd0| 74 20 74 68 65 20 68 6f | 73 74 20 70 72 6f 63 65 |t the ho|st proce|
|00000be0| 73 73 6f 72 2e 0d 20 2a | 09 09 41 6c 6c 6f 77 44 |ssor.. *|..AllowD|
|00000bf0| 69 73 63 6f 6e 6e 65 63 | 74 28 6c 61 62 65 6c 29 |isconnec|t(label)|
|00000c00| 0d 20 2a 09 09 09 09 09 | 09 09 43 6c 65 61 72 20 |. *.....|..Clear |
|00000c10| 74 68 65 20 22 69 6e 74 | 65 72 72 75 70 74 20 6f |the "int|errupt o|
|00000c20| 6e 20 62 75 73 20 66 72 | 65 65 22 20 62 69 74 3a |n bus fr|ee" bit:|
|00000c30| 0d 20 2a 09 09 09 09 09 | 09 09 09 4d 6f 76 65 20 |. *.....|...Move |
|00000c40| 53 43 4e 54 4c 32 20 26 | 20 30 78 37 46 20 74 6f |SCNTL2 &| 0x7F to|
|00000c50| 20 53 43 4e 54 4c 32 0d | 20 2a 09 09 57 61 69 74 | SCNTL2.| *..Wait|
|00000c60| 44 69 73 63 6f 6e 6e 65 | 63 74 28 6c 61 62 65 6c |Disconne|ct(label|
|00000c70| 29 0d 20 2a 09 09 09 09 | 09 09 09 57 61 69 74 20 |). *....|...Wait |
|00000c80| 75 6e 74 69 6c 20 74 68 | 65 20 62 75 73 20 69 73 |until th|e bus is|
|00000c90| 20 66 72 65 65 0d 20 2a | 09 09 53 65 6c 65 63 74 | free. *|..Select|
|00000ca0| 41 54 4e 28 6f 66 66 73 | 65 74 2c 20 6c 61 62 65 |ATN(offs|et, labe|
|00000cb0| 6c 29 0d 20 2a 09 09 09 | 09 09 09 09 53 65 6c 65 |l). *...|....Sele|
|00000cc0| 63 74 20 77 69 74 68 20 | 41 54 4e 20 75 73 69 6e |ct with |ATN usin|
|00000cd0| 67 20 74 68 65 20 74 61 | 62 6c 65 20 6f 66 66 73 |g the ta|ble offs|
|00000ce0| 65 74 3b 20 6a 75 6d 70 | 20 74 6f 20 74 68 65 20 |et; jump| to the |
|00000cf0| 6c 61 62 65 6c 0d 20 2a | 09 09 09 09 09 09 09 69 |label. *|.......i|
|00000d00| 66 20 77 65 20 61 72 65 | 20 73 65 6c 65 63 74 65 |f we are| selecte|
|00000d10| 64 20 6f 72 20 72 65 73 | 65 6c 65 63 74 65 64 2e |d or res|elected.|
|00000d20| 0d 20 2a 09 09 43 6c 65 | 61 72 41 43 4b 28 6c 61 |. *..Cle|arACK(la|
|00000d30| 62 65 6c 29 0d 20 2a 09 | 09 09 09 09 09 09 43 6c |bel). *.|......Cl|
|00000d40| 65 61 72 20 41 43 4b 20 | 74 6f 20 61 63 63 65 70 |ear ACK |to accep|
|00000d50| 74 20 6d 65 73 73 61 67 | 65 20 62 79 74 65 73 2e |t messag|e bytes.|
|00000d60| 0d 20 2a 09 09 43 6c 65 | 61 72 41 54 4e 28 6c 61 |. *..Cle|arATN(la|
|00000d70| 62 65 6c 29 0d 20 2a 09 | 09 09 09 09 09 09 43 6c |bel). *.|......Cl|
|00000d80| 65 61 72 20 74 68 65 20 | 41 54 4e 20 6c 69 6e 65 |ear the |ATN line|
|00000d90| 2e 0d 20 2a 2f 0d 23 64 | 65 66 69 6e 65 20 4e 4f |.. */.#d|efine NO|
|00000da0| 50 09 09 09 09 09 30 78 | 38 30 30 30 30 30 30 30 |P.....0x|80000000|
|00000db0| 09 09 09 2f 2a 20 4a 75 | 6d 70 20 6e 65 76 65 72 |.../* Ju|mp never|
|00000dc0| 09 09 09 09 09 09 2a 2f | 0d 23 64 65 66 69 6e 65 |......*/|.#define|
|00000dd0| 20 4f 50 5f 4d 41 53 4b | 09 09 09 09 28 62 69 74 | OP_MASK|....(bit|
|00000de0| 33 31 20 7c 20 62 69 74 | 33 30 29 09 09 2f 2a 20 |31 | bit|30)../* |
|00000df0| 53 65 6c 65 63 74 20 74 | 68 65 20 6f 70 65 72 61 |Select t|he opera|
|00000e00| 74 6f 72 20 74 79 70 65 | 09 09 09 2a 2f 0d 23 64 |tor type|...*/.#d|
|00000e10| 65 66 69 6e 65 20 49 4f | 5f 4f 50 09 09 09 09 28 |efine IO|_OP....(|
|00000e20| 62 69 74 33 30 29 0d 23 | 64 65 66 69 6e 65 20 4a |bit30).#|define J|
|00000e30| 55 4d 50 5f 4f 50 09 09 | 09 09 28 62 69 74 33 31 |UMP_OP..|..(bit31|
|00000e40| 29 0d 23 64 65 66 69 6e | 65 20 4d 45 4d 4f 52 59 |).#defin|e MEMORY|
|00000e50| 5f 4d 4f 56 45 5f 4f 50 | 09 09 28 62 69 74 33 31 |_MOVE_OP|..(bit31|
|00000e60| 20 7c 20 62 69 74 33 30 | 29 0d 23 64 65 66 69 6e | | bit30|).#defin|
|00000e70| 65 20 4f 50 43 4f 44 45 | 28 6f 70 29 09 09 09 28 |e OPCODE|(op)...(|
|00000e80| 28 6f 70 29 20 26 20 4f | 50 5f 4d 41 53 4b 29 0d |(op) & O|P_MASK).|
|00000e90| 23 64 65 66 69 6e 65 20 | 49 73 4d 65 6d 6f 72 79 |#define |IsMemory|
|00000ea0| 4d 6f 76 65 4f 70 28 6f | 70 29 09 28 4f 50 43 4f |MoveOp(o|p).(OPCO|
|00000eb0| 44 45 28 6f 70 29 20 3d | 3d 20 4d 45 4d 4f 52 59 |DE(op) =|= MEMORY|
|00000ec0| 5f 4d 4f 56 45 5f 4f 50 | 29 0d 23 64 65 66 69 6e |_MOVE_OP|).#defin|
|00000ed0| 65 20 49 73 4c 61 62 65 | 6c 28 6f 70 29 09 09 09 |e IsLabe|l(op)...|
|00000ee0| 28 28 6f 70 29 20 3d 3d | 20 4e 4f 50 29 0d 0d 2f |((op) ==| NOP)../|
|00000ef0| 2a 0d 20 2a 20 41 20 6c | 61 62 65 6c 20 69 73 20 |*. * A l|abel is |
|00000f00| 61 20 6e 6f 2d 6f 70 20 | 69 6e 73 74 72 75 63 74 |a no-op |instruct|
|00000f10| 69 6f 6e 20 2d 20 74 68 | 65 20 6c 61 62 65 6c 20 |ion - th|e label |
|00000f20| 6e 61 6d 65 20 69 73 20 | 69 6e 20 74 68 65 20 73 |name is |in the s|
|00000f30| 65 63 6f 6e 64 20 77 6f | 72 64 2e 20 49 66 20 79 |econd wo|rd. If y|
|00000f40| 6f 75 20 61 64 64 0d 20 | 2a 20 69 6e 73 74 72 75 |ou add. |* instru|
|00000f50| 63 74 69 6f 6e 73 20 74 | 68 61 74 20 74 61 6b 65 |ctions t|hat take|
|00000f60| 20 6c 61 62 65 6c 73 2c | 20 62 65 20 73 75 72 65 | labels,| be sure|
|00000f70| 20 74 6f 20 75 70 64 61 | 74 65 20 74 68 65 20 6b | to upda|te the k|
|00000f80| 4d 61 78 4c 61 62 65 6c | 73 20 70 61 72 61 6d 65 |MaxLabel|s parame|
|00000f90| 74 65 72 20 74 6f 20 65 | 6e 73 75 72 65 0d 20 2a |ter to e|nsure. *|
|00000fa0| 20 74 68 61 74 20 74 68 | 65 20 6c 61 62 65 6c 20 | that th|e label |
|00000fb0| 72 65 73 6f 6c 76 65 72 | 20 68 61 73 20 65 6e 6f |resolver| has eno|
|00000fc0| 75 67 68 20 73 70 61 63 | 65 2e 0d 20 2a 0d 20 2a |ugh spac|e.. *. *|
|00000fd0| 20 53 63 72 69 70 74 73 | 20 61 6c 77 61 79 73 20 | Scripts| always |
|00000fe0| 73 74 61 72 74 20 77 69 | 74 68 20 74 68 65 20 53 |start wi|th the S|
|00000ff0| 63 72 69 70 74 53 74 61 | 72 74 20 69 6e 73 74 72 |criptSta|rt instr|
|00001000| 75 63 74 69 6f 6e 20 2d | 20 74 68 69 73 20 69 73 |uction -| this is|
|00001010| 20 75 73 65 64 20 74 6f | 20 69 64 65 6e 74 69 66 | used to| identif|
|00001020| 79 0d 20 2a 20 63 6f 6d | 70 69 6c 65 64 20 73 63 |y. * com|piled sc|
|00001030| 72 69 70 74 73 2e 0d 20 | 2a 0d 20 2a 2f 0d 23 64 |ripts.. |*. */.#d|
|00001040| 65 66 69 6e 65 20 4c 61 | 62 65 6c 28 6c 61 62 65 |efine La|bel(labe|
|00001050| 6c 29 09 09 09 09 09 4e | 4f 50 2c 20 6c 61 62 65 |l).....N|OP, labe|
|00001060| 6c 0d 23 64 65 66 69 6e | 65 20 53 63 72 69 70 74 |l.#defin|e Script|
|00001070| 53 74 61 72 74 09 09 09 | 09 09 09 4c 61 62 65 6c |Start...|...Label|
|00001080| 28 6b 53 63 72 69 70 74 | 53 74 61 72 74 4c 61 62 |(kScript|StartLab|
|00001090| 65 6c 29 0d 0d 2f 2a 0d | 20 2a 20 41 6c 6c 20 4a |el)../*.| * All J|
|000010a0| 75 6d 70 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 73 |ump inst|ructions|
|000010b0| 20 74 61 6b 65 20 61 20 | 6d 61 6e 64 61 74 6f 72 | take a |mandator|
|000010c0| 79 20 6c 61 62 65 6c 2e | 0d 20 2a 2f 0d 23 64 65 |y label.|. */.#de|
|000010d0| 66 69 6e 65 20 4a 75 6d | 70 28 6c 61 62 65 6c 29 |fine Jum|p(label)|
|000010e0| 09 09 09 09 09 09 30 78 | 38 30 38 38 30 30 30 30 |......0x|80880000|
|000010f0| 2c 09 09 09 09 09 09 09 | 6c 61 62 65 6c 0d 23 64 |,.......|label.#d|
|00001100| 65 66 69 6e 65 20 4a 75 | 6d 70 49 66 57 68 65 6e |efine Ju|mpIfWhen|
|00001110| 28 70 68 61 73 65 2c 20 | 6d 6f 64 2c 20 6c 61 62 |(phase, |mod, lab|
|00001120| 65 6c 29 20 5c 0d 09 09 | 09 09 09 09 09 28 30 78 |el) \...|.....(0x|
|00001130| 38 30 38 30 30 30 30 30 | 20 7c 20 28 28 70 68 61 |80800000| | ((pha|
|00001140| 73 65 29 20 3c 3c 20 32 | 34 29 20 7c 20 28 6d 6f |se) << 2|4) | (mo|
|00001150| 64 29 29 2c 09 09 09 6c | 61 62 65 6c 0d 23 64 65 |d)),...l|abel.#de|
|00001160| 66 69 6e 65 20 69 66 54 | 72 75 65 09 62 69 74 31 |fine ifT|rue.bit1|
|00001170| 39 0d 23 64 65 66 69 6e | 65 20 69 66 50 68 61 73 |9.#defin|e ifPhas|
|00001180| 65 09 62 69 74 31 37 0d | 23 64 65 66 69 6e 65 09 |e.bit17.|#define.|
|00001190| 69 66 57 61 69 74 09 62 | 69 74 31 36 0d 23 64 65 |ifWait.b|it16.#de|
|000011a0| 66 69 6e 65 20 4a 75 6d | 70 49 66 50 68 61 73 65 |fine Jum|pIfPhase|
|000011b0| 28 70 68 61 73 65 2c 20 | 6c 61 62 65 6c 29 20 5c |(phase, |label) \|
|000011c0| 0d 09 09 09 09 09 09 09 | 4a 75 6d 70 49 66 57 68 |........|JumpIfWh|
|000011d0| 65 6e 28 70 68 61 73 65 | 2c 20 69 66 54 72 75 65 |en(phase|, ifTrue|
|000011e0| 20 7c 20 69 66 50 68 61 | 73 65 2c 20 6c 61 62 65 | | ifPha|se, labe|
|000011f0| 6c 29 0d 23 64 65 66 69 | 6e 65 20 4a 75 6d 70 57 |l).#defi|ne JumpW|
|00001200| 68 65 6e 50 68 61 73 65 | 28 70 68 61 73 65 2c 20 |henPhase|(phase, |
|00001210| 6c 61 62 65 6c 29 09 5c | 0d 09 09 09 09 09 09 09 |label).\|........|
|00001220| 4a 75 6d 70 49 66 57 68 | 65 6e 28 70 68 61 73 65 |JumpIfWh|en(phase|
|00001230| 2c 20 69 66 57 61 69 74 | 20 7c 20 69 66 54 72 75 |, ifWait| | ifTru|
|00001240| 65 20 7c 20 69 66 50 68 | 61 73 65 2c 20 6c 61 62 |e | ifPh|ase, lab|
|00001250| 65 6c 29 0d 23 64 65 66 | 69 6e 65 20 4a 75 6d 70 |el).#def|ine Jump|
|00001260| 57 68 65 6e 4e 6f 74 50 | 68 61 73 65 28 70 68 61 |WhenNotP|hase(pha|
|00001270| 73 65 2c 20 6c 61 62 65 | 6c 29 20 5c 0d 09 09 09 |se, labe|l) \....|
|00001280| 09 09 09 09 4a 75 6d 70 | 49 66 57 68 65 6e 28 70 |....Jump|IfWhen(p|
|00001290| 68 61 73 65 2c 20 69 66 | 57 61 69 74 20 7c 20 69 |hase, if|Wait | i|
|000012a0| 66 50 68 61 73 65 2c 20 | 6c 61 62 65 6c 29 0d 23 |fPhase, |label).#|
|000012b0| 64 65 66 69 6e 65 20 4a | 75 6d 70 49 66 4e 6f 74 |define J|umpIfNot|
|000012c0| 50 68 61 73 65 28 70 68 | 61 73 65 2c 20 6c 61 62 |Phase(ph|ase, lab|
|000012d0| 65 6c 29 20 5c 0d 09 09 | 09 09 09 09 09 4a 75 6d |el) \...|.....Jum|
|000012e0| 70 49 66 57 68 65 6e 28 | 70 68 61 73 65 2c 20 69 |pIfWhen(|phase, i|
|000012f0| 66 50 68 61 73 65 2c 20 | 6c 61 62 65 6c 29 0d 2f |fPhase, |label)./|
|00001300| 2a 0d 20 2a 20 54 68 65 | 20 4e 43 52 20 4d 61 73 |*. * The| NCR Mas|
|00001310| 6b 20 63 61 75 73 65 73 | 20 62 69 74 73 20 74 6f |k causes| bits to|
|00001320| 20 62 65 20 69 67 6e 6f | 72 65 64 2e 20 57 65 20 | be igno|red. We |
|00001330| 75 73 65 20 61 20 70 6f | 73 69 74 69 76 65 20 6d |use a po|sitive m|
|00001340| 61 73 6b 2e 20 49 2e 65 | 2e 2c 0d 20 2a 20 4a 75 |ask. I.e|.,. * Ju|
|00001350| 6d 70 49 66 4d 61 73 6b | 65 64 45 71 75 61 6c 73 |mpIfMask|edEquals|
|00001360| 20 3d 3d 20 28 53 46 42 | 52 20 26 20 6d 61 73 6b | == (SFB|R & mask|
|00001370| 29 20 3d 3d 20 76 61 6c | 75 65 0d 20 2a 2f 0d 23 |) == val|ue. */.#|
|00001380| 64 65 66 69 6e 65 20 4a | 75 6d 70 49 66 4d 61 73 |define J|umpIfMas|
|00001390| 6b 65 64 45 71 75 61 6c | 73 28 6d 61 73 6b 2c 20 |kedEqual|s(mask, |
|000013a0| 76 61 6c 75 65 2c 20 6c | 61 62 65 6c 29 09 09 09 |value, l|abel)...|
|000013b0| 09 09 09 5c 0d 09 09 09 | 09 09 09 09 09 09 09 28 |...\....|.......(|
|000013c0| 30 78 38 30 38 43 30 30 | 30 30 09 09 09 09 09 5c |0x808C00|00.....\|
|000013d0| 0d 09 09 09 09 09 09 09 | 09 09 09 7c 20 28 28 28 |........|...| (((|
|000013e0| 7e 6d 61 73 6b 29 20 26 | 20 30 78 46 46 29 20 3c |~mask) &| 0xFF) <|
|000013f0| 3c 20 38 29 09 5c 0d 09 | 09 09 09 09 09 09 09 09 |< 8).\..|........|
|00001400| 09 7c 20 76 61 6c 75 65 | 29 2c 20 6c 61 62 65 6c |.| value|), label|
|00001410| 0d 23 64 65 66 69 6e 65 | 20 4a 75 6d 70 49 66 45 |.#define| JumpIfE|
|00001420| 71 75 61 6c 28 76 61 6c | 75 65 2c 20 6c 61 62 65 |qual(val|ue, labe|
|00001430| 6c 29 20 09 09 28 30 78 | 38 30 38 43 30 30 30 30 |l) ..(0x|808C0000|
|00001440| 20 7c 20 76 61 6c 75 65 | 29 2c 20 09 09 09 09 6c | | value|), ....l|
|00001450| 61 62 65 6c 0d 23 64 65 | 66 69 6e 65 20 4a 75 6d |abel.#de|fine Jum|
|00001460| 70 49 66 4d 61 73 6b 65 | 64 4e 6f 74 45 71 75 61 |pIfMaske|dNotEqua|
|00001470| 6c 73 28 6d 61 73 6b 2c | 20 76 61 6c 75 65 2c 20 |ls(mask,| value, |
|00001480| 6c 61 62 65 6c 29 20 5c | 0d 09 09 09 09 09 09 09 |label) \|........|
|00001490| 09 09 09 28 30 78 38 30 | 38 34 30 30 30 30 09 09 |...(0x80|840000..|
|000014a0| 09 09 09 5c 0d 09 09 09 | 09 09 09 09 09 09 09 7c |...\....|.......||
|000014b0| 20 28 28 28 7e 6d 61 73 | 6b 29 20 26 20 30 78 46 | (((~mas|k) & 0xF|
|000014c0| 46 29 20 3c 3c 20 38 29 | 09 5c 0d 09 09 09 09 09 |F) << 8)|.\......|
|000014d0| 09 09 09 09 09 7c 20 76 | 61 6c 75 65 29 2c 20 6c |.....| v|alue), l|
|000014e0| 61 62 65 6c 0d 23 64 65 | 66 69 6e 65 20 4a 75 6d |abel.#de|fine Jum|
|000014f0| 70 49 66 4e 6f 74 45 71 | 75 61 6c 28 76 61 6c 75 |pIfNotEq|ual(valu|
|00001500| 65 2c 20 6c 61 62 65 6c | 29 20 09 28 30 78 38 30 |e, label|) .(0x80|
|00001510| 38 34 30 30 30 30 20 7c | 20 76 61 6c 75 65 29 2c |840000 || value),|
|00001520| 20 09 09 09 09 6c 61 62 | 65 6c 0d 0d 23 64 65 66 | ....lab|el..#def|
|00001530| 69 6e 65 20 4a 75 6d 70 | 49 66 42 69 74 53 65 74 |ine Jump|IfBitSet|
|00001540| 28 76 61 6c 75 65 2c 20 | 6c 61 62 65 6c 29 09 09 |(value, |label)..|
|00001550| 28 30 78 38 30 38 43 30 | 30 30 30 20 7c 20 28 76 |(0x808C0|000 | (v|
|00001560| 61 6c 75 65 20 3c 3c 20 | 38 29 20 7c 20 76 61 6c |alue << |8) | val|
|00001570| 75 65 29 2c 20 6c 61 62 | 65 6c 0d 23 64 65 66 69 |ue), lab|el.#defi|
|00001580| 6e 65 20 4a 75 6d 70 49 | 66 42 69 74 43 6c 65 61 |ne JumpI|fBitClea|
|00001590| 72 28 76 61 6c 75 65 2c | 20 6c 61 62 65 6c 29 09 |r(value,| label).|
|000015a0| 28 30 78 38 30 38 34 30 | 30 30 30 20 7c 20 28 76 |(0x80840|000 | (v|
|000015b0| 61 6c 75 65 20 3c 3c 20 | 38 29 20 7c 20 76 61 6c |alue << |8) | val|
|000015c0| 75 65 29 2c 20 6c 61 62 | 65 6c 0d 23 64 65 66 69 |ue), lab|el.#defi|
|000015d0| 6e 65 20 4a 75 6d 70 49 | 66 4e 6f 74 43 61 72 72 |ne JumpI|fNotCarr|
|000015e0| 79 28 6c 61 62 65 6c 29 | 09 09 09 30 78 38 30 41 |y(label)|...0x80A|
|000015f0| 30 30 30 30 30 2c 09 09 | 09 09 09 09 09 6c 61 62 |00000,..|.....lab|
|00001600| 65 6c 0d 23 64 65 66 69 | 6e 65 20 57 61 69 74 44 |el.#defi|ne WaitD|
|00001610| 69 73 63 6f 6e 6e 65 63 | 74 28 29 09 09 09 09 30 |isconnec|t()....0|
|00001620| 78 34 38 30 30 30 30 30 | 30 2c 09 09 09 09 09 09 |x4800000|0,......|
|00001630| 09 30 0d 23 64 65 66 69 | 6e 65 20 53 65 6c 65 63 |.0.#defi|ne Selec|
|00001640| 74 41 54 4e 28 6f 66 66 | 73 65 74 2c 20 6c 61 62 |tATN(off|set, lab|
|00001650| 65 6c 29 09 09 28 30 78 | 34 37 30 30 30 30 30 30 |el)..(0x|47000000|
|00001660| 20 7c 20 6f 66 66 73 65 | 74 29 2c 09 09 09 09 6c | | offse|t),....l|
|00001670| 61 62 65 6c 0d 23 64 65 | 66 69 6e 65 20 43 6c 65 |abel.#de|fine Cle|
|00001680| 61 72 41 43 4b 28 29 09 | 09 09 09 09 09 28 30 78 |arACK().|.....(0x|
|00001690| 36 30 30 30 30 30 30 30 | 20 7c 20 62 69 74 36 29 |60000000| | bit6)|
|000016a0| 2c 09 09 09 09 30 0d 23 | 64 65 66 69 6e 65 20 43 |,....0.#|define C|
|000016b0| 6c 65 61 72 41 54 4e 28 | 29 09 09 09 09 09 09 28 |learATN(|)......(|
|000016c0| 30 78 36 30 30 30 30 30 | 30 30 20 7c 20 62 69 74 |0x600000|00 | bit|
|000016d0| 33 29 2c 09 09 09 09 30 | 0d 23 64 65 66 69 6e 65 |3),....0|.#define|
|000016e0| 20 43 6c 65 61 72 54 61 | 72 67 65 74 28 29 09 09 | ClearTa|rget()..|
|000016f0| 09 09 09 28 30 78 36 30 | 30 30 30 30 30 30 20 7c |...(0x60|000000 ||
|00001700| 20 62 69 74 39 29 2c 09 | 09 09 09 30 0d 2f 2a 0d | bit9),.|...0./*.|
|00001710| 20 2a 20 4d 6f 76 65 46 | 72 6f 6d 20 63 6f 70 69 | * MoveF|rom copi|
|00001720| 65 73 20 64 61 74 61 20 | 74 6f 2f 66 72 6f 6d 20 |es data |to/from |
|00001730| 74 68 65 20 53 43 53 49 | 20 62 75 73 20 61 6e 64 |the SCSI| bus and|
|00001740| 20 6d 65 6d 6f 72 79 2e | 20 49 74 20 69 73 20 70 | memory.| It is p|
|00001750| 61 73 73 65 64 20 74 68 | 65 20 6f 66 66 73 65 74 |assed th|e offset|
|00001760| 0d 20 2a 20 74 6f 20 61 | 20 64 61 74 61 20 74 61 |. * to a| data ta|
|00001770| 62 6c 65 20 74 68 61 74 | 20 68 61 73 20 74 68 65 |ble that| has the|
|00001780| 20 61 63 74 75 61 6c 20 | 70 68 79 73 69 63 61 6c | actual |physical|
|00001790| 20 61 64 64 72 65 73 73 | 20 61 6e 64 20 62 79 74 | address| and byt|
|000017a0| 65 20 63 6f 75 6e 74 2e | 20 54 68 69 73 0d 20 2a |e count.| This. *|
|000017b0| 20 63 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e | could h|ave been|
|000017c0| 20 73 69 6d 70 6c 65 72 | 2c 20 6e 6f 74 20 74 68 | simpler|, not th|
|000017d0| 61 74 20 77 65 27 72 65 | 20 77 68 69 6e 69 6e 67 |at we're| whining|
|000017e0| 20 6f 72 20 61 6e 79 74 | 68 69 6e 67 2c 20 72 69 | or anyt|hing, ri|
|000017f0| 67 68 74 3f 0d 20 2a 2f | 0d 23 64 65 66 69 6e 65 |ght?. */|.#define|
|00001800| 20 4d 6f 76 65 46 72 6f | 6d 28 6f 66 66 73 65 74 | MoveFro|m(offset|
|00001810| 2c 20 70 68 61 73 65 29 | 09 09 09 30 78 31 38 30 |, phase)|...0x180|
|00001820| 30 30 30 30 30 20 7c 20 | 28 70 68 61 73 65 20 3c |00000 | |(phase <|
|00001830| 3c 20 32 34 29 2c 09 09 | 09 6f 66 66 73 65 74 0d |< 24),..|.offset.|
|00001840| 2f 2a 0d 20 2a 20 4d 6f | 76 65 2f 63 6f 6d 70 75 |/*. * Mo|ve/compu|
|00001850| 74 65 20 64 61 74 61 20 | 75 73 69 6e 67 20 74 68 |te data |using th|
|00001860| 65 20 4e 43 52 20 72 65 | 67 69 73 74 65 72 73 2e |e NCR re|gisters.|
|00001870| 20 4e 6f 74 65 20 74 68 | 61 74 20 74 68 65 20 23 | Note th|at the #|
|00001880| 64 65 66 69 6e 65 27 64 | 20 72 65 67 69 73 74 65 |define'd| registe|
|00001890| 72 73 0d 20 2a 20 61 72 | 65 20 6f 66 66 73 65 74 |rs. * ar|e offset|
|000018a0| 20 77 69 74 68 69 6e 20 | 6f 75 72 20 49 2f 4f 20 | within |our I/O |
|000018b0| 73 70 61 63 65 20 2d 2d | 20 77 65 20 72 65 6d 6f |space --| we remo|
|000018c0| 76 65 20 74 68 69 73 20 | 62 79 20 61 6e 64 27 69 |ve this |by and'i|
|000018d0| 6e 67 20 77 69 74 68 20 | 30 78 37 46 0d 20 2a 2f |ng with |0x7F. */|
|000018e0| 0d 23 64 65 66 69 6e 65 | 20 4d 6f 76 65 56 61 6c |.#define| MoveVal|
|000018f0| 75 65 54 6f 52 65 67 69 | 73 74 65 72 28 76 61 6c |ueToRegi|ster(val|
|00001900| 2c 20 72 65 67 29 20 5c | 0d 09 30 78 37 38 30 30 |, reg) \|..0x7800|
|00001910| 30 30 30 30 20 7c 20 28 | 28 76 61 6c 29 3c 3c 38 |0000 | (|(val)<<8|
|00001920| 29 09 7c 20 28 28 28 72 | 65 67 29 20 26 20 30 78 |).| (((r|eg) & 0x|
|00001930| 37 46 29 20 3c 3c 20 31 | 36 29 2c 20 30 0d 23 64 |7F) << 1|6), 0.#d|
|00001940| 65 66 69 6e 65 20 4f 72 | 56 61 6c 75 65 54 6f 52 |efine Or|ValueToR|
|00001950| 65 67 69 73 74 65 72 28 | 76 61 6c 2c 20 72 65 67 |egister(|val, reg|
|00001960| 29 20 5c 0d 09 30 78 37 | 41 30 30 30 30 30 30 20 |) \..0x7|A000000 |
|00001970| 7c 20 28 28 76 61 6c 29 | 3c 3c 38 29 09 7c 20 28 || ((val)|<<8).| (|
|00001980| 28 28 72 65 67 29 20 26 | 20 30 78 37 46 29 20 3c |((reg) &| 0x7F) <|
|00001990| 3c 20 31 36 29 2c 20 30 | 0d 23 64 65 66 69 6e 65 |< 16), 0|.#define|
|000019a0| 20 41 6e 64 56 61 6c 75 | 65 54 6f 52 65 67 69 73 | AndValu|eToRegis|
|000019b0| 74 65 72 28 76 61 6c 2c | 20 72 65 67 29 20 5c 0d |ter(val,| reg) \.|
|000019c0| 09 30 78 37 43 30 30 30 | 30 30 30 20 7c 20 28 28 |.0x7C000|000 | ((|
|000019d0| 76 61 6c 29 3c 3c 38 29 | 09 7c 20 28 28 28 72 65 |val)<<8)|.| (((re|
|000019e0| 67 29 20 26 20 30 78 37 | 46 29 20 3c 3c 20 31 36 |g) & 0x7|F) << 16|
|000019f0| 29 2c 20 30 0d 2f 2a 0d | 20 2a 20 54 68 69 73 20 |), 0./*.| * This |
|00001a00| 69 73 20 61 63 74 75 61 | 6c 6c 79 20 61 20 22 72 |is actua|lly a "r|
|00001a10| 65 67 69 73 74 65 72 20 | 7c 20 7a 65 72 6f 20 2d |egister || zero -|
|00001a20| 3e 20 53 46 42 52 22 0d | 20 2a 2f 0d 23 64 65 66 |> SFBR".| */.#def|
|00001a30| 69 6e 65 09 4d 6f 76 65 | 54 6f 53 46 42 52 28 72 |ine.Move|ToSFBR(r|
|00001a40| 65 67 29 09 5c 0d 09 30 | 78 37 32 30 30 30 30 30 |eg).\..0|x7200000|
|00001a50| 30 09 09 09 09 7c 20 28 | 28 28 72 65 67 29 20 26 |0....| (|((reg) &|
|00001a60| 20 30 78 37 46 29 20 3c | 3c 20 31 36 29 2c 20 30 | 0x7F) <|< 16), 0|
|00001a70| 0d 2f 2a 0d 20 2a 20 54 | 68 69 73 20 69 73 20 61 |./*. * T|his is a|
|00001a80| 63 74 75 61 6c 6c 79 20 | 61 20 22 53 46 42 52 20 |ctually |a "SFBR |
|00001a90| 7c 20 7a 65 72 6f 20 2d | 3e 20 72 65 67 69 73 74 || zero -|> regist|
|00001aa0| 65 72 22 0d 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |er". */.|#define |
|00001ab0| 4d 6f 76 65 46 72 6f 6d | 53 46 42 52 28 72 65 67 |MoveFrom|SFBR(reg|
|00001ac0| 29 20 5c 0d 09 30 78 36 | 41 30 30 30 30 30 30 09 |) \..0x6|A000000.|
|00001ad0| 09 09 09 7c 20 28 28 28 | 72 65 67 29 20 26 20 30 |...| (((|reg) & 0|
|00001ae0| 78 37 46 29 20 3c 3c 20 | 31 36 29 2c 20 30 0d 23 |x7F) << |16), 0.#|
|00001af0| 69 66 20 30 0d 2f 2a 0d | 20 2a 20 54 68 69 73 20 |if 0./*.| * This |
|00001b00| 72 6f 74 61 74 65 73 20 | 74 68 65 20 63 61 72 72 |rotates |the carr|
|00001b10| 79 20 69 6e 74 6f 20 74 | 68 65 20 72 65 67 69 73 |y into t|he regis|
|00001b20| 74 65 72 20 68 69 67 68 | 20 62 69 74 2e 20 57 65 |ter high| bit. We|
|00001b30| 20 64 6f 20 6e 6f 74 20 | 77 61 6e 74 20 74 68 69 | do not |want thi|
|00001b40| 73 20 74 6f 20 68 61 70 | 70 65 6e 2e 0d 20 2a 2f |s to hap|pen.. */|
|00001b50| 0d 23 64 65 66 69 6e 65 | 20 53 68 69 66 74 52 69 |.#define| ShiftRi|
|00001b60| 67 68 74 28 72 65 67 29 | 09 5c 0d 09 30 78 37 44 |ght(reg)|.\..0x7D|
|00001b70| 30 30 30 30 30 30 09 09 | 09 09 7c 20 28 28 28 72 |000000..|..| (((r|
|00001b80| 65 67 29 20 26 20 30 78 | 37 46 29 20 3c 3c 20 31 |eg) & 0x|7F) << 1|
|00001b90| 36 29 2c 20 30 0d 23 65 | 6e 64 69 66 0d 2f 2a 0d |6), 0.#e|ndif./*.|
|00001ba0| 20 2a 20 49 6e 74 65 72 | 72 75 70 74 20 74 68 65 | * Inter|rupt the|
|00001bb0| 20 68 6f 73 74 20 70 72 | 6f 63 65 73 73 6f 72 2e | host pr|ocessor.|
|00001bc0| 0d 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 49 6e 74 |. */.#de|fine Int|
|00001bd0| 28 73 74 61 74 75 73 29 | 20 09 09 09 09 09 30 78 |(status)| .....0x|
|00001be0| 39 38 30 38 30 30 30 30 | 2c 09 73 74 61 74 75 73 |98080000|,.status|
|00001bf0| 0d 2f 2a 0d 20 2a 20 44 | 65 62 75 67 20 69 6e 74 |./*. * D|ebug int|
|00001c00| 65 72 72 75 70 74 73 20 | 75 73 65 64 20 74 6f 20 |errupts |used to |
|00001c10| 6c 6f 67 20 77 68 79 20 | 74 68 65 20 73 63 72 69 |log why |the scri|
|00001c20| 70 74 20 6a 75 6d 70 73 | 20 74 6f 20 74 68 65 20 |pt jumps| to the |
|00001c30| 66 61 69 6c 75 72 65 20 | 73 63 72 69 70 74 2e 0d |failure |script..|
|00001c40| 20 2a 2f 0d 23 69 66 20 | 55 53 45 5f 4c 4f 47 5f | */.#if |USE_LOG_|
|00001c50| 4c 49 42 52 41 52 59 0d | 23 64 65 66 69 6e 65 20 |LIBRARY.|#define |
|00001c60| 44 65 62 75 67 49 6e 74 | 28 73 74 61 74 75 73 29 |DebugInt|(status)|
|00001c70| 09 09 09 09 49 6e 74 28 | 73 74 61 74 75 73 29 2c |....Int(|status),|
|00001c80| 09 2f 2a 20 4e 6f 74 65 | 20 74 72 61 69 6c 69 6e |./* Note| trailin|
|00001c90| 67 20 63 6f 6d 6d 61 09 | 09 2a 2f 0d 23 65 6c 73 |g comma.|.*/.#els|
|00001ca0| 65 0d 23 64 65 66 69 6e | 65 20 44 65 62 75 67 49 |e.#defin|e DebugI|
|00001cb0| 6e 74 28 73 74 61 74 75 | 73 29 09 09 09 09 2f 2a |nt(statu|s)..../*|
|00001cc0| 20 4e 6f 74 68 69 6e 67 | 20 2a 2f 0d 23 65 6e 64 | Nothing| */.#end|
|00001cd0| 69 66 0d 0d 2f 2a 0d 20 | 2a 20 41 6c 6c 6f 77 44 |if../*. |* AllowD|
|00001ce0| 69 73 63 6f 6e 6e 65 63 | 74 20 3d 3d 20 6d 6f 76 |isconnec|t == mov|
|00001cf0| 65 20 53 43 4e 54 4c 32 | 20 26 20 30 78 37 46 20 |e SCNTL2| & 0x7F |
|00001d00| 74 6f 20 53 43 4e 54 4c | 32 20 2d 2d 20 70 72 65 |to SCNTL|2 -- pre|
|00001d10| 76 65 6e 74 73 20 69 6e | 74 65 72 72 75 70 74 20 |vents in|terrupt |
|00001d20| 6f 6e 20 64 69 73 63 6f | 6e 6e 65 63 74 0d 20 2a |on disco|nnect. *|
|00001d30| 2f 0d 23 64 65 66 69 6e | 65 20 41 6c 6c 6f 77 44 |/.#defin|e AllowD|
|00001d40| 69 73 63 6f 6e 6e 65 63 | 74 28 29 09 09 09 09 30 |isconnec|t()....0|
|00001d50| 78 37 43 30 32 37 46 30 | 30 2c 09 30 78 30 30 30 |x7C027F0|0,.0x000|
|00001d60| 30 30 30 30 30 0d 0d 23 | 64 65 66 69 6e 65 20 6f |00000..#|define o|
|00001d70| 66 66 73 65 74 44 65 76 | 69 63 65 49 44 09 09 09 |ffsetDev|iceID...|
|00001d80| 09 6f 66 66 73 65 74 6f | 66 28 53 63 72 69 70 74 |.offseto|f(Script|
|00001d90| 44 61 74 61 2c 20 64 65 | 76 69 63 65 49 44 54 61 |Data, de|viceIDTa|
|00001da0| 62 6c 65 29 09 2f 2a 20 | 7a 65 72 6f 09 09 2a 2f |ble)./* |zero..*/|
|00001db0| 0d 23 64 65 66 69 6e 65 | 20 6f 66 66 73 65 74 49 |.#define| offsetI|
|00001dc0| 44 4d 73 67 09 09 09 09 | 09 6f 66 66 73 65 74 6f |DMsg....|.offseto|
|00001dd0| 66 28 53 63 72 69 70 74 | 44 61 74 61 2c 20 69 64 |f(Script|Data, id|
|00001de0| 4d 73 67 54 61 62 6c 65 | 29 0d 23 64 65 66 69 6e |MsgTable|).#defin|
|00001df0| 65 20 6f 66 66 73 65 74 | 43 6f 6d 6d 61 6e 64 09 |e offset|Command.|
|00001e00| 09 09 09 6f 66 66 73 65 | 74 6f 66 28 53 63 72 69 |...offse|tof(Scri|
|00001e10| 70 74 44 61 74 61 2c 20 | 63 6f 6d 6d 61 6e 64 54 |ptData, |commandT|
|00001e20| 61 62 6c 65 29 0d 23 64 | 65 66 69 6e 65 20 6f 66 |able).#d|efine of|
|00001e30| 66 73 65 74 44 61 74 61 | 09 09 09 09 09 6f 66 66 |fsetData|.....off|
|00001e40| 73 65 74 6f 66 28 53 63 | 72 69 70 74 44 61 74 61 |setof(Sc|riptData|
|00001e50| 2c 20 64 61 74 61 54 61 | 62 6c 65 29 0d 23 64 65 |, dataTa|ble).#de|
|00001e60| 66 69 6e 65 20 6f 66 66 | 73 65 74 53 74 61 74 75 |fine off|setStatu|
|00001e70| 73 09 09 09 09 6f 66 66 | 73 65 74 6f 66 28 53 63 |s....off|setof(Sc|
|00001e80| 72 69 70 74 44 61 74 61 | 2c 20 73 74 61 74 75 73 |riptData|, status|
|00001e90| 54 61 62 6c 65 29 0d 23 | 64 65 66 69 6e 65 20 6f |Table).#|define o|
|00001ea0| 66 66 73 65 74 43 6f 6d | 6d 61 6e 64 43 6f 6d 70 |ffsetCom|mandComp|
|00001eb0| 6c 65 74 65 09 09 6f 66 | 66 73 65 74 6f 66 28 53 |lete..of|fsetof(S|
|00001ec0| 63 72 69 70 74 44 61 74 | 61 2c 20 63 6f 6d 70 6c |criptDat|a, compl|
|00001ed0| 65 74 65 54 61 62 6c 65 | 29 0d 23 64 65 66 69 6e |eteTable|).#defin|
|00001ee0| 65 20 6f 66 66 73 65 74 | 42 69 74 42 75 63 6b 65 |e offset|BitBucke|
|00001ef0| 74 49 6e 09 09 09 6f 66 | 66 73 65 74 6f 66 28 53 |tIn...of|fsetof(S|
|00001f00| 63 72 69 70 74 44 61 74 | 61 2c 20 62 69 74 42 75 |criptDat|a, bitBu|
|00001f10| 63 6b 65 74 49 6e 54 61 | 62 6c 65 29 0d 23 64 65 |cketInTa|ble).#de|
|00001f20| 66 69 6e 65 20 6f 66 66 | 73 65 74 42 69 74 42 75 |fine off|setBitBu|
|00001f30| 63 6b 65 74 4f 75 74 09 | 09 09 6f 66 66 73 65 74 |cketOut.|..offset|
|00001f40| 6f 66 28 53 63 72 69 70 | 74 44 61 74 61 2c 20 62 |of(Scrip|tData, b|
|00001f50| 69 74 42 75 63 6b 65 74 | 4f 75 74 54 61 62 6c 65 |itBucket|OutTable|
|00001f60| 29 0d 23 64 65 66 69 6e | 65 20 6f 66 66 73 65 74 |).#defin|e offset|
|00001f70| 49 67 6e 6f 72 65 64 4d | 73 67 09 09 09 6f 66 66 |IgnoredM|sg...off|
|00001f80| 73 65 74 6f 66 28 53 63 | 72 69 70 74 44 61 74 61 |setof(Sc|riptData|
|00001f90| 2c 20 69 67 6e 6f 72 65 | 64 4d 73 67 54 61 62 6c |, ignore|dMsgTabl|
|00001fa0| 65 29 0d 0d 2f 2a 0d 20 | 2a 20 54 68 65 20 73 63 |e)../*. |* The sc|
|00001fb0| 72 69 70 74 20 77 69 6c | 6c 20 62 65 20 70 61 74 |ript wil|l be pat|
|00001fc0| 63 68 65 64 20 77 68 65 | 6e 20 69 74 20 69 73 20 |ched whe|n it is |
|00001fd0| 66 69 72 73 74 20 65 78 | 65 63 75 74 65 64 2e 20 |first ex|ecuted. |
|00001fe0| 54 68 65 20 43 54 45 53 | 54 30 20 72 65 67 69 73 |The CTES|T0 regis|
|00001ff0| 74 65 72 20 77 69 6c 6c | 0d 20 2a 20 62 65 20 73 |ter will|. * be s|
|00002000| 65 74 20 74 6f 20 74 68 | 65 20 50 42 2e 64 72 69 |et to th|e PB.dri|
|00002010| 76 65 72 41 63 74 69 6f | 6e 20 76 61 6c 75 65 20 |verActio|n value |
|00002020| 77 68 65 6e 20 74 68 65 | 20 73 63 72 69 70 74 20 |when the| script |
|00002030| 73 74 61 72 74 73 20 74 | 6f 20 69 6e 66 6f 72 6d |starts t|o inform|
|00002040| 20 74 68 65 20 73 63 72 | 69 70 74 0d 20 2a 20 77 | the scr|ipt. * w|
|00002050| 68 65 74 68 65 72 20 74 | 68 65 20 75 73 65 72 27 |hether t|he user'|
|00002060| 73 20 72 65 71 75 65 73 | 74 20 68 61 73 20 61 20 |s reques|t has a |
|00002070| 64 61 74 61 20 70 68 61 | 73 65 2e 0d 20 2a 09 43 |data pha|se.. *.C|
|00002080| 54 45 53 54 30 09 09 49 | 6e 69 74 69 61 6c 69 7a |TEST0..I|nitializ|
|00002090| 65 64 20 74 6f 20 30 20 | 28 6e 6f 20 64 61 74 61 |ed to 0 |(no data|
|000020a0| 29 2c 20 31 20 28 64 61 | 74 61 20 69 6e 29 2c 20 |), 1 (da|ta in), |
|000020b0| 6f 72 20 32 20 28 64 61 | 74 61 20 6f 75 74 29 0d |or 2 (da|ta out).|
|000020c0| 20 2a 09 09 09 09 57 69 | 6c 6c 20 62 65 20 7a 65 | *....Wi|ll be ze|
|000020d0| 72 6f 20 6f 6e 20 65 78 | 69 74 20 69 66 20 74 68 |ro on ex|it if th|
|000020e0| 65 20 64 61 74 61 20 70 | 68 61 73 65 20 77 61 73 |e data p|hase was|
|000020f0| 20 65 78 65 63 75 74 65 | 64 2e 0d 20 2a 20 41 20 | execute|d.. * A |
|00002100| 77 6f 72 64 20 6f 72 20 | 74 77 6f 20 61 62 6f 75 |word or |two abou|
|00002110| 74 20 64 65 62 75 67 67 | 69 6e 67 3a 20 61 73 20 |t debugg|ing: as |
|00002120| 49 20 62 65 67 61 6e 20 | 64 65 62 75 67 67 69 6e |I began |debuggin|
|00002130| 67 2c 20 49 20 61 64 64 | 65 64 20 61 20 76 61 72 |g, I add|ed a var|
|00002140| 69 65 74 79 20 6f 66 20 | 73 74 72 61 6e 67 65 0d |iety of |strange.|
|00002150| 20 2a 20 63 6f 64 65 20 | 62 69 74 73 2c 20 69 6e | * code |bits, in|
|00002160| 63 6c 75 64 69 6e 67 20 | 61 20 6e 75 6d 62 65 72 |cluding |a number|
|00002170| 20 6f 66 20 64 65 62 75 | 67 67 69 6e 67 20 69 6e | of debu|gging in|
|00002180| 74 65 72 72 75 70 74 73 | 20 74 6f 20 74 72 61 63 |terrupts| to trac|
|00002190| 6b 20 64 6f 77 6e 20 61 | 20 70 72 6f 62 6c 65 6d |k down a| problem|
|000021a0| 0d 20 2a 20 28 6d 65 6e | 74 69 6f 6e 65 64 20 62 |. * (men|tioned b|
|000021b0| 65 6c 6f 77 29 2e 20 45 | 76 65 6e 74 75 61 6c 6c |elow). E|ventuall|
|000021c0| 79 2c 20 49 20 74 75 72 | 6e 65 64 20 6f 6e 20 74 |y, I tur|ned on t|
|000021d0| 68 65 20 4e 43 52 20 73 | 69 6e 67 6c 65 2d 73 74 |he NCR s|ingle-st|
|000021e0| 65 70 20 69 6e 74 65 72 | 72 75 70 74 20 61 6e 64 |ep inter|rupt and|
|000021f0| 20 6c 6f 67 67 65 64 0d | 20 2a 20 65 76 65 72 79 | logged.| * every|
|00002200| 20 70 72 6f 67 72 61 6d | 20 63 6f 75 6e 74 65 72 | program| counter|
|00002210| 20 2d 2d 20 74 68 69 73 | 20 6c 6f 63 61 74 65 64 | -- this| located|
|00002220| 20 74 68 65 20 62 75 67 | 2e 20 54 68 65 20 6e 65 | the bug|. The ne|
|00002230| 78 74 20 64 61 79 2c 20 | 49 20 72 65 6d 6f 76 65 |xt day, |I remove|
|00002240| 64 20 61 20 76 61 72 69 | 65 74 79 0d 20 2a 20 6f |d a vari|ety. * o|
|00002250| 66 20 68 61 63 6b 73 2c | 20 72 65 70 6c 61 63 69 |f hacks,| replaci|
|00002260| 6e 67 20 74 68 65 6d 20 | 77 69 74 68 20 61 20 62 |ng them |with a b|
|00002270| 65 74 74 65 72 20 76 65 | 72 73 69 6f 6e 20 6f 66 |etter ve|rsion of|
|00002280| 20 74 68 65 20 73 69 6e | 67 6c 65 2d 73 74 65 70 | the sin|gle-step|
|00002290| 20 6c 6f 67 2e 20 49 20 | 68 61 76 65 20 63 68 6f | log. I |have cho|
|000022a0| 73 65 6e 0d 20 2a 20 74 | 6f 20 6c 65 61 76 65 20 |sen. * t|o leave |
|000022b0| 6d 75 63 68 20 6f 66 20 | 74 68 65 20 73 63 61 66 |much of |the scaf|
|000022c0| 66 6f 6c 64 69 6e 67 20 | 69 6e 20 70 6c 61 63 65 |folding |in place|
|000022d0| 20 74 6f 20 67 69 76 65 | 20 64 65 76 65 6c 6f 70 | to give| develop|
|000022e0| 65 72 73 20 69 6e 73 69 | 67 68 74 20 61 73 20 74 |ers insi|ght as t|
|000022f0| 6f 20 77 68 65 72 65 0d | 20 2a 20 6f 6e 65 20 6d |o where.| * one m|
|00002300| 69 67 68 74 20 65 6e 63 | 6f 75 6e 74 65 72 20 70 |ight enc|ounter p|
|00002310| 72 6f 62 6c 65 6d 73 20 | 64 65 76 65 6c 6f 70 69 |roblems |developi|
|00002320| 6e 67 20 74 6f 20 61 20 | 6e 65 77 2c 20 75 6e 66 |ng to a |new, unf|
|00002330| 61 6d 69 6c 69 61 72 2c | 20 73 74 61 6e 64 61 72 |amiliar,| standar|
|00002340| 64 3b 20 61 6e 64 20 68 | 6f 77 0d 20 2a 20 61 74 |d; and h|ow. * at|
|00002350| 20 6c 65 61 73 74 20 6f | 6e 65 20 72 65 61 73 6f | least o|ne reaso|
|00002360| 6e 61 62 6c 79 20 65 78 | 70 65 72 69 65 6e 63 65 |nably ex|perience|
|00002370| 64 20 65 6e 67 69 6e 65 | 65 72 20 61 70 70 72 6f |d engine|er appro|
|00002380| 61 63 68 65 73 20 74 68 | 65 20 70 72 6f 62 6c 65 |aches th|e proble|
|00002390| 6d 2e 0d 20 2a 0d 20 2a | 20 54 68 65 20 70 72 69 |m.. *. *| The pri|
|000023a0| 6d 61 72 79 20 70 72 6f | 62 6c 65 6d 20 49 20 65 |mary pro|blem I e|
|000023b0| 6e 63 6f 75 6e 74 65 72 | 65 64 20 77 61 73 20 74 |ncounter|ed was t|
|000023c0| 68 65 20 75 6e 61 76 61 | 69 6c 61 62 69 6c 69 74 |he unava|ilabilit|
|000023d0| 79 20 6f 66 20 61 20 63 | 6f 6d 70 69 6c 65 72 20 |y of a c|ompiler |
|000023e0| 66 6f 72 20 74 68 65 0d | 20 2a 20 4e 43 52 20 53 |for the.| * NCR S|
|000023f0| 63 72 69 70 74 20 22 6c | 61 6e 67 75 61 67 65 22 |cript "l|anguage"|
|00002400| 20 2d 2d 20 49 20 68 61 | 76 65 20 65 6d 75 6c 61 | -- I ha|ve emula|
|00002410| 74 65 64 20 74 68 65 20 | 73 63 72 69 70 74 20 62 |ted the |script b|
|00002420| 79 20 63 6f 6d 70 69 6c | 69 6e 67 20 69 6e 73 74 |y compil|ing inst|
|00002430| 72 75 63 74 69 6f 6e 73 | 0d 20 2a 20 75 73 69 6e |ructions|. * usin|
|00002440| 67 20 74 68 65 20 73 6f | 6d 65 77 68 61 74 20 6c |g the so|mewhat l|
|00002450| 69 6d 69 74 65 64 20 43 | 20 70 72 65 2d 70 72 6f |imited C| pre-pro|
|00002460| 63 65 73 73 6f 72 2c 20 | 77 69 74 68 20 61 20 73 |cessor, |with a s|
|00002470| 69 6d 70 6c 65 20 70 6f | 73 74 2d 70 72 6f 63 65 |imple po|st-proce|
|00002480| 73 73 69 6e 67 20 22 73 | 65 63 6f 6e 64 0d 20 2a |ssing "s|econd. *|
|00002490| 20 70 61 73 73 22 20 74 | 6f 20 72 65 73 6f 6c 76 | pass" t|o resolv|
|000024a0| 65 20 6c 61 62 65 6c 6c | 65 64 20 73 74 61 74 65 |e labell|ed state|
|000024b0| 6d 65 6e 74 73 2e 0d 20 | 2a 0d 20 2a 20 41 6c 6c |ments.. |*. * All|
|000024c0| 20 74 68 69 6e 67 73 20 | 63 6f 6e 73 69 64 65 72 | things |consider|
|000024d0| 65 64 2c 20 74 68 65 72 | 65 20 77 65 72 65 20 66 |ed, ther|e were f|
|000024e0| 65 77 20 62 75 67 73 20 | 2d 2d 20 61 6e 64 20 69 |ew bugs |-- and i|
|000024f0| 6e 69 74 69 61 6c 20 64 | 65 62 75 67 67 69 6e 67 |nitial d|ebugging|
|00002500| 20 74 6f 6f 6b 20 74 77 | 6f 0d 20 2a 20 76 65 72 | took tw|o. * ver|
|00002510| 79 20 6c 6f 6e 67 20 64 | 61 79 73 2e 20 48 65 72 |y long d|ays. Her|
|00002520| 65 20 61 72 65 20 74 68 | 65 20 6d 61 69 6e 20 70 |e are th|e main p|
|00002530| 6f 69 6e 74 73 3a 0d 20 | 2a 20 31 2e 20 4c 6f 6e |oints:. |* 1. Lon|
|00002540| 67 77 6f 72 64 20 64 61 | 74 61 20 68 61 64 20 74 |gword da|ta had t|
|00002550| 6f 20 62 65 20 62 79 74 | 65 2d 73 77 61 70 70 65 |o be byt|e-swappe|
|00002560| 64 20 66 6f 72 20 74 68 | 65 20 50 43 49 20 6c 69 |d for th|e PCI li|
|00002570| 74 74 6c 65 2d 65 6e 64 | 69 61 6e 20 65 6e 76 69 |ttle-end|ian envi|
|00002580| 72 6f 6e 6d 65 6e 74 2e | 0d 20 2a 20 20 20 20 54 |ronment.|. * T|
|00002590| 68 69 73 20 69 6e 63 6c | 75 64 65 73 20 73 63 72 |his incl|udes scr|
|000025a0| 69 70 74 73 20 61 6e 64 | 20 74 68 65 20 54 61 62 |ipts and| the Tab|
|000025b0| 6c 65 20 61 64 64 72 65 | 73 73 20 61 6e 64 20 6c |le addre|ss and l|
|000025c0| 65 6e 67 74 68 20 76 61 | 6c 75 65 73 2e 0d 20 2a |ength va|lues.. *|
|000025d0| 20 32 2e 20 54 68 65 72 | 65 20 77 65 72 65 20 61 | 2. Ther|e were a|
|000025e0| 20 66 65 77 20 73 69 6d | 70 6c 65 20 62 75 67 73 | few sim|ple bugs|
|000025f0| 20 69 6e 20 74 68 65 20 | 73 63 72 69 70 74 20 6d | in the |script m|
|00002600| 61 63 72 6f 73 20 2d 2d | 20 6e 6f 74 68 69 6e 67 |acros --| nothing|
|00002610| 20 73 70 65 63 69 61 6c | 2c 20 62 75 74 20 61 6e | special|, but an|
|00002620| 0d 20 2a 20 20 20 20 69 | 6e 76 65 72 74 65 64 20 |. * i|nverted |
|00002630| 74 72 75 65 2f 66 61 6c | 73 65 20 62 69 74 20 74 |true/fal|se bit t|
|00002640| 6f 6f 6b 20 69 74 73 20 | 74 6f 6c 6c 2e 0d 20 2a |ook its |toll.. *|
|00002650| 20 33 2e 20 53 69 6e 67 | 6c 65 2d 73 74 65 70 20 | 3. Sing|le-step |
|00002660| 72 65 63 6f 72 64 69 6e | 67 20 77 61 73 20 61 64 |recordin|g was ad|
|00002670| 64 65 64 20 77 68 65 6e | 20 74 68 65 20 73 63 72 |ded when| the scr|
|00002680| 69 70 74 20 6b 65 70 74 | 20 77 61 6e 64 65 72 69 |ipt kept| wanderi|
|00002690| 6e 67 20 74 68 72 6f 75 | 67 68 20 70 6c 61 63 65 |ng throu|gh place|
|000026a0| 73 20 69 74 0d 20 2a 20 | 20 20 20 73 68 6f 75 6c |s it. * | shoul|
|000026b0| 64 20 6e 6f 74 20 68 61 | 76 65 20 67 6f 6e 65 2e |d not ha|ve gone.|
|000026c0| 20 54 68 65 20 72 65 61 | 73 6f 6e 20 66 6f 72 20 | The rea|son for |
|000026d0| 74 68 69 73 20 69 73 20 | 74 68 61 74 20 49 20 77 |this is |that I w|
|000026e0| 61 73 20 75 6e 61 77 61 | 72 65 20 74 68 61 74 20 |as unawa|re that |
|000026f0| 74 68 65 20 4a 75 6d 70 | 0d 20 2a 20 20 20 20 69 |the Jump|. * i|
|00002700| 6e 73 74 72 75 63 74 69 | 6f 6e 20 64 6f 65 73 20 |nstructi|on does |
|00002710| 6e 6f 74 20 4a 75 6d 70 | 20 75 6e 6c 65 73 73 20 |not Jump| unless |
|00002720| 74 68 65 20 22 74 72 75 | 65 22 20 62 69 74 20 69 |the "tru|e" bit i|
|00002730| 73 20 73 65 74 2e 20 41 | 70 70 61 72 65 6e 74 6c |s set. A|pparentl|
|00002740| 79 2c 20 74 68 65 20 4e | 43 52 0d 20 2a 09 20 20 |y, the N|CR. *. |
|00002750| 63 68 69 70 20 64 65 73 | 69 67 6e 65 72 20 6c 65 |chip des|igner le|
|00002760| 61 72 6e 65 64 20 74 6f | 20 70 72 6f 67 72 61 6d |arned to| program|
|00002770| 20 6f 6e 20 61 20 50 44 | 50 2d 31 30 2e 0d 20 2a | on a PD|P-10.. *|
|00002780| 20 34 2e 20 41 20 66 6f | 6f 74 6e 6f 74 65 20 68 | 4. A fo|otnote h|
|00002790| 69 64 64 65 6e 20 61 74 | 20 74 68 65 20 62 6f 74 |idden at| the bot|
|000027a0| 74 6f 6d 20 6f 66 20 74 | 68 65 20 70 61 67 65 20 |tom of t|he page |
|000027b0| 6e 6f 74 65 64 20 74 68 | 61 74 20 74 68 65 20 73 |noted th|at the s|
|000027c0| 68 69 66 74 20 6f 70 65 | 72 61 74 69 6f 6e 0d 20 |hift ope|ration. |
|000027d0| 2a 09 20 20 73 68 69 66 | 74 73 20 74 68 72 6f 75 |*. shif|ts throu|
|000027e0| 67 68 20 74 68 65 20 63 | 61 72 72 79 20 62 69 74 |gh the c|arry bit|
|000027f0| 2c 20 6a 75 73 74 20 69 | 6e 20 63 61 73 65 20 79 |, just i|n case y|
|00002800| 6f 75 20 77 61 6e 74 20 | 74 6f 20 69 6d 70 6c 65 |ou want |to imple|
|00002810| 6d 65 6e 74 20 61 20 64 | 69 76 69 73 69 6f 6e 0d |ment a d|ivision.|
|00002820| 20 2a 09 20 20 69 6e 20 | 74 68 65 20 73 63 72 69 | *. in |the scri|
|00002830| 70 74 2e 0d 20 2a 20 35 | 2e 20 41 64 64 65 64 20 |pt.. * 5|. Added |
|00002840| 61 20 62 75 6e 63 68 20 | 6f 66 20 65 78 74 72 61 |a bunch |of extra|
|00002850| 6e 65 6f 75 73 20 69 6e | 74 65 72 72 75 70 74 73 |neous in|terrupts|
|00002860| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 6c 6f 67 | in orde|r to log|
|00002870| 20 70 72 65 63 69 73 65 | 6c 79 20 77 68 79 20 74 | precise|ly why t|
|00002880| 68 65 0d 20 2a 09 20 20 | 73 63 72 69 70 74 20 64 |he. *. |script d|
|00002890| 65 63 69 64 65 64 20 74 | 6f 20 6a 75 6d 70 20 74 |ecided t|o jump t|
|000028a0| 6f 20 74 68 65 20 66 61 | 69 6c 75 72 65 20 73 65 |o the fa|ilure se|
|000028b0| 71 75 65 6e 63 65 2e 20 | 54 68 65 73 65 20 63 61 |quence. |These ca|
|000028c0| 6e 20 6e 6f 77 20 62 65 | 20 72 65 6d 6f 76 65 64 |n now be| removed|
|000028d0| 2e 0d 20 2a 2f 0d 55 49 | 6e 74 33 32 09 20 09 09 |.. */.UI|nt32. ..|
|000028e0| 67 4e 43 52 53 43 53 49 | 53 63 72 69 70 74 5b 5d |gNCRSCSI|Script[]|
|000028f0| 20 3d 20 7b 0d 09 53 63 | 72 69 70 74 53 74 61 72 | = {..Sc|riptStar|
|00002900| 74 2c 09 09 2f 2a 20 30 | 78 30 30 09 09 09 09 09 |t,../* 0|x00.....|
|00002910| 09 53 63 72 69 70 74 20 | 53 74 61 72 74 20 28 6d |.Script |Start (m|
|00002920| 75 73 74 20 62 65 20 61 | 74 20 73 74 61 72 74 29 |ust be a|t start)|
|00002930| 09 2a 2f 0d 09 2f 2a 0d | 09 20 2a 20 54 68 69 73 |.*/../*.|. * This|
|00002940| 20 74 72 61 6e 73 66 65 | 72 20 76 65 63 74 6f 72 | transfe|r vector|
|00002950| 20 6d 75 73 74 20 74 72 | 61 63 6b 20 74 68 65 20 | must tr|ack the |
|00002960| 64 65 66 69 6e 69 74 69 | 6f 6e 73 20 69 6e 20 4e |definiti|ons in N|
|00002970| 43 52 35 33 43 38 32 35 | 2e 68 0d 09 20 2a 2f 0d |CR53C825|.h.. */.|
|00002980| 09 4a 75 6d 70 28 27 42 | 75 73 52 27 29 2c 09 09 |.Jump('B|usR'),..|
|00002990| 2f 2a 20 30 78 30 38 09 | 6b 42 75 73 52 65 73 65 |/* 0x08.|kBusRese|
|000029a0| 74 53 63 72 69 70 74 09 | 09 53 74 61 72 74 20 6f |tScript.|.Start o|
|000029b0| 66 20 42 75 73 20 52 65 | 73 65 74 20 53 63 72 69 |f Bus Re|set Scri|
|000029c0| 70 74 09 09 2a 2f 0d 09 | 4a 75 6d 70 28 27 42 75 |pt..*/..|Jump('Bu|
|000029d0| 73 58 27 29 2c 09 09 2f | 2a 20 30 78 31 30 09 6b |sX'),../|* 0x10.k|
|000029e0| 42 75 73 52 65 73 65 74 | 53 63 72 69 70 74 52 65 |BusReset|ScriptRe|
|000029f0| 73 74 61 72 74 09 42 75 | 73 20 72 65 73 65 74 20 |start.Bu|s reset |
|00002a00| 63 6f 6d 70 6c 65 74 69 | 6f 6e 09 09 2a 2f 0d 09 |completi|on..*/..|
|00002a10| 4a 75 6d 70 28 27 53 63 | 73 69 27 29 2c 09 09 2f |Jump('Sc|si'),../|
|00002a20| 2a 20 30 78 31 38 09 6b | 53 43 53 49 43 6f 6d 6d |* 0x18.k|SCSIComm|
|00002a30| 61 6e 64 53 63 72 69 70 | 74 09 53 74 61 72 74 20 |andScrip|t.Start |
|00002a40| 6f 66 20 53 43 53 49 20 | 43 6f 6d 6d 61 6e 64 20 |of SCSI |Command |
|00002a50| 53 63 72 69 70 74 09 2a | 2f 0d 09 4a 75 6d 70 28 |Script.*|/..Jump(|
|00002a60| 27 46 61 69 6c 27 29 2c | 09 09 2f 2a 20 30 78 32 |'Fail'),|../* 0x2|
|00002a70| 30 09 6b 53 43 53 49 52 | 75 6e 64 6f 77 6e 53 63 |0.kSCSIR|undownSc|
|00002a80| 72 69 70 74 09 47 6f 74 | 6f 20 49 2f 4f 20 72 75 |ript.Got|o I/O ru|
|00002a90| 6e 64 6f 77 6e 09 09 09 | 09 2a 2f 0d 09 4a 75 6d |ndown...|.*/..Jum|
|00002aa0| 70 28 27 4c 6f 6f 70 27 | 29 2c 09 09 2f 2a 20 30 |p('Loop'|),../* 0|
|00002ab0| 78 32 38 09 6b 53 43 53 | 49 52 65 73 74 61 72 74 |x28.kSCS|IRestart|
|00002ac0| 53 63 72 69 70 74 09 47 | 6f 74 6f 20 6d 61 69 6e |Script.G|oto main|
|00002ad0| 20 53 43 53 49 20 6c 6f | 6f 70 09 09 09 09 2a 2f | SCSI lo|op....*/|
|00002ae0| 0d 2f 2a 0d 20 2a 2a 2a | 20 53 43 53 49 20 43 6f |./*. ***| SCSI Co|
|00002af0| 6d 6d 61 6e 64 20 53 63 | 72 69 70 74 0d 20 2a 2f |mmand Sc|ript. */|
|00002b00| 0d 20 0d 2f 2a 0d 20 2a | 20 48 65 72 65 20 77 65 |. ./*. *| Here we|
|00002b10| 20 67 6f 3a 20 73 65 6c | 65 63 74 20 74 68 65 20 | go: sel|ect the |
|00002b20| 64 65 76 69 63 65 20 61 | 6e 64 20 73 65 6e 64 20 |device a|nd send |
|00002b30| 74 68 65 20 49 64 65 6e | 74 69 66 79 20 6d 65 73 |the Iden|tify mes|
|00002b40| 73 61 67 65 20 69 66 20 | 74 68 65 20 64 65 76 69 |sage if |the devi|
|00002b50| 63 65 0d 20 2a 20 67 6f | 65 73 20 74 6f 20 4d 53 |ce. * go|es to MS|
|00002b60| 47 5f 4f 55 54 20 70 68 | 61 73 65 2e 20 53 43 53 |G_OUT ph|ase. SCS|
|00002b70| 49 2d 49 20 64 65 76 69 | 63 65 73 20 6d 61 79 20 |I-I devi|ces may |
|00002b80| 6e 6f 74 20 64 6f 20 74 | 68 69 73 3b 20 77 65 27 |not do t|his; we'|
|00002b90| 6c 6c 20 63 6c 65 61 72 | 20 41 54 4e 20 6a 75 73 |ll clear| ATN jus|
|00002ba0| 74 20 69 6e 0d 20 2a 20 | 63 61 73 65 2e 20 54 68 |t in. * |case. Th|
|00002bb0| 65 6e 20 73 65 6e 64 20 | 74 68 65 20 63 6f 6d 6d |en send |the comm|
|00002bc0| 61 6e 64 20 69 66 20 74 | 68 65 20 64 65 76 69 63 |and if t|he devic|
|00002bd0| 65 20 69 73 20 69 6e 20 | 43 4d 44 20 70 68 61 73 |e is in |CMD phas|
|00002be0| 65 2c 20 6f 74 68 65 72 | 77 69 73 65 2c 20 66 61 |e, other|wise, fa|
|00002bf0| 69 6c 2e 0d 20 2a 2f 0d | 4c 61 62 65 6c 28 27 53 |il.. */.|Label('S|
|00002c00| 63 73 69 27 29 2c 0d 09 | 53 65 6c 65 63 74 41 54 |csi'),..|SelectAT|
|00002c10| 4e 28 6f 66 66 73 65 74 | 44 65 76 69 63 65 49 44 |N(offset|DeviceID|
|00002c20| 2c 20 27 52 65 53 65 27 | 29 2c 09 2f 2a 20 49 6e |, 'ReSe'|),./* In|
|00002c30| 74 65 72 72 75 70 74 20 | 68 65 72 65 20 69 66 20 |terrupt |here if |
|00002c40| 73 65 6c 65 63 74 69 6f | 6e 20 66 61 69 6c 73 09 |selectio|n fails.|
|00002c50| 09 2a 2f 0d 09 4a 75 6d | 70 57 68 65 6e 4e 6f 74 |.*/..Jum|pWhenNot|
|00002c60| 50 68 61 73 65 28 4d 53 | 47 4f 2c 20 27 49 6e 69 |Phase(MS|GO, 'Ini|
|00002c70| 74 27 29 2c 0d 09 4d 6f | 76 65 46 72 6f 6d 28 6f |t'),..Mo|veFrom(o|
|00002c80| 66 66 73 65 74 49 44 4d | 73 67 2c 20 4d 53 47 4f |ffsetIDM|sg, MSGO|
|00002c90| 29 2c 0d 4c 61 62 65 6c | 28 27 49 6e 69 74 27 29 |),.Label|('Init')|
|00002ca0| 2c 0d 09 43 6c 65 61 72 | 41 54 4e 28 29 2c 0d 2f |,..Clear|ATN(),./|
|00002cb0| 2a 0d 20 2a 20 54 68 65 | 20 6d 61 69 6e 20 70 68 |*. * The| main ph|
|00002cc0| 61 73 65 2d 6c 6f 6f 70 | 20 2d 2d 20 63 6f 6e 74 |ase-loop| -- cont|
|00002cd0| 69 6e 75 65 20 65 78 65 | 63 75 74 69 6e 67 20 63 |inue exe|cuting c|
|00002ce0| 6f 6d 6d 61 6e 64 73 20 | 75 6e 74 69 6c 20 77 65 |ommands |until we|
|00002cf0| 20 72 65 61 63 68 20 53 | 74 61 74 75 73 20 70 68 | reach S|tatus ph|
|00002d00| 61 73 65 2e 0d 20 2a 2f | 0d 4c 61 62 65 6c 28 27 |ase.. */|.Label('|
|00002d10| 4c 6f 6f 70 27 29 2c 0d | 09 4a 75 6d 70 57 68 65 |Loop'),.|.JumpWhe|
|00002d20| 6e 50 68 61 73 65 28 43 | 4d 44 2c 09 09 09 09 27 |nPhase(C|MD,....'|
|00002d30| 43 6d 64 50 27 29 2c 0d | 09 4a 75 6d 70 49 66 50 |CmdP'),.|.JumpIfP|
|00002d40| 68 61 73 65 28 53 54 53 | 2c 09 09 09 09 27 53 74 |hase(STS|,....'St|
|00002d50| 61 74 27 29 2c 0d 09 4a | 75 6d 70 49 66 50 68 61 |at'),..J|umpIfPha|
|00002d60| 73 65 28 4d 53 47 49 2c | 09 09 09 09 27 4d 73 67 |se(MSGI,|....'Msg|
|00002d70| 49 27 29 2c 09 2f 2a 20 | 4d 65 73 73 61 67 65 20 |I'),./* |Message |
|00002d80| 72 65 6a 65 63 74 3f 09 | 09 09 09 09 2a 2f 0d 09 |reject?.|....*/..|
|00002d90| 4a 75 6d 70 49 66 50 68 | 61 73 65 28 44 41 54 49 |JumpIfPh|ase(DATI|
|00002da0| 2c 09 09 09 09 27 44 61 | 74 61 27 29 2c 0d 09 4a |,....'Da|ta'),..J|
|00002db0| 75 6d 70 49 66 50 68 61 | 73 65 28 44 41 54 4f 2c |umpIfPha|se(DATO,|
|00002dc0| 09 09 09 09 27 44 61 74 | 61 27 29 2c 0d 09 44 65 |....'Dat|a'),..De|
|00002dd0| 62 75 67 49 6e 74 28 6b | 49 6e 74 46 61 69 6c 53 |bugInt(k|IntFailS|
|00002de0| 74 72 61 6e 67 65 50 68 | 61 73 65 29 0d 09 4a 75 |trangePh|ase)..Ju|
|00002df0| 6d 70 28 27 46 61 69 6c | 27 29 2c 09 09 09 09 09 |mp('Fail|'),.....|
|00002e00| 09 09 09 2f 2a 20 53 74 | 72 61 6e 67 65 20 70 68 |.../* St|range ph|
|00002e10| 61 73 65 09 09 09 09 09 | 2a 2f 0d 2f 2a 0d 20 2a |ase.....|*/./*. *|
|00002e20| 20 44 61 74 61 20 70 68 | 61 73 65 20 63 6f 6d 6d | Data ph|ase comm|
|00002e30| 6f 6e 20 65 6e 74 72 61 | 6e 63 65 2e 20 49 66 20 |on entra|nce. If |
|00002e40| 43 54 45 53 54 30 20 69 | 73 20 7a 65 72 6f 2c 20 |CTEST0 i|s zero, |
|00002e50| 69 6e 74 65 72 72 75 70 | 74 20 2d 2d 20 74 68 69 |interrup|t -- thi|
|00002e60| 73 20 6d 61 79 20 62 65 | 20 61 0d 20 2a 20 70 61 |s may be| a. * pa|
|00002e70| 72 74 69 61 6c 2d 70 72 | 65 70 61 72 61 74 69 6f |rtial-pr|eparatio|
|00002e80| 6e 20 63 6f 6e 74 69 6e | 75 61 6e 63 65 2e 0d 20 |n contin|uance.. |
|00002e90| 2a 2f 0d 4c 61 62 65 6c | 28 27 44 61 74 61 27 29 |*/.Label|('Data')|
|00002ea0| 2c 0d 09 4d 6f 76 65 54 | 6f 53 46 42 52 28 43 54 |,..MoveT|oSFBR(CT|
|00002eb0| 45 53 54 30 29 2c 09 09 | 09 09 09 09 09 2f 2a 20 |EST0),..|...../* |
|00002ec0| 49 73 20 64 61 74 61 20 | 70 72 65 70 61 72 65 64 |Is data |prepared|
|00002ed0| 3f 09 09 09 09 2a 2f 0d | 09 4a 75 6d 70 49 66 45 |?....*/.|.JumpIfE|
|00002ee0| 71 75 61 6c 28 6b 4e 43 | 52 44 72 69 76 65 72 4e |qual(kNC|RDriverN|
|00002ef0| 6f 44 61 74 61 50 68 61 | 73 65 2c 20 27 4e 6f 44 |oDataPha|se, 'NoD|
|00002f00| 61 27 29 2c 09 2f 2a 20 | 4a 75 6d 70 20 69 66 20 |a'),./* |Jump if |
|00002f10| 6e 6f 74 20 70 72 65 70 | 61 72 65 64 09 09 09 09 |not prep|ared....|
|00002f20| 2a 2f 0d 4c 61 62 65 6c | 28 27 44 61 4f 4b 27 29 |*/.Label|('DaOK')|
|00002f30| 2c 09 09 09 09 09 09 09 | 09 09 2f 2a 20 41 6c 6c |,.......|../* All|
|00002f40| 20 70 72 65 70 61 72 65 | 64 2c 20 73 6f 20 64 6f | prepare|d, so do|
|00002f50| 20 74 68 65 20 74 72 61 | 6e 73 66 65 72 09 2a 2f | the tra|nsfer.*/|
|00002f60| 0d 09 4a 75 6d 70 49 66 | 50 68 61 73 65 28 44 41 |..JumpIf|Phase(DA|
|00002f70| 54 49 2c 09 09 09 09 27 | 44 61 74 49 27 29 2c 09 |TI,....'|DatI'),.|
|00002f80| 2f 2a 20 47 6f 6f 64 20 | 73 6f 20 66 61 72 2c 20 |/* Good |so far, |
|00002f90| 6a 75 6d 70 20 74 6f 20 | 74 68 65 20 70 72 6f 70 |jump to |the prop|
|00002fa0| 65 72 09 2a 2f 0d 09 4a | 75 6d 70 49 66 50 68 61 |er.*/..J|umpIfPha|
|00002fb0| 73 65 28 44 41 54 4f 2c | 09 09 09 09 27 44 61 74 |se(DATO,|....'Dat|
|00002fc0| 4f 27 29 2c 09 2f 2a 20 | 20 70 68 61 73 65 20 68 |O'),./* | phase h|
|00002fd0| 61 6e 64 6c 65 72 09 09 | 09 09 09 2a 2f 0d 09 44 |andler..|...*/..D|
|00002fe0| 65 62 75 67 49 6e 74 28 | 6b 49 6e 74 44 61 74 61 |ebugInt(|kIntData|
|00002ff0| 50 68 61 73 65 45 78 70 | 65 63 74 65 64 29 0d 09 |PhaseExp|ected)..|
|00003000| 4a 75 6d 70 28 27 46 61 | 69 6c 27 29 2c 09 09 09 |Jump('Fa|il'),...|
|00003010| 09 09 09 09 09 2f 2a 20 | 57 65 20 73 68 6f 75 6c |...../* |We shoul|
|00003020| 64 20 62 65 20 69 6e 20 | 61 20 64 61 74 61 20 70 |d be in |a data p|
|00003030| 68 61 73 65 09 09 2a 2f | 0d 4c 61 62 65 6c 28 27 |hase..*/|.Label('|
|00003040| 4e 6f 44 61 27 29 2c 0d | 09 49 6e 74 28 6b 49 6e |NoDa'),.|.Int(kIn|
|00003050| 74 4e 65 65 64 41 6e 6f | 74 68 65 72 50 72 65 70 |tNeedAno|therPrep|
|00003060| 61 72 61 74 69 6f 6e 29 | 2c 09 09 09 2f 2a 20 49 |aration)|,.../* I|
|00003070| 73 20 61 6e 6f 74 68 65 | 72 20 70 72 65 70 61 72 |s anothe|r prepar|
|00003080| 61 74 69 6f 6e 20 6e 65 | 65 64 65 64 3f 09 2a 2f |ation ne|eded?.*/|
|00003090| 0d 09 4d 6f 76 65 54 6f | 53 46 42 52 28 43 54 45 |..MoveTo|SFBR(CTE|
|000030a0| 53 54 30 29 2c 09 09 09 | 09 09 09 09 2f 2a 20 43 |ST0),...|..../* C|
|000030b0| 6f 6e 74 69 6e 75 65 64 | 2c 20 69 73 20 69 74 20 |ontinued|, is it |
|000030c0| 70 72 65 70 61 72 65 64 | 20 6e 6f 77 3f 09 2a 2f |prepared| now?.*/|
|000030d0| 0d 09 4a 75 6d 70 49 66 | 4e 6f 74 45 71 75 61 6c |..JumpIf|NotEqual|
|000030e0| 28 30 2c 09 09 09 09 27 | 44 61 4f 4b 27 29 2c 09 |(0,....'|DaOK'),.|
|000030f0| 2f 2a 20 59 65 73 2c 20 | 74 72 79 20 74 68 65 20 |/* Yes, |try the |
|00003100| 74 72 61 6e 73 66 65 72 | 20 61 67 61 69 6e 09 09 |transfer| again..|
|00003110| 2a 2f 0d 09 44 65 62 75 | 67 49 6e 74 28 6b 49 6e |*/..Debu|gInt(kIn|
|00003120| 74 50 72 65 70 61 72 61 | 74 69 6f 6e 46 61 69 6c |tPrepara|tionFail|
|00003130| 65 64 29 0d 09 4a 75 6d | 70 28 27 46 61 69 6c 27 |ed)..Jum|p('Fail'|
|00003140| 29 2c 09 09 09 09 09 09 | 09 09 2f 2a 20 52 75 6e |),......|../* Run|
|00003150| 20 74 68 65 20 62 69 74 | 2d 62 75 63 6b 65 74 20 | the bit|-bucket |
|00003160| 73 63 72 69 70 74 09 09 | 2a 2f 0d 2f 2a 0d 20 2a |script..|*/./*. *|
|00003170| 20 43 6f 6d 6d 61 6e 64 | 20 70 68 61 73 65 20 2d | Command| phase -|
|00003180| 20 73 65 6e 64 20 6f 75 | 74 20 74 68 65 20 63 6f | send ou|t the co|
|00003190| 6d 6d 61 6e 64 2c 0d 20 | 2a 20 54 42 53 3a 20 43 |mmand,. |* TBS: C|
|000031a0| 6c 65 61 72 20 61 20 62 | 69 74 20 69 6e 20 43 54 |lear a b|it in CT|
|000031b0| 45 53 54 30 20 74 6f 20 | 73 69 67 6e 61 6c 20 74 |EST0 to |signal t|
|000031c0| 68 61 74 20 77 65 20 73 | 65 6e 74 20 6f 75 74 20 |hat we s|ent out |
|000031d0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 2e 0d 20 2a 2f |the comm|and.. */|
|000031e0| 0d 4c 61 62 65 6c 28 27 | 43 6d 64 50 27 29 2c 0d |.Label('|CmdP'),.|
|000031f0| 09 4d 6f 76 65 46 72 6f | 6d 28 6f 66 66 73 65 74 |.MoveFro|m(offset|
|00003200| 43 6f 6d 6d 61 6e 64 2c | 20 43 4d 44 29 2c 0d 09 |Command,| CMD),..|
|00003210| 4a 75 6d 70 28 27 4c 6f | 6f 70 27 29 2c 0d 2f 2a |Jump('Lo|op'),./*|
|00003220| 0d 20 2a 20 44 61 74 61 | 20 4f 75 74 20 70 68 61 |. * Data| Out pha|
|00003230| 73 65 3a 20 43 54 45 53 | 54 30 20 6d 75 73 74 20 |se: CTES|T0 must |
|00003240| 65 71 75 61 6c 20 6b 4e | 43 52 44 72 69 76 65 72 |equal kN|CRDriver|
|00003250| 4f 75 74 70 75 74 41 6c | 6c 6f 77 65 64 0d 20 2a |OutputAl|lowed. *|
|00003260| 2f 0d 4c 61 62 65 6c 28 | 27 44 61 74 4f 27 29 2c |/.Label(|'DatO'),|
|00003270| 0d 09 4a 75 6d 70 49 66 | 4e 6f 74 45 71 75 61 6c |..JumpIf|NotEqual|
|00003280| 28 6b 4e 43 52 44 72 69 | 76 65 72 4f 75 74 70 75 |(kNCRDri|verOutpu|
|00003290| 74 41 6c 6c 6f 77 65 64 | 2c 09 27 44 61 4f 46 27 |tAllowed|,.'DaOF'|
|000032a0| 29 2c 0d 20 09 4d 6f 76 | 65 56 61 6c 75 65 54 6f |),. .Mov|eValueTo|
|000032b0| 52 65 67 69 73 74 65 72 | 28 6b 4e 43 52 44 72 69 |Register|(kNCRDri|
|000032c0| 76 65 72 4e 6f 44 61 74 | 61 50 68 61 73 65 2c 20 |verNoDat|aPhase, |
|000032d0| 43 54 45 53 54 30 29 2c | 0d 20 09 4d 6f 76 65 46 |CTEST0),|. .MoveF|
|000032e0| 72 6f 6d 28 6f 66 66 73 | 65 74 44 61 74 61 2c 20 |rom(offs|etData, |
|000032f0| 44 41 54 4f 29 2c 0d 20 | 09 4a 75 6d 70 28 27 4c |DATO),. |.Jump('L|
|00003300| 6f 6f 70 27 29 2c 09 09 | 09 09 09 09 2f 2a 20 44 |oop'),..|..../* D|
|00003310| 61 74 61 20 70 68 61 73 | 65 20 63 6f 6d 70 6c 65 |ata phas|e comple|
|00003320| 74 69 6f 6e 09 09 09 09 | 09 2a 2f 0d 4c 61 62 65 |tion....|.*/.Labe|
|00003330| 6c 28 27 44 61 4f 46 27 | 29 2c 0d 09 44 65 62 75 |l('DaOF'|),..Debu|
|00003340| 67 49 6e 74 28 6b 49 6e | 74 44 61 74 61 4f 75 74 |gInt(kIn|tDataOut|
|00003350| 4e 6f 44 61 74 61 29 0d | 09 4a 75 6d 70 28 27 46 |NoData).|.Jump('F|
|00003360| 61 69 6c 27 29 2c 0d 2f | 2a 0d 20 2a 20 44 61 74 |ail'),./|*. * Dat|
|00003370| 61 20 49 6e 20 70 68 61 | 73 65 3a 20 43 54 45 53 |a In pha|se: CTES|
|00003380| 54 30 20 6d 75 73 74 20 | 65 71 75 61 6c 20 6b 4e |T0 must |equal kN|
|00003390| 43 52 44 72 69 76 65 72 | 49 6e 70 75 74 41 6c 6c |CRDriver|InputAll|
|000033a0| 6f 77 65 64 0d 20 2a 2f | 0d 4c 61 62 65 6c 28 27 |owed. */|.Label('|
|000033b0| 44 61 74 49 27 29 2c 0d | 09 4a 75 6d 70 49 66 4e |DatI'),.|.JumpIfN|
|000033c0| 6f 74 45 71 75 61 6c 28 | 6b 4e 43 52 44 72 69 76 |otEqual(|kNCRDriv|
|000033d0| 65 72 49 6e 70 75 74 41 | 6c 6c 6f 77 65 64 2c 20 |erInputA|llowed, |
|000033e0| 27 44 61 49 46 27 29 2c | 0d 20 09 4d 6f 76 65 56 |'DaIF'),|. .MoveV|
|000033f0| 61 6c 75 65 54 6f 52 65 | 67 69 73 74 65 72 28 6b |alueToRe|gister(k|
|00003400| 4e 43 52 44 72 69 76 65 | 72 4e 6f 44 61 74 61 50 |NCRDrive|rNoDataP|
|00003410| 68 61 73 65 2c 20 43 54 | 45 53 54 30 29 2c 0d 20 |hase, CT|EST0),. |
|00003420| 09 4d 6f 76 65 46 72 6f | 6d 28 6f 66 66 73 65 74 |.MoveFro|m(offset|
|00003430| 44 61 74 61 2c 20 44 41 | 54 49 29 2c 0d 2f 2a 0d |Data, DA|TI),./*.|
|00003440| 20 2a 20 57 65 20 77 69 | 6c 6c 20 67 65 74 20 61 | * We wi|ll get a|
|00003450| 20 70 68 61 73 65 20 6d | 69 73 6d 61 74 63 68 20 | phase m|ismatch |
|00003460| 65 72 72 6f 72 20 68 65 | 72 65 20 28 49 20 74 68 |error he|re (I th|
|00003470| 69 6e 6b 29 20 69 66 20 | 77 65 20 61 72 65 20 69 |ink) if |we are i|
|00003480| 6e 20 61 20 73 68 6f 72 | 74 2d 0d 20 2a 20 74 72 |n a shor|t-. * tr|
|00003490| 61 6e 73 66 65 72 20 73 | 69 74 75 61 74 69 6f 6e |ansfer s|ituation|
|000034a0| 2e 20 49 6e 20 74 68 69 | 73 20 63 61 73 65 2c 20 |. In thi|s case, |
|000034b0| 74 68 65 20 44 42 43 20 | 73 68 6f 75 6c 64 20 62 |the DBC |should b|
|000034c0| 65 20 6e 6f 6e 2d 7a 65 | 72 6f 20 61 6e 64 20 74 |e non-ze|ro and t|
|000034d0| 68 65 20 66 69 66 6f 27 | 73 0d 20 2a 20 65 6d 70 |he fifo'|s. * emp|
|000034e0| 74 79 2e 20 49 6e 20 74 | 68 69 73 20 63 61 73 65 |ty. In t|his case|
|000034f0| 2c 20 74 68 65 20 69 6e | 74 65 72 72 75 70 74 20 |, the in|terrupt |
|00003500| 73 65 72 76 69 63 65 20 | 72 6f 75 74 69 6e 65 20 |service |routine |
|00003510| 72 65 63 6f 76 65 72 73 | 20 62 79 20 72 65 74 72 |recovers| by retr|
|00003520| 69 65 76 69 6e 67 20 74 | 68 65 0d 20 2a 20 44 42 |ieving t|he. * DB|
|00003530| 43 20 63 6f 75 6e 74 20 | 28 66 6f 72 20 74 68 65 |C count |(for the|
|00003540| 20 61 63 74 75 61 6c 54 | 72 61 6e 73 66 65 72 20 | actualT|ransfer |
|00003550| 63 6f 6d 70 75 74 61 74 | 69 6f 6e 29 20 61 6e 64 |computat|ion) and|
|00003560| 20 72 65 73 74 61 72 74 | 69 6e 67 20 74 68 65 20 | restart|ing the |
|00003570| 73 63 72 69 70 74 2e 0d | 20 2a 2f 0d 20 09 4a 75 |script..| */. .Ju|
|00003580| 6d 70 28 27 4c 6f 6f 70 | 27 29 2c 09 09 09 09 09 |mp('Loop|'),.....|
|00003590| 09 2f 2a 20 44 61 74 61 | 20 70 68 61 73 65 20 63 |./* Data| phase c|
|000035a0| 6f 6d 70 6c 65 74 69 6f | 6e 09 09 09 09 09 2a 2f |ompletio|n.....*/|
|000035b0| 0d 4c 61 62 65 6c 28 27 | 44 61 49 46 27 29 2c 0d |.Label('|DaIF'),.|
|000035c0| 09 44 65 62 75 67 49 6e | 74 28 6b 49 6e 74 44 61 |.DebugIn|t(kIntDa|
|000035d0| 74 61 49 6e 4e 6f 44 61 | 74 61 29 0d 09 4a 75 6d |taInNoDa|ta)..Jum|
|000035e0| 70 28 27 46 61 69 6c 27 | 29 2c 0d 2f 2a 0d 20 2a |p('Fail'|),./*. *|
|000035f0| 20 4e 6f 72 6d 61 6c 20 | 65 78 69 74 20 74 68 72 | Normal |exit thr|
|00003600| 6f 75 67 68 20 53 74 61 | 74 75 73 20 50 68 61 73 |ough Sta|tus Phas|
|00003610| 65 20 2d 20 73 74 6f 72 | 65 20 74 68 65 20 73 74 |e - stor|e the st|
|00003620| 61 74 75 73 20 61 6e 64 | 20 65 78 70 65 63 74 20 |atus and| expect |
|00003630| 61 20 4d 53 47 5f 49 4e | 20 74 6f 20 66 6f 6c 6c |a MSG_IN| to foll|
|00003640| 6f 77 2e 0d 20 2a 2f 0d | 4c 61 62 65 6c 28 27 53 |ow.. */.|Label('S|
|00003650| 74 61 74 27 29 2c 0d 09 | 4d 6f 76 65 46 72 6f 6d |tat'),..|MoveFrom|
|00003660| 28 6f 66 66 73 65 74 53 | 74 61 74 75 73 2c 20 53 |(offsetS|tatus, S|
|00003670| 54 53 29 2c 0d 09 4a 75 | 6d 70 57 68 65 6e 50 68 |TS),..Ju|mpWhenPh|
|00003680| 61 73 65 28 4d 53 47 49 | 2c 20 27 43 6f 43 6f 27 |ase(MSGI|, 'CoCo'|
|00003690| 29 2c 0d 09 44 65 62 75 | 67 49 6e 74 28 6b 49 6e |),..Debu|gInt(kIn|
|000036a0| 74 4e 6f 74 4d 73 67 49 | 6e 41 66 74 65 72 53 74 |tNotMsgI|nAfterSt|
|000036b0| 61 74 75 73 29 0d 20 09 | 4a 75 6d 70 28 27 46 61 |atus). .|Jump('Fa|
|000036c0| 69 6c 27 29 2c 0d 2f 2a | 0d 20 2a 20 4d 65 73 73 |il'),./*|. * Mess|
|000036d0| 67 65 20 69 6e 20 64 75 | 72 69 6e 67 20 6e 6f 72 |ge in du|ring nor|
|000036e0| 6d 61 6c 20 63 6f 6d 6d | 61 6e 64 20 70 72 6f 63 |mal comm|and proc|
|000036f0| 65 73 73 69 6e 67 2e 20 | 41 62 6f 75 74 20 61 6c |essing. |About al|
|00003700| 6c 20 77 65 20 63 61 6e | 20 64 6f 20 69 73 20 6c |l we can| do is l|
|00003710| 6f 6f 6b 20 66 6f 72 20 | 61 0d 20 2a 20 4d 65 73 |ook for |a. * Mes|
|00003720| 73 61 67 65 20 72 65 6a | 65 63 74 20 28 74 6f 20 |sage rej|ect (to |
|00003730| 74 68 65 20 69 64 65 6e | 74 69 66 79 20 6d 65 73 |the iden|tify mes|
|00003740| 73 61 67 65 29 20 61 6e | 64 20 69 67 6e 6f 72 65 |sage) an|d ignore|
|00003750| 20 69 74 2e 20 57 65 20 | 73 68 6f 75 6c 64 20 61 | it. We |should a|
|00003760| 6c 73 6f 20 68 61 6e 64 | 6c 65 0d 20 2a 20 6f 74 |lso hand|le. * ot|
|00003770| 68 65 72 20 22 72 65 61 | 73 6f 6e 61 62 6c 65 22 |her "rea|sonable"|
|00003780| 20 6d 65 73 73 61 67 65 | 73 2e 0d 20 2a 0d 20 2a | message|s.. *. *|
|00003790| 20 54 68 69 73 20 6e 65 | 65 64 73 20 77 6f 72 6b | This ne|eds work|
|000037a0| 20 2d 2d 20 6c 6f 74 73 | 20 6f 66 20 77 6f 72 6b | -- lots| of work|
|000037b0| 20 2d 2d 20 66 6f 72 20 | 61 20 70 72 6f 64 75 63 | -- for |a produc|
|000037c0| 74 69 6f 6e 20 64 72 69 | 76 65 72 2e 20 41 6c 73 |tion dri|ver. Als|
|000037d0| 6f 2c 20 61 20 70 72 6f | 64 75 63 74 69 6f 6e 0d |o, a pro|duction.|
|000037e0| 20 2a 20 64 72 69 76 65 | 72 20 6e 65 65 64 73 20 | * drive|r needs |
|000037f0| 74 6f 20 62 65 20 61 62 | 6c 65 20 74 6f 20 73 65 |to be ab|le to se|
|00003800| 6e 64 20 6d 65 73 73 61 | 67 65 73 20 28 73 75 63 |nd messa|ges (suc|
|00003810| 68 20 61 73 20 22 61 62 | 6f 72 74 22 29 20 64 75 |h as "ab|ort") du|
|00003820| 72 69 6e 67 20 6e 6f 72 | 6d 61 6c 0d 20 2a 20 73 |ring nor|mal. * s|
|00003830| 63 72 69 70 74 20 6f 70 | 65 72 61 74 69 6f 6e 2e |cript op|eration.|
|00003840| 0d 20 2a 2f 0d 4c 61 62 | 65 6c 28 27 4d 73 67 49 |. */.Lab|el('MsgI|
|00003850| 27 29 2c 0d 09 4d 6f 76 | 65 46 72 6f 6d 28 6f 66 |'),..Mov|eFrom(of|
|00003860| 66 73 65 74 49 67 6e 6f | 72 65 64 4d 73 67 2c 20 |fsetIgno|redMsg, |
|00003870| 4d 53 47 49 29 2c 0d 09 | 43 6c 65 61 72 41 43 4b |MSGI),..|ClearACK|
|00003880| 28 29 2c 0d 09 4a 75 6d | 70 28 27 4c 6f 6f 70 27 |(),..Jum|p('Loop'|
|00003890| 29 2c 0d 2f 2a 0d 20 2a | 20 4e 6f 72 6d 61 6c 20 |),./*. *| Normal |
|000038a0| 65 78 69 74 20 61 74 20 | 43 6f 6d 6d 61 6e 64 20 |exit at |Command |
|000038b0| 43 6f 6d 70 6c 65 74 65 | 20 6d 65 73 73 61 67 65 |Complete| message|
|000038c0| 2e 0d 20 2a 2f 0d 4c 61 | 62 65 6c 28 27 43 6f 43 |.. */.La|bel('CoC|
|000038d0| 6f 27 29 2c 0d 20 09 4d | 6f 76 65 46 72 6f 6d 28 |o'),. .M|oveFrom(|
|000038e0| 6f 66 66 73 65 74 43 6f | 6d 6d 61 6e 64 43 6f 6d |offsetCo|mmandCom|
|000038f0| 70 6c 65 74 65 2c 20 4d | 53 47 49 29 2c 0d 2f 2a |plete, M|SGI),./*|
|00003900| 0d 20 2a 20 46 69 6e 61 | 6c 20 28 73 75 63 63 65 |. * Fina|l (succe|
|00003910| 73 73 66 75 6c 29 20 65 | 78 69 74 3a 20 41 43 4b |ssful) e|xit: ACK|
|00003920| 20 74 68 65 20 43 6f 6d | 6d 61 6e 64 20 43 6f 6d | the Com|mand Com|
|00003930| 70 6c 65 74 65 20 4d 73 | 67 20 61 6e 64 20 77 61 |plete Ms|g and wa|
|00003940| 69 74 20 66 6f 72 20 62 | 75 73 2d 66 72 65 65 2e |it for b|us-free.|
|00003950| 0d 20 2a 2f 0d 4c 61 62 | 65 6c 28 27 45 78 69 74 |. */.Lab|el('Exit|
|00003960| 27 29 2c 0d 09 41 6c 6c | 6f 77 44 69 73 63 6f 6e |'),..All|owDiscon|
|00003970| 6e 65 63 74 28 29 2c 0d | 09 43 6c 65 61 72 41 43 |nect(),.|.ClearAC|
|00003980| 4b 28 29 2c 0d 09 57 61 | 69 74 44 69 73 63 6f 6e |K(),..Wa|itDiscon|
|00003990| 6e 65 63 74 28 29 2c 0d | 09 49 6e 74 28 6e 6f 45 |nect(),.|.Int(noE|
|000039a0| 72 72 29 2c 0d 2f 2a 0d | 20 2a 20 46 61 69 6c 75 |rr),./*.| * Failu|
|000039b0| 72 65 73 20 64 75 72 69 | 6e 67 20 6e 6f 72 6d 61 |res duri|ng norma|
|000039c0| 6c 20 70 72 6f 63 65 73 | 73 69 6e 67 20 63 6f 6d |l proces|sing com|
|000039d0| 65 20 68 65 72 65 2e 20 | 57 65 20 62 69 74 2d 62 |e here. |We bit-b|
|000039e0| 75 63 6b 65 74 20 74 68 | 65 20 64 61 74 61 20 75 |ucket th|e data u|
|000039f0| 6e 74 69 6c 20 74 68 65 | 0d 20 2a 20 74 61 72 67 |ntil the|. * targ|
|00003a00| 65 74 20 72 65 61 63 68 | 65 73 20 53 54 41 54 55 |et reach|es STATU|
|00003a10| 53 20 70 68 61 73 65 2c | 20 74 68 65 6e 20 74 72 |S phase,| then tr|
|00003a20| 79 20 74 6f 20 68 61 6e | 64 6c 65 20 74 68 65 20 |y to han|dle the |
|00003a30| 53 54 41 54 55 53 20 61 | 6e 64 20 4d 53 47 5f 49 |STATUS a|nd MSG_I|
|00003a40| 4e 20 20 6d 65 73 73 61 | 67 65 73 2e 0d 20 2a 0d |N messa|ges.. *.|
|00003a50| 20 2a 20 54 68 69 73 20 | 69 73 20 6e 6f 74 20 71 | * This |is not q|
|00003a60| 75 69 74 65 20 73 75 66 | 66 69 63 69 65 6e 74 3a |uite suf|ficient:|
|00003a70| 20 77 65 20 73 68 6f 75 | 6c 64 20 63 68 65 63 6b | we shou|ld check|
|00003a80| 20 66 6f 72 20 52 45 51 | 20 2d 2d 20 69 66 20 69 | for REQ| -- if i|
|00003a90| 74 20 69 73 20 6e 6f 74 | 20 73 65 74 2c 0d 20 2a |t is not| set,. *|
|00003aa0| 20 77 65 20 73 68 6f 75 | 6c 64 20 73 65 74 20 41 | we shou|ld set A|
|00003ab0| 54 4e 20 61 6e 64 20 77 | 61 69 74 20 66 6f 72 20 |TN and w|ait for |
|00003ac0| 52 45 51 20 61 67 61 69 | 6e 2e 20 4d 53 47 4f 20 |REQ agai|n. MSGO |
|00003ad0| 77 69 6c 6c 20 74 68 65 | 6e 20 73 65 6e 64 20 61 |will the|n send a|
|00003ae0| 20 53 43 53 49 20 61 62 | 6f 72 74 0d 20 2a 20 62 | SCSI ab|ort. * b|
|00003af0| 79 74 65 20 28 77 65 20 | 63 6f 75 6c 64 20 64 6f |yte (we |could do|
|00003b00| 20 74 68 69 73 20 69 6e | 20 74 68 65 20 73 63 72 | this in| the scr|
|00003b10| 69 70 74 20 62 79 20 6d | 6f 76 69 6e 67 20 6b 53 |ipt by m|oving kS|
|00003b20| 63 73 69 4d 73 67 41 62 | 6f 72 74 20 74 6f 20 74 |csiMsgAb|ort to t|
|00003b30| 68 65 20 53 46 42 52 29 | 0d 20 2a 20 48 6d 6d 2c |he SFBR)|. * Hmm,|
|00003b40| 20 77 65 20 63 6f 75 6c | 64 20 70 72 6f 62 61 62 | we coul|d probab|
|00003b50| 6c 79 20 64 6f 20 74 68 | 65 20 65 6e 74 69 72 65 |ly do th|e entire|
|00003b60| 20 62 69 74 20 62 75 63 | 6b 65 74 20 69 6e 20 74 | bit buc|ket in t|
|00003b70| 68 65 20 73 63 72 69 70 | 74 20 62 79 20 66 69 64 |he scrip|t by fid|
|00003b80| 64 6c 69 6e 67 0d 20 2a | 20 77 69 74 68 20 74 68 |dling. *| with th|
|00003b90| 65 20 53 46 42 52 20 72 | 65 67 69 73 74 65 72 2e |e SFBR r|egister.|
|00003ba0| 0d 20 2a 2f 0d 4c 61 62 | 65 6c 28 27 46 61 69 6c |. */.Lab|el('Fail|
|00003bb0| 27 29 2c 0d 09 4a 75 6d | 70 49 66 4e 6f 74 50 68 |'),..Jum|pIfNotPh|
|00003bc0| 61 73 65 28 4d 53 47 49 | 2c 20 27 46 6f 6f 70 27 |ase(MSGI|, 'Foop'|
|00003bd0| 29 2c 0d 4c 61 62 65 6c | 28 27 46 4d 73 49 27 29 |),.Label|('FMsI')|
|00003be0| 2c 0d 09 4d 6f 76 65 46 | 72 6f 6d 28 6f 66 66 73 |,..MoveF|rom(offs|
|00003bf0| 65 74 42 69 74 42 75 63 | 6b 65 74 49 6e 2c 20 4d |etBitBuc|ketIn, M|
|00003c00| 53 47 49 29 2c 0d 09 43 | 6c 65 61 72 41 43 4b 28 |SGI),..C|learACK(|
|00003c10| 29 2c 0d 4c 61 62 65 6c | 28 27 46 6f 6f 70 27 29 |),.Label|('Foop')|
|00003c20| 2c 0d 09 4a 75 6d 70 57 | 68 65 6e 50 68 61 73 65 |,..JumpW|henPhase|
|00003c30| 28 53 54 53 2c 09 09 27 | 46 53 74 73 27 29 2c 0d |(STS,..'|FSts'),.|
|00003c40| 09 4a 75 6d 70 49 66 50 | 68 61 73 65 28 44 41 54 |.JumpIfP|hase(DAT|
|00003c50| 49 2c 09 09 27 46 44 61 | 49 27 29 2c 0d 09 4a 75 |I,..'FDa|I'),..Ju|
|00003c60| 6d 70 49 66 50 68 61 73 | 65 28 44 41 54 4f 2c 09 |mpIfPhas|e(DATO,.|
|00003c70| 09 27 46 44 61 4f 27 29 | 2c 0d 09 4a 75 6d 70 49 |.'FDaO')|,..JumpI|
|00003c80| 66 50 68 61 73 65 28 4d | 53 47 49 2c 09 09 27 46 |fPhase(M|SGI,..'F|
|00003c90| 4d 73 49 27 29 2c 0d 09 | 4a 75 6d 70 49 66 50 68 |MsI'),..|JumpIfPh|
|00003ca0| 61 73 65 28 4d 53 47 4f | 2c 09 09 27 46 4d 73 4f |ase(MSGO|,..'FMsO|
|00003cb0| 27 29 2c 0d 09 4a 75 6d | 70 49 66 50 68 61 73 65 |'),..Jum|pIfPhase|
|00003cc0| 28 43 4d 44 2c 09 09 27 | 46 43 6d 64 27 29 2c 0d |(CMD,..'|FCmd'),.|
|00003cd0| 09 49 6e 74 28 73 63 73 | 69 55 6e 61 62 6c 65 54 |.Int(scs|iUnableT|
|00003ce0| 6f 54 65 72 6d 69 6e 61 | 74 65 29 2c 09 09 09 2f |oTermina|te),.../|
|00003cf0| 2a 20 53 6f 6d 65 74 68 | 69 6e 67 20 69 73 20 73 |* Someth|ing is s|
|00003d00| 65 72 69 6f 75 73 6c 79 | 20 77 72 6f 6e 67 20 68 |eriously| wrong h|
|00003d10| 65 72 65 09 2a 2f 0d 4c | 61 62 65 6c 28 27 46 43 |ere.*/.L|abel('FC|
|00003d20| 6d 64 27 29 2c 0d 09 4d | 6f 76 65 46 72 6f 6d 28 |md'),..M|oveFrom(|
|00003d30| 6f 66 66 73 65 74 42 69 | 74 42 75 63 6b 65 74 4f |offsetBi|tBucketO|
|00003d40| 75 74 2c 20 43 4d 44 29 | 2c 0d 09 4a 75 6d 70 28 |ut, CMD)|,..Jump(|
|00003d50| 27 46 6f 6f 70 27 29 2c | 0d 4c 61 62 65 6c 28 27 |'Foop'),|.Label('|
|00003d60| 46 44 61 49 27 29 2c 0d | 09 4d 6f 76 65 46 72 6f |FDaI'),.|.MoveFro|
|00003d70| 6d 28 6f 66 66 73 65 74 | 42 69 74 42 75 63 6b 65 |m(offset|BitBucke|
|00003d80| 74 49 6e 2c 20 44 41 54 | 49 29 2c 0d 09 4a 75 6d |tIn, DAT|I),..Jum|
|00003d90| 70 28 27 46 6f 6f 70 27 | 29 2c 0d 4c 61 62 65 6c |p('Foop'|),.Label|
|00003da0| 28 27 46 44 61 4f 27 29 | 2c 0d 09 4d 6f 76 65 46 |('FDaO')|,..MoveF|
|00003db0| 72 6f 6d 28 6f 66 66 73 | 65 74 42 69 74 42 75 63 |rom(offs|etBitBuc|
|00003dc0| 6b 65 74 4f 75 74 2c 20 | 44 41 54 4f 29 2c 0d 09 |ketOut, |DATO),..|
|00003dd0| 4a 75 6d 70 28 27 46 6f | 6f 70 27 29 2c 0d 4c 61 |Jump('Fo|op'),.La|
|00003de0| 62 65 6c 28 27 46 4d 73 | 4f 27 29 2c 0d 09 4d 6f |bel('FMs|O'),..Mo|
|00003df0| 76 65 46 72 6f 6d 28 6f | 66 66 73 65 74 42 69 74 |veFrom(o|ffsetBit|
|00003e00| 42 75 63 6b 65 74 4f 75 | 74 2c 20 4d 53 47 4f 29 |BucketOu|t, MSGO)|
|00003e10| 2c 0d 09 4a 75 6d 70 28 | 27 46 6f 6f 70 27 29 2c |,..Jump(|'Foop'),|
|00003e20| 0d 2f 2a 0d 20 2a 20 53 | 74 61 74 75 73 20 70 68 |./*. * S|tatus ph|
|00003e30| 61 73 65 20 61 66 74 65 | 72 20 73 6f 6d 65 20 72 |ase afte|r some r|
|00003e40| 65 63 6f 76 65 72 61 62 | 6c 65 20 65 72 72 6f 72 |ecoverab|le error|
|00003e50| 2e 20 47 65 74 20 74 68 | 65 20 62 79 74 65 73 20 |. Get th|e bytes |
|00003e60| 61 6e 64 20 71 75 69 74 | 2e 20 44 6f 6e 27 74 20 |and quit|. Don't |
|00003e70| 74 72 79 20 6d 6f 76 65 | 0d 20 2a 20 65 6c 61 62 |try move|. * elab|
|00003e80| 6f 72 61 74 65 20 72 65 | 63 6f 76 65 72 79 20 68 |orate re|covery h|
|00003e90| 65 72 65 2e 0d 20 2a 2f | 0d 4c 61 62 65 6c 28 27 |ere.. */|.Label('|
|00003ea0| 46 53 74 73 27 29 2c 0d | 09 4d 6f 76 65 46 72 6f |FSts'),.|.MoveFro|
|00003eb0| 6d 28 6f 66 66 73 65 74 | 53 74 61 74 75 73 2c 20 |m(offset|Status, |
|00003ec0| 53 54 53 29 2c 0d 20 09 | 4d 6f 76 65 46 72 6f 6d |STS),. .|MoveFrom|
|00003ed0| 28 6f 66 66 73 65 74 43 | 6f 6d 6d 61 6e 64 43 6f |(offsetC|ommandCo|
|00003ee0| 6d 70 6c 65 74 65 2c 20 | 4d 53 47 49 29 2c 0d 09 |mplete, |MSGI),..|
|00003ef0| 41 6c 6c 6f 77 44 69 73 | 63 6f 6e 6e 65 63 74 28 |AllowDis|connect(|
|00003f00| 29 2c 0d 09 43 6c 65 61 | 72 41 43 4b 28 29 2c 0d |),..Clea|rACK(),.|
|00003f10| 09 57 61 69 74 44 69 73 | 63 6f 6e 6e 65 63 74 28 |.WaitDis|connect(|
|00003f20| 29 2c 0d 09 49 6e 74 28 | 73 63 73 69 53 65 71 75 |),..Int(|scsiSequ|
|00003f30| 65 6e 63 65 46 61 69 6c | 65 64 29 2c 0d 2f 2a 0d |enceFail|ed),./*.|
|00003f40| 20 2a 20 4a 75 6d 70 20 | 68 65 72 65 20 69 66 20 | * Jump |here if |
|00003f50| 74 68 69 73 20 6d 61 63 | 68 69 6e 65 20 77 61 73 |this mac|hine was|
|00003f60| 20 73 65 6c 65 63 74 65 | 64 20 6f 72 20 72 65 73 | selecte|d or res|
|00003f70| 65 6c 65 63 74 65 64 2e | 0d 20 2a 2f 0d 4c 61 62 |elected.|. */.Lab|
|00003f80| 65 6c 28 27 52 65 53 65 | 27 29 2c 0d 09 49 6e 74 |el('ReSe|'),..Int|
|00003f90| 28 73 63 73 69 42 75 73 | 79 29 2c 09 09 09 09 09 |(scsiBus|y),.....|
|00003fa0| 2f 2a 20 54 68 69 73 20 | 69 73 20 70 72 6f 62 61 |/* This |is proba|
|00003fb0| 62 6c 79 20 74 68 65 20 | 77 72 6f 6e 67 20 65 72 |bly the |wrong er|
|00003fc0| 72 6f 72 09 2a 2f 0d 09 | 4a 75 6d 70 28 27 52 65 |ror.*/..|Jump('Re|
|00003fd0| 53 65 27 29 2c 0d 0d 2f | 2a 0d 20 2a 2a 2a 20 42 |Se'),../|*. *** B|
|00003fe0| 75 73 20 52 65 73 65 74 | 20 53 63 72 69 70 74 20 |us Reset| Script |
|00003ff0| 28 54 68 69 73 20 69 73 | 20 69 6e 64 65 70 65 6e |(This is| indepen|
|00004000| 64 65 6e 74 20 6f 66 20 | 74 68 65 20 53 43 53 49 |dent of |the SCSI|
|00004010| 20 43 6f 6d 6d 61 6e 64 | 20 73 63 72 69 70 74 29 | Command| script)|
|00004020| 0d 20 2a 2f 0d 4c 61 62 | 65 6c 28 27 42 75 73 52 |. */.Lab|el('BusR|
|00004030| 27 29 2c 0d 2f 2a 0d 20 | 2a 20 41 73 73 65 72 74 |'),./*. |* Assert|
|00004040| 20 62 75 73 20 72 65 73 | 65 74 20 2d 20 74 68 69 | bus res|et - thi|
|00004050| 73 20 77 69 6c 6c 20 69 | 6e 74 65 72 72 75 70 74 |s will i|nterrupt|
|00004060| 20 74 68 65 20 70 72 6f | 63 65 73 73 6f 72 2c 20 | the pro|cessor, |
|00004070| 62 75 74 20 74 68 65 20 | 69 6e 74 65 72 72 75 70 |but the |interrup|
|00004080| 74 0d 20 2a 20 73 65 72 | 76 69 63 65 20 72 6f 75 |t. * ser|vice rou|
|00004090| 74 69 6e 65 20 6e 6f 74 | 65 73 20 74 68 61 74 20 |tine not|es that |
|000040a0| 77 65 20 61 73 73 65 72 | 74 65 64 20 72 65 73 65 |we asser|ted rese|
|000040b0| 74 20 61 6e 64 20 77 69 | 6c 6c 20 63 6f 6e 74 69 |t and wi|ll conti|
|000040c0| 6e 75 65 20 61 74 20 27 | 42 75 73 58 27 0d 20 2a |nue at '|BusX'. *|
|000040d0| 2f 0d 09 4d 6f 76 65 56 | 61 6c 75 65 54 6f 52 65 |/..MoveV|alueToRe|
|000040e0| 67 69 73 74 65 72 28 62 | 69 74 33 2c 20 53 43 4e |gister(b|it3, SCN|
|000040f0| 54 4c 31 29 2c 09 09 09 | 09 2f 2a 20 54 68 69 73 |TL1),...|./* This|
|00004100| 20 77 69 6c 6c 20 69 6e | 74 65 72 72 75 70 74 09 | will in|terrupt.|
|00004110| 09 09 2a 2f 0d 4c 61 62 | 65 6c 28 27 4e 6f 4f 70 |..*/.Lab|el('NoOp|
|00004120| 27 29 2c 09 09 09 09 09 | 09 09 09 09 09 2f 2a 20 |'),.....|...../* |
|00004130| 54 68 69 73 20 6d 69 67 | 68 74 20 6e 6f 74 20 62 |This mig|ht not b|
|00004140| 65 20 6e 65 65 64 65 64 | 09 09 2a 2f 0d 4c 61 62 |e needed|..*/.Lab|
|00004150| 65 6c 28 27 42 75 73 58 | 27 29 2c 09 09 09 09 09 |el('BusX|'),.....|
|00004160| 09 09 09 09 09 2f 2a 20 | 42 75 73 20 72 65 73 65 |...../* |Bus rese|
|00004170| 74 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 09 09 09 2a |t comple|tion...*|
|00004180| 2f 0d 09 4d 6f 76 65 56 | 61 6c 75 65 54 6f 52 65 |/..MoveV|alueToRe|
|00004190| 67 69 73 74 65 72 28 30 | 2c 20 53 43 4e 54 4c 31 |gister(0|, SCNTL1|
|000041a0| 29 2c 0d 09 49 6e 74 28 | 6e 6f 45 72 72 29 2c 0d |),..Int(|noErr),.|
|000041b0| 7d 3b 0d 42 79 74 65 43 | 6f 75 6e 74 09 09 09 09 |};.ByteC|ount....|
|000041c0| 09 67 4e 43 52 53 43 53 | 49 53 63 72 69 70 74 53 |.gNCRSCS|IScriptS|
|000041d0| 69 7a 65 20 3d 20 73 69 | 7a 65 6f 66 20 67 4e 43 |ize = si|zeof gNC|
|000041e0| 52 53 43 53 49 53 63 72 | 69 70 74 3b 0d 0d 23 64 |RSCSIScr|ipt;..#d|
|000041f0| 65 66 69 6e 65 20 6b 4d | 61 78 4c 61 62 65 6c 73 |efine kM|axLabels|
|00004200| 09 09 09 33 32 09 09 09 | 09 09 09 2f 2a 20 53 69 |...32...|.../* Si|
|00004210| 7a 65 6f 66 20 74 68 65 | 20 6c 61 62 65 6c 20 74 |zeof the| label t|
|00004220| 61 62 65 6c 09 09 2a 2f | 0d 73 74 72 75 63 74 20 |abel..*/|.struct |
|00004230| 4c 61 62 65 6c 54 61 62 | 6c 65 20 7b 0d 09 75 6e |LabelTab|le {..un|
|00004240| 73 69 67 6e 65 64 20 6c | 6f 6e 67 09 09 09 6c 61 |signed l|ong...la|
|00004250| 62 65 6c 3b 0d 09 75 6e | 73 69 67 6e 65 64 20 6c |bel;..un|signed l|
|00004260| 6f 6e 67 09 09 09 73 63 | 72 69 70 74 49 6e 64 65 |ong...sc|riptInde|
|00004270| 78 3b 0d 7d 3b 0d 74 79 | 70 65 64 65 66 20 73 74 |x;.};.ty|pedef st|
|00004280| 72 75 63 74 20 4c 61 62 | 65 6c 54 61 62 6c 65 20 |ruct Lab|elTable |
|00004290| 4c 61 62 65 6c 54 61 62 | 6c 65 2c 20 2a 4c 61 62 |LabelTab|le, *Lab|
|000042a0| 65 6c 54 61 62 6c 65 50 | 74 72 3b 0d 0d 69 6e 74 |elTableP|tr;..int|
|000042b0| 09 09 09 09 09 09 09 4e | 43 52 4c 6f 6f 6b 75 70 |.......N|CRLookup|
|000042c0| 53 79 6d 62 6f 6c 28 0d | 09 09 4c 61 62 65 6c 54 |Symbol(.|..LabelT|
|000042d0| 61 62 6c 65 50 74 72 09 | 09 09 6c 61 62 65 6c 54 |ablePtr.|..labelT|
|000042e0| 61 62 6c 65 50 74 72 2c | 0d 09 09 69 6e 74 09 09 |ablePtr,|...int..|
|000042f0| 09 09 09 09 6e 4c 61 62 | 65 6c 73 2c 0d 09 09 75 |....nLab|els,...u|
|00004300| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 09 09 09 73 |nsigned |long...s|
|00004310| 79 6d 62 6f 6c 4e 61 6d | 65 0d 09 29 3b 0d 42 6f |ymbolNam|e..);.Bo|
|00004320| 6f 6c 65 61 6e 09 09 09 | 09 09 09 48 61 73 4c 61 |olean...|...HasLa|
|00004330| 62 65 6c 28 0d 09 09 55 | 49 6e 74 33 32 09 09 09 |bel(...U|Int32...|
|00004340| 09 09 6f 70 63 6f 64 65 | 0d 09 29 3b 0d 0d 0d 2f |..opcode|..);.../|
|00004350| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004360| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004370| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004380| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004390| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|000043a0| 2a 20 2a 20 2a 0d 20 2a | 20 48 61 63 6b 20 74 6f |* * *. *| Hack to|
|000043b0| 20 70 61 74 63 68 20 74 | 68 65 20 67 6f 74 6f 20 | patch t|he goto |
|000043c0| 61 64 64 72 65 73 73 65 | 73 20 69 6e 20 74 68 65 |addresse|s in the|
|000043d0| 20 73 63 72 69 70 74 2e | 20 54 68 69 73 20 69 73 | script.| This is|
|000043e0| 20 61 20 62 69 74 20 6d | 6f 72 65 20 65 66 66 69 | a bit m|ore effi|
|000043f0| 63 69 65 6e 74 20 74 68 | 61 6e 0d 20 2a 20 77 6f |cient th|an. * wo|
|00004400| 75 6c 64 20 72 65 61 6c | 6c 79 20 62 65 20 6e 65 |uld real|ly be ne|
|00004410| 63 65 73 73 61 72 79 2e | 20 49 74 20 69 73 20 63 |cessary.| It is c|
|00004420| 61 6c 6c 65 64 20 77 68 | 65 6e 20 74 68 65 20 64 |alled wh|en the d|
|00004430| 72 69 76 65 72 20 6f 70 | 65 6e 73 2e 2e 0d 20 2a |river op|ens... *|
|00004440| 2f 0d 4f 53 45 72 72 0d | 4e 43 52 50 61 74 63 68 |/.OSErr.|NCRPatch|
|00004450| 53 63 72 69 70 74 28 76 | 6f 69 64 29 0d 7b 0d 09 |Script(v|oid).{..|
|00004460| 09 4f 53 45 72 72 09 09 | 09 09 09 73 74 61 74 75 |.OSErr..|...statu|
|00004470| 73 3b 0d 09 09 75 6e 73 | 69 67 6e 65 64 20 6c 6f |s;...uns|igned lo|
|00004480| 6e 67 09 09 09 64 63 6d | 64 3b 09 09 09 09 2f 2a |ng...dcm|d;..../*|
|00004490| 20 4f 70 63 6f 64 65 09 | 09 09 09 09 09 2a 2f 0d | Opcode.|.....*/.|
|000044a0| 09 09 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 09 |..unsign|ed long.|
|000044b0| 09 09 64 73 70 73 3b 09 | 09 09 09 2f 2a 20 53 65 |..dsps;.|.../* Se|
|000044c0| 63 6f 6e 64 20 77 6f 72 | 64 20 2d 2d 20 68 61 73 |cond wor|d -- has|
|000044d0| 20 73 79 6d 62 6f 6c 09 | 2a 2f 0d 09 09 69 6e 74 | symbol.|*/...int|
|000044e0| 09 09 09 09 09 09 73 63 | 72 69 70 74 49 6e 64 65 |......sc|riptInde|
|000044f0| 78 3b 09 09 2f 2a 20 2d | 3e 20 53 63 72 69 70 74 |x;../* -|> Script|
|00004500| 20 6f 70 65 72 61 74 69 | 6f 6e 09 09 09 2a 2f 0d | operati|on...*/.|
|00004510| 09 09 69 6e 74 09 09 09 | 09 09 09 6d 61 78 53 63 |..int...|...maxSc|
|00004520| 72 69 70 74 3b 09 09 09 | 2f 2a 20 4c 6f 6e 67 77 |ript;...|/* Longw|
|00004530| 6f 72 64 73 20 69 6e 20 | 73 63 72 69 70 74 09 09 |ords in |script..|
|00004540| 09 2a 2f 0d 09 09 69 6e | 74 09 09 09 09 09 09 6c |.*/...in|t......l|
|00004550| 61 62 65 6c 49 6e 64 65 | 78 3b 09 09 09 2f 2a 20 |abelInde|x;.../* |
|00004560| 2d 3e 20 4c 61 62 65 6c | 20 69 6e 20 74 68 69 73 |-> Label| in this|
|00004570| 20 73 63 72 69 70 74 20 | 6f 70 09 2a 2f 0d 09 09 | script |op.*/...|
|00004580| 69 6e 74 09 09 09 09 09 | 09 6f 66 66 73 65 74 3b |int.....|.offset;|
|00004590| 0d 09 09 4c 61 62 65 6c | 54 61 62 6c 65 09 09 09 |...Label|Table...|
|000045a0| 09 6c 61 62 65 6c 54 61 | 62 6c 65 5b 6b 4d 61 78 |.labelTa|ble[kMax|
|000045b0| 4c 61 62 65 6c 73 5d 3b | 0d 09 09 69 6e 74 09 09 |Labels];|...int..|
|000045c0| 09 09 09 09 6e 4c 61 62 | 65 6c 73 3b 0d 09 09 69 |....nLab|els;...i|
|000045d0| 6e 74 09 09 09 09 09 09 | 69 3b 0d 23 64 65 66 69 |nt......|i;.#defi|
|000045e0| 6e 65 20 53 43 52 49 50 | 54 09 28 28 55 49 6e 74 |ne SCRIP|T.((UInt|
|000045f0| 33 32 20 2a 29 20 47 4c | 4f 42 41 4c 2e 6e 63 72 |32 *) GL|OBAL.ncr|
|00004600| 53 43 53 49 53 63 72 69 | 70 74 29 0d 0d 09 09 54 |SCSIScri|pt)....T|
|00004610| 72 61 63 65 28 4e 43 52 | 50 61 74 63 68 53 63 72 |race(NCR|PatchScr|
|00004620| 69 70 74 29 3b 0d 09 09 | 2f 2a 0d 09 09 20 2a 20 |ipt);...|/*... * |
|00004630| 46 69 72 73 74 2c 20 63 | 68 65 63 6b 20 77 68 65 |First, c|heck whe|
|00004640| 74 68 65 72 20 77 65 27 | 76 65 20 61 6c 72 65 61 |ther we'|ve alrea|
|00004650| 64 79 20 70 61 74 63 68 | 65 64 20 74 68 69 73 20 |dy patch|ed this |
|00004660| 73 63 72 69 70 74 2e 20 | 54 68 69 73 20 77 69 6c |script. |This wil|
|00004670| 6c 20 62 65 0d 09 09 20 | 2a 20 54 52 55 45 20 69 |l be... |* TRUE i|
|00004680| 66 20 77 65 20 63 6c 6f | 73 65 20 61 6e 64 20 72 |f we clo|se and r|
|00004690| 65 6f 70 65 6e 20 74 68 | 65 20 64 72 69 76 65 72 |eopen th|e driver|
|000046a0| 2e 0d 09 09 20 2a 2f 0d | 09 09 73 77 69 74 63 68 |.... */.|..switch|
|000046b0| 20 28 53 43 52 49 50 54 | 5b 31 5d 29 20 7b 0d 09 | (SCRIPT|[1]) {..|
|000046c0| 09 63 61 73 65 20 6b 53 | 63 72 69 70 74 53 74 61 |.case kS|criptSta|
|000046d0| 72 74 4c 61 62 65 6c 3a | 0d 09 09 09 2f 2a 0d 09 |rtLabel:|..../*..|
|000046e0| 09 09 20 2a 20 54 68 69 | 73 20 69 73 20 74 68 65 |.. * Thi|s is the|
|000046f0| 20 66 69 72 73 74 20 74 | 69 6d 65 20 77 65 27 76 | first t|ime we'v|
|00004700| 65 20 73 65 65 6e 20 74 | 68 69 73 20 73 63 72 69 |e seen t|his scri|
|00004710| 70 74 3a 20 70 61 74 63 | 68 20 69 74 20 61 6e 64 |pt: patc|h it and|
|00004720| 20 70 75 74 20 69 74 0d | 09 09 09 20 2a 20 69 6e | put it.|... * in|
|00004730| 74 6f 20 6c 69 74 74 6c | 65 2d 65 6e 64 69 61 6e |to littl|e-endian|
|00004740| 20 62 79 74 65 20 6f 72 | 64 65 72 2e 0d 09 09 09 | byte or|der.....|
|00004750| 20 2a 2f 0d 09 09 09 73 | 74 61 74 75 73 20 3d 20 | */....s|tatus = |
|00004760| 6e 6f 74 4f 70 65 6e 45 | 72 72 3b 0d 09 09 09 62 |notOpenE|rr;....b|
|00004770| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 30 3a 0d |reak;...|case 0:.|
|00004780| 09 09 09 2f 2a 0d 09 09 | 09 20 2a 20 54 68 65 20 |.../*...|. * The |
|00004790| 73 63 72 69 70 74 20 68 | 61 73 20 62 65 65 6e 20 |script h|as been |
|000047a0| 70 61 74 63 68 65 64 2e | 0d 09 09 09 20 2a 2f 0d |patched.|.... */.|
|000047b0| 09 09 09 73 74 61 74 75 | 73 20 3d 20 6e 6f 45 72 |...statu|s = noEr|
|000047c0| 72 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 64 |r;....br|eak;...d|
|000047d0| 65 66 61 75 6c 74 3a 0d | 09 09 09 4c 6f 67 48 65 |efault:.|...LogHe|
|000047e0| 78 28 53 43 52 49 50 54 | 5b 31 5d 2c 20 22 5c 70 |x(SCRIPT|[1], "\p|
|000047f0| 53 63 72 69 70 74 20 70 | 61 74 63 68 20 69 6e 64 |Script p|atch ind|
|00004800| 69 63 61 74 6f 72 20 77 | 72 6f 6e 67 22 29 3b 0d |icator w|rong");.|
|00004810| 09 09 09 73 74 61 74 75 | 73 20 3d 20 70 61 72 61 |...statu|s = para|
|00004820| 6d 45 72 72 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d |mErr;...|.break;.|
|00004830| 09 09 7d 0d 09 09 69 66 | 20 28 73 74 61 74 75 73 |..}...if| (status|
|00004840| 20 3d 3d 20 6e 6f 74 4f | 70 65 6e 45 72 72 29 20 | == notO|penErr) |
|00004850| 7b 0d 09 09 09 2f 2a 0d | 09 09 09 20 2a 20 46 69 |{..../*.|... * Fi|
|00004860| 72 73 74 20 63 61 6c 6c | 3a 20 62 75 69 6c 64 20 |rst call|: build |
|00004870| 74 68 65 20 6c 61 62 65 | 6c 20 74 61 62 6c 65 2e |the labe|l table.|
|00004880| 0d 09 09 09 20 2a 2f 0d | 09 09 09 6e 4c 61 62 65 |.... */.|...nLabe|
|00004890| 6c 73 20 3d 20 30 3b 0d | 09 09 09 73 74 61 74 75 |ls = 0;.|...statu|
|000048a0| 73 20 3d 20 6e 6f 45 72 | 72 3b 0d 09 09 09 6d 61 |s = noEr|r;....ma|
|000048b0| 78 53 63 72 69 70 74 20 | 3d 20 73 69 7a 65 6f 66 |xScript |= sizeof|
|000048c0| 20 67 4e 43 52 53 43 53 | 49 53 63 72 69 70 74 20 | gNCRSCS|IScript |
|000048d0| 2f 20 73 69 7a 65 6f 66 | 20 28 55 49 6e 74 33 32 |/ sizeof| (UInt32|
|000048e0| 29 3b 0d 09 09 09 66 6f | 72 20 28 73 63 72 69 70 |);....fo|r (scrip|
|000048f0| 74 49 6e 64 65 78 20 3d | 20 30 3b 20 73 63 72 69 |tIndex =| 0; scri|
|00004900| 70 74 49 6e 64 65 78 20 | 3c 20 6d 61 78 53 63 72 |ptIndex |< maxScr|
|00004910| 69 70 74 3b 29 20 7b 0d | 09 09 09 09 64 63 6d 64 |ipt;) {.|....dcmd|
|00004920| 20 3d 20 53 43 52 49 50 | 54 5b 73 63 72 69 70 74 | = SCRIP|T[script|
|00004930| 49 6e 64 65 78 2b 2b 5d | 3b 0d 09 09 09 09 64 73 |Index++]|;.....ds|
|00004940| 70 73 20 3d 20 53 43 52 | 49 50 54 5b 73 63 72 69 |ps = SCR|IPT[scri|
|00004950| 70 74 49 6e 64 65 78 2b | 2b 5d 3b 0d 09 09 09 09 |ptIndex+|+];.....|
|00004960| 69 66 20 28 49 73 4d 65 | 6d 6f 72 79 4d 6f 76 65 |if (IsMe|moryMove|
|00004970| 4f 70 28 64 63 6d 64 29 | 29 0d 09 09 09 09 09 73 |Op(dcmd)|)......s|
|00004980| 63 72 69 70 74 49 6e 64 | 65 78 2b 2b 3b 0d 09 09 |criptInd|ex++;...|
|00004990| 09 09 69 66 20 28 49 73 | 4c 61 62 65 6c 28 64 63 |..if (Is|Label(dc|
|000049a0| 6d 64 29 29 20 7b 0d 09 | 09 09 09 09 69 66 20 28 |md)) {..|....if (|
|000049b0| 6e 4c 61 62 65 6c 73 20 | 3e 3d 20 6b 4d 61 78 4c |nLabels |>= kMaxL|
|000049c0| 61 62 65 6c 73 29 0d 09 | 09 09 09 09 09 4c 6f 67 |abels)..|.....Log|
|000049d0| 53 74 72 69 6e 67 28 22 | 5c 70 54 6f 6f 20 6d 61 |String("|\pToo ma|
|000049e0| 6e 79 20 6c 61 62 65 6c | 73 22 29 3b 0d 09 09 09 |ny label|s");....|
|000049f0| 09 09 2f 2a 0d 09 09 09 | 09 09 20 2a 20 49 6e 73 |../*....|.. * Ins|
|00004a00| 65 72 74 69 6f 6e 20 73 | 6f 72 74 20 28 66 72 6f |ertion s|ort (fro|
|00004a10| 6d 20 41 6c 67 6f 72 69 | 74 68 6d 73 20 69 6e 20 |m Algori|thms in |
|00004a20| 43 29 2e 20 53 69 6e 63 | 65 20 74 68 65 72 65 20 |C). Sinc|e there |
|00004a30| 61 72 65 20 6f 6e 6c 79 | 0d 09 09 09 09 09 20 2a |are only|...... *|
|00004a40| 20 61 62 6f 75 74 20 32 | 30 20 6c 61 62 65 6c 73 | about 2|0 labels|
|00004a50| 2c 20 77 65 20 64 6f 6e | 27 74 20 6e 65 65 64 20 |, we don|'t need |
|00004a60| 74 68 65 20 73 65 74 75 | 70 20 74 69 6d 65 20 6f |the setu|p time o|
|00004a70| 66 20 61 20 6c 6f 67 28 | 6e 29 20 73 6f 72 74 2c |f a log(|n) sort,|
|00004a80| 0d 09 09 09 09 09 20 2a | 20 73 75 63 68 20 61 73 |...... *| such as|
|00004a90| 20 53 68 65 6c 6c 20 6f | 72 20 48 65 61 70 20 73 | Shell o|r Heap s|
|00004aa0| 6f 72 74 2e 0d 09 09 09 | 09 09 20 2a 2f 0d 09 09 |ort.....|.. */...|
|00004ab0| 09 09 09 66 6f 72 20 28 | 69 20 3d 20 6e 4c 61 62 |...for (|i = nLab|
|00004ac0| 65 6c 73 3b 20 69 20 3e | 3d 20 31 20 26 26 20 64 |els; i >|= 1 && d|
|00004ad0| 73 70 73 20 3c 20 6c 61 | 62 65 6c 54 61 62 6c 65 |sps < la|belTable|
|00004ae0| 5b 69 20 2d 20 31 5d 2e | 6c 61 62 65 6c 3b 20 2d |[i - 1].|label; -|
|00004af0| 2d 69 29 0d 09 09 09 09 | 09 09 6c 61 62 65 6c 54 |-i).....|..labelT|
|00004b00| 61 62 6c 65 5b 69 5d 20 | 3d 20 6c 61 62 65 6c 54 |able[i] |= labelT|
|00004b10| 61 62 6c 65 5b 69 20 2d | 20 31 5d 3b 0d 09 09 09 |able[i -| 1];....|
|00004b20| 09 09 6c 61 62 65 6c 54 | 61 62 6c 65 5b 69 5d 2e |..labelT|able[i].|
|00004b30| 6c 61 62 65 6c 20 3d 20 | 64 73 70 73 3b 0d 09 09 |label = |dsps;...|
|00004b40| 09 09 09 6c 61 62 65 6c | 54 61 62 6c 65 5b 69 5d |...label|Table[i]|
|00004b50| 2e 73 63 72 69 70 74 49 | 6e 64 65 78 20 3d 20 73 |.scriptI|ndex = s|
|00004b60| 63 72 69 70 74 49 6e 64 | 65 78 3b 0d 09 09 09 09 |criptInd|ex;.....|
|00004b70| 09 2b 2b 6e 4c 61 62 65 | 6c 73 3b 0d 09 09 09 09 |.++nLabe|ls;.....|
|00004b80| 7d 0d 09 09 09 7d 0d 09 | 09 09 2f 2a 0d 09 09 09 |}....}..|../*....|
|00004b90| 20 2a 20 52 65 73 6f 6c | 76 65 20 74 68 65 20 6c | * Resol|ve the l|
|00004ba0| 61 62 65 6c 73 2e 0d 09 | 09 09 20 2a 2f 0d 09 09 |abels...|.. */...|
|00004bb0| 09 66 6f 72 20 28 73 63 | 72 69 70 74 49 6e 64 65 |.for (sc|riptInde|
|00004bc0| 78 20 3d 20 30 3b 20 73 | 63 72 69 70 74 49 6e 64 |x = 0; s|criptInd|
|00004bd0| 65 78 20 3c 20 6d 61 78 | 53 63 72 69 70 74 3b 29 |ex < max|Script;)|
|00004be0| 20 7b 0d 09 09 09 09 64 | 63 6d 64 20 3d 20 53 43 | {.....d|cmd = SC|
|00004bf0| 52 49 50 54 5b 73 63 72 | 69 70 74 49 6e 64 65 78 |RIPT[scr|iptIndex|
|00004c00| 2b 2b 5d 3b 0d 09 09 09 | 09 6c 61 62 65 6c 49 6e |++];....|.labelIn|
|00004c10| 64 65 78 20 3d 20 73 63 | 72 69 70 74 49 6e 64 65 |dex = sc|riptInde|
|00004c20| 78 3b 0d 09 09 09 09 64 | 73 70 73 20 3d 20 53 43 |x;.....d|sps = SC|
|00004c30| 52 49 50 54 5b 73 63 72 | 69 70 74 49 6e 64 65 78 |RIPT[scr|iptIndex|
|00004c40| 2b 2b 5d 3b 0d 09 09 09 | 09 69 66 20 28 49 73 4d |++];....|.if (IsM|
|00004c50| 65 6d 6f 72 79 4d 6f 76 | 65 4f 70 28 64 63 6d 64 |emoryMov|eOp(dcmd|
|00004c60| 29 29 0d 09 09 09 09 09 | 73 63 72 69 70 74 49 6e |))......|scriptIn|
|00004c70| 64 65 78 2b 2b 3b 0d 09 | 09 09 09 69 66 20 28 48 |dex++;..|...if (H|
|00004c80| 61 73 4c 61 62 65 6c 28 | 64 63 6d 64 29 29 20 7b |asLabel(|dcmd)) {|
|00004c90| 0d 09 09 09 09 09 6f 66 | 66 73 65 74 20 3d 20 4e |......of|fset = N|
|00004ca0| 43 52 4c 6f 6f 6b 75 70 | 53 79 6d 62 6f 6c 28 6c |CRLookup|Symbol(l|
|00004cb0| 61 62 65 6c 54 61 62 6c | 65 2c 20 6e 4c 61 62 65 |abelTabl|e, nLabe|
|00004cc0| 6c 73 2c 20 64 73 70 73 | 29 3b 0d 09 09 09 09 09 |ls, dsps|);......|
|00004cd0| 69 66 20 28 6f 66 66 73 | 65 74 20 3e 20 30 29 20 |if (offs|et > 0) |
|00004ce0| 7b 0d 09 09 09 09 09 09 | 53 43 52 49 50 54 5b 6c |{.......|SCRIPT[l|
|00004cf0| 61 62 65 6c 49 6e 64 65 | 78 5d 20 3d 0d 09 09 09 |abelInde|x] =....|
|00004d00| 09 09 09 09 28 6f 66 66 | 73 65 74 20 2d 20 73 63 |....(off|set - sc|
|00004d10| 72 69 70 74 49 6e 64 65 | 78 29 20 2a 20 73 69 7a |riptInde|x) * siz|
|00004d20| 65 6f 66 20 28 55 49 6e | 74 33 32 29 3b 0d 09 09 |eof (UIn|t32);...|
|00004d30| 09 09 09 7d 0d 09 09 09 | 09 09 65 6c 73 65 20 7b |...}....|..else {|
|00004d40| 0d 23 69 66 20 55 53 45 | 5f 4c 4f 47 5f 4c 49 42 |.#if USE|_LOG_LIB|
|00004d50| 52 41 52 59 0d 09 09 09 | 09 09 09 57 72 69 74 65 |RARY....|...Write|
|00004d60| 4c 6f 67 45 6e 74 72 79 | 28 47 4c 4f 42 41 4c 2e |LogEntry|(GLOBAL.|
|00004d70| 6c 6f 67 52 65 63 6f 72 | 64 50 74 72 2c 20 27 53 |logRecor|dPtr, 'S|
|00004d80| 63 72 50 27 2c 0d 09 09 | 09 09 09 09 09 4c 6f 67 |crP',...|.....Log|
|00004d90| 46 6f 72 6d 61 74 34 28 | 6b 4c 6f 67 46 6f 72 6d |Format4(|kLogForm|
|00004da0| 61 74 53 69 67 6e 65 64 | 2c 20 6b 4c 6f 67 46 6f |atSigned|, kLogFo|
|00004db0| 72 6d 61 74 41 64 64 72 | 65 73 73 2c 0d 09 09 09 |rmatAddr|ess,....|
|00004dc0| 09 09 09 09 09 09 09 6b | 4c 6f 67 46 6f 72 6d 61 |.......k|LogForma|
|00004dd0| 74 41 64 64 72 65 73 73 | 2c 20 6b 4c 6f 67 46 6f |tAddress|, kLogFo|
|00004de0| 72 6d 61 74 41 64 64 72 | 65 73 73 29 2c 0d 09 09 |rmatAddr|ess),...|
|00004df0| 09 09 09 09 09 6c 61 62 | 65 6c 49 6e 64 65 78 20 |.....lab|elIndex |
|00004e00| 2d 20 31 2c 0d 09 09 09 | 09 09 09 09 64 63 6d 64 |- 1,....|....dcmd|
|00004e10| 2c 0d 09 09 09 09 09 09 | 09 64 73 70 73 2c 0d 09 |,.......|.dsps,..|
|00004e20| 09 09 09 09 09 09 22 5c | 70 55 6e 64 65 66 20 73 |......"\|pUndef s|
|00004e30| 63 72 69 70 74 22 0d 09 | 09 09 09 09 09 29 3b 0d |cript"..|.....);.|
|00004e40| 23 65 6e 64 69 66 0d 09 | 09 09 09 09 09 73 74 61 |#endif..|.....sta|
|00004e50| 74 75 73 20 3d 20 70 61 | 72 61 6d 45 72 72 3b 0d |tus = pa|ramErr;.|
|00004e60| 09 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....|
|00004e70| 09 09 7d 0d 09 09 09 09 | 7d 0d 09 09 09 7d 0d 09 |..}.....|}....}..|
|00004e80| 09 09 69 66 20 28 73 74 | 61 74 75 73 20 3d 3d 20 |..if (st|atus == |
|00004e90| 6e 6f 45 72 72 29 20 7b | 0d 09 09 09 09 2f 2a 0d |noErr) {|...../*.|
|00004ea0| 09 09 09 09 20 2a 20 42 | 79 74 65 2d 72 65 76 65 |.... * B|yte-reve|
|00004eb0| 72 73 65 20 65 61 63 68 | 20 73 63 72 69 70 74 20 |rse each| script |
|00004ec0| 6c 6f 6e 67 77 6f 72 64 | 20 73 6f 20 74 68 61 74 |longword| so that|
|00004ed0| 20 69 74 20 63 61 6e 20 | 62 65 20 61 63 63 65 73 | it can |be acces|
|00004ee0| 73 65 64 20 62 79 20 74 | 68 65 0d 09 09 09 09 20 |sed by t|he..... |
|00004ef0| 2a 20 4e 43 52 20 63 68 | 69 70 2e 20 54 68 69 73 |* NCR ch|ip. This|
|00004f00| 20 74 75 72 6e 73 20 74 | 68 65 20 4d 61 63 69 6e | turns t|he Macin|
|00004f10| 74 6f 73 68 20 62 69 67 | 2d 65 6e 64 69 61 6e 20 |tosh big|-endian |
|00004f20| 62 79 74 65 2d 6f 72 64 | 65 72 69 6e 67 20 69 6e |byte-ord|ering in|
|00004f30| 74 6f 20 74 68 65 0d 09 | 09 09 09 20 2a 20 50 43 |to the..|... * PC|
|00004f40| 49 20 62 75 73 20 6c 69 | 74 74 6c 65 2d 65 6e 64 |I bus li|ttle-end|
|00004f50| 69 61 6e 20 6f 72 64 65 | 72 69 6e 67 2e 0d 09 09 |ian orde|ring....|
|00004f60| 09 09 20 2a 2f 0d 09 09 | 09 09 66 6f 72 20 28 73 |.. */...|..for (s|
|00004f70| 63 72 69 70 74 49 6e 64 | 65 78 20 3d 20 30 3b 20 |criptInd|ex = 0; |
|00004f80| 73 63 72 69 70 74 49 6e | 64 65 78 20 3c 20 6d 61 |scriptIn|dex < ma|
|00004f90| 78 53 63 72 69 70 74 3b | 20 73 63 72 69 70 74 49 |xScript;| scriptI|
|00004fa0| 6e 64 65 78 2b 2b 29 0d | 09 09 09 09 09 53 43 52 |ndex++).|.....SCR|
|00004fb0| 49 50 54 5b 73 63 72 69 | 70 74 49 6e 64 65 78 5d |IPT[scri|ptIndex]|
|00004fc0| 20 3d 20 45 6e 64 69 61 | 6e 53 77 61 70 33 32 42 | = Endia|nSwap32B|
|00004fd0| 69 74 28 53 43 52 49 50 | 54 5b 73 63 72 69 70 74 |it(SCRIP|T[script|
|00004fe0| 49 6e 64 65 78 5d 29 3b | 0d 09 09 09 7d 0d 09 09 |Index]);|....}...|
|00004ff0| 7d 0d 09 09 72 65 74 75 | 72 6e 20 28 73 74 61 74 |}...retu|rn (stat|
|00005000| 75 73 29 3b 0d 23 75 6e | 64 65 66 20 53 43 52 49 |us);.#un|def SCRI|
|00005010| 50 54 0d 7d 0d 0d 2f 2a | 20 2a 20 2a 20 2a 20 2a |PT.}../*| * * * *|
|00005020| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005030| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005040| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005050| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00005060| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 0d 20 2a 20 | * * * *| * *. * |
|00005070| 52 65 73 6f 6c 76 65 20 | 61 20 73 63 72 69 70 74 |Resolve |a script|
|00005080| 20 73 79 6d 62 6f 6c 20 | 6e 61 6d 65 2c 20 72 65 | symbol |name, re|
|00005090| 74 75 72 6e 69 6e 67 20 | 74 68 65 20 69 6e 64 65 |turning |the inde|
|000050a0| 78 20 74 6f 20 74 68 65 | 20 73 63 72 69 70 74 20 |x to the| script |
|000050b0| 6f 70 65 72 61 74 69 6f | 6e 2e 20 52 65 74 75 72 |operatio|n. Retur|
|000050c0| 6e 0d 20 2a 20 7a 65 72 | 6f 20 69 66 20 74 68 65 |n. * zer|o if the|
|000050d0| 20 73 79 6d 62 6f 6c 20 | 63 61 6e 6e 6f 74 20 62 | symbol |cannot b|
|000050e0| 65 20 66 6f 75 6e 64 2e | 20 28 4e 6f 20 73 79 6d |e found.| (No sym|
|000050f0| 62 6f 6c 20 63 61 6e 20 | 72 65 73 6f 6c 76 65 20 |bol can |resolve |
|00005100| 74 6f 20 7a 65 72 6f 2e | 29 20 54 68 65 20 61 6c |to zero.|) The al|
|00005110| 67 6f 72 69 74 68 6d 0d | 20 2a 20 77 61 73 20 61 |gorithm.| * was a|
|00005120| 64 61 70 74 65 64 20 66 | 72 6f 6d 20 4b 65 72 6e |dapted f|rom Kern|
|00005130| 69 67 68 61 6e 20 61 6e | 64 20 52 69 74 63 68 69 |ighan an|d Ritchi|
|00005140| 65 2e 0d 20 2a 2f 0d 69 | 6e 74 0d 4e 43 52 4c 6f |e.. */.i|nt.NCRLo|
|00005150| 6f 6b 75 70 53 79 6d 62 | 6f 6c 28 0d 09 09 4c 61 |okupSymb|ol(...La|
|00005160| 62 65 6c 54 61 62 6c 65 | 50 74 72 09 09 09 6c 61 |belTable|Ptr...la|
|00005170| 62 65 6c 54 61 62 6c 65 | 50 74 72 2c 0d 09 09 69 |belTable|Ptr,...i|
|00005180| 6e 74 09 09 09 09 09 09 | 6e 4c 61 62 65 6c 73 2c |nt......|nLabels,|
|00005190| 0d 09 09 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |...unsig|ned long|
|000051a0| 09 09 09 73 79 6d 62 6f | 6c 4e 61 6d 65 0d 09 29 |...symbo|lName..)|
|000051b0| 0d 7b 0d 09 09 72 65 67 | 69 73 74 65 72 20 4c 61 |.{...reg|ister La|
|000051c0| 62 65 6c 54 61 62 6c 65 | 50 74 72 09 6c 6f 77 3b |belTable|Ptr.low;|
|000051d0| 0d 09 09 72 65 67 69 73 | 74 65 72 20 4c 61 62 65 |...regis|ter Labe|
|000051e0| 6c 54 61 62 6c 65 50 74 | 72 09 68 69 67 68 3b 0d |lTablePt|r.high;.|
|000051f0| 09 09 72 65 67 69 73 74 | 65 72 20 4c 61 62 65 6c |..regist|er Label|
|00005200| 54 61 62 6c 65 50 74 72 | 09 6d 69 64 3b 0d 09 09 |TablePtr|.mid;...|
|00005210| 69 6e 74 09 09 09 09 09 | 09 72 65 73 75 6c 74 3b |int.....|.result;|
|00005220| 0d 09 09 0d 09 09 2f 2f | 2a 2a 20 54 72 61 63 65 |......//|** Trace|
|00005230| 28 4e 43 52 4c 6f 6f 6b | 75 70 53 79 6d 62 6f 6c |(NCRLook|upSymbol|
|00005240| 29 3b 0d 09 09 6c 6f 77 | 20 3d 20 6c 61 62 65 6c |);...low| = label|
|00005250| 54 61 62 6c 65 50 74 72 | 3b 0d 09 09 68 69 67 68 |TablePtr|;...high|
|00005260| 20 3d 20 26 6c 61 62 65 | 6c 54 61 62 6c 65 50 74 | = &labe|lTablePt|
|00005270| 72 5b 6e 4c 61 62 65 6c | 73 5d 3b 0d 09 09 72 65 |r[nLabel|s];...re|
|00005280| 73 75 6c 74 20 3d 20 30 | 3b 0d 09 09 77 68 69 6c |sult = 0|;...whil|
|00005290| 65 20 28 6c 6f 77 20 3c | 20 68 69 67 68 29 20 7b |e (low <| high) {|
|000052a0| 0d 09 09 09 6d 69 64 20 | 3d 20 6c 6f 77 20 2b 20 |....mid |= low + |
|000052b0| 28 68 69 67 68 20 2d 20 | 6c 6f 77 29 20 2f 20 32 |(high - |low) / 2|
|000052c0| 3b 0d 09 09 09 69 66 20 | 28 73 79 6d 62 6f 6c 4e |;....if |(symbolN|
|000052d0| 61 6d 65 20 3c 20 6d 69 | 64 2d 3e 6c 61 62 65 6c |ame < mi|d->label|
|000052e0| 29 0d 09 09 09 09 68 69 | 67 68 20 3d 20 6d 69 64 |).....hi|gh = mid|
|000052f0| 3b 0d 09 09 09 65 6c 73 | 65 20 69 66 20 28 73 79 |;....els|e if (sy|
|00005300| 6d 62 6f 6c 4e 61 6d 65 | 20 3e 20 6d 69 64 2d 3e |mbolName| > mid->|
|00005310| 6c 61 62 65 6c 29 0d 09 | 09 09 09 6c 6f 77 20 3d |label)..|...low =|
|00005320| 20 6d 69 64 20 2b 20 31 | 3b 0d 09 09 09 65 6c 73 | mid + 1|;....els|
|00005330| 65 20 2f 2a 20 73 79 6d | 62 6f 6c 4e 61 6d 65 20 |e /* sym|bolName |
|00005340| 3d 3d 20 6d 69 64 2d 3e | 6c 61 62 65 6c 20 2a 2f |== mid->|label */|
|00005350| 20 7b 0d 09 09 09 09 72 | 65 73 75 6c 74 20 3d 20 | {.....r|esult = |
|00005360| 6d 69 64 2d 3e 73 63 72 | 69 70 74 49 6e 64 65 78 |mid->scr|iptIndex|
|00005370| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|00005380| 7d 0d 09 09 7d 0d 09 09 | 72 65 74 75 72 6e 20 28 |}...}...|return (|
|00005390| 72 65 73 75 6c 74 29 3b | 0d 7d 0d 0d 2f 2a 20 2a |result);|.}../* *|
|000053a0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000053b0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000053c0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000053d0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000053e0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000053f0| 20 2a 0d 20 2a 20 48 61 | 73 4c 61 62 65 6c 0d 20 | *. * Ha|sLabel. |
|00005400| 2a 0d 20 2a 20 54 68 69 | 73 20 74 65 73 74 73 20 |*. * Thi|s tests |
|00005410| 77 68 65 74 68 65 72 20 | 74 68 65 20 53 63 72 69 |whether |the Scri|
|00005420| 70 74 20 6f 70 63 6f 64 | 65 20 74 61 6b 65 73 20 |pt opcod|e takes |
|00005430| 61 20 6c 61 62 65 6c 2e | 0d 20 2a 2f 0d 42 6f 6f |a label.|. */.Boo|
|00005440| 6c 65 61 6e 0d 48 61 73 | 4c 61 62 65 6c 28 0d 09 |lean.Has|Label(..|
|00005450| 09 55 49 6e 74 33 32 09 | 09 09 09 09 6f 70 63 6f |.UInt32.|....opco|
|00005460| 64 65 0d 09 29 0d 7b 0d | 09 09 42 6f 6f 6c 65 61 |de..).{.|..Boolea|
|00005470| 6e 09 09 09 09 09 72 65 | 73 75 6c 74 3b 0d 09 09 |n.....re|sult;...|
|00005480| 0d 09 09 2f 2f 2a 2a 20 | 54 72 61 63 65 28 48 61 |...//** |Trace(Ha|
|00005490| 73 4c 61 62 65 6c 29 3b | 0d 09 09 73 77 69 74 63 |sLabel);|...switc|
|000054a0| 68 20 28 6f 70 63 6f 64 | 65 20 26 20 28 62 69 74 |h (opcod|e & (bit|
|000054b0| 33 31 20 7c 20 62 69 74 | 33 30 29 29 20 7b 0d 09 |31 | bit|30)) {..|
|000054c0| 09 63 61 73 65 20 28 30 | 29 3a 09 09 09 09 09 2f |.case (0|):...../|
|000054d0| 2a 20 30 30 20 42 6c 6f | 63 6b 20 6d 6f 76 65 20 |* 00 Blo|ck move |
|000054e0| 69 6e 73 74 72 75 63 74 | 69 6f 6e 09 09 09 09 09 |instruct|ion.....|
|000054f0| 2a 2f 0d 09 09 09 72 65 | 73 75 6c 74 20 3d 20 46 |*/....re|sult = F|
|00005500| 41 4c 53 45 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d |ALSE;...|.break;.|
|00005510| 09 09 63 61 73 65 20 28 | 62 69 74 33 30 29 3a 09 |..case (|bit30):.|
|00005520| 09 09 09 2f 2a 20 30 31 | 20 49 2f 4f 20 61 6e 64 |.../* 01| I/O and|
|00005530| 20 72 65 61 64 2f 77 72 | 69 74 65 20 69 6e 73 74 | read/wr|ite inst|
|00005540| 72 75 63 74 69 6f 6e 73 | 09 09 09 2a 2f 0d 09 09 |ructions|...*/...|
|00005550| 09 73 77 69 74 63 68 20 | 28 6f 70 63 6f 64 65 20 |.switch |(opcode |
|00005560| 26 20 28 62 69 74 32 39 | 20 7c 20 62 69 74 32 38 |& (bit29| | bit28|
|00005570| 20 7c 20 62 69 74 32 37 | 29 29 20 7b 0d 09 09 09 | | bit27|)) {....|
|00005580| 63 61 73 65 20 30 3a 09 | 09 09 09 09 2f 2a 20 30 |case 0:.|..../* 0|
|00005590| 31 20 30 30 30 20 52 65 | 73 65 6c 65 63 74 20 74 |1 000 Re|select t|
|000055a0| 61 6b 65 73 20 61 20 6c | 61 62 65 6c 09 09 09 09 |akes a l|abel....|
|000055b0| 2a 2f 0d 09 09 09 63 61 | 73 65 20 62 69 74 32 38 |*/....ca|se bit28|
|000055c0| 3a 09 09 09 09 2f 2a 20 | 30 31 20 30 31 30 20 57 |:..../* |01 010 W|
|000055d0| 61 69 74 20 53 65 6c 65 | 63 74 20 74 61 6b 65 73 |ait Sele|ct takes|
|000055e0| 20 61 20 6c 61 62 65 6c | 09 09 09 09 2a 2f 0d 09 | a label|....*/..|
|000055f0| 09 09 09 72 65 73 75 6c | 74 20 3d 20 54 52 55 45 |...resul|t = TRUE|
|00005600| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|00005610| 64 65 66 61 75 6c 74 3a | 09 09 09 09 2f 2a 20 30 |default:|..../* 0|
|00005620| 31 20 30 30 31 20 57 61 | 69 74 20 44 69 73 63 6f |1 001 Wa|it Disco|
|00005630| 6e 6e 65 63 74 20 74 61 | 6b 65 73 20 6e 6f 20 6c |nnect ta|kes no l|
|00005640| 61 62 65 6c 09 09 2a 2f | 0d 09 09 09 09 09 09 09 |abel..*/|........|
|00005650| 09 09 2f 2a 20 30 31 20 | 30 31 31 20 53 65 74 20 |../* 01 |011 Set |
|00005660| 74 61 6b 65 73 20 6e 6f | 20 6c 61 62 65 6c 09 09 |takes no| label..|
|00005670| 09 09 09 2a 2f 0d 09 09 | 09 09 09 09 09 09 09 2f |...*/...|......./|
|00005680| 2a 20 30 31 20 31 30 30 | 20 43 6c 65 61 72 20 74 |* 01 100| Clear t|
|00005690| 61 6b 65 73 20 6e 6f 20 | 6c 61 62 65 6c 09 09 09 |akes no |label...|
|000056a0| 09 09 2a 2f 0d 09 09 09 | 09 72 65 73 75 6c 74 20 |..*/....|.result |
|000056b0| 3d 20 46 41 4c 53 45 3b | 09 09 2f 2a 20 30 31 20 |= FALSE;|../* 01 |
|000056c0| 31 30 31 2e 2e 31 31 31 | 20 61 72 65 20 72 65 61 |101..111| are rea|
|000056d0| 64 2f 77 72 69 74 65 20 | 69 6e 73 74 72 75 63 74 |d/write |instruct|
|000056e0| 69 6f 6e 73 09 09 2a 2f | 0d 09 09 09 09 62 72 65 |ions..*/|.....bre|
|000056f0| 61 6b 3b 0d 09 09 09 7d | 0d 09 09 09 62 72 65 61 |ak;....}|....brea|
|00005700| 6b 3b 0d 09 09 63 61 73 | 65 20 28 62 69 74 33 31 |k;...cas|e (bit31|
|00005710| 29 3a 09 09 09 09 2f 2a | 20 31 30 20 54 72 61 6e |):..../*| 10 Tran|
|00005720| 73 66 65 72 20 43 6f 6e | 74 72 6f 6c 20 69 6e 73 |sfer Con|trol ins|
|00005730| 74 72 75 63 74 69 6f 6e | 73 09 09 09 09 2a 2f 0d |truction|s....*/.|
|00005740| 09 09 09 73 77 69 74 63 | 68 20 28 6f 70 63 6f 64 |...switc|h (opcod|
|00005750| 65 20 26 20 28 62 69 74 | 32 39 20 7c 20 62 69 74 |e & (bit|29 | bit|
|00005760| 32 38 20 7c 20 62 69 74 | 32 37 29 29 20 7b 0d 09 |28 | bit|27)) {..|
|00005770| 09 09 63 61 73 65 20 30 | 3a 09 09 09 09 09 2f 2a |..case 0|:...../*|
|00005780| 20 31 30 20 30 30 30 20 | 4a 75 6d 70 09 28 30 78 | 10 000 |Jump.(0x|
|00005790| 38 30 30 30 30 30 30 30 | 20 3d 3d 20 4e 4f 50 29 |80000000| == NOP)|
|000057a0| 09 09 09 09 2a 2f 0d 09 | 09 09 63 61 73 65 20 62 |....*/..|..case b|
|000057b0| 69 74 32 37 3a 09 09 09 | 09 2f 2a 20 31 30 20 30 |it27:...|./* 10 0|
|000057c0| 30 31 20 43 61 6c 6c 09 | 09 09 09 09 09 09 09 09 |01 Call.|........|
|000057d0| 2a 2f 0d 09 09 09 63 61 | 73 65 20 62 69 74 32 38 |*/....ca|se bit28|
|000057e0| 3a 09 09 09 09 2f 2a 20 | 31 30 20 30 31 30 20 52 |:..../* |10 010 R|
|000057f0| 65 74 75 72 6e 09 09 09 | 09 09 09 09 09 2a 2f 0d |eturn...|.....*/.|
|00005800| 09 09 09 09 72 65 73 75 | 6c 74 20 3d 20 54 52 55 |....resu|lt = TRU|
|00005810| 45 3b 0d 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |E;.....b|reak;...|
|00005820| 09 63 61 73 65 20 28 62 | 69 74 32 38 20 7c 20 62 |.case (b|it28 | b|
|00005830| 69 74 32 37 29 3a 09 2f | 2a 20 31 30 20 30 31 31 |it27):./|* 10 011|
|00005840| 20 49 6e 74 65 72 72 75 | 70 74 09 09 09 09 09 09 | Interru|pt......|
|00005850| 09 09 2a 2f 0d 09 09 09 | 64 65 66 61 75 6c 74 3a |..*/....|default:|
|00005860| 09 09 09 09 2f 2a 20 31 | 30 20 31 78 78 20 52 65 |..../* 1|0 1xx Re|
|00005870| 73 65 72 76 65 64 09 09 | 09 09 09 09 09 09 2a 2f |served..|......*/|
|00005880| 0d 09 09 09 09 72 65 73 | 75 6c 74 20 3d 20 46 41 |.....res|ult = FA|
|00005890| 4c 53 45 3b 0d 09 09 09 | 09 62 72 65 61 6b 3b 0d |LSE;....|.break;.|
|000058a0| 09 09 09 7d 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |...}....|break;..|
|000058b0| 09 63 61 73 65 20 28 62 | 69 74 33 31 20 7c 20 62 |.case (b|it31 | b|
|000058c0| 69 74 33 30 29 3a 09 09 | 2f 2a 20 31 31 20 4d 65 |it30):..|/* 11 Me|
|000058d0| 6d 6f 72 79 20 4d 6f 76 | 65 09 09 09 09 09 09 09 |mory Mov|e.......|
|000058e0| 09 2a 2f 0d 09 09 09 72 | 65 73 75 6c 74 20 3d 20 |.*/....r|esult = |
|000058f0| 46 41 4c 53 45 3b 0d 09 | 09 09 62 72 65 61 6b 3b |FALSE;..|..break;|
|00005900| 0d 09 09 7d 0d 09 09 72 | 65 74 75 72 6e 20 28 72 |...}...r|eturn (r|
|00005910| 65 73 75 6c 74 29 3b 0d | 7d 0d 0d 0d 00 00 00 00 |esult);.|}.......|
|00005920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005980| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00005990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059a0| 00 00 00 00 00 00 00 01 | 00 00 11 dd ab 1f c3 53 |........|.......S|
|000059b0| 12 4e 43 52 53 63 72 69 | 70 74 4d 61 6e 61 67 65 |.NCRScri|ptManage|
|000059c0| 72 2e 63 63 02 00 00 00 | 54 45 58 54 4d 50 43 43 |r.cc....|TEXTMPCC|
|000059d0| 00 00 54 45 58 54 4d 50 | 43 43 01 00 01 2c 00 00 |..TEXTMP|CC...,..|
|000059e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059f0| 00 00 ab 87 97 69 00 00 | 58 9c 00 00 01 9a 00 00 |.....i..|X.......|
|00005a00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a80| 00 00 00 48 00 0a 43 6f | 75 72 69 65 72 00 00 00 |...H..Co|urier...|
|00005a90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005aa0| 00 00 00 00 00 00 00 03 | 00 04 00 58 00 04 01 cd |........|...X....|
|00005ab0| 02 63 00 58 00 04 01 cd | 02 63 ab d9 5e 7d 00 00 |.c.X....|.c..^}..|
|00005ac0| 4f 92 00 00 4f 92 00 00 | 00 00 01 00 00 00 00 04 |O...O...|........|
|00005ad0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00005ae0| 00 00 00 46 00 c9 46 98 | 12 5e 00 00 00 1c 00 46 |...F..F.|.^.....F|
|00005af0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00005b00| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00005b10| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00005b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+