home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Information / Digests / CSMP Digest / volume 3 / csmp-digest-v3-049 < prev    next >
Mailbox/MIME Entity  |  1995-12-31  |  110.9 KB  |  [TEXT/R*ch]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text, with CR line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[CR] default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[R*ch]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 52 65 63 65 69 76 65 64 | 2d 44 61 74 65 3a 20 4d |Received|-Date: M|
|00000010| 6f 6e 2c 20 38 20 41 75 | 67 20 31 39 39 34 20 31 |on, 8 Au|g 1994 1|
|00000020| 36 3a 31 34 3a 30 33 20 | 2b 30 32 30 30 0d 46 72 |6:14:03 |+0200.Fr|
|00000030| 6f 6d 3a 20 70 6f 74 74 | 69 65 72 40 63 6c 69 70 |om: pott|ier@clip|
|00000040| 70 65 72 2e 65 6e 73 2e | 66 72 20 28 46 72 61 6e |per.ens.|fr (Fran|
|00000050| 63 6f 69 73 20 50 6f 74 | 74 69 65 72 29 0d 53 75 |cois Pot|tier).Su|
|00000060| 62 6a 65 63 74 3a 20 63 | 73 6d 70 2d 64 69 67 65 |bject: c|smp-dige|
|00000070| 73 74 2d 76 33 2d 30 34 | 39 0d 54 6f 3a 20 63 73 |st-v3-04|9.To: cs|
|00000080| 6d 70 2d 64 69 67 65 73 | 74 40 65 6e 73 2e 66 72 |mp-diges|t@ens.fr|
|00000090| 0d 44 61 74 65 3a 20 4d | 6f 6e 2c 20 38 20 41 75 |.Date: M|on, 8 Au|
|000000a0| 67 20 31 39 39 34 20 31 | 36 3a 31 33 3a 35 36 20 |g 1994 1|6:13:56 |
|000000b0| 2b 30 32 30 30 20 28 4d | 45 54 20 44 53 54 29 0d |+0200 (M|ET DST).|
|000000c0| 58 2d 4d 61 69 6c 65 72 | 3a 20 45 4c 4d 20 5b 76 |X-Mailer|: ELM [v|
|000000d0| 65 72 73 69 6f 6e 20 32 | 2e 34 20 50 4c 32 33 5d |ersion 2|.4 PL23]|
|000000e0| 0d 4d 69 6d 65 2d 56 65 | 72 73 69 6f 6e 3a 20 31 |.Mime-Ve|rsion: 1|
|000000f0| 2e 30 0d 43 6f 6e 74 65 | 6e 74 2d 54 79 70 65 3a |.0.Conte|nt-Type:|
|00000100| 20 74 65 78 74 2f 70 6c | 61 69 6e 3b 20 63 68 61 | text/pl|ain; cha|
|00000110| 72 73 65 74 3d 49 53 4f | 2d 38 38 35 39 2d 31 0d |rset=ISO|-8859-1.|
|00000120| 43 6f 6e 74 65 6e 74 2d | 54 72 61 6e 73 66 65 72 |Content-|Transfer|
|00000130| 2d 45 6e 63 6f 64 69 6e | 67 3a 20 38 62 69 74 0d |-Encodin|g: 8bit.|
|00000140| 45 72 72 6f 72 73 2d 54 | 6f 3a 20 6c 69 73 74 6d |Errors-T|o: listm|
|00000150| 61 6e 40 65 6e 73 2e 66 | 72 0d 52 65 70 6c 79 2d |an@ens.f|r.Reply-|
|00000160| 54 6f 3a 20 70 6f 74 74 | 69 65 72 40 63 6c 69 70 |To: pott|ier@clip|
|00000170| 70 65 72 2e 65 6e 73 2e | 66 72 0d 58 2d 53 65 71 |per.ens.|fr.X-Seq|
|00000180| 75 65 6e 63 65 3a 20 35 | 34 0d 0d 43 2e 53 2e 4d |uence: 5|4..C.S.M|
|00000190| 2e 50 2e 20 44 69 67 65 | 73 74 20 20 20 20 20 20 |.P. Dige|st |
|000001a0| 20 20 20 20 20 20 20 4d | 6f 6e 2c 20 30 38 20 41 | M|on, 08 A|
|000001b0| 75 67 20 39 34 20 20 20 | 20 20 20 20 56 6f 6c 75 |ug 94 | Volu|
|000001c0| 6d 65 20 33 20 3a 20 49 | 73 73 75 65 20 34 39 0d |me 3 : I|ssue 49.|
|000001d0| 20 0d 54 6f 64 61 79 27 | 73 20 54 6f 70 69 63 73 | .Today'|s Topics|
|000001e0| 3a 0d 20 0d 20 20 20 20 | 20 20 20 20 43 4f 44 45 |:. . | CODE|
|000001f0| 20 72 65 73 6f 75 72 63 | 65 73 20 31 30 31 0d 20 | resourc|es 101. |
|00000200| 20 20 20 20 20 20 20 43 | 61 6e 20 49 20 64 6f 20 | C|an I do |
|00000210| 74 68 69 73 20 77 69 74 | 68 20 74 68 65 20 54 68 |this wit|h the Th|
|00000220| 72 65 61 64 20 4d 61 6e | 61 67 65 72 3f 0d 20 20 |read Man|ager?. |
|00000230| 20 20 20 20 20 20 44 69 | 63 65 20 52 6f 6c 6c 69 | Di|ce Rolli|
|00000240| 6e 67 20 2d 20 61 6e 73 | 77 65 72 73 0d 20 20 20 |ng - ans|wers. |
|00000250| 20 20 20 20 20 45 61 73 | 79 20 66 69 6c 65 20 61 | Eas|y file a|
|00000260| 63 63 65 73 73 20 66 75 | 6e 63 74 69 6f 6e 73 20 |ccess fu|nctions |
|00000270| 5b 73 6f 75 72 63 65 5d | 0d 20 20 20 20 20 20 20 |[source]|. |
|00000280| 20 48 6f 77 20 74 6f 20 | 64 65 74 65 63 74 20 77 | How to |detect w|
|00000290| 68 65 74 68 65 72 20 44 | 65 62 75 67 67 65 72 20 |hether D|ebugger |
|000002a0| 69 73 20 69 6e 73 74 61 | 6c 6c 65 64 3f 0d 20 20 |is insta|lled?. |
|000002b0| 20 20 20 20 20 20 51 3a | 20 43 6f 6e 76 65 72 74 | Q:| Convert|
|000002c0| 69 6e 67 20 50 42 20 74 | 6f 20 46 53 53 70 65 63 |ing PB t|o FSSpec|
|000002d0| 0d 20 20 20 20 20 20 20 | 20 51 3a 20 52 65 65 6e |. | Q: Reen|
|000002e0| 74 72 61 6e 63 79 20 61 | 6e 64 20 50 6f 77 65 72 |trancy a|nd Power|
|000002f0| 4d 61 63 20 52 75 6e 74 | 69 6d 65 20 4d 6f 64 65 |Mac Runt|ime Mode|
|00000300| 6c 0d 20 20 20 20 20 20 | 20 20 53 74 64 20 66 69 |l. | Std fi|
|00000310| 6c 74 65 72 20 70 72 6f | 63 20 74 72 61 73 68 65 |lter pro|c trashe|
|00000320| 73 20 72 65 67 69 73 74 | 65 72 20 44 33 21 0d 20 |s regist|er D3!. |
|00000330| 20 20 20 20 20 20 20 57 | 68 69 63 68 20 4e 49 4d | W|hich NIM|
|00000340| 20 66 6f 72 20 73 65 72 | 69 61 6c 20 70 6f 72 74 | for ser|ial port|
|00000350| 20 69 6e 66 6f 3f 0d 0d | 0d 0d 54 68 65 20 43 6f | info?..|..The Co|
|00000360| 6d 70 2e 53 79 73 2e 4d | 61 63 2e 50 72 6f 67 72 |mp.Sys.M|ac.Progr|
|00000370| 61 6d 6d 65 72 20 44 69 | 67 65 73 74 20 69 73 20 |ammer Di|gest is |
|00000380| 6d 6f 64 65 72 61 74 65 | 64 20 62 79 20 46 72 61 |moderate|d by Fra|
|00000390| 6e 63 6f 69 73 20 50 6f | 74 74 69 65 72 0d 28 70 |ncois Po|ttier.(p|
|000003a0| 6f 74 74 69 65 72 40 63 | 6c 69 70 70 65 72 2e 65 |ottier@c|lipper.e|
|000003b0| 6e 73 2e 66 72 29 2e 0d | 20 0d 54 68 65 20 64 69 |ns.fr)..| .The di|
|000003c0| 67 65 73 74 20 69 73 20 | 61 20 63 6f 6c 6c 65 63 |gest is |a collec|
|000003d0| 74 69 6f 6e 20 6f 66 20 | 61 72 74 69 63 6c 65 20 |tion of |article |
|000003e0| 74 68 72 65 61 64 73 20 | 66 72 6f 6d 20 74 68 65 |threads |from the|
|000003f0| 20 69 6e 74 65 72 6e 65 | 74 20 6e 65 77 73 67 72 | interne|t newsgr|
|00000400| 6f 75 70 0d 63 6f 6d 70 | 2e 73 79 73 2e 6d 61 63 |oup.comp|.sys.mac|
|00000410| 2e 70 72 6f 67 72 61 6d | 6d 65 72 2e 20 20 49 74 |.program|mer. It|
|00000420| 20 69 73 20 64 65 73 69 | 67 6e 65 64 20 66 6f 72 | is desi|gned for|
|00000430| 20 70 65 6f 70 6c 65 20 | 77 68 6f 20 72 65 61 64 | people |who read|
|00000440| 20 63 2e 73 2e 6d 2e 70 | 2e 20 73 65 6d 69 2d 0d | c.s.m.p|. semi-.|
|00000450| 72 65 67 75 6c 61 72 6c | 79 20 61 6e 64 20 77 61 |regularl|y and wa|
|00000460| 6e 74 20 61 6e 20 61 72 | 63 68 69 76 65 20 6f 66 |nt an ar|chive of|
|00000470| 20 74 68 65 20 64 69 73 | 63 75 73 73 69 6f 6e 73 | the dis|cussions|
|00000480| 2e 20 20 49 66 20 79 6f | 75 20 64 6f 6e 27 74 20 |. If yo|u don't |
|00000490| 6b 6e 6f 77 20 77 68 61 | 74 20 61 0d 6e 65 77 73 |know wha|t a.news|
|000004a0| 67 72 6f 75 70 20 69 73 | 2c 20 79 6f 75 20 70 72 |group is|, you pr|
|000004b0| 6f 62 61 62 6c 79 20 64 | 6f 6e 27 74 20 68 61 76 |obably d|on't hav|
|000004c0| 65 20 61 63 63 65 73 73 | 20 74 6f 20 69 74 2e 20 |e access| to it. |
|000004d0| 20 41 73 6b 20 79 6f 75 | 72 20 73 79 73 74 65 6d | Ask you|r system|
|000004e0| 73 0d 61 64 6d 69 6e 69 | 73 74 72 61 74 6f 72 28 |s.admini|strator(|
|000004f0| 73 29 20 66 6f 72 20 64 | 65 74 61 69 6c 73 2e 20 |s) for d|etails. |
|00000500| 20 49 66 20 79 6f 75 20 | 64 6f 6e 27 74 20 68 61 | If you |don't ha|
|00000510| 76 65 20 61 63 63 65 73 | 73 20 74 6f 20 6e 65 77 |ve acces|s to new|
|00000520| 73 2c 20 79 6f 75 20 6d | 61 79 0d 73 74 69 6c 6c |s, you m|ay.still|
|00000530| 20 62 65 20 61 62 6c 65 | 20 74 6f 20 70 6f 73 74 | be able| to post|
|00000540| 20 6d 65 73 73 61 67 65 | 73 20 74 6f 20 74 68 65 | message|s to the|
|00000550| 20 67 72 6f 75 70 20 62 | 79 20 75 73 69 6e 67 20 | group b|y using |
|00000560| 61 20 6d 61 69 6c 20 73 | 65 72 76 65 72 20 6c 69 |a mail s|erver li|
|00000570| 6b 65 0d 61 6e 6f 6e 2e | 70 65 6e 65 74 2e 66 69 |ke.anon.|penet.fi|
|00000580| 20 28 6d 61 69 6c 20 68 | 65 6c 70 40 61 6e 6f 6e | (mail h|elp@anon|
|00000590| 2e 70 65 6e 65 74 2e 66 | 69 20 66 6f 72 20 6d 6f |.penet.f|i for mo|
|000005a0| 72 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 29 2e |re infor|mation).|
|000005b0| 0d 20 0d 45 61 63 68 20 | 69 73 73 75 65 20 6f 66 |. .Each |issue of|
|000005c0| 20 74 68 65 20 64 69 67 | 65 73 74 20 63 6f 6e 74 | the dig|est cont|
|000005d0| 61 69 6e 73 20 6f 6e 65 | 20 6f 72 20 6d 6f 72 65 |ains one| or more|
|000005e0| 20 73 65 74 73 20 6f 66 | 20 61 72 74 69 63 6c 65 | sets of| article|
|000005f0| 73 20 28 63 61 6c 6c 65 | 64 0d 74 68 72 65 61 64 |s (calle|d.thread|
|00000600| 73 29 2c 20 77 69 74 68 | 20 65 61 63 68 20 73 65 |s), with| each se|
|00000610| 74 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |t corres|ponding |
|00000620| 74 6f 20 61 20 27 64 69 | 73 63 75 73 73 69 6f 6e |to a 'di|scussion|
|00000630| 27 20 6f 66 20 61 20 70 | 61 72 74 69 63 75 6c 61 |' of a p|articula|
|00000640| 72 0d 73 75 62 6a 65 63 | 74 2e 20 20 54 68 65 20 |r.subjec|t. The |
|00000650| 61 72 74 69 63 6c 65 73 | 20 61 72 65 20 6e 6f 74 |articles| are not|
|00000660| 20 65 64 69 74 65 64 3b | 20 61 6c 6c 20 61 72 74 | edited;| all art|
|00000670| 69 63 6c 65 73 20 69 6e | 63 6c 75 64 65 64 20 69 |icles in|cluded i|
|00000680| 6e 20 74 68 69 73 20 64 | 69 67 65 73 74 0d 61 72 |n this d|igest.ar|
|00000690| 65 20 69 6e 20 74 68 65 | 69 72 20 6f 72 69 67 69 |e in the|ir origi|
|000006a0| 6e 61 6c 20 70 6f 73 74 | 65 64 20 66 6f 72 6d 20 |nal post|ed form |
|000006b0| 28 61 73 20 72 65 63 65 | 69 76 65 64 20 62 79 20 |(as rece|ived by |
|000006c0| 6f 75 72 20 6e 65 77 73 | 20 73 65 72 76 65 72 20 |our news| server |
|000006d0| 61 74 0d 6e 65 66 2e 65 | 6e 73 2e 66 72 29 2e 20 |at.nef.e|ns.fr). |
|000006e0| 20 41 72 74 69 63 6c 65 | 20 74 68 72 65 61 64 73 | Article| threads|
|000006f0| 20 61 72 65 20 6e 6f 74 | 20 61 64 64 65 64 20 74 | are not| added t|
|00000700| 6f 20 74 68 65 20 64 69 | 67 65 73 74 20 75 6e 74 |o the di|gest unt|
|00000710| 69 6c 20 74 68 65 20 6c | 61 73 74 0d 61 72 74 69 |il the l|ast.arti|
|00000720| 63 6c 65 20 61 64 64 65 | 64 20 74 6f 20 74 68 65 |cle adde|d to the|
|00000730| 20 74 68 72 65 61 64 20 | 69 73 20 61 74 20 6c 65 | thread |is at le|
|00000740| 61 73 74 20 74 77 6f 20 | 77 65 65 6b 73 20 6f 6c |ast two |weeks ol|
|00000750| 64 20 28 74 68 69 73 20 | 69 73 20 74 6f 20 65 6e |d (this |is to en|
|00000760| 73 75 72 65 20 74 68 61 | 74 0d 74 68 65 20 74 68 |sure tha|t.the th|
|00000770| 72 65 61 64 20 69 73 20 | 64 65 61 64 20 62 65 66 |read is |dead bef|
|00000780| 6f 72 65 20 61 64 64 69 | 6e 67 20 69 74 20 74 6f |ore addi|ng it to|
|00000790| 20 74 68 65 20 64 69 67 | 65 73 74 29 2e 20 20 41 | the dig|est). A|
|000007a0| 72 74 69 63 6c 65 20 74 | 68 72 65 61 64 73 20 74 |rticle t|hreads t|
|000007b0| 68 61 74 0d 63 6f 6e 73 | 69 73 74 20 6f 66 20 6f |hat.cons|ist of o|
|000007c0| 6e 6c 79 20 6f 6e 65 20 | 6d 65 73 73 61 67 65 20 |nly one |message |
|000007d0| 61 72 65 20 67 65 6e 65 | 72 61 6c 6c 79 20 6e 6f |are gene|rally no|
|000007e0| 74 20 69 6e 63 6c 75 64 | 65 64 20 69 6e 20 74 68 |t includ|ed in th|
|000007f0| 65 20 64 69 67 65 73 74 | 2e 0d 0d 54 68 65 20 64 |e digest|...The d|
|00000800| 69 67 65 73 74 20 69 73 | 20 6f 66 66 69 63 69 61 |igest is| officia|
|00000810| 6c 6c 79 20 64 69 73 74 | 72 69 62 75 74 65 64 20 |lly dist|ributed |
|00000820| 62 79 20 74 77 6f 20 6d | 65 61 6e 73 2c 20 62 79 |by two m|eans, by|
|00000830| 20 65 6d 61 69 6c 20 61 | 6e 64 20 66 74 70 2e 0d | email a|nd ftp..|
|00000840| 0d 49 66 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |.If you |want to |
|00000850| 72 65 63 65 69 76 65 20 | 74 68 65 20 64 69 67 65 |receive |the dige|
|00000860| 73 74 20 62 79 20 6d 61 | 69 6c 2c 20 73 65 6e 64 |st by ma|il, send|
|00000870| 20 65 6d 61 69 6c 20 74 | 6f 20 6c 69 73 74 73 65 | email t|o listse|
|00000880| 72 76 40 65 6e 73 2e 66 | 72 0d 77 69 74 68 20 6e |rv@ens.f|r.with n|
|00000890| 6f 20 73 75 62 6a 65 63 | 74 20 61 6e 64 20 6f 6e |o subjec|t and on|
|000008a0| 65 20 6f 66 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |e of the| followi|
|000008b0| 6e 67 20 63 6f 6d 6d 61 | 6e 64 73 20 61 73 20 62 |ng comma|nds as b|
|000008c0| 6f 64 79 3a 0d 20 20 20 | 20 68 65 6c 70 09 09 20 |ody:. | help.. |
|000008d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 53 | | S|
|000008e0| 65 6e 64 73 20 79 6f 75 | 20 61 20 73 75 6d 6d 61 |ends you| a summa|
|000008f0| 72 79 20 6f 66 20 63 6f | 6d 6d 61 6e 64 73 0d 20 |ry of co|mmands. |
|00000900| 20 20 20 73 75 62 73 63 | 72 69 62 65 20 63 73 6d | subsc|ribe csm|
|00000910| 70 2d 64 69 67 65 73 74 | 20 59 6f 75 72 20 4e 61 |p-digest| Your Na|
|00000920| 6d 65 09 41 64 64 73 20 | 79 6f 75 20 74 6f 20 74 |me.Adds |you to t|
|00000930| 68 65 20 6d 61 69 6c 69 | 6e 67 20 6c 69 73 74 0d |he maili|ng list.|
|00000940| 20 20 20 20 73 69 67 6e | 6f 66 66 20 63 73 6d 70 | sign|off csmp|
|00000950| 2d 64 69 67 65 73 74 09 | 09 09 52 65 6d 6f 76 65 |-digest.|..Remove|
|00000960| 73 20 79 6f 75 20 66 72 | 6f 6d 20 74 68 65 20 6c |s you fr|om the l|
|00000970| 69 73 74 0d 4f 6e 63 65 | 20 79 6f 75 20 68 61 76 |ist.Once| you hav|
|00000980| 65 20 73 75 62 73 63 72 | 69 62 65 64 2c 20 79 6f |e subscr|ibed, yo|
|00000990| 75 20 77 69 6c 6c 20 61 | 75 74 6f 6d 61 74 69 63 |u will a|utomatic|
|000009a0| 61 6c 6c 79 20 72 65 63 | 65 69 76 65 20 65 61 63 |ally rec|eive eac|
|000009b0| 68 20 6e 65 77 0d 69 73 | 73 75 65 20 61 73 20 69 |h new.is|sue as i|
|000009c0| 74 20 69 73 20 63 72 65 | 61 74 65 64 2e 0d 0d 54 |t is cre|ated...T|
|000009d0| 68 65 20 6f 66 66 69 63 | 69 61 6c 20 66 74 70 20 |he offic|ial ftp |
|000009e0| 69 6e 66 6f 20 69 73 20 | 2f 2f 66 74 70 2e 64 61 |info is |//ftp.da|
|000009f0| 72 74 6d 6f 75 74 68 2e | 65 64 75 2f 70 75 62 2f |rtmouth.|edu/pub/|
|00000a00| 63 73 6d 70 2d 64 69 67 | 65 73 74 2e 0d 51 75 65 |csmp-dig|est..Que|
|00000a10| 73 74 69 6f 6e 73 20 72 | 65 6c 61 74 65 64 20 74 |stions r|elated t|
|00000a20| 6f 20 74 68 65 20 66 74 | 70 20 73 69 74 65 20 73 |o the ft|p site s|
|00000a30| 68 6f 75 6c 64 20 62 65 | 20 64 69 72 65 63 74 65 |hould be| directe|
|00000a40| 64 20 74 6f 0d 73 63 6f | 74 74 2e 73 69 6c 76 65 |d to.sco|tt.silve|
|00000a50| 72 40 64 61 72 74 6d 6f | 75 74 68 2e 65 64 75 2e |r@dartmo|uth.edu.|
|00000a60| 20 43 75 72 72 65 6e 74 | 6c 79 20 6e 6f 20 70 72 | Current|ly no pr|
|00000a70| 65 76 69 6f 75 73 20 76 | 6f 6c 75 6d 65 73 20 6f |evious v|olumes o|
|00000a80| 66 20 74 68 65 20 43 53 | 4d 50 0d 64 69 67 65 73 |f the CS|MP.diges|
|00000a90| 74 20 61 72 65 20 61 76 | 61 69 6c 61 62 6c 65 20 |t are av|ailable |
|00000aa0| 74 68 65 72 65 2e 0d 0d | 41 6c 73 6f 2c 20 74 68 |there...|Also, th|
|00000ab0| 65 20 64 69 67 65 73 74 | 73 20 61 72 65 20 61 76 |e digest|s are av|
|00000ac0| 61 69 6c 61 62 6c 65 20 | 74 6f 20 57 41 49 53 20 |ailable |to WAIS |
|00000ad0| 75 73 65 72 73 2e 20 20 | 54 6f 20 73 65 61 72 63 |users. |To searc|
|00000ae0| 68 20 62 61 63 6b 20 69 | 73 73 75 65 73 0d 77 69 |h back i|ssues.wi|
|00000af0| 74 68 20 57 41 49 53 2c | 20 75 73 65 20 63 6f 6d |th WAIS,| use com|
|00000b00| 70 2e 73 79 73 2e 6d 61 | 63 2e 70 72 6f 67 72 61 |p.sys.ma|c.progra|
|00000b10| 6d 6d 65 72 2e 73 72 63 | 2e 20 57 69 74 68 20 4d |mmer.src|. With M|
|00000b20| 6f 73 61 69 63 2c 20 75 | 73 65 0d 68 74 74 70 3a |osaic, u|se.http:|
|00000b30| 2f 2f 77 77 77 2e 77 61 | 69 73 2e 63 6f 6d 2f 77 |//www.wa|is.com/w|
|00000b40| 61 69 73 2d 64 62 73 2f | 63 6f 6d 70 2e 73 79 73 |ais-dbs/|comp.sys|
|00000b50| 2e 6d 61 63 2e 70 72 6f | 67 72 61 6d 6d 65 72 2e |.mac.pro|grammer.|
|00000b60| 68 74 6d 6c 2e 0d 0d 0d | 2d 2d 2d 2d 2d 2d 2d 2d |html....|--------|
|00000b70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00000ba0| 0d 3e 46 72 6f 6d 20 69 | 6b 62 5f 6d 61 63 64 40 |.>From i|kb_macd@|
|00000bb0| 45 43 45 2e 43 6f 6e 63 | 6f 72 64 69 61 2e 43 41 |ECE.Conc|ordia.CA|
|00000bc0| 20 28 4b 65 69 74 68 20 | 4d 61 63 44 6f 6e 61 6c | (Keith |MacDonal|
|00000bd0| 64 29 0d 53 75 62 6a 65 | 63 74 3a 20 43 4f 44 45 |d).Subje|ct: CODE|
|00000be0| 20 72 65 73 6f 75 72 63 | 65 73 20 31 30 31 0d 44 | resourc|es 101.D|
|00000bf0| 61 74 65 3a 20 46 72 69 | 2c 20 31 35 20 4a 75 6c |ate: Fri|, 15 Jul|
|00000c00| 20 31 39 39 34 20 30 35 | 3a 33 30 3a 35 30 20 47 | 1994 05|:30:50 G|
|00000c10| 4d 54 0d 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |MT.Organ|ization:|
|00000c20| 20 45 43 45 20 2d 20 43 | 6f 6e 63 6f 72 64 69 61 | ECE - C|oncordia|
|00000c30| 20 55 6e 69 76 65 72 73 | 69 74 79 0d 0d 0d 49 27 | Univers|ity...I'|
|00000c40| 64 20 6c 69 6b 65 20 74 | 6f 20 62 65 20 61 62 6c |d like t|o be abl|
|00000c50| 65 20 74 6f 20 64 69 73 | 74 72 69 62 75 74 65 20 |e to dis|tribute |
|00000c60| 66 69 6c 65 73 20 28 61 | 6b 61 20 70 6c 75 67 2d |files (a|ka plug-|
|00000c70| 69 6e 73 29 20 74 6f 20 | 61 64 64 20 66 65 61 74 |ins) to |add feat|
|00000c80| 75 72 65 73 0d 74 6f 20 | 61 20 70 72 6f 67 72 61 |ures.to |a progra|
|00000c90| 6d 20 49 27 6d 20 77 6f | 72 6b 69 6e 67 20 6f 6e |m I'm wo|rking on|
|00000ca0| 2e 20 20 54 68 65 73 65 | 20 66 69 6c 65 73 20 77 |. These| files w|
|00000cb0| 6f 75 6c 64 20 28 49 20 | 61 73 73 75 6d 65 29 20 |ould (I |assume) |
|00000cc0| 63 6f 6e 74 61 69 6e 20 | 63 6f 64 65 20 0d 72 65 |contain |code .re|
|00000cd0| 73 6f 75 72 63 65 73 2e | 20 20 49 27 76 65 20 6e |sources.| I've n|
|00000ce0| 6f 74 20 62 65 65 6e 20 | 61 62 6c 65 20 74 6f 20 |ot been |able to |
|00000cf0| 66 69 6e 64 20 61 6e 79 | 20 65 78 61 6d 70 6c 65 |find any| example|
|00000d00| 73 20 6f 72 20 63 6c 65 | 61 72 20 64 65 73 63 72 |s or cle|ar descr|
|00000d10| 69 70 74 69 6f 6e 0d 6f | 66 20 77 68 61 74 20 49 |iption.o|f what I|
|00000d20| 20 6e 65 65 64 20 74 6f | 20 64 6f 20 74 6f 20 61 | need to| do to a|
|00000d30| 63 68 69 65 76 65 20 74 | 68 69 73 2e 20 20 49 27 |chieve t|his. I'|
|00000d40| 6d 20 75 73 69 6e 67 20 | 50 61 73 63 61 6c 2c 20 |m using |Pascal, |
|00000d50| 62 75 74 20 49 20 69 6d | 61 67 69 6e 65 0d 43 20 |but I im|agine.C |
|00000d60| 77 6f 72 6b 73 20 69 6e | 20 61 20 73 69 6d 69 6c |works in| a simil|
|00000d70| 61 72 20 6d 61 6e 6e 65 | 72 2e 0d 0d 41 6c 73 6f |ar manne|r...Also|
|00000d80| 20 72 65 6c 61 74 65 64 | 20 74 6f 20 63 6f 64 65 | related| to code|
|00000d90| 20 72 65 73 6f 75 72 63 | 65 73 20 2d 0d 09 77 6f | resourc|es -..wo|
|00000da0| 75 6c 64 20 69 74 20 62 | 65 20 70 6f 73 73 69 62 |uld it b|e possib|
|00000db0| 6c 65 20 74 6f 20 68 61 | 76 65 20 61 20 43 20 50 |le to ha|ve a C P|
|00000dc0| 50 43 20 6e 61 74 69 76 | 65 20 63 6f 64 65 20 72 |PC nativ|e code r|
|00000dd0| 65 73 6f 75 72 63 65 20 | 75 73 65 64 20 62 79 0d |esource |used by.|
|00000de0| 09 61 20 6e 6f 6e 2d 6e | 61 74 69 76 65 20 28 77 |.a non-n|ative (w|
|00000df0| 72 69 74 74 65 6e 20 69 | 6e 20 54 68 69 6e 6b 20 |ritten i|n Think |
|00000e00| 50 61 73 63 61 6c 29 20 | 61 70 70 6c 69 63 61 74 |Pascal) |applicat|
|00000e10| 69 6f 6e 3f 0d 0d 54 68 | 61 6e 6b 73 2c 0d 4b 65 |ion?..Th|anks,.Ke|
|00000e20| 69 74 68 0d 2e 2e 2e 2e | 2e 2e 2e 2e 2e 2e 2e 2e |ith.....|........|
|00000e30| 2e 2e 2e 2e 2e 2e 2e 2e | 2e 2e 2e 2e 2e 2e 2e 2e |........|........|
|00000e40| 2e 2e 2e 2e 2e 2e 2e 2e | 2e 2e 2e 2e 2e 2e 2e 2e |........|........|
|00000e50| 2e 2e 2e 2e 2e 2e 2e 2e | 2e 2e 2e 2e 2e 2e 2e 2e |........|........|
|00000e60| 2e 2e 2e 2e 2e 2e 2e 2e | 2e 2e 2e 2e 2e 2e 2e 2e |........|........|
|00000e70| 2e 2e 0d 4b 65 69 74 68 | 20 4d 61 63 44 6f 6e 61 |...Keith| MacDona|
|00000e80| 6c 64 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ld | |
|00000e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ea0| 20 20 20 20 20 41 20 62 | 72 69 64 67 65 20 69 73 | A b|ridge is|
|00000eb0| 20 6e 6f 74 20 61 20 68 | 69 67 68 20 70 6c 61 63 | not a h|igh plac|
|00000ec0| 65 20 0d 69 6b 62 5f 6d | 61 63 64 40 65 63 65 2e |e .ikb_m|acd@ece.|
|00000ed0| 63 6f 6e 63 6f 72 64 69 | 61 2e 63 61 20 20 20 20 |concordi|a.ca |
|00000ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ef0| 20 20 20 20 20 20 20 20 | 20 20 20 54 68 65 20 66 | | The f|
|00000f00| 69 66 74 79 2d 73 65 63 | 6f 6e 64 20 66 6c 6f 6f |ifty-sec|ond floo|
|00000f10| 72 0d 43 6f 6d 70 75 74 | 65 72 20 45 6e 67 69 6e |r.Comput|er Engin|
|00000f20| 65 65 72 69 6e 67 20 20 | 20 20 20 20 20 20 20 20 |eering | |
|00000f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 49 | | I|
|00000f50| 63 61 72 75 73 20 77 6f | 75 6c 64 20 6b 6e 6f 77 |carus wo|uld know|
|00000f60| 0d 43 6f 6e 63 6f 72 64 | 69 61 20 55 6e 69 76 65 |.Concord|ia Unive|
|00000f70| 72 73 69 74 79 20 20 20 | 20 20 20 20 20 20 20 20 |rsity | |
|00000f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f90| 20 20 20 41 20 6d 6f 75 | 6e 74 61 69 6e 20 69 73 | A mou|ntain is|
|00000fa0| 6e 27 74 20 66 61 72 20 | 74 6f 20 66 61 6c 6c 0d |n't far |to fall.|
|00000fb0| 4d 6f 6e 74 72 65 61 6c | 2c 20 51 43 2c 20 43 41 |Montreal|, QC, CA|
|00000fc0| 4e 41 44 41 20 20 20 20 | 20 20 20 20 20 20 20 20 |NADA | |
|00000fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 57 68 | | Wh|
|00000fe0| 65 6e 20 79 6f 75 27 76 | 65 20 66 61 6c 6c 65 6e |en you'v|e fallen|
|00000ff0| 20 66 72 6f 6d 20 74 68 | 65 20 6d 6f 6f 6e 0d 20 | from th|e moon. |
|00001000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001040| 20 20 2d 20 4d 61 72 69 | 6c 6c 69 6f 6e 20 0d 0d | - Mari|llion ..|
|00001050| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00001060| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 0d 0d 3e 46 72 |++++++++|+++..>Fr|
|00001070| 6f 6d 20 6d 61 74 68 65 | 77 73 40 6e 73 39 30 30 |om mathe|ws@ns900|
|00001080| 30 2e 66 75 72 6d 61 6e | 2e 65 64 75 20 28 4f 77 |0.furman|.edu (Ow|
|00001090| 65 6e 20 4d 61 74 68 65 | 77 73 29 0d 44 61 74 65 |en Mathe|ws).Date|
|000010a0| 3a 20 31 35 20 4a 75 6c | 20 31 39 39 34 20 31 37 |: 15 Jul| 1994 17|
|000010b0| 3a 30 33 3a 34 34 20 47 | 4d 54 0d 4f 72 67 61 6e |:03:44 G|MT.Organ|
|000010c0| 69 7a 61 74 69 6f 6e 3a | 20 66 75 72 6d 61 6e 20 |ization:| furman |
|000010d0| 75 6e 69 76 65 72 73 69 | 74 79 20 63 6f 6d 70 75 |universi|ty compu|
|000010e0| 74 69 6e 67 20 63 65 6e | 74 65 72 0d 0d 4b 65 69 |ting cen|ter..Kei|
|000010f0| 74 68 20 4d 61 63 44 6f | 6e 61 6c 64 20 28 69 6b |th MacDo|nald (ik|
|00001100| 62 5f 6d 61 63 64 40 45 | 43 45 2e 43 6f 6e 63 6f |b_macd@E|CE.Conco|
|00001110| 72 64 69 61 2e 43 41 29 | 20 77 72 6f 74 65 3a 0d |rdia.CA)| wrote:.|
|00001120| 0d 3a 20 49 27 64 20 6c | 69 6b 65 20 74 6f 20 62 |.: I'd l|ike to b|
|00001130| 65 20 61 62 6c 65 20 74 | 6f 20 64 69 73 74 72 69 |e able t|o distri|
|00001140| 62 75 74 65 20 66 69 6c | 65 73 20 28 61 6b 61 20 |bute fil|es (aka |
|00001150| 70 6c 75 67 2d 69 6e 73 | 29 20 74 6f 20 61 64 64 |plug-ins|) to add|
|00001160| 20 66 65 61 74 75 72 65 | 73 0d 3a 20 74 6f 20 61 | feature|s.: to a|
|00001170| 20 70 72 6f 67 72 61 6d | 20 49 27 6d 20 77 6f 72 | program| I'm wor|
|00001180| 6b 69 6e 67 20 6f 6e 2e | 20 20 54 68 65 73 65 20 |king on.| These |
|00001190| 66 69 6c 65 73 20 77 6f | 75 6c 64 20 28 49 20 61 |files wo|uld (I a|
|000011a0| 73 73 75 6d 65 29 20 63 | 6f 6e 74 61 69 6e 20 63 |ssume) c|ontain c|
|000011b0| 6f 64 65 20 0d 3a 20 72 | 65 73 6f 75 72 63 65 73 |ode .: r|esources|
|000011c0| 2e 20 20 49 27 76 65 20 | 6e 6f 74 20 62 65 65 6e |. I've |not been|
|000011d0| 20 61 62 6c 65 20 74 6f | 20 66 69 6e 64 20 61 6e | able to| find an|
|000011e0| 79 20 65 78 61 6d 70 6c | 65 73 20 6f 72 20 63 6c |y exampl|es or cl|
|000011f0| 65 61 72 20 64 65 73 63 | 72 69 70 74 69 6f 6e 0d |ear desc|ription.|
|00001200| 3a 20 6f 66 20 77 68 61 | 74 20 49 20 6e 65 65 64 |: of wha|t I need|
|00001210| 20 74 6f 20 64 6f 20 74 | 6f 20 61 63 68 69 65 76 | to do t|o achiev|
|00001220| 65 20 74 68 69 73 2e 20 | 20 49 27 6d 20 75 73 69 |e this. | I'm usi|
|00001230| 6e 67 20 50 61 73 63 61 | 6c 2c 20 62 75 74 20 49 |ng Pasca|l, but I|
|00001240| 20 69 6d 61 67 69 6e 65 | 0d 3a 20 43 20 77 6f 72 | imagine|.: C wor|
|00001250| 6b 73 20 69 6e 20 61 20 | 73 69 6d 69 6c 61 72 20 |ks in a |similar |
|00001260| 6d 61 6e 6e 65 72 2e 0d | 0d 3a 20 41 6c 73 6f 20 |manner..|.: Also |
|00001270| 72 65 6c 61 74 65 64 20 | 74 6f 20 63 6f 64 65 20 |related |to code |
|00001280| 72 65 73 6f 75 72 63 65 | 73 20 2d 0d 3a 20 09 77 |resource|s -.: .w|
|00001290| 6f 75 6c 64 20 69 74 20 | 62 65 20 70 6f 73 73 69 |ould it |be possi|
|000012a0| 62 6c 65 20 74 6f 20 68 | 61 76 65 20 61 20 43 20 |ble to h|ave a C |
|000012b0| 50 50 43 20 6e 61 74 69 | 76 65 20 63 6f 64 65 20 |PPC nati|ve code |
|000012c0| 72 65 73 6f 75 72 63 65 | 20 75 73 65 64 20 62 79 |resource| used by|
|000012d0| 0d 3a 20 09 61 20 6e 6f | 6e 2d 6e 61 74 69 76 65 |.: .a no|n-native|
|000012e0| 20 28 77 72 69 74 74 65 | 6e 20 69 6e 20 54 68 69 | (writte|n in Thi|
|000012f0| 6e 6b 20 50 61 73 63 61 | 6c 29 20 61 70 70 6c 69 |nk Pasca|l) appli|
|00001300| 63 61 74 69 6f 6e 3f 0d | 0d 55 73 69 6e 67 20 63 |cation?.|.Using c|
|00001310| 6f 64 65 20 72 65 73 6f | 75 72 63 65 73 20 74 6f |ode reso|urces to|
|00001320| 20 61 64 64 20 66 75 6e | 63 74 69 6f 6e 61 6c 69 | add fun|ctionali|
|00001330| 74 79 20 74 6f 20 61 6e | 20 65 78 69 73 74 69 6e |ty to an| existin|
|00001340| 67 20 70 72 6f 67 72 61 | 6d 20 64 6f 65 73 6e 27 |g progra|m doesn'|
|00001350| 74 0d 72 65 71 75 69 72 | 65 20 74 6f 6f 20 6d 75 |t.requir|e too mu|
|00001360| 63 68 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 2e |ch modif|ication.|
|00001370| 20 20 59 6f 75 20 63 61 | 6e 20 22 63 61 6c 6c 22 | You ca|n "call"|
|00001380| 20 61 20 63 6f 64 65 20 | 72 65 73 6f 75 72 63 65 | a code |resource|
|00001390| 20 6a 75 73 74 20 6c 69 | 6b 65 0d 63 61 6c 6c 69 | just li|ke.calli|
|000013a0| 6e 67 20 61 20 66 75 6e | 63 74 69 6f 6e 20 28 73 |ng a fun|ction (s|
|000013b0| 65 65 20 63 6f 64 65 20 | 65 78 61 6d 70 6c 65 20 |ee code |example |
|000013c0| 62 65 6c 6f 77 29 2e 20 | 20 54 68 65 20 6d 61 69 |below). | The mai|
|000013d0| 6e 20 63 6f 6e 63 65 70 | 74 20 74 6f 20 75 6e 64 |n concep|t to und|
|000013e0| 65 72 2d 0d 73 74 61 6e | 64 20 69 73 20 74 68 61 |er-.stan|d is tha|
|000013f0| 74 20 63 6f 64 65 20 72 | 65 73 6f 75 72 63 65 73 |t code r|esources|
|00001400| 20 63 61 6e 20 62 65 20 | 63 6f 6d 70 69 6c 65 64 | can be |compiled|
|00001410| 20 66 72 6f 6d 20 73 6f | 75 63 65 20 66 69 6c 65 | from so|uce file|
|00001420| 73 20 6a 75 73 74 20 61 | 73 0d 61 6e 20 61 70 70 |s just a|s.an app|
|00001430| 6c 69 63 61 74 69 6f 6e | 20 63 61 6e 20 62 65 2e |lication| can be.|
|00001440| 20 20 54 68 65 20 63 6f | 6d 70 69 6c 65 72 20 73 | The co|mpiler s|
|00001450| 68 6f 75 6c 64 20 6c 65 | 74 20 79 6f 75 20 64 6f |hould le|t you do|
|00001460| 20 74 68 69 73 20 77 68 | 65 6e 20 79 6f 75 20 61 | this wh|en you a|
|00001470| 72 65 0d 73 65 74 74 69 | 6e 67 20 61 6c 6c 20 6f |re.setti|ng all o|
|00001480| 66 20 74 68 65 20 6f 70 | 74 69 6f 6e 73 20 66 6f |f the op|tions fo|
|00001490| 72 20 63 6f 6d 70 69 6c | 69 6e 67 20 61 6e 64 20 |r compil|ing and |
|000014a0| 6c 69 6e 6b 69 6e 67 20 | 28 69 6e 20 53 43 2b 2b |linking |(in SC++|
|000014b0| 2c 20 74 68 65 20 6d 65 | 6e 75 0d 6f 70 74 69 6f |, the me|nu.optio|
|000014c0| 6e 20 69 73 20 22 53 65 | 74 20 50 72 6f 6a 65 63 |n is "Se|t Projec|
|000014d0| 74 20 54 79 70 65 22 29 | 2e 20 20 57 68 65 6e 20 |t Type")|. When |
|000014e0| 74 68 65 20 72 65 73 6f | 75 72 63 65 20 69 73 20 |the reso|urce is |
|000014f0| 63 61 6c 6c 65 64 2c 20 | 74 68 65 20 65 6e 74 72 |called, |the entr|
|00001500| 79 0d 70 6f 69 6e 74 20 | 69 73 20 73 69 6d 70 6c |y.point |is simpl|
|00001510| 79 20 74 68 65 20 6d 61 | 69 6e 20 70 72 6f 63 65 |y the ma|in proce|
|00001520| 64 75 72 65 20 6f 66 20 | 74 68 65 20 66 69 6c 65 |dure of |the file|
|00001530| 2e 0d 0d 46 6f 72 20 6d | 6f 72 65 20 69 6e 66 6f |...For m|ore info|
|00001540| 2c 20 73 65 65 20 49 4d | 2e 0d 0d 2a 2a 2a 2a 2a |, see IM|...*****|
|00001550| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 74 |********|*******t|
|00001560| 68 69 73 20 63 6f 64 65 | 20 65 78 61 6d 70 6c 65 |his code| example|
|00001570| 20 77 61 73 20 74 61 6b | 65 6e 20 66 72 6f 6d 0d | was tak|en from.|
|00001580| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001590| 2a 2a 2a 2a 54 68 69 6e | 6b 20 52 65 66 65 72 65 |****Thin|k Refere|
|000015a0| 6e 63 65 2c 20 63 6f 70 | 79 72 69 67 68 74 20 53 |nce, cop|yright S|
|000015b0| 79 6d 61 6e 74 65 63 20 | 63 6f 72 70 2e 0d 0d 2f |ymantec |corp.../|
|000015c0| 2f 20 43 61 6c 6c 69 6e | 67 20 61 20 43 6f 64 65 |/ Callin|g a Code|
|000015d0| 20 52 65 73 6f 75 72 63 | 65 0d 2f 2f 20 54 68 65 | Resourc|e.// The|
|000015e0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 64 65 20 | followi|ng code |
|000015f0| 69 6c 6c 75 73 74 72 61 | 74 65 73 20 68 6f 77 20 |illustra|tes how |
|00001600| 74 6f 20 63 61 6c 6c 20 | 61 0d 2f 2f 20 63 6f 64 |to call |a.// cod|
|00001610| 65 20 72 65 73 6f 75 72 | 63 65 2e 20 20 54 68 65 |e resour|ce. The|
|00001620| 20 63 6f 64 65 20 72 65 | 73 6f 75 72 63 65 20 74 | code re|source t|
|00001630| 68 61 74 20 77 65 0d 2f | 2f 20 61 72 65 20 63 61 |hat we./|/ are ca|
|00001640| 6c 6c 69 6e 67 20 69 73 | 20 67 69 76 65 6e 20 61 |lling is| given a|
|00001650| 74 20 74 68 65 20 65 6e | 64 0d 0d 2f 2f 20 41 73 |t the en|d..// As|
|00001660| 73 75 6d 69 6e 67 20 69 | 6e 63 6c 75 73 69 6f 6e |suming i|nclusion|
|00001670| 20 6f 66 20 3c 4d 61 63 | 48 65 61 64 65 72 73 3e | of <Mac|Headers>|
|00001680| 0d 0d 74 79 70 65 64 65 | 66 20 76 6f 69 64 20 28 |..typede|f void (|
|00001690| 2a 4d 79 50 72 6f 63 50 | 74 72 29 20 28 69 6e 74 |*MyProcP|tr) (int|
|000016a0| 29 3b 20 20 09 2f 2f 20 | 44 65 66 69 6e 65 20 61 |); .// |Define a|
|000016b0| 20 70 72 6f 63 65 64 75 | 72 65 20 70 6f 69 6e 74 | procedu|re point|
|000016c0| 65 72 0d 09 09 09 09 09 | 09 09 09 09 09 09 2f 2f |er......|......//|
|000016d0| 20 66 6f 72 20 74 68 65 | 20 63 6f 64 65 20 72 65 | for the| code re|
|000016e0| 73 6f 75 72 63 65 0d 76 | 6f 69 64 20 44 6f 45 72 |source.v|oid DoEr|
|000016f0| 72 6f 72 20 28 4f 53 45 | 72 72 20 65 72 72 29 3b |ror (OSE|rr err);|
|00001700| 0d 6d 61 69 6e 20 28 29 | 0d 7b 0d 09 48 61 6e 64 |.main ()|.{..Hand|
|00001710| 6c 65 20 6d 79 43 52 48 | 61 6e 64 6c 65 3b 0d 09 |le myCRH|andle;..|
|00001720| 50 72 6f 63 50 74 72 20 | 6d 79 43 52 50 74 72 3b |ProcPtr |myCRPtr;|
|00001730| 0d 09 69 6e 74 09 69 6e | 74 65 67 65 72 50 61 72 |..int.in|tegerPar|
|00001740| 61 6d 3b 0d 0d 09 6d 79 | 43 52 48 61 6e 64 6c 65 |am;...my|CRHandle|
|00001750| 20 3d 20 47 65 74 4e 61 | 6d 65 64 52 65 73 6f 75 | = GetNa|medResou|
|00001760| 72 63 65 20 28 27 41 4c | 43 54 27 2c 20 22 5c 70 |rce ('AL|CT', "\p|
|00001770| 6d 79 42 65 65 70 22 29 | 3b 0d 09 69 66 20 28 6d |myBeep")|;..if (m|
|00001780| 79 43 52 48 61 6e 64 6c | 65 20 3d 3d 20 6e 69 6c |yCRHandl|e == nil|
|00001790| 29 0d 09 09 09 44 6f 45 | 72 72 6f 72 20 28 52 65 |)....DoE|rror (Re|
|000017a0| 73 45 72 72 6f 72 28 29 | 29 3b 0d 09 65 6c 73 65 |sError()|);..else|
|000017b0| 0d 09 7b 0d 09 09 09 48 | 4c 6f 63 6b 20 28 6d 79 |..{....H|Lock (my|
|000017c0| 43 52 48 61 6e 64 6c 65 | 29 3b 0d 09 09 09 28 2a |CRHandle|);....(*|
|000017d0| 20 28 4d 79 50 72 6f 63 | 50 74 72 29 20 28 2a 6d | (MyProc|Ptr) (*m|
|000017e0| 79 43 52 48 61 6e 64 6c | 65 29 29 20 28 69 6e 74 |yCRHandl|e)) (int|
|000017f0| 65 67 65 72 50 61 72 61 | 6d 29 3b 0d 09 09 09 48 |egerPara|m);....H|
|00001800| 55 6e 6c 6f 63 6b 20 28 | 6d 79 43 52 48 61 6e 64 |Unlock (|myCRHand|
|00001810| 6c 65 29 3b 0d 09 7d 0d | 7d 0d 0d 2f 2a 2a 2a 2a |le);..}.|}../****|
|00001820| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001830| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001840| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0d 48 65 72 65 20 69 |********|*.Here i|
|00001850| 73 20 74 68 65 20 63 6f | 64 65 20 72 65 73 6f 75 |s the co|de resou|
|00001860| 72 63 65 20 74 68 61 74 | 20 77 65 27 72 65 20 63 |rce that| we're c|
|00001870| 61 6c 6c 69 6e 67 0d 0d | 76 6f 69 64 20 6d 61 69 |alling..|void mai|
|00001880| 6e 20 28 69 6e 74 20 69 | 29 0d 7b 0d 09 69 6e 74 |n (int i|).{..int|
|00001890| 20 6a 3b 0d 0d 09 66 6f | 72 20 28 6a 20 3d 20 30 | j;...fo|r (j = 0|
|000018a0| 3b 20 6a 20 3c 20 69 3b | 20 6a 2b 2b 29 0d 09 09 |; j < i;| j++)...|
|000018b0| 09 53 79 73 42 65 65 70 | 20 28 35 29 3b 0d 7d 0d |.SysBeep| (5);.}.|
|000018c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0d |********|******/.|
|000018f0| 0d 0d 3a 20 41 6c 73 6f | 20 72 65 6c 61 74 65 64 |..: Also| related|
|00001900| 20 74 6f 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 | to code| resourc|
|00001910| 65 73 20 2d 0d 3a 20 09 | 77 6f 75 6c 64 20 69 74 |es -.: .|would it|
|00001920| 20 62 65 20 70 6f 73 73 | 69 62 6c 65 20 74 6f 20 | be poss|ible to |
|00001930| 68 61 76 65 20 61 20 43 | 20 50 50 43 20 6e 61 74 |have a C| PPC nat|
|00001940| 69 76 65 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 |ive code| resourc|
|00001950| 65 20 75 73 65 64 20 62 | 79 0d 3a 20 09 61 20 6e |e used b|y.: .a n|
|00001960| 6f 6e 2d 6e 61 74 69 76 | 65 20 28 77 72 69 74 74 |on-nativ|e (writt|
|00001970| 65 6e 20 69 6e 20 54 68 | 69 6e 6b 20 50 61 73 63 |en in Th|ink Pasc|
|00001980| 61 6c 29 20 61 70 70 6c | 69 63 61 74 69 6f 6e 3f |al) appl|ication?|
|00001990| 0d 0d 50 50 43 20 6d 61 | 63 73 20 64 6f 20 6e 6f |..PPC ma|cs do no|
|000019a0| 74 20 75 73 65 20 74 68 | 65 20 73 61 6d 65 20 6b |t use th|e same k|
|000019b0| 69 6e 64 20 6f 66 20 43 | 4f 44 45 20 72 65 73 6f |ind of C|ODE reso|
|000019c0| 75 72 63 65 73 20 74 68 | 61 74 20 36 38 6b 20 6d |urces th|at 68k m|
|000019d0| 61 63 73 20 64 6f 2e 0d | 49 6e 73 74 65 61 64 20 |acs do..|Instead |
|000019e0| 6f 66 20 6b 65 65 70 69 | 6e 67 20 74 68 65 69 72 |of keepi|ng their|
|000019f0| 20 70 72 6f 67 72 61 6d | 20 63 6f 64 65 20 69 6e | program| code in|
|00001a00| 20 74 68 65 20 72 65 73 | 6f 75 72 63 65 20 66 6f | the res|ource fo|
|00001a10| 72 6b 2c 20 64 69 76 69 | 64 65 64 20 69 6e 74 6f |rk, divi|ded into|
|00001a20| 20 0d 33 32 4b 20 73 65 | 67 6d 65 6e 74 73 2c 20 | .32K se|gments, |
|00001a30| 50 6f 77 65 72 4d 61 63 | 73 20 6b 65 65 70 20 63 |PowerMac|s keep c|
|00001a40| 6f 64 65 20 69 6e 20 74 | 68 65 20 2a 64 61 74 61 |ode in t|he *data|
|00001a50| 2a 20 66 6f 72 6b 20 6f | 66 20 61 20 66 69 6c 65 |* fork o|f a file|
|00001a60| 2e 20 20 49 74 20 6d 61 | 79 0d 62 65 20 70 6f 73 |. It ma|y.be pos|
|00001a70| 73 69 62 6c 65 20 74 6f | 20 63 61 6c 6c 20 61 20 |sible to| call a |
|00001a80| 50 50 43 20 63 6f 64 65 | 20 63 68 75 6e 6b 20 66 |PPC code| chunk f|
|00001a90| 72 6f 6d 20 61 20 50 61 | 73 63 61 6c 20 61 70 70 |rom a Pa|scal app|
|00001aa0| 6c 69 63 61 74 69 6f 6e | 20 28 75 73 69 6e 67 20 |lication| (using |
|00001ab0| 74 68 65 0d 6d 69 78 65 | 64 2d 6d 6f 64 65 20 6d |the.mixe|d-mode m|
|00001ac0| 61 6e 61 67 65 72 29 2c | 20 62 75 74 20 69 74 20 |anager),| but it |
|00001ad0| 77 69 6c 6c 20 62 65 20 | 61 20 6c 69 74 74 6c 65 |will be |a little|
|00001ae0| 20 64 69 66 66 65 72 65 | 6e 74 20 74 68 61 6e 20 | differe|nt than |
|00001af0| 63 61 6c 6c 69 6e 67 20 | 61 0d 36 38 6b 20 63 6f |calling |a.68k co|
|00001b00| 64 65 20 72 65 73 6f 75 | 72 63 65 2e 0d 0d 2d 2d |de resou|rce...--|
|00001b10| 20 20 20 20 20 20 20 0d | 20 20 20 20 20 20 20 4f | .| O|
|00001b20| 77 65 6e 20 4d 61 74 68 | 65 77 73 09 6d 61 74 68 |wen Math|ews.math|
|00001b30| 65 77 73 40 66 75 72 6d | 61 6e 2e 65 64 75 0d 20 |ews@furm|an.edu. |
|00001b40| 20 20 20 20 20 20 3c 3e | 3c 3e 3c 3e 3c 3e 3c 3e | <>|<><><><>|
|00001b50| 3c 3e 3c 3e 3c 3e 3c 3e | 3c 3e 3c 3e 3c 3e 3c 3e |<><><><>|<><><><>|
|00001b60| 3c 3e 3c 3e 3c 3e 3c 3e | 3c 3e 3c 3e 3c 3e 0d 20 |<><><><>|<><><>. |
|00001b70| 20 20 20 20 20 20 46 75 | 72 6d 61 6e 20 55 6e 69 | Fu|rman Uni|
|00001b80| 76 65 72 73 69 74 79 2c | 20 43 6f 6d 70 75 74 65 |versity,| Compute|
|00001b90| 72 20 53 63 69 65 6e 63 | 65 20 44 65 70 74 0d 0d |r Scienc|e Dept..|
|00001ba0| 0d 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |.+++++++|++++++++|
|00001bb0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 0d 0d 3e 46 |++++++++|++++..>F|
|00001bc0| 72 6f 6d 20 74 79 65 6e | 40 6e 65 74 63 6f 6d 2e |rom tyen|@netcom.|
|00001bd0| 63 6f 6d 20 28 41 6e 74 | 68 6f 6e 79 20 59 65 6e |com (Ant|hony Yen|
|00001be0| 29 0d 44 61 74 65 3a 20 | 53 61 74 2c 20 31 36 20 |).Date: |Sat, 16 |
|00001bf0| 4a 75 6c 20 31 39 39 34 | 20 30 39 3a 31 33 3a 31 |Jul 1994| 09:13:1|
|00001c00| 33 20 47 4d 54 0d 4f 72 | 67 61 6e 69 7a 61 74 69 |3 GMT.Or|ganizati|
|00001c10| 6f 6e 3a 20 4e 45 54 43 | 4f 4d 20 4f 6e 2d 6c 69 |on: NETC|OM On-li|
|00001c20| 6e 65 20 43 6f 6d 6d 75 | 6e 69 63 61 74 69 6f 6e |ne Commu|nication|
|00001c30| 20 53 65 72 76 69 63 65 | 73 20 28 34 30 38 20 32 | Service|s (408 2|
|00001c40| 36 31 2d 34 37 30 30 20 | 67 75 65 73 74 29 0d 0d |61-4700 |guest)..|
|00001c50| 49 6e 20 61 72 74 69 63 | 6c 65 20 3c 33 30 36 66 |In artic|le <306f|
|00001c60| 68 67 24 66 6c 38 40 6e | 73 39 30 30 30 2e 66 75 |hg$fl8@n|s9000.fu|
|00001c70| 72 6d 61 6e 2e 65 64 75 | 3e 2c 0d 4f 77 65 6e 20 |rman.edu|>,.Owen |
|00001c80| 4d 61 74 68 65 77 73 20 | 3c 6d 61 74 68 65 77 73 |Mathews |<mathews|
|00001c90| 40 6e 73 39 30 30 30 2e | 66 75 72 6d 61 6e 2e 65 |@ns9000.|furman.e|
|00001ca0| 64 75 3e 20 77 72 6f 74 | 65 3a 0d 3e 50 50 43 20 |du> wrot|e:.>PPC |
|00001cb0| 6d 61 63 73 20 64 6f 20 | 6e 6f 74 20 75 73 65 20 |macs do |not use |
|00001cc0| 74 68 65 20 73 61 6d 65 | 20 6b 69 6e 64 20 6f 66 |the same| kind of|
|00001cd0| 20 43 4f 44 45 20 72 65 | 73 6f 75 72 63 65 73 20 | CODE re|sources |
|00001ce0| 74 68 61 74 20 36 38 6b | 20 6d 61 63 73 20 64 6f |that 68k| macs do|
|00001cf0| 2e 0d 3e 49 6e 73 74 65 | 61 64 20 6f 66 20 6b 65 |..>Inste|ad of ke|
|00001d00| 65 70 69 6e 67 20 74 68 | 65 69 72 20 70 72 6f 67 |eping th|eir prog|
|00001d10| 72 61 6d 20 63 6f 64 65 | 20 69 6e 20 74 68 65 20 |ram code| in the |
|00001d20| 72 65 73 6f 75 72 63 65 | 20 66 6f 72 6b 2c 20 64 |resource| fork, d|
|00001d30| 69 76 69 64 65 64 20 69 | 6e 74 6f 20 0d 3e 33 32 |ivided i|nto .>32|
|00001d40| 4b 20 73 65 67 6d 65 6e | 74 73 2c 20 50 6f 77 65 |K segmen|ts, Powe|
|00001d50| 72 4d 61 63 73 20 6b 65 | 65 70 20 63 6f 64 65 20 |rMacs ke|ep code |
|00001d60| 69 6e 20 74 68 65 20 2a | 64 61 74 61 2a 20 66 6f |in the *|data* fo|
|00001d70| 72 6b 20 6f 66 20 61 20 | 66 69 6c 65 2e 20 20 49 |rk of a |file. I|
|00001d80| 74 20 6d 61 79 0d 3e 62 | 65 20 70 6f 73 73 69 62 |t may.>b|e possib|
|00001d90| 6c 65 20 74 6f 20 63 61 | 6c 6c 20 61 20 50 50 43 |le to ca|ll a PPC|
|00001da0| 20 63 6f 64 65 20 63 68 | 75 6e 6b 20 66 72 6f 6d | code ch|unk from|
|00001db0| 20 61 20 50 61 73 63 61 | 6c 20 61 70 70 6c 69 63 | a Pasca|l applic|
|00001dc0| 61 74 69 6f 6e 20 28 75 | 73 69 6e 67 20 74 68 65 |ation (u|sing the|
|00001dd0| 0d 3e 6d 69 78 65 64 2d | 6d 6f 64 65 20 6d 61 6e |.>mixed-|mode man|
|00001de0| 61 67 65 72 29 2c 20 62 | 75 74 20 69 74 20 77 69 |ager), b|ut it wi|
|00001df0| 6c 6c 20 62 65 20 61 20 | 6c 69 74 74 6c 65 20 64 |ll be a |little d|
|00001e00| 69 66 66 65 72 65 6e 74 | 20 74 68 61 6e 20 63 61 |ifferent| than ca|
|00001e10| 6c 6c 69 6e 67 20 61 0d | 3e 36 38 6b 20 63 6f 64 |lling a.|>68k cod|
|00001e20| 65 20 72 65 73 6f 75 72 | 63 65 2e 0d 0d 48 6d 6d |e resour|ce...Hmm|
|00001e30| 2e 2e 2e 73 65 76 65 72 | 61 6c 20 71 75 65 73 74 |...sever|al quest|
|00001e40| 69 6f 6e 73 20 63 6f 6d | 65 20 74 6f 20 6d 69 6e |ions com|e to min|
|00001e50| 64 20 61 73 20 49 20 72 | 65 61 64 20 74 68 69 73 |d as I r|ead this|
|00001e60| 3a 0d 0d 48 61 73 20 61 | 6e 79 6f 6e 65 20 73 65 |:..Has a|nyone se|
|00001e70| 65 6e 20 68 6f 77 20 74 | 6f 20 73 75 70 70 6f 72 |en how t|o suppor|
|00001e80| 74 20 63 61 6c 6c 69 6e | 67 20 50 50 43 2d 6e 61 |t callin|g PPC-na|
|00001e90| 74 69 76 65 20 63 6f 64 | 65 20 66 72 6f 6d 20 77 |tive cod|e from w|
|00001ea0| 69 74 68 69 6e 20 61 0d | 50 50 43 2d 6e 61 74 69 |ithin a.|PPC-nati|
|00001eb0| 76 65 20 61 70 70 3f 20 | 20 41 6e 64 20 66 72 6f |ve app? | And fro|
|00001ec0| 6d 20 77 69 74 68 69 6e | 20 61 20 66 61 74 2d 61 |m within| a fat-a|
|00001ed0| 70 70 3f 0d 0d 49 66 20 | 49 20 61 70 70 65 6e 64 |pp?..If |I append|
|00001ee0| 20 73 6f 6d 65 20 61 70 | 70 6c 69 63 61 74 69 6f | some ap|plicatio|
|00001ef0| 6e 2d 73 70 65 63 69 66 | 69 63 20 64 61 74 61 20 |n-specif|ic data |
|00001f00| 74 6f 20 74 68 65 20 64 | 61 74 61 20 66 6f 72 6b |to the d|ata fork|
|00001f10| 20 6f 66 20 61 0d 66 61 | 74 2d 61 70 70 2c 20 69 | of a.fa|t-app, i|
|00001f20| 74 20 77 6f 6e 27 74 20 | 63 6f 6e 66 75 73 65 20 |t won't |confuse |
|00001f30| 74 68 65 20 6c 6f 61 64 | 65 72 20 6f 72 20 77 68 |the load|er or wh|
|00001f40| 61 74 65 76 65 72 20 65 | 6c 73 65 20 41 70 70 6c |atever e|lse Appl|
|00001f50| 65 20 6d 69 67 68 74 20 | 68 61 76 65 0d 69 6e 20 |e might |have.in |
|00001f60| 73 74 6f 72 65 20 66 6f | 72 20 74 68 65 20 64 61 |store fo|r the da|
|00001f70| 74 61 20 66 6f 72 6b 20 | 69 6e 20 74 68 65 20 66 |ta fork |in the f|
|00001f80| 75 74 75 72 65 2c 20 72 | 69 67 68 74 3f 20 20 3c |uture, r|ight? <|
|00001f90| 68 6f 70 65 2c 20 68 6f | 70 65 2c 20 63 72 6f 73 |hope, ho|pe, cros|
|00001fa0| 73 0d 66 69 6e 67 65 72 | 73 3e 0d 0d 49 73 20 74 |s.finger|s>..Is t|
|00001fb0| 68 65 72 65 20 61 20 63 | 6f 6e 76 65 6e 74 69 6f |here a c|onventio|
|00001fc0| 6e 20 66 6f 72 20 77 72 | 69 74 69 6e 67 20 66 61 |n for wr|iting fa|
|00001fd0| 74 2d 63 6f 64 65 3f 20 | 20 54 68 61 74 20 69 73 |t-code? | That is|
|00001fe0| 2c 20 63 61 6e 20 49 20 | 6a 75 73 74 20 62 75 69 |, can I |just bui|
|00001ff0| 6c 64 0d 61 20 43 4f 44 | 45 20 72 65 73 6f 75 72 |ld.a COD|E resour|
|00002000| 63 65 20 66 6f 72 20 36 | 38 4b 2c 20 74 68 65 6e |ce for 6|8K, then|
|00002010| 20 64 6f 20 77 68 61 74 | 20 49 20 6e 6f 72 6d 61 | do what| I norma|
|00002020| 6c 6c 79 20 64 6f 20 74 | 6f 20 62 75 69 6c 64 20 |lly do t|o build |
|00002030| 61 20 66 61 74 2d 61 70 | 70 0d 62 75 74 20 77 61 |a fat-ap|p.but wa|
|00002040| 76 65 20 74 68 65 20 6d | 61 67 69 63 20 77 61 6e |ve the m|agic wan|
|00002050| 64 20 6f 76 65 72 20 74 | 68 65 20 43 4f 44 45 20 |d over t|he CODE |
|00002060| 72 65 73 6f 75 72 63 65 | 20 69 6e 73 74 65 61 64 |resource| instead|
|00002070| 2c 20 61 6e 64 20 61 70 | 70 65 6e 64 20 74 68 65 |, and ap|pend the|
|00002080| 0d 50 50 43 20 63 6f 64 | 65 20 6f 6e 74 6f 20 74 |.PPC cod|e onto t|
|00002090| 68 61 74 20 72 65 73 6f | 75 72 63 65 20 66 69 6c |hat reso|urce fil|
|000020a0| 65 20 61 6e 64 20 77 69 | 6e 64 20 75 70 20 77 69 |e and wi|nd up wi|
|000020b0| 74 68 20 61 20 66 61 74 | 2d 6c 6f 61 64 61 62 6c |th a fat|-loadabl|
|000020c0| 65 20 63 6f 64 65 0d 6d | 6f 64 75 6c 65 3f 20 20 |e code.m|odule? |
|000020d0| 49 66 20 49 20 63 61 6e | 2c 20 69 73 20 74 68 65 |If I can|, is the|
|000020e0| 72 65 20 61 20 73 69 6e | 67 6c 65 20 63 61 6c 6c |re a sin|gle call|
|000020f0| 69 6e 67 20 63 6f 6e 76 | 65 6e 74 69 6f 6e 20 66 |ing conv|ention f|
|00002100| 6f 72 20 62 6f 74 68 0d | 6c 6f 61 64 61 62 6c 65 |or both.|loadable|
|00002110| 20 63 6f 64 65 20 6d 6f | 64 75 6c 65 73 20 28 74 | code mo|dules (t|
|00002120| 68 69 73 20 72 65 66 65 | 72 73 20 62 61 63 6b 20 |his refe|rs back |
|00002130| 74 6f 20 6d 79 20 66 69 | 72 73 74 20 71 75 65 73 |to my fi|rst ques|
|00002140| 74 69 6f 6e 29 3f 0d 0d | 46 69 6e 61 6c 6c 79 2c |tion)?..|Finally,|
|00002150| 20 74 68 65 20 54 48 49 | 4e 4b 20 52 65 66 65 72 | the THI|NK Refer|
|00002160| 65 6e 63 65 20 63 6f 64 | 65 20 73 61 6d 70 6c 65 |ence cod|e sample|
|00002170| 20 61 70 70 65 61 72 73 | 20 74 6f 20 61 64 64 20 | appears| to add |
|00002180| 74 77 6f 0d 64 65 72 65 | 66 65 72 65 6e 63 65 73 |two.dere|ferences|
|00002190| 20 6f 76 65 72 20 74 68 | 65 20 73 74 61 6e 64 61 | over th|e standa|
|000021a0| 72 64 20 66 75 6e 63 74 | 69 6f 6e 20 63 61 6c 6c |rd funct|ion call|
|000021b0| 20 6f 76 65 72 68 65 61 | 64 20 77 68 65 6e 20 63 | overhea|d when c|
|000021c0| 61 6c 6c 69 6e 67 20 61 | 0d 63 6f 64 65 20 72 65 |alling a|.code re|
|000021d0| 73 6f 75 72 63 65 2e 20 | 20 49 73 20 74 68 69 73 |source. | Is this|
|000021e0| 20 63 6f 72 72 65 63 74 | 3f 20 20 49 66 20 69 74 | correct|? If it|
|000021f0| 20 69 73 20 63 6f 72 72 | 65 63 74 2c 20 69 6e 20 | is corr|ect, in |
|00002200| 74 68 65 20 67 72 61 6e | 64 0d 73 63 68 65 6d 65 |the gran|d.scheme|
|00002210| 20 6f 66 20 74 68 69 6e | 67 73 20 74 68 69 73 20 | of thin|gs this |
|00002220| 77 6f 75 6c 64 20 6e 6f | 74 20 6d 61 74 74 65 72 |would no|t matter|
|00002230| 2c 20 62 75 74 20 49 20 | 6d 61 79 20 67 65 74 20 |, but I |may get |
|00002240| 64 6f 77 6e 20 74 6f 20 | 73 68 61 76 69 6e 67 0d |down to |shaving.|
|00002250| 63 79 63 6c 65 73 20 69 | 6e 20 74 68 65 20 66 75 |cycles i|n the fu|
|00002260| 74 75 72 65 20 61 6e 64 | 20 69 66 20 73 6f 20 49 |ture and| if so I|
|00002270| 20 6d 61 79 20 6e 65 65 | 64 20 74 6f 20 68 61 76 | may nee|d to hav|
|00002280| 65 20 61 6c 6c 20 63 6f | 64 65 20 72 65 73 6f 75 |e all co|de resou|
|00002290| 72 63 65 73 0d 6c 6f 63 | 6b 65 64 20 64 6f 77 6e |rces.loc|ked down|
|000022a0| 20 69 6e 20 6d 65 6d 6f | 72 79 20 61 6e 64 20 61 | in memo|ry and a|
|000022b0| 73 20 66 75 6c 6c 79 20 | 64 65 72 65 66 65 72 65 |s fully |derefere|
|000022c0| 6e 63 65 64 20 61 73 20 | 70 6f 73 73 69 62 6c 65 |nced as |possible|
|000022d0| 2e 20 20 4f 66 66 68 61 | 6e 64 2c 0d 49 20 73 65 |. Offha|nd,.I se|
|000022e0| 65 20 6f 6e 6c 79 20 6f | 6e 65 20 64 65 72 65 66 |e only o|ne deref|
|000022f0| 65 72 65 6e 63 65 20 49 | 20 63 6f 75 6c 64 20 61 |erence I| could a|
|00002300| 76 6f 69 64 2c 20 62 79 | 20 6d 61 6b 69 6e 67 20 |void, by| making |
|00002310| 73 75 72 65 20 74 68 65 | 20 63 6f 64 65 0d 72 65 |sure the| code.re|
|00002320| 73 6f 75 72 63 65 20 69 | 73 20 6d 61 72 6b 65 64 |source i|s marked|
|00002330| 20 6c 6f 63 6b 65 64 20 | 61 6e 64 20 67 65 74 74 | locked |and gett|
|00002340| 69 6e 67 20 61 20 70 6f | 69 6e 74 65 72 20 6f 75 |ing a po|inter ou|
|00002350| 74 20 6f 66 20 74 68 65 | 20 68 61 6e 64 6c 65 2e |t of the| handle.|
|00002360| 0d 42 75 74 20 49 27 6d | 20 67 65 74 74 69 6e 67 |.But I'm| getting|
|00002370| 20 61 20 6e 61 67 67 69 | 6e 67 20 66 65 65 6c 69 | a naggi|ng feeli|
|00002380| 6e 67 20 49 27 6d 20 6d | 69 73 73 69 6e 67 20 73 |ng I'm m|issing s|
|00002390| 6f 6d 65 74 68 69 6e 67 | 20 68 65 72 65 2e 2e 2e |omething| here...|
|000023a0| 0d 2d 2d 20 0d 0d 41 6e | 74 68 6f 6e 79 20 59 65 |.-- ..An|thony Ye|
|000023b0| 6e 20 3c 74 79 65 6e 40 | 6e 65 74 63 6f 6d 2e 63 |n <tyen@|netcom.c|
|000023c0| 6f 6d 3e 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |om> | |
|000023d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 41 75 | | Au|
|000023e0| 73 74 69 6e 2c 20 54 65 | 78 61 73 2c 20 55 53 41 |stin, Te|xas, USA|
|000023f0| 0d 0d 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |..++++++|++++++++|
|00002400| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 0d 0d 3e |++++++++|+++++..>|
|00002410| 46 72 6f 6d 20 6a 77 62 | 61 78 74 65 72 40 6f 6c |From jwb|axter@ol|
|00002420| 79 6d 70 75 73 2e 6e 65 | 74 20 28 4a 6f 68 6e 20 |ympus.ne|t (John |
|00002430| 57 2e 20 42 61 78 74 65 | 72 29 0d 44 61 74 65 3a |W. Baxte|r).Date:|
|00002440| 20 53 61 74 2c 20 31 36 | 20 4a 75 6c 20 31 39 39 | Sat, 16| Jul 199|
|00002450| 34 20 31 30 3a 30 33 3a | 34 33 20 2d 30 37 30 30 |4 10:03:|43 -0700|
|00002460| 0d 4f 72 67 61 6e 69 7a | 61 74 69 6f 6e 3a 20 49 |.Organiz|ation: I|
|00002470| 6e 74 65 72 6e 65 74 20 | 66 6f 72 20 74 68 65 20 |nternet |for the |
|00002480| 4f 6c 79 6d 70 69 63 20 | 50 65 6e 69 6e 73 75 6c |Olympic |Peninsul|
|00002490| 61 0d 0d 49 6e 20 61 72 | 74 69 63 6c 65 20 3c 74 |a..In ar|ticle <t|
|000024a0| 79 65 6e 43 74 31 30 41 | 32 2e 43 73 42 40 6e 65 |yenCt10A|2.CsB@ne|
|000024b0| 74 63 6f 6d 2e 63 6f 6d | 3e 2c 20 74 79 65 6e 40 |tcom.com|>, tyen@|
|000024c0| 6e 65 74 63 6f 6d 2e 63 | 6f 6d 20 28 41 6e 74 68 |netcom.c|om (Anth|
|000024d0| 6f 6e 79 20 59 65 6e 29 | 20 77 72 6f 74 65 3a 0d |ony Yen)| wrote:.|
|000024e0| 0d 3e 20 49 6e 20 61 72 | 74 69 63 6c 65 20 3c 33 |.> In ar|ticle <3|
|000024f0| 30 36 66 68 67 24 66 6c | 38 40 6e 73 39 30 30 30 |06fhg$fl|8@ns9000|
|00002500| 2e 66 75 72 6d 61 6e 2e | 65 64 75 3e 2c 0d 3e 20 |.furman.|edu>,.> |
|00002510| 4f 77 65 6e 20 4d 61 74 | 68 65 77 73 20 3c 6d 61 |Owen Mat|hews <ma|
|00002520| 74 68 65 77 73 40 6e 73 | 39 30 30 30 2e 66 75 72 |thews@ns|9000.fur|
|00002530| 6d 61 6e 2e 65 64 75 3e | 20 77 72 6f 74 65 3a 0d |man.edu>| wrote:.|
|00002540| 3e 20 3e 50 50 43 20 6d | 61 63 73 20 64 6f 20 6e |> >PPC m|acs do n|
|00002550| 6f 74 20 75 73 65 20 74 | 68 65 20 73 61 6d 65 20 |ot use t|he same |
|00002560| 6b 69 6e 64 20 6f 66 20 | 43 4f 44 45 20 72 65 73 |kind of |CODE res|
|00002570| 6f 75 72 63 65 73 20 74 | 68 61 74 20 36 38 6b 20 |ources t|hat 68k |
|00002580| 6d 61 63 73 20 64 6f 2e | 0d 3e 20 3e 49 6e 73 74 |macs do.|.> >Inst|
|00002590| 65 61 64 20 6f 66 20 6b | 65 65 70 69 6e 67 20 74 |ead of k|eeping t|
|000025a0| 68 65 69 72 20 70 72 6f | 67 72 61 6d 20 63 6f 64 |heir pro|gram cod|
|000025b0| 65 20 69 6e 20 74 68 65 | 20 72 65 73 6f 75 72 63 |e in the| resourc|
|000025c0| 65 20 66 6f 72 6b 2c 20 | 64 69 76 69 64 65 64 20 |e fork, |divided |
|000025d0| 69 6e 74 6f 20 0d 3e 20 | 3e 33 32 4b 20 73 65 67 |into .> |>32K seg|
|000025e0| 6d 65 6e 74 73 2c 20 50 | 6f 77 65 72 4d 61 63 73 |ments, P|owerMacs|
|000025f0| 20 6b 65 65 70 20 63 6f | 64 65 20 69 6e 20 74 68 | keep co|de in th|
|00002600| 65 20 2a 64 61 74 61 2a | 20 66 6f 72 6b 20 6f 66 |e *data*| fork of|
|00002610| 20 61 20 66 69 6c 65 2e | 20 20 49 74 20 6d 61 79 | a file.| It may|
|00002620| 0d 3e 20 3e 62 65 20 70 | 6f 73 73 69 62 6c 65 20 |.> >be p|ossible |
|00002630| 74 6f 20 63 61 6c 6c 20 | 61 20 50 50 43 20 63 6f |to call |a PPC co|
|00002640| 64 65 20 63 68 75 6e 6b | 20 66 72 6f 6d 20 61 20 |de chunk| from a |
|00002650| 50 61 73 63 61 6c 20 61 | 70 70 6c 69 63 61 74 69 |Pascal a|pplicati|
|00002660| 6f 6e 20 28 75 73 69 6e | 67 20 74 68 65 0d 3e 20 |on (usin|g the.> |
|00002670| 3e 6d 69 78 65 64 2d 6d | 6f 64 65 20 6d 61 6e 61 |>mixed-m|ode mana|
|00002680| 67 65 72 29 2c 20 62 75 | 74 20 69 74 20 77 69 6c |ger), bu|t it wil|
|00002690| 6c 20 62 65 20 61 20 6c | 69 74 74 6c 65 20 64 69 |l be a l|ittle di|
|000026a0| 66 66 65 72 65 6e 74 20 | 74 68 61 6e 20 63 61 6c |fferent |than cal|
|000026b0| 6c 69 6e 67 20 61 0d 3e | 20 3e 36 38 6b 20 63 6f |ling a.>| >68k co|
|000026c0| 64 65 20 72 65 73 6f 75 | 72 63 65 2e 0d 3e 20 0d |de resou|rce..> .|
|000026d0| 3e 20 48 6d 6d 2e 2e 2e | 73 65 76 65 72 61 6c 20 |> Hmm...|several |
|000026e0| 71 75 65 73 74 69 6f 6e | 73 20 63 6f 6d 65 20 74 |question|s come t|
|000026f0| 6f 20 6d 69 6e 64 20 61 | 73 20 49 20 72 65 61 64 |o mind a|s I read|
|00002700| 20 74 68 69 73 3a 0d 3e | 20 0d 3e 20 48 61 73 20 | this:.>| .> Has |
|00002710| 61 6e 79 6f 6e 65 20 73 | 65 65 6e 20 68 6f 77 20 |anyone s|een how |
|00002720| 74 6f 20 73 75 70 70 6f | 72 74 20 63 61 6c 6c 69 |to suppo|rt calli|
|00002730| 6e 67 20 50 50 43 2d 6e | 61 74 69 76 65 20 63 6f |ng PPC-n|ative co|
|00002740| 64 65 20 66 72 6f 6d 20 | 77 69 74 68 69 6e 20 61 |de from |within a|
|00002750| 0d 3e 20 50 50 43 2d 6e | 61 74 69 76 65 20 61 70 |.> PPC-n|ative ap|
|00002760| 70 3f 20 20 41 6e 64 20 | 66 72 6f 6d 20 77 69 74 |p? And |from wit|
|00002770| 68 69 6e 20 61 20 66 61 | 74 2d 61 70 70 3f 0d 0d |hin a fa|t-app?..|
|00002780| 57 69 64 65 6c 79 20 61 | 76 61 69 6c 61 62 6c 65 |Widely a|vailable|
|00002790| 20 66 6f 72 20 73 6f 6d | 65 20 74 69 6d 65 20 6e | for som|e time n|
|000027a0| 6f 77 2e 0d 49 6e 73 69 | 64 65 20 4d 61 63 3a 20 |ow..Insi|de Mac: |
|000027b0| 50 6f 77 65 72 50 43 20 | 53 79 73 74 65 6d 20 53 |PowerPC |System S|
|000027c0| 6f 66 74 77 61 72 65 0d | 76 61 72 69 6f 75 73 20 |oftware.|various |
|000027d0| 22 64 65 76 65 6c 6f 70 | 22 20 61 72 74 69 63 6c |"develop|" articl|
|000027e0| 65 73 0d 76 61 72 69 6f | 75 73 20 22 4d 61 63 54 |es.vario|us "MacT|
|000027f0| 65 63 68 22 20 61 72 74 | 69 63 6c 65 73 0d 0d 3e |ech" art|icles..>|
|00002800| 20 49 66 20 49 20 61 70 | 70 65 6e 64 20 73 6f 6d | If I ap|pend som|
|00002810| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2d 73 70 |e applic|ation-sp|
|00002820| 65 63 69 66 69 63 20 64 | 61 74 61 20 74 6f 20 74 |ecific d|ata to t|
|00002830| 68 65 20 64 61 74 61 20 | 66 6f 72 6b 20 6f 66 20 |he data |fork of |
|00002840| 61 0d 3e 20 66 61 74 2d | 61 70 70 2c 20 69 74 20 |a.> fat-|app, it |
|00002850| 77 6f 6e 27 74 20 63 6f | 6e 66 75 73 65 20 74 68 |won't co|nfuse th|
|00002860| 65 20 6c 6f 61 64 65 72 | 20 6f 72 20 77 68 61 74 |e loader| or what|
|00002870| 65 76 65 72 20 65 6c 73 | 65 20 41 70 70 6c 65 20 |ever els|e Apple |
|00002880| 6d 69 67 68 74 20 68 61 | 76 65 0d 3e 20 69 6e 20 |might ha|ve.> in |
|00002890| 73 74 6f 72 65 20 66 6f | 72 20 74 68 65 20 64 61 |store fo|r the da|
|000028a0| 74 61 20 66 6f 72 6b 20 | 69 6e 20 74 68 65 20 66 |ta fork |in the f|
|000028b0| 75 74 75 72 65 2c 20 72 | 69 67 68 74 3f 20 20 3c |uture, r|ight? <|
|000028c0| 68 6f 70 65 2c 20 68 6f | 70 65 2c 20 63 72 6f 73 |hope, ho|pe, cros|
|000028d0| 73 0d 3e 20 66 69 6e 67 | 65 72 73 3e 0d 0d 54 68 |s.> fing|ers>..Th|
|000028e0| 65 20 72 65 73 6f 75 72 | 63 65 20 77 68 69 63 68 |e resour|ce which|
|000028f0| 20 74 65 6c 6c 73 20 74 | 68 65 20 73 79 73 74 65 | tells t|he syste|
|00002900| 6d 20 77 68 65 72 65 20 | 74 6f 20 6c 6f 6f 6b 20 |m where |to look |
|00002910| 66 6f 72 20 74 68 65 20 | 63 6f 64 65 20 66 72 61 |for the |code fra|
|00002920| 67 6d 65 6e 74 28 73 29 | 0d 70 72 6f 76 69 64 65 |gment(s)|.provide|
|00002930| 73 20 66 6f 72 20 74 68 | 69 73 2e 20 20 42 75 74 |s for th|is. But|
|00002940| 20 69 74 27 73 20 70 72 | 6f 62 61 62 6c 79 20 63 | it's pr|obably c|
|00002950| 6c 65 61 6e 65 72 20 6e | 6f 74 20 74 6f 20 70 75 |leaner n|ot to pu|
|00002960| 74 20 76 61 72 69 61 62 | 6c 65 2d 6c 65 6e 67 74 |t variab|le-lengt|
|00002970| 68 0d 64 61 74 61 20 69 | 6e 20 74 68 65 72 65 2c |h.data i|n there,|
|00002980| 20 6f 72 20 65 76 65 6e | 20 6d 75 74 61 62 6c 65 | or even| mutable|
|00002990| 20 62 75 74 20 66 69 78 | 65 64 20 6c 65 6e 67 74 | but fix|ed lengt|
|000029a0| 68 20 64 61 74 61 2e 0d | 0d 3e 20 49 73 20 74 68 |h data..|.> Is th|
|000029b0| 65 72 65 20 61 20 63 6f | 6e 76 65 6e 74 69 6f 6e |ere a co|nvention|
|000029c0| 20 66 6f 72 20 77 72 69 | 74 69 6e 67 20 66 61 74 | for wri|ting fat|
|000029d0| 2d 63 6f 64 65 3f 20 20 | 54 68 61 74 20 69 73 2c |-code? |That is,|
|000029e0| 20 63 61 6e 20 49 20 6a | 75 73 74 20 62 75 69 6c | can I j|ust buil|
|000029f0| 64 0d 3e 20 61 20 43 4f | 44 45 20 72 65 73 6f 75 |d.> a CO|DE resou|
|00002a00| 72 63 65 20 66 6f 72 20 | 36 38 4b 2c 20 74 68 65 |rce for |68K, the|
|00002a10| 6e 20 64 6f 20 77 68 61 | 74 20 49 20 6e 6f 72 6d |n do wha|t I norm|
|00002a20| 61 6c 6c 79 20 64 6f 20 | 74 6f 20 62 75 69 6c 64 |ally do |to build|
|00002a30| 20 61 20 66 61 74 2d 61 | 70 70 0d 3e 20 62 75 74 | a fat-a|pp.> but|
|00002a40| 20 77 61 76 65 20 74 68 | 65 20 6d 61 67 69 63 20 | wave th|e magic |
|00002a50| 77 61 6e 64 20 6f 76 65 | 72 20 74 68 65 20 43 4f |wand ove|r the CO|
|00002a60| 44 45 20 72 65 73 6f 75 | 72 63 65 20 69 6e 73 74 |DE resou|rce inst|
|00002a70| 65 61 64 2c 20 61 6e 64 | 20 61 70 70 65 6e 64 20 |ead, and| append |
|00002a80| 74 68 65 0d 3e 20 50 50 | 43 20 63 6f 64 65 20 6f |the.> PP|C code o|
|00002a90| 6e 74 6f 20 74 68 61 74 | 20 72 65 73 6f 75 72 63 |nto that| resourc|
|00002aa0| 65 20 66 69 6c 65 20 61 | 6e 64 20 77 69 6e 64 20 |e file a|nd wind |
|00002ab0| 75 70 20 77 69 74 68 20 | 61 20 66 61 74 2d 6c 6f |up with |a fat-lo|
|00002ac0| 61 64 61 62 6c 65 20 63 | 6f 64 65 0d 3e 20 6d 6f |adable c|ode.> mo|
|00002ad0| 64 75 6c 65 3f 20 20 49 | 66 20 49 20 63 61 6e 2c |dule? I|f I can,|
|00002ae0| 20 69 73 20 74 68 65 72 | 65 20 61 20 73 69 6e 67 | is ther|e a sing|
|00002af0| 6c 65 20 63 61 6c 6c 69 | 6e 67 20 63 6f 6e 76 65 |le calli|ng conve|
|00002b00| 6e 74 69 6f 6e 20 66 6f | 72 20 62 6f 74 68 0d 3e |ntion fo|r both.>|
|00002b10| 20 6c 6f 61 64 61 62 6c | 65 20 63 6f 64 65 20 6d | loadabl|e code m|
|00002b20| 6f 64 75 6c 65 73 20 28 | 74 68 69 73 20 72 65 66 |odules (|this ref|
|00002b30| 65 72 73 20 62 61 63 6b | 20 74 6f 20 6d 79 20 66 |ers back| to my f|
|00002b40| 69 72 73 74 20 71 75 65 | 73 74 69 6f 6e 29 3f 0d |irst que|stion)?.|
|00002b50| 0d 41 62 6f 76 65 20 72 | 65 66 65 72 65 6e 63 65 |.Above r|eference|
|00002b60| 73 2e 0d 0d 2d 2d 20 0d | 4a 6f 68 6e 20 42 61 78 |s...-- .|John Bax|
|00002b70| 74 65 72 20 20 20 20 50 | 6f 72 74 20 4c 75 64 6c |ter P|ort Ludl|
|00002b80| 6f 77 2c 20 57 41 2c 20 | 55 53 41 20 20 5b 57 65 |ow, WA, |USA [We|
|00002b90| 73 74 20 73 68 6f 72 65 | 2c 20 50 75 67 65 74 20 |st shore|, Puget |
|00002ba0| 53 6f 75 6e 64 5d 0d 20 | 20 20 4e 6f 20 68 61 62 |Sound]. | No hab|
|00002bb0| 6c 6f 20 49 6e 74 65 6c | 2e 0d 20 20 20 6a 77 62 |lo Intel|.. jwb|
|00002bc0| 61 78 74 65 72 40 70 74 | 2e 6f 6c 79 6d 70 75 73 |axter@pt|.olympus|
|00002bd0| 2e 6e 65 74 0d 0d 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |.net..++|++++++++|
|00002be0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00002bf0| 2b 0d 0d 3e 46 72 6f 6d | 20 77 69 6e 74 65 72 40 |+..>From| winter@|
|00002c00| 61 69 2e 72 6c 2e 61 66 | 2e 6d 69 6c 20 28 4a 69 |ai.rl.af|.mil (Ji|
|00002c10| 6d 20 57 69 6e 74 65 72 | 6d 79 72 65 29 0d 44 61 |m Winter|myre).Da|
|00002c20| 74 65 3a 20 54 75 65 2c | 20 31 39 20 4a 75 6c 20 |te: Tue,| 19 Jul |
|00002c30| 31 39 39 34 20 31 39 3a | 32 33 3a 31 33 20 47 4d |1994 19:|23:13 GM|
|00002c40| 54 0d 4f 72 67 61 6e 69 | 7a 61 74 69 6f 6e 3a 20 |T.Organi|zation: |
|00002c50| 52 6f 6d 65 20 4c 61 62 | 6f 72 61 74 6f 72 79 0d |Rome Lab|oratory.|
|00002c60| 0d 49 6e 20 61 72 74 69 | 63 6c 65 20 3c 43 73 79 |.In arti|cle <Csy|
|00002c70| 76 42 4a 2e 4b 75 33 40 | 6e 65 77 73 66 6c 61 73 |vBJ.Ku3@|newsflas|
|00002c80| 68 2e 63 6f 6e 63 6f 72 | 64 69 61 2e 63 61 3e 0d |h.concor|dia.ca>.|
|00002c90| 69 6b 62 5f 6d 61 63 64 | 40 45 43 45 2e 43 6f 6e |ikb_macd|@ECE.Con|
|00002ca0| 63 6f 72 64 69 61 2e 43 | 41 20 28 4b 65 69 74 68 |cordia.C|A (Keith|
|00002cb0| 20 4d 61 63 44 6f 6e 61 | 6c 64 29 20 77 72 69 74 | MacDona|ld) writ|
|00002cc0| 65 73 3a 0d 0d 3e 20 74 | 6f 20 61 20 70 72 6f 67 |es:..> t|o a prog|
|00002cd0| 72 61 6d 20 49 27 6d 20 | 77 6f 72 6b 69 6e 67 20 |ram I'm |working |
|00002ce0| 6f 6e 2e 20 20 54 68 65 | 73 65 20 66 69 6c 65 73 |on. The|se files|
|00002cf0| 20 77 6f 75 6c 64 20 28 | 49 20 61 73 73 75 6d 65 | would (|I assume|
|00002d00| 29 20 63 6f 6e 74 61 69 | 6e 20 63 6f 64 65 20 0d |) contai|n code .|
|00002d10| 3e 20 72 65 73 6f 75 72 | 63 65 73 2e 20 20 49 27 |> resour|ces. I'|
|00002d20| 76 65 20 6e 6f 74 20 62 | 65 65 6e 20 61 62 6c 65 |ve not b|een able|
|00002d30| 20 74 6f 20 66 69 6e 64 | 20 61 6e 79 20 65 78 61 | to find| any exa|
|00002d40| 6d 70 6c 65 73 20 6f 72 | 20 63 6c 65 61 72 20 64 |mples or| clear d|
|00002d50| 65 73 63 72 69 70 74 69 | 6f 6e 0d 3e 20 6f 66 20 |escripti|on.> of |
|00002d60| 77 68 61 74 20 49 20 6e | 65 65 64 20 74 6f 20 64 |what I n|eed to d|
|00002d70| 6f 20 74 6f 20 61 63 68 | 69 65 76 65 20 74 68 69 |o to ach|ieve thi|
|00002d80| 73 2e 20 20 49 27 6d 20 | 75 73 69 6e 67 20 50 61 |s. I'm |using Pa|
|00002d90| 73 63 61 6c 2c 20 62 75 | 74 20 49 20 69 6d 61 67 |scal, bu|t I imag|
|00002da0| 69 6e 65 0d 0d 43 68 65 | 63 6b 20 6f 75 74 20 4d |ine..Che|ck out M|
|00002db0| 61 63 54 65 63 68 20 76 | 6f 6c 2e 20 39 20 6e 6f |acTech v|ol. 9 no|
|00002dc0| 2e 20 39 20 28 53 65 70 | 74 20 39 33 29 2c 20 22 |. 9 (Sep|t 93), "|
|00002dd0| 45 78 74 65 72 6e 61 6c | 20 43 6f 64 65 20 4d 6f |External| Code Mo|
|00002de0| 64 75 6c 65 73 20 69 6e | 0d 50 61 73 63 61 6c 2e |dules in|.Pascal.|
|00002df0| 22 20 20 41 6c 73 6f 20 | 63 68 65 63 6b 20 6f 75 |" Also |check ou|
|00002e00| 74 20 74 68 65 20 74 65 | 63 68 20 6e 6f 74 65 20 |t the te|ch note |
|00002e10| 22 53 74 61 6e 64 2d 41 | 6c 6f 6e 65 20 43 6f 64 |"Stand-A|lone Cod|
|00002e20| 65 20 61 64 20 6e 61 75 | 73 65 75 6d 2e 22 0d 0d |e ad nau|seum."..|
|00002e30| 3e 20 41 6c 73 6f 20 72 | 65 6c 61 74 65 64 20 74 |> Also r|elated t|
|00002e40| 6f 20 63 6f 64 65 20 72 | 65 73 6f 75 72 63 65 73 |o code r|esources|
|00002e50| 20 2d 0d 3e 20 20 20 20 | 20 20 20 20 20 77 6f 75 | -.> | wou|
|00002e60| 6c 64 20 69 74 20 62 65 | 20 70 6f 73 73 69 62 6c |ld it be| possibl|
|00002e70| 65 20 74 6f 20 68 61 76 | 65 20 61 20 43 20 50 50 |e to hav|e a C PP|
|00002e80| 43 20 6e 61 74 69 76 65 | 20 63 6f 64 65 20 72 65 |C native| code re|
|00002e90| 73 6f 75 72 63 65 20 75 | 73 65 64 20 62 79 0d 3e |source u|sed by.>|
|00002ea0| 20 20 20 20 20 20 20 20 | 20 61 20 6e 6f 6e 2d 6e | | a non-n|
|00002eb0| 61 74 69 76 65 20 28 77 | 72 69 74 74 65 6e 20 69 |ative (w|ritten i|
|00002ec0| 6e 20 54 68 69 6e 6b 20 | 50 61 73 63 61 6c 29 20 |n Think |Pascal) |
|00002ed0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 3f 0d 0d 49 20 |applicat|ion?..I |
|00002ee0| 62 65 6c 69 65 76 65 20 | 73 6f 2c 20 62 75 74 20 |believe |so, but |
|00002ef0| 49 27 6d 20 6e 6f 74 20 | 73 75 72 65 20 6f 66 20 |I'm not |sure of |
|00002f00| 74 68 65 20 64 65 74 61 | 69 6c 73 2e 20 20 43 68 |the deta|ils. Ch|
|00002f10| 65 63 6b 20 6f 75 74 20 | 74 68 65 20 4d 69 78 65 |eck out |the Mixe|
|00002f20| 64 0d 4d 6f 64 65 20 61 | 6e 64 20 43 6f 64 65 20 |d.Mode a|nd Code |
|00002f30| 46 72 61 67 6d 65 6e 74 | 20 4d 61 6e 61 67 65 72 |Fragment| Manager|
|00002f40| 20 63 68 61 70 74 65 72 | 73 20 69 6e 20 4e 65 77 | chapter|s in New|
|00002f50| 20 49 6e 73 69 64 65 20 | 4d 61 63 3a 20 50 6f 77 | Inside |Mac: Pow|
|00002f60| 65 72 20 50 43 0d 53 79 | 73 74 65 6d 20 53 6f 66 |er PC.Sy|stem Sof|
|00002f70| 74 77 61 72 65 2e 0d 0d | 4a 69 6d 20 57 69 6e 74 |tware...|Jim Wint|
|00002f80| 65 72 6d 79 72 65 20 20 | 20 28 4f 70 69 6e 69 6f |ermyre | (Opinio|
|00002f90| 6e 73 20 65 78 70 72 65 | 73 73 65 64 20 61 72 65 |ns expre|ssed are|
|00002fa0| 20 6d 79 20 6f 77 6e 2c | 20 6f 66 20 63 6f 75 72 | my own,| of cour|
|00002fb0| 73 65 29 0d 0d 77 69 6e | 74 65 72 40 61 69 2e 72 |se)..win|ter@ai.r|
|00002fc0| 6c 2e 61 66 2e 6d 69 6c | 0d 77 69 6e 74 65 72 6d |l.af.mil|.winterm|
|00002fd0| 79 72 65 6a 40 6c 6f 6e | 65 78 2e 72 6c 2e 61 66 |yrej@lon|ex.rl.af|
|00002fe0| 2e 6d 69 6c 0d 0d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.mil..--|--------|
|00002ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003000| 2d 0d 0d 3e 46 72 6f 6d | 20 61 6d 75 6e 64 73 6f |-..>From| amundso|
|00003010| 6e 40 70 68 65 6e 6f 6d | 2e 70 68 79 73 69 63 73 |n@phenom|.physics|
|00003020| 2e 77 69 73 63 2e 65 64 | 75 20 28 4a 61 6d 65 73 |.wisc.ed|u (James|
|00003030| 20 46 2e 20 41 6d 75 6e | 64 73 6f 6e 29 0d 53 75 | F. Amun|dson).Su|
|00003040| 62 6a 65 63 74 3a 20 43 | 61 6e 20 49 20 64 6f 20 |bject: C|an I do |
|00003050| 74 68 69 73 20 77 69 74 | 68 20 74 68 65 20 54 68 |this wit|h the Th|
|00003060| 72 65 61 64 20 4d 61 6e | 61 67 65 72 3f 0d 44 61 |read Man|ager?.Da|
|00003070| 74 65 3a 20 53 61 74 2c | 20 31 36 20 4a 75 6c 20 |te: Sat,| 16 Jul |
|00003080| 31 39 39 34 20 32 31 3a | 30 35 3a 31 36 20 2d 30 |1994 21:|05:16 -0|
|00003090| 36 30 30 0d 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |600.Orga|nization|
|000030a0| 3a 20 44 69 76 69 73 69 | 6f 6e 20 6f 66 20 49 6e |: Divisi|on of In|
|000030b0| 66 6f 72 6d 61 74 69 6f | 6e 20 54 65 63 68 6e 6f |formatio|n Techno|
|000030c0| 6c 6f 67 79 0d 0d 43 61 | 6e 20 73 6f 6d 65 6f 6e |logy..Ca|n someon|
|000030d0| 65 20 74 65 6c 6c 20 6d | 65 20 69 66 20 77 68 61 |e tell m|e if wha|
|000030e0| 74 20 49 20 68 61 76 65 | 20 69 6e 20 6d 69 6e 64 |t I have| in mind|
|000030f0| 20 69 73 20 70 6f 73 73 | 69 62 6c 65 3f 20 49 20 | is poss|ible? I |
|00003100| 77 61 6e 74 20 74 6f 20 | 75 73 65 20 74 68 65 0d |want to |use the.|
|00003110| 54 68 72 65 61 64 20 4d | 61 6e 61 67 65 72 20 74 |Thread M|anager t|
|00003120| 6f 20 67 69 76 65 20 6d | 65 20 62 61 73 69 63 20 |o give m|e basic |
|00003130| 70 72 65 65 6d 70 74 69 | 76 65 20 6d 75 6c 74 69 |preempti|ve multi|
|00003140| 74 61 73 6b 69 6e 67 20 | 77 69 74 68 6f 75 74 20 |tasking |without |
|00003150| 6d 75 63 68 0d 74 68 6f | 75 67 68 74 2e 0d 0d 4d |much.tho|ught...M|
|00003160| 79 20 73 69 74 75 61 74 | 69 6f 6e 20 69 73 20 74 |y situat|ion is t|
|00003170| 68 69 73 3a 20 49 27 6d | 20 6e 6f 74 20 77 72 69 |his: I'm| not wri|
|00003180| 74 69 6e 67 20 61 20 4d | 61 63 20 61 70 70 6c 69 |ting a M|ac appli|
|00003190| 63 61 74 69 6f 6e 2e 20 | 49 27 6d 20 75 73 69 6e |cation. |I'm usin|
|000031a0| 67 20 54 68 69 6e 6b 20 | 43 0d 37 2e 30 20 74 6f |g Think |C.7.0 to|
|000031b0| 20 72 75 6e 20 73 63 69 | 65 6e 74 69 66 69 63 20 | run sci|entific |
|000031c0| 63 61 6c 63 75 6c 61 74 | 69 6f 6e 73 2e 20 4d 79 |calculat|ions. My|
|000031d0| 20 70 72 6f 67 72 61 6d | 73 20 61 72 65 20 65 6e | program|s are en|
|000031e0| 74 69 72 65 6c 79 20 41 | 4e 53 49 20 43 20 77 69 |tirely A|NSI C wi|
|000031f0| 74 68 0d 6e 6f 20 74 6f | 6f 6c 62 6f 78 20 63 61 |th.no to|olbox ca|
|00003200| 6c 6c 73 20 6f 74 68 65 | 72 20 74 68 61 6e 20 74 |lls othe|r than t|
|00003210| 68 6f 73 65 20 66 72 6f | 6d 20 74 68 65 20 54 68 |hose fro|m the Th|
|00003220| 69 6e 6b 20 43 20 41 4e | 53 49 20 6c 69 62 72 61 |ink C AN|SI libra|
|00003230| 72 69 65 73 2e 20 49 27 | 64 0d 6c 69 6b 65 20 74 |ries. I'|d.like t|
|00003240| 6f 20 62 65 20 61 62 6c | 65 20 74 6f 20 72 75 6e |o be abl|e to run|
|00003250| 20 74 68 65 20 70 72 6f | 67 72 61 6d 73 20 49 20 | the pro|grams I |
|00003260| 77 72 69 74 65 20 77 69 | 74 68 6f 75 74 20 74 61 |write wi|thout ta|
|00003270| 6b 69 6e 67 20 6f 76 65 | 72 20 6d 79 20 6d 61 63 |king ove|r my mac|
|00003280| 0d 77 68 69 6c 65 20 74 | 68 65 79 20 72 75 6e 2e |.while t|hey run.|
|00003290| 20 49 6e 20 74 68 65 20 | 70 61 73 74 2c 20 49 27 | In the |past, I'|
|000032a0| 76 65 20 68 61 63 6b 65 | 64 20 74 68 65 6d 20 74 |ve hacke|d them t|
|000032b0| 6f 20 63 61 6c 6c 20 57 | 61 69 74 4e 65 78 74 45 |o call W|aitNextE|
|000032c0| 76 65 6e 74 0d 6f 63 63 | 61 73 69 6f 6e 61 6c 6c |vent.occ|asionall|
|000032d0| 79 2e 20 54 68 65 20 70 | 72 6f 62 6c 65 6d 20 69 |y. The p|roblem i|
|000032e0| 73 20 74 68 61 74 20 69 | 74 20 74 61 6b 65 73 20 |s that i|t takes |
|000032f0| 61 20 66 61 69 72 20 61 | 6d 6f 75 6e 74 20 6f 66 |a fair a|mount of|
|00003300| 20 65 66 66 6f 72 74 20 | 6f 6e 20 6d 79 0d 70 61 | effort |on my.pa|
|00003310| 72 74 20 74 6f 20 64 65 | 63 69 64 65 20 77 68 65 |rt to de|cide whe|
|00003320| 72 65 20 61 6e 64 20 68 | 6f 77 20 6f 66 74 65 6e |re and h|ow often|
|00003330| 20 49 20 6e 65 65 64 20 | 74 6f 20 63 61 6c 6c 20 | I need |to call |
|00003340| 57 4e 45 2e 20 53 69 6e | 63 65 20 74 68 65 20 6e |WNE. Sin|ce the n|
|00003350| 61 74 75 72 65 20 6f 66 | 0d 6d 79 20 77 6f 72 6b |ature of|.my work|
|00003360| 20 69 6e 76 6f 6c 76 65 | 73 20 63 6f 6e 73 74 61 | involve|s consta|
|00003370| 6e 74 6c 79 20 63 68 61 | 6e 67 69 6e 67 20 74 68 |ntly cha|nging th|
|00003380| 65 20 70 72 6f 67 72 61 | 6d 73 20 49 27 6d 20 77 |e progra|ms I'm w|
|00003390| 72 69 74 69 6e 67 2c 20 | 61 64 6a 75 73 74 69 6e |riting, |adjustin|
|000033a0| 67 0d 6d 79 20 63 61 6c | 6c 73 20 74 6f 20 57 4e |g.my cal|ls to WN|
|000033b0| 45 20 65 76 65 72 79 20 | 74 69 6d 65 20 69 73 20 |E every |time is |
|000033c0| 69 6d 70 72 61 63 74 69 | 63 61 6c 2e 20 0d 0d 43 |impracti|cal. ..C|
|000033d0| 61 6e 20 49 20 75 73 65 | 20 74 68 65 20 54 68 72 |an I use| the Thr|
|000033e0| 65 61 64 20 4d 61 6e 61 | 67 65 72 20 77 69 74 68 |ead Mana|ger with|
|000033f0| 6f 75 74 20 6d 75 63 68 | 20 65 66 66 6f 72 74 3f |out much| effort?|
|00003400| 20 41 72 65 20 74 68 65 | 72 65 20 61 6e 79 20 65 | Are the|re any e|
|00003410| 78 61 6d 70 6c 65 73 0d | 6f 66 20 74 68 69 73 20 |xamples.|of this |
|00003420| 73 6f 72 74 20 6f 66 20 | 74 68 69 6e 67 3f 0d 0d |sort of |thing?..|
|00003430| 41 6e 79 20 61 64 76 69 | 63 65 20 77 69 6c 6c 20 |Any advi|ce will |
|00003440| 62 65 20 61 70 70 72 65 | 63 69 61 74 65 64 2e 0d |be appre|ciated..|
|00003450| 0d 54 68 61 6e 6b 73 2c | 0d 0d 4a 69 6d 20 41 6d |.Thanks,|..Jim Am|
|00003460| 75 6e 64 73 6f 6e 0d 0d | 2b 2b 2b 2b 2b 2b 2b 2b |undson..|++++++++|
|00003470| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00003480| 2b 2b 2b 0d 0d 3e 46 72 | 6f 6d 20 66 69 72 73 74 |+++..>Fr|om first|
|00003490| 2e 61 73 63 65 6e 74 40 | 6d 69 6e 64 6c 69 6e 6b |.ascent@|mindlink|
|000034a0| 2e 62 63 2e 63 61 20 28 | 41 6c 65 78 20 43 75 72 |.bc.ca (|Alex Cur|
|000034b0| 79 6c 6f 29 0d 44 61 74 | 65 3a 20 31 37 20 4a 75 |ylo).Dat|e: 17 Ju|
|000034c0| 6c 20 31 39 39 34 20 30 | 33 3a 31 37 3a 30 32 20 |l 1994 0|3:17:02 |
|000034d0| 47 4d 54 0d 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |GMT.Orga|nization|
|000034e0| 3a 20 4d 49 4e 44 20 4c | 49 4e 4b 21 20 43 6f 6d |: MIND L|INK! Com|
|000034f0| 6d 75 6e 69 63 61 74 69 | 6f 6e 73 20 43 6f 72 70 |municati|ons Corp|
|00003500| 2e 0d 0d 49 6e 20 61 72 | 74 69 63 6c 65 20 3c 61 |...In ar|ticle <a|
|00003510| 6d 75 6e 64 73 6f 6e 2d | 31 36 30 37 39 34 32 31 |mundson-|16079421|
|00003520| 30 35 31 36 30 30 30 31 | 40 66 31 38 30 2d 31 38 |05160001|@f180-18|
|00003530| 36 2e 6e 65 74 2e 77 69 | 73 63 2e 65 64 75 3e 0d |6.net.wi|sc.edu>.|
|00003540| 61 6d 75 6e 64 73 6f 6e | 40 70 68 65 6e 6f 6d 2e |amundson|@phenom.|
|00003550| 70 68 79 73 69 63 73 2e | 77 69 73 63 2e 65 64 75 |physics.|wisc.edu|
|00003560| 20 28 4a 61 6d 65 73 20 | 46 2e 20 41 6d 75 6e 64 | (James |F. Amund|
|00003570| 73 6f 6e 29 20 77 72 69 | 74 65 73 3a 0d 0d 3e 20 |son) wri|tes:..> |
|00003580| 43 61 6e 20 49 20 75 73 | 65 20 74 68 65 20 54 68 |Can I us|e the Th|
|00003590| 72 65 61 64 20 4d 61 6e | 61 67 65 72 20 77 69 74 |read Man|ager wit|
|000035a0| 68 6f 75 74 20 6d 75 63 | 68 20 65 66 66 6f 72 74 |hout muc|h effort|
|000035b0| 3f 20 41 72 65 20 74 68 | 65 72 65 20 61 6e 79 20 |? Are th|ere any |
|000035c0| 65 78 61 6d 70 6c 65 73 | 0d 3e 20 6f 66 20 74 68 |examples|.> of th|
|000035d0| 69 73 20 73 6f 72 74 20 | 6f 66 20 74 68 69 6e 67 |is sort |of thing|
|000035e0| 3f 0d 0d 47 72 61 62 20 | 64 65 76 65 6c 6f 70 20 |?..Grab |develop |
|000035f0| 31 37 2c 20 61 6e 64 20 | 61 20 63 6f 70 79 20 6f |17, and |a copy o|
|00003600| 66 20 43 6f 64 65 57 61 | 72 72 69 6f 72 20 33 2e |f CodeWa|rrior 3.|
|00003610| 35 2e 20 54 68 65 20 6c | 61 74 65 73 74 20 69 74 |5. The l|atest it|
|00003620| 65 72 61 74 69 6f 6e 20 | 6f 66 0d 50 6f 77 65 72 |eration |of.Power|
|00003630| 50 6c 61 6e 74 20 69 6e | 63 6c 75 64 65 73 20 61 |Plant in|cludes a|
|00003640| 20 6e 69 63 65 20 73 65 | 6c 65 63 74 69 6f 6e 20 | nice se|lection |
|00003650| 6f 66 20 74 68 72 65 61 | 64 20 63 6c 61 73 73 65 |of threa|d classe|
|00003660| 73 2e 20 54 68 65 79 27 | 72 65 20 62 65 69 6e 67 |s. They'|re being|
|00003670| 0d 75 73 65 64 20 69 6e | 20 61 20 70 72 6f 6a 65 |.used in| a proje|
|00003680| 63 74 20 49 27 6d 20 77 | 6f 72 6b 69 6e 67 20 6f |ct I'm w|orking o|
|00003690| 6e 20 72 69 67 68 74 20 | 6e 6f 77 2c 20 61 6e 64 |n right |now, and|
|000036a0| 20 74 68 65 20 66 65 6c | 6c 6f 77 20 75 73 69 6e | the fel|low usin|
|000036b0| 67 20 74 68 65 6d 0d 73 | 65 65 6d 73 20 74 6f 20 |g them.s|eems to |
|000036c0| 68 61 76 65 20 66 61 69 | 72 6c 79 20 70 6f 73 69 |have fai|rly posi|
|000036d0| 74 69 76 65 20 72 65 67 | 61 72 64 20 66 6f 72 20 |tive reg|ard for |
|000036e0| 74 68 65 6d 2e 20 41 6e | 64 20 66 6f 72 20 74 68 |them. An|d for th|
|000036f0| 65 20 72 65 73 74 20 6f | 66 0d 50 6f 77 65 72 50 |e rest o|f.PowerP|
|00003700| 6c 61 6e 74 2c 20 61 73 | 20 73 6f 6f 6e 20 61 73 |lant, as| soon as|
|00003710| 20 74 68 65 79 20 66 69 | 6e 69 73 68 20 69 74 20 | they fi|nish it |
|00003720| 3b 29 0d 0d 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |;)..++++|++++++++|
|00003730| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 0d |++++++++|+++++++.|
|00003740| 0d 3e 46 72 6f 6d 20 72 | 6d 61 68 40 70 61 6e 69 |.>From r|mah@pani|
|00003750| 78 2e 63 6f 6d 20 28 52 | 6f 62 65 72 74 20 4d 61 |x.com (R|obert Ma|
|00003760| 68 29 0d 44 61 74 65 3a | 20 53 75 6e 2c 20 31 37 |h).Date:| Sun, 17|
|00003770| 20 4a 75 6c 20 31 39 39 | 34 20 30 30 3a 35 33 3a | Jul 199|4 00:53:|
|00003780| 30 35 20 2d 30 35 30 30 | 0d 4f 72 67 61 6e 69 7a |05 -0500|.Organiz|
|00003790| 61 74 69 6f 6e 3a 20 4f | 6e 65 20 53 74 65 70 20 |ation: O|ne Step |
|000037a0| 42 65 79 6f 6e 64 0d 0d | 61 6d 75 6e 64 73 6f 6e |Beyond..|amundson|
|000037b0| 40 70 68 65 6e 6f 6d 2e | 70 68 79 73 69 63 73 2e |@phenom.|physics.|
|000037c0| 77 69 73 63 2e 65 64 75 | 20 28 4a 61 6d 65 73 20 |wisc.edu| (James |
|000037d0| 46 2e 20 41 6d 75 6e 64 | 73 6f 6e 29 20 77 72 6f |F. Amund|son) wro|
|000037e0| 74 65 3a 0d 0d 29 20 49 | 27 6d 20 75 73 69 6e 67 |te:..) I|'m using|
|000037f0| 20 54 68 69 6e 6b 20 43 | 20 37 2e 30 20 74 6f 20 | Think C| 7.0 to |
|00003800| 72 75 6e 20 73 63 69 65 | 6e 74 69 66 69 63 20 63 |run scie|ntific c|
|00003810| 61 6c 63 75 6c 61 74 69 | 6f 6e 73 2e 20 4d 79 20 |alculati|ons. My |
|00003820| 70 72 6f 67 72 61 6d 73 | 20 61 72 65 0d 29 20 65 |programs| are.) e|
|00003830| 6e 74 69 72 65 6c 79 20 | 41 4e 53 49 20 43 20 77 |ntirely |ANSI C w|
|00003840| 69 74 68 20 6e 6f 20 74 | 6f 6f 6c 62 6f 78 20 63 |ith no t|oolbox c|
|00003850| 61 6c 6c 73 20 6f 74 68 | 65 72 20 74 68 61 6e 20 |alls oth|er than |
|00003860| 74 68 6f 73 65 20 66 72 | 6f 6d 20 74 68 65 20 54 |those fr|om the T|
|00003870| 68 69 6e 6b 0d 29 20 43 | 20 41 4e 53 49 20 6c 69 |hink.) C| ANSI li|
|00003880| 62 72 61 72 69 65 73 2e | 20 49 27 64 20 6c 69 6b |braries.| I'd lik|
|00003890| 65 20 74 6f 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |e to be |able to |
|000038a0| 72 75 6e 20 74 68 65 20 | 70 72 6f 67 72 61 6d 73 |run the |programs|
|000038b0| 20 49 20 77 72 69 74 65 | 0d 29 20 77 69 74 68 6f | I write|.) witho|
|000038c0| 75 74 20 74 61 6b 69 6e | 67 20 6f 76 65 72 20 6d |ut takin|g over m|
|000038d0| 79 20 6d 61 63 20 77 68 | 69 6c 65 20 74 68 65 79 |y mac wh|ile they|
|000038e0| 20 72 75 6e 2e 20 49 6e | 20 74 68 65 20 70 61 73 | run. In| the pas|
|000038f0| 74 2c 20 49 27 76 65 20 | 68 61 63 6b 65 64 0d 29 |t, I've |hacked.)|
|00003900| 20 74 68 65 6d 20 74 6f | 20 63 61 6c 6c 20 57 61 | them to| call Wa|
|00003910| 69 74 4e 65 78 74 45 76 | 65 6e 74 20 6f 63 63 61 |itNextEv|ent occa|
|00003920| 73 69 6f 6e 61 6c 6c 79 | 2e 20 54 68 65 20 70 72 |sionally|. The pr|
|00003930| 6f 62 6c 65 6d 20 69 73 | 20 74 68 61 74 20 69 74 |oblem is| that it|
|00003940| 20 74 61 6b 65 73 0d 29 | 20 2e 2e 2e 0d 29 20 43 | takes.)| ....) C|
|00003950| 61 6e 20 49 20 75 73 65 | 20 74 68 65 20 54 68 72 |an I use| the Thr|
|00003960| 65 61 64 20 4d 61 6e 61 | 67 65 72 20 77 69 74 68 |ead Mana|ger with|
|00003970| 6f 75 74 20 6d 75 63 68 | 20 65 66 66 6f 72 74 3f |out much| effort?|
|00003980| 20 41 72 65 20 74 68 65 | 72 65 20 61 6e 79 20 65 | Are the|re any e|
|00003990| 78 61 6d 70 6c 65 73 0d | 29 20 6f 66 20 74 68 69 |xamples.|) of thi|
|000039a0| 73 20 73 6f 72 74 20 6f | 66 20 74 68 69 6e 67 3f |s sort o|f thing?|
|000039b0| 0d 0d 54 68 72 65 61 64 | 20 4d 61 6e 61 67 65 72 |..Thread| Manager|
|000039c0| 20 63 61 6e 20 64 6f 20 | 70 72 65 2d 65 6d 70 74 | can do |pre-empt|
|000039d0| 69 76 65 20 74 68 72 65 | 61 64 73 2c 20 5f 62 75 |ive thre|ads, _bu|
|000039e0| 74 5f 20 6f 6e 6c 79 20 | 6f 6e 20 36 38 4b 20 4d |t_ only |on 68K M|
|000039f0| 61 63 73 2e 20 20 49 6e | 0d 61 64 64 69 74 69 6f |acs. In|.additio|
|00003a00| 6e 2c 20 70 72 65 2d 65 | 6d 70 74 69 76 65 20 74 |n, pre-e|mptive t|
|00003a10| 68 72 65 61 64 73 20 6d | 75 73 74 20 6f 62 65 79 |hreads m|ust obey|
|00003a20| 20 74 68 65 20 73 61 6d | 65 20 72 75 6c 65 73 20 | the sam|e rules |
|00003a30| 61 73 20 69 6e 74 65 72 | 75 70 74 20 6c 65 76 65 |as inter|upt leve|
|00003a40| 6c 0d 63 6f 64 65 2e 20 | 20 49 2e 65 2e 20 6e 6f |l.code. | I.e. no|
|00003a50| 20 64 72 61 77 69 6e 67 | 2c 20 6e 6f 20 6d 6f 76 | drawing|, no mov|
|00003a60| 69 6e 67 20 6d 65 6d 6f | 72 79 2c 20 65 74 63 2e |ing memo|ry, etc.|
|00003a70| 0d 0d 54 68 65 72 65 27 | 73 20 65 78 61 6d 70 6c |..There'|s exampl|
|00003a80| 65 73 20 69 6e 20 44 65 | 76 65 6c 6f 70 20 31 37 |es in De|velop 17|
|00003a90| 20 74 68 61 74 20 67 6f | 65 73 20 6f 76 65 72 20 | that go|es over |
|00003aa0| 75 73 69 6e 67 20 74 68 | 65 20 54 68 72 65 61 64 |using th|e Thread|
|00003ab0| 20 4d 67 72 2c 20 62 75 | 74 0d 73 69 6e 63 65 20 | Mgr, bu|t.since |
|00003ac0| 75 73 69 6e 67 20 63 6f | 2d 6f 70 65 72 61 74 69 |using co|-operati|
|00003ad0| 76 65 20 74 68 72 65 61 | 64 73 20 77 6f 6e 27 74 |ve threa|ds won't|
|00003ae0| 20 67 61 69 6e 20 79 6f | 75 20 6d 75 63 68 20 28 | gain yo|u much (|
|00003af0| 79 6f 75 27 6c 6c 20 73 | 74 69 6c 6c 20 68 61 76 |you'll s|till hav|
|00003b00| 65 0d 74 6f 20 63 61 6c | 6c 20 59 69 65 6c 64 28 |e.to cal|l Yield(|
|00003b10| 29 20 6f 63 63 61 69 73 | 69 6f 6e 61 6c 6c 79 29 |) occais|ionally)|
|00003b20| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 6c 6f 6f 6b | you sho|uld look|
|00003b30| 20 61 74 20 79 6f 75 72 | 20 63 6f 64 65 20 61 6e | at your| code an|
|00003b40| 64 20 73 65 65 20 69 66 | 0d 79 6f 75 20 63 61 6e |d see if|.you can|
|00003b50| 20 75 73 65 20 70 72 65 | 2d 65 6d 70 74 69 76 65 | use pre|-emptive|
|00003b60| 20 74 68 72 65 61 64 73 | 2e 0d 0d 43 68 65 65 72 | threads|...Cheer|
|00003b70| 73 2c 0d 52 6f 62 0d 5f | 5f 5f 5f 5f 5f 5f 5f 5f |s,.Rob._|________|
|00003b80| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003b90| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003ba0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00003bb0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 0d 52 6f 62 |________|____.Rob|
|00003bc0| 65 72 74 20 53 2e 20 4d | 61 68 20 20 20 20 3a 20 |ert S. M|ah : |
|00003bd0| 20 4d 61 63 69 6e 74 6f | 73 68 20 73 6f 66 74 77 | Macinto|sh softw|
|00003be0| 61 72 65 20 64 65 76 65 | 6c 6f 70 6d 65 6e 74 20 |are deve|lopment |
|00003bf0| 20 3a 20 20 20 20 32 31 | 32 2e 39 34 37 2e 36 35 | : 21|2.947.65|
|00003c00| 30 37 0d 4f 6e 65 20 53 | 74 65 70 20 42 65 79 6f |07.One S|tep Beyo|
|00003c10| 6e 64 20 20 3a 20 20 20 | 20 20 20 61 6e 64 20 6e |nd : | and n|
|00003c20| 65 74 77 6f 72 6b 20 63 | 6f 6e 73 75 6c 74 69 6e |etwork c|onsultin|
|00003c30| 67 20 20 20 20 20 20 3a | 20 20 72 6d 61 68 40 70 |g :| rmah@p|
|00003c40| 61 6e 69 78 2e 63 6f 6d | 0d 0d 2b 2b 2b 2b 2b 2b |anix.com|..++++++|
|00003c50| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00003c60| 2b 2b 2b 2b 2b 0d 0d 3e | 46 72 6f 6d 20 67 77 61 |+++++..>|From gwa|
|00003c70| 74 74 73 40 66 6e 61 6c | 2e 66 6e 61 6c 2e 67 6f |tts@fnal|.fnal.go|
|00003c80| 76 20 28 47 6f 72 64 6f | 6e 20 57 61 74 74 73 29 |v (Gordo|n Watts)|
|00003c90| 0d 44 61 74 65 3a 20 4d | 6f 6e 2c 20 31 38 20 4a |.Date: M|on, 18 J|
|00003ca0| 75 6c 20 31 39 39 34 20 | 30 30 3a 30 39 3a 35 34 |ul 1994 |00:09:54|
|00003cb0| 20 2d 30 36 30 30 0d 4f | 72 67 61 6e 69 7a 61 74 | -0600.O|rganizat|
|00003cc0| 69 6f 6e 3a 20 46 65 72 | 6d 69 20 4c 61 62 0d 0d |ion: Fer|mi Lab..|
|00003cd0| 49 6e 20 61 72 74 69 63 | 6c 65 20 3c 72 6d 61 68 |In artic|le <rmah|
|00003ce0| 2d 31 37 30 37 39 34 30 | 30 35 33 30 35 30 30 30 |-1707940|05305000|
|00003cf0| 31 40 72 6d 61 68 2e 64 | 69 61 6c 75 70 2e 61 63 |1@rmah.d|ialup.ac|
|00003d00| 63 65 73 73 2e 6e 65 74 | 3e 2c 20 72 6d 61 68 40 |cess.net|>, rmah@|
|00003d10| 70 61 6e 69 78 2e 63 6f | 6d 0d 28 52 6f 62 65 72 |panix.co|m.(Rober|
|00003d20| 74 20 4d 61 68 29 20 77 | 72 6f 74 65 3a 0d 0d 3e |t Mah) w|rote:..>|
|00003d30| 20 61 6d 75 6e 64 73 6f | 6e 40 70 68 65 6e 6f 6d | amundso|n@phenom|
|00003d40| 2e 70 68 79 73 69 63 73 | 2e 77 69 73 63 2e 65 64 |.physics|.wisc.ed|
|00003d50| 75 20 28 4a 61 6d 65 73 | 20 46 2e 20 41 6d 75 6e |u (James| F. Amun|
|00003d60| 64 73 6f 6e 29 20 77 72 | 6f 74 65 3a 0d 3e 20 0d |dson) wr|ote:.> .|
|00003d70| 3e 20 29 20 49 27 6d 20 | 75 73 69 6e 67 20 54 68 |> ) I'm |using Th|
|00003d80| 69 6e 6b 20 43 20 37 2e | 30 20 74 6f 20 72 75 6e |ink C 7.|0 to run|
|00003d90| 20 73 63 69 65 6e 74 69 | 66 69 63 20 63 61 6c 63 | scienti|fic calc|
|00003da0| 75 6c 61 74 69 6f 6e 73 | 2e 20 4d 79 20 70 72 6f |ulations|. My pro|
|00003db0| 67 72 61 6d 73 20 61 72 | 65 0d 3e 20 29 20 65 6e |grams ar|e.> ) en|
|00003dc0| 74 69 72 65 6c 79 20 41 | 4e 53 49 20 43 20 77 69 |tirely A|NSI C wi|
|00003dd0| 74 68 20 6e 6f 20 74 6f | 6f 6c 62 6f 78 20 63 61 |th no to|olbox ca|
|00003de0| 6c 6c 73 20 6f 74 68 65 | 72 20 74 68 61 6e 20 74 |lls othe|r than t|
|00003df0| 68 6f 73 65 20 66 72 6f | 6d 20 74 68 65 20 54 68 |hose fro|m the Th|
|00003e00| 69 6e 6b 0d 3e 20 29 20 | 43 20 41 4e 53 49 20 6c |ink.> ) |C ANSI l|
|00003e10| 69 62 72 61 72 69 65 73 | 2e 20 49 27 64 20 6c 69 |ibraries|. I'd li|
|00003e20| 6b 65 20 74 6f 20 62 65 | 20 61 62 6c 65 20 74 6f |ke to be| able to|
|00003e30| 20 72 75 6e 20 74 68 65 | 20 70 72 6f 67 72 61 6d | run the| program|
|00003e40| 73 20 49 20 77 72 69 74 | 65 0d 3e 20 29 20 77 69 |s I writ|e.> ) wi|
|00003e50| 74 68 6f 75 74 20 74 61 | 6b 69 6e 67 20 6f 76 65 |thout ta|king ove|
|00003e60| 72 20 6d 79 20 6d 61 63 | 20 77 68 69 6c 65 20 74 |r my mac| while t|
|00003e70| 68 65 79 20 72 75 6e 2e | 20 49 6e 20 74 68 65 20 |hey run.| In the |
|00003e80| 70 61 73 74 2c 20 49 27 | 76 65 20 68 61 63 6b 65 |past, I'|ve hacke|
|00003e90| 64 0d 3e 20 29 20 74 68 | 65 6d 20 74 6f 20 63 61 |d.> ) th|em to ca|
|00003ea0| 6c 6c 20 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 |ll WaitN|extEvent|
|00003eb0| 20 6f 63 63 61 73 69 6f | 6e 61 6c 6c 79 2e 20 54 | occasio|nally. T|
|00003ec0| 68 65 20 70 72 6f 62 6c | 65 6d 20 69 73 20 74 68 |he probl|em is th|
|00003ed0| 61 74 20 69 74 20 74 61 | 6b 65 73 0d 3e 20 29 20 |at it ta|kes.> ) |
|00003ee0| 2e 2e 2e 0d 3e 20 29 20 | 43 61 6e 20 49 20 75 73 |....> ) |Can I us|
|00003ef0| 65 20 74 68 65 20 54 68 | 72 65 61 64 20 4d 61 6e |e the Th|read Man|
|00003f00| 61 67 65 72 20 77 69 74 | 68 6f 75 74 20 6d 75 63 |ager wit|hout muc|
|00003f10| 68 20 65 66 66 6f 72 74 | 3f 20 41 72 65 20 74 68 |h effort|? Are th|
|00003f20| 65 72 65 20 61 6e 79 20 | 65 78 61 6d 70 6c 65 73 |ere any |examples|
|00003f30| 0d 3e 20 29 20 6f 66 20 | 74 68 69 73 20 73 6f 72 |.> ) of |this sor|
|00003f40| 74 20 6f 66 20 74 68 69 | 6e 67 3f 0d 3e 20 0d 3e |t of thi|ng?.> .>|
|00003f50| 20 54 68 72 65 61 64 20 | 4d 61 6e 61 67 65 72 20 | Thread |Manager |
|00003f60| 63 61 6e 20 64 6f 20 70 | 72 65 2d 65 6d 70 74 69 |can do p|re-empti|
|00003f70| 76 65 20 74 68 72 65 61 | 64 73 2c 20 5f 62 75 74 |ve threa|ds, _but|
|00003f80| 5f 20 6f 6e 6c 79 20 6f | 6e 20 36 38 4b 20 4d 61 |_ only o|n 68K Ma|
|00003f90| 63 73 2e 20 20 49 6e 0d | 3e 20 61 64 64 69 74 69 |cs. In.|> additi|
|00003fa0| 6f 6e 2c 20 70 72 65 2d | 65 6d 70 74 69 76 65 20 |on, pre-|emptive |
|00003fb0| 74 68 72 65 61 64 73 20 | 6d 75 73 74 20 6f 62 65 |threads |must obe|
|00003fc0| 79 20 74 68 65 20 73 61 | 6d 65 20 72 75 6c 65 73 |y the sa|me rules|
|00003fd0| 20 61 73 20 69 6e 74 65 | 72 75 70 74 20 6c 65 76 | as inte|rupt lev|
|00003fe0| 65 6c 0d 3e 20 63 6f 64 | 65 2e 20 20 49 2e 65 2e |el.> cod|e. I.e.|
|00003ff0| 20 6e 6f 20 64 72 61 77 | 69 6e 67 2c 20 6e 6f 20 | no draw|ing, no |
|00004000| 6d 6f 76 69 6e 67 20 6d | 65 6d 6f 72 79 2c 20 65 |moving m|emory, e|
|00004010| 74 63 2e 0d 3e 20 0d 3e | 20 54 68 65 72 65 27 73 |tc..> .>| There's|
|00004020| 20 65 78 61 6d 70 6c 65 | 73 20 69 6e 20 44 65 76 | example|s in Dev|
|00004030| 65 6c 6f 70 20 31 37 20 | 74 68 61 74 20 67 6f 65 |elop 17 |that goe|
|00004040| 73 20 6f 76 65 72 20 75 | 73 69 6e 67 20 74 68 65 |s over u|sing the|
|00004050| 20 54 68 72 65 61 64 20 | 4d 67 72 2c 20 62 75 74 | Thread |Mgr, but|
|00004060| 0d 3e 20 73 69 6e 63 65 | 20 75 73 69 6e 67 20 63 |.> since| using c|
|00004070| 6f 2d 6f 70 65 72 61 74 | 69 76 65 20 74 68 72 65 |o-operat|ive thre|
|00004080| 61 64 73 20 77 6f 6e 27 | 74 20 67 61 69 6e 20 79 |ads won'|t gain y|
|00004090| 6f 75 20 6d 75 63 68 20 | 28 79 6f 75 27 6c 6c 20 |ou much |(you'll |
|000040a0| 73 74 69 6c 6c 20 68 61 | 76 65 0d 3e 20 74 6f 20 |still ha|ve.> to |
|000040b0| 63 61 6c 6c 20 59 69 65 | 6c 64 28 29 20 6f 63 63 |call Yie|ld() occ|
|000040c0| 61 69 73 69 6f 6e 61 6c | 6c 79 29 20 79 6f 75 20 |aisional|ly) you |
|000040d0| 73 68 6f 75 6c 64 20 6c | 6f 6f 6b 20 61 74 20 79 |should l|ook at y|
|000040e0| 6f 75 72 20 63 6f 64 65 | 20 61 6e 64 20 73 65 65 |our code| and see|
|000040f0| 20 69 66 0d 3e 20 79 6f | 75 20 63 61 6e 20 75 73 | if.> yo|u can us|
|00004100| 65 20 70 72 65 2d 65 6d | 70 74 69 76 65 20 74 68 |e pre-em|ptive th|
|00004110| 72 65 61 64 73 2e 0d 3e | 20 0d 3e 20 43 68 65 65 |reads..>| .> Chee|
|00004120| 72 73 2c 0d 3e 20 52 6f | 62 0d 0d 49 74 20 64 65 |rs,.> Ro|b..It de|
|00004130| 70 65 6e 64 73 20 75 70 | 6f 6e 20 77 68 61 74 20 |pends up|on what |
|00004140| 41 4e 53 49 20 43 20 6c | 69 62 72 61 72 79 20 63 |ANSI C l|ibrary c|
|00004150| 61 6c 6c 73 20 79 6f 75 | 20 6d 61 6b 65 2e 20 20 |alls you| make. |
|00004160| 49 66 20 79 6f 75 20 6d | 61 6b 65 20 63 61 6c 6c |If you m|ake call|
|00004170| 73 20 74 6f 0d 70 72 69 | 6e 74 66 2c 20 65 74 63 |s to.pri|ntf, etc|
|00004180| 2e 20 74 68 65 6e 20 74 | 68 65 20 73 68 6f 72 74 |. then t|he short|
|00004190| 20 61 6e 73 77 65 72 20 | 69 73 20 2e 2e 2e 20 77 | answer |is ... w|
|000041a0| 65 6c 6c 2c 20 6e 6f 2e | 20 20 43 61 6c 6c 73 20 |ell, no.| Calls |
|000041b0| 74 6f 20 74 68 69 6e 67 | 73 20 6c 69 6b 65 0d 73 |to thing|s like.s|
|000041c0| 71 72 74 2c 20 65 74 63 | 2e 20 61 72 65 20 6f 6b |qrt, etc|. are ok|
|000041d0| 2e 20 20 42 61 73 69 63 | 61 6c 6c 79 2c 20 61 6e |. Basic|ally, an|
|000041e0| 79 20 63 61 6c 6c 20 74 | 68 61 74 20 77 69 6c 6c |y call t|hat will|
|000041f0| 20 63 61 75 73 65 20 74 | 68 65 20 73 63 72 65 65 | cause t|he scree|
|00004200| 6e 20 74 6f 20 62 65 0d | 64 72 61 77 6e 20 74 6f |n to be.|drawn to|
|00004210| 20 6f 72 20 6d 65 6d 6f | 72 79 20 74 6f 20 62 65 | or memo|ry to be|
|00004220| 20 6d 6f 76 65 64 20 28 | 6d 61 6c 6c 6f 63 2c 20 | moved (|malloc, |
|00004230| 65 74 63 2e 29 20 77 69 | 6c 6c 20 62 72 65 61 6b |etc.) wi|ll break|
|00004240| 20 77 69 74 68 20 74 68 | 65 0d 70 72 65 2d 65 6d | with th|e.pre-em|
|00004250| 70 74 69 76 65 20 74 68 | 72 65 61 64 73 2e 0d 0d |ptive th|reads...|
|00004260| 54 68 65 72 65 20 61 72 | 65 20 74 77 6f 20 74 68 |There ar|e two th|
|00004270| 69 6e 67 73 20 79 6f 75 | 20 63 61 6e 20 64 6f 2c |ings you| can do,|
|00004280| 20 69 66 20 79 6f 75 20 | 73 74 69 6c 6c 20 77 61 | if you |still wa|
|00004290| 6e 74 20 74 6f 20 75 73 | 65 20 74 68 65 20 74 68 |nt to us|e the th|
|000042a0| 72 65 61 64 73 2e 20 0d | 46 69 72 73 74 2c 20 79 |reads. .|First, y|
|000042b0| 6f 75 20 63 61 6e 20 69 | 73 6f 6c 61 74 65 20 79 |ou can i|solate y|
|000042c0| 6f 75 72 20 63 61 6c 6c | 73 20 74 6f 20 70 72 69 |our call|s to pri|
|000042d0| 6e 74 66 20 61 6e 64 20 | 74 68 65 20 6c 69 6b 65 |ntf and |the like|
|000042e0| 20 73 6f 20 74 68 65 79 | 20 61 72 65 20 6e 65 76 | so they| are nev|
|000042f0| 65 72 0d 63 61 6c 6c 65 | 64 20 69 6e 20 61 20 70 |er.calle|d in a p|
|00004300| 72 65 65 6d 70 74 69 76 | 65 20 74 68 72 65 61 64 |reemptiv|e thread|
|00004310| 20 28 61 20 74 68 72 65 | 61 64 20 69 73 20 70 72 | (a thre|ad is pr|
|00004320| 65 65 6d 70 74 69 76 65 | 20 6f 72 20 63 6f 6f 70 |eemptive| or coop|
|00004330| 65 72 61 74 69 76 65 20 | 77 68 65 6e 0d 69 74 20 |erative |when.it |
|00004340| 69 73 20 63 72 65 61 74 | 65 64 2c 20 61 6e 64 20 |is creat|ed, and |
|00004350| 63 61 6e 6e 6f 74 20 63 | 68 61 6e 67 65 20 64 75 |cannot c|hange du|
|00004360| 72 69 6e 67 20 69 74 73 | 20 6c 69 66 65 74 69 6d |ring its| lifetim|
|00004370| 65 29 2e 0d 0d 53 65 63 | 6f 6e 64 2c 20 61 6e 64 |e)...Sec|ond, and|
|00004380| 20 70 65 72 68 61 70 73 | 20 73 69 6d 70 6c 65 72 | perhaps| simpler|
|00004390| 2c 20 69 73 20 79 6f 75 | 20 63 61 6e 20 69 6d 70 |, is you| can imp|
|000043a0| 6c 65 6d 65 6e 74 20 79 | 6f 75 72 20 63 61 6c 63 |lement y|our calc|
|000043b0| 75 6c 61 74 69 6f 6e 20 | 61 73 20 61 0d 63 6f 6f |ulation |as a.coo|
|000043c0| 70 65 72 61 74 69 76 65 | 20 74 68 72 65 61 64 2e |perative| thread.|
|000043d0| 20 20 53 70 72 69 6e 6b | 6c 65 20 63 61 6c 6c 73 | Sprink|le calls|
|000043e0| 20 74 6f 20 22 59 69 65 | 6c 64 28 29 22 20 61 6c | to "Yie|ld()" al|
|000043f0| 6c 20 6f 76 65 72 20 74 | 68 65 20 70 6c 61 63 65 |l over t|he place|
|00004400| 2c 20 62 75 74 0d 64 6f | 6e 27 74 20 77 6f 72 72 |, but.do|n't worr|
|00004410| 79 20 74 6f 6f 20 6d 75 | 63 68 20 61 62 6f 75 74 |y too mu|ch about|
|00004420| 20 74 68 65 20 70 6c 61 | 63 65 6d 65 6e 74 2e 20 | the pla|cement. |
|00004430| 20 4a 75 73 74 20 6d 61 | 6b 65 20 73 75 72 65 20 | Just ma|ke sure |
|00004440| 74 68 65 72 65 20 61 72 | 65 20 65 6e 6f 75 67 68 |there ar|e enough|
|00004450| 0d 6f 66 20 74 68 65 6d | 2e 20 20 4e 6f 77 2c 20 |.of them|. Now, |
|00004460| 69 6e 20 79 6f 75 72 20 | 6d 61 69 6e 20 65 76 65 |in your |main eve|
|00004470| 6e 74 20 6c 6f 6f 70 20 | 79 6f 75 20 63 61 6e 20 |nt loop |you can |
|00004480| 70 75 74 20 73 6f 6d 65 | 74 68 69 6e 67 20 6c 69 |put some|thing li|
|00004490| 6b 65 20 74 68 65 0d 66 | 6f 6c 6c 6f 77 69 6e 67 |ke the.f|ollowing|
|000044a0| 20 28 74 68 69 73 20 63 | 6f 64 65 20 68 61 73 20 | (this c|ode has |
|000044b0| 6e 6f 74 20 62 65 65 6e | 20 63 6f 6d 70 69 6c 65 |not been| compile|
|000044c0| 64 2f 64 65 62 75 67 67 | 65 64 21 29 3a 0d 0d 77 |d/debugg|ed!):..w|
|000044d0| 68 69 6c 65 20 28 21 67 | 44 6f 6e 65 29 20 7b 20 |hile (!g|Done) { |
|000044e0| 20 2f 2f 20 67 44 6f 6e | 65 20 77 69 6c 6c 20 62 | // gDon|e will b|
|000044f0| 65 20 73 65 74 20 62 79 | 20 79 6f 75 72 20 63 61 |e set by| your ca|
|00004500| 6c 63 20 77 68 65 6e 20 | 69 74 20 69 73 20 66 69 |lc when |it is fi|
|00004510| 6e 69 73 68 65 64 2e 2e | 2e 0d 0d 20 20 63 75 72 |nished..|... cur|
|00004520| 72 65 6e 74 5f 74 69 6d | 65 20 3d 20 54 69 63 6b |rent_tim|e = Tick|
|00004530| 43 6f 75 6e 74 20 28 29 | 20 2b 20 33 30 3b 20 20 |Count ()| + 30; |
|00004540| 2f 2f 20 43 75 72 72 65 | 6e 74 20 74 69 6d 65 20 |// Curre|nt time |
|00004550| 70 6c 75 73 20 31 2f 32 | 20 61 20 73 65 63 6f 6e |plus 1/2| a secon|
|00004560| 64 0d 0d 20 20 77 68 69 | 6c 65 20 28 63 75 72 72 |d.. whi|le (curr|
|00004570| 65 6e 74 5f 74 69 6d 65 | 20 3e 20 54 69 63 6b 43 |ent_time| > TickC|
|00004580| 6f 75 6e 74 20 28 29 29 | 0d 20 20 20 20 59 69 65 |ount ())|. Yie|
|00004590| 6c 64 20 28 29 3b 20 20 | 2f 2f 20 47 6f 20 6f 66 |ld (); |// Go of|
|000045a0| 66 20 61 6e 64 20 64 6f | 20 73 6f 6d 65 20 72 65 |f and do| some re|
|000045b0| 61 6c 20 63 61 6c 63 75 | 6c 61 74 69 6f 6e 73 20 |al calcu|lations |
|000045c0| 66 6f 72 20 61 20 31 2f | 32 20 73 65 63 6f 6e 64 |for a 1/|2 second|
|000045d0| 0d 0d 20 20 57 61 69 74 | 4e 65 78 74 45 76 65 6e |.. Wait|NextEven|
|000045e0| 74 20 28 2e 2e 2e 29 3b | 0d 7d 0d 0d 45 78 63 75 |t (...);|.}..Excu|
|000045f0| 73 65 20 74 68 65 20 66 | 6f 72 6d 61 74 74 69 6e |se the f|ormattin|
|00004600| 67 2e 2e 2e 20 59 6f 75 | 20 77 69 6c 6c 20 69 6e |g... You| will in|
|00004610| 63 75 72 65 20 64 65 61 | 64 20 74 69 6d 65 20 69 |cure dea|d time i|
|00004620| 6e 20 74 68 65 20 59 69 | 65 6c 64 20 63 61 6c 6c |n the Yi|eld call|
|00004630| 2c 20 49 27 6d 0d 6e 6f | 74 20 73 75 72 65 20 68 |, I'm.no|t sure h|
|00004640| 6f 77 20 6d 75 63 68 20 | 73 70 65 65 64 20 79 6f |ow much |speed yo|
|00004650| 75 20 61 72 65 20 74 72 | 79 69 6e 67 20 74 6f 20 |u are tr|ying to |
|00004660| 67 65 74 20 6f 75 74 2e | 20 20 54 68 65 20 66 61 |get out.| The fa|
|00004670| 63 74 20 74 68 61 74 20 | 79 6f 75 20 61 72 65 0d |ct that |you are.|
|00004680| 63 61 6c 6c 69 6e 67 20 | 57 61 69 74 4e 65 78 74 |calling |WaitNext|
|00004690| 45 76 65 6e 74 20 6d 65 | 61 6e 73 20 74 68 61 74 |Event me|ans that|
|000046a0| 20 79 6f 75 20 61 72 65 | 20 77 69 6c 6c 69 6e 67 | you are| willing|
|000046b0| 20 74 6f 20 67 69 76 65 | 20 75 70 20 73 6f 6d 65 | to give| up some|
|000046c0| 20 74 69 6d 65 2e 2e 2e | 20 0d 54 68 69 73 20 77 | time...| .This w|
|000046d0| 69 6c 6c 20 72 65 71 75 | 69 72 65 20 6c 69 74 74 |ill requ|ire litt|
|000046e0| 6c 65 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 20 |le modif|ication |
|000046f0| 74 6f 20 79 6f 75 72 20 | 63 75 72 72 65 6e 74 20 |to your |current |
|00004700| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2c 20 49 0d 73 |applicat|ion, I.s|
|00004710| 75 73 70 65 63 74 2e 0d | 0d 4f 6e 65 20 62 61 64 |uspect..|.One bad|
|00004720| 20 74 68 69 6e 67 20 61 | 62 6f 75 74 20 75 73 69 | thing a|bout usi|
|00004730| 6e 67 20 74 68 72 65 61 | 64 73 20 69 66 20 79 6f |ng threa|ds if yo|
|00004740| 75 20 68 61 76 65 20 74 | 6f 20 66 69 67 75 72 65 |u have t|o figure|
|00004750| 20 6f 75 74 20 77 68 61 | 74 20 79 6f 75 72 0d 73 | out wha|t your.s|
|00004760| 74 61 63 6b 20 75 73 61 | 67 65 20 69 73 20 62 65 |tack usa|ge is be|
|00004770| 66 6f 72 65 20 79 6f 75 | 20 72 75 6e 20 79 6f 75 |fore you| run you|
|00004780| 72 20 63 61 6c 63 75 6c | 61 74 69 6f 6e 20 2d 2d |r calcul|ation --|
|00004790| 20 74 68 72 65 61 64 73 | 20 64 6f 6e 27 74 20 68 | threads| don't h|
|000047a0| 61 76 65 20 61 0d 73 74 | 61 63 6b 20 74 68 61 74 |ave a.st|ack that|
|000047b0| 20 67 72 6f 77 73 20 61 | 73 20 6e 65 65 64 20 62 | grows a|s need b|
|000047c0| 65 2e 20 20 54 68 69 73 | 20 6d 69 67 68 74 20 62 |e. This| might b|
|000047d0| 65 20 62 61 64 20 69 66 | 20 79 6f 75 20 61 72 65 |e bad if| you are|
|000047e0| 20 64 6f 69 6e 67 20 6c | 61 74 74 69 63 65 0d 63 | doing l|attice.c|
|000047f0| 61 6c 63 75 6c 61 74 69 | 6f 6e 73 20 61 6e 64 20 |alculati|ons and |
|00004800| 61 6c 6c 6f 63 61 74 65 | 20 6c 61 72 67 65 20 61 |allocate| large a|
|00004810| 72 72 61 79 73 20 6f 6e | 20 74 68 65 20 73 74 61 |rrays on| the sta|
|00004820| 63 6b 20 28 64 6f 20 69 | 74 20 67 6c 6f 62 61 6c |ck (do i|t global|
|00004830| 6c 79 20 61 74 0d 63 6f | 6d 70 69 6c 65 20 74 69 |ly at.co|mpile ti|
|00004840| 6d 65 20 6f 72 20 62 79 | 20 6d 61 6c 6c 6f 63 20 |me or by| malloc |
|00004850| 77 68 69 6c 65 20 72 75 | 6e 6e 69 6e 67 29 2e 0d |while ru|nning)..|
|00004860| 0d 59 6f 75 20 63 61 6e | 20 75 73 65 20 61 6c 6c |.You can| use all|
|00004870| 20 63 61 6c 6c 73 20 69 | 6e 20 63 6f 6f 70 65 72 | calls i|n cooper|
|00004880| 61 74 69 76 65 20 74 68 | 72 65 61 64 73 2c 20 70 |ative th|reads, p|
|00004890| 72 69 6e 74 66 2c 20 6d | 61 6c 6c 6f 63 2c 20 65 |rintf, m|alloc, e|
|000048a0| 74 63 2e 20 65 74 63 2e | 0d 61 6e 64 20 74 68 65 |tc. etc.|.and the|
|000048b0| 79 20 77 69 6c 6c 20 77 | 6f 72 6b 20 6f 6e 20 74 |y will w|ork on t|
|000048c0| 68 65 20 70 6f 77 65 72 | 70 63 2e 0d 0d 43 68 65 |he power|pc...Che|
|000048d0| 65 72 73 2c 0d 20 20 20 | 47 6f 72 64 6f 6e 20 28 |ers,. |Gordon (|
|000048e0| 68 69 67 68 20 65 6e 65 | 72 67 79 20 70 68 79 73 |high ene|rgy phys|
|000048f0| 69 63 73 29 2e 0d 0d 2d | 2d 20 0d 47 6f 72 64 6f |ics)...-|- .Gordo|
|00004900| 6e 20 57 61 74 74 73 20 | 2d 2d 20 67 77 61 74 74 |n Watts |-- gwatt|
|00004910| 73 40 66 6e 61 6c 2e 66 | 6e 61 6c 2e 67 6f 76 0d |s@fnal.f|nal.gov.|
|00004920| 0d 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |.+++++++|++++++++|
|00004930| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 0d 0d 3e 46 |++++++++|++++..>F|
|00004940| 72 6f 6d 20 44 61 76 65 | 20 46 61 6c 6b 65 6e 62 |rom Dave| Falkenb|
|00004950| 75 72 67 20 3c 66 61 6c | 6b 65 6e 40 61 70 70 6c |urg <fal|ken@appl|
|00004960| 65 2e 63 6f 6d 3e 0d 44 | 61 74 65 3a 20 57 65 64 |e.com>.D|ate: Wed|
|00004970| 2c 20 32 30 20 4a 75 6c | 20 31 39 39 34 20 31 36 |, 20 Jul| 1994 16|
|00004980| 3a 34 33 3a 34 31 20 47 | 4d 54 0d 4f 72 67 61 6e |:43:41 G|MT.Organ|
|00004990| 69 7a 61 74 69 6f 6e 3a | 20 41 70 70 6c 65 20 43 |ization:| Apple C|
|000049a0| 6f 6d 70 75 74 65 72 2c | 20 49 6e 63 2e 0d 0d 49 |omputer,| Inc...I|
|000049b0| 6e 20 61 72 74 69 63 6c | 65 20 3c 67 77 61 74 74 |n articl|e <gwatt|
|000049c0| 73 2d 31 38 30 37 39 34 | 30 30 30 39 35 34 30 30 |s-180794|00095400|
|000049d0| 30 31 40 73 6c 69 70 31 | 31 33 2e 66 6e 61 6c 2e |01@slip1|13.fnal.|
|000049e0| 67 6f 76 3e 20 47 6f 72 | 64 6f 6e 20 57 61 74 74 |gov> Gor|don Watt|
|000049f0| 73 2c 0d 67 77 61 74 74 | 73 40 66 6e 61 6c 2e 66 |s,.gwatt|s@fnal.f|
|00004a00| 6e 61 6c 2e 67 6f 76 20 | 77 72 69 74 65 73 3a 0d |nal.gov |writes:.|
|00004a10| 3e 77 68 69 6c 65 20 28 | 21 67 44 6f 6e 65 29 20 |>while (|!gDone) |
|00004a20| 7b 20 20 2f 2f 20 67 44 | 6f 6e 65 20 77 69 6c 6c |{ // gD|one will|
|00004a30| 20 62 65 20 73 65 74 20 | 62 79 20 79 6f 75 72 20 | be set |by your |
|00004a40| 63 61 6c 63 20 77 68 65 | 6e 20 69 74 20 69 73 0d |calc whe|n it is.|
|00004a50| 66 69 6e 69 73 68 65 64 | 2e 2e 2e 0d 3e 0d 3e 20 |finished|....>.> |
|00004a60| 20 63 75 72 72 65 6e 74 | 5f 74 69 6d 65 20 3d 20 | current|_time = |
|00004a70| 54 69 63 6b 43 6f 75 6e | 74 20 28 29 20 2b 20 33 |TickCoun|t () + 3|
|00004a80| 30 3b 20 20 2f 2f 20 43 | 75 72 72 65 6e 74 20 74 |0; // C|urrent t|
|00004a90| 69 6d 65 20 70 6c 75 73 | 20 31 2f 32 20 61 20 73 |ime plus| 1/2 a s|
|00004aa0| 65 63 6f 6e 64 0d 3e 0d | 3e 20 20 77 68 69 6c 65 |econd.>.|> while|
|00004ab0| 20 28 63 75 72 72 65 6e | 74 5f 74 69 6d 65 20 3e | (curren|t_time >|
|00004ac0| 20 54 69 63 6b 43 6f 75 | 6e 74 20 28 29 29 0d 3e | TickCou|nt ()).>|
|00004ad0| 20 20 20 20 59 69 65 6c | 64 20 28 29 3b 20 20 2f | Yiel|d (); /|
|00004ae0| 2f 20 47 6f 20 6f 66 66 | 20 61 6e 64 20 64 6f 20 |/ Go off| and do |
|00004af0| 73 6f 6d 65 20 72 65 61 | 6c 20 63 61 6c 63 75 6c |some rea|l calcul|
|00004b00| 61 74 69 6f 6e 73 20 66 | 6f 72 20 61 20 31 2f 32 |ations f|or a 1/2|
|00004b10| 20 73 65 63 6f 6e 64 0d | 3e 0d 3e 20 20 57 61 69 | second.|>.> Wai|
|00004b20| 74 4e 65 78 74 45 76 65 | 6e 74 20 28 2e 2e 2e 29 |tNextEve|nt (...)|
|00004b30| 3b 0d 3e 7d 0d 0d 0d 47 | 41 43 4b 21 0d 0d 50 6c |;.>}...G|ACK!..Pl|
|00004b40| 65 61 73 65 20 75 73 65 | 20 61 20 64 79 6e 61 6d |ease use| a dynam|
|00004b50| 69 63 20 76 61 6c 75 65 | 20 66 6f 72 20 61 64 6a |ic value| for adj|
|00004b60| 75 73 74 69 6e 67 20 73 | 6c 65 65 70 20 74 69 6d |usting s|leep tim|
|00004b70| 69 6e 67 73 20 6c 69 6b | 65 20 74 68 69 73 3a 20 |ings lik|e this: |
|00004b80| 69 2e 65 2e 0d 72 65 70 | 6c 61 63 65 20 74 68 65 |i.e..rep|lace the|
|00004b90| 20 22 2b 33 30 22 20 77 | 69 74 68 20 22 2b 67 52 | "+30" w|ith "+gR|
|00004ba0| 75 6e 51 75 61 6e 74 75 | 6d 22 2c 20 61 20 76 61 |unQuantu|m", a va|
|00004bb0| 6c 75 65 20 74 68 61 74 | 20 69 73 20 63 6f 6d 70 |lue that| is comp|
|00004bc0| 75 74 65 64 0d 64 79 6e | 61 6d 69 63 61 6c 6c 79 |uted.dyn|amically|
|00004bd0| 20 62 61 73 65 64 20 6f | 6e 20 74 68 65 20 63 6f | based o|n the co|
|00004be0| 6d 70 75 74 65 20 70 6f | 77 65 72 20 6f 66 20 74 |mpute po|wer of t|
|00004bf0| 68 65 20 43 50 55 2e 20 | 20 54 68 65 20 63 6f 64 |he CPU. | The cod|
|00004c00| 65 20 61 62 6f 76 65 20 | 6d 65 61 6e 73 0d 74 68 |e above |means.th|
|00004c10| 61 74 20 65 76 65 6e 20 | 69 66 20 77 65 20 6d 61 |at even |if we ma|
|00004c20| 6b 65 20 74 68 65 20 4d | 61 63 4f 53 20 31 30 30 |ke the M|acOS 100|
|00004c30| 78 20 66 61 73 74 65 72 | 2c 20 79 6f 75 20 6d 69 |x faster|, you mi|
|00004c40| 67 68 74 20 6c 69 6d 69 | 74 20 74 68 65 20 61 62 |ght limi|t the ab|
|00004c50| 69 6c 69 74 79 0d 66 6f | 72 20 74 68 65 20 75 73 |ility.fo|r the us|
|00004c60| 65 72 20 74 6f 20 73 77 | 69 74 63 68 20 61 70 70 |er to sw|itch app|
|00004c70| 6c 69 63 61 74 69 6f 6e | 73 20 64 6f 77 6e 20 74 |lication|s down t|
|00004c80| 6f 20 6f 6e 63 65 20 65 | 76 65 72 79 20 74 77 6f |o once e|very two|
|00004c90| 20 73 65 63 6f 6e 64 73 | 2e 0d 0d 48 41 4c 46 20 | seconds|...HALF |
|00004ca0| 41 20 53 45 43 4f 4e 44 | 20 49 53 20 41 4c 4f 54 |A SECOND| IS ALOT|
|00004cb0| 20 4f 46 20 43 50 55 20 | 54 49 4d 45 20 54 4f 20 | OF CPU |TIME TO |
|00004cc0| 42 45 20 45 41 54 49 4e | 47 20 77 69 74 68 6f 75 |BE EATIN|G withou|
|00004cd0| 74 20 79 69 65 6c 64 69 | 6e 67 20 63 6f 6e 74 72 |t yieldi|ng contr|
|00004ce0| 6f 6c 0d 74 6f 20 6f 74 | 68 65 72 20 61 70 70 6c |ol.to ot|her appl|
|00004cf0| 69 63 61 74 69 6f 6e 73 | 2e 0d 0d 2d 44 61 76 65 |ications|...-Dave|
|00004d00| 20 46 61 6c 6b 65 6e 62 | 75 72 67 0d 2d 41 70 70 | Falkenb|urg.-App|
|00004d10| 6c 65 20 43 6f 6d 70 75 | 74 65 72 2c 20 49 6e 63 |le Compu|ter, Inc|
|00004d20| 2e 0d 0d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |...-----|--------|
|00004d30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 0d |--------|------..|
|00004d40| 3e 46 72 6f 6d 20 63 63 | 6f 6e 73 74 61 6e 40 65 |>From cc|onstan@e|
|00004d50| 70 64 69 76 31 2e 65 6e | 76 2e 67 6f 76 2e 62 63 |pdiv1.en|v.gov.bc|
|00004d60| 2e 63 61 20 28 43 61 72 | 6c 20 42 2e 20 43 6f 6e |.ca (Car|l B. Con|
|00004d70| 73 74 61 6e 74 69 6e 65 | 29 0d 53 75 62 6a 65 63 |stantine|).Subjec|
|00004d80| 74 3a 20 44 69 63 65 20 | 52 6f 6c 6c 69 6e 67 20 |t: Dice |Rolling |
|00004d90| 2d 20 61 6e 73 77 65 72 | 73 0d 44 61 74 65 3a 20 |- answer|s.Date: |
|00004da0| 54 68 75 2c 20 32 31 20 | 4a 75 6c 20 31 39 39 34 |Thu, 21 |Jul 1994|
|00004db0| 20 30 38 3a 31 32 3a 31 | 32 20 2d 30 37 30 30 0d | 08:12:1|2 -0700.|
|00004dc0| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 4d 69 |Organiza|tion: Mi|
|00004dd0| 6e 69 73 74 72 79 20 6f | 66 20 45 6e 76 69 72 6f |nistry o|f Enviro|
|00004de0| 6e 6d 65 6e 74 2c 20 4c | 61 6e 64 73 20 26 20 50 |nment, L|ands & P|
|00004df0| 61 72 6b 73 0d 0d 46 69 | 6e 61 6c 6c 79 2c 20 61 |arks..Fi|nally, a|
|00004e00| 66 74 65 72 20 6d 75 63 | 68 20 66 69 64 64 6c 69 |fter muc|h fiddli|
|00004e10| 6e 67 20 61 6e 64 20 65 | 78 61 6d 69 6e 69 6e 67 |ng and e|xamining|
|00004e20| 20 6f 66 20 63 6f 64 65 | 2c 20 49 20 66 69 6e 61 | of code|, I fina|
|00004e30| 6c 6c 79 20 67 6f 74 20 | 6d 79 20 64 69 63 65 0d |lly got |my dice.|
|00004e40| 61 6e 69 6d 61 74 69 6f | 6e 20 77 6f 72 6b 69 6e |animatio|n workin|
|00004e50| 67 20 69 6e 20 6d 79 20 | 67 61 6d 65 2e 20 20 54 |g in my |game. T|
|00004e60| 68 65 72 65 20 69 73 20 | 61 20 74 72 69 63 6b 20 |here is |a trick |
|00004e70| 74 6f 20 69 74 2e 0d 0d | 42 65 63 61 75 73 65 20 |to it...|Because |
|00004e80| 6d 61 6e 79 20 70 65 6f | 70 6c 65 20 68 65 6c 70 |many peo|ple help|
|00004e90| 65 64 20 6d 65 2c 20 49 | 20 74 68 6f 75 67 68 74 |ed me, I| thought|
|00004ea0| 20 49 20 77 6f 75 6c 64 | 20 70 6f 73 74 20 77 68 | I would| post wh|
|00004eb0| 61 74 20 49 20 66 6f 75 | 6e 64 20 73 6f 20 74 68 |at I fou|nd so th|
|00004ec0| 61 74 0d 6f 74 68 65 72 | 73 20 63 61 6e 20 62 65 |at.other|s can be|
|00004ed0| 20 68 65 6c 70 65 64 20 | 74 6f 6f 2e 0d 0d 46 69 | helped |too...Fi|
|00004ee0| 72 73 74 2c 20 61 20 6c | 69 74 74 6c 65 20 62 61 |rst, a l|ittle ba|
|00004ef0| 63 6b 67 72 6f 75 6e 64 | 2e 20 20 49 20 75 73 65 |ckground|. I use|
|00004f00| 20 33 20 67 6c 6f 62 61 | 6c 20 47 57 6f 72 6c 64 | 3 globa|l GWorld|
|00004f10| 73 20 74 6f 20 68 6f 6c | 64 20 28 61 29 20 61 6c |s to hol|d (a) al|
|00004f20| 6c 20 73 69 78 0d 64 69 | 63 65 20 66 72 6f 6d 20 |l six.di|ce from |
|00004f30| 61 20 50 49 43 54 20 72 | 65 73 6f 75 72 63 65 2c |a PICT r|esource,|
|00004f40| 20 28 62 29 20 74 68 65 | 20 6d 61 73 6b 20 61 6e | (b) the| mask an|
|00004f50| 64 20 28 63 29 20 61 20 | 77 6f 72 6b 69 6e 67 20 |d (c) a |working |
|00004f60| 61 72 65 61 2e 20 20 54 | 68 69 73 20 73 65 74 0d |area. T|his set.|
|00004f70| 75 70 20 69 73 20 73 69 | 6d 69 6c 61 72 20 74 6f |up is si|milar to|
|00004f80| 20 68 6f 77 20 6a 6f 68 | 6e 20 63 61 6c 68 6f 75 | how joh|n calhou|
|00004f90| 6e 20 64 69 64 20 68 69 | 73 20 67 61 6d 65 73 20 |n did hi|s games |
|00004fa0| 6c 69 6b 65 20 47 6c 79 | 70 61 20 49 49 2e 20 20 |like Gly|pa II. |
|00004fb0| 41 73 0d 6d 65 6e 74 69 | 6f 6e 65 64 20 61 62 6f |As.menti|oned abo|
|00004fc0| 76 65 2c 20 74 68 65 73 | 65 20 61 72 65 20 61 6c |ve, thes|e are al|
|00004fd0| 6c 20 67 6c 6f 62 61 6c | 2c 20 73 6f 20 49 20 63 |l global|, so I c|
|00004fe0| 61 6e 20 61 63 63 65 73 | 73 20 74 68 65 6d 20 66 |an acces|s them f|
|00004ff0| 72 6f 6d 0d 61 6e 79 77 | 68 65 72 65 2e 20 20 49 |rom.anyw|here. I|
|00005000| 20 61 6c 73 6f 20 75 73 | 65 20 61 20 63 75 73 74 | also us|e a cust|
|00005010| 6f 6d 20 77 69 6e 64 6f | 77 20 72 65 63 6f 72 64 |om windo|w record|
|00005020| 20 73 74 72 75 63 74 75 | 72 65 20 74 68 61 74 20 | structu|re that |
|00005030| 69 6e 63 6c 75 64 65 73 | 20 61 0d 47 57 6f 72 6c |includes| a.GWorl|
|00005040| 64 20 77 68 69 63 68 20 | 68 61 73 20 74 68 65 20 |d which |has the |
|00005050| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 74 68 65 20 |contents| of the |
|00005060| 77 69 6e 64 6f 77 20 69 | 6e 20 69 74 2e 20 20 54 |window i|n it. T|
|00005070| 68 69 73 20 69 73 20 75 | 73 65 64 20 66 6f 72 0d |his is u|sed for.|
|00005080| 72 65 61 6c 6c 79 20 66 | 61 73 74 20 75 70 64 61 |really f|ast upda|
|00005090| 74 65 73 20 28 53 65 65 | 20 4d 61 63 20 50 72 6f |tes (See| Mac Pro|
|000050a0| 67 2e 20 53 65 63 72 65 | 74 73 2c 20 63 68 20 36 |g. Secre|ts, ch 6|
|000050b0| 20 66 6f 72 20 6d 6f 72 | 65 20 64 65 74 61 69 6c | for mor|e detail|
|000050c0| 73 29 0d 0d 4e 6f 77 20 | 74 68 61 74 20 61 6c 6c |s)..Now |that all|
|000050d0| 20 74 68 65 20 47 57 6f | 72 6c 64 73 20 61 72 65 | the GWo|rlds are|
|000050e0| 20 73 65 74 20 75 70 20 | 61 6e 64 20 74 68 65 20 | set up |and the |
|000050f0| 69 74 65 6d 73 20 61 72 | 65 20 69 6e 20 74 68 65 |items ar|e in the|
|00005100| 6d 2c 20 49 20 75 73 65 | 0d 43 6f 70 79 4d 61 73 |m, I use|.CopyMas|
|00005110| 6b 20 28 73 70 65 65 64 | 20 69 73 20 6e 6f 74 20 |k (speed| is not |
|00005120| 69 6d 70 6f 72 74 61 6e | 74 20 69 6e 20 74 68 69 |importan|t in thi|
|00005130| 73 20 67 61 6d 65 29 20 | 74 6f 20 63 6f 70 79 20 |s game) |to copy |
|00005140| 74 68 65 20 64 69 63 65 | 20 66 72 6f 6d 20 74 68 |the dice| from th|
|00005150| 65 0d 64 69 63 65 57 6f | 72 6c 64 20 61 6e 64 20 |e.diceWo|rld and |
|00005160| 74 68 65 20 6d 61 73 6b | 20 66 72 6f 6d 20 74 68 |the mask| from th|
|00005170| 65 20 6d 61 73 6b 57 6f | 72 6c 64 20 74 6f 20 74 |e maskWo|rld to t|
|00005180| 68 65 20 77 6f 72 6b 57 | 6f 72 6c 64 2e 20 28 77 |he workW|orld. (w|
|00005190| 69 74 68 20 6d 65 20 73 | 6f 0d 66 61 72 3f 29 20 |ith me s|o.far?) |
|000051a0| 20 54 68 69 73 20 69 73 | 20 61 20 73 69 6d 70 6c | This is| a simpl|
|000051b0| 65 20 63 61 6c 6c 2e 20 | 20 49 20 75 73 65 20 69 |e call. | I use i|
|000051c0| 74 20 74 77 69 63 65 20 | 61 73 20 49 20 68 61 76 |t twice |as I hav|
|000051d0| 65 20 32 20 64 69 63 65 | 20 49 20 77 61 6e 74 20 |e 2 dice| I want |
|000051e0| 74 6f 0d 64 69 73 70 6c | 61 79 20 61 6e 64 20 22 |to.displ|ay and "|
|000051f0| 72 6f 6c 6c 22 2e 20 20 | 49 20 63 61 6e 20 74 68 |roll". |I can th|
|00005200| 65 6e 20 75 73 65 20 43 | 6f 70 79 42 69 74 73 20 |en use C|opyBits |
|00005210| 74 6f 20 63 6f 70 79 20 | 74 68 65 20 77 6f 72 6b |to copy |the work|
|00005220| 57 6f 72 6c 64 20 74 6f | 20 6d 79 0d 77 69 6e 64 |World to| my.wind|
|00005230| 6f 77 27 73 20 6f 66 66 | 73 63 72 65 65 6e 20 47 |ow's off|screen G|
|00005240| 57 6f 72 6c 64 20 66 6f | 72 20 75 70 64 61 74 69 |World fo|r updati|
|00005250| 6e 67 20 70 75 72 70 6f | 73 65 73 2e 20 20 4e 6f |ng purpo|ses. No|
|00005260| 20 70 72 6f 62 6c 65 6d | 73 20 68 65 72 65 2e 0d | problem|s here..|
|00005270| 0d 54 68 65 20 74 72 69 | 63 6b 20 63 6f 6d 65 73 |.The tri|ck comes|
|00005280| 20 77 68 65 6e 20 79 6f | 75 20 77 61 6e 74 20 74 | when yo|u want t|
|00005290| 6f 20 63 6f 70 79 20 74 | 68 65 20 64 69 63 65 20 |o copy t|he dice |
|000052a0| 66 72 6f 6d 20 74 68 65 | 20 47 57 6f 72 6c 64 20 |from the| GWorld |
|000052b0| 74 6f 20 74 68 65 0d 77 | 69 6e 64 6f 77 2e 20 20 |to the.w|indow. |
|000052c0| 57 68 65 6e 20 79 6f 75 | 20 75 73 65 20 47 57 6f |When you| use GWo|
|000052d0| 72 6c 64 73 2c 20 79 6f | 75 20 61 6c 77 61 79 73 |rlds, yo|u always|
|000052e0| 20 75 73 65 20 47 65 74 | 47 57 6f 72 6c 64 20 61 | use Get|GWorld a|
|000052f0| 6e 64 20 53 65 74 47 57 | 6f 72 6c 64 20 77 68 65 |nd SetGW|orld whe|
|00005300| 6e 0d 63 6f 70 79 69 6e | 67 20 66 72 6f 6d 20 31 |n.copyin|g from 1|
|00005310| 20 47 57 6f 72 6c 64 20 | 74 6f 20 61 6e 6f 74 68 | GWorld |to anoth|
|00005320| 65 72 2e 20 20 48 6f 77 | 65 76 65 72 2c 20 69 66 |er. How|ever, if|
|00005330| 20 79 6f 75 20 75 73 65 | 20 74 68 69 73 20 77 68 | you use| this wh|
|00005340| 65 6e 20 79 6f 75 20 77 | 61 6e 74 0d 74 6f 20 63 |en you w|ant.to c|
|00005350| 6f 70 79 20 74 6f 20 74 | 68 65 20 77 69 6e 64 6f |opy to t|he windo|
|00005360| 77 2c 20 43 6f 70 79 42 | 69 74 73 20 6d 61 6b 65 |w, CopyB|its make|
|00005370| 73 20 79 6f 75 72 20 4d | 61 63 20 43 52 41 53 48 |s your M|ac CRASH|
|00005380| 20 62 69 67 20 74 69 6d | 65 21 21 20 28 49 20 72 | big tim|e!! (I r|
|00005390| 61 6e 0d 74 68 69 73 20 | 69 6e 20 74 68 65 20 64 |an.this |in the d|
|000053a0| 65 62 75 67 67 65 72 20 | 69 6e 20 54 48 49 4e 4b |ebugger |in THINK|
|000053b0| 20 43 20 37 2e 30 2e 33 | 20 61 6e 64 20 49 20 73 | C 7.0.3| and I s|
|000053c0| 74 69 6c 6c 20 63 6f 75 | 6c 64 6e 27 74 20 67 65 |till cou|ldn't ge|
|000053d0| 74 20 6f 75 74 2e 20 0d | 63 6d 64 2d 6f 70 74 2d |t out. .|cmd-opt-|
|000053e0| 65 73 63 20 64 69 64 6e | 27 74 20 64 6f 20 6d 75 |esc didn|'t do mu|
|000053f0| 63 68 2c 20 49 20 68 61 | 64 20 74 6f 20 72 65 73 |ch, I ha|d to res|
|00005400| 74 61 72 74 2e 20 20 49 | 20 68 61 76 65 20 61 6e |tart. I| have an|
|00005410| 20 4c 43 49 49 49 20 77 | 69 74 68 20 31 32 4d 42 | LCIII w|ith 12MB|
|00005420| 0d 52 41 4d 29 2e 20 20 | 53 6f 20 77 68 61 74 20 |.RAM). |So what |
|00005430| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 64 6f 20 69 |you have| to do i|
|00005440| 73 20 75 73 65 20 47 65 | 74 50 6f 72 74 20 61 6e |s use Ge|tPort an|
|00005450| 64 20 53 65 74 50 6f 72 | 74 20 77 68 65 6e 20 63 |d SetPor|t when c|
|00005460| 6f 70 79 69 6e 67 20 74 | 6f 0d 74 68 65 20 77 69 |opying t|o.the wi|
|00005470| 6e 64 6f 77 2e 20 20 54 | 68 69 73 20 77 6f 72 6b |ndow. T|his work|
|00005480| 73 20 77 69 74 68 6f 75 | 74 20 61 20 68 69 74 63 |s withou|t a hitc|
|00005490| 68 2e 20 20 0d 0d 49 20 | 74 68 65 6e 20 75 73 65 |h. ..I |then use|
|000054a0| 20 43 6f 70 79 4d 61 73 | 6b 20 61 73 20 49 20 64 | CopyMas|k as I d|
|000054b0| 69 64 20 62 65 66 6f 72 | 65 20 74 6f 20 63 6f 70 |id befor|e to cop|
|000054c0| 79 20 74 68 65 20 64 69 | 63 65 20 74 6f 20 74 68 |y the di|ce to th|
|000054d0| 65 20 77 6f 72 6b 57 6f | 72 6c 64 20 61 6e 64 0d |e workWo|rld and.|
|000054e0| 43 6f 70 79 42 69 74 73 | 20 74 6f 20 63 6f 70 79 |CopyBits| to copy|
|000054f0| 20 66 72 6f 6d 20 74 68 | 65 20 77 6f 72 6b 57 6f | from th|e workWo|
|00005500| 72 6c 64 20 74 6f 20 74 | 68 65 20 77 69 6e 64 6f |rld to t|he windo|
|00005510| 77 2e 20 20 54 68 69 73 | 20 69 73 20 73 74 69 6c |w. This| is stil|
|00005520| 6c 20 70 72 65 74 74 79 | 0d 66 61 73 74 20 64 65 |l pretty|.fast de|
|00005530| 73 70 69 74 65 20 74 68 | 65 20 69 6e 74 65 72 6d |spite th|e interm|
|00005540| 65 64 69 61 74 65 20 73 | 74 65 70 73 2e 20 20 49 |ediate s|teps. I|
|00005550| 27 76 65 20 73 65 65 6e | 20 73 6f 6d 65 20 63 6f |'ve seen| some co|
|00005560| 64 65 20 62 79 20 54 6f | 6e 79 20 4d 79 6c 65 73 |de by To|ny Myles|
|00005570| 0d 74 68 61 74 20 49 20 | 67 6f 74 20 6f 66 66 20 |.that I |got off |
|00005580| 6f 66 20 66 74 70 2e 61 | 70 70 6c 65 2e 63 6f 6d |of ftp.a|pple.com|
|00005590| 20 63 61 6c 6c 65 64 20 | 43 6f 70 79 42 69 74 73 | called |CopyBits|
|000055a0| 20 76 73 2e 20 43 6f 70 | 79 4d 61 73 6b 2e 20 20 | vs. Cop|yMask. |
|000055b0| 48 65 20 75 73 65 73 0d | 43 6f 70 79 42 69 74 73 |He uses.|CopyBits|
|000055c0| 20 77 69 74 68 20 61 20 | 6d 61 73 6b 52 67 6e 20 | with a |maskRgn |
|000055d0| 74 6f 20 63 6f 70 79 20 | 74 6f 20 74 68 65 20 77 |to copy |to the w|
|000055e0| 69 6e 64 6f 77 2e 20 20 | 54 68 69 73 20 69 73 20 |indow. |This is |
|000055f0| 6d 75 63 68 20 66 61 73 | 74 65 72 2e 20 20 42 75 |much fas|ter. Bu|
|00005600| 74 0d 6c 69 6b 65 20 49 | 20 73 61 69 64 2c 20 49 |t.like I| said, I|
|00005610| 20 64 6f 6e 27 74 20 6e | 65 65 64 20 73 70 65 65 | don't n|eed spee|
|00005620| 64 2e 20 20 41 6c 73 6f | 2c 20 79 6f 75 20 63 61 |d. Also|, you ca|
|00005630| 6e 20 6a 75 73 74 20 70 | 6c 61 69 6e 20 65 6c 69 |n just p|lain eli|
|00005640| 6d 61 74 65 20 74 68 65 | 0d 69 6e 74 65 72 6d 61 |mate the|.interma|
|00005650| 74 65 20 73 74 65 70 20 | 61 6e 64 20 43 6f 70 79 |te step |and Copy|
|00005660| 4d 61 73 6b 20 64 69 72 | 65 63 74 6c 79 20 74 6f |Mask dir|ectly to|
|00005670| 20 74 68 65 20 77 69 6e | 64 6f 77 20 69 6e 73 74 | the win|dow inst|
|00005680| 65 61 64 20 6f 66 20 74 | 68 65 0d 77 6f 72 6b 57 |ead of t|he.workW|
|00005690| 6f 72 6c 64 20 61 6e 64 | 20 74 68 65 6e 20 74 68 |orld and| then th|
|000056a0| 65 20 77 69 6e 64 6f 77 | 2e 0d 0d 54 68 61 6e 6b |e window|...Thank|
|000056b0| 73 20 74 6f 20 6d 61 6e | 79 20 70 65 6f 70 6c 65 |s to man|y people|
|000056c0| 20 6f 6e 20 74 68 65 20 | 4e 65 74 20 66 6f 72 20 | on the |Net for |
|000056d0| 64 6f 6e 61 74 69 6e 67 | 20 63 6f 64 65 20 28 4b |donating| code (K|
|000056e0| 65 6e 20 4c 6f 6e 67 29 | 20 61 6e 64 20 68 65 6c |en Long)| and hel|
|000056f0| 70 0d 28 41 61 72 6f 6e | 20 47 69 6c 65 73 2c 20 |p.(Aaron| Giles, |
|00005700| 49 6e 67 65 6d 61 72 20 | 52 2e 2c 20 65 74 20 61 |Ingemar |R., et a|
|00005710| 6c 2e 29 20 73 6f 20 74 | 68 61 74 20 49 20 63 61 |l.) so t|hat I ca|
|00005720| 6e 20 61 63 74 75 61 6c | 6c 79 20 67 65 74 20 74 |n actual|ly get t|
|00005730| 68 69 73 20 74 6f 20 77 | 6f 72 6b 2e 0d 0d 2d 2d |his to w|ork...--|
|00005740| 20 0d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | .======|========|
|00005750| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005760| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005770| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005780| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 43 61 72 6c 20 |========|==.Carl |
|00005790| 42 2e 20 43 6f 6e 73 74 | 61 6e 74 69 6e 65 20 20 |B. Const|antine |
|000057a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000057b0| 42 2e 43 2e 20 45 6e 76 | 69 72 6f 6e 6d 65 6e 74 |B.C. Env|ironment|
|000057c0| 2c 20 4c 61 6e 64 73 20 | 26 20 50 61 72 6b 73 0d |, Lands |& Parks.|
|000057d0| 45 6e 64 2d 55 73 65 72 | 20 53 75 70 70 6f 72 74 |End-User| Support|
|000057e0| 20 41 6e 61 6c 79 73 74 | 20 20 20 20 20 20 20 20 | Analyst| |
|000057f0| 20 20 20 20 20 43 43 4f | 4e 53 54 41 4e 40 65 70 | CCO|NSTAN@ep|
|00005800| 64 69 76 31 2e 65 6e 76 | 2e 67 6f 76 2e 62 63 2e |div1.env|.gov.bc.|
|00005810| 63 61 0d 20 50 47 50 20 | 4b 65 79 20 61 76 61 69 |ca. PGP |Key avai|
|00005820| 6c 61 62 6c 65 20 69 66 | 20 79 6f 75 20 66 69 6e |lable if| you fin|
|00005830| 67 65 72 3a 20 43 43 4f | 4e 53 54 41 4e 40 45 55 |ger: CCO|NSTAN@EU|
|00005840| 53 41 43 42 43 2e 65 6e | 76 2e 67 6f 76 2e 62 63 |SACBC.en|v.gov.bc|
|00005850| 2e 63 61 0d 0d 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |.ca..+++|++++++++|
|00005860| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00005870| 0d 0d 3e 46 72 6f 6d 20 | 73 38 32 38 39 36 33 40 |..>From |s828963@|
|00005880| 6b 75 62 2e 6e 6c 20 28 | 50 65 74 65 72 20 42 65 |kub.nl (|Peter Be|
|00005890| 72 63 6b 29 0d 44 61 74 | 65 3a 20 32 32 20 4a 75 |rck).Dat|e: 22 Ju|
|000058a0| 6c 20 31 39 39 34 20 31 | 32 3a 32 31 3a 35 33 20 |l 1994 1|2:21:53 |
|000058b0| 47 4d 54 0d 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |GMT.Orga|nization|
|000058c0| 3a 20 4b 55 42 2c 20 54 | 68 65 20 4e 65 74 68 65 |: KUB, T|he Nethe|
|000058d0| 72 6c 61 6e 64 73 0d 0d | 49 6e 20 61 72 74 69 63 |rlands..|In artic|
|000058e0| 6c 65 20 3c 63 63 6f 6e | 73 74 61 6e 2d 32 31 30 |le <ccon|stan-210|
|000058f0| 37 39 34 30 38 31 32 31 | 32 30 30 30 31 40 65 75 |79408121|20001@eu|
|00005900| 73 61 63 62 63 2e 65 6e | 76 2e 67 6f 76 2e 62 63 |sacbc.en|v.gov.bc|
|00005910| 2e 63 61 3e 2c 20 63 63 | 6f 6e 73 74 61 6e 40 65 |.ca>, cc|onstan@e|
|00005920| 70 64 69 76 31 2e 65 6e | 76 2e 67 6f 76 2e 62 63 |pdiv1.en|v.gov.bc|
|00005930| 2e 63 61 20 28 43 61 72 | 6c 20 42 2e 20 43 6f 6e |.ca (Car|l B. Con|
|00005940| 73 74 61 6e 74 69 6e 65 | 29 20 77 72 69 74 65 73 |stantine|) writes|
|00005950| 3a 0d 7c 3e 20 46 69 6e | 61 6c 6c 79 2c 20 61 66 |:.|> Fin|ally, af|
|00005960| 74 65 72 20 6d 75 63 68 | 20 66 69 64 64 6c 69 6e |ter much| fiddlin|
|00005970| 67 20 61 6e 64 20 65 78 | 61 6d 69 6e 69 6e 67 20 |g and ex|amining |
|00005980| 6f 66 20 63 6f 64 65 2c | 20 49 20 66 69 6e 61 6c |of code,| I final|
|00005990| 6c 79 20 67 6f 74 20 6d | 79 20 64 69 63 65 0d 7c |ly got m|y dice.||
|000059a0| 3e 20 61 6e 69 6d 61 74 | 69 6f 6e 20 77 6f 72 6b |> animat|ion work|
|000059b0| 69 6e 67 20 69 6e 20 6d | 79 20 67 61 6d 65 2e 20 |ing in m|y game. |
|000059c0| 20 54 68 65 72 65 20 69 | 73 20 61 20 74 72 69 63 | There i|s a tric|
|000059d0| 6b 20 74 6f 20 69 74 2e | 0d 7c 3e 20 0d 7c 3e 20 |k to it.|.|> .|> |
|000059e0| 42 65 63 61 75 73 65 20 | 6d 61 6e 79 20 70 65 6f |Because |many peo|
|000059f0| 70 6c 65 20 68 65 6c 70 | 65 64 20 6d 65 2c 20 49 |ple help|ed me, I|
|00005a00| 20 74 68 6f 75 67 68 74 | 20 49 20 77 6f 75 6c 64 | thought| I would|
|00005a10| 20 70 6f 73 74 20 77 68 | 61 74 20 49 20 66 6f 75 | post wh|at I fou|
|00005a20| 6e 64 20 73 6f 20 74 68 | 61 74 0d 7c 3e 20 6f 74 |nd so th|at.|> ot|
|00005a30| 68 65 72 73 20 63 61 6e | 20 62 65 20 68 65 6c 70 |hers can| be help|
|00005a40| 65 64 20 74 6f 6f 2e 0d | 7c 3e 20 0d 5b 73 6e 69 |ed too..||> .[sni|
|00005a50| 70 5d 0d 7c 3e 20 0d 7c | 3e 20 54 68 65 20 74 72 |p].|> .||> The tr|
|00005a60| 69 63 6b 20 63 6f 6d 65 | 73 20 77 68 65 6e 20 79 |ick come|s when y|
|00005a70| 6f 75 20 77 61 6e 74 20 | 74 6f 20 63 6f 70 79 20 |ou want |to copy |
|00005a80| 74 68 65 20 64 69 63 65 | 20 66 72 6f 6d 20 74 68 |the dice| from th|
|00005a90| 65 20 47 57 6f 72 6c 64 | 20 74 6f 20 74 68 65 0d |e GWorld| to the.|
|00005aa0| 7c 3e 20 77 69 6e 64 6f | 77 2e 20 20 57 68 65 6e ||> windo|w. When|
|00005ab0| 20 79 6f 75 20 75 73 65 | 20 47 57 6f 72 6c 64 73 | you use| GWorlds|
|00005ac0| 2c 20 79 6f 75 20 61 6c | 77 61 79 73 20 75 73 65 |, you al|ways use|
|00005ad0| 20 47 65 74 47 57 6f 72 | 6c 64 20 61 6e 64 20 53 | GetGWor|ld and S|
|00005ae0| 65 74 47 57 6f 72 6c 64 | 20 77 68 65 6e 0d 7c 3e |etGWorld| when.|>|
|00005af0| 20 63 6f 70 79 69 6e 67 | 20 66 72 6f 6d 20 31 20 | copying| from 1 |
|00005b00| 47 57 6f 72 6c 64 20 74 | 6f 20 61 6e 6f 74 68 65 |GWorld t|o anothe|
|00005b10| 72 2e 20 20 48 6f 77 65 | 76 65 72 2c 20 69 66 20 |r. Howe|ver, if |
|00005b20| 79 6f 75 20 75 73 65 20 | 74 68 69 73 20 77 68 65 |you use |this whe|
|00005b30| 6e 20 79 6f 75 20 77 61 | 6e 74 0d 7c 3e 20 74 6f |n you wa|nt.|> to|
|00005b40| 20 63 6f 70 79 20 74 6f | 20 74 68 65 20 77 69 6e | copy to| the win|
|00005b50| 64 6f 77 2c 20 43 6f 70 | 79 42 69 74 73 20 6d 61 |dow, Cop|yBits ma|
|00005b60| 6b 65 73 20 79 6f 75 72 | 20 4d 61 63 20 43 52 41 |kes your| Mac CRA|
|00005b70| 53 48 20 62 69 67 20 74 | 69 6d 65 21 21 20 28 49 |SH big t|ime!! (I|
|00005b80| 20 72 61 6e 0d 7c 3e 20 | 74 68 69 73 20 69 6e 20 | ran.|> |this in |
|00005b90| 74 68 65 20 64 65 62 75 | 67 67 65 72 20 69 6e 20 |the debu|gger in |
|00005ba0| 54 48 49 4e 4b 20 43 20 | 37 2e 30 2e 33 20 61 6e |THINK C |7.0.3 an|
|00005bb0| 64 20 49 20 73 74 69 6c | 6c 20 63 6f 75 6c 64 6e |d I stil|l couldn|
|00005bc0| 27 74 20 67 65 74 20 6f | 75 74 2e 20 0d 7c 3e 20 |'t get o|ut. .|> |
|00005bd0| 63 6d 64 2d 6f 70 74 2d | 65 73 63 20 64 69 64 6e |cmd-opt-|esc didn|
|00005be0| 27 74 20 64 6f 20 6d 75 | 63 68 2c 20 49 20 68 61 |'t do mu|ch, I ha|
|00005bf0| 64 20 74 6f 20 72 65 73 | 74 61 72 74 2e 20 20 49 |d to res|tart. I|
|00005c00| 20 68 61 76 65 20 61 6e | 20 4c 43 49 49 49 20 77 | have an| LCIII w|
|00005c10| 69 74 68 20 31 32 4d 42 | 0d 7c 3e 20 52 41 4d 29 |ith 12MB|.|> RAM)|
|00005c20| 2e 20 20 53 6f 20 77 68 | 61 74 20 79 6f 75 20 68 |. So wh|at you h|
|00005c30| 61 76 65 20 74 6f 20 64 | 6f 20 69 73 20 75 73 65 |ave to d|o is use|
|00005c40| 20 47 65 74 50 6f 72 74 | 20 61 6e 64 20 53 65 74 | GetPort| and Set|
|00005c50| 50 6f 72 74 20 77 68 65 | 6e 20 63 6f 70 79 69 6e |Port whe|n copyin|
|00005c60| 67 20 74 6f 0d 7c 3e 20 | 74 68 65 20 77 69 6e 64 |g to.|> |the wind|
|00005c70| 6f 77 2e 20 20 54 68 69 | 73 20 77 6f 72 6b 73 20 |ow. Thi|s works |
|00005c80| 77 69 74 68 6f 75 74 20 | 61 20 68 69 74 63 68 2e |without |a hitch.|
|00005c90| 20 20 0d 0d 55 68 6d 3f | 20 41 72 65 20 79 6f 75 | ..Uhm?| Are you|
|00005ca0| 20 73 75 72 65 3f 20 49 | 20 61 6d 20 77 72 69 74 | sure? I| am writ|
|00005cb0| 69 6e 67 20 61 20 70 72 | 6f 67 72 61 6d 20 77 68 |ing a pr|ogram wh|
|00005cc0| 69 63 68 20 61 6c 73 6f | 20 68 61 73 20 61 6e 20 |ich also| has an |
|00005cd0| 6f 66 66 73 63 72 65 65 | 6e 0d 47 57 6f 72 6c 64 |offscree|n.GWorld|
|00005ce0| 20 77 68 69 63 68 20 69 | 73 20 63 6f 70 69 65 64 | which i|s copied|
|00005cf0| 20 74 6f 20 74 68 65 20 | 73 63 72 65 65 6e 20 28 | to the |screen (|
|00005d00| 75 73 69 6e 67 20 43 6f | 70 79 42 69 74 73 29 20 |using Co|pyBits) |
|00005d10| 77 68 65 6e 20 6e 65 63 | 65 73 73 61 72 79 2e 0d |when nec|essary..|
|00005d20| 49 20 75 73 65 20 53 65 | 74 47 57 6f 72 6c 64 20 |I use Se|tGWorld |
|00005d30| 61 6e 64 20 47 65 74 47 | 57 6f 72 6c 64 20 61 6c |and GetG|World al|
|00005d40| 6c 20 74 68 65 20 74 69 | 6d 65 2e 20 49 6e 20 66 |l the ti|me. In f|
|00005d50| 61 63 74 2c 20 4e 49 4d | 3a 49 6d 61 67 69 6e 67 |act, NIM|:Imaging|
|00005d60| 20 77 69 74 68 0d 51 75 | 69 63 6b 44 72 61 77 20 | with.Qu|ickDraw |
|00005d70| 6d 65 6e 74 69 6f 6e 73 | 20 73 6f 6d 65 77 68 65 |mentions| somewhe|
|00005d80| 72 65 20 28 64 6f 6e 27 | 74 20 68 61 76 65 20 69 |re (don'|t have i|
|00005d90| 74 20 6f 6e 20 6d 65 2c | 20 73 6f 20 49 20 63 61 |t on me,| so I ca|
|00005da0| 6e 27 74 20 67 69 76 65 | 20 79 6f 75 0d 74 68 65 |n't give| you.the|
|00005db0| 20 70 61 67 65 20 6e 75 | 6d 62 65 72 29 20 74 68 | page nu|mber) th|
|00005dc0| 61 74 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 75 73 |at you s|hould us|
|00005dd0| 65 20 53 65 74 47 57 6f | 72 6c 64 2f 47 65 74 47 |e SetGWo|rld/GetG|
|00005de0| 57 6f 72 6c 64 20 69 6e | 73 74 65 61 64 20 6f 66 |World in|stead of|
|00005df0| 0d 47 65 74 50 6f 72 74 | 20 61 6e 64 20 53 65 74 |.GetPort| and Set|
|00005e00| 50 6f 72 74 2e 0d 0d 4e | 6f 77 20 49 27 6d 20 73 |Port...N|ow I'm s|
|00005e10| 6c 69 67 68 74 6c 79 20 | 63 6f 6e 66 75 73 65 64 |lightly |confused|
|00005e20| 2e 20 49 20 68 61 76 65 | 20 6a 75 73 74 20 73 74 |. I have| just st|
|00005e30| 61 72 74 65 64 20 74 6f | 20 75 73 65 20 47 57 6f |arted to| use GWo|
|00005e40| 72 6c 64 20 73 74 75 66 | 66 2c 0d 61 6e 64 20 49 |rld stuf|f,.and I|
|00005e50| 20 77 61 73 20 70 72 65 | 74 74 79 20 73 75 72 65 | was pre|tty sure|
|00005e60| 20 74 68 61 74 20 47 65 | 74 2f 53 65 74 47 57 6f | that Ge|t/SetGWo|
|00005e70| 72 6c 64 20 77 61 73 20 | 61 6c 6c 20 49 20 6e 65 |rld was |all I ne|
|00005e80| 65 64 65 64 2c 20 73 6f | 20 69 66 20 61 6e 79 0d |eded, so| if any.|
|00005e90| 6d 61 63 67 75 72 75 20 | 63 61 6e 20 65 6e 6c 69 |macguru |can enli|
|00005ea0| 67 68 74 65 6e 20 6d 65 | 20 49 27 64 20 62 65 20 |ghten me| I'd be |
|00005eb0| 76 65 72 79 20 67 72 61 | 74 65 66 75 6c 2e 2e 2e |very gra|teful...|
|00005ec0| 0d 0d 2d 50 65 74 65 72 | 0d 0d 2d 20 2d 2d 2d 2d |..-Peter|..- ----|
|00005ed0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005ee0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005ef0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 50 2e 4a |--------|----.P.J|
|00005f10| 2e 42 65 72 63 6b 40 6b | 75 62 2e 6e 6c 20 20 20 |.Berck@k|ub.nl |
|00005f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f30| 20 20 20 20 20 20 20 20 | 20 20 70 67 70 2d 70 75 | | pgp-pu|
|00005f40| 62 6b 65 79 20 6f 6e 20 | 72 65 71 75 65 73 74 0d |bkey on |request.|
|00005f50| 28 66 6f 72 6d 61 74 20 | 74 20 22 7e 26 7e 7b 7e |(format |t "~&~{~|
|00005f60| 3c 7e 25 7e 31 3a 3b 7e | 61 7e 3e 7e 5e 2c 7e 7d |<~%~1:;~|a~>~^,~}|
|00005f70| 2e 7e 25 22 0d 20 20 20 | 27 28 44 6f 44 23 2d 33 |.~%". |'(DoD#-3|
|00005f80| 33 37 20 54 68 65 2d 45 | 78 20 53 6f 6e 69 63 2d |37 The-E|x Sonic-|
|00005f90| 59 6f 75 74 68 20 4e 49 | 4e 20 44 61 6e 74 65 2d |Youth NI|N Dante-|
|00005fa0| 41 6c 69 67 68 69 65 72 | 69 20 47 75 69 6e 6e 65 |Alighier|i Guinne|
|00005fb0| 73 73 29 29 0d 0d 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |ss))..++|++++++++|
|00005fc0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00005fd0| 2b 0d 0d 3e 46 72 6f 6d | 20 63 63 6f 6e 73 74 61 |+..>From| cconsta|
|00005fe0| 6e 40 65 70 64 69 76 31 | 2e 65 6e 76 2e 67 6f 76 |n@epdiv1|.env.gov|
|00005ff0| 2e 62 63 2e 63 61 20 28 | 43 61 72 6c 20 42 2e 20 |.bc.ca (|Carl B. |
|00006000| 43 6f 6e 73 74 61 6e 74 | 69 6e 65 29 0d 44 61 74 |Constant|ine).Dat|
|00006010| 65 3a 20 46 72 69 2c 20 | 32 32 20 4a 75 6c 20 31 |e: Fri, |22 Jul 1|
|00006020| 39 39 34 20 31 31 3a 33 | 30 3a 35 30 20 2d 30 37 |994 11:3|0:50 -07|
|00006030| 30 30 0d 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |00.Organ|ization:|
|00006040| 20 4d 69 6e 69 73 74 72 | 79 20 6f 66 20 45 6e 76 | Ministr|y of Env|
|00006050| 69 72 6f 6e 6d 65 6e 74 | 2c 20 4c 61 6e 64 73 20 |ironment|, Lands |
|00006060| 26 20 50 61 72 6b 73 0d | 0d 49 6e 20 61 72 74 69 |& Parks.|.In arti|
|00006070| 63 6c 65 20 3c 33 30 6f | 64 6c 31 24 37 72 6f 40 |cle <30o|dl1$7ro@|
|00006080| 6b 75 62 64 73 31 2e 6b | 75 62 2e 6e 6c 3e 2c 20 |kubds1.k|ub.nl>, |
|00006090| 50 2e 4a 2e 42 65 72 63 | 6b 40 6b 75 62 2e 6e 6c |P.J.Berc|k@kub.nl|
|000060a0| 20 77 72 6f 74 65 3a 0d | 0d 3e 20 49 6e 20 61 72 | wrote:.|.> In ar|
|000060b0| 74 69 63 6c 65 20 3c 63 | 63 6f 6e 73 74 61 6e 2d |ticle <c|constan-|
|000060c0| 32 31 30 37 39 34 30 38 | 31 32 31 32 30 30 30 31 |21079408|12120001|
|000060d0| 40 65 75 73 61 63 62 63 | 2e 65 6e 76 2e 67 6f 76 |@eusacbc|.env.gov|
|000060e0| 2e 62 63 2e 63 61 3e 2c | 0d 63 63 6f 6e 73 74 61 |.bc.ca>,|.cconsta|
|000060f0| 6e 40 65 70 64 69 76 31 | 2e 65 6e 76 2e 67 6f 76 |n@epdiv1|.env.gov|
|00006100| 2e 62 63 2e 63 61 20 28 | 43 61 72 6c 20 42 2e 20 |.bc.ca (|Carl B. |
|00006110| 43 6f 6e 73 74 61 6e 74 | 69 6e 65 29 20 77 72 69 |Constant|ine) wri|
|00006120| 74 65 73 3a 0d 3e 20 7c | 3e 20 46 69 6e 61 6c 6c |tes:.> ||> Finall|
|00006130| 79 2c 20 61 66 74 65 72 | 20 6d 75 63 68 20 66 69 |y, after| much fi|
|00006140| 64 64 6c 69 6e 67 20 61 | 6e 64 20 65 78 61 6d 69 |ddling a|nd exami|
|00006150| 6e 69 6e 67 20 6f 66 20 | 63 6f 64 65 2c 20 49 20 |ning of |code, I |
|00006160| 66 69 6e 61 6c 6c 79 20 | 67 6f 74 20 6d 79 20 64 |finally |got my d|
|00006170| 69 63 65 0d 3e 20 7c 3e | 20 61 6e 69 6d 61 74 69 |ice.> |>| animati|
|00006180| 6f 6e 20 77 6f 72 6b 69 | 6e 67 20 69 6e 20 6d 79 |on worki|ng in my|
|00006190| 20 67 61 6d 65 2e 20 20 | 54 68 65 72 65 20 69 73 | game. |There is|
|000061a0| 20 61 20 74 72 69 63 6b | 20 74 6f 20 69 74 2e 0d | a trick| to it..|
|000061b0| 3e 20 7c 3e 20 0d 3e 20 | 7c 3e 20 42 65 63 61 75 |> |> .> ||> Becau|
|000061c0| 73 65 20 6d 61 6e 79 20 | 70 65 6f 70 6c 65 20 68 |se many |people h|
|000061d0| 65 6c 70 65 64 20 6d 65 | 2c 20 49 20 74 68 6f 75 |elped me|, I thou|
|000061e0| 67 68 74 20 49 20 77 6f | 75 6c 64 20 70 6f 73 74 |ght I wo|uld post|
|000061f0| 20 77 68 61 74 20 49 20 | 66 6f 75 6e 64 20 73 6f | what I |found so|
|00006200| 20 74 68 61 74 0d 3e 20 | 7c 3e 20 6f 74 68 65 72 | that.> ||> other|
|00006210| 73 20 63 61 6e 20 62 65 | 20 68 65 6c 70 65 64 20 |s can be| helped |
|00006220| 74 6f 6f 2e 0d 3e 20 7c | 3e 20 0d 3e 20 5b 73 6e |too..> ||> .> [sn|
|00006230| 69 70 5d 0d 3e 20 7c 3e | 20 0d 3e 20 7c 3e 20 54 |ip].> |>| .> |> T|
|00006240| 68 65 20 74 72 69 63 6b | 20 63 6f 6d 65 73 20 77 |he trick| comes w|
|00006250| 68 65 6e 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |hen you |want to |
|00006260| 63 6f 70 79 20 74 68 65 | 20 64 69 63 65 20 66 72 |copy the| dice fr|
|00006270| 6f 6d 20 74 68 65 20 47 | 57 6f 72 6c 64 20 74 6f |om the G|World to|
|00006280| 20 74 68 65 0d 3e 20 7c | 3e 20 77 69 6e 64 6f 77 | the.> ||> window|
|00006290| 2e 20 20 57 68 65 6e 20 | 79 6f 75 20 75 73 65 20 |. When |you use |
|000062a0| 47 57 6f 72 6c 64 73 2c | 20 79 6f 75 20 61 6c 77 |GWorlds,| you alw|
|000062b0| 61 79 73 20 75 73 65 20 | 47 65 74 47 57 6f 72 6c |ays use |GetGWorl|
|000062c0| 64 20 61 6e 64 20 53 65 | 74 47 57 6f 72 6c 64 20 |d and Se|tGWorld |
|000062d0| 77 68 65 6e 0d 3e 20 7c | 3e 20 63 6f 70 79 69 6e |when.> ||> copyin|
|000062e0| 67 20 66 72 6f 6d 20 31 | 20 47 57 6f 72 6c 64 20 |g from 1| GWorld |
|000062f0| 74 6f 20 61 6e 6f 74 68 | 65 72 2e 20 20 48 6f 77 |to anoth|er. How|
|00006300| 65 76 65 72 2c 20 69 66 | 20 79 6f 75 20 75 73 65 |ever, if| you use|
|00006310| 20 74 68 69 73 20 77 68 | 65 6e 20 79 6f 75 20 77 | this wh|en you w|
|00006320| 61 6e 74 0d 3e 20 7c 3e | 20 74 6f 20 63 6f 70 79 |ant.> |>| to copy|
|00006330| 20 74 6f 20 74 68 65 20 | 77 69 6e 64 6f 77 2c 20 | to the |window, |
|00006340| 43 6f 70 79 42 69 74 73 | 20 6d 61 6b 65 73 20 79 |CopyBits| makes y|
|00006350| 6f 75 72 20 4d 61 63 20 | 43 52 41 53 48 20 62 69 |our Mac |CRASH bi|
|00006360| 67 20 74 69 6d 65 21 21 | 20 28 49 20 72 61 6e 0d |g time!!| (I ran.|
|00006370| 3e 20 7c 3e 20 74 68 69 | 73 20 69 6e 20 74 68 65 |> |> thi|s in the|
|00006380| 20 64 65 62 75 67 67 65 | 72 20 69 6e 20 54 48 49 | debugge|r in THI|
|00006390| 4e 4b 20 43 20 37 2e 30 | 2e 33 20 61 6e 64 20 49 |NK C 7.0|.3 and I|
|000063a0| 20 73 74 69 6c 6c 20 63 | 6f 75 6c 64 6e 27 74 20 | still c|ouldn't |
|000063b0| 67 65 74 20 6f 75 74 2e | 20 0d 3e 20 7c 3e 20 63 |get out.| .> |> c|
|000063c0| 6d 64 2d 6f 70 74 2d 65 | 73 63 20 64 69 64 6e 27 |md-opt-e|sc didn'|
|000063d0| 74 20 64 6f 20 6d 75 63 | 68 2c 20 49 20 68 61 64 |t do muc|h, I had|
|000063e0| 20 74 6f 20 72 65 73 74 | 61 72 74 2e 20 20 49 20 | to rest|art. I |
|000063f0| 68 61 76 65 20 61 6e 20 | 4c 43 49 49 49 20 77 69 |have an |LCIII wi|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.