home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 24 / develop issue 24 code / new device drivers / PCI Driver Sample / NCR_DriverProject / Src / DriverDoDriverIO.c < prev    next >
MacBinary  |  1995-07-24  |  40.1 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).

ConfidenceProgramDetectionMatch TypeSupport
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:42 1995, modified Mon Jul 24 17:34:42 1995, creator 'MPCC', type ASCII, 40335 bytes "DriverDoDriverIO.c" , at 0x9e0f 456 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
keyvalue
macFileType[TEXT]
macFileCreator[MPCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 44 72 69 76 65 72 | 44 6f 44 72 69 76 65 72 |..Driver|DoDriver|
|00000010| 49 4f 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |IO.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 9d 8f 00 | 00 01 c8 ac 39 c2 72 ac |........|....9.r.|
|00000060| 39 c2 72 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |9.r.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ce 90 00 00 |........|........|
|00000080| 2f 2a 09 09 09 09 09 09 | 09 09 09 44 72 69 76 65 |/*......|...Drive|
|00000090| 72 44 6f 44 72 69 76 65 | 72 49 4f 2e 63 09 09 09 |rDoDrive|rIO.c...|
|000000a0| 09 09 09 09 09 2a 2f 0d | 2f 2a 0d 20 2a 20 44 72 |.....*/.|/*. * Dr|
|000000b0| 69 76 65 72 44 6f 44 72 | 69 76 65 72 49 4f 2e 63 |iverDoDr|iverIO.c|
|000000c0| 0d 20 2a 20 43 6f 70 79 | 72 69 67 68 74 20 a9 20 |. * Copy|right . |
|000000d0| 31 39 39 34 2d 39 35 20 | 41 70 70 6c 65 20 43 6f |1994-95 |Apple Co|
|000000e0| 6d 70 75 74 65 72 20 49 | 6e 63 2e 20 41 6c 6c 20 |mputer I|nc. All |
|000000f0| 72 69 67 68 74 73 20 72 | 65 73 65 72 76 65 64 2e |rights r|eserved.|
|00000100| 0d 20 2a 09 45 64 69 74 | 20 48 69 73 74 6f 72 79 |. *.Edit| History|
|00000110| 0d 20 2a 09 31 39 39 34 | 2e 31 30 2e 32 34 09 44 |. *.1994|.10.24.D|
|00000120| 33 09 46 69 72 73 74 20 | 44 44 4b 20 72 65 6c 65 |3.First |DDK rele|
|00000130| 61 73 65 20 28 53 79 73 | 74 65 6d 20 41 32 43 31 |ase (Sys|tem A2C1|
|00000140| 29 0d 20 2a 09 31 39 39 | 34 2e 31 32 2e 30 36 09 |). *.199|4.12.06.|
|00000150| 41 35 09 41 64 64 69 6e | 67 20 65 6e 68 61 6e 63 |A5.Addin|g enhanc|
|00000160| 65 6d 65 6e 74 73 20 74 | 6f 20 74 68 65 20 64 72 |ements t|o the dr|
|00000170| 69 76 65 72 3a 0d 20 2a | 09 09 09 09 c3 09 46 6f |iver:. *|......Fo|
|00000180| 6c 64 65 72 20 61 6e 64 | 20 66 69 6c 65 20 72 65 |lder and| file re|
|00000190| 6f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 20 28 69 6e |organiza|tion (in|
|000001a0| 63 6c 75 64 69 6e 67 20 | 63 68 61 6e 67 65 73 20 |cluding |changes |
|000001b0| 74 6f 20 4d 61 6b 65 46 | 69 6c 65 29 0d 20 2a 09 |to MakeF|ile). *.|
|000001c0| 09 09 09 c3 09 52 65 74 | 72 69 65 76 65 20 69 6e |.....Ret|rieve in|
|000001d0| 69 74 69 61 74 6f 72 20 | 62 75 73 20 49 44 20 66 |itiator |bus ID f|
|000001e0| 72 6f 6d 20 74 68 65 20 | 53 79 73 74 65 6d 20 52 |rom the |System R|
|000001f0| 65 67 69 73 74 72 79 20 | 28 4e 56 52 41 4d 20 70 |egistry |(NVRAM p|
|00000200| 72 6f 70 65 72 74 79 29 | 0d 20 2a 09 09 09 09 09 |roperty)|. *.....|
|00000210| 54 68 65 72 65 20 61 70 | 70 65 61 72 73 20 74 6f |There ap|pears to|
|00000220| 20 62 65 20 61 20 62 75 | 67 20 28 65 69 74 68 65 | be a bu|g (eithe|
|00000230| 72 20 69 6e 20 6d 79 20 | 69 74 65 72 61 74 69 6f |r in my |iteratio|
|00000240| 6e 20 63 6f 64 65 20 6f | 72 20 69 6e 0d 20 2a 09 |n code o|r in. *.|
|00000250| 09 09 09 09 74 68 65 20 | 4e 61 6d 65 20 52 65 67 |....the |Name Reg|
|00000260| 69 73 74 72 79 2c 20 73 | 6f 20 74 68 69 73 20 68 |istry, s|o this h|
|00000270| 61 73 20 62 65 65 6e 20 | 64 69 73 61 62 6c 65 64 |as been |disabled|
|00000280| 20 74 65 6d 70 6f 72 61 | 72 69 6c 79 2e 0d 20 2a | tempora|rily.. *|
|00000290| 09 09 09 09 c3 09 28 54 | 68 65 20 54 65 73 74 44 |......(T|he TestD|
|000002a0| 72 69 76 65 72 20 61 70 | 70 6c 69 63 61 74 69 6f |river ap|plicatio|
|000002b0| 6e 20 77 69 6c 6c 20 73 | 65 74 20 74 68 65 20 70 |n will s|et the p|
|000002c0| 72 6f 70 65 72 74 79 20 | 66 6f 72 20 74 65 73 74 |roperty |for test|
|000002d0| 69 6e 67 29 0d 20 2a 09 | 09 09 09 c3 09 49 6d 70 |ing). *.|.....Imp|
|000002e0| 6c 65 6d 65 6e 74 20 53 | 75 70 65 72 73 65 64 65 |lement S|upersede|
|000002f0| 2f 52 65 70 6c 61 63 65 | 20 28 77 61 73 20 63 6f |/Replace| (was co|
|00000300| 6d 70 69 6c 65 64 20 6f | 75 74 29 0d 20 2a 09 09 |mpiled o|ut). *..|
|00000310| 09 09 c3 09 43 61 6c 6c | 20 53 79 6e 63 68 72 6f |....Call| Synchro|
|00000320| 6e 69 7a 65 49 4f 20 69 | 6e 20 4e 43 52 52 75 6e |nizeIO i|n NCRRun|
|00000330| 53 63 72 69 70 74 20 2d | 20 74 68 69 73 20 6e 65 |Script -| this ne|
|00000340| 65 64 73 20 74 6f 20 62 | 65 20 63 68 65 63 6b 65 |eds to b|e checke|
|00000350| 64 0d 20 2a 09 09 09 09 | 09 62 79 20 65 6e 67 69 |d. *....|.by engi|
|00000360| 6e 65 65 72 69 6e 67 20 | 74 6f 20 6d 61 6b 65 20 |neering |to make |
|00000370| 73 75 72 65 20 49 20 64 | 69 64 20 74 68 69 73 20 |sure I d|id this |
|00000380| 63 6f 72 72 65 63 74 6c | 79 2c 20 61 73 20 69 74 |correctl|y, as it|
|00000390| 20 63 61 6e 27 74 0d 20 | 2a 09 09 09 09 09 65 61 | can't. |*.....ea|
|000003a0| 73 69 6c 79 20 62 65 20 | 63 68 65 63 6b 65 64 20 |sily be |checked |
|000003b0| 62 79 20 6d 69 6e 69 6d | 61 6c 20 74 65 73 74 69 |by minim|al testi|
|000003c0| 6e 67 2e 0d 20 2a 09 09 | 09 09 c3 09 42 75 67 3a |ng.. *..|....Bug:|
|000003d0| 20 45 78 70 61 6e 73 69 | 6f 6e 20 4d 61 6e 61 67 | Expansi|on Manag|
|000003e0| 65 72 20 49 2f 4f 20 72 | 6f 75 74 69 6e 65 73 20 |er I/O r|outines |
|000003f0| 6e 65 65 64 20 74 68 65 | 20 64 65 76 69 63 65 20 |need the| device |
|00000400| 62 61 73 65 0d 20 2a 09 | 09 09 09 09 61 64 64 72 |base. *.|....addr|
|00000410| 65 73 73 2e 20 28 52 65 | 77 72 6f 74 65 20 47 65 |ess. (Re|wrote Ge|
|00000420| 74 50 43 49 43 61 72 64 | 42 61 73 65 41 64 64 72 |tPCICard|BaseAddr|
|00000430| 65 73 73 20 61 6e 64 20 | 66 69 78 65 64 20 65 78 |ess and |fixed ex|
|00000440| 70 61 6e 73 69 6f 6e 0d | 20 2a 09 09 09 09 09 4d |pansion.| *.....M|
|00000450| 61 6e 61 67 65 72 20 63 | 61 6c 6c 73 29 2e 0d 20 |anager c|alls).. |
|00000460| 2a 09 2d 2d 20 62 65 6c | 6f 77 20 74 68 65 20 6c |*.-- bel|ow the l|
|00000470| 69 6e 65 20 2d 2d 20 64 | 6f 6e 65 20 6f 6e 6c 79 |ine -- d|one only|
|00000480| 20 69 66 20 74 68 65 72 | 65 27 73 20 74 69 6d 65 | if ther|e's time|
|00000490| 20 2d 2d 0d 20 2a 09 09 | 09 09 c3 09 48 61 6e 64 | --. *..|....Hand|
|000004a0| 6c 65 20 64 69 73 63 6f | 6e 74 69 67 75 6f 75 73 |le disco|ntiguous|
|000004b0| 20 70 68 79 73 69 63 61 | 6c 20 6d 65 6d 6f 72 79 | physica|l memory|
|000004c0| 20 69 6e 20 50 72 65 70 | 61 72 65 4d 65 6d 6f 72 | in Prep|areMemor|
|000004d0| 79 46 6f 72 49 4f 0d 20 | 2a 09 09 09 09 09 53 75 |yForIO. |*.....Su|
|000004e0| 70 70 6f 72 74 20 64 69 | 73 63 6f 6e 6e 65 63 74 |pport di|sconnect|
|000004f0| 2f 72 65 73 65 6c 65 63 | 74 20 61 6e 64 2c 20 74 |/reselec|t and, t|
|00000500| 68 65 72 65 62 79 2c 20 | 63 6f 6e 63 75 72 72 65 |hereby, |concurre|
|00000510| 6e 74 20 49 2f 4f 2e 0d | 20 2a 09 09 09 09 09 52 |nt I/O..| *.....R|
|00000520| 65 64 6f 20 74 68 65 20 | 6c 6f 77 2d 6c 65 76 65 |edo the |low-leve|
|00000530| 6c 20 72 6f 75 74 69 6e | 65 73 20 73 6f 20 74 68 |l routin|es so th|
|00000540| 65 79 20 63 61 6e 20 62 | 65 20 75 73 65 64 20 69 |ey can b|e used i|
|00000550| 6e 20 61 20 73 61 6d 70 | 6c 65 20 53 49 4d 2e 0d |n a samp|le SIM..|
|00000560| 20 2a 09 09 09 09 c3 09 | 49 6d 70 6c 65 6d 65 6e | *......|Implemen|
|00000570| 74 20 64 72 69 76 65 72 | 20 6c 6f 67 67 69 6e 67 |t driver| logging|
|00000580| 20 75 73 69 6e 67 20 61 | 20 6e 61 74 69 76 65 20 | using a| native |
|00000590| 22 41 75 64 69 74 22 20 | 70 61 63 6b 61 67 65 2e |"Audit" |package.|
|000005a0| 0d 20 2a 09 09 09 09 c3 | 09 52 65 74 72 69 65 76 |. *.....|.Retriev|
|000005b0| 65 20 74 68 65 20 70 6f | 77 65 72 20 63 6f 6e 73 |e the po|wer cons|
|000005c0| 75 6d 70 74 69 6f 6e 20 | 69 6e 66 6f 72 6d 61 74 |umption |informat|
|000005d0| 69 6f 6e 20 66 72 6f 6d | 20 74 68 65 20 72 65 67 |ion from| the reg|
|000005e0| 69 73 74 72 79 2e 0d 20 | 2a 09 2d 2d 20 57 61 69 |istry.. |*.-- Wai|
|000005f0| 74 69 6e 67 20 66 6f 72 | 20 41 35 0d 20 2a 09 09 |ting for| A5. *..|
|00000600| 09 09 c3 09 49 6d 70 6c | 65 6d 65 6e 74 20 53 65 |....Impl|ement Se|
|00000610| 63 6f 6e 64 61 72 79 20 | 49 6e 74 65 72 72 75 70 |condary |Interrup|
|00000620| 74 73 0d 20 2a 20 31 39 | 39 34 2e 31 32 2e 31 32 |ts. * 19|94.12.12|
|00000630| 20 41 34 09 43 68 61 6e | 67 65 73 20 66 6f 72 20 | A4.Chan|ges for |
|00000640| 74 68 65 20 41 34 20 44 | 44 4b 20 52 65 6c 65 61 |the A4 D|DK Relea|
|00000650| 73 65 3a 0d 20 2a 09 09 | 09 09 c3 09 4d 61 70 70 |se:. *..|....Mapp|
|00000660| 69 6e 67 54 61 62 6c 65 | 20 69 73 20 6e 6f 77 20 |ingTable| is now |
|00000670| 49 4f 50 72 65 70 61 72 | 61 74 69 6f 6e 54 61 62 |IOPrepar|ationTab|
|00000680| 6c 65 0d 20 2a 20 31 39 | 39 34 2e 31 32 2e 31 38 |le. * 19|94.12.18|
|00000690| 20 41 35 09 44 72 69 76 | 65 72 47 65 73 74 61 6c | A5.Driv|erGestal|
|000006a0| 74 2e 68 20 69 73 20 6d | 69 73 73 69 6e 67 20 66 |t.h is m|issing f|
|000006b0| 72 6f 6d 20 74 68 69 73 | 20 68 65 61 64 65 72 20 |rom this| header |
|000006c0| 72 65 6c 65 61 73 65 2e | 20 43 6f 70 69 65 64 20 |release.| Copied |
|000006d0| 61 6e 0d 20 2a 09 09 09 | 09 09 6f 6c 64 20 76 65 |an. *...|..old ve|
|000006e0| 72 73 69 6f 6e 20 74 6f | 20 74 68 65 20 66 6f 6c |rsion to| the fol|
|000006f0| 64 65 72 20 22 3a 3a 50 | 43 49 43 49 6e 63 6c 75 |der "::P|CICInclu|
|00000700| 64 65 73 20 54 65 6d 70 | 22 20 2d 20 74 68 69 73 |des Temp|" - this|
|00000710| 20 6d 61 79 20 63 68 61 | 6e 67 65 2e 0d 20 2a 20 | may cha|nge.. * |
|00000720| 31 39 39 34 2e 31 32 2e | 33 30 20 41 35 2b 09 a5 |1994.12.|30 A5+..|
|00000730| ca 4e 43 52 44 72 69 76 | 65 72 2e 68 20 28 74 68 |.NCRDriv|er.h (th|
|00000740| 65 20 70 75 62 6c 69 63 | 20 66 69 6c 65 29 20 6e |e public| file) n|
|00000750| 6f 77 20 69 6e 63 6c 75 | 64 65 73 20 73 6f 6d 65 |ow inclu|des some|
|00000760| 20 73 79 73 74 65 6d 20 | 68 65 61 64 65 72 73 0d | system |headers.|
|00000770| 20 2a 09 09 09 09 09 73 | 6f 20 69 74 20 63 61 6e | *.....s|o it can|
|00000780| 20 62 65 20 75 73 65 64 | 20 69 6e 64 65 70 65 6e | be used| indepen|
|00000790| 64 65 6e 74 6c 79 2e 20 | 4e 6f 20 73 75 62 73 74 |dently. |No subst|
|000007a0| 61 6e 74 69 76 65 20 63 | 68 61 6e 67 65 73 2e 0d |antive c|hanges..|
|000007b0| 20 2a 09 09 09 09 09 a5 | ca 4e 43 52 52 75 6e 53 | *......|.NCRRunS|
|000007c0| 63 72 69 70 74 2e 63 20 | 6e 6f 77 20 63 6f 6d 70 |cript.c |now comp|
|000007d0| 69 6c 65 73 20 69 66 20 | 69 6e 74 65 72 72 75 70 |iles if |interrup|
|000007e0| 74 73 20 61 72 65 20 64 | 69 73 61 62 6c 65 64 2e |ts are d|isabled.|
|000007f0| 20 4e 6f 0d 20 2a 09 09 | 09 09 09 73 75 62 73 74 | No. *..|...subst|
|00000800| 61 6e 74 69 76 65 20 63 | 68 61 6e 67 65 73 2e 20 |antive c|hanges. |
|00000810| 0d 20 2a 09 09 09 09 09 | a5 ca 4d 6f 76 65 64 20 |. *.....|..Moved |
|00000820| 74 68 65 20 61 63 74 75 | 61 6c 20 73 63 72 69 70 |the actu|al scrip|
|00000830| 74 73 20 66 72 6f 6d 20 | 4e 43 52 52 75 6e 53 63 |ts from |NCRRunSc|
|00000840| 72 69 70 74 2e 63 20 74 | 6f 20 61 20 73 65 70 61 |ript.c t|o a sepa|
|00000850| 72 61 74 65 20 66 69 6c | 65 2e 0d 20 2a 09 09 09 |rate fil|e.. *...|
|00000860| 09 09 a5 ca 52 65 6d 6f | 76 65 64 20 73 63 61 74 |....Remo|ved scat|
|00000870| 74 65 72 2d 67 61 74 68 | 65 72 20 72 6f 75 74 69 |ter-gath|er routi|
|00000880| 6e 65 73 20 66 72 6f 6d | 20 44 72 69 76 65 72 50 |nes from| DriverP|
|00000890| 72 65 70 4d 65 6d 6f 72 | 79 55 74 69 6c 69 74 69 |repMemor|yUtiliti|
|000008a0| 65 73 2e 63 0d 20 2a 09 | 09 09 09 09 61 73 20 74 |es.c. *.|....as t|
|000008b0| 68 65 79 20 68 61 76 65 | 6e 27 74 20 62 65 65 6e |hey have|n't been|
|000008c0| 20 74 65 73 74 65 64 2e | 20 52 65 76 69 73 65 64 | tested.| Revised|
|000008d0| 20 50 72 65 70 61 72 65 | 53 69 6d 70 6c 65 4d 65 | Prepare|SimpleMe|
|000008e0| 6d 6f 72 79 41 72 65 61 | 20 74 6f 0d 20 2a 09 09 |moryArea| to. *..|
|000008f0| 09 09 09 66 6f 6c 6c 6f | 77 20 74 68 65 20 6c 6f |...follo|w the lo|
|00000900| 67 69 63 20 28 69 66 20 | 61 6e 79 29 20 69 6e 20 |gic (if |any) in |
|00000910| 74 68 65 20 74 68 65 20 | 64 65 76 65 6c 6f 70 20 |the the |develop |
|00000920| 61 72 74 69 63 6c 65 2e | 0d 20 2a 09 09 09 09 09 |article.|. *.....|
|00000930| a5 ca 52 65 76 69 73 65 | 64 20 73 63 72 69 70 74 |..Revise|d script|
|00000940| 20 70 72 65 70 61 72 61 | 74 69 6f 6e 20 66 6f 72 | prepara|tion for|
|00000950| 20 63 6c 61 72 69 74 79 | 20 28 61 6e 64 20 64 65 | clarity| (and de|
|00000960| 62 75 67 67 69 6e 67 29 | 2e 20 54 68 65 0d 20 2a |bugging)|. The. *|
|00000970| 09 09 09 09 09 73 63 72 | 69 70 74 20 6e 6f 77 20 |.....scr|ipt now |
|00000980| 69 6e 69 74 69 61 6c 69 | 7a 65 73 20 63 6f 6e 73 |initiali|zes cons|
|00000990| 74 61 6e 74 20 72 65 67 | 69 73 74 65 72 73 2e 0d |tant reg|isters..|
|000009a0| 20 2a 09 09 09 09 09 a5 | ca 53 65 6c 65 63 74 20 | *......|.Select |
|000009b0| 28 61 74 20 63 6f 6d 70 | 69 6c 61 74 69 6f 6e 29 |(at comp|ilation)|
|000009c0| 20 65 69 74 68 65 72 20 | 4d 65 6d 6f 72 79 20 6f | either |Memory o|
|000009d0| 72 20 49 2f 4f 20 61 63 | 63 65 73 73 3b 20 6e 6f |r I/O ac|cess; no|
|000009e0| 74 20 62 6f 74 68 2e 0d | 20 2a 09 09 09 09 09 a5 |t both..| *......|
|000009f0| ca 42 75 67 3a 20 43 54 | 45 53 54 30 20 77 61 73 |.Bug: CT|EST0 was|
|00000a00| 20 62 65 69 6e 67 20 77 | 72 69 74 74 65 6e 20 61 | being w|ritten a|
|00000a10| 73 20 61 20 6c 6f 6e 67 | 2c 20 69 74 20 69 73 20 |s a long|, it is |
|00000a20| 61 20 62 79 74 65 2e 0d | 20 2a 09 09 09 09 09 a5 |a byte..| *......|
|00000a30| ca 54 75 72 6e 20 6f 66 | 66 20 74 69 6d 65 72 73 |.Turn of|f timers|
|00000a40| 20 74 6f 20 70 72 65 76 | 65 6e 74 20 73 70 75 72 | to prev|ent spur|
|00000a50| 69 6f 75 73 20 69 6e 74 | 65 72 72 75 70 74 73 2e |ious int|errupts.|
|00000a60| 0d 20 2a 09 09 09 09 09 | a5 ca 53 65 74 20 44 53 |. *.....|..Set DS|
|00000a70| 41 20 74 6f 20 61 20 64 | 75 6d 6d 79 20 76 61 6c |A to a d|ummy val|
|00000a80| 75 65 20 66 6f 72 20 42 | 75 73 20 52 65 73 65 74 |ue for B|us Reset|
|00000a90| 20 73 63 72 69 70 74 20 | 2d 20 69 74 20 64 6f 65 | script |- it doe|
|00000aa0| 73 6e 27 74 20 75 73 65 | 0d 20 2a 09 09 09 09 09 |sn't use|. *.....|
|00000ab0| 74 68 65 20 44 53 41 2e | 0d 20 2a 09 09 09 09 09 |the DSA.|. *.....|
|00000ac0| a5 ca 52 65 6d 6f 76 65 | 64 20 74 68 65 20 6e 6f |..Remove|d the no|
|00000ad0| 6e 2d 69 6e 74 65 72 72 | 75 70 74 20 73 70 69 6e |n-interr|upt spin|
|00000ae0| 2d 6c 6f 6f 70 20 66 72 | 6f 6d 20 74 68 65 20 73 |-loop fr|om the s|
|00000af0| 63 72 69 70 74 20 72 75 | 6e 6e 65 72 2e 0d 20 2a |cript ru|nner.. *|
|00000b00| 09 09 09 09 09 41 64 64 | 65 64 20 28 74 65 6d 70 |.....Add|ed (temp|
|00000b10| 6f 72 61 72 79 29 20 53 | 6f 66 74 77 61 72 65 20 |orary) S|oftware |
|00000b20| 49 6e 74 65 72 72 75 70 | 74 20 74 6f 20 73 65 65 |Interrup|t to see|
|00000b30| 20 69 66 20 74 68 69 73 | 20 66 69 78 65 73 20 74 | if this| fixes t|
|00000b40| 68 65 0d 20 2a 09 09 09 | 09 09 51 75 65 75 65 53 |he. *...|..QueueS|
|00000b50| 65 63 6f 6e 64 61 72 79 | 49 6e 74 65 72 72 75 70 |econdary|Interrup|
|00000b60| 74 20 70 72 6f 62 6c 65 | 6d 20 28 69 74 20 64 69 |t proble|m (it di|
|00000b70| 64 6e 27 74 29 2e 20 54 | 75 72 6e 65 64 20 6f 6e |dn't). T|urned on|
|00000b80| 20 74 68 65 0d 20 2a 09 | 09 09 09 09 77 61 74 63 | the. *.|....watc|
|00000b90| 68 64 6f 67 20 74 69 6d | 65 72 20 63 6f 64 65 20 |hdog tim|er code |
|00000ba0| 61 73 20 69 74 20 6e 6f | 20 6c 6f 6e 67 65 72 20 |as it no| longer |
|00000bb0| 63 72 61 73 68 65 73 2e | 0d 20 2a 09 09 09 09 09 |crashes.|. *.....|
|00000bc0| a5 ca 50 61 72 61 6d 65 | 74 65 72 69 7a 65 64 20 |..Parame|terized |
|00000bd0| 77 61 74 63 68 64 6f 67 | 20 74 69 6d 65 72 20 28 |watchdog| timer (|
|00000be0| 69 74 20 68 61 6e 67 73 | 20 69 6e 20 41 35 29 2e |it hangs| in A5).|
|00000bf0| 0d 20 2a 20 31 39 39 35 | 2e 30 31 2e 30 34 09 09 |. * 1995|.01.04..|
|00000c00| a5 ca 41 64 64 65 64 20 | 54 45 4d 50 5f 54 45 53 |..Added |TEMP_TES|
|00000c10| 54 20 74 6f 20 73 74 72 | 69 70 20 64 6f 77 6e 20 |T to str|ip down |
|00000c20| 74 68 65 20 61 6c 67 6f | 72 69 74 68 6d 2e 20 54 |the algo|rithm. T|
|00000c30| 68 69 73 20 74 75 72 6e | 73 20 6f 66 66 0d 20 2a |his turn|s off. *|
|00000c40| 09 09 09 09 09 50 72 65 | 70 61 72 65 4d 65 6d 6f |.....Pre|pareMemo|
|00000c50| 72 79 46 6f 72 49 4f 20 | 28 74 68 65 20 70 68 79 |ryForIO |(the phy|
|00000c60| 73 69 63 61 6c 20 61 64 | 64 72 65 73 73 20 69 73 |sical ad|dress is|
|00000c70| 20 73 65 74 20 74 6f 20 | 74 68 65 20 6c 6f 67 69 | set to |the logi|
|00000c80| 63 61 6c 0d 20 2a 09 09 | 09 09 09 61 64 64 72 65 |cal. *..|...addre|
|00000c90| 73 73 29 20 61 6e 64 20 | 63 72 65 61 74 65 73 20 |ss) and |creates |
|00000ca0| 61 20 6d 69 6e 69 6d 61 | 6c 20 28 73 75 63 63 65 |a minima|l (succe|
|00000cb0| 73 73 66 75 6c 29 20 73 | 63 72 69 70 74 2e 0d 20 |ssful) s|cript.. |
|00000cc0| 2a 20 31 39 39 35 2e 30 | 31 2e 31 33 09 09 a5 ca |* 1995.0|1.13....|
|00000cd0| 53 65 63 6f 6e 64 61 72 | 79 20 69 6e 74 65 72 72 |Secondar|y interr|
|00000ce0| 75 70 74 73 20 77 6f 72 | 6b 2e 0d 20 2a 09 09 09 |upts wor|k.. *...|
|00000cf0| 09 09 a5 ca 43 6f 72 72 | 65 63 74 6c 79 20 72 65 |....Corr|ectly re|
|00000d00| 74 75 72 6e 20 70 6f 77 | 65 72 20 63 6f 6e 73 75 |turn pow|er consu|
|00000d10| 6d 70 74 69 6f 6e 20 62 | 79 20 70 61 72 73 69 6e |mption b|y parsin|
|00000d20| 67 20 74 68 65 20 72 65 | 67 69 73 74 72 79 2e 0d |g the re|gistry..|
|00000d30| 20 2a 09 09 09 09 09 a5 | ca 52 65 6d 6f 76 65 64 | *......|.Removed|
|00000d40| 20 6d 61 6e 79 20 44 65 | 62 75 67 53 74 72 27 73 | many De|bugStr's|
|00000d50| 20 61 6e 64 20 72 65 6d | 6f 76 65 64 20 54 45 4d | and rem|oved TEM|
|00000d60| 50 5f 54 45 53 54 2e 20 | 0d 20 2a 20 31 39 39 35 |P_TEST. |. * 1995|
|00000d70| 2e 30 31 2e 32 32 09 09 | 55 70 67 72 61 64 65 64 |.01.22..|Upgraded|
|00000d80| 20 74 6f 20 41 36 2e 20 | 41 64 64 65 64 20 74 68 | to A6. |Added th|
|00000d90| 65 20 4c 6f 67 4c 69 62 | 72 61 72 79 20 66 75 6e |e LogLib|rary fun|
|00000da0| 63 74 69 6f 6e 73 2e 20 | 52 65 6d 6f 76 65 64 20 |ctions. |Removed |
|00000db0| 61 6c 6c 0d 20 2a 09 09 | 09 09 09 53 65 63 6f 6e |all. *..|...Secon|
|00000dc0| 64 61 72 79 49 6e 74 65 | 72 72 75 70 74 20 63 6f |daryInte|rrupt co|
|00000dd0| 6e 64 69 74 69 6f 6e 61 | 6c 20 63 6f 6d 70 69 6c |nditiona|l compil|
|00000de0| 61 74 69 6f 6e 73 2e 20 | 52 65 64 69 64 20 74 68 |ations. |Redid th|
|00000df0| 65 20 77 61 79 0d 20 2a | 09 09 09 09 09 74 68 61 |e way. *|.....tha|
|00000e00| 74 20 4b 69 6c 6c 49 4f | 20 74 65 72 6d 69 6e 61 |t KillIO| termina|
|00000e10| 74 65 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |tes the |current |
|00000e20| 72 65 71 75 65 73 74 20 | 61 73 20 69 74 20 63 61 |request |as it ca|
|00000e30| 6c 6c 65 64 20 61 0d 20 | 2a 09 09 09 09 09 73 65 |lled a. |*.....se|
|00000e40| 63 6f 6e 64 61 72 79 20 | 69 6e 74 65 72 72 75 70 |condary |interrup|
|00000e50| 74 20 68 61 6e 64 6c 65 | 72 20 66 72 6f 6d 20 22 |t handle|r from "|
|00000e60| 69 6e 74 65 72 72 75 70 | 74 20 6c 65 76 65 6c 22 |interrup|t level"|
|00000e70| 20 61 66 74 65 72 20 61 | 0d 20 2a 09 09 09 09 09 | after a|. *.....|
|00000e80| 74 69 6d 65 6f 75 74 2e | 20 4c 6f 67 20 73 6f 6d |timeout.| Log som|
|00000e90| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 |e inform|ation ab|
|00000ea0| 6f 75 74 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |out the |current |
|00000eb0| 72 65 71 75 65 73 74 2e | 0d 20 2a 09 09 09 09 09 |request.|. *.....|
|00000ec0| a5 ca 54 68 65 20 6c 6f | 67 20 73 68 6f 77 73 20 |..The lo|g shows |
|00000ed0| 74 68 61 74 20 74 68 65 | 20 4e 43 52 20 63 68 69 |that the| NCR chi|
|00000ee0| 70 20 2d 2d 20 73 6f 6d | 65 74 69 6d 65 73 20 2d |p -- som|etimes -|
|00000ef0| 2d 20 6a 75 6d 70 73 20 | 69 6e 74 6f 0d 20 2a 09 |- jumps |into. *.|
|00000f00| 09 09 09 09 74 68 65 20 | 6d 69 64 64 6c 65 20 6f |....the |middle o|
|00000f10| 66 20 61 20 73 63 72 69 | 70 74 20 69 6e 73 74 72 |f a scri|pt instr|
|00000f20| 75 63 74 69 6f 6e 2e 20 | 43 61 6e 20 74 68 69 73 |uction. |Can this|
|00000f30| 20 62 65 20 61 20 62 75 | 73 20 70 72 6f 62 6c 65 | be a bu|s proble|
|00000f40| 6d 3f 0d 20 2a 09 09 09 | 09 09 48 6d 6d 2c 20 74 |m?. *...|..Hmm, t|
|00000f50| 68 65 20 70 72 6f 62 6c | 65 6d 20 77 65 6e 74 20 |he probl|em went |
|00000f60| 61 77 61 79 20 6f 6e 20 | 69 74 73 20 6f 77 6e 2e |away on |its own.|
|00000f70| 0d 20 2a 20 31 39 39 35 | 2e 30 31 2e 32 33 09 09 |. * 1995|.01.23..|
|00000f80| a5 ca 46 69 78 65 64 20 | 74 68 65 20 4e 56 52 41 |..Fixed |the NVRA|
|00000f90| 4d 20 62 75 67 3a 20 49 | 20 77 61 73 20 75 73 69 |M bug: I| was usi|
|00000fa0| 6e 67 20 52 65 67 50 72 | 6f 70 65 72 74 79 4e 61 |ng RegPr|opertyNa|
|00000fb0| 6d 65 20 72 61 74 68 65 | 72 20 74 68 61 6e 0d 20 |me rathe|r than. |
|00000fc0| 2a 09 09 09 09 09 52 65 | 67 50 72 6f 70 65 72 74 |*.....Re|gPropert|
|00000fd0| 79 4e 61 6d 65 42 75 66 | 2e 20 54 68 65 20 66 6f |yNameBuf|. The fo|
|00000fe0| 72 6d 65 72 20 69 73 20 | 61 20 70 6f 69 6e 74 65 |rmer is |a pointe|
|00000ff0| 72 20 74 6f 20 61 20 63 | 68 61 72 61 63 74 65 72 |r to a c|haracter|
|00001000| 20 73 74 72 69 6e 67 2c | 0d 20 2a 09 09 09 09 09 | string,|. *.....|
|00001010| 77 68 69 6c 65 20 74 68 | 65 20 6c 61 74 74 65 72 |while th|e latter|
|00001020| 20 69 73 20 61 20 62 75 | 66 66 65 72 20 74 68 61 | is a bu|ffer tha|
|00001030| 74 20 63 61 6e 20 68 6f | 6c 64 20 61 20 70 72 6f |t can ho|ld a pro|
|00001040| 70 65 72 74 79 20 6e 61 | 6d 65 2e 0d 20 2a 20 31 |perty na|me.. * 1|
|00001050| 39 39 35 2e 30 31 2e 32 | 34 09 09 a5 ca 52 65 6d |995.01.2|4....Rem|
|00001060| 6f 76 65 64 20 74 68 65 | 20 4e 56 52 41 4d 20 62 |oved the| NVRAM b|
|00001070| 69 74 20 66 72 6f 6d 20 | 74 68 65 20 64 72 69 76 |it from |the driv|
|00001080| 65 72 20 6f 70 74 69 6f | 6e 73 20 43 6f 6e 74 72 |er optio|ns Contr|
|00001090| 6f 6c 20 63 61 6c 6c 2e | 0d 20 2a 09 09 09 09 09 |ol call.|. *.....|
|000010a0| 41 64 64 65 64 20 73 65 | 74 2f 67 65 74 20 69 6e |Added se|t/get in|
|000010b0| 69 74 69 61 74 6f 72 20 | 69 64 20 28 50 42 43 6f |itiator |id (PBCo|
|000010c0| 6e 74 72 6f 6c 20 73 65 | 74 73 20 69 74 2c 20 50 |ntrol se|ts it, P|
|000010d0| 42 53 74 61 74 75 73 20 | 67 65 74 73 20 69 74 29 |BStatus |gets it)|
|000010e0| 2e 0d 20 2a 09 09 09 09 | 09 a5 ca 43 6c 65 61 6e |.. *....|...Clean|
|000010f0| 65 64 20 75 70 20 4e 56 | 52 41 4d 20 68 61 6e 64 |ed up NV|RAM hand|
|00001100| 6c 69 6e 67 2e 20 44 72 | 69 76 65 72 52 65 70 6c |ling. Dr|iverRepl|
|00001110| 61 63 65 43 6d 64 20 6e | 6f 77 20 66 65 74 63 68 |aceCmd n|ow fetch|
|00001120| 65 73 20 74 68 65 0d 20 | 2a 09 09 09 09 09 69 6e |es the. |*.....in|
|00001130| 69 74 69 61 74 6f 72 20 | 49 44 2c 20 69 66 20 69 |itiator |ID, if i|
|00001140| 74 20 63 61 6e 20 62 65 | 20 66 6f 75 6e 64 2e 0d |t can be| found..|
|00001150| 20 2a 09 09 09 09 09 a5 | ca 43 6f 6d 70 6c 65 74 | *......|.Complet|
|00001160| 65 6c 79 20 72 65 77 72 | 6f 74 65 20 50 72 65 70 |ely rewr|ote Prep|
|00001170| 61 72 65 4d 65 6d 6f 72 | 79 46 6f 72 49 4f 20 68 |areMemor|yForIO h|
|00001180| 61 6e 64 6c 69 6e 67 20 | 73 6f 20 74 68 65 20 64 |andling |so the d|
|00001190| 72 69 76 65 72 0d 20 2a | 09 09 09 09 09 63 61 6e |river. *|.....can|
|000011a0| 20 72 65 2d 63 61 6c 6c | 65 64 20 66 72 6f 6d 20 | re-call|ed from |
|000011b0| 61 6e 20 49 4f 43 6f 6d | 70 6c 65 74 69 6f 6e 20 |an IOCom|pletion |
|000011c0| 72 6f 75 74 69 6e 65 2e | 20 54 68 69 73 20 70 72 |routine.| This pr|
|000011d0| 65 63 6c 75 64 65 73 0d | 20 2a 09 09 09 09 09 61 |ecludes.| *.....a|
|000011e0| 6c 6c 6f 63 61 74 69 6e | 67 20 6d 65 6d 6f 72 79 |llocatin|g memory|
|000011f0| 20 69 6e 20 74 68 65 20 | 64 72 69 76 65 72 20 28 | in the |driver (|
|00001200| 6f 75 74 73 69 64 65 20 | 6f 66 20 6f 70 65 6e 2f |outside |of open/|
|00001210| 63 6c 6f 73 65 29 2e 20 | 54 68 69 73 0d 20 2a 09 |close). |This. *.|
|00001220| 09 09 09 09 69 73 20 61 | 20 6d 61 73 73 69 76 65 |....is a| massive|
|00001230| 20 72 65 73 74 72 75 63 | 74 75 72 69 6e 67 20 6f | restruc|turing o|
|00001240| 66 20 74 68 65 20 64 72 | 69 76 65 72 2e 20 54 68 |f the dr|iver. Th|
|00001250| 65 20 6e 65 77 20 6f 72 | 67 61 6e 69 7a 61 74 69 |e new or|ganizati|
|00001260| 6f 6e 0d 20 2a 09 09 09 | 09 09 69 73 20 64 65 73 |on. *...|..is des|
|00001270| 63 72 69 62 65 64 20 62 | 65 6c 6f 77 2e 0d 20 2a |cribed b|elow.. *|
|00001280| 09 09 09 09 09 a5 ca 52 | 65 6d 6f 76 65 64 20 74 |.......R|emoved t|
|00001290| 68 65 20 44 72 69 76 65 | 72 4f 70 74 69 6f 6e 73 |he Drive|rOptions|
|000012a0| 20 63 6f 6e 74 72 6f 6c | 20 63 6f 6d 6d 61 6e 64 | control| command|
|000012b0| 3a 20 69 74 27 73 20 73 | 65 72 76 65 64 20 69 74 |: it's s|erved it|
|000012c0| 73 0d 20 2a 09 09 09 09 | 09 70 75 72 70 6f 73 65 |s. *....|.purpose|
|000012d0| 2c 20 61 6e 64 20 6e 6f | 20 6c 6f 6e 67 65 72 20 |, and no| longer |
|000012e0| 69 6c 6c 75 73 74 72 61 | 74 65 73 20 61 6e 79 20 |illustra|tes any |
|000012f0| 64 72 69 76 65 72 2d 73 | 70 65 63 69 66 69 63 20 |driver-s|pecific |
|00001300| 66 75 6e 63 74 69 6f 6e | 73 2e 0d 20 2a 09 09 09 |function|s.. *...|
|00001310| 09 09 a5 ca 52 65 6d 6f | 76 65 64 20 74 68 65 20 |....Remo|ved the |
|00001320| 73 63 72 69 70 74 20 6c | 6f 67 20 63 6f 6e 74 72 |script l|og contr|
|00001330| 6f 6c 20 63 6f 6d 6d 61 | 6e 64 2e 20 54 68 65 20 |ol comma|nd. The |
|00001340| 73 63 72 69 70 74 20 6c | 6f 67 20 69 73 20 6e 6f |script l|og is no|
|00001350| 77 0d 20 2a 09 09 09 09 | 09 72 65 73 65 74 20 6f |w. *....|.reset o|
|00001360| 6e 20 65 61 63 68 20 63 | 6f 6d 6d 61 6e 64 2e 20 |n each c|ommand. |
|00001370| 48 6d 6d 2c 20 74 68 65 | 20 73 63 72 69 70 74 20 |Hmm, the| script |
|00001380| 6c 6f 67 20 69 73 20 6f | 75 74 6c 69 76 69 6e 67 |log is o|utliving|
|00001390| 20 69 74 73 0d 20 2a 09 | 09 09 09 09 75 73 65 66 | its. *.|....usef|
|000013a0| 75 6c 6e 65 73 73 2c 20 | 6e 6f 77 20 74 68 61 74 |ulness, |now that|
|000013b0| 20 74 68 65 20 4c 6f 67 | 4c 69 62 72 61 72 79 20 | the Log|Library |
|000013c0| 77 6f 72 6b 73 2e 20 4d | 61 79 62 65 20 69 74 27 |works. M|aybe it'|
|000013d0| 6c 6c 20 62 65 0d 20 2a | 09 09 09 09 09 74 68 65 |ll be. *|.....the|
|000013e0| 20 6e 65 78 74 20 74 6f | 20 67 6f 2e 0d 20 2a 09 | next to| go.. *.|
|000013f0| 09 09 09 09 a5 ca 52 65 | 6d 6f 76 65 64 20 74 68 |......Re|moved th|
|00001400| 65 20 74 65 6d 70 6f 72 | 61 72 79 20 73 74 72 69 |e tempor|ary stri|
|00001410| 6e 67 20 63 6f 70 79 20 | 64 65 66 69 6e 69 74 69 |ng copy |definiti|
|00001420| 6f 6e 73 2e 0d 20 2a 20 | 31 39 39 35 2e 30 32 2e |ons.. * |1995.02.|
|00001430| 30 33 09 09 46 69 78 65 | 64 20 73 6f 6d 65 20 62 |03..Fixe|d some b|
|00001440| 75 67 73 3a 20 6d 79 20 | 50 72 65 70 61 72 65 4d |ugs: my |PrepareM|
|00001450| 65 6d 6f 72 79 46 6f 72 | 49 4f 20 63 6f 64 65 20 |emoryFor|IO code |
|00001460| 75 73 65 64 20 74 68 65 | 20 77 72 6f 6e 67 0d 20 |used the| wrong. |
|00001470| 2a 09 09 09 09 09 76 61 | 72 69 61 62 6c 65 20 69 |*.....va|riable i|
|00001480| 6e 20 6f 6e 65 20 70 6c | 61 63 65 2c 20 6c 65 61 |n one pl|ace, lea|
|00001490| 64 69 6e 67 20 74 6f 20 | 6d 65 6d 6f 72 79 20 63 |ding to |memory c|
|000014a0| 6f 72 72 75 70 74 69 6f | 6e 2e 20 41 6c 73 6f 2c |orruptio|n. Also,|
|000014b0| 0d 20 2a 09 09 09 09 09 | 74 68 65 20 61 74 6f 6d |. *.....|the atom|
|000014c0| 69 63 20 6f 70 65 72 61 | 74 69 6f 6e 20 75 73 65 |ic opera|tion use|
|000014d0| 64 20 74 6f 20 72 65 63 | 6f 76 65 72 20 74 68 65 |d to rec|over the|
|000014e0| 20 63 75 72 72 65 6e 74 | 20 70 61 72 61 6d 65 74 | current| paramet|
|000014f0| 65 72 0d 20 2a 09 09 09 | 09 09 62 6c 6f 63 6b 20 |er. *...|..block |
|00001500| 66 72 6f 6d 20 74 68 65 | 20 70 65 72 2d 72 65 71 |from the| per-req|
|00001510| 75 65 73 74 20 72 65 63 | 6f 72 64 20 28 69 6e 20 |uest rec|ord (in |
|00001520| 43 6f 6d 70 6c 65 74 65 | 54 68 69 73 52 65 71 75 |Complete|ThisRequ|
|00001530| 65 73 74 29 0d 20 2a 09 | 09 09 09 09 68 61 64 20 |est). *.|....had |
|00001540| 61 20 72 65 2d 65 6e 74 | 72 61 6e 63 79 20 62 75 |a re-ent|rancy bu|
|00001550| 67 2e 0d 20 2a 20 31 39 | 39 35 2e 30 32 2e 30 36 |g.. * 19|95.02.06|
|00001560| 09 09 53 79 6e 63 68 72 | 6f 6e 6f 75 73 20 49 2f |..Synchr|onous I/|
|00001570| 4f 20 73 65 65 6d 73 20 | 74 6f 20 77 6f 72 6b 20 |O seems |to work |
|00001580| 63 6f 72 72 65 63 74 6c | 79 2e 20 41 73 79 6e 63 |correctl|y. Async|
|00001590| 68 72 6f 6e 6f 75 73 20 | 49 2f 4f 0d 20 2a 09 09 |hronous |I/O. *..|
|000015a0| 09 09 09 68 61 6e 67 73 | 20 72 61 6e 64 6f 6d 6c |...hangs| randoml|
|000015b0| 79 2c 20 70 6f 73 73 69 | 62 6c 79 20 62 65 63 61 |y, possi|bly beca|
|000015c0| 75 73 65 20 6f 66 20 62 | 75 67 73 20 69 6e 20 74 |use of b|ugs in t|
|000015d0| 68 65 20 4e 43 52 2d 73 | 70 65 63 69 66 69 63 0d |he NCR-s|pecific.|
|000015e0| 20 2a 09 09 09 09 09 63 | 6f 64 65 2e 20 41 64 64 | *.....c|ode. Add|
|000015f0| 65 64 20 44 65 76 69 63 | 65 50 72 6f 62 65 20 61 |ed Devic|eProbe a|
|00001600| 6e 64 20 41 41 50 4c 2c | 61 64 64 72 65 73 73 65 |nd AAPL,|addresse|
|00001610| 73 20 70 72 6f 63 65 73 | 73 69 6e 67 2e 0d 20 2a |s proces|sing.. *|
|00001620| 09 09 09 09 09 a5 20 52 | 65 6d 6f 76 65 64 20 74 |...... R|emoved t|
|00001630| 68 65 20 4e 43 52 20 6c | 6f 67 67 69 6e 67 20 2d |he NCR l|ogging -|
|00001640| 2d 20 49 27 6d 20 72 65 | 6c 79 69 6e 67 20 6f 6e |- I'm re|lying on|
|00001650| 20 74 68 65 20 4c 6f 67 | 4c 69 62 72 61 72 79 0d | the Log|Library.|
|00001660| 20 2a 09 09 09 09 09 66 | 6f 72 20 6f 6e 67 6f 69 | *.....f|or ongoi|
|00001670| 6e 67 20 73 74 61 74 75 | 73 20 6c 6f 67 67 69 6e |ng statu|s loggin|
|00001680| 67 2e 0d 20 2a 09 09 09 | 09 09 a5 ca 45 6e 61 62 |g.. *...|....Enab|
|00001690| 6c 65 64 20 77 61 74 63 | 68 64 6f 67 20 74 69 6d |led watc|hdog tim|
|000016a0| 65 72 73 20 2d 2d 20 74 | 68 65 20 70 61 72 61 6d |ers -- t|he param|
|000016b0| 20 62 6c 6f 63 6b 20 63 | 68 61 6e 67 65 64 2e 0d | block c|hanged..|
|000016c0| 20 2a 20 31 39 39 35 2e | 30 32 2e 30 38 09 09 a5 | * 1995.|02.08...|
|000016d0| 20 53 69 67 6e 69 66 69 | 63 61 6e 74 20 63 68 61 | Signifi|cant cha|
|000016e0| 6e 67 65 73 20 74 6f 20 | 73 75 70 70 6f 72 74 20 |nges to |support |
|000016f0| 74 68 65 20 6e 65 77 20 | 64 72 69 76 65 72 20 6f |the new |driver o|
|00001700| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 3a 0d 20 2a 09 |rganizat|ion:. *.|
|00001710| 09 09 09 09 44 4d 41 20 | 62 75 66 66 65 72 73 20 |....DMA |buffers |
|00001720| 63 61 6e 20 6f 6e 6c 79 | 20 62 65 20 70 61 73 73 |can only| be pass|
|00001730| 65 64 20 69 6e 20 50 42 | 52 65 61 64 20 6f 72 20 |ed in PB|Read or |
|00001740| 50 42 57 72 69 74 65 20 | 63 6f 6d 6d 61 6e 64 73 |PBWrite |commands|
|00001750| 2c 0d 20 2a 09 09 09 09 | 09 61 6e 64 20 62 75 66 |,. *....|.and buf|
|00001760| 66 65 72 73 20 6d 75 73 | 74 20 62 65 20 6d 61 72 |fers mus|t be mar|
|00001770| 6b 65 64 20 77 69 74 68 | 20 74 68 65 20 69 6f 4d |ked with| the ioM|
|00001780| 61 70 42 75 66 66 65 72 | 20 66 6c 61 67 20 69 6e |apBuffer| flag in|
|00001790| 20 74 68 65 0d 20 2a 09 | 09 09 09 09 69 6f 50 6f | the. *.|....ioPo|
|000017a0| 73 4d 6f 64 65 20 66 69 | 65 6c 64 2e 0d 20 2a 09 |sMode fi|eld.. *.|
|000017b0| 09 09 09 09 a5 ca 48 6d | 6d 2c 20 41 73 79 6e 63 |......Hm|m, Async|
|000017c0| 68 20 49 2f 4f 20 6e 6f | 77 20 73 65 65 6d 73 20 |h I/O no|w seems |
|000017d0| 74 6f 20 77 6f 72 6b 2e | 0d 20 2a 20 31 39 39 35 |to work.|. * 1995|
|000017e0| 2e 30 32 2e 32 31 09 09 | 4d 69 73 73 69 6e 67 20 |.02.21..|Missing |
|000017f0| 62 72 65 61 6b 20 61 74 | 20 43 6c 6f 73 65 20 73 |break at| Close s|
|00001800| 77 69 74 63 68 20 73 74 | 61 74 65 6d 65 6e 74 2e |witch st|atement.|
|00001810| 20 41 64 64 65 64 20 70 | 61 72 74 69 61 6c 0d 20 | Added p|artial. |
|00001820| 2a 09 09 09 09 09 49 2f | 4f 20 70 72 65 70 61 72 |*.....I/|O prepar|
|00001830| 61 74 69 6f 6e 2e 0d 20 | 2a 20 31 39 39 35 2e 30 |ation.. |* 1995.0|
|00001840| 33 2e 30 38 09 09 a5 ca | 43 6f 6e 74 69 6e 75 65 |3.08....|Continue|
|00001850| 20 74 65 73 74 69 6e 67 | 20 50 72 65 70 61 72 65 | testing| Prepare|
|00001860| 4d 65 6d 6f 72 79 46 6f | 72 49 4f 2e 0d 20 2a 09 |MemoryFo|rIO.. *.|
|00001870| 09 09 09 09 53 69 6e 67 | 6c 65 2d 73 74 65 70 70 |....Sing|le-stepp|
|00001880| 69 6e 67 20 73 63 72 69 | 70 74 73 20 68 61 6e 67 |ing scri|pts hang|
|00001890| 20 69 6e 20 42 75 73 20 | 52 65 73 65 74 0d 20 2a | in Bus |Reset. *|
|000018a0| 09 09 09 09 09 a5 ca 41 | 64 64 65 64 20 44 65 6c |.......A|dded Del|
|000018b0| 61 79 46 6f 72 48 61 72 | 64 77 61 72 65 20 66 6f |ayForHar|dware fo|
|000018c0| 72 20 31 32 20 50 43 49 | 20 63 6c 6f 63 6b 20 74 |r 12 PCI| clock t|
|000018d0| 69 63 6b 20 73 74 61 6c | 6c 73 2e 0d 20 2a 09 09 |ick stal|ls.. *..|
|000018e0| 09 09 09 a5 ca 52 65 6d | 6f 76 65 64 20 6d 79 20 |.....Rem|oved my |
|000018f0| 53 77 61 70 4c 6f 6e 67 | 3a 20 6e 6f 77 20 75 73 |SwapLong|: now us|
|00001900| 69 6e 67 20 64 72 69 76 | 65 72 20 73 65 72 76 69 |ing driv|er servi|
|00001910| 63 65 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 2a 09 |ces rout|ine.. *.|
|00001920| 09 09 09 09 a5 ca 53 75 | 70 70 6f 72 74 20 44 72 |......Su|pport Dr|
|00001930| 69 76 65 72 47 65 73 74 | 61 6c 74 4f 6e 28 29 2e |iverGest|altOn().|
|00001940| 20 52 65 70 6c 61 63 65 | 20 6e 6f 77 20 73 74 6f | Replace| now sto|
|00001950| 72 65 73 20 74 68 65 20 | 64 72 69 76 65 72 0d 20 |res the |driver. |
|00001960| 2a 09 09 09 09 09 72 65 | 66 4e 75 6d 20 61 6e 64 |*.....re|fNum and|
|00001970| 20 64 65 76 69 63 65 49 | 44 2e 0d 20 2a 09 09 09 | deviceI|D.. *...|
|00001980| 09 09 a5 ca 52 65 6d 6f | 76 65 20 54 65 6d 70 43 |....Remo|ve TempC|
|00001990| 68 65 63 6b 70 6f 69 6e | 74 49 4f 0d 20 2a 20 31 |heckpoin|tIO. * 1|
|000019a0| 39 39 35 2e 30 33 2e 31 | 37 09 09 a5 ca 52 65 69 |995.03.1|7....Rei|
|000019b0| 6d 70 6c 65 6d 65 6e 74 | 65 64 20 61 6c 6c 20 4e |mplement|ed all N|
|000019c0| 61 6d 65 20 52 65 67 69 | 73 74 72 79 20 72 6f 75 |ame Regi|stry rou|
|000019d0| 74 69 6e 65 73 20 74 6f | 20 6d 61 6b 65 20 74 68 |tines to| make th|
|000019e0| 65 6d 0d 20 2a 09 09 09 | 09 09 69 6e 64 65 70 65 |em. *...|..indepe|
|000019f0| 6e 64 65 6e 74 20 6f 66 | 20 74 68 65 20 4e 43 52 |ndent of| the NCR|
|00001a00| 20 64 72 69 76 65 72 2e | 0d 20 2a 09 09 09 09 09 | driver.|. *.....|
|00001a10| a5 ca 53 77 69 74 63 68 | 65 64 20 74 6f 20 61 20 |..Switch|ed to a |
|00001a20| 64 69 66 66 65 72 65 6e | 74 20 4e 43 52 20 63 61 |differen|t NCR ca|
|00001a30| 72 64 2e 20 54 68 69 73 | 20 68 61 73 20 69 64 20 |rd. This| has id |
|00001a40| 22 70 63 69 31 30 30 30 | 2c 34 22 0d 20 2a 09 09 |"pci1000|,4". *..|
|00001a50| 09 09 09 61 6e 64 20 61 | 20 64 69 66 66 65 72 65 |...and a| differe|
|00001a60| 6e 74 20 43 54 45 53 54 | 33 20 76 61 6c 75 65 2e |nt CTEST|3 value.|
|00001a70| 20 49 74 20 64 69 66 66 | 65 72 73 20 66 72 6f 6d | It diff|ers from|
|00001a80| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 0d 20 2a | the ori|ginal. *|
|00001a90| 09 09 09 09 09 63 61 72 | 64 20 69 6e 20 74 68 61 |.....car|d in tha|
|00001aa0| 74 20 69 74 20 69 73 20 | 38 2d 62 69 74 20 6f 6e |t it is |8-bit on|
|00001ab0| 6c 79 20 28 6e 6f 20 77 | 69 64 65 2c 20 6e 6f 20 |ly (no w|ide, no |
|00001ac0| 66 61 73 74 29 2e 20 49 | 74 27 73 0d 20 2a 09 09 |fast). I|t's. *..|
|00001ad0| 09 09 09 61 6c 73 6f 20 | 71 75 69 74 65 20 61 20 |...also |quite a |
|00001ae0| 62 69 74 20 63 68 65 61 | 70 65 72 2e 0d 20 2a 09 |bit chea|per.. *.|
|00001af0| 09 09 09 09 a5 ca 54 68 | 65 20 6d 65 6d 6f 72 79 |......Th|e memory|
|00001b00| 20 6c 65 61 6b 20 70 72 | 6f 62 6c 65 6d 20 6d 61 | leak pr|oblem ma|
|00001b10| 79 20 62 65 20 69 6e 20 | 73 6f 6d 65 20 6f 74 68 |y be in |some oth|
|00001b20| 65 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2c 0d |er appli|cation,.|
|00001b30| 20 2a 09 09 09 09 09 49 | 74 20 64 6f 65 73 6e 27 | *.....I|t doesn'|
|00001b40| 74 20 73 65 65 6d 20 74 | 6f 20 61 70 70 65 61 72 |t seem t|o appear|
|00001b50| 20 69 6e 20 6d 79 20 6c | 61 74 65 73 74 20 74 65 | in my l|atest te|
|00001b60| 73 74 69 6e 67 2e 0d 20 | 2a 09 09 09 09 09 a5 ca |sting.. |*.......|
|00001b70| 52 61 6e 64 6f 6d 6c 79 | 20 28 61 66 74 65 72 20 |Randomly| (after |
|00001b80| 61 20 66 65 77 20 74 68 | 6f 75 73 61 6e 64 20 74 |a few th|ousand t|
|00001b90| 72 69 61 6c 73 29 2c 20 | 74 68 65 20 77 61 74 63 |rials), |the watc|
|00001ba0| 68 64 6f 67 0d 20 2a 09 | 09 09 09 09 74 69 6d 65 |hdog. *.|....time|
|00001bb0| 72 20 66 69 72 65 73 20 | 69 6d 6d 65 64 69 61 74 |r fires |immediat|
|00001bc0| 65 6c 79 2c 20 72 61 74 | 68 65 72 20 74 68 61 6e |ely, rat|her than|
|00001bd0| 20 61 66 74 65 72 20 74 | 68 65 20 61 63 74 75 61 | after t|he actua|
|00001be0| 6c 0d 20 2a 09 09 09 09 | 09 74 69 6d 65 20 28 32 |l. *....|.time (2|
|00001bf0| 20 73 65 63 6f 6e 64 73 | 20 69 6e 20 74 68 65 20 | seconds| in the |
|00001c00| 74 65 73 74 20 70 72 6f | 67 72 61 6d 29 2e 20 49 |test pro|gram). I|
|00001c10| 6e 20 72 65 76 69 65 77 | 69 6e 67 20 74 68 65 20 |n review|ing the |
|00001c20| 63 6f 64 65 2c 0d 20 2a | 09 09 09 09 09 74 68 65 |code,. *|.....the|
|00001c30| 72 65 20 61 70 70 65 61 | 72 73 20 74 6f 20 62 65 |re appea|rs to be|
|00001c40| 20 61 20 70 6f 74 65 6e | 74 69 61 6c 20 72 61 63 | a poten|tial rac|
|00001c50| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 20 69 6e 20 74 |e condit|ion in t|
|00001c60| 68 65 20 73 65 71 75 65 | 6e 63 65 3a 0d 20 2a 09 |he seque|nce:. *.|
|00001c70| 09 09 09 09 53 74 61 72 | 74 20 77 61 74 63 68 64 |....Star|t watchd|
|00001c80| 6f 67 20 74 69 6d 65 72 | 20 74 68 65 6e 20 73 74 |og timer| then st|
|00001c90| 61 72 74 20 49 2f 2e 4f | 2c 20 69 66 20 74 68 69 |art I/.O|, if thi|
|00001ca0| 73 20 69 73 20 65 78 65 | 63 75 74 65 64 0d 20 2a |s is exe|cuted. *|
|00001cb0| 09 09 09 09 09 66 72 6f | 6d 20 22 74 61 73 6b 22 |.....fro|m "task"|
|00001cc0| 20 6c 65 76 65 6c 2e 20 | 54 6f 20 70 72 65 76 65 | level. |To preve|
|00001cd0| 6e 74 20 74 68 69 73 2c | 20 49 20 6d 6f 76 65 64 |nt this,| I moved|
|00001ce0| 20 61 6c 6c 20 49 2f 4f | 20 73 74 61 72 74 0d 20 | all I/O| start. |
|00001cf0| 2a 09 09 09 09 09 74 6f | 20 74 68 65 20 73 65 63 |*.....to| the sec|
|00001d00| 6f 6e 64 61 72 79 20 69 | 6e 74 65 72 72 75 70 74 |ondary i|nterrupt|
|00001d10| 20 74 61 73 6b 2c 20 77 | 68 65 72 65 20 69 74 20 | task, w|here it |
|00001d20| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e |should h|ave been|
|00001d30| 0d 20 2a 09 09 09 09 09 | 61 6c 6c 20 61 6c 6f 6e |. *.....|all alon|
|00001d40| 67 2e 0d 20 2a 09 09 09 | 09 09 a5 ca 53 65 74 49 |g.. *...|....SetI|
|00001d50| 6e 74 65 72 72 75 70 74 | 54 69 6d 65 72 20 72 65 |nterrupt|Timer re|
|00001d60| 71 75 69 72 65 73 20 61 | 6e 20 69 6e 74 65 72 76 |quires a|n interv|
|00001d70| 61 6c 2c 20 72 61 74 68 | 65 72 20 74 68 61 6e 20 |al, rath|er than |
|00001d80| 61 6e 20 65 78 74 61 63 | 74 0d 20 2a 09 09 09 09 |an extac|t. *....|
|00001d90| 09 66 69 6e 69 73 68 20 | 74 69 6d 65 2e 20 54 68 |.finish |time. Th|
|00001da0| 69 73 20 77 69 6c 6c 20 | 62 65 20 66 69 78 65 64 |is will |be fixed|
|00001db0| 20 69 6e 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 | in the |document|
|00001dc0| 61 74 69 6f 6e 2e 0d 20 | 2a 09 09 09 09 09 a5 ca |ation.. |*.......|
|00001dd0| 41 6e 20 22 65 6e 67 69 | 6e 65 65 72 69 6e 67 20 |An "engi|neering |
|00001de0| 62 75 69 6c 64 22 20 6f | 66 20 74 68 65 20 52 4f |build" o|f the RO|
|00001df0| 4d 53 20 6d 61 79 20 68 | 61 76 65 20 66 69 78 65 |MS may h|ave fixe|
|00001e00| 64 20 74 68 65 0d 20 2a | 09 09 09 09 09 53 65 74 |d the. *|.....Set|
|00001e10| 49 6e 74 65 72 72 75 70 | 74 54 69 6d 65 72 20 70 |Interrup|tTimer p|
|00001e20| 72 6f 62 6c 65 6d 2e 20 | 54 69 6d 65 20 77 69 6c |roblem. |Time wil|
|00001e30| 6c 20 74 65 6c 6c 2e 0d | 20 2a 09 09 09 09 09 a5 |l tell..| *......|
|00001e40| ca 43 68 69 70 20 69 6e | 69 74 69 61 6c 69 7a 61 |.Chip in|itializa|
|00001e50| 74 69 6f 6e 20 77 61 73 | 20 63 68 61 6e 67 65 64 |tion was| changed|
|00001e60| 20 74 6f 20 75 73 65 20 | 61 20 72 65 61 64 2f 6d | to use |a read/m|
|00001e70| 6f 64 69 66 79 2f 77 72 | 69 74 65 0d 20 2a 09 09 |odify/wr|ite. *..|
|00001e80| 09 09 09 73 65 71 75 65 | 6e 63 65 20 74 6f 20 70 |...seque|nce to p|
|00001e90| 72 65 73 65 72 76 65 20 | 74 68 65 20 62 69 74 73 |reserve |the bits|
|00001ea0| 20 74 68 61 74 20 77 65 | 72 65 20 73 65 74 20 62 | that we|re set b|
|00001eb0| 79 20 74 68 65 20 45 78 | 70 61 6e 73 69 6f 6e 0d |y the Ex|pansion.|
|00001ec0| 20 2a 09 09 09 09 09 4d | 61 6e 61 67 65 72 2e 0d | *.....M|anager..|
|00001ed0| 20 2a 09 09 09 09 09 a5 | ca 54 68 65 20 41 38 20 | *......|.The A8 |
|00001ee0| 52 4f 4d 53 20 72 65 71 | 75 69 72 65 20 74 68 61 |ROMS req|uire tha|
|00001ef0| 74 20 53 65 6e 64 53 6f | 66 74 77 61 72 65 49 6e |t SendSo|ftwareIn|
|00001f00| 74 65 72 72 75 70 74 20 | 62 65 20 72 75 6e 0d 20 |terrupt |be run. |
|00001f10| 2a 09 09 09 09 09 66 72 | 6f 6d 20 74 68 65 20 53 |*.....fr|om the S|
|00001f20| 65 63 6f 6e 64 61 72 79 | 20 49 6e 74 65 72 72 75 |econdary| Interru|
|00001f30| 70 74 20 48 61 6e 64 6c | 65 72 2e 0d 20 2a 09 09 |pt Handl|er.. *..|
|00001f40| 09 09 09 a5 ca 54 68 65 | 72 65 20 69 73 20 61 20 |.....The|re is a |
|00001f50| 6d 69 6e 6f 72 20 62 75 | 67 20 69 6e 20 74 68 65 |minor bu|g in the|
|00001f60| 20 53 65 6e 64 53 6f 66 | 74 77 61 72 65 49 6e 74 | SendSof|twareInt|
|00001f70| 65 72 72 75 70 74 20 73 | 65 71 75 65 6e 63 65 3a |errupt s|equence:|
|00001f80| 0d 20 2a 09 09 09 09 09 | 43 61 6e 63 65 6c 54 69 |. *.....|CancelTi|
|00001f90| 6d 65 72 20 73 68 6f 75 | 6c 64 20 72 65 63 6f 72 |mer shou|ld recor|
|00001fa0| 64 20 74 68 65 20 61 6d | 6f 75 6e 74 20 6f 66 20 |d the am|ount of |
|00001fb0| 74 69 6d 65 20 72 65 6d | 61 69 6e 69 6e 67 20 73 |time rem|aining s|
|00001fc0| 6f 20 74 68 61 74 0d 20 | 2a 09 09 09 09 09 61 20 |o that. |*.....a |
|00001fd0| 73 75 62 73 65 71 75 65 | 6e 74 20 74 69 6d 65 72 |subseque|nt timer|
|00001fe0| 20 72 65 73 74 61 72 74 | 20 64 6f 65 73 20 6e 6f | restart| does no|
|00001ff0| 74 20 72 65 73 65 74 20 | 74 68 65 20 77 61 74 63 |t reset |the watc|
|00002000| 68 64 6f 67 20 74 6f 20 | 69 74 73 0d 20 2a 09 09 |hdog to |its. *..|
|00002010| 09 09 09 6f 72 69 67 69 | 6e 61 6c 20 76 61 6c 75 |...origi|nal valu|
|00002020| 65 2e 0d 20 2a 20 31 39 | 39 35 2e 30 33 2e 32 39 |e.. * 19|95.03.29|
|00002030| 09 09 a5 ca 53 74 69 6c | 6c 20 63 68 61 73 69 6e |....Stil|l chasin|
|00002040| 67 20 74 69 6d 65 72 20 | 61 6e 64 20 69 6e 74 65 |g timer |and inte|
|00002050| 72 72 75 70 74 20 70 72 | 6f 62 6c 65 6d 73 2e 0d |rrupt pr|oblems..|
|00002060| 20 2a 09 09 09 09 09 a5 | 20 52 65 73 74 6f 72 65 | *......| Restore|
|00002070| 64 20 53 65 74 49 6e 74 | 65 72 72 75 70 74 54 69 |d SetInt|erruptTi|
|00002080| 6d 65 72 27 73 20 64 6f | 63 75 6d 65 6e 74 65 64 |mer's do|cumented|
|00002090| 20 62 65 68 61 76 69 6f | 72 20 28 74 69 6d 65 72 | behavio|r (timer|
|000020a0| 0d 20 2a 09 09 09 09 09 | 66 69 72 65 73 20 61 74 |. *.....|fires at|
|000020b0| 20 61 6e 20 65 70 6f 63 | 68 2c 20 6e 6f 74 20 61 | an epoc|h, not a|
|000020c0| 66 74 65 72 20 61 6e 20 | 69 6e 74 65 72 76 61 6c |fter an |interval|
|000020d0| 2e 0d 20 2a 09 09 09 09 | 09 a5 ca 42 65 66 6f 72 |.. *....|...Befor|
|000020e0| 65 20 72 65 2d 63 61 6c | 6c 69 6e 67 20 66 6f 72 |e re-cal|ling for|
|000020f0| 20 70 61 72 74 69 61 6c | 20 70 72 65 70 61 72 61 | partial| prepara|
|00002100| 74 69 6f 6e 2c 20 77 65 | 20 6d 75 73 74 20 75 70 |tion, we| must up|
|00002110| 64 61 74 65 0d 20 2a 09 | 09 09 09 09 74 68 65 20 |date. *.|....the |
|00002120| 49 4f 54 61 62 6c 65 27 | 73 20 66 69 72 73 74 50 |IOTable'|s firstP|
|00002130| 72 65 70 61 72 65 64 2e | 0d 20 2a 09 09 09 09 09 |repared.|. *.....|
|00002140| a5 ca 54 68 65 20 53 65 | 63 6f 6e 64 61 72 79 20 |..The Se|condary |
|00002150| 49 6e 74 65 72 72 75 70 | 74 20 68 61 6e 64 6c 65 |Interrup|t handle|
|00002160| 72 20 77 61 73 20 63 6f | 6e 66 75 73 69 6e 67 20 |r was co|nfusing |
|00002170| 61 64 6d 69 6e 69 73 74 | 72 61 74 69 6f 6e 0d 20 |administ|ration. |
|00002180| 2a 09 09 09 09 09 73 74 | 61 74 75 73 20 28 66 72 |*.....st|atus (fr|
|00002190| 6f 6d 20 43 68 65 63 6b | 70 6f 69 6e 74 49 4f 2c |om Check|pointIO,|
|000021a0| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 29 2c 20 77 | for exa|mple), w|
|000021b0| 69 74 68 20 74 68 65 20 | 69 6f 52 65 73 75 6c 74 |ith the |ioResult|
|000021c0| 20 76 61 6c 75 65 0d 20 | 2a 09 09 09 09 09 74 68 | value. |*.....th|
|000021d0| 61 74 20 73 68 6f 75 6c | 64 20 62 65 20 70 61 73 |at shoul|d be pas|
|000021e0| 73 65 64 20 62 61 63 6b | 20 74 6f 20 6d 65 20 63 |sed back| to me c|
|000021f0| 61 6c 6c 65 72 2e 20 48 | 65 6e 63 65 2c 20 22 73 |aller. H|ence, "s|
|00002200| 65 6c 65 63 74 69 6f 6e | 20 74 69 6d 65 6f 75 74 |election| timeout|
|00002210| 22 0d 20 2a 09 09 09 09 | 09 77 61 73 20 72 65 74 |". *....|.was ret|
|00002220| 75 72 6e 69 6e 67 20 22 | 43 68 65 63 6b 20 43 6f |urning "|Check Co|
|00002230| 6e 64 69 74 69 6f 6e 22 | 20 73 74 61 74 75 73 2e |ndition"| status.|
|00002240| 0d 20 2a 09 09 09 09 09 | a5 ca 55 73 65 20 74 68 |. *.....|..Use th|
|00002250| 65 20 64 72 69 76 65 72 | 20 72 65 66 4e 75 6d 20 |e driver| refNum |
|00002260| 28 63 6f 6e 76 65 72 74 | 65 64 20 74 6f 20 61 6e |(convert|ed to an|
|00002270| 20 4f 53 54 79 70 65 29 | 20 61 73 20 74 68 65 20 | OSType)| as the |
|00002280| 64 65 66 61 75 6c 74 0d | 20 2a 09 09 09 09 09 6c |default.| *.....l|
|00002290| 6f 67 20 65 6e 74 72 79 | 20 69 64 65 6e 74 69 66 |og entry| identif|
|000022a0| 69 65 72 2e 0d 20 2a 20 | 31 39 39 35 2e 30 34 2e |ier.. * |1995.04.|
|000022b0| 30 34 09 09 a5 ca 41 64 | 64 65 64 20 61 20 27 73 |04....Ad|ded a 's|
|000022c0| 79 73 7a 27 20 72 65 73 | 6f 75 72 63 65 20 28 31 |ysz' res|ource (1|
|000022d0| 20 4d 62 79 74 65 29 20 | 74 6f 20 77 6f 72 6b 20 | Mbyte) |to work |
|000022e0| 61 72 6f 75 6e 64 20 61 | 20 70 72 6f 62 6c 65 6d |around a| problem|
|000022f0| 0d 20 2a 09 09 09 09 09 | 77 68 65 6e 20 6c 6f 67 |. *.....|when log|
|00002300| 67 69 6e 67 20 69 73 20 | 65 6e 61 62 6c 65 64 3a |ging is |enabled:|
|00002310| 20 69 66 20 74 68 72 65 | 65 20 64 65 76 69 63 65 | if thre|e device|
|00002320| 73 20 61 72 65 20 69 6e | 73 74 61 6c 6c 65 64 2c |s are in|stalled,|
|00002330| 20 6f 6e 6c 79 20 6f 6e | 65 0d 20 2a 09 09 09 09 | only on|e. *....|
|00002340| 09 6f 72 20 74 77 6f 20 | 61 63 74 75 61 6c 6c 79 |.or two |actually|
|00002350| 20 67 65 74 20 61 63 74 | 69 76 61 74 65 64 2e 20 | get act|ivated. |
|00002360| 41 6c 73 6f 2c 20 64 65 | 76 69 63 65 20 74 65 73 |Also, de|vice tes|
|00002370| 74 69 6e 67 20 73 65 65 | 6d 73 20 74 6f 0d 20 2a |ting see|ms to. *|
|00002380| 09 09 09 09 09 68 61 6e | 67 20 69 6e 20 73 74 72 |.....han|g in str|
|00002390| 61 6e 67 65 20 77 61 79 | 73 2e 20 54 68 69 73 20 |ange way|s. This |
|000023a0| 77 61 73 20 6e 6f 74 20 | 73 65 65 6e 20 77 69 74 |was not |seen wit|
|000023b0| 68 20 74 68 65 20 6e 6f | 6e 2d 6c 6f 67 67 69 6e |h the no|n-loggin|
|000023c0| 67 0d 20 2a 09 09 09 09 | 09 76 65 72 73 69 6f 6e |g. *....|.version|
|000023d0| 2e 20 54 68 65 20 76 61 | 6c 75 65 20 6d 61 79 20 |. The va|lue may |
|000023e0| 62 65 20 69 6e 63 6f 72 | 72 65 63 74 2e 20 54 68 |be incor|rect. Th|
|000023f0| 69 73 20 77 6f 72 6b 65 | 64 20 66 69 6e 65 2e 20 |is worke|d fine. |
|00002400| 53 77 69 74 63 68 69 6e | 67 0d 20 2a 09 09 09 09 |Switchin|g. *....|
|00002410| 09 74 6f 20 32 35 36 20 | 4b 62 79 74 65 73 20 2d |.to 256 |Kbytes -|
|00002420| 2d 20 73 74 69 6c 6c 20 | 77 6f 72 6b 69 6e 67 20 |- still |working |
|00002430| 72 65 61 73 6f 6e 61 62 | 6c 79 20 77 65 6c 6c 2e |reasonab|ly well.|
|00002440| 0d 20 2a 20 31 39 39 35 | 2e 30 34 2e 30 35 09 09 |. * 1995|.04.05..|
|00002450| a5 ca 44 65 62 75 67 67 | 65 64 20 6d 65 6d 6f 72 |..Debugg|ed memor|
|00002460| 79 20 6d 6f 76 65 20 74 | 65 73 74 2e 20 45 76 65 |y move t|est. Eve|
|00002470| 72 79 74 68 69 6e 67 20 | 6c 6f 6f 6b 73 20 63 6f |rything |looks co|
|00002480| 72 72 65 63 74 2c 20 62 | 75 74 20 74 68 65 0d 20 |rrect, b|ut the. |
|00002490| 2a 09 09 09 09 09 73 63 | 72 69 70 74 20 64 6f 65 |*.....sc|ript doe|
|000024a0| 73 6e 27 74 20 77 6f 72 | 6b 2e 20 49 20 6e 6f 74 |sn't wor|k. I not|
|000024b0| 69 63 65 64 20 74 68 61 | 74 20 74 68 65 20 61 63 |iced tha|t the ac|
|000024c0| 74 75 61 6c 20 73 63 72 | 69 70 74 20 69 73 20 6e |tual scr|ipt is n|
|000024d0| 6f 74 0d 20 2a 09 09 09 | 09 09 33 32 2d 62 69 74 |ot. *...|..32-bit|
|000024e0| 20 61 6c 69 67 6e 65 64 | 2e 20 41 64 64 65 64 20 | aligned|. Added |
|000024f0| 23 70 72 61 67 6d 61 20 | 6f 70 74 69 6f 6e 73 20 |#pragma |options |
|00002500| 61 6c 69 67 6e 3d 70 6f | 77 65 72 20 74 6f 20 74 |align=po|wer to t|
|00002510| 68 65 20 68 65 61 64 65 | 72 73 0d 20 2a 09 09 09 |he heade|rs. *...|
|00002520| 09 09 74 6f 20 66 6f 72 | 63 65 20 74 68 65 20 6d |..to for|ce the m|
|00002530| 65 6d 6f 72 79 20 6d 6f | 76 65 20 73 63 72 69 70 |emory mo|ve scrip|
|00002540| 74 20 74 6f 20 62 65 20 | 33 32 2d 62 69 74 20 61 |t to be |32-bit a|
|00002550| 6c 69 67 6e 65 64 2e 20 | 49 66 20 74 68 69 73 0d |ligned. |If this.|
|00002560| 20 2a 09 09 09 09 09 66 | 61 69 6c 73 2c 20 49 27 | *.....f|ails, I'|
|00002570| 6c 6c 20 61 64 64 20 61 | 20 70 61 64 64 69 6e 67 |ll add a| padding|
|00002580| 20 68 61 6c 66 77 6f 72 | 64 2e 20 59 75 70 2c 20 | halfwor|d. Yup, |
|00002590| 74 68 61 74 20 64 69 64 | 20 69 74 2e 20 55 6e 66 |that did| it. Unf|
|000025a0| 6f 72 74 75 6e 61 74 65 | 6c 79 2c 0d 20 2a 09 09 |ortunate|ly,. *..|
|000025b0| 09 09 09 74 68 69 73 20 | 6d 65 61 6e 73 20 74 68 |...this |means th|
|000025c0| 61 74 20 61 6c 6c 20 70 | 72 6f 67 72 61 6d 73 20 |at all p|rograms |
|000025d0| 75 73 69 6e 67 20 74 68 | 65 20 4e 43 52 20 64 72 |using th|e NCR dr|
|000025e0| 69 76 65 72 20 6d 75 73 | 74 20 62 65 0d 20 2a 09 |iver mus|t be. *.|
|000025f0| 09 09 09 09 72 65 63 6f | 6d 70 69 6c 65 64 2e 20 |....reco|mpiled. |
|00002600| 4f 6e 65 20 6d 6f 72 65 | 20 62 75 67 20 72 65 71 |One more| bug req|
|00002610| 75 69 72 65 64 20 61 20 | 73 6c 69 67 68 74 6c 79 |uired a |slightly|
|00002620| 20 6d 6f 72 65 20 63 6f | 6d 70 6c 65 78 0d 20 2a | more co|mplex. *|
|00002630| 09 09 09 09 09 63 6f 6e | 74 72 6f 6c 20 66 6c 6f |.....con|trol flo|
|00002640| 77 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 53 65 |w throug|h the Se|
|00002650| 63 6f 6e 64 61 72 79 20 | 49 6e 74 65 72 72 75 70 |condary |Interrup|
|00002660| 74 20 72 6f 75 74 69 6e | 65 2c 20 77 68 69 63 68 |t routin|e, which|
|00002670| 20 69 73 0d 20 2a 09 09 | 09 09 09 73 74 61 72 74 | is. *..|...start|
|00002680| 69 6e 67 20 74 6f 20 6c | 6f 6f 6b 20 61 20 62 69 |ing to l|ook a bi|
|00002690| 74 20 6d 65 73 73 79 2e | 20 52 65 6d 6f 76 69 6e |t messy.| Removin|
|000026a0| 67 20 28 77 69 74 68 20 | 61 6e 20 65 64 69 74 6f |g (with |an edito|
|000026b0| 72 29 20 61 6c 6c 0d 20 | 2a 09 09 09 09 09 6f 66 |r) all. |*.....of|
|000026c0| 20 74 68 65 20 74 65 73 | 74 20 61 6e 64 20 64 65 | the tes|t and de|
|000026d0| 62 75 67 20 6a 75 6e 6b | 20 77 6f 75 6c 64 20 70 |bug junk| would p|
|000026e0| 72 6f 62 61 62 6c 79 20 | 6d 61 6b 65 20 69 74 20 |robably |make it |
|000026f0| 6c 6f 6f 6b 20 62 65 74 | 74 65 72 2e 0d 20 2a 09 |look bet|ter.. *.|
|00002700| 09 09 09 09 a5 ca 52 65 | 76 69 73 65 64 20 47 65 |......Re|vised Ge|
|00002710| 74 44 65 76 69 63 65 4c | 6f 67 69 63 61 6c 41 64 |tDeviceL|ogicalAd|
|00002720| 64 72 65 73 73 20 74 6f | 20 75 73 65 20 74 68 65 |dress to| use the|
|00002730| 20 73 74 72 75 63 74 75 | 72 65 20 69 6e 20 50 43 | structu|re in PC|
|00002740| 49 2e 68 20 2d 2d 0d 20 | 2a 09 09 09 09 09 6e 6f |I.h --. |*.....no|
|00002750| 20 73 75 62 73 74 61 6e | 74 69 76 65 20 63 68 61 | substan|tive cha|
|00002760| 6e 67 65 73 2e 0d 20 2a | 09 09 09 09 09 a5 ca 53 |nges.. *|.......S|
|00002770| 6f 6d 65 20 63 6f 6d 70 | 69 6c 65 72 73 20 61 72 |ome comp|ilers ar|
|00002780| 65 20 72 75 6d 6f 72 65 | 64 20 74 6f 20 68 61 6e |e rumore|d to han|
|00002790| 64 6c 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 72 65 |dle func|tions re|
|000027a0| 74 75 72 6e 69 6e 67 0d | 20 2a 09 09 09 09 09 73 |turning.| *.....s|
|000027b0| 74 72 75 63 74 75 72 65 | 73 20 69 6e 63 6f 72 72 |tructure|s incorr|
|000027c0| 65 63 74 6c 79 2e 20 53 | 74 6f 72 65 20 55 70 54 |ectly. S|tore UpT|
|000027d0| 69 6d 65 20 69 6e 20 61 | 20 76 6f 6c 61 74 69 6c |ime in a| volatil|
|000027e0| 65 20 6c 6f 63 61 6c 20 | 76 61 72 69 61 62 6c 65 |e local |variable|
|000027f0| 0d 20 2a 09 09 09 09 09 | 69 66 20 69 74 20 69 73 |. *.....|if it is|
|00002800| 20 74 6f 20 62 65 20 75 | 73 65 64 20 69 6e 20 61 | to be u|sed in a|
|00002810| 20 66 75 6e 63 74 69 6f | 6e 20 63 61 6c 6c 2e 0d | functio|n call..|
|00002820| 20 2a 09 09 09 09 09 a5 | ca 41 64 64 65 64 20 61 | *......|.Added a|
|00002830| 20 66 75 6e 63 74 69 6f | 6e 20 74 6f 20 77 72 69 | functio|n to wri|
|00002840| 74 65 20 61 20 6d 65 73 | 73 61 67 65 20 69 6e 74 |te a mes|sage int|
|00002850| 6f 20 74 68 65 20 72 65 | 67 69 73 74 72 79 20 69 |o the re|gistry i|
|00002860| 66 0d 20 2a 09 09 09 09 | 09 74 68 65 20 69 6e 69 |f. *....|.the ini|
|00002870| 74 69 61 6c 69 7a 61 74 | 69 6f 6e 20 73 65 71 75 |tializat|ion sequ|
|00002880| 65 6e 63 65 20 66 61 69 | 6c 65 64 2e 20 49 74 20 |ence fai|led. It |
|00002890| 73 65 65 6d 73 20 74 68 | 61 74 20 49 20 6d 69 67 |seems th|at I mig|
|000028a0| 68 74 20 68 61 76 65 0d | 20 2a 09 09 09 09 09 68 |ht have.| *.....h|
|000028b0| 61 64 20 61 20 74 69 6e | 79 20 65 72 72 6f 72 20 |ad a tin|y error |
|000028c0| 69 6e 20 74 68 65 20 72 | 65 76 69 73 65 64 20 47 |in the r|evised G|
|000028d0| 65 74 44 65 76 69 63 65 | 4c 6f 67 69 63 61 6c 41 |etDevice|LogicalA|
|000028e0| 64 64 72 65 73 73 2e 0d | 20 2a 20 31 39 39 35 2e |ddress..| * 1995.|
|000028f0| 30 34 2e 31 31 09 09 a5 | ca 54 68 65 20 64 72 69 |04.11...|.The dri|
|00002900| 76 65 72 20 64 6f 65 73 | 6e 27 74 20 77 6f 72 6b |ver does|n't work|
|00002910| 20 77 69 74 68 20 56 4d | 20 6f 6e 20 2d 2d 20 74 | with VM| on -- t|
|00002920| 68 65 20 73 63 72 69 70 | 74 20 69 73 20 6e 6f 74 |he scrip|t is not|
|00002930| 20 61 6c 77 61 79 73 0d | 20 2a 09 09 09 09 09 69 | always.| *.....i|
|00002940| 6e 20 70 68 79 73 69 63 | 61 6c 6c 79 2d 63 6f 6e |n physic|ally-con|
|00002950| 74 69 67 75 6f 75 73 20 | 6d 65 6d 6f 72 79 2e 20 |tiguous |memory. |
|00002960| 43 6f 70 79 20 74 68 65 | 20 73 63 72 69 70 74 20 |Copy the| script |
|00002970| 74 6f 20 61 6e 20 61 6c | 6c 6f 63 61 74 65 64 0d |to an al|located.|
|00002980| 20 2a 09 09 09 09 09 62 | 75 66 66 65 72 2e 0d 20 | *.....b|uffer.. |
|00002990| 2a 20 31 39 39 35 2e 30 | 34 2e 31 32 09 09 a5 ca |* 1995.0|4.12....|
|000029a0| 41 64 64 65 64 20 6c 6f | 67 67 69 6e 67 20 74 6f |Added lo|gging to|
|000029b0| 20 74 68 65 20 43 68 65 | 63 6b 46 6f 72 43 6f 6e | the Che|ckForCon|
|000029c0| 74 69 67 75 6f 75 73 50 | 68 79 73 69 63 61 6c 4d |tiguousP|hysicalM|
|000029d0| 61 70 70 69 6e 67 20 66 | 75 6e 63 74 69 6f 6e 2e |apping f|unction.|
|000029e0| 0d 20 2a 09 09 09 09 09 | 42 75 67 20 61 6c 65 72 |. *.....|Bug aler|
|000029f0| 74 3a 20 74 68 65 20 6d | 65 6d 6f 72 79 20 74 65 |t: the m|emory te|
|00002a00| 73 74 20 68 61 6e 67 73 | 20 69 66 20 6d 65 6d 6f |st hangs| if memo|
|00002a10| 72 79 20 69 73 20 6e 6f | 74 20 63 6f 6e 74 69 67 |ry is no|t contig|
|00002a20| 75 6f 75 73 2e 0d 20 2a | 20 31 39 39 35 2e 30 36 |uous.. *| 1995.06|
|00002a30| 2e 32 38 09 09 43 68 65 | 63 6b 70 6f 69 6e 74 20 |.28..Che|ckpoint |
|00002a40| 74 68 65 20 49 2f 4f 20 | 62 75 66 66 65 72 20 62 |the I/O |buffer b|
|00002a50| 65 66 6f 72 65 20 63 6f | 6e 74 69 6e 75 69 6e 67 |efore co|ntinuing|
|00002a60| 20 70 61 72 74 69 61 6c | 20 70 72 65 70 61 72 61 | partial| prepara|
|00002a70| 74 69 6f 6e 2e 0d 20 2a | 09 09 09 09 09 52 65 70 |tion.. *|.....Rep|
|00002a80| 6c 61 63 65 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |lace the| origina|
|00002a90| 6c 20 70 72 65 70 61 72 | 61 74 69 6f 6e 20 63 6f |l prepar|ation co|
|00002aa0| 64 65 20 62 79 20 74 68 | 65 20 44 4d 41 20 73 75 |de by th|e DMA su|
|00002ab0| 70 70 6f 72 74 20 6c 69 | 62 72 61 72 79 2e 0d 20 |pport li|brary.. |
|00002ac0| 2a 09 09 09 09 09 57 69 | 74 68 20 6c 75 63 6b 2c |*.....Wi|th luck,|
|00002ad0| 20 74 68 69 73 20 77 69 | 6c 6c 20 73 6f 6c 76 65 | this wi|ll solve|
|00002ae0| 20 74 68 65 20 6f 76 65 | 72 61 6c 6c 20 70 61 72 | the ove|rall par|
|00002af0| 74 69 61 6c 20 70 72 65 | 70 61 72 61 74 69 6f 6e |tial pre|paration|
|00002b00| 20 61 6e 64 0d 20 2a 09 | 09 09 09 09 76 69 72 74 | and. *.|....virt|
|00002b10| 75 61 6c 20 6d 65 6d 6f | 72 79 20 70 72 6f 62 6c |ual memo|ry probl|
|00002b20| 65 6d 73 2e 0d 20 2a 0d | 20 2a 20 50 72 65 70 61 |ems.. *.| * Prepa|
|00002b30| 72 69 6e 67 20 4d 65 6d | 6f 72 79 0d 20 2a 09 09 |ring Mem|ory. *..|
|00002b40| 54 68 65 72 65 20 61 72 | 65 20 74 68 72 65 65 20 |There ar|e three |
|00002b50| 61 63 74 69 76 65 20 6d | 61 70 70 69 6e 67 20 74 |active m|apping t|
|00002b60| 61 62 6c 65 73 3b 20 6f | 6e 65 20 66 6f 72 20 74 |ables; o|ne for t|
|00002b70| 68 65 20 73 63 72 69 70 | 74 2c 20 6f 6e 65 20 66 |he scrip|t, one f|
|00002b80| 6f 72 20 74 68 65 0d 20 | 2a 09 09 70 65 72 2d 72 |or the. |*..per-r|
|00002b90| 65 71 75 65 73 74 20 64 | 61 74 61 20 28 69 6e 63 |equest d|ata (inc|
|00002ba0| 6c 75 64 69 6e 67 20 64 | 61 74 61 20 73 68 61 72 |luding d|ata shar|
|00002bb0| 65 64 20 77 69 74 68 20 | 74 68 65 20 4e 43 52 20 |ed with |the NCR |
|00002bc0| 63 68 69 70 29 2c 20 61 | 6e 64 20 6f 6e 65 20 66 |chip), a|nd one f|
|00002bd0| 6f 72 20 74 68 65 0d 20 | 2a 09 09 75 73 65 72 27 |or the. |*..user'|
|00002be0| 73 20 49 2f 4f 20 72 65 | 71 75 65 73 74 2e 20 54 |s I/O re|quest. T|
|00002bf0| 68 65 79 20 61 72 65 20 | 61 6c 6c 6f 63 61 74 65 |hey are |allocate|
|00002c00| 64 20 61 73 20 66 6f 6c | 6c 6f 77 73 3a 0d 20 2a |d as fol|lows:. *|
|00002c10| 09 09 53 63 72 69 70 74 | 3a 09 09 57 68 65 6e 20 |..Script|:..When |
|00002c20| 74 68 65 20 64 72 69 76 | 65 72 20 69 73 20 6f 70 |the driv|er is op|
|00002c30| 65 6e 65 64 2c 20 74 68 | 65 20 73 63 72 69 70 74 |ened, th|e script|
|00002c40| 20 69 73 20 22 70 72 65 | 70 61 72 65 64 22 20 61 | is "pre|pared" a|
|00002c50| 6e 64 20 61 0d 20 2a 09 | 09 09 09 09 70 68 79 73 |nd a. *.|....phys|
|00002c60| 69 63 61 6c 20 6d 61 70 | 70 69 6e 67 20 74 61 62 |ical map|ping tab|
|00002c70| 6c 65 20 61 6c 6c 6f 63 | 61 74 65 64 2e 20 41 6c |le alloc|ated. Al|
|00002c80| 73 6f 2c 20 61 20 70 68 | 79 73 69 63 61 6c 20 6d |so, a ph|ysical m|
|00002c90| 61 70 70 69 6e 67 20 74 | 61 62 6c 65 0d 20 2a 09 |apping t|able. *.|
|00002ca0| 09 09 09 09 77 69 6c 6c | 20 61 6c 6c 6f 63 61 74 |....will| allocat|
|00002cb0| 65 64 20 66 6f 72 20 75 | 73 65 72 20 49 2f 4f 20 |ed for u|ser I/O |
|00002cc0| 72 65 71 75 65 73 74 73 | 2e 20 54 68 69 73 20 75 |requests|. This u|
|00002cd0| 73 65 73 20 61 20 6d 61 | 78 69 6d 75 6d 20 74 72 |ses a ma|ximum tr|
|00002ce0| 61 6e 73 66 65 72 0d 20 | 2a 09 09 09 09 09 63 6f |ansfer. |*.....co|
|00002cf0| 75 6e 74 20 70 61 72 61 | 6d 65 74 65 72 20 74 68 |unt para|meter th|
|00002d00| 61 74 20 69 73 20 63 75 | 72 72 65 6e 74 6c 79 20 |at is cu|rrently |
|00002d10| 63 6f 6d 70 69 6c 65 64 | 20 69 6e 2c 20 62 75 74 |compiled| in, but|
|00002d20| 20 63 6f 75 6c 64 20 65 | 61 73 69 6c 79 0d 20 2a | could e|asily. *|
|00002d30| 09 09 09 09 09 62 65 20 | 73 74 6f 72 65 64 20 69 |.....be |stored i|
|00002d40| 6e 20 74 68 65 20 4e 61 | 6d 65 20 52 65 67 69 73 |n the Na|me Regis|
|00002d50| 74 72 79 2e 20 54 68 69 | 73 20 64 61 74 61 20 69 |try. Thi|s data i|
|00002d60| 73 20 72 65 6c 65 61 73 | 65 64 20 77 68 65 6e 20 |s releas|ed when |
|00002d70| 74 68 65 0d 20 2a 09 09 | 09 09 09 64 72 69 76 65 |the. *..|...drive|
|00002d80| 72 20 69 73 20 63 6c 6f | 73 65 64 2e 0d 20 2a 09 |r is clo|sed.. *.|
|00002d90| 09 50 65 72 52 65 71 75 | 65 73 74 3a 09 4f 6e 65 |.PerRequ|est:.One|
|00002da0| 20 6f 66 20 74 68 65 73 | 65 20 77 69 6c 6c 20 62 | of thes|e will b|
|00002db0| 65 20 61 6c 6c 6f 63 61 | 74 65 64 20 77 68 65 6e |e alloca|ted when|
|00002dc0| 20 74 68 65 20 64 72 69 | 76 65 72 20 69 73 20 6f | the dri|ver is o|
|00002dd0| 70 65 6e 65 64 2e 20 41 | 20 66 75 74 75 72 65 0d |pened. A| future.|
|00002de0| 20 2a 09 09 09 09 09 6d | 6f 64 69 66 69 63 61 74 | *.....m|odificat|
|00002df0| 69 6f 6e 20 77 6f 75 6c | 64 20 61 6c 6c 6f 63 61 |ion woul|d alloca|
|00002e00| 74 65 20 73 6f 6d 65 20 | 6c 61 72 67 65 72 20 6e |te some |larger n|
|00002e10| 75 6d 62 65 72 20 74 6f | 20 73 75 70 70 6f 72 74 |umber to| support|
|00002e20| 20 66 75 6c 6c 79 2d 0d | 20 2a 09 09 09 09 09 63 | fully-.| *.....c|
|00002e30| 6f 6e 63 75 72 72 65 6e | 74 20 49 2f 4f 20 72 65 |oncurren|t I/O re|
|00002e40| 71 75 65 73 74 73 20 28 | 69 2e 65 2e 20 74 6f 20 |quests (|i.e. to |
|00002e50| 73 75 70 70 6f 72 74 20 | 64 69 73 63 6f 6e 6e 65 |support |disconne|
|00002e60| 63 74 2f 72 65 73 65 6c | 65 63 74 29 2e 0d 20 2a |ct/resel|ect).. *|
|00002e70| 09 09 09 09 09 54 68 69 | 73 20 74 61 62 6c 65 20 |.....Thi|s table |
|00002e80| 69 73 20 72 65 6c 65 61 | 73 65 64 20 77 68 65 6e |is relea|sed when|
|00002e90| 20 74 68 65 20 64 72 69 | 76 65 72 20 69 73 20 63 | the dri|ver is c|
|00002ea0| 6c 6f 73 65 64 2e 0d 20 | 2a 09 09 55 73 65 72 3a |losed.. |*..User:|
|00002eb0| 20 09 09 54 68 65 20 75 | 73 65 72 20 74 61 62 6c | ..The u|ser tabl|
|00002ec0| 65 20 69 73 20 62 75 69 | 6c 74 20 69 6e 74 6f 20 |e is bui|lt into |
|00002ed0| 74 68 65 20 50 65 72 52 | 65 71 75 65 73 74 20 72 |the PerR|equest r|
|00002ee0| 65 63 6f 72 64 2e 20 49 | 74 20 77 69 6c 6c 20 62 |ecord. I|t will b|
|00002ef0| 65 0d 20 2a 09 09 09 09 | 09 69 6e 69 74 69 61 6c |e. *....|.initial|
|00002f00| 69 7a 65 64 20 61 6e 64 | 20 63 68 65 63 6b 70 6f |ized and| checkpo|
|00002f10| 69 6e 74 65 64 20 6f 6e | 20 65 61 63 68 20 49 2f |inted on| each I/|
|00002f20| 4f 20 72 65 71 75 65 73 | 74 2e 20 54 68 69 73 20 |O reques|t. This |
|00002f30| 77 69 6c 6c 20 6e 6f 74 | 0d 20 2a 09 09 09 09 09 |will not|. *.....|
|00002f40| 61 6c 6c 6f 63 61 74 65 | 20 6f 72 20 72 65 6c 65 |allocate| or rele|
|00002f50| 61 73 65 20 6d 65 6d 6f | 72 79 2e 0d 20 2a 0d 20 |ase memo|ry.. *. |
|00002f60| 2a 20 4d 69 73 66 65 61 | 74 75 72 65 73 0d 20 2a |* Misfea|tures. *|
|00002f70| 09 09 54 68 65 20 4e 43 | 52 20 53 63 72 69 70 74 |..The NC|R Script|
|00002f80| 20 64 65 73 69 67 6e 20 | 64 6f 65 73 20 6e 6f 74 | design |does not|
|00002f90| 20 70 65 72 6d 69 74 20 | 63 6f 6e 63 75 72 72 65 | permit |concurre|
|00002fa0| 6e 74 20 49 2f 4f 20 6f | 70 65 72 61 74 69 6f 6e |nt I/O o|peration|
|00002fb0| 73 2c 20 77 68 69 63 68 | 20 69 73 0d 20 2a 09 09 |s, which| is. *..|
|00002fc0| 6e 6f 74 20 73 75 66 66 | 69 63 69 65 6e 74 20 66 |not suff|icient f|
|00002fd0| 6f 72 20 61 20 53 43 53 | 49 20 64 65 76 69 63 65 |or a SCS|I device|
|00002fe0| 2e 0d 20 2a 0d 20 2a 20 | 4f 70 65 6e 20 62 75 67 |.. *. * |Open bug|
|00002ff0| 73 0d 20 2a 20 a5 a5 a5 | 20 54 68 65 72 65 20 69 |s. * ...| There i|
|00003000| 73 20 61 20 70 72 6f 62 | 6c 65 6d 20 69 6e 20 6d |s a prob|lem in m|
|00003010| 79 20 75 6e 64 65 72 73 | 74 61 6e 64 69 6e 67 20 |y unders|tanding |
|00003020| 6f 66 20 74 68 65 20 4e | 43 52 20 63 68 69 70 20 |of the N|CR chip |
|00003030| 74 68 61 74 20 70 72 65 | 76 65 6e 74 73 20 4b 69 |that pre|vents Ki|
|00003040| 6c 6c 49 4f 0d 20 2a 09 | 09 66 72 6f 6d 20 77 6f |llIO. *.|.from wo|
|00003050| 72 6b 69 6e 67 20 77 65 | 6c 6c 2e 20 49 74 20 64 |rking we|ll. It d|
|00003060| 6f 65 73 20 77 6f 72 6b | 2c 20 68 6f 77 65 76 65 |oes work|, howeve|
|00003070| 72 2c 20 62 75 74 20 73 | 6f 6d 65 74 69 6d 65 73 |r, but s|ometimes|
|00003080| 20 6c 65 61 76 65 73 20 | 74 68 65 20 62 75 73 20 | leaves |the bus |
|00003090| 62 75 73 79 2e 0d 20 2a | 2f 0d 2f 2a 09 2e 5f 5f |busy.. *|/./*..__|
|000030a0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000030b0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000030c0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000030d0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000030e0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000030f0| 5f 2e 0d 20 20 09 7c 20 | 44 6f 44 72 69 76 65 72 |_.. .| |DoDriver|
|00003100| 49 4f 2c 20 61 66 74 65 | 72 20 6d 6f 64 69 66 69 |IO, afte|r modifi|
|00003110| 63 61 74 69 6f 6e 2c 20 | 77 69 6c 6c 20 62 65 20 |cation, |will be |
|00003120| 75 73 65 66 75 6c 20 66 | 6f 72 20 6f 74 68 65 72 |useful f|or other|
|00003130| 20 64 72 69 76 65 72 73 | 2e 20 49 74 20 73 68 6f | drivers|. It sho|
|00003140| 77 73 20 74 68 65 09 7c | 0d 20 20 09 7c 20 6f 76 |ws the.||. .| ov|
|00003150| 65 72 61 6c 6c 20 73 74 | 72 75 63 74 75 72 65 20 |erall st|ructure |
|00003160| 6f 66 20 74 68 65 20 64 | 72 69 76 65 72 20 22 74 |of the d|river "t|
|00003170| 6f 70 2d 6c 65 76 65 6c | 2c 22 20 63 61 6c 6c 69 |op-level|," calli|
|00003180| 6e 67 20 68 61 6e 64 6c | 65 72 20 66 75 6e 63 74 |ng handl|er funct|
|00003190| 69 6f 6e 73 20 66 6f 72 | 20 65 61 63 68 09 7c 0d |ions for| each.|.|
|000031a0| 09 7c 20 64 72 69 76 65 | 72 20 6f 70 65 72 61 74 |.| drive|r operat|
|000031b0| 69 6f 6e 2e 20 59 6f 75 | 20 77 69 6c 6c 20 68 61 |ion. You| will ha|
|000031c0| 76 65 20 74 6f 20 72 65 | 70 6c 61 63 65 20 6d 75 |ve to re|place mu|
|000031d0| 63 68 20 6f 66 20 74 68 | 65 20 61 63 74 75 61 6c |ch of th|e actual|
|000031e0| 20 64 72 69 76 65 72 20 | 6f 70 65 72 61 74 69 6f | driver |operatio|
|000031f0| 6e 09 7c 0d 09 7c 20 77 | 69 74 68 20 63 6f 64 65 |n.|..| w|ith code|
|00003200| 20 73 70 65 63 69 66 69 | 63 20 74 6f 20 79 6f 75 | specifi|c to you|
|00003210| 72 20 70 61 72 74 69 63 | 75 6c 61 72 20 70 75 72 |r partic|ular pur|
|00003220| 70 6f 73 65 2c 20 62 75 | 74 20 74 68 65 20 67 65 |pose, bu|t the ge|
|00003230| 6e 65 72 61 6c 20 73 74 | 72 75 63 74 75 72 65 20 |neral st|ructure |
|00003240| 73 68 6f 75 6c 64 09 7c | 0d 09 7c 20 72 65 6d 61 |should.||..| rema|
|00003250| 69 6e 20 74 68 65 20 73 | 61 6d 65 2e 09 09 09 09 |in the s|ame.....|
|00003260| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 7c 0d 09 |........|.....|..|
|00003270| 7c 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 ||.......|........|
|00003280| 09 09 09 09 09 09 7c 0d | 20 20 09 7c 20 54 68 65 |......|.| .| The|
|00003290| 73 65 20 72 6f 75 74 69 | 6e 65 73 2c 20 61 66 74 |se routi|nes, aft|
|000032a0| 65 72 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 2c |er modif|ication,|
|000032b0| 20 77 69 6c 6c 20 62 65 | 20 75 73 65 66 75 6c 20 | will be| useful |
|000032c0| 66 6f 72 20 6f 74 68 65 | 72 20 64 72 69 76 65 72 |for othe|r driver|
|000032d0| 73 2e 09 09 09 09 7c 0d | 09 7c 09 44 72 69 76 65 |s.....|.|.|.Drive|
|000032e0| 72 44 6f 44 72 69 76 65 | 72 49 4f 09 09 44 72 69 |rDoDrive|rIO..Dri|
|000032f0| 76 65 72 20 6d 61 69 6e | 6c 69 6e 65 2e 20 43 61 |ver main|line. Ca|
|00003300| 6c 6c 73 20 68 61 72 64 | 77 61 72 65 20 73 70 65 |lls hard|ware spe|
|00003310| 63 69 66 69 63 20 72 6f | 75 74 69 6e 65 73 09 09 |cific ro|utines..|
|00003320| 7c 0d 09 7c 09 09 09 09 | 09 09 09 6f 72 20 6f 70 ||..|....|...or op|
|00003330| 65 72 61 74 69 6f 6e 2d | 73 70 65 63 69 66 69 63 |eration-|specific|
|00003340| 20 66 75 6e 63 74 69 6f | 6e 73 20 61 73 20 6e 65 | functio|ns as ne|
|00003350| 63 65 73 73 61 72 79 2e | 09 09 09 7c 0d 09 7c 09 |cessary.|...|..|.|
|00003360| 4e 61 6d 65 52 65 67 69 | 73 74 72 79 55 74 69 6c |NameRegi|stryUtil|
|00003370| 69 74 69 65 73 09 53 74 | 6f 72 65 20 61 6e 64 20 |ities.St|ore and |
|00003380| 72 65 74 72 69 65 76 65 | 20 69 6e 66 6f 72 6d 61 |retrieve| informa|
|00003390| 74 69 6f 6e 20 66 72 6f | 6d 20 74 68 65 20 4e 61 |tion fro|m the Na|
|000033a0| 6d 65 20 52 65 67 69 73 | 74 65 72 79 09 7c 0d 09 |me Regis|tery.|..|
|000033b0| 7c 09 44 72 69 76 65 72 | 50 43 49 42 75 73 55 74 ||.Driver|PCIBusUt|
|000033c0| 69 6c 69 74 69 65 73 09 | 55 74 69 6c 69 74 69 65 |ilities.|Utilitie|
|000033d0| 73 20 74 6f 20 72 65 61 | 64 20 61 6e 64 20 77 72 |s to rea|d and wr|
|000033e0| 69 74 65 20 64 61 74 61 | 20 6f 6e 20 74 68 65 20 |ite data| on the |
|000033f0| 50 43 49 20 62 75 73 2e | 20 54 68 65 72 65 09 7c |PCI bus.| There.||
|00003400| 0d 09 7c 09 09 09 09 09 | 09 09 61 72 65 20 66 75 |..|.....|..are fu|
|00003410| 6e 63 74 69 6f 6e 73 20 | 66 6f 72 20 74 68 65 20 |nctions |for the |
|00003420| 43 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 72 65 |Configur|ation re|
|00003430| 67 69 73 74 65 72 73 2c | 20 61 6e 64 20 66 6f 72 |gisters,| and for|
|00003440| 09 7c 0d 09 7c 09 09 09 | 09 09 09 09 62 6f 74 68 |.|..|...|....both|
|00003450| 20 45 78 70 61 6e 73 69 | 6f 6e 20 4d 61 6e 61 67 | Expansi|on Manag|
|00003460| 65 72 20 61 6e 64 20 64 | 69 72 65 63 74 20 6d 65 |er and d|irect me|
|00003470| 6d 6f 72 79 20 61 63 63 | 65 73 73 20 74 6f 09 09 |mory acc|ess to..|
|00003480| 7c 0d 09 7c 09 09 09 09 | 09 09 09 63 68 69 70 20 ||..|....|...chip |
|00003490| 72 65 67 69 73 74 65 72 | 73 2e 09 09 09 09 09 09 |register|s.......|
|000034a0| 09 09 09 09 09 7c 0d 09 | 7c 20 09 44 72 69 76 65 |.....|..|| .Drive|
|000034b0| 72 44 65 62 75 67 53 75 | 70 70 6f 72 74 09 09 53 |rDebugSu|pport..S|
|000034c0| 6f 6d 65 20 76 65 72 79 | 20 63 72 75 64 65 20 72 |ome very| crude r|
|000034d0| 6f 75 74 69 6e 65 73 20 | 66 6f 72 20 64 65 62 75 |outines |for debu|
|000034e0| 67 67 69 6e 67 2e 09 09 | 09 09 09 7c 0d 09 7c 09 |gging...|...|..|.|
|000034f0| 44 72 69 76 65 72 47 65 | 73 74 61 6c 74 48 61 6e |DriverGe|staltHan|
|00003500| 64 6c 65 72 09 50 72 6f | 63 65 73 73 20 74 68 65 |dler.Pro|cess the|
|00003510| 20 50 42 53 74 61 74 75 | 73 20 64 72 69 76 65 72 | PBStatu|s driver|
|00003520| 20 67 65 73 74 61 6c 74 | 20 72 65 71 75 65 73 74 | gestalt| request|
|00003530| 09 09 09 09 7c 0d 09 7c | 09 09 09 09 09 09 09 09 |....|..||........|
|00003540| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 7c 0d 09 |........|.....|..|
|00003550| 7c 20 54 68 65 73 65 20 | 72 6f 75 74 69 6e 65 73 || These |routines|
|00003560| 20 61 72 65 20 73 70 65 | 63 69 66 69 63 20 74 6f | are spe|cific to|
|00003570| 20 74 68 65 20 4e 43 52 | 20 53 43 53 49 20 69 6e | the NCR| SCSI in|
|00003580| 74 65 72 66 61 63 65 2e | 20 59 6f 75 20 77 69 6c |terface.| You wil|
|00003590| 6c 20 62 65 20 61 62 6c | 65 20 74 6f 20 62 6f 72 |l be abl|e to bor|
|000035a0| 72 6f 77 09 7c 0d 09 7c | 20 63 6f 64 65 20 66 72 |row.|..|| code fr|
|000035b0| 6f 6d 20 74 68 65 6d 2c | 20 62 75 74 20 77 69 6c |om them,| but wil|
|000035c0| 6c 20 70 72 6f 62 61 62 | 6c 79 20 72 65 77 72 69 |l probab|ly rewri|
|000035d0| 74 65 20 74 68 65 73 65 | 20 66 72 6f 6d 20 73 63 |te these| from sc|
|000035e0| 72 61 74 63 68 20 66 6f | 72 20 79 6f 75 72 20 64 |ratch fo|r your d|
|000035f0| 72 69 76 65 72 27 73 09 | 7c 0d 09 7c 20 73 70 65 |river's.||..| spe|
|00003600| 63 69 66 69 63 20 6e 65 | 65 64 73 2e 09 09 09 09 |cific ne|eds.....|
|00003610| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 7c 0d 09 |........|.....|..|
|00003620| 7c 09 4e 43 52 43 68 69 | 70 4d 61 6e 61 67 65 72 ||.NCRChi|pManager|
|00003630| 09 09 09 55 74 69 6c 69 | 74 69 65 73 20 74 6f 20 |...Utili|ties to |
|00003640| 73 65 74 20 76 61 6c 75 | 65 73 20 69 6e 20 74 68 |set valu|es in th|
|00003650| 65 20 4e 43 52 20 63 68 | 69 70 2e 20 54 68 69 73 |e NCR ch|ip. This|
|00003660| 20 73 68 6f 77 73 20 68 | 6f 77 09 7c 0d 09 7c 09 | shows h|ow.|..|.|
|00003670| 09 09 09 09 09 09 74 6f | 20 75 73 65 20 74 68 65 |......to| use the|
|00003680| 20 45 78 70 61 6e 73 69 | 6f 6e 20 4d 61 6e 61 67 | Expansi|on Manag|
|00003690| 65 72 20 72 6f 75 74 69 | 6e 65 73 20 74 6f 20 72 |er routi|nes to r|
|000036a0| 65 61 64 20 61 6e 64 20 | 77 72 69 74 65 09 7c 0d |ead and |write.|.|
|000036b0| 09 7c 09 09 09 09 09 09 | 09 64 65 76 69 63 65 20 |.|......|.device |
|000036c0| 72 65 67 69 73 74 65 72 | 73 2e 09 09 09 09 09 09 |register|s.......|
|000036d0| 09 09 09 09 7c 0d 09 7c | 09 4e 43 52 53 74 61 72 |....|..||.NCRStar|
|000036e0| 74 53 63 72 69 70 74 09 | 09 09 50 72 65 70 61 72 |tScript.|..Prepar|
|000036f0| 65 20 74 6f 20 65 78 65 | 63 75 74 65 20 61 20 53 |e to exe|cute a S|
|00003700| 43 53 49 20 62 75 73 20 | 6f 70 65 72 61 74 69 6f |CSI bus |operatio|
|00003710| 6e 2e 09 09 09 09 7c 0d | 09 7c 09 4e 43 52 52 75 |n.....|.|.|.NCRRu|
|00003720| 6e 53 63 72 69 70 74 09 | 09 09 45 78 65 63 75 74 |nScript.|..Execut|
|00003730| 65 20 61 20 53 43 53 49 | 20 62 75 73 20 6f 70 65 |e a SCSI| bus ope|
|00003740| 72 61 74 69 6f 6e 2e 20 | 54 68 69 73 20 66 69 6c |ration. |This fil|
|00003750| 65 20 69 6e 63 6c 75 64 | 65 73 20 74 68 65 09 7c |e includ|es the.||
|00003760| 0d 09 7c 09 09 09 09 09 | 09 09 69 6e 74 65 72 72 |..|.....|..interr|
|00003770| 75 70 74 20 73 65 72 76 | 69 63 65 20 72 6f 75 74 |upt serv|ice rout|
|00003780| 69 6e 65 2e 09 09 09 09 | 09 09 09 09 7c 0d 09 7c |ine.....|....|..||
|00003790| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|000037a0| 09 09 09 09 09 7c 0d 09 | 7c 20 54 68 65 72 65 20 |.....|..|| There |
|000037b0| 69 73 20 61 20 6c 6f 74 | 20 6f 66 20 64 65 62 75 |is a lot| of debu|
|000037c0| 67 67 69 6e 67 20 63 6f | 64 65 20 69 6e 20 74 68 |gging co|de in th|
|000037d0| 69 73 20 64 72 69 76 65 | 72 2e 20 4d 79 20 70 72 |is drive|r. My pr|
|000037e0| 6f 67 72 61 6d 6d 69 6e | 67 20 61 70 70 72 6f 61 |ogrammin|g approa|
|000037f0| 63 68 20 69 73 20 74 6f | 09 7c 0d 09 7c 20 6c 65 |ch is to|.|..| le|
|00003800| 61 76 65 20 64 65 62 75 | 67 67 69 6e 67 20 63 6f |ave debu|gging co|
|00003810| 64 65 20 69 6e 20 74 68 | 65 20 73 6f 75 72 63 65 |de in th|e source|
|00003820| 20 66 69 6c 65 73 2c 20 | 62 75 74 20 72 65 6d 6f | files, |but remo|
|00003830| 76 65 20 69 74 20 61 75 | 74 6f 6d 61 74 69 63 61 |ve it au|tomatica|
|00003840| 6c 6c 79 20 28 62 79 09 | 09 09 7c 0d 09 7c 20 23 |lly (by.|..|..| #|
|00003850| 69 66 64 65 66 27 73 29 | 20 66 72 6f 6d 20 73 68 |ifdef's)| from sh|
|00003860| 69 70 70 69 6e 67 20 76 | 65 72 73 69 6f 6e 73 2e |ipping v|ersions.|
|00003870| 20 54 68 69 73 20 69 73 | 20 65 73 70 65 63 69 61 | This is| especia|
|00003880| 6c 6c 79 20 69 6d 70 6f | 72 74 61 6e 74 20 66 6f |lly impo|rtant fo|
|00003890| 72 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 09 7c |r asynch|ronous.||
|000038a0| 0d 09 7c 20 64 65 76 69 | 63 65 20 64 72 69 76 65 |..| devi|ce drive|
|000038b0| 72 73 2c 20 61 73 20 74 | 68 65 79 20 61 72 65 20 |rs, as t|hey are |
|000038c0| 69 6e 63 6f 6d 70 61 74 | 69 62 6c 65 20 77 69 74 |incompat|ible wit|
|000038d0| 68 20 69 6e 74 65 72 61 | 63 74 69 76 65 20 64 65 |h intera|ctive de|
|000038e0| 62 75 67 67 69 6e 67 2e | 09 09 09 09 7c 0d 09 2e |bugging.|....|...|
|000038f0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003900| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003910| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003920| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003930| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003940| 5f 5f 5f 2e 0d 2a 2f 0d | 0d 0d 2f 2a 20 44 72 69 |___..*/.|../* Dri|
|00003950| 76 65 72 44 6f 44 72 69 | 76 65 72 49 4f 20 69 73 |verDoDri|verIO is|
|00003960| 20 61 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 | a devic|e driver|
|00003970| 20 66 72 61 6d 65 77 6f | 72 6b 20 74 68 61 74 20 | framewo|rk that |
|00003980| 6f 70 65 72 61 74 65 73 | 20 75 73 69 6e 67 20 74 |operates| using t|
|00003990| 68 65 20 6e 65 77 20 64 | 72 69 76 65 72 0d 20 2a |he new d|river. *|
|000039a0| 20 61 72 63 68 69 74 65 | 63 74 75 72 65 2e 0d 20 | archite|cture.. |
|000039b0| 2a 0d 20 2a 20 54 68 65 | 20 66 6f 6c 6c 6f 77 69 |*. * The| followi|
|000039c0| 6e 67 20 6f 76 65 72 61 | 6c 6c 20 63 6f 64 65 2d |ng overa|ll code-|
|000039d0| 66 6c 6f 77 20 70 61 74 | 68 73 20 61 72 65 20 70 |flow pat|hs are p|
|000039e0| 6f 73 73 69 62 6c 65 3a | 0d 20 2a 09 09 49 6d 6d |ossible:|. *..Imm|
|000039f0| 65 64 69 61 74 65 20 43 | 6f 6d 6d 61 6e 64 73 3a |ediate C|ommands:|
|00003a00| 0d 20 2a 09 09 09 50 72 | 6f 63 65 73 73 20 63 6f |. *...Pr|ocess co|
|00003a10| 6d 6d 61 6e 64 2e 20 52 | 65 74 75 72 6e 20 61 6e |mmand. R|eturn an|
|00003a20| 20 65 72 72 6f 72 20 69 | 66 20 74 68 65 20 72 65 | error i|f the re|
|00003a30| 71 75 65 73 74 20 6d 61 | 79 20 73 74 61 6c 6c 20 |quest ma|y stall |
|00003a40| 28 62 75 74 20 64 6f 0d | 20 2a 09 09 09 09 6e 6f |(but do.| *....no|
|00003a50| 74 20 65 78 65 63 75 74 | 65 20 6f 72 20 6f 74 68 |t execut|e or oth|
|00003a60| 65 72 77 69 73 65 20 64 | 65 6c 61 79 20 74 68 65 |erwise d|elay the|
|00003a70| 20 72 65 71 75 65 73 74 | 29 2e 0d 20 2a 09 09 09 | request|).. *...|
|00003a80| 52 65 74 75 72 6e 20 74 | 68 65 20 66 69 6e 61 6c |Return t|he final|
|00003a90| 20 49 2f 4f 20 72 65 71 | 75 65 73 74 20 73 74 61 | I/O req|uest sta|
|00003aa0| 74 75 73 20 74 6f 20 74 | 68 65 20 63 61 6c 6c 65 |tus to t|he calle|
|00003ab0| 72 2e 0d 20 2a 09 09 4f | 74 68 65 72 20 63 6f 6d |r.. *..O|ther com|
|00003ac0| 6d 61 6e 64 73 3a 0d 20 | 2a 09 09 09 50 72 6f 63 |mands:. |*...Proc|
|00003ad0| 65 73 73 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 2e |ess the |command.|
|00003ae0| 0d 20 2a 09 09 09 09 49 | 66 20 69 74 20 69 73 20 |. *....I|f it is |
|00003af0| 63 6f 6d 70 6c 65 74 65 | 20 28 73 75 63 63 65 73 |complete| (succes|
|00003b00| 73 20 6f 72 20 66 61 69 | 6c 75 72 65 29 20 77 69 |s or fai|lure) wi|
|00003b10| 74 68 6f 75 74 20 61 6e | 79 20 64 65 6c 61 79 2c |thout an|y delay,|
|00003b20| 20 63 61 6c 6c 0d 20 2a | 09 09 09 09 09 49 4f 43 | call. *|.....IOC|
|00003b30| 6f 6d 6d 61 6e 64 49 73 | 43 6f 6d 70 6c 65 74 65 |ommandIs|Complete|
|00003b40| 28 2e 2e 2e 29 20 74 6f | 20 72 65 74 75 72 6e 20 |(...) to| return |
|00003b50| 61 20 72 65 73 75 6c 74 | 20 74 6f 20 74 68 65 20 |a result| to the |
|00003b60| 63 61 6c 6c 65 72 0d 20 | 2a 09 09 09 09 09 61 6e |caller. |*.....an|
|00003b70| 64 20 72 65 74 75 72 6e | 20 6e 6f 45 72 72 20 74 |d return| noErr t|
|00003b80| 6f 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |o the De|vice Man|
|00003b90| 61 67 65 72 2e 0d 20 2a | 09 09 09 09 49 66 20 69 |ager.. *|....If i|
|00003ba0| 74 20 72 65 71 75 69 72 | 65 73 20 61 6e 20 61 73 |t requir|es an as|
|00003bb0| 79 6e 63 68 72 6f 6e 6f | 75 73 20 6f 70 65 72 61 |ynchrono|us opera|
|00003bc0| 74 69 6f 6e 2c 20 73 74 | 61 72 74 20 74 68 65 20 |tion, st|art the |
|00003bd0| 6f 70 65 72 61 74 69 6f | 6e 20 61 6e 64 0d 20 2a |operatio|n and. *|
|00003be0| 09 09 09 09 09 72 65 74 | 75 72 6e 20 6e 6f 45 72 |.....ret|urn noEr|
|00003bf0| 72 20 74 6f 20 74 68 65 | 20 44 65 76 69 63 65 20 |r to the| Device |
|00003c00| 4d 61 6e 61 67 65 72 2e | 20 57 68 65 6e 20 74 68 |Manager.| When th|
|00003c10| 65 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 0d 20 |e asynch|ronous. |
|00003c20| 2a 09 09 09 09 09 6f 70 | 65 72 61 74 69 6f 6e 20 |*.....op|eration |
|00003c30| 63 6f 6d 70 6c 65 74 65 | 73 2c 20 69 74 20 77 69 |complete|s, it wi|
|00003c40| 6c 6c 20 63 61 6c 6c 20 | 49 4f 43 6f 6d 6d 61 6e |ll call |IOComman|
|00003c50| 64 49 73 43 6f 6d 70 6c | 65 74 65 2e 0d 20 2a 0d |dIsCompl|ete.. *.|
|00003c60| 20 2a 20 42 75 69 6c 64 | 20 69 6e 73 74 72 75 63 | * Build| instruc|
|00003c70| 74 69 6f 6e 73 20 28 4d | 65 74 72 6f 57 65 72 6b |tions (M|etroWerk|
|00003c80| 73 20 50 50 43 29 0d 20 | 2a 09 09 50 72 6f 63 65 |s PPC). |*..Proce|
|00003c90| 73 73 6f 72 0d 20 2a 09 | 09 09 52 65 61 64 6f 6e |ssor. *.|..Readon|
|00003ca0| 6c 79 20 73 74 72 69 6e | 67 73 09 09 09 63 68 65 |ly strin|gs...che|
|00003cb0| 63 6b 65 64 0d 20 2a 09 | 09 4c 69 6e 6b 65 72 0d |cked. *.|.Linker.|
|00003cc0| 20 2a 09 09 09 49 6e 69 | 74 69 61 6c 69 7a 61 74 | *...Ini|tializat|
|00003cd0| 69 6f 6e 09 09 09 09 43 | 46 4d 49 6e 69 74 69 61 |ion....C|FMInitia|
|00003ce0| 6c 69 7a 65 0d 20 2a 09 | 09 09 4d 61 69 6e 09 09 |lize. *.|..Main..|
|00003cf0| 09 09 09 09 44 6f 44 72 | 69 76 65 72 49 4f 0d 20 |....DoDr|iverIO. |
|00003d00| 2a 09 09 09 54 65 72 6d | 69 6e 61 74 69 6f 6e 09 |*...Term|ination.|
|00003d10| 09 09 09 09 43 46 4d 54 | 65 72 6d 69 6e 61 74 65 |....CFMT|erminate|
|00003d20| 0d 20 2a 09 09 50 45 46 | 0d 20 2a 09 09 09 45 78 |. *..PEF|. *...Ex|
|00003d30| 70 6f 72 74 20 53 79 6d | 62 6f 6c 73 09 09 09 09 |port Sym|bols....|
|00003d40| 55 73 65 20 2e 65 78 70 | 20 66 69 6c 65 20 74 6f |Use .exp| file to|
|00003d50| 20 65 78 70 6f 72 74 20 | 74 68 65 20 66 6f 6c 6c | export |the foll|
|00003d60| 6f 77 69 6e 67 20 67 6c | 6f 62 61 6c 73 0d 20 2a |owing gl|obals. *|
|00003d70| 09 09 09 09 09 09 09 09 | 09 09 09 54 68 65 44 72 |........|...TheDr|
|00003d80| 69 76 65 72 44 65 73 63 | 72 69 70 74 69 6f 6e 0d |iverDesc|ription.|
|00003d90| 20 2a 09 09 09 09 09 09 | 09 09 09 09 09 44 6f 44 | *......|.....DoD|
|00003da0| 72 69 76 65 72 49 4f 0d | 20 2a 09 09 09 45 78 70 |riverIO.| *...Exp|
|00003db0| 61 6e 64 20 75 6e 69 6e | 69 74 69 61 6c 69 7a 65 |and unin|itialize|
|00003dc0| 64 20 64 61 74 61 09 63 | 68 65 63 6b 65 64 0d 20 |d data.c|hecked. |
|00003dd0| 2a 09 09 50 72 6f 6a 65 | 63 74 0d 20 2a 09 09 09 |*..Proje|ct. *...|
|00003de0| 50 72 6f 6a 65 63 74 20 | 54 79 70 65 09 09 09 09 |Project |Type....|
|00003df0| 53 68 61 72 65 64 20 4c | 69 62 72 61 72 79 0d 20 |Shared L|ibrary. |
|00003e00| 2a 09 09 09 46 69 6c 65 | 20 4e 61 6d 65 09 09 09 |*...File| Name...|
|00003e10| 09 09 4e 43 52 44 72 69 | 76 65 72 0d 20 2a 09 09 |..NCRDri|ver. *..|
|00003e20| 09 46 69 6c 65 20 43 72 | 65 61 74 6f 72 09 09 09 |.File Cr|eator...|
|00003e30| 09 50 53 53 44 09 2d 2d | 20 4f 75 72 20 72 65 67 |.PSSD.--| Our reg|
|00003e40| 69 73 74 65 72 65 64 20 | 63 72 65 61 74 6f 72 20 |istered |creator |
|00003e50| 74 79 70 65 0d 20 2a 09 | 09 09 46 69 6c 65 20 54 |type. *.|..File T|
|00003e60| 79 70 65 09 09 09 09 09 | 73 68 6c 62 0d 20 2a 2f |ype.....|shlb. */|
|00003e70| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 22 4e 43 52 44 |..#inclu|de "NCRD|
|00003e80| 72 69 76 65 72 50 72 69 | 76 61 74 65 2e 68 22 0d |riverPri|vate.h".|
|00003e90| 0d 2f 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |./* * * |* * * * |
|00003ea0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003eb0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003ec0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003ed0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00003ee0| 2a 20 2a 20 2a 20 2a 0d | 20 2a 20 57 65 20 6d 75 |* * * *.| * We mu|
|00003ef0| 73 74 20 65 78 70 6f 72 | 74 20 61 20 67 6c 6f 62 |st expor|t a glob|
|00003f00| 61 6c 20 44 72 69 76 65 | 72 44 65 73 63 72 69 70 |al Drive|rDescrip|
|00003f10| 74 69 6f 6e 20 72 65 63 | 6f 72 64 20 74 68 61 74 |tion rec|ord that|
|00003f20| 20 74 68 65 20 6e 65 77 | 20 44 65 76 69 63 65 20 | the new| Device |
|00003f30| 4d 61 6e 61 67 65 72 0d | 20 2a 20 77 69 6c 6c 20 |Manager.| * will |
|00003f40| 75 73 65 20 74 6f 20 63 | 6f 6e 66 69 67 75 72 65 |use to c|onfigure|
|00003f50| 20 61 6e 64 20 69 6e 73 | 74 61 6e 74 69 61 74 65 | and ins|tantiate|
|00003f60| 20 6f 75 72 20 64 72 69 | 76 65 72 2e 0d 20 2a 2f | our dri|ver.. */|
|00003f70| 0d 2f 2a 0d 20 2a 20 54 | 68 65 72 65 20 69 73 20 |./*. * T|here is |
|00003f80| 61 20 62 75 67 20 69 6e | 20 73 6f 6d 65 20 76 65 |a bug in| some ve|
|00003f90| 72 73 69 6f 6e 73 20 6f | 66 20 74 68 65 20 4d 50 |rsions o|f the MP|
|00003fa0| 57 20 50 50 43 43 20 63 | 6f 6d 70 69 6c 65 72 20 |W PPCC c|ompiler |
|00003fb0| 74 68 61 74 20 63 61 75 | 73 65 20 61 6e 20 65 72 |that cau|se an er|
|00003fc0| 72 6f 72 20 69 66 20 79 | 6f 75 0d 20 2a 20 74 72 |ror if y|ou. * tr|
|00003fd0| 79 20 74 6f 20 65 78 70 | 61 6e 64 20 66 75 6c 6c |y to exp|and full|
|00003fe0| 79 2d 62 72 61 63 6b 65 | 74 65 64 20 73 74 72 75 |y-bracke|ted stru|
|00003ff0| 63 74 75 72 65 73 20 2d | 2d 20 74 68 69 73 20 73 |ctures -|- this s|
|00004000| 74 72 75 63 74 75 72 65 | 20 69 73 20 63 6f 6e 73 |tructure| is cons|
|00004010| 74 72 75 63 74 65 64 20 | 66 72 6f 6d 0d 20 2a 20 |tructed |from. * |
|00004020| 73 65 76 65 72 61 6c 20 | 6f 74 68 65 72 20 73 74 |several |other st|
|00004030| 72 75 63 74 75 72 65 73 | 2e 0d 20 2a 2f 0d 44 72 |ructures|.. */.Dr|
|00004040| 69 76 65 72 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |iverDesc|ription |
|00004050| 54 68 65 44 72 69 76 65 | 72 44 65 73 63 72 69 70 |TheDrive|rDescrip|
|00004060| 74 69 6f 6e 20 3d 20 7b | 0d 09 2f 2a 0d 09 20 2a |tion = {|../*.. *|
|00004070| 20 53 69 67 6e 61 74 75 | 72 65 20 69 6e 66 6f 0d | Signatu|re info.|
|00004080| 09 20 2a 2f 0d 09 6b 54 | 68 65 44 65 73 63 72 69 |. */..kT|heDescri|
|00004090| 70 74 69 6f 6e 53 69 67 | 6e 61 74 75 72 65 2c 09 |ptionSig|nature,.|
|000040a0| 09 09 09 2f 2a 20 4f 53 | 54 79 70 65 20 64 72 69 |.../* OS|Type dri|
|000040b0| 76 65 72 44 65 73 63 53 | 69 67 6e 61 74 75 72 65 |verDescS|ignature|
|000040c0| 09 09 09 2a 2f 0d 09 6b | 49 6e 69 74 69 61 6c 44 |...*/..k|InitialD|
|000040d0| 72 69 76 65 72 44 65 73 | 63 72 69 70 74 6f 72 2c |riverDes|criptor,|
|000040e0| 09 09 09 09 2f 2a 20 44 | 72 69 76 65 72 44 65 73 |..../* D|riverDes|
|000040f0| 63 56 65 72 73 69 6f 6e | 20 64 72 69 76 65 72 44 |cVersion| driverD|
|00004100| 65 73 63 56 65 72 73 69 | 6f 6e 09 2a 2f 0d 09 2f |escVersi|on.*/../|
|00004110| 2a 0d 09 20 2a 20 44 72 | 69 76 65 72 54 79 70 65 |*.. * Dr|iverType|
|00004120| 20 64 72 69 76 65 72 54 | 79 70 65 20 2d 20 74 68 | driverT|ype - th|
|00004130| 65 73 65 20 61 72 65 20 | 64 65 66 69 6e 65 64 20 |ese are |defined |
|00004140| 69 6e 20 4e 43 52 35 33 | 43 38 32 35 2e 68 0d 09 |in NCR53|C825.h..|
|00004150| 20 2a 2f 0d 09 6b 50 43 | 49 44 65 76 69 63 65 4e | */..kPC|IDeviceN|
|00004160| 61 6d 65 50 53 74 72 69 | 6e 67 2c 09 09 09 09 09 |amePStri|ng,.....|
|00004170| 2f 2a 20 4e 61 6d 65 20 | 6f 66 20 4e 43 52 20 35 |/* Name |of NCR 5|
|00004180| 33 43 38 32 35 20 68 61 | 72 64 77 61 72 65 09 20 |3C825 ha|rdware. |
|00004190| 09 09 2a 2f 0d 09 6b 50 | 43 49 52 65 76 69 73 69 |..*/..kP|CIRevisi|
|000041a0| 6f 6e 49 44 2c 20 6b 56 | 65 72 73 69 6f 6e 4d 69 |onID, kV|ersionMi|
|000041b0| 6e 6f 72 2c 09 09 09 2f | 2a 20 4e 75 6d 56 65 72 |nor,.../|* NumVer|
|000041c0| 73 69 6f 6e 20 76 65 72 | 73 69 6f 6e 09 09 09 09 |sion ver|sion....|
|000041d0| 09 2a 2f 0d 09 6b 56 65 | 72 73 69 6f 6e 53 74 61 |.*/..kVe|rsionSta|
|000041e0| 67 65 56 61 6c 75 65 2c | 20 6b 56 65 72 73 69 6f |geValue,| kVersio|
|000041f0| 6e 52 65 76 69 73 69 6f | 6e 2c 0d 09 2f 2a 0d 09 |nRevisio|n,../*..|
|00004200| 20 2a 20 44 72 69 76 65 | 72 4f 53 52 75 6e 74 69 | * Drive|rOSRunti|
|00004210| 6d 65 20 64 72 69 76 65 | 72 4f 53 52 75 6e 74 69 |me drive|rOSRunti|
|00004220| 6d 65 49 6e 66 6f 0d 09 | 20 2a 2f 0d 09 30 09 09 |meInfo..| */..0..|
|00004230| 09 09 09 09 09 09 09 09 | 2f 2a 20 52 75 6e 74 69 |........|/* Runti|
|00004240| 6d 65 4f 70 74 69 6f 6e | 73 20 64 72 69 76 65 72 |meOption|s driver|
|00004250| 52 75 6e 74 69 6d 65 09 | 09 09 2a 2f 0d 09 7c 20 |Runtime.|..*/..| |
|00004260| 28 31 20 2a 20 6b 44 72 | 69 76 65 72 49 73 4c 6f |(1 * kDr|iverIsLo|
|00004270| 61 64 65 64 55 70 6f 6e | 44 69 73 63 6f 76 65 72 |adedUpon|Discover|
|00004280| 79 29 09 2f 2a 20 4c 6f | 61 64 65 72 20 72 75 6e |y)./* Lo|ader run|
|00004290| 74 69 6d 65 20 6f 70 74 | 69 6f 6e 73 09 09 09 09 |time opt|ions....|
|000042a0| 2a 2f 0d 09 7c 20 28 31 | 20 2a 20 6b 44 72 69 76 |*/..| (1| * kDriv|
|000042b0| 65 72 49 73 4f 70 65 6e | 65 64 55 70 6f 6e 4c 6f |erIsOpen|edUponLo|
|000042c0| 61 64 29 09 09 09 2f 2a | 20 4f 70 65 6e 65 64 20 |ad).../*| Opened |
|000042d0| 77 68 65 6e 20 6c 6f 61 | 64 65 64 09 09 09 09 09 |when loa|ded.....|
|000042e0| 2a 2f 0d 09 7c 20 28 30 | 20 2a 20 6b 44 72 69 76 |*/..| (0| * kDriv|
|000042f0| 65 72 49 73 55 6e 64 65 | 72 45 78 70 65 72 74 43 |erIsUnde|rExpertC|
|00004300| 6f 6e 74 72 6f 6c 29 09 | 09 2f 2a 20 49 2f 4f 20 |ontrol).|./* I/O |
|00004310| 65 78 70 65 72 74 20 68 | 61 6e 64 6c 65 73 20 6c |expert h|andles l|
|00004320| 6f 61 64 73 2f 6f 70 65 | 6e 73 09 09 2a 2f 0d 09 |oads/ope|ns..*/..|
|00004330| 7c 20 28 30 20 2a 20 6b | 44 72 69 76 65 72 49 73 || (0 * k|DriverIs|
|00004340| 43 6f 6e 63 75 72 72 65 | 6e 74 29 09 09 09 09 2f |Concurre|nt)..../|
|00004350| 2a 20 4e 6f 74 20 63 6f | 6e 63 75 72 72 65 6e 74 |* Not co|ncurrent|
|00004360| 20 79 65 74 09 09 09 09 | 09 2a 2f 0d 09 7c 20 28 | yet....|.*/..| (|
|00004370| 30 20 2a 20 6b 44 72 69 | 76 65 72 51 75 65 75 65 |0 * kDri|verQueue|
|00004380| 73 49 4f 50 42 29 2c 09 | 09 09 09 2f 2a 20 4e 6f |sIOPB),.|.../* No|
|00004390| 74 20 69 6e 74 65 72 6e | 61 6c 6c 79 20 71 75 65 |t intern|ally que|
|000043a0| 75 65 64 20 79 65 74 09 | 09 09 2a 2f 0d 09 6b 44 |ued yet.|..*/..kD|
|000043b0| 72 69 76 65 72 4e 61 6d | 65 50 53 74 72 69 6e 67 |riverNam|ePString|
|000043c0| 2c 09 09 09 09 09 09 2f | 2a 20 53 74 72 33 31 20 |,....../|* Str31 |
|000043d0| 64 72 69 76 65 72 4e 61 | 6d 65 09 28 4f 70 65 6e |driverNa|me.(Open|
|000043e0| 44 72 69 76 65 72 20 70 | 61 72 61 6d 29 09 2a 2f |Driver p|aram).*/|
|000043f0| 0d 09 30 2c 20 30 2c 20 | 30 2c 20 30 2c 20 30 2c |..0, 0, |0, 0, 0,|
|00004400| 20 30 2c 20 30 2c 20 30 | 2c 09 09 09 09 09 2f 2a | 0, 0, 0|,...../*|
|00004410| 20 55 49 6e 74 33 32 20 | 64 72 69 76 65 72 44 65 | UInt32 |driverDe|
|00004420| 73 63 52 65 73 65 72 76 | 65 64 5b 38 5d 09 09 09 |scReserv|ed[8]...|
|00004430| 2a 2f 0d 09 2f 2a 0d 09 | 20 2a 20 44 72 69 76 65 |*/../*..| * Drive|
|00004440| 72 4f 53 53 65 72 76 69 | 63 65 20 49 6e 66 6f 72 |rOSServi|ce Infor|
|00004450| 6d 61 74 69 6f 6e 2e 20 | 54 68 69 73 20 73 65 63 |mation. |This sec|
|00004460| 74 69 6f 6e 20 63 6f 6e | 74 61 69 6e 73 20 61 20 |tion con|tains a |
|00004470| 76 65 63 74 6f 72 20 63 | 6f 75 6e 74 20 66 6f 6c |vector c|ount fol|
|00004480| 6c 6f 77 65 64 20 62 79 | 0d 09 20 2a 20 61 20 76 |lowed by|.. * a v|
|00004490| 65 63 74 6f 72 20 6f 66 | 20 73 74 72 75 63 74 75 |ector of| structu|
|000044a0| 72 65 73 2c 20 65 61 63 | 68 20 64 65 66 69 6e 69 |res, eac|h defini|
|000044b0| 6e 67 20 61 20 64 72 69 | 76 65 72 20 73 65 72 76 |ng a dri|ver serv|
|000044c0| 69 63 65 2e 0d 09 20 2a | 2f 0d 09 31 2c 09 09 09 |ice... *|/..1,...|
|000044d0| 09 09 09 09 09 09 09 2f | 2a 20 09 53 65 72 76 69 |......./|* .Servi|
|000044e0| 63 65 43 6f 75 6e 74 20 | 6e 53 65 72 76 69 63 65 |ceCount |nService|
|000044f0| 73 09 09 09 09 2a 2f 0d | 09 2f 2a 0d 09 20 2a 20 |s....*/.|./*.. * |
|00004500| 44 72 69 76 65 72 53 65 | 72 76 69 63 65 49 6e 66 |DriverSe|rviceInf|
|00004510| 6f 20 73 65 72 76 69 63 | 65 5b 30 5d 0d 09 20 2a |o servic|e[0].. *|
|00004520| 2f 0d 09 6b 53 65 72 76 | 69 63 65 43 61 74 65 67 |/..kServ|iceCateg|
|00004530| 6f 72 79 4e 64 72 76 44 | 72 69 76 65 72 2c 09 09 |oryNdrvD|river,..|
|00004540| 09 09 2f 2a 20 4f 53 54 | 79 70 65 20 73 65 72 76 |../* OST|ype serv|
|00004550| 69 63 65 43 61 74 65 67 | 6f 72 79 09 09 09 09 2a |iceCateg|ory....*|
|00004560| 2f 0d 09 6b 4e 64 72 76 | 54 79 70 65 49 73 47 65 |/..kNdrv|TypeIsGe|
|00004570| 6e 65 72 69 63 2c 09 09 | 09 09 09 09 2f 2a 20 4f |neric,..|..../* O|
|00004580| 53 54 79 70 65 20 73 65 | 72 76 69 63 65 54 79 70 |SType se|rviceTyp|
|00004590| 65 09 09 09 09 09 2a 2f | 0d 09 6b 56 65 72 73 69 |e.....*/|..kVersi|
|000045a0| 6f 6e 4d 61 6a 6f 72 2c | 20 6b 56 65 72 73 69 6f |onMajor,| kVersio|
|000045b0| 6e 4d 69 6e 6f 72 2c 09 | 09 09 2f 2a 20 4e 75 6d |nMinor,.|../* Num|
|000045c0| 56 65 72 73 69 6f 6e 20 | 73 65 72 76 69 63 65 56 |Version |serviceV|
|000045d0| 65 72 73 69 6f 6e 09 09 | 09 2a 2f 0d 09 6b 56 65 |ersion..|.*/..kVe|
|000045e0| 72 73 69 6f 6e 53 74 61 | 67 65 56 61 6c 75 65 2c |rsionSta|geValue,|
|000045f0| 20 6b 56 65 72 73 69 6f | 6e 52 65 76 69 73 69 6f | kVersio|nRevisio|
|00004600| 6e 2c 09 2f 2a 20 4e 75 | 6d 56 65 72 73 69 6f 6e |n,./* Nu|mVersion|
|00004610| 20 73 65 72 76 69 63 65 | 56 65 72 73 69 6f 6e 09 | service|Version.|
|00004620| 09 09 2a 2f 0d 7d 3b 0d | 0d 2f 2a 0d 20 2a 20 41 |..*/.};.|./*. * A|
|00004630| 6c 6c 20 64 72 69 76 65 | 72 2d 67 6c 6f 62 61 6c |ll drive|r-global|
|00004640| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 73 20 | informa|tion is |
|00004650| 69 6e 20 61 20 73 74 72 | 75 63 74 75 72 65 20 64 |in a str|ucture d|
|00004660| 65 66 69 6e 65 64 20 69 | 6e 20 4e 43 52 44 72 69 |efined i|n NCRDri|
|00004670| 76 65 72 50 72 69 76 61 | 74 65 2e 0d 20 2a 20 4e |verPriva|te.. * N|
|00004680| 6f 74 65 20 74 68 61 74 | 20 22 6d 6f 64 65 72 6e |ote that| "modern|
|00004690| 22 20 64 72 69 76 65 72 | 73 20 64 6f 20 6e 6f 74 |" driver|s do not|
|000046a0| 20 68 61 76 65 20 61 63 | 63 65 73 73 20 74 6f 20 | have ac|cess to |
|000046b0| 74 68 65 69 72 20 64 63 | 65 2e 20 49 6e 20 6e 61 |their dc|e. In na|
|000046c0| 74 69 76 65 20 50 6f 77 | 65 72 20 50 43 0d 20 2a |tive Pow|er PC. *|
|000046d0| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 73 2c 20 74 | environ|ments, t|
|000046e0| 68 65 20 67 6c 6f 62 61 | 6c 20 77 6f 72 6c 64 20 |he globa|l world |
|000046f0| 69 73 20 63 72 65 61 74 | 65 64 20 62 79 20 74 68 |is creat|ed by th|
|00004700| 65 20 43 6f 64 65 20 46 | 72 61 67 6d 65 6e 74 20 |e Code F|ragment |
|00004710| 4d 61 6e 61 67 65 72 20 | 28 68 6d 6d 2c 0d 20 2a |Manager |(hmm,. *|
|00004720| 20 70 65 72 68 61 70 73 | 20 69 74 20 69 73 20 63 | perhaps| it is c|
|00004730| 72 65 61 74 65 64 20 62 | 79 20 43 46 4d 49 6e 69 |reated b|y CFMIni|
|00004740| 74 69 61 6c 69 7a 65 29 | 2e 0d 20 2a 2f 0d 44 72 |tialize)|.. */.Dr|
|00004750| 69 76 65 72 47 6c 6f 62 | 61 6c 09 09 09 09 67 44 |iverGlob|al....gD|
|00004760| 72 69 76 65 72 47 6c 6f | 62 61 6c 3b 0d 55 49 6e |riverGlo|bal;.UIn|
|00004770| 74 33 32 09 09 09 09 09 | 09 67 50 61 67 65 53 69 |t32.....|.gPageSi|
|00004780| 7a 65 3b 0d 55 49 6e 74 | 33 32 09 09 09 09 09 09 |ze;.UInt|32......|
|00004790| 67 50 61 67 65 4d 61 73 | 6b 3b 0d 0d 4f 53 45 72 |gPageMas|k;..OSEr|
|000047a0| 72 09 09 09 09 09 09 43 | 46 4d 49 6e 69 74 69 61 |r......C|FMInitia|
|000047b0| 6c 69 7a 65 28 76 6f 69 | 64 29 3b 0d 4f 53 45 72 |lize(voi|d);.OSEr|
|000047c0| 72 09 09 09 09 09 09 43 | 46 4d 54 65 72 6d 69 6e |r......C|FMTermin|
|000047d0| 61 74 65 28 76 6f 69 64 | 29 3b 0d 0d 2f 2a 20 2a |ate(void|);../* *|
|000047e0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|000047f0| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004800| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004810| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004820| 20 2a 20 2a 20 2a 20 2a | 20 2a 20 2a 20 2a 20 2a | * * * *| * * * *|
|00004830| 20 2a 0d 20 2a 20 43 46 | 4d 49 6e 69 74 69 61 6c | *. * CF|MInitial|
|00004840| 69 7a 65 20 69 73 20 63 | 61 6c 6c 65 64 20 62 79 |ize is c|alled by|
|00004850| 20 74 68 65 20 43 6f 64 | 65 20 46 72 61 67 6d 65 | the Cod|e Fragme|
|00004860| 6e 74 20 4d 61 6e 61 67 | 65 72 2e 20 54 68 69 73 |nt Manag|er. This|
|00004870| 20 77 6f 75 6c 64 20 62 | 65 20 61 20 67 6f 6f 64 | would b|e a good|
|00004880| 0d 20 2a 20 70 6c 61 63 | 65 20 74 6f 20 6d 61 6b |. * plac|e to mak|
|00004890| 65 20 73 75 72 65 20 74 | 68 61 74 20 77 65 20 73 |e sure t|hat we s|
|000048a0| 68 6f 75 6c 64 20 6c 6f | 61 64 20 69 6e 20 74 68 |hould lo|ad in th|
|000048b0| 65 20 66 69 72 73 74 20 | 70 6c 61 63 65 20 2d 2d |e first |place --|
|000048c0| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 0d 20 2a | For exa|mple,. *|
|000048d0| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 20 68 61 | if nece|ssary ha|
|000048e0| 72 64 77 61 72 65 20 69 | 73 6e 27 74 20 70 72 65 |rdware i|sn't pre|
|000048f0| 73 65 6e 74 2c 20 6f 72 | 20 74 68 65 72 65 20 69 |sent, or| there i|
|00004900| 73 20 61 6e 20 6f 70 65 | 72 61 74 69 6e 67 20 73 |s an ope|rating s|
|00004910| 79 73 74 65 6d 20 63 6f | 6e 66 6c 69 63 74 2c 0d |ystem co|nflict,.|
|00004920| 20 2a 20 77 65 20 63 61 | 6e 20 72 65 74 75 72 6e | * we ca|n return|
|00004930| 20 61 6e 20 65 72 72 6f | 72 20 61 6e 64 20 6e 6f | an erro|r and no|
|00004940| 74 20 74 61 6b 65 20 75 | 70 20 61 6e 79 20 73 79 |t take u|p any sy|
|00004950| 73 74 65 6d 20 6d 65 6d | 6f 72 79 2e 0d 20 2a 2f |stem mem|ory.. */|
|00004960| 0d 4f 53 45 72 72 0d 43 | 46 4d 49 6e 69 74 69 61 |.OSErr.C|FMInitia|
|00004970| 6c 69 7a 65 28 76 6f 69 | 64 29 0d 7b 0d 23 69 66 |lize(voi|d).{.#if|
|00004980| 20 55 53 45 5f 4c 4f 47 | 5f 4c 49 42 52 41 52 59 | USE_LOG|_LIBRARY|
|00004990| 0d 09 09 4c 6f 67 52 65 | 63 6f 72 64 50 74 72 20 |...LogRe|cordPtr |
|000049a0| 6c 6f 67 52 65 63 6f 72 | 64 50 74 72 3b 0d 0d 09 |logRecor|dPtr;...|
|000049b0| 09 6c 6f 67 52 65 63 6f | 72 64 50 74 72 20 3d 20 |.logReco|rdPtr = |
|000049c0| 4d 61 6b 65 4c 6f 67 52 | 65 63 6f 72 64 28 6b 50 |MakeLogR|ecord(kP|
|000049d0| 43 49 44 65 76 69 63 65 | 4e 61 6d 65 43 53 74 72 |CIDevice|NameCStr|
|000049e0| 69 6e 67 2c 20 32 35 36 | 29 3b 0d 09 09 57 72 69 |ing, 256|);...Wri|
|000049f0| 74 65 4c 6f 67 45 6e 74 | 72 79 28 6c 6f 67 52 65 |teLogEnt|ry(logRe|
|00004a00| 63 6f 72 64 50 74 72 2c | 20 27 43 46 4d 69 27 2c |cordPtr,| 'CFMi',|
|00004a10| 20 4c 6f 67 53 74 72 69 | 6e 67 46 6f 72 6d 61 74 | LogStri|ngFormat|
|00004a20| 2c 20 22 5c 70 44 72 69 | 76 65 72 20 43 46 4d 49 |, "\pDri|ver CFMI|
|00004a30| 6e 69 74 69 61 6c 69 7a | 65 22 29 3b 0d 23 65 6e |nitializ|e");.#en|
|00004a40| 64 69 66 0d 09 09 72 65 | 74 75 72 6e 20 28 6e 6f |dif...re|turn (no|
|00004a50| 45 72 72 29 3b 0d 7d 0d | 0d 2f 2a 20 2a 20 2a 20 |Err);.}.|./* * * |
|00004a60| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004a70| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004a80| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004a90| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004aa0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 0d |* * * * |* * * *.|
|00004ab0| 20 2a 20 43 46 4d 54 65 | 72 6d 69 6e 61 74 65 20 | * CFMTe|rminate |
|00004ac0| 69 73 20 63 61 6c 6c 65 | 64 20 62 79 20 74 68 65 |is calle|d by the|
|00004ad0| 20 43 6f 64 65 20 46 72 | 61 67 6d 65 6e 74 20 4d | Code Fr|agment M|
|00004ae0| 61 6e 61 67 65 72 20 77 | 68 65 6e 20 74 68 65 20 |anager w|hen the |
|00004af0| 63 6f 64 65 20 73 65 67 | 6d 65 6e 74 0d 20 2a 20 |code seg|ment. * |
|00004b00| 69 73 20 61 62 6f 75 74 | 20 74 6f 20 62 65 20 74 |is about| to be t|
|00004b10| 72 61 73 68 65 64 2e 20 | 49 74 20 63 6f 75 6c 64 |rashed. |It could|
|00004b20| 20 64 69 73 70 6f 73 65 | 20 6f 66 20 61 6e 79 20 | dispose| of any |
|00004b30| 67 6c 6f 62 61 6c 20 64 | 61 74 61 20 74 68 61 74 |global d|ata that|
|00004b40| 20 69 73 20 6e 6f 74 0d | 20 2a 20 6d 61 6e 61 67 | is not.| * manag|
|00004b50| 65 64 20 62 79 20 44 6f | 44 72 69 76 65 72 49 4f |ed by Do|DriverIO|
|00004b60| 2e 0d 20 2a 2f 0d 4f 53 | 45 72 72 0d 43 46 4d 54 |.. */.OS|Err.CFMT|
|00004b70| 65 72 6d 69 6e 61 74 65 | 28 76 6f 69 64 29 0d 7b |erminate|(void).{|
|00004b80| 0d 23 69 66 20 55 53 45 | 5f 4c 4f 47 5f 4c 49 42 |.#if USE|_LOG_LIB|
|00004b90| 52 41 52 59 0d 09 09 4c | 6f 67 52 65 63 6f 72 64 |RARY...L|ogRecord|
|00004ba0| 50 74 72 20 6c 6f 67 52 | 65 63 6f 72 64 50 74 72 |Ptr logR|ecordPtr|
|00004bb0| 3b 0d 0d 09 09 6c 6f 67 | 52 65 63 6f 72 64 50 74 |;....log|RecordPt|
|00004bc0| 72 20 3d 20 47 65 74 4c | 6f 67 52 65 63 6f 72 64 |r = GetL|ogRecord|
|00004bd0| 50 74 72 28 6b 50 43 49 | 44 65 76 69 63 65 4e 61 |Ptr(kPCI|DeviceNa|
|00004be0| 6d 65 43 53 74 72 69 6e | 67 29 3b 0d 09 09 57 72 |meCStrin|g);...Wr|
|00004bf0| 69 74 65 4c 6f 67 45 6e | 74 72 79 28 6c 6f 67 52 |iteLogEn|try(logR|
|00004c00| 65 63 6f 72 64 50 74 72 | 2c 20 27 43 46 4d 74 27 |ecordPtr|, 'CFMt'|
|00004c10| 2c 20 4c 6f 67 53 74 72 | 69 6e 67 46 6f 72 6d 61 |, LogStr|ingForma|
|00004c20| 74 2c 20 22 5c 70 44 72 | 69 76 65 72 20 43 46 4d |t, "\pDr|iver CFM|
|00004c30| 54 65 72 6d 69 6e 61 74 | 65 22 29 3b 0d 23 65 6e |Terminat|e");.#en|
|00004c40| 64 69 66 0d 09 09 72 65 | 74 75 72 6e 20 28 6e 6f |dif...re|turn (no|
|00004c50| 45 72 72 29 3b 0d 7d 0d | 0d 2f 2a 20 2a 20 2a 20 |Err);.}.|./* * * |
|00004c60| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004c70| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004c80| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004c90| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 20 |* * * * |* * * * |
|00004ca0| 2a 20 2a 20 2a 20 2a 20 | 2a 20 2a 20 2a 20 2a 0d |* * * * |* * * *.|
|00004cb0| 20 2a 20 44 6f 44 72 69 | 76 65 72 49 4f 0d 20 2a | * DoDri|verIO. *|
|00004cc0| 0d 20 2a 20 49 6e 20 74 | 68 65 20 6e 65 77 20 64 |. * In t|he new d|
|00004cd0| 72 69 76 65 72 20 65 6e | 76 69 72 6f 6e 6d 65 6e |river en|vironmen|
|00004ce0| 74 2c 20 44 6f 44 72 69 | 76 65 72 49 4f 20 70 65 |t, DoDri|verIO pe|
|00004cf0| 72 66 6f 72 6d 73 20 61 | 6c 6c 20 64 72 69 76 65 |rforms a|ll drive|
|00004d00| 72 0d 20 2a 20 66 75 6e | 63 74 69 6f 6e 73 2e 20 |r. * fun|ctions. |
|00004d10| 49 74 20 69 73 20 63 61 | 6c 6c 65 64 20 77 69 74 |It is ca|lled wit|
|00004d20| 68 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |h the fo|llowing |
|00004d30| 70 61 72 61 6d 65 74 65 | 72 73 3a 0d 20 2a 09 49 |paramete|rs:. *.I|
|00004d40| 4f 43 6f 6d 6d 61 6e 64 | 49 44 09 09 09 41 20 75 |OCommand|ID...A u|
|00004d50| 6e 69 71 75 65 20 72 65 | 66 65 72 65 6e 63 65 20 |nique re|ference |
|00004d60| 66 6f 72 20 74 68 69 73 | 20 64 72 69 76 65 72 20 |for this| driver |
|00004d70| 72 65 71 75 65 73 74 2e | 20 49 6e 0d 20 2a 09 09 |request.| In. *..|
|00004d80| 09 09 09 09 74 68 65 20 | 65 6d 75 6c 61 74 65 64 |....the |emulated|
|00004d90| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2c 20 74 68 | environ|ment, th|
|00004da0| 69 73 20 77 69 6c 6c 20 | 62 65 20 74 68 65 20 50 |is will |be the P|
|00004db0| 61 72 61 6d 42 6c 6b 50 | 74 72 0d 20 2a 09 09 09 |aramBlkP|tr. *...|
|00004dc0| 09 09 09 70 61 73 73 65 | 64 20 69 6e 20 66 72 6f |...passe|d in fro|
|00004dd0| 6d 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |m the De|vice Man|
|00004de0| 61 67 65 72 2e 0d 20 2a | 09 49 4f 43 6f 6d 6d 61 |ager.. *|.IOComma|
|00004df0| 6e 64 43 6f 6e 74 65 6e | 74 73 09 41 20 75 6e 69 |ndConten|ts.A uni|
|00004e00| 6f 6e 20 73 74 72 75 63 | 74 75 72 65 20 74 68 61 |on struc|ture tha|
|00004e10| 74 20 63 6f 6e 74 61 69 | 6e 73 20 69 6e 66 6f 72 |t contai|ns infor|
|00004e20| 6d 61 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 0d 20 |mation f|or the. |
|00004e30| 2a 09 09 09 09 09 09 73 | 70 65 63 69 66 69 63 20 |*......s|pecific |
|00004e40| 72 65 71 75 65 73 74 2e | 20 46 6f 72 20 74 68 65 |request.| For the|
|00004e50| 20 65 6d 75 6c 61 74 65 | 64 20 65 6e 76 69 72 6f | emulate|d enviro|
|00004e60| 6e 6d 65 6e 74 2c 20 74 | 68 69 73 0d 20 2a 09 09 |nment, t|his. *..|
|00004e70| 09 09 09 09 77 69 6c 6c | 20 63 6f 6e 74 61 69 6e |....will| contain|
|00004e80| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 3a 0d | the fol|lowing:.|
|00004e90| 20 2a 09 09 49 6e 69 74 | 69 61 6c 69 7a 65 09 09 | *..Init|ialize..|
|00004ea0| 09 44 72 69 76 65 72 20 | 52 65 66 4e 75 6d 20 61 |.Driver |RefNum a|
|00004eb0| 6e 64 20 74 68 65 20 6e | 61 6d 65 20 72 65 67 69 |nd the n|ame regi|
|00004ec0| 73 74 72 79 20 69 64 20 | 66 6f 72 20 74 68 69 73 |stry id |for this|
|00004ed0| 20 64 72 69 76 65 72 2e | 0d 20 2a 09 09 46 69 6e | driver.|. *..Fin|
|00004ee0| 61 6c 69 7a 65 09 09 09 | 44 72 69 76 65 72 20 52 |alize...|Driver R|
|00004ef0| 65 66 4e 75 6d 20 61 6e | 64 20 74 68 65 20 6e 61 |efNum an|d the na|
|00004f00| 6d 65 20 72 65 67 69 73 | 74 72 79 20 69 64 20 66 |me regis|try id f|
|00004f10| 6f 72 20 74 68 69 73 20 | 64 72 69 76 65 72 2e 20 |or this |driver. |
|00004f20| 0d 20 2a 09 09 4f 74 68 | 65 72 73 09 09 09 09 54 |. *..Oth|ers....T|
|00004f30| 68 65 20 50 61 72 61 6d | 42 6c 6b 50 74 72 0d 20 |he Param|BlkPtr. |
|00004f40| 2a 09 49 4f 43 6f 6d 6d | 61 6e 64 43 6f 64 65 09 |*.IOComm|andCode.|
|00004f50| 09 41 20 73 77 69 74 63 | 68 20 76 61 6c 75 65 20 |.A switc|h value |
|00004f60| 74 68 61 74 20 73 70 65 | 63 69 66 69 65 73 20 74 |that spe|cifies t|
|00004f70| 68 65 20 72 65 71 75 69 | 72 65 64 20 66 75 6e 63 |he requi|red func|
|00004f80| 74 69 6f 6e 2e 0d 20 2a | 09 49 4f 43 6f 6d 6d 61 |tion.. *|.IOComma|
|00004f90| 6e 64 4b 69 6e 64 09 09 | 41 20 62 69 74 2d 6d 61 |ndKind..|A bit-ma|
|00004fa0| 73 6b 20 69 6e 64 69 63 | 61 74 69 6e 67 20 53 79 |sk indic|ating Sy|
|00004fb0| 6e 63 68 72 6f 6e 6f 75 | 73 2c 20 41 73 79 6e 63 |nchronou|s, Async|
|00004fc0| 68 72 6f 6e 6f 75 73 2c | 20 61 6e 64 20 49 6d 6d |hronous,| and Imm|
|00004fd0| 65 64 69 61 74 65 0d 20 | 2a 0d 20 2a 20 46 6f 72 |ediate. |*. * For|
|00004fe0| 20 53 79 6e 63 68 72 6f | 6e 6f 75 73 20 61 6e 64 | Synchro|nous and|
|00004ff0| 20 49 6d 6d 65 64 69 61 | 74 65 20 63 6f 6d 6d 61 | Immedia|te comma|
|00005000| 6e 64 73 2c 20 44 6f 44 | 72 69 76 65 72 49 4f 20 |nds, DoD|riverIO |
|00005010| 72 65 74 75 72 6e 73 20 | 74 68 65 20 66 69 6e 61 |returns |the fina|
|00005020| 6c 20 73 74 61 74 75 73 | 20 74 6f 0d 20 2a 20 74 |l status| to. * t|
|00005030| 68 65 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |he Devic|e Manage|
|00005040| 72 2e 20 46 6f 72 20 41 | 73 79 6e 63 68 72 6f 6e |r. For A|synchron|
|00005050| 6f 75 73 20 63 6f 6d 6d | 61 6e 64 73 2c 20 44 6f |ous comm|ands, Do|
|00005060| 44 72 69 76 65 72 49 4f | 20 6d 61 79 20 72 65 74 |DriverIO| may ret|
|00005070| 75 72 6e 20 6b 49 4f 42 | 75 73 79 53 74 61 74 75 |urn kIOB|usyStatu|
|00005080| 73 2e 0d 20 2a 20 49 66 | 20 69 74 20 72 65 74 75 |s.. * If| it retu|
|00005090| 72 6e 73 20 62 75 73 79 | 20 73 74 61 74 75 73 2c |rns busy| status,|
|000050a0| 20 74 68 65 20 64 72 69 | 76 65 72 20 70 72 6f 6d | the dri|ver prom|
|000050b0| 69 73 65 73 20 74 6f 20 | 63 61 6c 6c 20 49 4f 43 |ises to |call IOC|
|000050c0| 6f 6d 6d 61 6e 64 49 73 | 43 6f 6d 70 6c 65 74 65 |ommandIs|Complete|
|000050d0| 20 77 68 65 6e 0d 20 2a | 20 74 68 65 20 74 72 61 | when. *| the tra|
|000050e0| 6e 73 61 63 74 69 6f 6e | 20 68 61 73 20 63 6f 6d |nsaction| has com|
|000050f0| 70 6c 65 74 65 64 2e 0d | 20 2a 2f 0d 4f 53 45 72 |pleted..| */.OSEr|
|00005100| 72 0d 44 6f 44 72 69 76 | 65 72 49 4f 28 0d 09 09 |r.DoDriv|erIO(...|
|00005110| 41 64 64 72 65 73 73 53 | 70 61 63 65 49 44 09 09 |AddressS|paceID..|
|00005120| 09 61 64 64 72 65 73 73 | 53 70 61 63 65 49 44 2c |.address|SpaceID,|
|00005130| 0d 09 09 49 4f 43 6f 6d | 6d 61 6e 64 49 44 09 09 |...IOCom|mandID..|
|00005140| 09 09 69 6f 43 6f 6d 6d | 61 6e 64 49 44 2c 0d 09 |..ioComm|andID,..|
|00005150| 09 49 4f 43 6f 6d 6d 61 | 6e 64 43 6f 6e 74 65 6e |.IOComma|ndConten|
|00005160| 74 73 09 09 69 6f 43 6f | 6d 6d 61 6e 64 43 6f 6e |ts..ioCo|mmandCon|
|00005170| 74 65 6e 74 73 2c 0d 09 | 09 49 4f 43 6f 6d 6d 61 |tents,..|.IOComma|
|00005180| 6e 64 43 6f 64 65 09 09 | 09 69 6f 43 6f 6d 6d 61 |ndCode..|.ioComma|
|00005190| 6e 64 43 6f 64 65 2c 0d | 09 09 49 4f 43 6f 6d 6d |ndCode,.|..IOComm|
|000051a0| 61 6e 64 4b 69 6e 64 09 | 09 09 69 6f 43 6f 6d 6d |andKind.|..ioComm|
|000051b0| 61 6e 64 4b 69 6e 64 0d | 29 0d 7b 0d 09 09 4f 53 |andKind.|).{...OS|
|000051c0| 45 72 72 09 09 09 09 09 | 73 74 61 74 75 73 3b 0d |Err.....|status;.|
|000051d0| 0d 09 09 2f 2a 0d 09 09 | 20 2a 20 4e 6f 74 65 3a |.../*...| * Note:|
|000051e0| 20 49 6e 69 74 69 61 6c | 69 7a 65 2c 20 4f 70 65 | Initial|ize, Ope|
|000051f0| 6e 2c 20 4b 69 6c 6c 49 | 4f 2c 20 43 6c 6f 73 65 |n, KillI|O, Close|
|00005200| 2c 20 61 6e 64 20 46 69 | 6e 61 6c 69 7a 65 20 61 |, and Fi|nalize a|
|00005210| 72 65 20 65 69 74 68 65 | 72 20 73 79 6e 63 68 72 |re eithe|r synchr|
|00005220| 6f 6e 6f 75 73 0d 09 09 | 20 2a 20 6f 72 20 69 6d |onous...| * or im|
|00005230| 6d 65 64 69 61 74 65 2e | 20 52 65 61 64 2c 20 57 |mediate.| Read, W|
|00005240| 72 69 74 65 2c 20 43 6f | 6e 74 72 6f 6c 2c 20 61 |rite, Co|ntrol, a|
|00005250| 6e 64 20 53 74 61 74 75 | 73 20 6d 61 79 20 62 65 |nd Statu|s may be|
|00005260| 20 69 6d 6d 65 64 69 61 | 74 65 2c 0d 09 09 20 2a | immedia|te,... *|
|00005270| 20 73 79 6e 63 68 72 6f | 6e 6f 75 73 2c 20 6f 72 | synchro|nous, or|
|00005280| 20 61 73 79 6e 63 68 72 | 6f 6e 6f 75 73 2e 0d 09 | asynchr|onous...|
|00005290| 09 20 2a 2f 0d 09 09 54 | 72 61 63 65 28 44 6f 44 |. */...T|race(DoD|
|000052a0| 72 69 76 65 72 49 4f 29 | 3b 0d 09 09 54 69 6d 65 |riverIO)|;...Time|
|000052b0| 73 74 61 6d 70 28 27 49 | 4f 53 2d 27 29 3b 09 09 |stamp('I|OS-');..|
|000052c0| 09 09 09 2f 2a 20 49 4f | 53 2b 20 69 73 20 69 6e |.../* IO|S+ is in|
|000052d0| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|000052e0| 09 09 09 2a 2f 0d 09 09 | 73 77 69 74 63 68 20 28 |...*/...|switch (|
|000052f0| 69 6f 43 6f 6d 6d 61 6e | 64 43 6f 64 65 29 20 7b |ioComman|dCode) {|
|00005300| 0d 09 09 63 61 73 65 20 | 6b 49 6e 69 74 69 61 6c |...case |kInitial|
|00005310| 69 7a 65 43 6f 6d 6d 61 | 6e 64 3a 09 09 09 2f 2a |izeComma|nd:.../*|
|00005320| 20 41 6c 77 61 79 73 20 | 69 6d 6d 65 64 69 61 74 | Always |immediat|
|00005330| 65 09 09 09 09 09 09 2a | 2f 0d 09 09 09 2f 2f 2a |e......*|/....//*|
|00005340| 2a 20 53 79 73 44 65 62 | 75 67 53 74 72 28 22 5c |* SysDeb|ugStr("\|
|00005350| 70 20 44 72 69 76 65 72 | 20 49 6e 69 74 69 61 6c |p Driver| Initial|
|00005360| 69 7a 65 22 29 3b 0d 23 | 69 66 20 55 53 45 5f 4c |ize");.#|if USE_L|
|00005370| 4f 47 5f 4c 49 42 52 41 | 52 59 0d 09 09 09 2f 2a |OG_LIBRA|RY..../*|
|00005380| 0d 09 09 09 20 2a 20 42 | 65 63 61 75 73 65 20 77 |.... * B|ecause w|
|00005390| 65 20 63 61 6e 20 28 69 | 6e 64 65 65 64 2c 20 64 |e can (i|ndeed, d|
|000053a0| 6f 29 20 68 61 76 65 20 | 6d 75 6c 74 69 70 6c 65 |o) have |multiple|
|000053b0| 20 63 61 72 64 73 20 72 | 75 6e 6e 69 6e 67 20 66 | cards r|unning f|
|000053c0| 72 6f 6d 20 74 68 65 20 | 73 61 6d 65 0d 09 09 09 |rom the |same....|
|000053d0| 20 2a 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 | * devic|e driver|
|000053e0| 20 73 6f 75 72 63 65 2c | 20 77 65 20 73 65 74 20 | source,| we set |
|000053f0| 74 68 65 20 64 65 66 61 | 75 6c 74 20 4c 6f 67 20 |the defa|ult Log |
|00005400| 69 64 65 6e 74 69 66 69 | 65 72 20 74 6f 20 61 20 |identifi|er to a |
|00005410| 75 6e 69 71 75 65 0d 09 | 09 09 20 2a 20 73 74 72 |unique..|.. * str|
|00005420| 69 6e 67 20 62 79 20 63 | 6f 6e 76 65 72 74 69 6e |ing by c|onvertin|
|00005430| 67 20 74 68 65 20 64 65 | 76 69 63 65 20 72 65 66 |g the de|vice ref|
|00005440| 4e 75 6d 20 74 6f 20 61 | 20 72 69 67 68 74 2d 6a |Num to a| right-j|
|00005450| 75 73 74 69 66 69 65 64 | 20 4f 53 54 79 70 65 2e |ustified| OSType.|
|00005460| 0d 09 09 09 20 2a 2f 0d | 09 09 09 7b 0d 09 09 09 |.... */.|...{....|
|00005470| 09 53 74 72 31 35 09 09 | 09 77 6f 72 6b 3b 0d 09 |.Str15..|.work;..|
|00005480| 09 09 09 53 74 72 69 6e | 67 50 74 72 09 09 77 6f |...Strin|gPtr..wo|
|00005490| 72 6b 50 74 72 3b 0d 0d | 09 09 09 09 77 6f 72 6b |rkPtr;..|....work|
|000054a0| 5b 34 5d 20 3d 20 30 3b | 0d 09 09 09 09 41 70 70 |[4] = 0;|.....App|
|000054b0| 65 6e 64 53 69 67 6e 65 | 64 28 26 77 6f 72 6b 5b |endSigne|d(&work[|
|000054c0| 34 5d 2c 20 69 6f 43 6f | 6d 6d 61 6e 64 43 6f 6e |4], ioCo|mmandCon|
|000054d0| 74 65 6e 74 73 2e 69 6e | 69 74 69 61 6c 49 6e 66 |tents.in|itialInf|
|000054e0| 6f 2d 3e 72 65 66 4e 75 | 6d 29 3b 0d 09 09 09 09 |o->refNu|m);.....|
|000054f0| 77 6f 72 6b 50 74 72 20 | 3d 20 26 77 6f 72 6b 5b |workPtr |= &work[|
|00005500| 35 5d 3b 0d 09 09 09 09 | 73 77 69 74 63 68 20 28 |5];.....|switch (|
|00005510| 77 6f 72 6b 5b 34 5d 29 | 20 7b 09 09 09 09 09 09 |work[4])| {......|
|00005520| 09 2f 2a 20 4b 69 64 73 | 2c 09 09 09 2a 2f 0d 09 |./* Kids|,...*/..|
|00005530| 09 09 09 63 61 73 65 20 | 30 3a 09 09 77 6f 72 6b |...case |0:..work|
|00005540| 5b 31 5d 20 3d 20 27 20 | 27 3b 09 2d 2d 77 6f 72 |[1] = ' |';.--wor|
|00005550| 6b 50 74 72 3b 09 09 2f | 2a 20 64 6f 6e 27 74 09 |kPtr;../|* don't.|
|00005560| 09 09 2a 2f 0d 09 09 09 | 09 63 61 73 65 20 31 3a |..*/....|.case 1:|
|00005570| 09 09 77 6f 72 6b 5b 32 | 5d 20 3d 20 27 20 27 3b |..work[2|] = ' ';|
|00005580| 09 2d 2d 77 6f 72 6b 50 | 74 72 3b 09 09 2f 2a 20 |.--workP|tr;../* |
|00005590| 74 72 79 09 09 09 09 2a | 2f 0d 09 09 09 09 63 61 |try....*|/.....ca|
|000055a0| 73 65 20 32 3a 09 09 77 | 6f 72 6b 5b 33 5d 20 3d |se 2:..w|ork[3] =|
|000055b0| 20 27 20 27 3b 09 2d 2d | 77 6f 72 6b 50 74 72 3b | ' ';.--|workPtr;|
|000055c0| 09 09 2f 2a 20 74 68 69 | 73 09 09 09 09 2a 2f 0d |../* thi|s....*/.|
|000055d0| 09 09 09 09 63 61 73 65 | 20 33 3a 09 09 77 6f 72 |....case| 3:..wor|
|000055e0| 6b 5b 34 5d 20 3d 20 27 | 20 27 3b 09 2d 2d 77 6f |k[4] = '| ';.--wo|
|000055f0| 72 6b 50 74 72 3b 09 09 | 2f 2a 20 61 74 09 09 09 |rkPtr;..|/* at...|
|00005600| 09 2a 2f 0d 09 09 09 09 | 64 65 66 61 75 6c 74 3a |.*/.....|default:|
|00005610| 09 62 72 65 61 6b 3b 09 | 09 09 09 09 09 09 2f 2a |.break;.|....../*|
|00005620| 20 68 6f 6d 65 21 09 09 | 09 2a 2f 0d 09 09 09 09 | home!..|.*/.....|
|00005630| 7d 0d 09 09 09 09 42 6c | 6f 63 6b 43 6f 70 79 28 |}.....Bl|ockCopy(|
|00005640| 77 6f 72 6b 50 74 72 2c | 20 26 47 4c 4f 42 41 4c |workPtr,| &GLOBAL|
|00005650| 2e 6c 6f 67 49 64 65 6e | 74 69 66 69 65 72 2c 20 |.logIden|tifier, |
|00005660| 73 69 7a 65 6f 66 20 28 | 4f 53 54 79 70 65 29 29 |sizeof (|OSType))|
|00005670| 3b 0d 09 09 09 7d 0d 09 | 09 09 47 4c 4f 42 41 4c |;....}..|..GLOBAL|
|00005680| 2e 6c 6f 67 52 65 63 6f | 72 64 50 74 72 20 3d 20 |.logReco|rdPtr = |
|00005690| 4d 61 6b 65 4c 6f 67 52 | 65 63 6f 72 64 28 6b 50 |MakeLogR|ecord(kP|
|000056a0| 43 49 44 65 76 69 63 65 | 4e 61 6d 65 43 53 74 72 |CIDevice|NameCStr|
|000056b0| 69 6e 67 2c 20 32 35 36 | 29 3b 0d 09 09 09 4c 6f |ing, 256|);....Lo|
|000056c0| 67 53 74 72 69 6e 67 28 | 22 5c 70 44 6f 44 72 69 |gString(|"\pDoDri|
|000056d0| 76 65 72 49 4f 20 28 49 | 6e 69 74 69 61 6c 69 7a |verIO (I|nitializ|
|000056e0| 65 29 22 29 3b 0d 09 09 | 09 50 72 65 73 65 72 76 |e)");...|.Preserv|
|000056f0| 65 4c 6f 67 52 65 63 6f | 72 64 28 47 4c 4f 42 41 |eLogReco|rd(GLOBA|
|00005700| 4c 2e 6c 6f 67 52 65 63 | 6f 72 64 50 74 72 2c 20 |L.logRec|ordPtr, |
|00005710| 46 41 4c 53 45 29 3b 09 | 2f 2a 20 57 72 61 70 2d |FALSE);.|/* Wrap-|
|00005720| 61 72 6f 75 6e 64 09 09 | 09 2a 2f 0d 23 65 6e 64 |around..|.*/.#end|
|00005730| 69 66 0d 09 09 09 73 74 | 61 74 75 73 20 3d 20 44 |if....st|atus = D|
|00005740| 72 69 76 65 72 49 6e 69 | 74 69 61 6c 69 7a 65 43 |riverIni|tializeC|
|00005750| 6d 64 28 0d 09 09 09 09 | 09 09 61 64 64 72 65 73 |md(.....|..addres|
|00005760| 73 53 70 61 63 65 49 44 | 2c 20 69 6f 43 6f 6d 6d |sSpaceID|, ioComm|
|00005770| 61 6e 64 43 6f 6e 74 65 | 6e 74 73 2e 69 6e 69 74 |andConte|nts.init|
|00005780| 69 61 6c 49 6e 66 6f 29 | 3b 0d 09 09 09 43 68 65 |ialInfo)|;....Che|
|00005790| 63 6b 53 74 61 74 75 73 | 28 73 74 61 74 75 73 2c |ckStatus|(status,|
|000057a0| 20 22 5c 70 49 6e 69 74 | 69 61 6c 69 7a 65 20 66 | "\pInit|ialize f|
|000057b0| 61 69 6c 65 64 22 29 3b | 0d 09 09 09 62 72 65 61 |ailed");|....brea|
|000057c0| 6b 3b 0d 09 09 63 61 73 | 65 20 6b 46 69 6e 61 6c |k;...cas|e kFinal|
|000057d0| 69 7a 65 43 6f 6d 6d 61 | 6e 64 3a 09 09 09 09 2f |izeComma|nd:..../|
|000057e0| 2a 20 41 6c 77 61 79 73 | 20 69 6d 6d 65 64 69 61 |* Always| immedia|
|000057f0| 74 65 09 09 09 09 09 09 | 2a 2f 0d 09 09 09 2f 2f |te......|*/....//|
|00005800| 2a 2a 20 53 79 73 44 65 | 62 75 67 53 74 72 28 22 |** SysDe|bugStr("|
|00005810| 5c 70 20 44 72 69 76 65 | 72 20 46 69 6e 61 6c 69 |\p Drive|r Finali|
|00005820| 7a 65 22 29 3b 0d 09 09 | 09 4c 6f 67 53 74 72 69 |ze");...|.LogStri|
|00005830| 6e 67 28 22 5c 70 44 6f | 44 72 69 76 65 72 49 4f |ng("\pDo|DriverIO|
|00005840| 20 28 46 69 6e 61 6c 69 | 7a 65 29 22 29 3b 0d 09 | (Finali|ze)");..|
|00005850| 09 09 73 74 61 74 75 73 | 20 3d 20 44 72 69 76 65 |..status| = Drive|
|00005860| 72 46 69 6e 61 6c 69 7a | 65 43 6d 64 28 69 6f 43 |rFinaliz|eCmd(ioC|
|00005870| 6f 6d 6d 61 6e 64 43 6f | 6e 74 65 6e 74 73 2e 66 |ommandCo|ntents.f|
|00005880| 69 6e 61 6c 49 6e 66 6f | 29 3b 0d 09 09 09 62 72 |inalInfo|);....br|
|00005890| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 6b 53 75 70 |eak;...c|ase kSup|
|000058a0| 65 72 73 65 64 65 64 43 | 6f 6d 6d 61 6e 64 3a 0d |ersededC|ommand:.|
|000058b0| 09 09 09 2f 2f 2a 2a 20 | 53 79 73 44 65 62 75 67 |...//** |SysDebug|
|000058c0| 53 74 72 28 22 5c 70 20 | 44 72 69 76 65 72 20 53 |Str("\p |Driver S|
|000058d0| 75 70 65 72 73 65 64 65 | 64 22 29 3b 0d 09 09 09 |upersede|d");....|
|000058e0| 4c 6f 67 53 74 72 69 6e | 67 28 22 5c 70 44 6f 44 |LogStrin|g("\pDoD|
|000058f0| 72 69 76 65 72 49 4f 20 | 28 53 75 70 65 72 73 65 |riverIO |(Superse|
|00005900| 64 65 29 22 29 3b 0d 09 | 09 09 73 74 61 74 75 73 |de)");..|..status|
|00005910| 20 3d 20 44 72 69 76 65 | 72 53 75 70 65 72 73 65 | = Drive|rSuperse|
|00005920| 64 65 64 43 6d 64 28 69 | 6f 43 6f 6d 6d 61 6e 64 |dedCmd(i|oCommand|
|00005930| 43 6f 6e 74 65 6e 74 73 | 2e 73 75 70 65 72 73 65 |Contents|.superse|
|00005940| 64 65 64 49 6e 66 6f 2c | 20 46 41 4c 53 45 29 3b |dedInfo,| FALSE);|
|00005950| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|00005960| 65 20 6b 52 65 70 6c 61 | 63 65 43 6f 6d 6d 61 6e |e kRepla|ceComman|
|00005970| 64 3a 09 09 09 09 2f 2a | 20 72 65 70 6c 61 63 65 |d:..../*| replace|
|00005980| 20 61 6e 20 6f 6c 64 20 | 64 72 69 76 65 72 09 09 | an old |driver..|
|00005990| 09 09 2a 2f 0d 09 09 09 | 2f 2f 2a 2a 20 53 79 73 |..*/....|//** Sys|
|000059a0| 44 65 62 75 67 53 74 72 | 28 22 5c 70 20 44 72 69 |DebugStr|("\p Dri|
|000059b0| 76 65 72 20 52 65 70 6c | 61 63 65 22 29 3b 0d 09 |ver Repl|ace");..|
|000059c0| 09 09 4c 6f 67 53 74 72 | 69 6e 67 28 22 5c 70 44 |..LogStr|ing("\pD|
|000059d0| 6f 44 72 69 76 65 72 49 | 4f 20 28 52 65 70 6c 61 |oDriverI|O (Repla|
|000059e0| 63 65 29 22 29 3b 0d 09 | 09 09 73 74 61 74 75 73 |ce)");..|..status|
|000059f0| 20 3d 20 44 72 69 76 65 | 72 52 65 70 6c 61 63 65 | = Drive|rReplace|
|00005a00| 43 6d 64 28 0d 09 09 09 | 09 09 09 61 64 64 72 65 |Cmd(....|...addre|
|00005a10| 73 73 53 70 61 63 65 49 | 44 2c 20 69 6f 43 6f 6d |ssSpaceI|D, ioCom|
|00005a20| 6d 61 6e 64 43 6f 6e 74 | 65 6e 74 73 2e 72 65 70 |mandCont|ents.rep|
|00005a30| 6c 61 63 65 49 6e 66 6f | 2c 20 46 41 4c 53 45 29 |laceInfo|, FALSE)|
|00005a40| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|00005a50| 73 65 20 6b 4f 70 65 6e | 43 6f 6d 6d 61 6e 64 3a |se kOpen|Command:|
|00005a60| 09 09 09 09 09 2f 2a 20 | 41 6c 77 61 79 73 20 69 |...../* |Always i|
|00005a70| 6d 6d 65 64 69 61 74 65 | 09 09 09 09 09 09 2a 2f |mmediate|......*/|
|00005a80| 0d 09 09 09 2f 2f 2a 2a | 20 53 79 73 44 65 62 75 |....//**| SysDebu|
|00005a90| 67 53 74 72 28 22 5c 70 | 20 44 72 69 76 65 72 20 |gStr("\p| Driver |
|00005aa0| 4f 70 65 6e 22 29 3b 0d | 09 09 09 4c 6f 67 53 74 |Open");.|...LogSt|
|00005ab0| 72 69 6e 67 28 22 5c 70 | 44 6f 44 72 69 76 65 72 |ring("\p|DoDriver|
|00005ac0| 49 4f 20 28 4f 70 65 6e | 29 22 29 3b 0d 09 09 09 |IO (Open|)");....|
|00005ad0| 73 74 61 74 75 73 20 3d | 20 44 72 69 76 65 72 4f |status =| DriverO|
|00005ae0| 70 65 6e 43 6d 64 28 61 | 64 64 72 65 73 73 53 70 |penCmd(a|ddressSp|
|00005af0| 61 63 65 49 44 2c 20 69 | 6f 43 6f 6d 6d 61 6e 64 |aceID, i|oCommand|
|00005b00| 43 6f 6e 74 65 6e 74 73 | 2e 70 62 29 3b 0d 09 09 |Contents|.pb);...|
|00005b10| 09 43 68 65 63 6b 53 74 | 61 74 75 73 28 73 74 61 |.CheckSt|atus(sta|
|00005b20| 74 75 73 2c 20 22 5c 70 | 4f 70 65 6e 20 66 61 69 |tus, "\p|Open fai|
|00005b30| 6c 65 64 22 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |led");..|..break;|
|00005b40| 0d 09 09 63 61 73 65 20 | 6b 43 6c 6f 73 65 43 6f |...case |kCloseCo|
|00005b50| 6d 6d 61 6e 64 3a 09 09 | 09 09 09 2f 2a 20 41 6c |mmand:..|.../* Al|
|00005b60| 77 61 79 73 20 69 6d 6d | 65 64 69 61 74 65 09 09 |ways imm|ediate..|
|00005b70| 09 09 09 09 2a 2f 0d 09 | 09 09 2f 2f 2a 2a 20 53 |....*/..|..//** S|
|00005b80| 79 73 44 65 62 75 67 53 | 74 72 28 22 5c 70 20 44 |ysDebugS|tr("\p D|
|00005b90| 72 69 76 65 72 20 43 6c | 6f 73 65 22 29 3b 0d 09 |river Cl|ose");..|
|00005ba0| 09 09 4c 6f 67 53 74 72 | 69 6e 67 28 22 5c 70 44 |..LogStr|ing("\pD|
|00005bb0| 6f 44 72 69 76 65 72 49 | 4f 20 28 43 6c 6f 73 65 |oDriverI|O (Close|
|00005bc0| 29 22 29 3b 0d 09 09 09 | 73 74 61 74 75 73 20 3d |)");....|status =|
|00005bd0| 20 44 72 69 76 65 72 43 | 6c 6f 73 65 43 6d 64 28 | DriverC|loseCmd(|
|00005be0| 69 6f 43 6f 6d 6d 61 6e | 64 43 6f 6e 74 65 6e 74 |ioComman|dContent|
|00005bf0| 73 2e 70 62 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |s.pb);..|..break;|
|00005c00| 0d 09 09 63 61 73 65 20 | 6b 43 6f 6e 74 72 6f 6c |...case |kControl|
|00005c10| 43 6f 6d 6d 61 6e 64 3a | 0d 09 09 09 2f 2f 2a 2a |Command:|....//**|
|00005c20| 20 53 79 73 44 65 62 75 | 67 53 74 72 28 22 5c 70 | SysDebu|gStr("\p|
|00005c30| 20 44 72 69 76 65 72 20 | 43 6f 6e 74 72 6f 6c 22 | Driver |Control"|
|00005c40| 29 3b 0d 09 09 09 4c 6f | 67 44 65 63 69 6d 61 6c |);....Lo|gDecimal|
|00005c50| 28 0d 09 09 09 09 28 28 | 43 6e 74 72 6c 50 61 72 |(.....((|CntrlPar|
|00005c60| 61 6d 20 2a 29 20 69 6f | 43 6f 6d 6d 61 6e 64 43 |am *) io|CommandC|
|00005c70| 6f 6e 74 65 6e 74 73 2e | 70 62 29 2d 3e 63 73 43 |ontents.|pb)->csC|
|00005c80| 6f 64 65 2c 20 22 5c 70 | 44 6f 44 72 69 76 65 72 |ode, "\p|DoDriver|
|00005c90| 49 4f 20 28 43 6f 6e 74 | 72 6f 6c 29 22 29 3b 0d |IO (Cont|rol)");.|
|00005ca0| 09 09 09 73 74 61 74 75 | 73 20 3d 20 44 72 69 76 |...statu|s = Driv|
|00005cb0| 65 72 43 6f 6e 74 72 6f | 6c 43 6d 64 28 0d 09 09 |erContro|lCmd(...|
|00005cc0| 09 09 09 09 61 64 64 72 | 65 73 73 53 70 61 63 65 |....addr|essSpace|
|00005cd0| 49 44 2c 0d 09 09 09 09 | 09 09 69 6f 43 6f 6d 6d |ID,.....|..ioComm|
|00005ce0| 61 6e 64 49 44 2c 0d 09 | 09 09 09 09 09 69 6f 43 |andID,..|.....ioC|
|00005cf0| 6f 6d 6d 61 6e 64 4b 69 | 6e 64 2c 0d 09 09 09 09 |ommandKi|nd,.....|
|00005d00| 09 09 28 43 6e 74 72 6c | 50 61 72 61 6d 20 2a 29 |..(Cntrl|Param *)|
|00005d10| 20 69 6f 43 6f 6d 6d 61 | 6e 64 43 6f 6e 74 65 6e | ioComma|ndConten|
|00005d20| 74 73 2e 70 62 0d 09 09 | 09 09 09 29 3b 0d 09 09 |ts.pb...|...);...|
|00005d30| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 6b |.break;.|..case k|
|00005d40| 53 74 61 74 75 73 43 6f | 6d 6d 61 6e 64 3a 0d 09 |StatusCo|mmand:..|
|00005d50| 09 09 2f 2f 2a 2a 20 53 | 79 73 44 65 62 75 67 53 |..//** S|ysDebugS|
|00005d60| 74 72 28 22 5c 70 20 44 | 72 69 76 65 72 20 53 74 |tr("\p D|river St|
|00005d70| 61 74 75 73 22 29 3b 0d | 09 09 09 4c 6f 67 44 65 |atus");.|...LogDe|
|00005d80| 63 69 6d 61 6c 28 0d 09 | 09 09 09 28 28 43 6e 74 |cimal(..|...((Cnt|
|00005d90| 72 6c 50 61 72 61 6d 20 | 2a 29 20 69 6f 43 6f 6d |rlParam |*) ioCom|
|00005da0| 6d 61 6e 64 43 6f 6e 74 | 65 6e 74 73 2e 70 62 29 |mandCont|ents.pb)|
|00005db0| 2d 3e 63 73 43 6f 64 65 | 2c 20 22 5c 70 44 6f 44 |->csCode|, "\pDoD|
|00005dc0| 72 69 76 65 72 49 4f 20 | 28 53 74 61 74 75 73 29 |riverIO |(Status)|
|00005dd0| 22 29 3b 0d 09 09 09 73 | 74 61 74 75 73 20 3d 20 |");....s|tatus = |
|00005de0| 44 72 69 76 65 72 53 74 | 61 74 75 73 43 6d 64 28 |DriverSt|atusCmd(|
|00005df0| 0d 09 09 09 09 09 09 69 | 6f 43 6f 6d 6d 61 6e 64 |.......i|oCommand|
|00005e00| 49 44 2c 0d 09 09 09 09 | 09 09 69 6f 43 6f 6d 6d |ID,.....|..ioComm|
|00005e10| 61 6e 64 4b 69 6e 64 2c | 0d 09 09 09 09 09 09 28 |andKind,|.......(|
|00005e20| 43 6e 74 72 6c 50 61 72 | 61 6d 20 2a 29 20 69 6f |CntrlPar|am *) io|
|00005e30| 43 6f 6d 6d 61 6e 64 43 | 6f 6e 74 65 6e 74 73 2e |CommandC|ontents.|
|00005e40| 70 62 0d 09 09 09 09 09 | 29 3b 0d 09 09 09 62 72 |pb......|);....br|
|00005e50| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 6b 52 65 61 |eak;...c|ase kRea|
|00005e60| 64 43 6f 6d 6d 61 6e 64 | 3a 0d 09 09 09 2f 2f 2a |dCommand|:....//*|
|00005e70| 2a 20 53 79 73 44 65 62 | 75 67 53 74 72 28 22 5c |* SysDeb|ugStr("\|
|00005e80| 70 20 44 72 69 76 65 72 | 20 52 65 61 64 22 29 3b |p Driver| Read");|
|00005e90| 0d 09 09 09 73 74 61 74 | 75 73 20 3d 20 44 72 69 |....stat|us = Dri|
|00005ea0| 76 65 72 52 65 61 64 43 | 6d 64 28 0d 09 09 09 09 |verReadC|md(.....|
|00005eb0| 09 09 61 64 64 72 65 73 | 73 53 70 61 63 65 49 44 |..addres|sSpaceID|
|00005ec0| 2c 0d 09 09 09 09 09 09 | 69 6f 43 6f 6d 6d 61 6e |,.......|ioComman|
|00005ed0| 64 49 44 2c 0d 09 09 09 | 09 09 09 69 6f 43 6f 6d |dID,....|...ioCom|
|00005ee0| 6d 61 6e 64 4b 69 6e 64 | 2c 0d 09 09 09 09 09 09 |mandKind|,.......|
|00005ef0| 69 6f 43 6f 6d 6d 61 6e | 64 43 6f 6e 74 65 6e 74 |ioComman|dContent|
|00005f00| 73 2e 70 62 0d 09 09 09 | 09 09 29 3b 0d 09 09 09 |s.pb....|..);....|
|00005f10| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 6b 57 |break;..|.case kW|
|00005f20| 72 69 74 65 43 6f 6d 6d | 61 6e 64 3a 0d 09 09 09 |riteComm|and:....|
|00005f30| 2f 2f 2a 2a 20 4c 6f 67 | 53 74 72 69 6e 67 28 22 |//** Log|String("|
|00005f40| 5c 70 20 44 72 69 76 65 | 72 20 57 72 69 74 65 22 |\p Drive|r Write"|
|00005f50| 29 3b 0d 09 09 09 73 74 | 61 74 75 73 20 3d 20 44 |);....st|atus = D|
|00005f60| 72 69 76 65 72 57 72 69 | 74 65 43 6d 64 28 0d 09 |riverWri|teCmd(..|
|00005f70| 09 09 09 09 09 61 64 64 | 72 65 73 73 53 70 61 63 |.....add|ressSpac|
|00005f80| 65 49 44 2c 0d 09 09 09 | 09 09 09 69 6f 43 6f 6d |eID,....|...ioCom|
|00005f90| 6d 61 6e 64 49 44 2c 0d | 09 09 09 09 09 09 69 6f |mandID,.|......io|
|00005fa0| 43 6f 6d 6d 61 6e 64 4b | 69 6e 64 2c 0d 09 09 09 |CommandK|ind,....|
|00005fb0| 09 09 09 69 6f 43 6f 6d | 6d 61 6e 64 43 6f 6e 74 |...ioCom|mandCont|
|00005fc0| 65 6e 74 73 2e 70 62 0d | 09 09 09 09 09 29 3b 0d |ents.pb.|.....);.|
|00005fd0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00005fe0| 20 6b 4b 69 6c 6c 49 4f | 43 6f 6d 6d 61 6e 64 3a | kKillIO|Command:|
|00005ff0| 09 09 09 09 2f 2a 20 41 | 6c 77 61 79 73 20 69 6d |..../* A|lways im|
|00006000| 6d 65 64 69 61 74 65 09 | 09 09 09 09 09 2a 2f 0d |mediate.|.....*/.|
|00006010| 09 09 09 2f 2f 2a 2a 20 | 53 79 73 44 65 62 75 67 |...//** |SysDebug|
|00006020| 53 74 72 28 22 5c 70 20 | 44 72 69 76 65 72 20 4b |Str("\p |Driver K|
|00006030| 69 6c 6c 69 6f 22 29 3b | 0d 09 09 09 4c 6f 67 53 |illio");|....LogS|
|00006040| 74 72 69 6e 67 28 22 5c | 70 44 6f 44 72 69 76 65 |tring("\|pDoDrive|
|00006050| 72 49 4f 20 28 4b 69 6c | 6c 49 4f 29 22 29 3b 0d |rIO (Kil|lIO)");.|
|00006060| 09 09 09 73 74 61 74 75 | 73 20 3d 20 44 72 69 76 |...statu|s = Driv|
|00006070| 65 72 4b 69 6c 6c 49 4f | 43 6d 64 28 69 6f 43 6f |erKillIO|Cmd(ioCo|
|00006080| 6d 6d 61 6e 64 43 6f 6e | 74 65 6e 74 73 2e 70 62 |mmandCon|tents.pb|
|00006090| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 64 |);....br|eak;...d|
|000060a0| 65 66 61 75 6c 74 3a 0d | 09 09 09 2f 2f 2a 2a 20 |efault:.|...//** |
|000060b0| 53 79 73 44 65 62 75 67 | 53 74 72 28 22 5c 70 20 |SysDebug|Str("\p |
|000060c0| 44 72 69 76 65 72 20 42 | 6f 67 75 73 22 29 3b 0d |Driver B|ogus");.|
|000060d0| 09 09 09 4c 6f 67 48 65 | 78 28 28 55 49 6e 74 33 |...LogHe|x((UInt3|
|000060e0| 32 29 20 69 6f 43 6f 6d | 6d 61 6e 64 43 6f 64 65 |2) ioCom|mandCode|
|000060f0| 2c 20 22 5c 70 55 6e 6b | 6e 6f 77 6e 20 44 6f 44 |, "\pUnk|nown DoD|
|00006100| 72 69 76 65 72 49 4f 20 | 49 4f 43 6f 6d 6d 61 6e |riverIO |IOComman|
|00006110| 64 43 6f 64 65 22 29 3b | 0d 09 09 09 73 74 61 74 |dCode");|....stat|
|00006120| 75 73 20 3d 20 70 61 72 | 61 6d 45 72 72 3b 0d 09 |us = par|amErr;..|
|00006130| 09 09 62 72 65 61 6b 3b | 0d 09 09 7d 0d 09 09 2f |..break;|...}.../|
|00006140| 2a 0d 09 09 20 2a 20 46 | 6f 72 63 65 20 61 20 76 |*... * F|orce a v|
|00006150| 61 6c 69 64 20 72 65 73 | 75 6c 74 20 66 6f 72 20 |alid res|ult for |
|00006160| 69 6d 6d 65 64 69 61 74 | 65 20 63 6f 6d 6d 61 6e |immediat|e comman|
|00006170| 64 73 20 2d 2d 20 74 68 | 65 79 20 6d 75 73 74 20 |ds -- th|ey must |
|00006180| 72 65 74 75 72 6e 20 61 | 20 76 61 6c 69 64 0d 09 |return a| valid..|
|00006190| 09 20 2a 20 73 74 61 74 | 75 73 20 74 6f 20 74 68 |. * stat|us to th|
|000061a0| 65 20 44 72 69 76 65 72 | 20 4d 61 6e 61 67 65 72 |e Driver| Manager|
|000061b0| 3a 20 72 65 74 75 72 6e | 69 6e 67 20 6b 49 4f 42 |: return|ing kIOB|
|000061c0| 75 73 79 53 74 61 74 75 | 73 20 77 6f 75 6c 64 20 |usyStatu|s would |
|000061d0| 62 65 20 61 20 62 75 67 | 2e 2e 0d 09 09 20 2a 20 |be a bug|..... * |
|000061e0| 4e 6f 6e 2d 69 6d 6d 65 | 64 69 61 74 65 20 63 6f |Non-imme|diate co|
|000061f0| 6d 6d 61 6e 64 73 20 72 | 65 74 75 72 6e 20 61 20 |mmands r|eturn a |
|00006200| 73 74 61 74 75 73 20 66 | 72 6f 6d 20 74 68 65 20 |status f|rom the |
|00006210| 6c 6f 77 65 72 2d 6c 65 | 76 65 6c 20 72 6f 75 74 |lower-le|vel rout|
|00006220| 69 6e 65 2e 20 49 66 20 | 74 68 65 0d 09 09 20 2a |ine. If |the... *|
|00006230| 20 73 74 61 74 75 73 20 | 69 73 20 6b 49 4f 42 75 | status |is kIOBu|
|00006240| 73 79 53 74 61 74 75 73 | 2c 20 77 65 20 6a 75 73 |syStatus|, we jus|
|00006250| 74 20 72 65 74 75 72 6e | 20 2d 2d 20 61 6e 20 61 |t return| -- an a|
|00006260| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 49 2f 4f 20 |synchron|ous I/O |
|00006270| 63 6f 6d 70 6c 65 74 69 | 6f 6e 0d 09 09 20 2a 20 |completi|on... * |
|00006280| 72 6f 75 74 69 6e 65 20 | 77 69 6c 6c 20 65 76 65 |routine |will eve|
|00006290| 6e 74 75 61 6c 6c 79 20 | 63 6f 6d 70 6c 65 74 65 |ntually |complete|
|000062a0| 20 74 68 65 20 72 65 71 | 75 65 73 74 2e 20 49 66 | the req|uest. If|
|000062b0| 20 69 74 27 73 20 73 6f | 6d 65 20 6f 74 68 65 72 | it's so|me other|
|000062c0| 20 73 74 61 74 75 73 2c | 20 74 68 65 0d 09 09 20 | status,| the... |
|000062d0| 2a 20 6c 6f 77 65 72 2d | 6c 65 76 65 6c 20 72 6f |* lower-|level ro|
|000062e0| 75 74 69 6e 65 20 68 61 | 73 20 63 6f 6d 70 6c 65 |utine ha|s comple|
|000062f0| 74 65 64 20 61 20 6e 6f | 6e 2d 69 6d 6d 65 64 69 |ted a no|n-immedi|
|00006300| 61 74 65 20 74 61 73 6b | 2c 20 73 6f 20 77 65 20 |ate task|, so we |
|00006310| 63 61 6c 6c 0d 09 09 20 | 2a 20 49 4f 43 6f 6d 6d |call... |* IOComm|
|00006320| 61 6e 64 49 73 43 6f 6d | 70 6c 65 74 65 20 61 6e |andIsCom|plete an|
|00006330| 64 20 72 65 74 75 72 6e | 20 69 74 73 20 28 70 72 |d return| its (pr|
|00006340| 65 73 75 6d 61 62 6c 79 | 20 6e 6f 45 72 72 29 20 |esumably| noErr) |
|00006350| 73 74 61 74 75 73 2e 0d | 09 09 20 2a 2f 0d 09 09 |status..|.. */...|
|00006360| 69 66 20 28 28 69 6f 43 | 6f 6d 6d 61 6e 64 4b 69 |if ((ioC|ommandKi|
|00006370| 6e 64 20 26 20 6b 49 6d | 6d 65 64 69 61 74 65 49 |nd & kIm|mediateI|
|00006380| 4f 43 6f 6d 6d 61 6e 64 | 4b 69 6e 64 29 20 21 3d |OCommand|Kind) !=|
|00006390| 20 30 29 20 7b 0d 09 09 | 09 3b 09 09 09 2f 2a 20 | 0) {...|.;.../* |
|000063a0| 49 6d 6d 65 64 69 61 74 | 65 20 63 6f 6d 6d 61 6e |Immediat|e comman|
|000063b0| 64 73 20 72 65 74 75 72 | 6e 20 74 68 65 20 6f 70 |ds retur|n the op|
|000063c0| 65 72 61 74 69 6f 6e 20 | 73 74 61 74 75 73 09 09 |eration |status..|
|000063d0| 2a 2f 0d 09 09 7d 0d 09 | 09 65 6c 73 65 20 69 66 |*/...}..|.else if|
|000063e0| 20 28 73 74 61 74 75 73 | 20 3d 3d 20 6b 49 4f 42 | (status| == kIOB|
|000063f0| 75 73 79 53 74 61 74 75 | 73 29 20 7b 0d 09 09 09 |usyStatu|s) {....|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.