home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / xcmd_get.sit / SetPVolume.Pas < prev    next >
MacBinary  |  1988-02-27  |  2.5 KB  |  [TEXT/EDIT]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: SetPVolume.Pas

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert TheDraw Pascal screen Image (image/theDrawPascalScreenImage) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Feb 27 17:14:51 1988, modified Sat Feb 27 17:14:51 1988, creator Macintosh Edit, type ASCII, 1927 bytes "SetPVolume.Pas" , at 0x807 348 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[EDIT]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 53 65 74 50 56 6f | 6c 75 6d 65 2e 50 61 73 |..SetPVo|lume.Pas|
|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 45 44 49 | 54 01 00 00 00 00 00 00 |.TEXTEDI|T.......|
|00000050| 00 00 00 00 00 07 87 00 | 00 01 5c 9e 4c f3 db 9e |........|..\.L...|
|00000060| 4c f3 db 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |L.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 8c 7e 00 00 |........|.....~..|
|00000080| 7b 24 52 2d 7d 0d 7b 0d | 09 53 65 74 50 56 6f 6c |{$R-}.{.|.SetPVol|
|00000090| 75 6d 65 20 2d 2d 20 41 | 6e 20 48 79 70 65 72 43 |ume -- A|n HyperC|
|000000a0| 61 72 64 20 58 43 4d 44 | 20 74 68 61 74 20 77 69 |ard XCMD| that wi|
|000000b0| 6c 6c 20 73 65 74 20 74 | 68 65 20 76 6f 6c 75 6d |ll set t|he volum|
|000000c0| 65 20 6f 66 20 74 68 65 | 20 73 70 65 61 6b 65 72 |e of the| speaker|
|000000d0| 2e 0d 09 09 09 09 09 61 | 6e 64 20 70 6c 61 63 65 |.......a|nd place|
|000000e0| 20 74 68 65 20 6e 65 77 | 20 76 6f 6c 75 6d 65 20 | the new| volume |
|000000f0| 69 6e 74 6f 20 50 61 72 | 61 6d 65 74 65 72 20 52 |into Par|ameter R|
|00000100| 41 4d 2e 20 20 54 68 69 | 73 20 0d 09 09 09 09 09 |AM. Thi|s ......|
|00000110| 72 6f 75 74 69 6e 65 20 | 77 69 6c 6c 20 72 65 73 |routine |will res|
|00000120| 65 74 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 20 70 |et the c|ontrol p|
|00000130| 61 6e 65 6c 27 73 20 76 | 6f 6c 75 6d 65 20 6c 65 |anel's v|olume le|
|00000140| 76 65 6c 2c 0d 09 09 09 | 09 09 73 6f 20 75 73 65 |vel,....|..so use|
|00000150| 20 69 74 20 6f 6e 6c 79 | 20 77 68 65 6e 20 6e 65 | it only| when ne|
|00000160| 63 65 73 73 61 72 79 2e | 0d 09 0d 09 09 57 72 69 |cessary.|.....Wri|
|00000170| 74 74 65 6e 20 62 79 20 | 53 74 65 76 65 6e 20 4b |tten by |Steven K|
|00000180| 69 65 6e 6c 65 2c 20 43 | 49 53 20 61 63 63 6f 75 |ienle, C|IS accou|
|00000190| 6e 74 20 6e 75 6d 62 65 | 72 20 37 32 33 33 30 2c |nt numbe|r 72330,|
|000001a0| 31 31 31 0d 09 0d 09 53 | 65 74 50 56 6f 6c 75 6d |111....S|etPVolum|
|000001b0| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 63 61 6c 6c |e should| be call|
|000001c0| 65 64 20 69 6e 20 48 79 | 70 65 72 43 61 72 64 20 |ed in Hy|perCard |
|000001d0| 61 73 0d 09 09 53 65 74 | 50 56 6f 6c 75 6d 65 28 |as...Set|PVolume(|
|000001e0| 3c 76 6f 6c 75 6d 65 3e | 29 0d 09 57 68 65 72 65 |<volume>|)..Where|
|000001f0| 20 3c 76 6f 6c 75 6d 65 | 3e 20 69 73 20 62 65 74 | <volume|> is bet|
|00000200| 77 65 65 6e 20 30 20 61 | 6e 64 20 37 2e 0d 09 0d |ween 0 a|nd 7....|
|00000210| 09 41 66 74 65 72 20 63 | 6f 6d 70 69 6c 69 6e 67 |.After c|ompiling|
|00000220| 20 74 68 69 73 20 70 72 | 6f 67 72 61 6d 2c 20 6c | this pr|ogram, l|
|00000230| 69 6e 6b 20 69 74 20 77 | 69 74 68 20 74 68 65 20 |ink it w|ith the |
|00000240| 53 65 74 50 56 6f 6c 75 | 6d 65 2e 4c 69 6e 6b 2c |SetPVolu|me.Link,|
|00000250| 20 74 68 65 6e 20 75 73 | 65 0d 09 52 65 73 45 64 | then us|e..ResEd|
|00000260| 69 74 20 74 6f 20 6d 6f | 76 65 20 74 68 65 20 58 |it to mo|ve the X|
|00000270| 43 4d 44 20 72 65 73 6f | 75 72 63 65 20 74 6f 20 |CMD reso|urce to |
|00000280| 74 68 65 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |the appr|opriate |
|00000290| 73 74 61 63 6b 2e 20 20 | 4f 72 20 75 73 65 20 74 |stack. |Or use t|
|000002a0| 68 65 0d 09 47 65 74 56 | 6f 6c 75 6d 65 2f 53 65 |he..GetV|olume/Se|
|000002b0| 74 56 6f 6c 75 6d 65 20 | 73 74 61 63 6b 27 73 20 |tVolume |stack's |
|000002c0| 49 6e 73 74 61 6c 6c 20 | 53 65 74 50 56 6f 6c 75 |Install |SetPVolu|
|000002d0| 6d 65 20 62 75 74 74 6f | 6e 2e 0d 09 0d 09 4e 4f |me butto|n.....NO|
|000002e0| 54 45 3a 20 20 66 6f 72 | 20 74 68 65 20 58 43 6d |TE: for| the XCm|
|000002f0| 64 47 6c 75 65 2e 69 6e | 63 20 66 69 6c 65 20 74 |dGlue.in|c file t|
|00000300| 6f 20 77 6f 72 6b 20 77 | 69 74 68 20 54 4d 4c 20 |o work w|ith TML |
|00000310| 50 61 73 63 61 6c 2c 20 | 61 20 66 65 77 20 0d 09 |Pascal, |a few ..|
|00000320| 09 20 20 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |. modi|fication|
|00000330| 73 20 61 72 65 20 72 65 | 71 75 69 72 65 64 2e 0d |s are re|quired..|
|00000340| 7d 0d 0d 7b 24 53 20 53 | 65 74 50 56 6f 6c 75 6d |}..{$S S|etPVolum|
|00000350| 65 20 7d 20 09 7b 20 53 | 65 67 6d 65 6e 74 20 6e |e } .{ S|egment n|
|00000360| 61 6d 65 20 6d 75 73 74 | 20 62 65 20 74 68 65 20 |ame must| be the |
|00000370| 73 61 6d 65 20 61 73 20 | 74 68 65 20 63 6f 6d 6d |same as |the comm|
|00000380| 61 6e 64 20 6e 61 6d 65 | 2e 20 7d 0d 0d 55 4e 49 |and name|. }..UNI|
|00000390| 54 20 44 75 6d 6d 79 55 | 6e 69 74 3b 0d 0d 49 4e |T DummyU|nit;..IN|
|000003a0| 54 45 52 46 41 43 45 0d | 0d 55 53 45 53 20 4d 61 |TERFACE.|.USES Ma|
|000003b0| 63 49 6e 74 66 2c 20 48 | 79 70 65 72 58 43 6d 64 |cIntf, H|yperXCmd|
|000003c0| 3b 0d 0d 50 52 4f 43 45 | 44 55 52 45 20 45 4e 54 |;..PROCE|DURE ENT|
|000003d0| 52 59 50 4f 49 4e 54 28 | 70 61 72 61 6d 50 74 72 |RYPOINT(|paramPtr|
|000003e0| 3a 20 58 43 6d 64 50 74 | 72 29 3b 0d 09 0d 49 4d |: XCmdPt|r);...IM|
|000003f0| 50 4c 45 4d 45 4e 54 41 | 54 49 4f 4e 0d 0d 50 52 |PLEMENTA|TION..PR|
|00000400| 4f 43 45 44 55 52 45 20 | 53 65 74 50 56 6f 6c 75 |OCEDURE |SetPVolu|
|00000410| 6d 65 28 70 61 72 61 6d | 50 74 72 3a 20 58 43 6d |me(param|Ptr: XCm|
|00000420| 64 50 74 72 29 3b 20 46 | 4f 52 57 41 52 44 3b 0d |dPtr); F|ORWARD;.|
|00000430| 0d 20 20 50 52 4f 43 45 | 44 55 52 45 20 45 4e 54 |. PROCE|DURE ENT|
|00000440| 52 59 50 4f 49 4e 54 28 | 70 61 72 61 6d 50 74 72 |RYPOINT(|paramPtr|
|00000450| 3a 20 58 43 6d 64 50 74 | 72 29 3b 0d 20 20 42 45 |: XCmdPt|r);. BE|
|00000460| 47 49 4e 0d 20 20 20 20 | 53 65 74 50 56 6f 6c 75 |GIN. |SetPVolu|
|00000470| 6d 65 28 70 61 72 61 6d | 50 74 72 29 3b 0d 20 20 |me(param|Ptr);. |
|00000480| 45 4e 44 3b 0d 0d 50 52 | 4f 43 45 44 55 52 45 20 |END;..PR|OCEDURE |
|00000490| 53 65 74 50 56 6f 6c 75 | 6d 65 28 70 61 72 61 6d |SetPVolu|me(param|
|000004a0| 50 74 72 3a 20 58 43 6d | 64 50 74 72 29 3b 0d 09 |Ptr: XCm|dPtr);..|
|000004b0| 56 41 52 0d 09 09 6e 65 | 77 56 6f 6c 75 6d 65 20 |VAR...ne|wVolume |
|000004c0| 3a 20 4c 6f 6e 67 49 6e | 74 20 3b 0d 09 09 70 61 |: LongIn|t ;...pa|
|000004d0| 73 53 74 72 20 3a 20 53 | 74 72 32 35 35 20 3b 0d |sStr : S|tr255 ;.|
|000004e0| 09 09 74 65 6d 70 53 74 | 72 20 3a 20 53 74 72 33 |..tempSt|r : Str3|
|000004f0| 31 20 3b 0d 09 09 74 68 | 65 50 61 72 61 6d 73 20 |1 ;...th|eParams |
|00000500| 3a 20 53 79 73 50 50 74 | 72 20 3b 0d 09 09 74 68 |: SysPPt|r ;...th|
|00000510| 65 45 72 72 6f 72 20 3a | 20 4f 53 45 72 72 20 3b |eError :| OSErr ;|
|00000520| 0d 09 09 54 6f 70 35 2c | 20 42 6f 74 74 6f 6d 38 |...Top5,| Bottom8|
|00000530| 2c 20 56 6f 6c 42 69 74 | 73 20 3a 20 49 6e 74 65 |, VolBit|s : Inte|
|00000540| 67 65 72 20 3b 0d 0d 09 | 7b 24 49 20 58 43 6d 64 |ger ;...|{$I XCmd|
|00000550| 47 6c 75 65 2e 69 6e 63 | 20 7d 0d 0d 09 42 45 47 |Glue.inc| }...BEG|
|00000560| 49 4e 0d 09 09 5a 65 72 | 6f 54 6f 50 61 73 28 70 |IN...Zer|oToPas(p|
|00000570| 61 72 61 6d 50 74 72 5e | 2e 70 61 72 61 6d 73 5b |aramPtr^|.params[|
|00000580| 31 5d 5e 2c 70 61 73 53 | 74 72 29 20 3b 09 7b 20 |1]^,pasS|tr) ;.{ |
|00000590| 66 69 72 73 74 20 70 61 | 72 61 6d 20 69 73 20 56 |first pa|ram is V|
|000005a0| 6f 6c 75 6d 65 20 7d 0d | 09 09 74 65 6d 70 53 74 |olume }.|..tempSt|
|000005b0| 72 20 3a 3d 20 70 61 73 | 53 74 72 20 3b 0d 09 09 |r := pas|Str ;...|
|000005c0| 6e 65 77 56 6f 6c 75 6d | 65 20 3a 3d 20 53 74 72 |newVolum|e := Str|
|000005d0| 54 6f 4e 75 6d 28 74 65 | 6d 70 53 74 72 29 20 3b |ToNum(te|mpStr) ;|
|000005e0| 7b 20 43 6f 6e 76 65 72 | 74 20 69 74 20 74 6f 20 |{ Conver|t it to |
|000005f0| 61 20 4e 75 6d 62 65 72 | 20 7d 0d 09 09 0d 09 09 |a Number| }......|
|00000600| 09 7b 20 52 65 73 65 74 | 20 74 68 65 20 56 6f 6c |.{ Reset| the Vol|
|00000610| 75 6d 65 20 69 6e 20 74 | 68 65 20 50 61 72 61 6d |ume in t|he Param|
|00000620| 65 74 65 72 20 52 41 4d | 20 7d 0d 09 09 09 0d 09 |eter RAM| }......|
|00000630| 09 74 68 65 50 61 72 61 | 6d 73 20 3a 3d 20 47 65 |.thePara|ms := Ge|
|00000640| 74 53 79 73 50 50 74 72 | 20 3b 0d 09 09 42 6f 74 |tSysPPtr| ;...Bot|
|00000650| 74 6f 6d 38 20 3a 3d 20 | 42 69 74 41 6e 64 28 74 |tom8 := |BitAnd(t|
|00000660| 68 65 50 61 72 61 6d 73 | 5e 2e 76 6f 6c 43 6c 69 |heParams|^.volCli|
|00000670| 6b 2c 24 30 30 46 46 29 | 20 3b 0d 09 09 54 6f 70 |k,$00FF)| ;...Top|
|00000680| 35 20 3a 3d 20 42 69 74 | 41 6e 64 28 74 68 65 50 |5 := Bit|And(theP|
|00000690| 61 72 61 6d 73 5e 2e 76 | 6f 6c 43 6c 69 6b 2c 20 |arams^.v|olClik, |
|000006a0| 24 46 38 30 30 29 20 3b | 0d 09 09 56 6f 6c 42 69 |$F800) ;|...VolBi|
|000006b0| 74 73 20 3a 3d 20 6e 65 | 77 56 6f 6c 75 6d 65 20 |ts := ne|wVolume |
|000006c0| 2a 20 24 30 31 30 30 20 | 3b 0d 09 09 74 68 65 50 |* $0100 |;...theP|
|000006d0| 61 72 61 6d 73 5e 2e 76 | 6f 6c 43 6c 69 6b 20 3a |arams^.v|olClik :|
|000006e0| 3d 20 54 6f 70 35 20 2b | 20 56 6f 6c 42 69 74 73 |= Top5 +| VolBits|
|000006f0| 20 2b 20 42 6f 74 74 6f | 6d 38 20 3b 0d 09 09 74 | + Botto|m8 ;...t|
|00000700| 68 65 45 72 72 6f 72 20 | 3a 3d 20 57 72 69 74 65 |heError |:= Write|
|00000710| 50 61 72 61 6d 20 3b 0d | 09 09 0d 09 09 09 7b 20 |Param ;.|......{ |
|00000720| 49 66 20 74 68 65 72 65 | 20 77 61 73 20 61 6e 20 |If there| was an |
|00000730| 65 72 72 6f 72 2c 20 6c | 65 74 20 74 68 65 20 75 |error, l|et the u|
|00000740| 73 65 72 20 6b 6e 6f 77 | 20 7d 0d 09 09 09 0d 09 |ser know| }......|
|00000750| 09 49 66 20 74 68 65 45 | 72 72 6f 72 20 3c 3e 20 |.If theE|rror <> |
|00000760| 6e 6f 45 72 72 20 74 68 | 65 6e 0d 09 09 09 53 65 |noErr th|en....Se|
|00000770| 6e 64 43 61 72 64 4d 65 | 73 73 61 67 65 28 27 61 |ndCardMe|ssage('a|
|00000780| 6e 73 77 65 72 20 22 42 | 69 67 20 54 72 6f 75 62 |nswer "B|ig Troub|
|00000790| 6c 65 20 77 69 74 68 20 | 77 72 69 74 69 6e 67 20 |le with |writing |
|000007a0| 50 61 72 61 6d 65 74 65 | 72 20 52 61 6d 22 20 77 |Paramete|r Ram" w|
|000007b0| 69 74 68 20 22 4f 4b 22 | 27 29 20 3b 0d 09 09 0d |ith "OK"|') ;....|
|000007c0| 09 09 53 65 74 53 6f 75 | 6e 64 56 6f 6c 20 28 6e |..SetSou|ndVol (n|
|000007d0| 65 77 56 6f 6c 75 6d 65 | 29 20 3b 20 09 09 09 09 |ewVolume|) ; ....|
|000007e0| 7b 20 53 65 74 20 74 68 | 65 20 43 75 72 72 65 6e |{ Set th|e Curren|
|000007f0| 74 20 56 6f 6c 75 6d 65 | 20 7d 0d 09 45 4e 44 3b |t Volume| }..END;|
|00000800| 0d 0d 45 4e 44 2e 0d 00 | 00 00 00 00 00 00 00 00 |..END...|........|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 01 00 00 00 01 16 | 00 00 00 16 00 00 00 46 |........|.......F|
|00000890| 00 00 04 0b 05 4d 6f 75 | 73 65 02 00 00 00 63 64 |.....Mou|se....cd|
|000008a0| 65 76 6d 6f 75 73 21 00 | 00 14 00 00 00 00 00 00 |evmous!.|........|
|000008b0| 0e 53 65 74 50 56 6f 6c | 75 6d 65 2e 50 61 73 6d |.SetPVol|ume.Pasm|
|000008c0| 02 00 00 00 54 45 58 54 | 45 44 49 54 01 00 00 40 |....TEXT|EDIT...@|
|000008d0| 00 00 54 45 58 54 45 44 | 49 54 01 00 00 40 00 40 |..TEXTED|IT...@.@|
|000008e0| 00 00 00 84 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 9e 4c 2e 34 00 00 | 07 87 00 00 01 5c 00 00 |...L.4..|.....\..|
|00000900| 11 00 00 00 04 0b 0b 4d | 75 6c 74 69 46 69 6e 64 |.......M|ultiFind|
|00000910| 65 72 02 00 00 00 5a 53 | 59 53 4d 41 43 53 11 00 |er....ZS|YSMACS..|
|00000920| 00 00 00 c0 00 00 00 00 | 04 36 00 00 00 00 00 00 |........|.6......|
|00000930| 00 00 00 00 00 00 00 00 | d9 f8 00 00 da 00 9d 91 |........|........|
|00000940| 2e c0 9d 91 2e c0 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 04 87 00 6d 00 00 00 00 |........|...m....|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 0a 00 09 06 4d | 6f 6e 61 63 6f 08 00 00 |.......M|onaco...|
|00000990| 00 04 00 06 00 04 00 00 | 01 00 00 00 01 16 00 00 |........|........|
|000009a0| 00 16 00 00 00 46 00 14 | 2b 0c 06 fc 00 00 00 1c |.....F..|+.......|
|000009b0| 00 46 00 01 45 46 4e 54 | 00 00 00 12 45 54 41 42 |.F..EFNT|....ETAB|
|000009c0| 00 00 00 1e 03 eb ff ff | 00 00 00 00 00 14 37 a6 |........|......7.|
|000009d0| 03 ec ff ff 00 00 00 0e | 00 14 37 ae 00 00 00 00 |........|..7.....|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+