home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Tools⁄Additions / SADE14a3 / SADE 1.4a3 / SADE Example Scripts / Resource < prev    next >
MacBinary  |  1992-07-10  |  12.4 KB  |  [TEXT/sade]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Jul 10 13:00:00 1992, modified Fri Jul 10 13:00:00 1992, creator 'sade', type ASCII, 12006 bytes "Resource" , at 0x2f66 475 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[sade]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 52 65 73 6f 75 72 | 63 65 00 00 00 00 00 00 |..Resour|ce......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 73 61 64 | 65 01 00 00 00 00 00 00 |.TEXTsad|e.......|
|00000050| 00 00 00 00 00 2e e6 00 | 00 01 db a6 83 72 90 a6 |........|.....r..|
|00000060| 83 72 90 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.r......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 91 73 00 00 |........|.....s..|
|00000080| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000090| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000000a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000000b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000000c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000000d0| 23 23 23 23 23 23 23 23 | 23 23 0d 23 09 53 79 6d |########|##.#.Sym|
|000000e0| 62 6f 6c 69 63 20 41 70 | 70 6c 69 63 61 74 69 6f |bolic Ap|plicatio|
|000000f0| 6e 20 44 65 62 75 67 67 | 69 6e 67 20 45 6e 76 69 |n Debugg|ing Envi|
|00000100| 72 6f 6e 6d 65 6e 74 20 | 31 2e 34 0d 23 0d 23 09 |ronment |1.4.#.#.|
|00000110| 63 6f 70 79 72 69 67 68 | 74 20 41 70 70 6c 65 20 |copyrigh|t Apple |
|00000120| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 20 31 |Computer|, Inc. 1|
|00000130| 39 38 37 2d 31 39 39 31 | 0d 23 09 41 6c 6c 20 72 |987-1991|.#.All r|
|00000140| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 0d |ights re|served..|
|00000150| 23 0d 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |#.######|########|
|00000160| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000170| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000180| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000190| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000001a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 0d 0d 23 20 |########|####..# |
|000001b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000001c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000001d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000001e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000001f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000200| 2d 2d 2d 2d 2d 2d 0d 23 | 20 74 6f 20 54 52 41 43 |------.#| to TRAC|
|00000210| 45 20 54 48 45 20 52 45 | 53 4f 55 52 43 45 20 43 |E THE RE|SOURCE C|
|00000220| 48 41 49 4e 20 41 4e 44 | 20 44 49 53 50 4c 41 59 |HAIN AND| DISPLAY|
|00000230| 20 52 45 53 4f 55 52 43 | 45 20 4d 41 50 20 49 4e | RESOURC|E MAP IN|
|00000240| 46 4f 52 4d 41 54 49 4f | 4e 0d 23 20 73 65 6c 65 |FORMATIO|N.# sele|
|00000250| 63 74 20 61 6e 64 20 65 | 6e 74 65 72 20 61 6c 6c |ct and e|nter all|
|00000260| 20 70 72 6f 63 73 20 74 | 68 65 6e 20 65 78 65 63 | procs t|hen exec|
|00000270| 75 74 65 3a 0d 23 20 72 | 65 73 6d 61 70 20 6f 72 |ute:.# r|esmap or|
|00000280| 20 72 65 73 6d 61 70 20 | 22 72 73 72 63 22 20 74 | resmap |"rsrc" t|
|00000290| 6f 20 73 65 65 20 6a 75 | 73 74 20 69 6e 66 6f 20 |o see ju|st info |
|000002a0| 66 6f 72 20 73 70 65 63 | 69 66 69 65 64 20 72 65 |for spec|ified re|
|000002b0| 73 6f 75 72 63 65 20 74 | 79 70 65 20 28 63 61 73 |source t|ype (cas|
|000002c0| 65 20 73 65 6e 73 69 74 | 69 76 65 29 0d 23 20 2d |e sensit|ive).# -|
|000002d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000320| 2d 2d 2d 2d 2d 0d 09 0d | 70 72 6f 63 20 66 69 6c |-----...|proc fil|
|00000330| 65 4e 61 6d 65 28 46 69 | 6c 65 52 65 66 4e 75 6d |eName(Fi|leRefNum|
|00000340| 29 0d 09 64 65 66 69 6e | 65 20 46 43 42 53 50 54 |)..defin|e FCBSPT|
|00000350| 72 20 3a 3d 20 24 33 34 | 45 09 09 09 09 09 09 09 |r := $34|E.......|
|00000360| 09 09 09 09 09 09 09 09 | 09 09 09 09 0d 09 70 72 |........|......pr|
|00000370| 69 6e 74 66 20 28 22 46 | 69 6c 65 20 4e 61 6d 65 |intf ("F|ile Name|
|00000380| 3a 20 25 50 20 22 2c 20 | 5e 70 73 74 72 69 6e 67 |: %P ", |^pstring|
|00000390| 20 28 46 43 42 53 50 74 | 72 5e 20 2b 20 66 69 6c | (FCBSPt|r^ + fil|
|000003a0| 65 52 65 66 4e 75 6d 20 | 2b 20 36 32 29 5e 29 0d |eRefNum |+ 62)^).|
|000003b0| 65 6e 64 0d 0d 0d 70 72 | 6f 63 20 52 65 73 4e 61 |end...pr|oc ResNa|
|000003c0| 6d 65 28 6e 61 6d 65 4f | 66 66 73 65 74 29 0d 09 |me(nameO|ffset)..|
|000003d0| 64 65 66 69 6e 65 20 72 | 65 73 4e 61 6d 65 50 74 |define r|esNamePt|
|000003e0| 72 09 0d 09 52 65 73 4e | 61 6d 65 50 74 72 20 3a |r...ResN|amePtr :|
|000003f0| 3d 20 4e 45 58 54 72 65 | 73 46 69 6c 65 20 2b 20 |= NEXTre|sFile + |
|00000400| 28 5e 57 6f 72 64 28 4e | 45 58 54 72 65 73 46 69 |(^Word(N|EXTresFi|
|00000410| 6c 65 20 2b 20 32 36 29 | 5e 29 09 09 23 20 67 65 |le + 26)|^)..# ge|
|00000420| 74 20 73 74 61 72 74 20 | 6f 66 20 20 6e 61 6d 65 |t start |of name|
|00000430| 20 6c 69 73 74 0d 09 52 | 65 73 4e 61 6d 65 50 74 | list..R|esNamePt|
|00000440| 72 20 3a 3d 20 52 65 73 | 4e 61 6d 65 50 74 72 20 |r := Res|NamePtr |
|00000450| 2b 20 6e 61 6d 65 4f 66 | 66 73 65 74 09 09 09 09 |+ nameOf|fset....|
|00000460| 09 09 23 20 61 64 64 20 | 6f 66 66 73 65 74 20 69 |..# add |offset i|
|00000470| 6e 74 6f 20 6c 69 73 74 | 20 66 6f 72 20 74 68 69 |nto list| for thi|
|00000480| 73 20 72 65 73 6f 75 72 | 63 65 2e 0d 09 70 72 69 |s resour|ce...pri|
|00000490| 6e 74 66 28 22 20 20 20 | 6e 61 6d 65 3a 25 50 20 |ntf(" |name:%P |
|000004a0| 22 2c 20 5e 70 73 74 72 | 69 6e 67 28 72 65 73 4e |", ^pstr|ing(resN|
|000004b0| 61 6d 65 50 74 72 29 5e | 29 20 20 09 09 09 09 09 |amePtr)^|) .....|
|000004c0| 09 09 0d 65 6e 64 0d 0d | 09 0d 70 72 6f 63 20 52 |...end..|..proc R|
|000004d0| 65 73 49 6e 66 6f 28 72 | 65 66 4c 69 73 74 50 74 |esInfo(r|efListPt|
|000004e0| 72 2c 20 6e 75 6d 54 68 | 69 73 54 79 70 65 29 09 |r, numTh|isType).|
|000004f0| 09 09 09 09 0d 09 64 65 | 66 69 6e 65 20 6c 6f 6f |......de|fine loo|
|00000500| 70 65 72 0d 09 64 65 66 | 69 6e 65 20 72 65 73 49 |per..def|ine resI|
|00000510| 64 0d 09 64 65 66 69 6e | 65 20 72 65 73 41 74 74 |d..defin|e resAtt|
|00000520| 72 69 62 75 74 65 73 0d | 09 64 65 66 69 6e 65 20 |ributes.|.define |
|00000530| 72 65 73 48 61 6e 64 6c | 65 0d 09 64 65 66 69 6e |resHandl|e..defin|
|00000540| 65 20 72 65 73 50 74 72 | 0d 09 64 65 66 69 6e 65 |e resPtr|..define|
|00000550| 20 6e 61 6d 65 4f 66 66 | 73 65 74 0d 09 0d 09 66 | nameOff|set....f|
|00000560| 6f 72 20 6c 6f 6f 70 65 | 72 20 3a 3d 20 30 20 74 |or loope|r := 0 t|
|00000570| 6f 20 6e 75 6d 54 68 69 | 73 54 79 70 65 09 09 09 |o numThi|sType...|
|00000580| 09 09 09 09 09 23 20 73 | 68 6f 77 20 69 6e 66 6f |.....# s|how info|
|00000590| 20 66 6f 72 20 61 6c 6c | 20 72 65 73 6f 75 72 63 | for all| resourc|
|000005a0| 65 73 20 6f 66 20 63 75 | 72 72 65 6e 74 20 74 79 |es of cu|rrent ty|
|000005b0| 70 65 0d 09 09 72 65 73 | 49 64 20 3a 3d 20 5e 57 |pe...res|Id := ^W|
|000005c0| 6f 72 64 28 72 65 66 4c | 69 73 74 50 74 72 29 5e |ord(refL|istPtr)^|
|000005d0| 0d 09 09 70 72 69 6e 74 | 66 28 22 5c 6e 20 20 20 |...print|f("\n |
|000005e0| 20 20 20 49 44 3a 20 25 | 20 36 64 22 2c 20 72 65 | ID: %| 6d", re|
|000005f0| 73 49 64 29 09 09 09 09 | 09 09 23 20 69 6e 66 6f |sId)....|..# info|
|00000600| 20 66 6f 72 20 65 61 63 | 68 20 72 65 73 6f 75 72 | for eac|h resour|
|00000610| 63 65 20 69 6e 63 6c 75 | 64 65 73 3a 20 72 65 73 |ce inclu|des: res|
|00000620| 49 64 0d 09 09 72 65 73 | 48 61 6e 64 6c 65 20 3a |Id...res|Handle :|
|00000630| 3d 20 28 72 65 66 4c 69 | 73 74 50 74 72 20 2b 20 |= (refLi|stPtr + |
|00000640| 38 29 5e 0d 09 09 69 66 | 20 72 65 73 48 61 6e 64 |8)^...if| resHand|
|00000650| 6c 65 20 3d 20 30 20 74 | 68 65 6e 09 09 09 09 09 |le = 0 t|hen.....|
|00000660| 09 09 09 09 23 20 69 66 | 20 72 65 73 6f 75 72 63 |....# if| resourc|
|00000670| 65 20 6e 6f 74 20 69 6e | 20 6d 65 6d 6f 72 79 2c |e not in| memory,|
|00000680| 20 73 61 79 20 69 74 73 | 20 61 74 20 30 2e 0d 09 | say its| at 0...|
|00000690| 09 09 72 65 73 50 74 72 | 20 3a 3d 20 30 09 09 09 |..resPtr| := 0...|
|000006a0| 09 09 09 09 09 09 09 09 | 09 0d 09 09 65 6c 73 65 |........|....else|
|000006b0| 0d 09 09 09 72 65 73 50 | 74 72 20 3a 3d 20 72 65 |....resP|tr := re|
|000006c0| 73 48 61 6e 64 6c 65 5e | 09 09 09 09 09 09 09 09 |sHandle^|........|
|000006d0| 23 20 65 6c 73 65 20 67 | 69 76 65 20 6d 65 6d 6f |# else g|ive memo|
|000006e0| 72 79 20 6c 6f 63 61 74 | 69 6f 6e 20 77 68 65 72 |ry locat|ion wher|
|000006f0| 65 20 72 65 73 6f 75 72 | 63 65 20 69 73 20 6c 6f |e resour|ce is lo|
|00000700| 61 64 65 64 2c 0d 09 09 | 65 6e 64 09 09 09 0d 09 |aded,...|end.....|
|00000710| 09 69 66 20 24 38 30 30 | 30 30 30 30 30 20 26 20 |.if $800|00000 & |
|00000720| 72 65 73 50 74 72 20 74 | 68 65 6e 20 20 09 09 09 |resPtr t|hen ...|
|00000730| 09 09 09 09 23 20 6e 6f | 74 65 20 69 66 20 22 6c |....# no|te if "l|
|00000740| 6f 63 6b 65 64 22 20 62 | 69 74 20 73 65 74 20 69 |ocked" b|it set i|
|00000750| 6e 20 72 65 73 6f 75 72 | 63 65 27 73 20 6d 61 73 |n resour|ce's mas|
|00000760| 74 65 72 20 70 6f 69 6e | 74 65 72 0d 09 09 09 70 |ter poin|ter....p|
|00000770| 72 69 6e 74 66 20 22 20 | 2a 22 0d 09 09 65 6c 73 |rintf " |*"...els|
|00000780| 65 20 0d 09 09 09 70 72 | 69 6e 74 66 20 22 20 20 |e ....pr|intf " |
|00000790| 22 0d 09 09 65 6e 64 0d | 09 09 72 65 73 50 74 72 |"...end.|..resPtr|
|000007a0| 20 3a 3d 20 72 65 73 50 | 74 72 20 26 20 24 30 30 | := resP|tr & $00|
|000007b0| 66 66 66 66 66 66 20 20 | 09 09 09 0d 20 09 09 70 |ffffff |.... ..p|
|000007c0| 72 69 6e 74 66 28 22 20 | 20 20 61 74 3a 20 25 2e |rintf(" | at: %.|
|000007d0| 38 58 22 2c 20 72 65 73 | 50 74 72 29 0d 09 09 72 |8X", res|Ptr)...r|
|000007e0| 65 73 41 74 74 72 69 62 | 75 74 65 73 20 3a 3d 20 |esAttrib|utes := |
|000007f0| 5e 55 6e 73 69 67 6e 65 | 64 42 79 74 65 28 72 65 |^Unsigne|dByte(re|
|00000800| 66 4c 69 73 74 50 74 72 | 20 2b 20 34 29 5e 09 09 |fListPtr| + 4)^..|
|00000810| 09 09 09 09 0d 09 09 70 | 72 69 6e 74 66 20 28 22 |.......p|rintf ("|
|00000820| 20 20 61 74 74 72 69 62 | 73 3a 20 25 2e 38 62 22 | attrib|s: %.8b"|
|00000830| 2c 20 72 65 73 41 74 74 | 72 69 62 75 74 65 73 29 |, resAtt|ributes)|
|00000840| 09 09 09 09 23 20 72 65 | 73 6f 75 72 63 65 20 20 |....# re|source |
|00000850| 61 74 74 72 69 62 75 74 | 65 73 20 61 73 20 62 69 |attribut|es as bi|
|00000860| 74 20 70 61 74 74 65 72 | 6e 0d 0d 09 09 6e 61 6d |t patter|n....nam|
|00000870| 65 4f 66 66 73 65 74 20 | 3a 3d 20 5e 57 6f 72 64 |eOffset |:= ^Word|
|00000880| 28 72 65 66 4c 69 73 74 | 50 74 72 2b 32 29 5e 0d |(refList|Ptr+2)^.|
|00000890| 09 09 69 66 20 6e 61 6d | 65 4f 66 66 73 65 74 20 |..if nam|eOffset |
|000008a0| 3c 3e 20 2d 31 20 74 68 | 65 6e 09 09 09 09 09 09 |<> -1 th|en......|
|000008b0| 09 09 23 20 6f 6e 65 20 | 77 6f 72 64 20 6f 66 66 |..# one |word off|
|000008c0| 73 65 74 20 74 6f 20 72 | 65 73 6f 75 72 63 65 20 |set to r|esource |
|000008d0| 6e 61 6d 65 20 66 72 6f | 6d 20 74 6f 70 20 6f 66 |name fro|m top of|
|000008e0| 20 6e 61 6d 65 20 6c 69 | 73 74 20 20 0d 09 09 09 | name li|st ....|
|000008f0| 72 65 73 4e 61 6d 65 28 | 6e 61 6d 65 4f 66 66 73 |resName(|nameOffs|
|00000900| 65 74 29 09 09 09 09 09 | 09 09 09 09 23 20 69 66 |et).....|....# if|
|00000910| 20 6e 6f 20 6e 61 6d 65 | 09 6f 66 66 73 65 74 20 | no name|.offset |
|00000920| 69 73 20 2d 31 09 09 09 | 09 09 09 0d 09 09 65 6e |is -1...|......en|
|00000930| 64 0d 09 09 72 65 66 4c | 69 73 74 50 74 72 20 3a |d...refL|istPtr :|
|00000940| 3d 20 72 65 66 4c 69 73 | 74 50 74 72 20 2b 20 31 |= refLis|tPtr + 1|
|00000950| 32 0d 09 65 6e 64 0d 65 | 6e 64 0d 0d 0d 70 72 6f |2..end.e|nd...pro|
|00000960| 63 20 52 65 73 54 79 70 | 65 73 20 28 74 79 70 65 |c ResTyp|es (type|
|00000970| 4c 69 73 74 50 74 72 2c | 20 74 61 72 67 65 74 54 |ListPtr,| targetT|
|00000980| 79 70 65 29 0d 09 64 65 | 66 69 6e 65 20 6e 75 6d |ype)..de|fine num|
|00000990| 54 79 70 65 73 09 3a 3d | 20 5e 57 6f 72 64 28 54 |Types.:=| ^Word(T|
|000009a0| 79 70 65 4c 69 73 74 50 | 74 72 29 5e 0d 09 64 65 |ypeListP|tr)^..de|
|000009b0| 66 69 6e 65 20 6e 75 6d | 54 68 69 73 54 79 70 65 |fine num|ThisType|
|000009c0| 0d 09 64 65 66 69 6e 65 | 20 6c 6f 6f 70 65 72 0d |..define| looper.|
|000009d0| 09 64 65 66 69 6e 65 20 | 74 68 69 73 52 65 73 50 |.define |thisResP|
|000009e0| 74 72 0d 09 64 65 66 69 | 6e 65 20 72 65 66 4c 69 |tr..defi|ne refLi|
|000009f0| 73 74 50 74 72 0d 09 0d | 09 70 72 69 6e 74 66 20 |stPtr...|.printf |
|00000a00| 28 22 20 20 20 4e 75 6d | 62 65 72 20 6f 66 20 52 |(" Num|ber of R|
|00000a10| 65 73 6f 75 72 63 65 20 | 74 79 70 65 73 3a 20 25 |esource |types: %|
|00000a20| 64 5c 6e 22 2c 20 6e 75 | 6d 54 79 70 65 73 2b 31 |d\n", nu|mTypes+1|
|00000a30| 29 09 23 20 6e 75 6d 62 | 65 72 20 6f 66 20 72 65 |).# numb|er of re|
|00000a40| 73 6f 75 72 63 65 20 74 | 79 70 65 73 20 69 6e 20 |source t|ypes in |
|00000a50| 63 75 72 72 65 6e 74 20 | 6d 61 70 09 0d 09 66 6f |current |map...fo|
|00000a60| 72 20 6c 6f 6f 70 65 72 | 20 3a 3d 20 30 20 74 6f |r looper| := 0 to|
|00000a70| 20 4e 75 6d 54 79 70 65 | 73 0d 09 20 09 54 68 69 | NumType|s.. .Thi|
|00000a80| 73 52 65 73 50 74 72 20 | 3a 3d 20 28 74 79 70 65 |sResPtr |:= (type|
|00000a90| 4c 69 73 74 50 74 72 20 | 2b 20 32 29 20 2b 20 28 |ListPtr |+ 2) + (|
|00000aa0| 6c 6f 6f 70 65 72 20 2a | 20 38 29 0d 09 09 69 66 |looper *| 8)...if|
|00000ab0| 20 74 61 72 67 65 74 54 | 79 70 65 20 3d 20 30 20 | targetT|ype = 0 |
|00000ac0| 7c 7c 20 74 61 72 67 65 | 74 54 79 70 65 20 3d 20 ||| targe|tType = |
|00000ad0| 74 68 69 73 52 65 73 50 | 74 72 5e 20 74 68 65 6e |thisResP|tr^ then|
|00000ae0| 09 09 23 20 49 66 20 6f | 70 74 69 6f 6e 61 6c 20 |..# If o|ptional |
|00000af0| 74 61 72 67 65 74 20 74 | 79 70 65 20 73 70 65 63 |target t|ype spec|
|00000b00| 20 69 6e 20 63 61 6c 6c | 20 74 6f 20 52 65 73 4d | in call| to ResM|
|00000b10| 61 70 0d 09 09 09 6e 75 | 6d 54 68 69 73 54 79 70 |ap....nu|mThisTyp|
|00000b20| 65 20 3a 3d 20 5e 57 6f | 72 64 28 74 68 69 73 52 |e := ^Wo|rd(thisR|
|00000b30| 65 73 50 74 72 20 2b 20 | 34 29 5e 09 09 09 09 23 |esPtr + |4)^....#|
|00000b40| 20 73 68 6f 77 20 69 6e | 66 6f 20 6f 6e 6c 79 20 | show in|fo only |
|00000b50| 66 6f 72 20 74 68 61 74 | 20 74 79 70 65 2c 20 65 |for that| type, e|
|00000b60| 6c 73 65 20 73 68 6f 77 | 20 61 6c 6c 20 74 79 70 |lse show| all typ|
|00000b70| 65 73 0d 09 09 09 70 72 | 69 6e 74 66 28 22 5c 6e |es....pr|intf("\n|
|00000b80| 20 20 20 74 79 70 65 3a | 20 25 2e 34 73 20 20 69 | type:| %.4s i|
|00000b90| 6e 73 74 61 6e 63 65 73 | 3a 20 25 64 22 2c 20 74 |nstances|: %d", t|
|00000ba0| 68 69 73 52 65 73 50 74 | 72 5e 2c 20 6e 75 6d 54 |hisResPt|r^, numT|
|00000bb0| 68 69 73 54 79 70 65 2b | 31 29 0d 09 09 09 72 65 |hisType+|1)....re|
|00000bc0| 66 4c 69 73 74 50 74 72 | 20 3a 3d 20 5e 57 6f 72 |fListPtr| := ^Wor|
|00000bd0| 64 28 74 68 69 73 52 65 | 73 50 74 72 20 2b 20 36 |d(thisRe|sPtr + 6|
|00000be0| 29 5e 2b 74 79 70 65 4c | 69 73 74 50 74 72 09 23 |)^+typeL|istPtr.#|
|00000bf0| 20 66 69 6e 64 20 6f 66 | 66 73 65 74 20 69 6e 74 | find of|fset int|
|00000c00| 6f 20 52 65 66 65 72 65 | 6e 63 65 20 4c 69 73 74 |o Refere|nce List|
|00000c10| 20 66 6f 72 20 74 79 70 | 65 20 66 72 6f 6d 20 74 | for typ|e from t|
|00000c20| 6f 70 20 6f 66 20 74 79 | 70 65 20 6c 69 73 74 2e |op of ty|pe list.|
|00000c30| 20 20 0d 09 09 09 52 65 | 73 49 6e 66 6f 28 72 65 | ....Re|sInfo(re|
|00000c40| 66 4c 69 73 74 50 74 72 | 2c 20 6e 75 6d 54 68 69 |fListPtr|, numThi|
|00000c50| 73 54 79 70 65 29 09 09 | 09 09 09 23 20 67 65 74 |sType)..|...# get|
|00000c60| 20 72 65 73 6f 75 72 63 | 65 20 69 6e 66 6f 20 66 | resourc|e info f|
|00000c70| 6f 72 20 74 79 70 65 2e | 0d 09 09 65 6e 64 09 09 |or type.|...end..|
|00000c80| 09 09 0d 09 65 6e 64 09 | 09 0d 65 6e 64 09 0d 0d |....end.|..end...|
|00000c90| 0d 0d 70 72 6f 63 20 52 | 65 73 4d 61 70 20 74 61 |..proc R|esMap ta|
|00000ca0| 72 67 65 74 54 79 70 65 | 09 09 09 09 09 0d 0d 09 |rgetType|........|
|00000cb0| 23 20 47 6c 6f 62 61 6c | 20 56 61 72 69 61 62 6c |# Global| Variabl|
|00000cc0| 65 73 3a 0d 09 64 65 66 | 69 6e 65 20 67 6c 6f 62 |es:..def|ine glob|
|00000cd0| 61 6c 20 4e 45 58 54 72 | 65 73 46 69 6c 65 09 09 |al NEXTr|esFile..|
|00000ce0| 09 09 09 09 09 09 09 23 | 20 70 6f 69 6e 74 65 72 |.......#| pointer|
|00000cf0| 20 74 6f 20 74 6f 70 20 | 6f 66 20 63 75 72 72 65 | to top |of curre|
|00000d00| 6e 74 20 72 65 73 6f 75 | 72 63 65 20 6d 61 70 0d |nt resou|rce map.|
|00000d10| 0d 09 64 65 66 69 6e 65 | 20 46 69 6c 65 52 65 66 |..define| FileRef|
|00000d20| 09 09 09 09 09 09 09 20 | 09 0d 09 64 65 66 69 6e |....... |...defin|
|00000d30| 65 20 74 79 70 65 4c 69 | 73 74 09 09 09 09 09 09 |e typeLi|st......|
|00000d40| 09 0d 09 0d 09 69 66 20 | 4e 61 72 67 73 20 3d 20 |.....if |Nargs = |
|00000d50| 30 20 74 68 65 6e 20 09 | 09 09 09 09 09 09 09 09 |0 then .|........|
|00000d60| 09 09 23 20 69 66 20 6f | 70 74 69 6f 6e 61 6c 20 |..# if o|ptional |
|00000d70| 74 61 72 67 65 74 20 72 | 65 73 6f 75 72 63 65 20 |target r|esource |
|00000d80| 74 79 70 65 20 6e 6f 74 | 20 69 6e 70 75 74 2c 20 |type not| input, |
|00000d90| 74 68 65 6e 20 73 68 6f | 77 20 69 6e 66 6f 20 66 |then sho|w info f|
|00000da0| 6f 72 20 61 6c 6c 20 74 | 79 70 65 73 0d 09 09 74 |or all t|ypes...t|
|00000db0| 61 72 67 65 74 54 79 70 | 65 20 3a 3d 20 30 09 09 |argetTyp|e := 0..|
|00000dc0| 09 09 09 09 09 09 09 09 | 09 23 20 65 6c 73 65 20 |........|.# else |
|00000dd0| 73 68 6f 77 20 69 6e 66 | 6f 20 66 6f 72 20 74 61 |show inf|o for ta|
|00000de0| 72 67 65 74 20 74 79 70 | 65 20 6f 6e 6c 79 0d 09 |rget typ|e only..|
|00000df0| 65 6e 64 0d 09 4e 45 58 | 54 72 65 73 46 69 6c 65 |end..NEX|TresFile|
|00000e00| 20 3a 3d 20 40 74 6f 70 | 4d 61 70 48 6e 64 6c 0d | := @top|MapHndl.|
|00000e10| 09 70 72 69 6e 74 66 20 | 22 5c 6e 52 45 53 4f 55 |.printf |"\nRESOU|
|00000e20| 52 43 45 20 43 48 41 49 | 4e 20 2d 20 54 6f 70 20 |RCE CHAI|N - Top |
|00000e30| 74 6f 20 62 6f 74 74 6f | 6d 3a 22 0d 09 77 68 69 |to botto|m:"..whi|
|00000e40| 6c 65 20 28 4e 65 78 74 | 52 65 73 46 69 6c 65 5e |le (Next|ResFile^|
|00000e50| 20 3c 3e 20 30 29 09 09 | 09 09 09 09 09 09 09 23 | <> 0)..|.......#|
|00000e60| 20 64 69 73 70 6c 61 79 | 20 65 61 63 68 20 72 65 | display| each re|
|00000e70| 73 6f 75 72 63 65 20 6d | 61 70 20 69 6e 20 74 68 |source m|ap in th|
|00000e80| 65 20 63 68 61 69 6e 2c | 20 73 74 61 72 74 69 6e |e chain,| startin|
|00000e90| 67 20 66 72 6f 6d 20 74 | 68 65 20 74 6f 70 20 6d |g from t|he top m|
|00000ea0| 61 70 0d 0d 09 09 4e 45 | 58 54 72 65 73 46 69 6c |ap....NE|XTresFil|
|00000eb0| 65 20 3a 3d 20 4e 45 58 | 54 72 65 73 46 69 6c 65 |e := NEX|TresFile|
|00000ec0| 5e 5e 09 09 09 09 09 09 | 0d 09 09 0d 09 09 49 46 |^^......|......IF|
|00000ed0| 20 4e 45 58 54 72 65 73 | 46 69 6c 65 20 3d 20 30 | NEXTres|File = 0|
|00000ee0| 0d 09 09 09 70 72 69 6e | 74 66 20 22 5c 6e 41 20 |....prin|tf "\nA |
|00000ef0| 72 65 73 6f 75 72 63 65 | 20 6d 61 70 20 68 61 73 |resource| map has|
|00000f00| 20 62 65 65 6e 20 70 75 | 72 67 65 64 2d 2d 61 20 | been pu|rged--a |
|00000f10| 6d 61 6a 6f 72 20 70 72 | 6f 62 6c 65 6d 21 5c 6e |major pr|oblem!\n|
|00000f20| 22 0d 09 09 09 72 65 74 | 75 72 6e 0d 09 09 65 6e |"....ret|urn...en|
|00000f30| 64 0d 0d 09 09 66 69 6c | 65 52 65 66 20 3a 3d 20 |d....fil|eRef := |
|00000f40| 5e 57 6f 72 64 28 4e 45 | 58 54 72 65 73 46 69 6c |^Word(NE|XTresFil|
|00000f50| 65 2b 32 30 29 5e 0d 0d | 09 09 70 72 69 6e 74 66 |e+20)^..|..printf|
|00000f60| 28 22 5c 6e 5c 6e 52 65 | 73 6f 75 72 63 65 20 6d |("\n\nRe|source m|
|00000f70| 61 70 20 61 74 3a 20 25 | 2e 38 58 20 20 20 46 69 |ap at: %|.8X Fi|
|00000f80| 6c 65 20 72 65 66 20 6e | 75 6d 3a 20 25 58 5c 6e |le ref n|um: %X\n|
|00000f90| 22 2c 20 4e 45 58 54 72 | 65 73 46 69 6c 65 2c 20 |", NEXTr|esFile, |
|00000fa0| 66 69 6c 65 52 65 66 29 | 0d 09 09 66 69 6c 65 4e |fileRef)|...fileN|
|00000fb0| 61 6d 65 28 66 69 6c 65 | 52 65 66 29 09 09 09 09 |ame(file|Ref)....|
|00000fc0| 09 09 09 09 09 09 23 20 | 67 65 74 20 66 69 6c 65 |......# |get file|
|00000fd0| 20 6e 61 6d 65 0d 09 09 | 74 79 70 65 4c 69 73 74 | name...|typeList|
|00000fe0| 20 3a 3d 20 5e 57 6f 72 | 64 28 4e 45 58 54 72 65 | := ^Wor|d(NEXTre|
|00000ff0| 73 46 69 6c 65 20 2b 20 | 32 34 29 5e 0d 0d 09 09 |sFile + |24)^....|
|00001000| 52 65 73 54 79 70 65 73 | 20 28 4e 45 58 54 72 65 |ResTypes| (NEXTre|
|00001010| 73 46 69 6c 65 20 2b 20 | 74 79 70 65 4c 69 73 74 |sFile + |typeList|
|00001020| 2c 20 74 61 72 67 65 74 | 54 79 70 65 29 09 09 09 |, target|Type)...|
|00001030| 23 20 67 65 74 20 72 65 | 73 6f 75 72 63 65 20 74 |# get re|source t|
|00001040| 79 70 65 20 69 6e 66 6f | 0d 09 09 4e 65 78 74 72 |ype info|...Nextr|
|00001050| 65 73 46 69 6c 65 20 3a | 3d 20 4e 65 78 74 72 65 |esFile :|= Nextre|
|00001060| 73 46 69 6c 65 2b 31 36 | 3b 0d 09 65 6e 64 09 09 |sFile+16|;..end..|
|00001070| 09 09 09 09 0d 09 70 72 | 69 6e 74 66 20 22 5c 6e |......pr|intf "\n|
|00001080| 22 0d 09 75 6e 64 65 66 | 69 6e 65 20 4e 45 58 54 |"..undef|ine NEXT|
|00001090| 72 65 73 46 69 6c 65 09 | 09 09 09 09 09 09 09 09 |resFile.|........|
|000010a0| 09 23 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 6f |.# point|er to to|
|000010b0| 70 20 6f 66 20 63 75 72 | 72 65 6e 74 20 72 65 73 |p of cur|rent res|
|000010c0| 6f 75 72 63 65 20 6d 61 | 70 0d 0d 65 6e 64 0d 0d |ource ma|p..end..|
|000010d0| 0d 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |.#######|########|
|000010e0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000010f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001100| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001110| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001120| 0d 0d 66 75 6e 63 20 43 | 68 65 63 6b 4d 50 20 28 |..func C|heckMP (|
|00001130| 74 68 69 73 42 6c 6f 63 | 6b 48 6e 64 6c 2c 74 68 |thisBloc|kHndl,th|
|00001140| 69 73 5a 6f 6e 65 50 74 | 72 29 0d 09 23 20 66 75 |isZonePt|r)..# fu|
|00001150| 6e 63 74 69 6f 6e 20 72 | 65 74 75 72 6e 73 20 61 |nction r|eturns a|
|00001160| 20 72 65 73 75 6c 74 20 | 63 6f 64 65 20 6f 66 20 | result |code of |
|00001170| 31 20 69 66 20 4e 6f 74 | 4f 6b 20 61 6e 64 20 30 |1 if Not|Ok and 0|
|00001180| 20 69 66 20 61 6c 6c 20 | 69 73 20 77 65 6c 6c 2e | if all |is well.|
|00001190| 0d 09 23 20 76 65 72 69 | 66 79 20 74 68 61 74 20 |..# veri|fy that |
|000011a0| 74 68 65 20 68 61 6e 64 | 6c 65 20 69 73 20 6e 6f |the hand|le is no|
|000011b0| 74 20 4e 49 4c 2c 20 20 | 61 6e 64 20 74 68 61 74 |t NIL, |and that|
|000011c0| 20 74 68 65 20 6d 61 73 | 74 65 72 20 70 6f 69 6e | the mas|ter poin|
|000011d0| 74 65 72 20 69 73 20 6e | 6f 74 20 6f 64 64 20 61 |ter is n|ot odd a|
|000011e0| 6e 64 20 69 73 20 6c 6f | 63 61 74 65 64 20 66 75 |nd is lo|cated fu|
|000011f0| 6c 6c 79 20 77 69 74 68 | 69 6e 20 74 68 69 73 20 |lly with|in this |
|00001200| 7a 6f 6e 65 0d 09 23 20 | 76 65 72 69 66 79 20 74 |zone..# |verify t|
|00001210| 68 61 74 20 74 68 65 20 | 6d 61 73 74 65 72 20 70 |hat the |master p|
|00001220| 6f 69 6e 74 65 72 20 74 | 6f 20 74 68 65 20 62 6c |ointer t|o the bl|
|00001230| 6f 63 6b 20 69 6e 20 74 | 68 65 20 72 65 73 6f 75 |ock in t|he resou|
|00001240| 72 63 65 20 6d 61 70 20 | 6d 61 74 63 68 65 73 20 |rce map |matches |
|00001250| 74 68 65 20 0d 09 23 20 | 6d 61 73 74 65 72 20 70 |the ..# |master p|
|00001260| 6f 69 6e 74 65 72 20 64 | 65 72 69 76 65 64 20 66 |ointer d|erived f|
|00001270| 72 6f 6d 20 74 68 65 20 | 62 6c 6f 63 6b 27 73 20 |rom the |block's |
|00001280| 73 65 6c 66 20 72 65 6c | 61 74 69 76 65 20 68 61 |self rel|ative ha|
|00001290| 6e 64 6c 65 09 0d 09 64 | 65 66 69 6e 65 20 73 65 |ndle...d|efine se|
|000012a0| 6c 66 48 6e 64 6c 0d 09 | 64 65 66 69 6e 65 20 65 |lfHndl..|define e|
|000012b0| 6e 64 5a 6f 6e 65 0d 09 | 64 65 66 69 6e 65 20 6e |ndZone..|define n|
|000012c0| 6f 74 4f 6b 20 3a 3d 20 | 30 09 09 09 09 09 09 09 |otOk := |0.......|
|000012d0| 09 09 09 09 09 09 23 20 | 61 73 73 75 6d 65 20 61 |......# |assume a|
|000012e0| 6c 6c 20 69 73 20 77 65 | 6c 6c 0d 09 0d 09 69 66 |ll is we|ll....if|
|000012f0| 20 74 68 69 73 42 6c 6f | 63 6b 68 6e 64 6c 20 3d | thisBlo|ckhndl =|
|00001300| 20 30 20 74 68 65 6e 20 | 09 09 09 09 09 09 09 09 | 0 then |........|
|00001310| 09 09 23 20 63 68 65 63 | 6b 20 68 61 6e 64 6c 65 |..# chec|k handle|
|00001320| 20 69 6e 20 72 65 73 6f | 75 72 63 65 20 6d 61 70 | in reso|urce map|
|00001330| 20 66 6f 72 20 76 61 6c | 69 64 20 76 61 6c 75 65 | for val|id value|
|00001340| 0d 09 09 22 5c 6e 23 23 | 20 62 6c 6f 63 6b 20 68 |..."\n##| block h|
|00001350| 61 73 20 61 6e 20 69 6e | 76 61 6c 69 64 20 4e 49 |as an in|valid NI|
|00001360| 4c 20 68 61 6e 64 6c 65 | 22 0d 09 09 6e 6f 74 4f |L handle|"...notO|
|00001370| 6b 20 3a 3d 20 31 0d 09 | 65 6c 73 65 69 66 20 20 |k := 1..|elseif |
|00001380| 74 68 69 73 42 6c 6f 63 | 6b 48 6e 64 6c 5e 20 26 |thisBloc|kHndl^ &|
|00001390| 20 24 30 31 20 3d 20 31 | 20 74 68 65 6e 20 0d 09 | $01 = 1| then ..|
|000013a0| 09 22 5c 6e 23 23 20 62 | 6c 6f 63 6b 20 68 61 73 |."\n## b|lock has|
|000013b0| 20 61 6e 20 69 6e 76 61 | 6c 69 64 20 6f 64 64 20 | an inva|lid odd |
|000013c0| 6d 61 73 74 65 72 20 70 | 6f 69 6e 74 65 72 22 0d |master p|ointer".|
|000013d0| 09 09 6e 6f 74 4f 6b 20 | 3a 3d 20 31 0d 09 65 6e |..notOk |:= 1..en|
|000013e0| 64 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |d.......|........|
|000013f0| 09 09 0d 09 65 6e 64 5a | 6f 6e 65 20 3a 3d 20 74 |....endZ|one := t|
|00001400| 68 69 73 5a 6f 6e 65 50 | 74 72 5e 5e 20 20 26 20 |hisZoneP|tr^^ & |
|00001410| 24 30 30 66 66 66 66 66 | 66 09 09 09 09 09 23 20 |$00fffff|f.....# |
|00001420| 79 69 65 6c 64 73 20 73 | 69 7a 65 20 6f 66 20 7a |yields s|ize of z|
|00001430| 6f 6e 65 20 74 72 61 69 | 6c 65 72 20 62 6c 6f 63 |one trai|ler bloc|
|00001440| 6b 20 0d 09 65 6e 64 5a | 6f 6e 65 20 3a 3d 20 74 |k ..endZ|one := t|
|00001450| 68 69 73 5a 6f 6e 65 50 | 74 72 5e 20 2b 20 65 6e |hisZoneP|tr^ + en|
|00001460| 64 5a 6f 6e 65 09 09 09 | 09 09 09 09 23 20 70 6f |dZone...|....# po|
|00001470| 69 6e 74 65 72 20 74 6f | 20 7a 6f 6e 65 20 74 72 |inter to| zone tr|
|00001480| 61 69 6c 65 72 20 62 6c | 6f 63 6b 20 70 6c 75 73 |ailer bl|ock plus|
|00001490| 20 69 74 73 20 6c 65 6e | 67 74 68 20 69 73 20 61 | its len|gth is a|
|000014a0| 64 64 72 65 73 73 20 6f | 66 20 6c 61 73 74 20 62 |ddress o|f last b|
|000014b0| 79 74 65 20 69 6e 20 7a | 6f 6e 65 2e 09 0d 09 69 |yte in z|one....i|
|000014c0| 66 20 74 68 69 73 42 6c | 6f 63 6b 48 6e 64 6c 20 |f thisBl|ockHndl |
|000014d0| 3c 20 74 68 69 73 5a 6f | 6e 65 50 74 72 20 7c 7c |< thisZo|nePtr |||
|000014e0| 20 74 68 69 73 42 6c 6f | 63 6b 48 6e 64 6c 20 2b | thisBlo|ckHndl +|
|000014f0| 20 34 20 3e 20 65 6e 64 | 5a 6f 6e 65 20 74 68 65 | 4 > end|Zone the|
|00001500| 6e 09 0d 09 09 22 5c 6e | 23 23 20 62 6c 6f 63 6b |n...."\n|## block|
|00001510| 27 73 20 6d 61 73 74 65 | 72 20 70 6f 69 6e 74 65 |'s maste|r pointe|
|00001520| 72 20 66 61 6c 6c 73 20 | 6f 75 74 73 69 64 65 20 |r falls |outside |
|00001530| 6f 66 20 74 68 69 73 20 | 7a 6f 6e 65 22 0d 09 09 |of this |zone"...|
|00001540| 70 72 69 6e 74 66 20 28 | 22 7a 6f 6e 65 20 73 74 |printf (|"zone st|
|00001550| 61 72 74 20 25 2e 38 78 | 20 2d 20 7a 6f 6e 65 20 |art %.8x| - zone |
|00001560| 65 6e 64 20 25 2e 38 78 | 20 2d 20 6d 61 73 74 65 |end %.8x| - maste|
|00001570| 72 20 70 6f 69 6e 74 65 | 72 20 61 74 20 25 2e 38 |r pointe|r at %.8|
|00001580| 78 5c 6e 22 2c 74 68 69 | 73 5a 6f 6e 65 50 74 72 |x\n",thi|sZonePtr|
|00001590| 2c 20 65 6e 64 5a 6f 6e | 65 2c 20 74 68 69 73 42 |, endZon|e, thisB|
|000015a0| 6c 6f 63 6b 48 6e 64 6c | 29 0d 09 09 6e 6f 74 4f |lockHndl|)...notO|
|000015b0| 6b 20 3a 3d 20 31 0d 09 | 65 6e 64 09 09 09 09 09 |k := 1..|end.....|
|000015c0| 09 09 09 09 09 09 09 09 | 09 09 09 09 0d 09 73 65 |........|......se|
|000015d0| 6c 66 48 6e 64 6c 20 3a | 3d 20 28 28 74 68 69 73 |lfHndl :|= ((this|
|000015e0| 42 6c 6f 63 6b 48 6e 64 | 6c 5e 20 26 20 24 30 30 |BlockHnd|l^ & $00|
|000015f0| 66 66 66 66 66 66 20 29 | 2d 20 38 20 2b 20 34 29 |ffffff )|- 8 + 4)|
|00001600| 5e 09 23 20 79 69 65 6c | 64 73 20 6f 66 66 73 65 |^.# yiel|ds offse|
|00001610| 74 20 66 72 6f 6d 20 74 | 6f 70 20 54 68 69 73 5a |t from t|op ThisZ|
|00001620| 6f 6e 65 50 74 72 20 74 | 6f 20 74 68 69 73 20 62 |onePtr t|o this b|
|00001630| 6c 6f 63 6b 27 73 20 6d | 61 73 74 65 72 20 70 6f |lock's m|aster po|
|00001640| 69 6e 74 65 72 0d 09 73 | 65 6c 66 48 6e 64 6c 20 |inter..s|elfHndl |
|00001650| 3a 3d 20 20 74 68 69 73 | 5a 6f 6e 65 50 74 72 20 |:= this|ZonePtr |
|00001660| 2b 20 73 65 6c 66 48 6e | 64 6c 20 09 09 09 09 09 |+ selfHn|dl .....|
|00001670| 09 23 20 69 73 20 6c 6f | 63 61 74 69 6f 6e 20 6f |.# is lo|cation o|
|00001680| 66 20 20 4d 50 20 69 6e | 64 69 63 61 74 65 64 20 |f MP in|dicated |
|00001690| 62 79 20 74 68 69 73 20 | 62 6c 6f 63 6b 27 73 20 |by this |block's |
|000016a0| 73 65 6c 66 2d 72 65 6c | 61 74 69 76 65 20 68 61 |self-rel|ative ha|
|000016b0| 6e 64 6c 65 0d 09 69 66 | 20 73 65 6c 66 48 6e 64 |ndle..if| selfHnd|
|000016c0| 6c 5e 20 3c 3e 20 74 68 | 69 73 42 6c 6f 63 6b 48 |l^ <> th|isBlockH|
|000016d0| 6e 64 6c 5e 20 74 68 65 | 6e 09 20 0d 09 09 22 5c |ndl^ the|n. ..."\|
|000016e0| 6e 23 23 20 62 6c 6f 63 | 6b 27 73 20 73 65 6c 66 |n## bloc|k's self|
|000016f0| 20 72 65 6c 61 74 69 76 | 65 20 68 61 6e 64 6c 65 | relativ|e handle|
|00001700| 20 79 69 65 6c 64 73 20 | 61 20 20 6d 61 73 74 65 | yields |a maste|
|00001710| 72 20 70 6f 69 6e 74 65 | 72 20 77 68 69 63 68 20 |r pointe|r which |
|00001720| 64 6f 65 73 6e 27 74 20 | 6d 61 74 63 68 20 74 68 |doesn't |match th|
|00001730| 65 20 6d 61 73 74 65 72 | 20 70 6f 69 6e 74 65 72 |e master| pointer|
|00001740| 20 69 6e 20 74 68 65 20 | 72 65 73 6f 75 72 63 65 | in the |resource|
|00001750| 20 6d 61 70 2e 22 0d 09 | 09 70 72 69 6e 74 66 28 | map."..|.printf(|
|00001760| 22 73 65 6c 66 2d 72 65 | 6c 61 74 69 76 65 20 4d |"self-re|lative M|
|00001770| 50 20 25 2e 38 78 20 2d | 20 72 65 73 6f 75 72 63 |P %.8x -| resourc|
|00001780| 65 20 6d 61 70 20 4d 50 | 20 25 2e 38 78 20 20 20 |e map MP| %.8x |
|00001790| 28 68 69 67 68 20 62 79 | 74 65 73 20 69 6e 74 61 |(high by|tes inta|
|000017a0| 63 74 29 22 2c 20 20 73 | 65 6c 66 48 6e 64 6c 5e |ct)", s|elfHndl^|
|000017b0| 2c 20 74 68 69 73 42 6c | 6f 63 6b 48 6e 64 6c 5e |, thisBl|ockHndl^|
|000017c0| 29 0d 09 09 6e 6f 74 4f | 6b 20 3a 3d 20 31 0d 09 |)...notO|k := 1..|
|000017d0| 65 6e 64 0d 09 72 65 74 | 75 72 6e 20 6e 6f 74 4f |end..ret|urn notO|
|000017e0| 6b 0d 65 6e 64 20 23 20 | 66 75 6e 63 20 43 68 65 |k.end # |func Che|
|000017f0| 63 6b 4d 50 0d 0d 0d 66 | 75 6e 63 20 42 6c 6f 63 |ckMP...f|unc Bloc|
|00001800| 6b 49 6e 5a 6f 6e 65 28 | 74 68 69 73 42 6c 6f 63 |kInZone(|thisBloc|
|00001810| 6b 48 6e 64 6c 2c 20 74 | 68 69 73 5a 6f 6e 65 50 |kHndl, t|hisZoneP|
|00001820| 74 72 29 0d 09 23 20 66 | 75 6e 63 74 69 6f 6e 20 |tr)..# f|unction |
|00001830| 72 65 74 75 72 6e 73 20 | 61 20 72 65 73 75 6c 74 |returns |a result|
|00001840| 20 63 6f 64 65 20 6f 66 | 20 31 20 69 66 20 4e 6f | code of| 1 if No|
|00001850| 74 4f 6b 20 61 6e 64 20 | 30 20 69 66 20 61 6c 6c |tOk and |0 if all|
|00001860| 20 69 73 20 77 65 6c 6c | 0d 09 23 20 76 65 72 69 | is well|..# veri|
|00001870| 66 79 20 74 68 61 74 20 | 74 68 69 73 20 62 6c 6f |fy that |this blo|
|00001880| 63 6b 20 73 74 61 72 74 | 73 20 69 6e 20 74 68 69 |ck start|s in thi|
|00001890| 73 20 7a 6f 6e 65 20 61 | 6e 64 20 64 6f 65 73 6e |s zone a|nd doesn|
|000018a0| 27 74 20 65 78 74 65 6e | 64 20 62 65 79 6f 6e 64 |'t exten|d beyond|
|000018b0| 20 69 74 0d 09 23 20 61 | 6c 73 6f 20 76 65 72 69 | it..# a|lso veri|
|000018c0| 66 79 20 74 68 61 74 20 | 74 68 65 20 62 6c 6f 63 |fy that |the bloc|
|000018d0| 6b 20 73 69 7a 65 20 69 | 73 20 6e 6f 74 20 30 20 |k size i|s not 0 |
|000018e0| 6f 72 20 6f 64 64 0d 09 | 64 65 66 69 6e 65 20 65 |or odd..|define e|
|000018f0| 6e 64 5a 6f 6e 65 0d 09 | 64 65 66 69 6e 65 20 62 |ndZone..|define b|
|00001900| 6c 6f 63 6b 53 69 7a 65 | 0d 09 64 65 66 69 6e 65 |lockSize|..define|
|00001910| 20 62 6c 6f 63 6b 53 74 | 61 72 74 0d 09 64 65 66 | blockSt|art..def|
|00001920| 69 6e 65 20 6e 6f 74 4f | 6b 20 3a 3d 20 30 09 09 |ine notO|k := 0..|
|00001930| 09 09 09 09 09 09 09 09 | 09 09 09 23 20 61 73 73 |........|...# ass|
|00001940| 75 6d 65 20 77 69 6c 6c | 20 70 61 73 73 20 61 6c |ume will| pass al|
|00001950| 6c 20 74 65 73 74 73 09 | 09 09 09 09 09 09 09 09 |l tests.|........|
|00001960| 09 09 0d 09 0d 09 65 6e | 64 5a 6f 6e 65 20 3a 3d |......en|dZone :=|
|00001970| 20 74 68 69 73 5a 6f 6e | 65 50 74 72 5e 5e 20 20 | thisZon|ePtr^^ |
|00001980| 26 20 24 30 30 66 66 66 | 66 66 66 09 09 09 09 09 |& $00fff|fff.....|
|00001990| 23 20 79 69 65 6c 64 73 | 20 73 69 7a 65 20 6f 66 |# yields| size of|
|000019a0| 20 7a 6f 6e 65 20 74 72 | 61 69 6c 65 72 20 62 6c | zone tr|ailer bl|
|000019b0| 6f 63 6b 20 0d 09 65 6e | 64 5a 6f 6e 65 20 3a 3d |ock ..en|dZone :=|
|000019c0| 20 74 68 69 73 5a 6f 6e | 65 70 74 72 5e 20 2b 20 | thisZon|eptr^ + |
|000019d0| 65 6e 64 5a 6f 6e 65 09 | 09 09 09 09 09 09 23 20 |endZone.|......# |
|000019e0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 7a 6f 6e 65 20 |pointer |to zone |
|000019f0| 74 72 61 69 6c 65 72 20 | 62 6c 6f 63 6b 20 70 6c |trailer |block pl|
|00001a00| 75 73 20 69 74 73 20 6c | 65 6e 67 74 68 20 69 73 |us its l|ength is|
|00001a10| 20 61 64 64 72 65 73 73 | 20 6f 66 20 6c 61 73 74 | address| of last|
|00001a20| 20 62 79 74 65 20 69 6e | 20 7a 6f 6e 65 2e 0d 09 | byte in| zone...|
|00001a30| 62 6c 6f 63 6b 53 69 7a | 65 20 3a 3d 20 28 28 74 |blockSiz|e := ((t|
|00001a40| 68 69 73 42 6c 6f 63 6b | 48 6e 64 6c 5e 20 26 20 |hisBlock|Hndl^ & |
|00001a50| 24 30 30 66 66 66 66 66 | 66 29 20 2d 20 38 29 5e |$00fffff|f) - 8)^|
|00001a60| 20 26 20 24 30 30 66 66 | 66 66 66 66 09 23 6d 61 | & $00ff|ffff.#ma|
|00001a70| 73 6b 20 4d 50 20 68 69 | 67 68 20 62 79 74 65 2c |sk MP hi|gh byte,|
|00001a80| 20 62 61 63 6b 75 70 20 | 38 20 74 6f 20 62 6c 6f | backup |8 to blo|
|00001a90| 63 6b 20 68 65 61 64 65 | 72 2c 20 6d 61 73 6b 20 |ck heade|r, mask |
|00001aa0| 74 61 67 20 62 79 74 65 | 09 09 0d 09 69 66 20 62 |tag byte|....if b|
|00001ab0| 6c 6f 63 6b 53 69 7a 65 | 20 3d 20 30 20 74 68 65 |lockSize| = 0 the|
|00001ac0| 6e 20 09 09 09 09 09 09 | 09 09 09 09 09 23 20 63 |n ......|.....# c|
|00001ad0| 68 65 63 6b 20 62 6c 6f | 63 6b 20 73 69 7a 65 0d |heck blo|ck size.|
|00001ae0| 09 09 22 5c 6e 23 23 20 | 62 6c 6f 63 6b 20 68 61 |.."\n## |block ha|
|00001af0| 73 20 61 6e 20 69 6e 76 | 61 6c 69 64 20 4e 49 4c |s an inv|alid NIL|
|00001b00| 20 73 69 7a 65 22 09 09 | 09 09 09 0d 09 09 6e 6f | size"..|......no|
|00001b10| 74 4f 6b 20 3a 3d 20 31 | 0d 09 65 6c 73 65 69 66 |tOk := 1|..elseif|
|00001b20| 20 62 6c 6f 63 6b 53 69 | 7a 65 20 26 20 24 30 31 | blockSi|ze & $01|
|00001b30| 20 3d 20 20 31 20 74 68 | 65 6e 09 09 09 09 09 09 | = 1 th|en......|
|00001b40| 09 23 20 28 69 66 20 73 | 69 7a 65 20 69 73 20 7a |.# (if s|ize is z|
|00001b50| 65 72 6f 20 69 74 20 63 | 61 6e 27 74 20 61 6c 73 |ero it c|an't als|
|00001b60| 6f 20 62 65 20 6f 64 64 | 20 73 6f 20 64 6f 6e 27 |o be odd| so don'|
|00001b70| 74 20 62 6f 74 68 65 72 | 20 74 6f 20 63 68 65 63 |t bother| to chec|
|00001b80| 6b 2e 29 0d 09 09 22 5c | 6e 23 23 20 62 6c 6f 63 |k.)..."\|n## bloc|
|00001b90| 6b 20 68 61 73 20 61 6e | 20 69 6e 76 61 6c 69 64 |k has an| invalid|
|00001ba0| 20 6f 64 64 20 73 69 7a | 65 22 0d 09 09 6e 6f 74 | odd siz|e"...not|
|00001bb0| 4f 6b 20 3a 3d 20 31 0d | 09 65 6e 64 0d 09 62 6c |Ok := 1.|.end..bl|
|00001bc0| 6f 63 6b 53 74 61 72 74 | 20 3a 3d 20 74 68 69 73 |ockStart| := this|
|00001bd0| 42 6c 6f 63 6b 48 6e 64 | 6c 5e 20 26 20 24 30 30 |BlockHnd|l^ & $00|
|00001be0| 66 66 66 66 66 66 09 09 | 09 09 23 20 63 68 65 63 |ffffff..|..# chec|
|00001bf0| 6b 20 62 6c 6f 63 6b 20 | 6c 6f 63 61 74 69 6f 6e |k block |location|
|00001c00| 20 0d 09 69 66 20 62 6c | 6f 63 6b 53 74 61 72 74 | ..if bl|ockStart|
|00001c10| 20 3c 20 74 68 69 73 5a | 6f 6e 65 50 74 72 20 7c | < thisZ|onePtr ||
|00001c20| 7c 20 62 6c 6f 63 6b 53 | 74 61 72 74 20 3e 20 65 || blockS|tart > e|
|00001c30| 6e 64 5a 6f 6e 65 20 74 | 68 65 6e 0d 09 09 69 66 |ndZone t|hen...if|
|00001c40| 20 74 68 69 73 5a 6f 6e | 65 50 74 72 20 3d 20 54 | thisZon|ePtr = T|
|00001c50| 68 65 5a 6f 6e 65 20 74 | 68 65 6e 0d 09 09 09 22 |heZone t|hen...."|
|00001c60| 5c 6e 23 23 20 72 65 73 | 6f 75 72 63 65 20 6d 61 |\n## res|ource ma|
|00001c70| 70 27 73 20 68 61 6e 64 | 6c 65 20 66 6f 72 20 74 |p's hand|le for t|
|00001c80| 68 69 73 20 62 6c 6f 63 | 6b 20 79 69 65 6c 64 73 |his bloc|k yields|
|00001c90| 20 61 20 73 74 61 72 74 | 69 6e 67 20 61 64 64 72 | a start|ing addr|
|00001ca0| 65 73 73 20 6f 75 74 73 | 69 64 65 20 6f 66 20 65 |ess outs|ide of e|
|00001cb0| 78 70 65 63 74 65 64 20 | 6c 6f 63 61 74 69 6f 6e |xpected |location|
|00001cc0| 20 69 6e 20 54 68 65 5a | 6f 6e 65 22 0d 09 09 65 | in TheZ|one"...e|
|00001cd0| 6c 73 65 69 66 20 74 68 | 69 73 5a 6f 6e 65 50 74 |lseif th|isZonePt|
|00001ce0| 72 20 3d 20 53 79 73 5a | 6f 6e 65 0d 09 09 09 22 |r = SysZ|one...."|
|00001cf0| 5c 6e 23 23 20 72 65 73 | 6f 75 72 63 65 20 6d 61 |\n## res|ource ma|
|00001d00| 70 27 73 20 68 61 6e 64 | 6c 65 20 66 6f 72 20 74 |p's hand|le for t|
|00001d10| 68 69 73 20 62 6c 6f 63 | 6b 20 79 69 65 6c 64 73 |his bloc|k yields|
|00001d20| 20 61 20 73 74 61 72 74 | 69 6e 67 20 61 64 64 72 | a start|ing addr|
|00001d30| 65 73 73 20 6f 75 74 73 | 69 64 65 20 6f 66 20 65 |ess outs|ide of e|
|00001d40| 78 70 65 63 74 65 64 20 | 6c 6f 63 61 74 69 6f 6e |xpected |location|
|00001d50| 20 69 6e 20 53 79 73 5a | 6f 6e 65 22 0d 09 09 65 | in SysZ|one"...e|
|00001d60| 6c 73 65 0d 09 09 09 22 | 5c 6e 23 23 72 65 73 6f |lse...."|\n##reso|
|00001d70| 75 72 63 65 20 6d 61 70 | 27 73 20 68 61 6e 64 6c |urce map|'s handl|
|00001d80| 65 20 66 6f 72 20 74 68 | 69 73 20 62 6c 6f 63 6b |e for th|is block|
|00001d90| 20 79 69 65 6c 64 73 20 | 61 20 73 74 61 72 74 69 | yields |a starti|
|00001da0| 6e 67 20 61 64 64 72 65 | 73 73 20 6f 75 74 73 69 |ng addre|ss outsi|
|00001db0| 64 65 20 6f 66 20 54 68 | 65 5a 6f 6e 65 20 6f 72 |de of Th|eZone or|
|00001dc0| 20 53 79 73 5a 6f 6e 65 | 22 20 0d 09 09 65 6e 64 | SysZone|" ...end|
|00001dd0| 0d 09 09 70 72 69 6e 74 | 66 28 22 73 74 61 72 74 |...print|f("start|
|00001de0| 20 7a 6f 6e 65 20 25 2e | 38 78 20 2d 20 65 6e 64 | zone %.|8x - end|
|00001df0| 20 7a 6f 6e 65 20 25 2e | 38 78 20 2d 20 62 6c 6f | zone %.|8x - blo|
|00001e00| 63 6b 20 73 74 61 72 74 | 20 25 2e 38 78 5c 6e 22 |ck start| %.8x\n"|
|00001e10| 2c 20 74 68 69 73 5a 6f | 6e 65 50 74 72 2c 20 65 |, thisZo|nePtr, e|
|00001e20| 6e 64 5a 6f 6e 65 2c 20 | 62 6c 6f 63 6b 53 74 61 |ndZone, |blockSta|
|00001e30| 72 74 29 0d 09 09 6e 6f | 74 4f 6b 20 3a 3d 20 31 |rt)...no|tOk := 1|
|00001e40| 0d 09 65 6c 73 65 69 66 | 20 62 6c 6f 63 6b 53 74 |..elseif| blockSt|
|00001e50| 61 72 74 20 2b 20 62 6c | 6f 63 6b 53 69 7a 65 20 |art + bl|ockSize |
|00001e60| 3e 20 65 6e 64 5a 6f 6e | 65 20 74 68 65 6e 0d 09 |> endZon|e then..|
|00001e70| 09 22 5c 6e 23 23 20 62 | 6c 6f 63 6b 27 73 20 73 |."\n## b|lock's s|
|00001e80| 69 7a 65 20 65 78 74 65 | 6e 64 73 20 69 74 20 62 |ize exte|nds it b|
|00001e90| 65 79 6f 6e 64 20 74 68 | 65 20 65 6e 64 20 6f 66 |eyond th|e end of|
|00001ea0| 20 74 68 69 73 20 68 65 | 61 70 20 7a 6f 6e 65 22 | this he|ap zone"|
|00001eb0| 0d 09 09 70 72 69 6e 74 | 66 28 22 62 6c 6f 63 6b |...print|f("block|
|00001ec0| 20 73 74 61 72 74 20 25 | 2e 38 78 20 2d 20 62 6c | start %|.8x - bl|
|00001ed0| 6f 63 6b 20 73 69 7a 65 | 20 25 2e 38 78 20 2d 20 |ock size| %.8x - |
|00001ee0| 65 6e 64 20 7a 6f 6e 65 | 20 25 2e 38 78 5c 6e 22 |end zone| %.8x\n"|
|00001ef0| 2c 20 62 6c 6f 63 6b 53 | 74 61 72 74 2c 20 62 6c |, blockS|tart, bl|
|00001f00| 6f 63 6b 53 69 7a 65 2c | 20 65 6e 64 5a 6f 6e 65 |ockSize,| endZone|
|00001f10| 29 0d 09 09 6e 6f 74 4f | 6b 20 3a 3d 20 31 0d 09 |)...notO|k := 1..|
|00001f20| 65 6e 64 09 0d 09 72 65 | 74 75 72 6e 20 6e 6f 74 |end...re|turn not|
|00001f30| 4f 6b 0d 65 6e 64 20 23 | 20 70 72 6f 63 20 42 6c |Ok.end #| proc Bl|
|00001f40| 6f 63 6b 49 6e 5a 6f 6e | 65 0d 0d 0d 66 75 6e 63 |ockInZon|e...func|
|00001f50| 20 43 68 65 63 6b 52 65 | 73 20 28 74 79 70 65 4c | CheckRe|s (typeL|
|00001f60| 69 73 74 50 74 72 2c 20 | 74 68 69 73 5a 6f 6e 65 |istPtr, |thisZone|
|00001f70| 29 0d 09 23 20 66 75 6e | 63 20 72 65 74 75 72 6e |)..# fun|c return|
|00001f80| 73 20 31 20 69 66 20 6e | 6f 74 4f 6b 20 61 6e 64 |s 1 if n|otOk and|
|00001f90| 20 30 20 69 66 20 61 6c | 6c 20 69 73 20 77 65 6c | 0 if al|l is wel|
|00001fa0| 6c 0d 09 23 20 6c 6f 63 | 61 74 65 73 20 6d 61 73 |l..# loc|ates mas|
|00001fb0| 74 65 72 20 70 6f 69 6e | 74 65 72 20 69 6e 20 72 |ter poin|ter in r|
|00001fc0| 65 73 4d 61 70 20 66 6f | 72 20 61 6c 6c 20 6c 6f |esMap fo|r all lo|
|00001fd0| 61 64 65 64 20 72 65 73 | 6f 75 72 63 65 73 2c 20 |aded res|ources, |
|00001fe0| 74 68 65 6e 20 63 68 65 | 63 6b 73 20 65 61 63 68 |then che|cks each|
|00001ff0| 20 4d 50 20 61 6e 64 20 | 72 65 73 6f 75 72 63 65 | MP and |resource|
|00002000| 20 66 6f 72 20 76 61 6c | 69 64 69 74 79 0d 09 23 | for val|idity..#|
|00002010| 20 61 6e 64 20 70 72 69 | 6e 74 73 20 64 69 61 67 | and pri|nts diag|
|00002020| 6e 6f 73 74 69 63 20 69 | 6e 66 6f 72 6d 61 74 69 |nostic i|nformati|
|00002030| 6f 6e 20 66 6f 72 20 74 | 68 65 20 72 65 73 6f 75 |on for t|he resou|
|00002040| 72 63 65 20 69 66 20 61 | 20 70 72 6f 62 6c 65 6d |rce if a| problem|
|00002050| 20 69 73 20 66 6f 75 6e | 64 0d 0d 09 64 65 66 69 | is foun|d...defi|
|00002060| 6e 65 20 72 65 66 4c 69 | 73 74 50 74 72 2c 20 74 |ne refLi|stPtr, t|
|00002070| 68 69 73 52 65 73 45 6e | 74 72 79 0d 09 64 65 66 |hisResEn|try..def|
|00002080| 69 6e 65 20 6e 75 6d 54 | 79 70 65 73 2c 20 6e 75 |ine numT|ypes, nu|
|00002090| 6d 54 68 69 73 54 79 70 | 65 0d 09 64 65 66 69 6e |mThisTyp|e..defin|
|000020a0| 65 20 74 79 70 65 4c 6f | 6f 70 2c 20 72 65 73 4c |e typeLo|op, resL|
|000020b0| 6f 6f 70 0d 09 64 65 66 | 69 6e 65 20 72 65 73 5a |oop..def|ine resZ|
|000020c0| 6f 6e 65 2c 20 72 65 73 | 48 6e 64 6c 2c 20 72 65 |one, res|Hndl, re|
|000020d0| 73 50 74 72 0d 09 64 65 | 66 69 6e 65 20 72 65 73 |sPtr..de|fine res|
|000020e0| 41 74 74 72 69 62 75 74 | 65 73 2c 20 72 65 73 49 |Attribut|es, resI|
|000020f0| 64 2c 20 6e 61 6d 65 4f | 66 66 73 65 74 0d 09 64 |d, nameO|ffset..d|
|00002100| 65 66 69 6e 65 20 6e 6f | 74 4f 6b 20 0d 09 0d 09 |efine no|tOk ....|
|00002110| 6e 75 6d 54 79 70 65 73 | 20 3a 3d 20 5e 57 6f 72 |numTypes| := ^Wor|
|00002120| 64 20 28 54 79 70 65 4c | 69 73 74 50 74 72 29 09 |d (TypeL|istPtr).|
|00002130| 5e 09 09 09 09 09 0d 09 | 66 6f 72 20 74 79 70 65 |^.......|for type|
|00002140| 4c 6f 6f 70 20 3a 3d 20 | 30 20 74 6f 20 4e 75 6d |Loop := |0 to Num|
|00002150| 54 79 70 65 73 09 09 09 | 09 09 09 09 09 09 09 23 |Types...|.......#|
|00002160| 20 66 6f 72 20 65 61 63 | 68 20 72 65 73 6f 75 72 | for eac|h resour|
|00002170| 63 65 20 74 79 70 65 20 | 0d 09 20 09 54 68 69 73 |ce type |.. .This|
|00002180| 52 65 73 45 6e 74 72 79 | 20 3a 3d 20 74 79 70 65 |ResEntry| := type|
|00002190| 4c 69 73 74 50 74 72 20 | 2b 20 32 20 2b 20 74 79 |ListPtr |+ 2 + ty|
|000021a0| 70 65 4c 6f 6f 70 20 2a | 20 38 09 09 09 09 09 09 |peLoop *| 8......|
|000021b0| 09 09 0d 09 09 6e 75 6d | 54 68 69 73 54 79 70 65 |.....num|ThisType|
|000021c0| 20 3a 3d 20 5e 57 6f 72 | 64 28 74 68 69 73 52 65 | := ^Wor|d(thisRe|
|000021d0| 73 45 6e 74 72 79 20 2b | 20 34 29 5e 09 09 09 09 |sEntry +| 4)^....|
|000021e0| 09 23 20 66 69 6e 64 20 | 68 6f 77 20 6d 61 6e 79 |.# find |how many|
|000021f0| 20 6f 66 20 74 68 69 73 | 20 74 79 70 65 20 09 09 | of this| type ..|
|00002200| 0d 09 09 72 65 66 4c 69 | 73 74 50 74 72 20 3a 3d |...refLi|stPtr :=|
|00002210| 20 5e 57 6f 72 64 28 74 | 68 69 73 52 65 73 45 6e | ^Word(t|hisResEn|
|00002220| 74 72 79 20 2b 20 36 29 | 5e 20 09 09 09 09 09 23 |try + 6)|^ .....#|
|00002230| 20 61 6e 64 20 74 68 65 | 20 73 74 61 72 74 20 6f | and the| start o|
|00002240| 66 20 74 68 65 20 72 65 | 66 65 72 65 6e 63 65 20 |f the re|ference |
|00002250| 6c 69 73 74 20 66 6f 72 | 20 74 68 69 73 20 74 79 |list for| this ty|
|00002260| 70 65 20 0d 09 09 72 65 | 66 4c 69 73 74 50 74 72 |pe ...re|fListPtr|
|00002270| 20 3a 3d 20 74 79 70 65 | 4c 69 73 74 50 74 72 20 | := type|ListPtr |
|00002280| 2b 20 72 65 66 4c 69 73 | 74 50 74 72 09 09 09 09 |+ refLis|tPtr....|
|00002290| 0d 09 09 66 6f 72 20 72 | 65 73 4c 6f 6f 70 20 3a |...for r|esLoop :|
|000022a0| 3d 20 30 20 74 6f 20 6e | 75 6d 54 68 69 73 54 79 |= 0 to n|umThisTy|
|000022b0| 70 65 09 09 09 09 09 09 | 09 09 0d 09 09 09 72 65 |pe......|......re|
|000022c0| 73 48 6e 64 6c 20 3a 3d | 20 28 72 65 66 4c 69 73 |sHndl :=| (refLis|
|000022d0| 74 50 74 72 20 2b 20 38 | 29 5e 09 09 09 09 09 09 |tPtr + 8|)^......|
|000022e0| 09 09 09 09 09 09 09 09 | 09 09 09 0d 09 09 09 69 |........|.......i|
|000022f0| 66 20 72 65 73 48 6e 64 | 6c 20 3d 20 30 20 74 68 |f resHnd|l = 0 th|
|00002300| 65 6e 0d 09 09 09 09 72 | 65 73 50 74 72 20 3a 3d |en.....r|esPtr :=|
|00002310| 20 30 0d 09 09 09 65 6c | 73 65 0d 09 09 09 09 72 | 0....el|se.....r|
|00002320| 65 73 50 74 72 20 3a 3d | 20 72 65 73 48 6e 64 6c |esPtr :=| resHndl|
|00002330| 5e 20 26 20 24 30 30 66 | 66 66 66 66 66 20 09 09 |^ & $00f|fffff ..|
|00002340| 09 09 09 09 23 20 67 65 | 74 20 70 6f 69 6e 74 65 |....# ge|t pointe|
|00002350| 72 20 74 6f 20 72 65 73 | 6f 75 72 63 65 09 0d 09 |r to res|ource...|
|00002360| 09 09 65 6e 64 09 09 09 | 09 09 09 09 09 09 09 09 |..end...|........|
|00002370| 09 09 09 09 09 09 09 23 | 20 63 68 65 63 6b 20 6f |.......#| check o|
|00002380| 6e 6c 79 20 6c 6f 61 64 | 65 64 20 72 65 73 6f 75 |nly load|ed resou|
|00002390| 72 63 65 73 0d 09 09 09 | 69 66 20 72 65 73 50 74 |rces....|if resPt|
|000023a0| 72 20 3c 3e 20 30 20 74 | 68 65 6e 09 09 09 09 09 |r <> 0 t|hen.....|
|000023b0| 09 09 09 09 09 09 09 23 | 20 28 61 20 6e 6f 6e 2d |.......#| (a non-|
|000023c0| 7a 65 72 6f 20 68 61 6e | 64 6c 65 20 63 6f 75 6c |zero han|dle coul|
|000023d0| 64 20 70 6f 69 6e 74 20 | 74 6f 20 4e 49 4c 20 4d |d point |to NIL M|
|000023e0| 50 20 69 66 20 72 65 73 | 6f 75 72 63 65 20 77 61 |P if res|ource wa|
|000023f0| 73 20 70 75 72 67 65 64 | 29 0d 09 09 09 09 72 65 |s purged|).....re|
|00002400| 73 41 74 74 72 69 62 75 | 74 65 73 20 3a 3d 20 72 |sAttribu|tes := r|
|00002410| 65 66 4c 69 73 74 50 74 | 72 20 2b 20 34 09 09 09 |efListPt|r + 4...|
|00002420| 09 09 09 09 0d 09 09 09 | 09 72 65 73 41 74 74 72 |........|.resAttr|
|00002430| 69 62 75 74 65 73 20 3a | 3d 20 20 5e 42 79 74 65 |ibutes :|= ^Byte|
|00002440| 20 28 72 65 73 41 74 74 | 72 69 62 75 74 65 73 29 | (resAtt|ributes)|
|00002450| 5e 09 09 09 23 20 77 68 | 69 63 68 20 68 65 61 70 |^...# wh|ich heap|
|00002460| 20 69 73 20 72 65 73 6f | 75 72 63 65 20 69 6e 3f | is reso|urce in?|
|00002470| 0d 09 09 09 09 69 66 20 | 72 65 73 41 74 74 72 69 |.....if |resAttri|
|00002480| 62 75 74 65 73 20 26 20 | 24 30 30 34 30 20 74 68 |butes & |$0040 th|
|00002490| 65 6e 20 09 09 09 09 09 | 09 09 23 20 69 66 20 72 |en .....|..# if r|
|000024a0| 65 73 53 79 73 48 65 61 | 70 20 61 74 74 72 69 62 |esSysHea|p attrib|
|000024b0| 75 74 65 20 73 65 74 20 | 0d 09 09 09 09 09 72 65 |ute set |......re|
|000024c0| 73 5a 6f 6e 65 20 3a 3d | 20 53 79 73 5a 6f 6e 65 |sZone :=| SysZone|
|000024d0| 09 09 09 09 09 09 09 09 | 09 09 23 20 74 68 65 6e |........|..# then|
|000024e0| 20 74 68 65 20 72 65 73 | 6f 75 72 63 65 20 73 68 | the res|ource sh|
|000024f0| 6f 75 6c 64 20 62 65 20 | 69 6e 20 6c 6f 61 64 65 |ould be |in loade|
|00002500| 64 20 69 6e 20 74 68 65 | 20 53 79 73 74 65 6d 20 |d in the| System |
|00002510| 68 65 61 70 2e 0d 09 09 | 09 09 65 6c 73 65 20 09 |heap....|..else .|
|00002520| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00002530| 23 20 65 6c 73 65 20 69 | 74 20 73 68 6f 75 6c 64 |# else i|t should|
|00002540| 20 62 65 20 6c 6f 61 64 | 65 64 20 69 6e 20 74 68 | be load|ed in th|
|00002550| 65 20 63 75 72 72 65 6e | 74 20 41 70 70 27 73 20 |e curren|t App's |
|00002560| 68 65 61 70 2e 0d 09 09 | 09 09 09 72 65 73 5a 6f |heap....|...resZo|
|00002570| 6e 65 20 3a 3d 20 54 68 | 65 5a 6f 6e 65 0d 09 09 |ne := Th|eZone...|
|00002580| 09 09 65 6e 64 0d 09 09 | 09 09 6e 6f 74 4f 6b 20 |..end...|..notOk |
|00002590| 3a 3d 20 42 6c 6f 63 6b | 49 6e 5a 6f 6e 65 28 72 |:= Block|InZone(r|
|000025a0| 65 73 48 6e 64 6c 2c 72 | 65 73 5a 6f 6e 65 29 09 |esHndl,r|esZone).|
|000025b0| 09 09 09 23 20 09 6d 61 | 73 74 65 72 20 70 6f 69 |...# .ma|ster poi|
|000025c0| 6e 74 65 72 20 74 6f 20 | 72 65 73 6f 75 72 63 65 |nter to |resource|
|000025d0| 20 73 68 6f 75 6c 64 20 | 62 65 20 69 6e 20 74 68 | should |be in th|
|000025e0| 69 73 20 68 65 61 70 09 | 09 09 0d 09 09 09 09 6e |is heap.|.......n|
|000025f0| 6f 74 4f 6b 20 3a 3d 20 | 43 68 65 63 6b 4d 70 28 |otOk := |CheckMp(|
|00002600| 72 65 73 48 6e 64 6c 2c | 20 74 68 69 73 5a 6f 6e |resHndl,| thisZon|
|00002610| 65 29 09 09 09 09 09 23 | 20 77 68 65 72 65 20 74 |e).....#| where t|
|00002620| 68 69 73 20 68 65 61 70 | 20 69 73 20 61 70 70 20 |his heap| is app |
|00002630| 68 65 61 70 20 75 6e 6c | 65 73 73 20 72 65 73 66 |heap unl|ess resf|
|00002640| 69 6c 65 20 69 73 20 73 | 79 73 74 65 6d 27 73 0d |ile is s|ystem's.|
|00002650| 09 09 09 09 69 66 20 6e | 6f 74 4f 6b 20 74 68 65 |....if n|otOk the|
|00002660| 6e 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 23 |n.......|.......#|
|00002670| 20 61 6e 20 65 72 72 6f | 72 20 77 61 73 20 72 65 | an erro|r was re|
|00002680| 70 6f 72 74 65 64 0d 09 | 09 09 09 09 72 65 73 49 |ported..|....resI|
|00002690| 64 20 3a 3d 20 5e 57 6f | 72 64 20 28 72 65 66 4c |d := ^Wo|rd (refL|
|000026a0| 69 73 74 50 74 72 29 5e | 09 09 09 09 09 09 09 23 |istPtr)^|.......#|
|000026b0| 20 67 69 76 65 20 49 44 | 20 61 6e 64 20 6e 61 6d | give ID| and nam|
|000026c0| 65 20 66 6f 72 20 74 68 | 65 20 70 72 6f 62 6c 65 |e for th|e proble|
|000026d0| 6d 20 72 65 73 6f 75 72 | 63 65 20 0d 09 09 09 09 |m resour|ce .....|
|000026e0| 09 70 72 69 6e 74 66 28 | 22 5c 6e 20 20 20 20 20 |.printf(|"\n |
|000026f0| 20 49 44 3a 20 25 20 2e | 35 64 22 2c 20 72 65 73 | ID: % .|5d", res|
|00002700| 49 64 29 0d 09 09 09 09 | 09 6e 61 6d 65 4f 66 66 |Id).....|.nameOff|
|00002710| 73 65 74 20 3a 3d 20 5e | 57 6f 72 64 28 72 65 66 |set := ^|Word(ref|
|00002720| 4c 69 73 74 50 74 72 2b | 32 29 5e 0d 09 09 09 09 |ListPtr+|2)^.....|
|00002730| 09 69 66 20 6e 61 6d 65 | 4f 66 66 73 65 74 20 3c |.if name|Offset <|
|00002740| 3e 20 2d 31 20 74 68 65 | 6e 0d 09 09 09 09 09 09 |> -1 the|n.......|
|00002750| 72 65 73 4e 61 6d 65 28 | 6e 61 6d 65 4f 66 66 73 |resName(|nameOffs|
|00002760| 65 74 29 0d 09 09 09 09 | 09 65 6e 64 20 20 0d 09 |et).....|.end ..|
|00002770| 09 09 09 65 6e 64 09 23 | 20 6e 6f 74 4f 6b 09 09 |...end.#| notOk..|
|00002780| 0d 09 09 09 65 6e 64 20 | 20 20 23 20 72 65 73 50 |....end | # resP|
|00002790| 74 72 20 3c 3e 20 30 0d | 09 09 09 72 65 66 4c 69 |tr <> 0.|...refLi|
|000027a0| 73 74 50 74 72 20 3a 3d | 20 72 65 66 4c 69 73 74 |stPtr :=| refList|
|000027b0| 50 74 72 20 2b 20 31 32 | 09 09 09 09 09 09 09 09 |Ptr + 12|........|
|000027c0| 23 20 6d 6f 76 65 20 6f | 6e 20 74 6f 20 74 65 73 |# move o|n to tes|
|000027d0| 74 20 6e 65 78 74 20 72 | 65 73 6f 75 72 63 65 20 |t next r|esource |
|000027e0| 69 6e 20 72 65 66 65 72 | 65 6e 63 65 20 6c 69 73 |in refer|ence lis|
|000027f0| 74 0d 09 09 65 6e 64 20 | 23 20 20 72 65 73 4c 6f |t...end |# resLo|
|00002800| 6f 70 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |op......|........|
|00002810| 09 23 20 74 69 6c 6c 20 | 61 6c 6c 20 72 65 73 6f |.# till |all reso|
|00002820| 75 72 63 65 73 20 6f 66 | 20 74 68 69 73 20 74 79 |urces of| this ty|
|00002830| 70 65 20 61 72 65 20 74 | 65 73 74 65 64 0d 09 65 |pe are t|ested..e|
|00002840| 6e 64 09 23 20 74 79 70 | 65 4c 6f 6f 70 09 09 09 |nd.# typ|eLoop...|
|00002850| 09 09 09 09 09 09 09 09 | 09 09 09 09 23 20 74 68 |........|....# th|
|00002860| 65 6e 20 74 65 73 74 20 | 6e 65 78 74 20 72 65 73 |en test |next res|
|00002870| 6f 75 72 63 65 20 74 79 | 70 65 20 0d 09 72 65 74 |ource ty|pe ..ret|
|00002880| 75 72 6e 20 6e 6f 74 4f | 6b 0d 65 6e 64 09 23 20 |urn notO|k.end.# |
|00002890| 70 72 6f 63 20 43 68 65 | 63 6b 52 65 73 0d 0d 0d |proc Che|ckRes...|
|000028a0| 70 72 6f 63 20 52 65 73 | 56 65 72 69 66 79 20 0d |proc Res|Verify .|
|000028b0| 09 23 20 76 65 72 69 66 | 69 65 73 20 61 6c 6c 20 |.# verif|ies all |
|000028c0| 72 65 73 6f 75 72 63 65 | 20 6d 61 70 73 20 69 6e |resource| maps in|
|000028d0| 20 74 68 65 20 72 65 73 | 6f 75 72 63 65 20 63 68 | the res|ource ch|
|000028e0| 61 69 6e 20 61 6e 64 20 | 61 6c 6c 20 6c 6f 61 64 |ain and |all load|
|000028f0| 65 64 20 72 65 73 6f 75 | 72 63 65 73 20 28 73 65 |ed resou|rces (se|
|00002900| 65 20 43 68 65 63 6b 4d | 50 20 61 6e 64 20 42 6c |e CheckM|P and Bl|
|00002910| 6f 63 6b 49 6e 5a 6f 6e | 65 20 66 6f 72 20 64 65 |ockInZon|e for de|
|00002920| 74 61 69 6c 73 29 0d 09 | 23 20 70 72 69 6e 74 73 |tails)..|# prints|
|00002930| 20 64 69 61 67 6e 6f 73 | 74 69 63 73 20 69 66 20 | diagnos|tics if |
|00002940| 61 20 70 72 6f 62 6c 65 | 6d 20 69 73 20 66 6f 75 |a proble|m is fou|
|00002950| 6e 64 0d 09 23 20 72 65 | 70 6f 72 74 73 20 61 73 |nd..# re|ports as|
|00002960| 20 61 6e 20 65 72 72 6f | 72 20 74 68 65 20 63 61 | an erro|r the ca|
|00002970| 73 65 20 77 68 65 72 65 | 20 61 20 72 65 73 6f 75 |se where| a resou|
|00002980| 72 63 65 27 73 20 61 74 | 74 72 69 62 75 74 65 73 |rce's at|tributes|
|00002990| 20 69 6e 64 69 63 61 74 | 65 20 69 74 20 77 69 6c | indicat|e it wil|
|000029a0| 6c 20 6c 6f 61 64 20 69 | 6e 20 74 68 65 20 53 79 |l load i|n the Sy|
|000029b0| 73 74 65 6d 20 68 65 61 | 70 20 62 75 74 20 0d 09 |stem hea|p but ..|
|000029c0| 23 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 20 69 |# the re|source i|
|000029d0| 73 20 6c 6f 61 64 65 64 | 20 69 6e 20 74 68 65 20 |s loaded| in the |
|000029e0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 68 65 61 70 |applicat|ion heap|
|000029f0| 20 61 6e 79 77 61 79 20 | 62 65 63 61 75 73 65 20 | anyway |because |
|00002a00| 74 68 65 20 53 79 73 74 | 65 6d 20 68 65 61 70 20 |the Syst|em heap |
|00002a10| 64 6f 65 73 6e 27 74 20 | 68 61 76 65 20 74 68 65 |doesn't |have the|
|00002a20| 20 73 70 61 63 65 0d 09 | 23 20 28 77 65 20 6d 69 | space..|# (we mi|
|00002a30| 67 68 74 20 77 61 6e 74 | 20 74 6f 20 67 65 74 20 |ght want| to get |
|00002a40| 66 61 6e 63 79 20 61 74 | 20 73 6f 6d 65 20 70 6f |fancy at| some po|
|00002a50| 69 6e 74 20 61 6e 64 20 | 76 65 72 69 66 79 20 74 |int and |verify t|
|00002a60| 68 61 74 20 61 6c 6c 20 | 6f 66 66 73 65 74 73 20 |hat all |offsets |
|00002a70| 63 61 6c 63 75 6c 61 74 | 65 64 20 66 6f 72 20 74 |calculat|ed for t|
|00002a80| 72 61 63 69 6e 67 20 74 | 68 65 20 72 65 73 6f 75 |racing t|he resou|
|00002a90| 72 63 65 20 6d 61 70 20 | 61 72 65 0d 09 23 20 73 |rce map |are..# s|
|00002aa0| 74 69 6c 6c 20 77 69 74 | 68 69 6e 20 74 68 65 20 |till wit|hin the |
|00002ab0| 6d 61 70 2c 20 62 75 74 | 20 69 20 66 69 67 75 72 |map, but| i figur|
|00002ac0| 65 20 69 66 20 77 65 20 | 67 65 74 20 74 68 65 72 |e if we |get ther|
|00002ad0| 65 20 74 68 65 20 6f 66 | 66 73 65 74 73 20 6d 75 |e the of|fsets mu|
|00002ae0| 73 74 20 68 61 76 65 20 | 62 65 65 6e 20 6f 6b 2e |st have |been ok.|
|00002af0| 29 0d 0d 09 23 20 47 6c | 6f 62 61 6c 20 56 61 72 |)...# Gl|obal Var|
|00002b00| 69 61 62 6c 65 73 3a 0d | 09 64 65 66 69 6e 65 20 |iables:.|.define |
|00002b10| 67 6c 6f 62 61 6c 20 4e | 45 58 54 72 65 73 46 69 |global N|EXTresFi|
|00002b20| 6c 65 09 09 09 09 09 09 | 09 09 09 09 09 09 23 20 |le......|......# |
|00002b30| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 6f 70 20 6f |pointer |to top o|
|00002b40| 66 20 63 75 72 72 65 6e | 74 20 72 65 73 6f 75 72 |f curren|t resour|
|00002b50| 63 65 20 6d 61 70 0d 0d | 09 64 65 66 69 6e 65 20 |ce map..|.define |
|00002b60| 74 68 69 73 5a 6f 6e 65 | 0d 09 64 65 66 69 6e 65 |thisZone|..define|
|00002b70| 20 46 69 6c 65 52 65 66 | 09 09 09 09 09 09 09 0d | FileRef|........|
|00002b80| 09 64 65 66 69 6e 65 20 | 74 79 70 65 4c 69 73 74 |.define |typeList|
|00002b90| 4f 66 66 73 65 74 0d 09 | 64 65 66 69 6e 65 20 6e |Offset..|define n|
|00002ba0| 65 78 74 52 65 73 48 6e | 64 6c 20 3a 3d 20 74 6f |extResHn|dl := to|
|00002bb0| 70 4d 61 70 48 6e 64 6c | 20 09 0d 09 64 65 66 69 |pMapHndl| ...defi|
|00002bc0| 6e 65 20 6e 6f 74 4f 6b | 20 0d 09 09 0d 09 22 5c |ne notOk| ....."\|
|00002bd0| 6e 56 65 72 69 66 79 69 | 6e 67 20 74 68 65 20 52 |nVerifyi|ng the R|
|00002be0| 65 73 6f 75 72 63 65 20 | 43 68 61 69 6e 3a 22 0d |esource |Chain:".|
|00002bf0| 09 72 65 70 65 61 74 0d | 09 09 4e 45 58 54 72 65 |.repeat.|..NEXTre|
|00002c00| 73 46 69 6c 65 20 3a 3d | 20 6e 65 78 74 52 65 73 |sFile :=| nextRes|
|00002c10| 48 6e 64 6c 5e 09 09 09 | 09 23 20 28 74 68 69 73 |Hndl^...|.# (this|
|00002c20| 20 67 75 79 20 69 73 20 | 67 6c 6f 62 61 6c 20 2d | guy is |global -|
|00002c30| 20 66 6f 72 20 75 73 65 | 20 69 6e 20 52 65 73 4e | for use| in ResN|
|00002c40| 61 6d 65 2c 20 77 68 69 | 63 68 20 69 73 20 63 61 |ame, whi|ch is ca|
|00002c50| 6c 6c 65 64 20 66 72 6f | 6d 20 43 68 65 63 6b 52 |lled fro|m CheckR|
|00002c60| 65 73 29 09 09 09 0d 09 | 09 66 69 6c 65 52 65 66 |es).....|.fileRef|
|00002c70| 20 3a 3d 20 5e 57 6f 72 | 64 28 4e 45 58 54 72 65 | := ^Wor|d(NEXTre|
|00002c80| 73 46 69 6c 65 2b 32 30 | 29 5e 0d 09 09 70 72 69 |sFile+20|)^...pri|
|00002c90| 6e 74 66 28 22 5c 6e 52 | 65 73 6f 75 72 63 65 20 |ntf("\nR|esource |
|00002ca0| 6d 61 70 20 61 74 3a 20 | 25 2e 38 58 20 20 20 46 |map at: |%.8X F|
|00002cb0| 69 6c 65 20 72 65 66 20 | 6e 75 6d 3a 20 25 58 5c |ile ref |num: %X\|
|00002cc0| 6e 22 2c 20 4e 45 58 54 | 72 65 73 46 69 6c 65 2c |n", NEXT|resFile,|
|00002cd0| 20 66 69 6c 65 52 65 66 | 29 0d 09 09 66 69 6c 65 | fileRef|)...file|
|00002ce0| 4e 61 6d 65 28 66 69 6c | 65 52 65 66 29 09 09 0d |Name(fil|eRef)...|
|00002cf0| 09 09 69 66 20 66 69 6c | 65 52 65 66 20 3d 20 32 |..if fil|eRef = 2|
|00002d00| 20 74 68 65 6e 09 09 09 | 09 09 09 09 09 23 20 53 | then...|.....# S|
|00002d10| 79 73 74 65 6d 20 72 65 | 73 6f 75 72 63 65 20 6d |ystem re|source m|
|00002d20| 61 70 20 61 6e 64 20 6d | 61 73 74 65 72 20 70 6f |ap and m|aster po|
|00002d30| 69 6e 74 65 72 73 20 73 | 68 6f 75 6c 64 20 62 65 |inters s|hould be|
|00002d40| 20 69 6e 20 74 68 65 20 | 53 79 73 74 65 6d 20 68 | in the |System h|
|00002d50| 65 61 70 0d 09 09 09 74 | 68 69 73 5a 6f 6e 65 20 |eap....t|hisZone |
|00002d60| 3a 3d 20 53 79 73 5a 6f | 6e 65 09 09 09 09 09 09 |:= SysZo|ne......|
|00002d70| 23 20 61 6c 6c 20 6f 74 | 68 65 72 20 72 65 73 6f |# all ot|her reso|
|00002d80| 75 72 63 65 20 6d 61 70 | 73 20 61 6e 64 20 6d 61 |urce map|s and ma|
|00002d90| 73 74 65 72 20 70 6f 69 | 6e 74 65 72 73 20 73 68 |ster poi|nters sh|
|00002da0| 6f 75 6c 64 20 62 65 20 | 69 6e 20 74 68 65 20 63 |ould be |in the c|
|00002db0| 75 72 72 65 6e 74 20 41 | 70 70 20 68 65 61 70 0d |urrent A|pp heap.|
|00002dc0| 09 09 65 6c 73 65 09 09 | 09 09 09 09 09 09 09 09 |..else..|........|
|00002dd0| 09 09 09 0d 09 09 09 74 | 68 69 73 5a 6f 6e 65 20 |.......t|hisZone |
|00002de0| 3a 3d 20 54 68 65 5a 6f | 6e 65 09 0d 09 09 65 6e |:= TheZo|ne....en|
|00002df0| 64 0d 09 09 6e 6f 74 4f | 6b 20 3a 3d 20 43 68 65 |d...notO|k := Che|
|00002e00| 63 6b 4d 70 28 6e 65 78 | 74 52 65 73 48 6e 64 6c |ckMp(nex|tResHndl|
|00002e10| 2c 20 74 68 69 73 5a 6f | 6e 65 29 09 09 0d 09 09 |, thisZo|ne).....|
|00002e20| 74 79 70 65 4c 69 73 74 | 4f 66 66 73 65 74 20 3a |typeList|Offset :|
|00002e30| 3d 20 5e 57 6f 72 64 28 | 4e 45 58 54 72 65 73 46 |= ^Word(|NEXTresF|
|00002e40| 69 6c 65 20 2b 20 32 34 | 29 5e 0d 09 09 6e 6f 74 |ile + 24|)^...not|
|00002e50| 4f 6b 20 3a 3d 20 43 68 | 65 63 6b 52 65 73 20 28 |Ok := Ch|eckRes (|
|00002e60| 4e 45 58 54 72 65 73 46 | 69 6c 65 20 2b 20 74 79 |NEXTresF|ile + ty|
|00002e70| 70 65 4c 69 73 74 4f 66 | 66 73 65 74 2c 20 74 68 |peListOf|fset, th|
|00002e80| 69 73 5a 6f 6e 65 29 0d | 09 09 69 66 20 21 20 6e |isZone).|..if ! n|
|00002e90| 6f 74 4f 6b 20 74 68 65 | 6e 0d 09 09 09 22 5c 6e |otOk the|n...."\n|
|00002ea0| 6c 6f 6f 6b 69 6e 67 20 | 67 6f 6f 64 21 22 0d 09 |looking |good!"..|
|00002eb0| 09 65 6e 64 0d 09 09 6e | 65 78 74 52 65 73 48 6e |.end...n|extResHn|
|00002ec0| 64 6c 20 3a 3d 20 28 4e | 45 58 54 72 65 73 46 69 |dl := (N|EXTresFi|
|00002ed0| 6c 65 20 2b 20 31 36 29 | 5e 20 20 23 20 63 68 65 |le + 16)|^ # che|
|00002ee0| 63 6b 20 6e 65 78 74 20 | 72 65 73 6f 75 72 63 65 |ck next |resource|
|00002ef0| 20 6d 61 70 0d 09 75 6e | 74 69 6c 20 28 6e 65 78 | map..un|til (nex|
|00002f00| 74 52 65 73 48 6e 64 6c | 20 3d 20 30 29 09 09 09 |tResHndl| = 0)...|
|00002f10| 09 09 09 09 23 20 75 6e | 74 69 6c 20 6e 6f 20 6d |....# un|til no m|
|00002f20| 6f 72 65 20 72 65 73 6f | 75 72 63 65 20 6d 61 70 |ore reso|urce map|
|00002f30| 73 20 74 6f 20 63 68 65 | 63 6b 0d 09 75 6e 64 65 |s to che|ck..unde|
|00002f40| 66 69 6e 65 20 4e 45 58 | 54 72 65 73 46 69 6c 65 |fine NEX|TresFile|
|00002f50| 0d 65 6e 64 09 23 20 70 | 72 6f 63 20 52 65 73 56 |.end.# p|roc ResV|
|00002f60| 65 72 69 66 79 0d 00 00 | 00 00 00 00 00 00 00 00 |erify...|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 01 00 00 00 01 89 | 00 00 00 89 00 00 00 52 |........|.......R|
|00002f90| 81 81 81 81 81 01 01 01 | 01 01 01 01 01 01 01 01 |........|........|
|00002fa0| 01 01 01 01 01 01 01 01 | 01 10 10 10 10 10 10 82 |........|........|
|00002fb0| 08 52 65 73 6f 75 72 63 | 65 00 02 00 00 00 54 45 |.Resourc|e.....TE|
|00002fc0| 58 54 73 61 64 65 01 00 | 00 00 00 86 6a 98 00 00 |XTsade..|....j...|
|00002fd0| 00 00 54 45 58 54 73 61 | 64 65 01 00 00 00 00 86 |..TEXTsa|de......|
|00002fe0| 6a 98 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |j.......|........|
|00002ff0| 00 00 a6 83 2c 40 00 00 | 2e e6 00 00 01 db 46 72 |....,@..|......Fr|
|00003000| 65 65 4c 69 73 74 10 2b | 27 66 49 6e 74 65 72 6e |eeList.+|'fIntern|
|00003010| 61 6c 20 6d 61 6c 6c 6f | 63 20 61 62 6f 72 74 20 |al mallo|c abort |
|00003020| 2d 2d 20 46 72 65 65 4c | 69 73 74 20 6e 6f 74 20 |-- FreeL|ist not |
|00003030| 65 6d 70 74 79 10 22 27 | 92 41 74 74 65 6d 70 74 |empty."'|.Attempt|
|00003040| 20 74 6f 20 66 72 65 65 | 20 61 20 30 20 6f 72 20 | to free| a 0 or |
|00003050| 6f 64 64 20 70 6f 69 6e | 74 65 72 10 2f 27 b6 41 |odd poin|ter./'.A|
|00003060| 74 74 65 6d 70 74 20 74 | 6f 20 66 72 65 65 20 61 |ttempt t|o free a|
|00003070| 6e 20 75 6e 61 6c 6c 6f | 63 61 74 65 64 20 6f 72 |n unallo|cated or|
|00003080| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 a8 fc 18 |...H..Mo|naco....|
|00003090| fc 18 fc 19 7f ff fc 19 | fc 18 fc 19 7f ff 00 03 |........|........|
|000030a0| 00 09 01 a8 7f ff 00 06 | 00 04 00 2a 00 03 01 42 |........|...*...B|
|000030b0| 01 e3 00 2a 00 03 01 42 | 01 e3 a6 83 2c 40 00 00 |...*...B|....,@..|
|000030c0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|000030d0| 00 2a 00 03 01 42 01 e3 | 00 2a 00 03 01 42 01 e3 |.*...B..|.*...B..|
|000030e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030f0| 00 17 01 04 40 03 00 00 | 05 31 2e 34 61 33 0a 53 |....@...|.1.4a3.S|
|00003100| 41 44 45 20 31 2e 34 61 | 33 00 00 01 00 00 00 01 |ADE 1.4a|3.......|
|00003110| 89 00 00 00 89 00 00 00 | 52 00 56 a8 e0 19 b6 00 |........|R.V.....|
|00003120| 00 00 1c 00 52 00 01 4d | 50 53 52 00 01 00 12 76 |....R..M|PSR....v|
|00003130| 65 72 73 00 00 00 2a 03 | ed ff ff 00 00 00 00 00 |ers...*.|........|
|00003140| 00 00 00 03 f0 ff ff 00 | 00 00 4c 00 00 00 00 00 |........|..L.....|
|00003150| 02 ff ff 20 00 00 6e 00 | 56 a9 28 00 00 00 00 00 |... ..n.|V.(.....|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+