home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1989-03-15 | 2.3 KB | [TEXT/MPS ] |
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: shortfixunit.p
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| ZX81 Sinclair BASIC (image/sinclairBASIC)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Mar 15 17:00:50 1989, modified Wed Mar 15 17:00:50 1989, creator 'MPS ', type ASCII, 1705 bytes "shortfixunit.p" , at 0x729 382 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 73 68 6f 72 74 66 | 69 78 75 6e 69 74 2e 70 |..shortf|ixunit.p|
|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 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 06 a9 00 | 00 01 7e a0 44 8d 92 a0 |........|..~.D...|
|00000060| 44 8d 92 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |D.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3e a6 00 00 |........|....>...|
|00000080| 75 6e 69 74 20 73 68 6f | 72 74 66 69 78 75 6e 69 |unit sho|rtfixuni|
|00000090| 74 3b 0d 7b 20 46 69 78 | 65 64 20 70 6f 69 6e 74 |t;.{ Fix|ed point|
|000000a0| 20 77 69 74 68 20 46 72 | 61 63 74 69 6f 6e 61 6c | with Fr|actional|
|000000b0| 20 70 61 72 74 20 63 6f | 6d 70 75 74 61 74 69 6f | part co|mputatio|
|000000c0| 6e 20 75 73 69 6e 67 20 | 73 68 6f 72 74 20 69 6e |n using |short in|
|000000d0| 74 65 67 65 72 73 7d 0d | 69 6e 74 65 72 66 61 63 |tegers}.|interfac|
|000000e0| 65 0d 75 73 65 73 20 6d | 65 6d 74 79 70 65 73 2c |e.uses m|emtypes,|
|000000f0| 71 75 69 63 6b 64 72 61 | 77 2c 6f 73 69 6e 74 66 |quickdra|w,osintf|
|00000100| 2c 74 6f 6f 6c 69 6e 74 | 66 2c 70 61 63 6b 69 6e |,toolint|f,packin|
|00000110| 74 66 2c 66 69 78 6d 61 | 74 68 3b 0d 63 6f 6e 73 |tf,fixma|th;.cons|
|00000120| 74 09 73 68 6f 72 74 66 | 69 78 5f 66 72 61 63 74 |t.shortf|ix_fract|
|00000130| 69 6f 6e 5f 64 69 67 69 | 74 73 3d 31 32 3b 0d 09 |ion_digi|ts=12;..|
|00000140| 09 6d 61 78 73 68 6f 72 | 74 66 69 78 61 72 72 61 |.maxshor|tfixarra|
|00000150| 79 3d 24 33 46 46 46 3b | 0d 09 09 73 68 6f 72 74 |y=$3FFF;|...short|
|00000160| 66 69 78 62 69 74 73 3d | 31 36 3b 0d 09 09 73 68 |fixbits=|16;...sh|
|00000170| 6f 72 74 66 69 78 62 79 | 74 65 73 3d 32 3b 0d 09 |ortfixby|tes=2;..|
|00000180| 09 0d 74 79 70 65 09 73 | 68 6f 72 74 66 69 78 3d |..type.s|hortfix=|
|00000190| 69 6e 74 65 67 65 72 3b | 0d 09 09 73 68 6f 72 74 |integer;|...short|
|000001a0| 66 69 78 61 72 72 61 79 | 3d 61 72 72 61 79 5b 31 |fixarray|=array[1|
|000001b0| 2e 2e 6d 61 78 73 68 6f | 72 74 66 69 78 61 72 72 |..maxsho|rtfixarr|
|000001c0| 61 79 5d 20 6f 66 20 73 | 68 6f 72 74 66 69 78 3b |ay] of s|hortfix;|
|000001d0| 0d 09 09 73 68 6f 72 74 | 66 69 78 61 72 72 61 79 |...short|fixarray|
|000001e0| 70 74 72 3d 5e 73 68 6f | 72 74 66 69 78 61 72 72 |ptr=^sho|rtfixarr|
|000001f0| 61 79 3b 0d 09 09 73 68 | 6f 72 74 66 69 78 61 72 |ay;...sh|ortfixar|
|00000200| 72 61 79 68 61 6e 64 6c | 65 3d 5e 73 68 6f 72 74 |rayhandl|e=^short|
|00000210| 66 69 78 61 72 72 61 79 | 3b 0d 0d 09 66 75 6e 63 |fixarray|;...func|
|00000220| 74 69 6f 6e 20 73 66 69 | 78 6d 75 6c 28 69 2c 6a |tion sfi|xmul(i,j|
|00000230| 3a 73 68 6f 72 74 66 69 | 78 29 3a 73 68 6f 72 74 |:shortfi|x):short|
|00000240| 66 69 78 3b 0d 09 66 75 | 6e 63 74 69 6f 6e 20 73 |fix;..fu|nction s|
|00000250| 66 69 78 64 69 76 28 69 | 2c 6a 3a 73 68 6f 72 74 |fixdiv(i|,j:short|
|00000260| 66 69 78 29 3a 73 68 6f | 72 74 66 69 78 3b 0d 09 |fix):sho|rtfix;..|
|00000270| 66 75 6e 63 74 69 6f 6e | 20 73 66 69 78 32 78 28 |function| sfix2x(|
|00000280| 69 3a 73 68 6f 72 74 66 | 69 78 29 3a 65 78 74 65 |i:shortf|ix):exte|
|00000290| 6e 64 65 64 3b 0d 09 66 | 75 6e 63 74 69 6f 6e 20 |nded;..f|unction |
|000002a0| 78 32 73 66 69 78 28 78 | 3a 65 78 74 65 6e 64 65 |x2sfix(x|:extende|
|000002b0| 64 29 3a 73 68 6f 72 74 | 66 69 78 3b 0d 09 66 75 |d):short|fix;..fu|
|000002c0| 6e 63 74 69 6f 6e 20 6c | 6f 6e 67 32 73 66 69 78 |nction l|ong2sfix|
|000002d0| 28 6c 3a 6c 6f 6e 67 69 | 6e 74 29 3a 73 68 6f 72 |(l:longi|nt):shor|
|000002e0| 74 66 69 78 3b 0d 09 66 | 75 6e 63 74 69 6f 6e 20 |tfix;..f|unction |
|000002f0| 73 66 69 78 32 6c 6f 6e | 67 28 69 3a 73 68 6f 72 |sfix2lon|g(i:shor|
|00000300| 74 66 69 78 29 3a 6c 6f | 6e 67 69 6e 74 3b 0d 0d |tfix):lo|ngint;..|
|00000310| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 0d 7b |implemen|tation.{|
|00000320| 64 69 66 66 65 72 65 6e | 63 65 20 69 6e 20 74 68 |differen|ce in th|
|00000330| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 66 72 61 63 |e number| of frac|
|00000340| 74 69 6f 6e 61 6c 20 64 | 69 67 69 74 73 7d 0d 63 |tional d|igits}.c|
|00000350| 6f 6e 73 74 20 73 68 6f | 72 74 5f 66 75 6c 6c 5f |onst sho|rt_full_|
|00000360| 64 69 67 69 74 5f 64 69 | 66 66 3d 34 3b 0d 0d 66 |digit_di|ff=4;..f|
|00000370| 75 6e 63 74 69 6f 6e 20 | 73 66 69 78 6d 75 6c 28 |unction |sfixmul(|
|00000380| 69 2c 6a 3a 73 68 6f 72 | 74 66 69 78 29 3a 73 68 |i,j:shor|tfix):sh|
|00000390| 6f 72 74 66 69 78 3b 0d | 7b 20 6f 70 65 72 61 6e |ortfix;.|{ operan|
|000003a0| 64 73 3a 0d 20 20 78 78 | 78 78 2e 64 64 64 64 20 |ds:. xx|xx.dddd |
|000003b0| 64 64 64 64 20 64 64 64 | 64 0d 20 20 33 32 20 62 |dddd ddd|d. 32 b|
|000003c0| 69 74 20 70 72 6f 64 75 | 63 74 3a 0d 20 20 79 79 |it produ|ct:. yy|
|000003d0| 79 79 20 79 79 79 79 20 | 64 64 64 64 20 64 64 64 |yy yyyy |dddd ddd|
|000003e0| 64 20 64 64 64 64 20 64 | 64 64 64 20 64 64 64 64 |d dddd d|ddd dddd|
|000003f0| 20 64 64 64 64 0d 7d 0d | 62 65 67 69 6e 0d 73 66 | dddd.}.|begin.sf|
|00000400| 69 78 6d 75 6c 3a 3d 4c | 6f 57 72 64 28 42 73 72 |ixmul:=L|oWrd(Bsr|
|00000410| 28 6c 6f 6e 67 69 6e 74 | 28 69 29 2a 6c 6f 6e 67 |(longint|(i)*long|
|00000420| 69 6e 74 28 6a 29 2c 73 | 68 6f 72 74 66 69 78 5f |int(j),s|hortfix_|
|00000430| 66 72 61 63 74 69 6f 6e | 5f 64 69 67 69 74 73 29 |fraction|_digits)|
|00000440| 29 0d 65 6e 64 3b 0d 0d | 66 75 6e 63 74 69 6f 6e |).end;..|function|
|00000450| 20 73 66 69 78 64 69 76 | 28 69 2c 6a 3a 73 68 6f | sfixdiv|(i,j:sho|
|00000460| 72 74 66 69 78 29 3a 73 | 68 6f 72 74 66 69 78 3b |rtfix):s|hortfix;|
|00000470| 0d 7b 20 6f 70 65 72 61 | 6e 64 73 3a 0d 20 20 78 |.{ opera|nds:. x|
|00000480| 78 78 78 2e 64 64 64 64 | 20 64 64 64 64 20 64 64 |xxx.dddd| dddd dd|
|00000490| 64 64 0d 20 20 73 68 69 | 66 74 20 6e 75 6d 65 72 |dd. shi|ft numer|
|000004a0| 61 74 6f 72 20 62 65 66 | 6f 72 65 20 64 69 76 69 |ator bef|ore divi|
|000004b0| 64 65 0d 20 20 78 78 78 | 78 2e 64 64 64 64 20 64 |de. xxx|x.dddd d|
|000004c0| 64 64 64 20 64 64 64 64 | 20 30 30 30 30 20 30 30 |ddd dddd| 0000 00|
|000004d0| 30 30 20 30 30 30 30 0d | 7d 0d 62 65 67 69 6e 0d |00 0000.|}.begin.|
|000004e0| 73 66 69 78 64 69 76 3a | 3d 4c 6f 57 72 64 28 42 |sfixdiv:|=LoWrd(B|
|000004f0| 73 6c 28 6c 6f 6e 67 69 | 6e 74 28 69 29 2c 73 68 |sl(longi|nt(i),sh|
|00000500| 6f 72 74 66 69 78 5f 66 | 72 61 63 74 69 6f 6e 5f |ortfix_f|raction_|
|00000510| 64 69 67 69 74 73 29 20 | 64 69 76 20 6c 6f 6e 67 |digits) |div long|
|00000520| 69 6e 74 28 6a 29 29 3b | 0d 65 6e 64 3b 0d 0d 66 |int(j));|.end;..f|
|00000530| 75 6e 63 74 69 6f 6e 20 | 73 66 69 78 32 78 28 69 |unction |sfix2x(i|
|00000540| 3a 73 68 6f 72 74 66 69 | 78 29 3a 65 78 74 65 6e |:shortfi|x):exten|
|00000550| 64 65 64 3b 0d 7b 73 68 | 69 66 74 20 6c 65 66 74 |ded;.{sh|ift left|
|00000560| 20 61 6e 64 20 63 6f 6e | 76 65 72 74 20 66 72 6f | and con|vert fro|
|00000570| 6d 20 66 69 78 65 64 20 | 74 6f 20 65 78 74 65 6e |m fixed |to exten|
|00000580| 64 65 64 7d 0d 62 65 67 | 69 6e 0d 73 66 69 78 32 |ded}.beg|in.sfix2|
|00000590| 78 3a 3d 66 69 78 32 78 | 28 66 69 78 65 64 28 6c |x:=fix2x|(fixed(l|
|000005a0| 6f 6e 67 69 6e 74 28 62 | 73 6c 28 69 2c 73 68 6f |ongint(b|sl(i,sho|
|000005b0| 72 74 5f 66 75 6c 6c 5f | 64 69 67 69 74 5f 64 69 |rt_full_|digit_di|
|000005c0| 66 66 29 29 29 29 3b 0d | 65 6e 64 3b 0d 0d 66 75 |ff))));.|end;..fu|
|000005d0| 6e 63 74 69 6f 6e 20 78 | 32 73 66 69 78 28 78 3a |nction x|2sfix(x:|
|000005e0| 65 78 74 65 6e 64 65 64 | 29 3a 73 68 6f 72 74 66 |extended|):shortf|
|000005f0| 69 78 3b 0d 7b 63 6f 6e | 76 65 72 74 20 74 6f 20 |ix;.{con|vert to |
|00000600| 66 69 78 65 64 20 61 6e | 64 20 73 68 69 66 74 20 |fixed an|d shift |
|00000610| 72 69 67 68 74 7d 0d 62 | 65 67 69 6e 0d 78 32 73 |right}.b|egin.x2s|
|00000620| 66 69 78 3a 3d 4c 6f 57 | 72 64 28 42 73 72 28 78 |fix:=LoW|rd(Bsr(x|
|00000630| 32 66 69 78 28 78 29 2c | 73 68 6f 72 74 5f 66 75 |2fix(x),|short_fu|
|00000640| 6c 6c 5f 64 69 67 69 74 | 5f 64 69 66 66 29 29 3b |ll_digit|_diff));|
|00000650| 0d 65 6e 64 3b 0d 0d 66 | 75 6e 63 74 69 6f 6e 20 |.end;..f|unction |
|00000660| 6c 6f 6e 67 32 73 66 69 | 78 28 6c 3a 6c 6f 6e 67 |long2sfi|x(l:long|
|00000670| 69 6e 74 29 3a 73 68 6f | 72 74 66 69 78 3b 0d 62 |int):sho|rtfix;.b|
|00000680| 65 67 69 6e 0d 6c 6f 6e | 67 32 73 66 69 78 3a 3d |egin.lon|g2sfix:=|
|00000690| 4c 6f 57 72 64 28 42 73 | 6c 28 6c 2c 73 68 6f 72 |LoWrd(Bs|l(l,shor|
|000006a0| 74 66 69 78 5f 66 72 61 | 63 74 69 6f 6e 5f 64 69 |tfix_fra|ction_di|
|000006b0| 67 69 74 73 29 29 3b 0d | 65 6e 64 3b 0d 0d 66 75 |gits));.|end;..fu|
|000006c0| 6e 63 74 69 6f 6e 20 73 | 66 69 78 32 6c 6f 6e 67 |nction s|fix2long|
|000006d0| 28 69 3a 73 68 6f 72 74 | 66 69 78 29 3a 6c 6f 6e |(i:short|fix):lon|
|000006e0| 67 69 6e 74 3b 0d 62 65 | 67 69 6e 0d 73 66 69 78 |gint;.be|gin.sfix|
|000006f0| 32 6c 6f 6e 67 3a 3d 69 | 6e 74 65 67 65 72 28 62 |2long:=i|nteger(b|
|00000700| 73 72 28 69 2c 73 68 6f | 72 74 66 69 78 5f 66 72 |sr(i,sho|rtfix_fr|
|00000710| 61 63 74 69 6f 6e 5f 64 | 69 67 69 74 73 29 29 0d |action_d|igits)).|
|00000720| 65 6e 64 3b 0d 65 6e 64 | 2e 00 00 00 00 00 00 00 |end;.end|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000790| 08 2c 00 06 00 0e 66 54 | 2f 2c 00 0a 48 6e ff f2 |.,....fT|/,..Hn..|
|000007a0| 48 6e ff f6 4e ad 08 2a | 20 2e ff f6 90 ae ff f2 |Hn..N..*| .......|
|000007b0| 0e 73 68 6f 72 74 66 69 | 78 75 6e 69 74 2e 70 2d |.shortfi|xunit.p-|
|000007c0| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 00 80 |....TEXT|MPS ....|
|000007d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 80 00 c0 |..TEXTMP|S ......|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 a0 44 23 83 00 00 | 06 a9 00 00 01 7e 48 c0 |...D#...|.....~H.|
|00000800| d0 87 2f 00 4e ba fe e6 | 26 6b 00 14 60 e4 4a ac |../.N...|&k..`.J.|
|00000810| 00 0e 67 0e 20 6c 00 0e | 2f 28 00 0a 2f 07 4e ba |..g. l..|/(../.N.|
|00000820| fe 02 4c df 18 c0 4e 5e | 20 5f 50 4f 4e d0 da 45 |..L...N^| _PON..E|
|00000830| 52 4f 46 49 4c 45 00 00 | 4e 56 00 00 2f 0c 4a ae |ROFILE..|NV../.J.|
|00000840| 00 08 67 38 28 6e 00 08 | 2f 2c 00 0c 4e ba ff ea |..g8(n..|/,..N...|
|00000850| 4a 14 57 c0 72 02 b2 2c | 00 1c 57 c1 c0 01 4a ac |J.W.r..,|..W...J.|
|00000860| 00 24 5d c1 c0 01 67 0c | 2f 2c 00 18 2f 2c 00 24 |.$]...g.|/,../,.$|
|00000870| 4e ba fe 7a 2f 2c 00 10 | 4e ba ff be 28 5f 4e 5e |N..z/,..|N...(_N^|
|00000880| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 0a 80 01 |...H..Mo|naco....|
|00000890| 80 01 7f ff 7f ff 80 00 | 00 12 00 01 02 c6 00 0a |........|........|
|000008a0| 00 50 00 57 00 5b 00 06 | 00 04 00 69 00 14 01 6c |.P.W.[..|...i...l|
|000008b0| 01 f1 00 69 00 14 01 6c | 01 f1 a0 44 55 52 00 00 |...i...l|...DUR..|
|000008c0| 00 61 00 00 00 61 00 00 | 00 00 01 00 00 00 01 00 |.a...a..|........|
|000008d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 02 2e b0 |...L...L|...2....|
|000008e0| 03 50 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.P.....2|..MPSR..|
|000008f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 03 30 ce 00 00 |........|....0...|
+--------+-------------------------+-------------------------+--------+--------+