home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 361 / OPLPLUS.SIS / OPPManual < prev    next >
Unknown  |  1998-10-04  |  51.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Psion Series 3 Word Document (document/epocWord) magic Supported
100% file Psion Series 5 Word file default
99% file data default
49% TrID EPOC Word document default
40% TrID Psion Serie 5/EPOC Word document default
10% TrID EPOC data store (gen) default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 37 00 00 10 6d 00 00 10 | 7f 00 00 10 fe 9f 08 55 |7...m...|.......U|
|00000010| 08 cc 00 00 02 00 00 00 | 00 00 16 00 00 00 20 03 |........|...... .|
|00000020| 00 00 0e 00 00 00 05 00 | 07 c7 00 00 00 08 00 0a |........|........|
|00000030| 64 00 00 00 2b 00 00 00 | 19 00 00 00 1a ff ff ff |d...+...|........|
|00000040| 21 00 20 00 1c f0 00 00 | 00 1d 00 1e 00 1f 00 22 |!. .....|......."|
|00000050| 10 54 69 6d 65 73 20 4e | 65 77 20 52 6f 6d 61 6e |.Times N|ew Roman|
|00000060| 03 24 00 4e 00 00 00 13 | 31 00 00 00 32 00 00 00 |.$.N....|1...2...|
|00000070| 33 00 00 00 4c 00 00 00 | 00 00 00 00 00 00 00 00 |3...L...|........|
|00000080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 10 26 48 65 | 61 64 69 6e 67 20 31 4c |.....&He|ading 1L|
|000000c0| 00 00 10 00 00 00 00 2b | 00 00 00 19 00 00 00 1a |.......+|........|
|000000d0| ff ff ff 21 00 20 00 1c | 18 01 00 00 1d 00 1e 01 |...!. ..|........|
|000000e0| 1f 00 22 10 54 69 6d 65 | 73 20 4e 65 77 20 52 6f |..".Time|s New Ro|
|000000f0| 6d 61 6e 03 24 00 4c 00 | 00 00 02 00 00 00 00 03 |man.$.L.|........|
|00000100| 00 00 00 00 04 c9 fd ff | ff 05 00 07 f0 00 00 00 |........|........|
|00000110| 08 00 09 f0 00 00 00 0a | 3c 00 00 00 0c 01 11 00 |........|<.......|
|00000120| 00 00 00 00 00 00 00 01 | 12 00 00 00 00 00 00 00 |........|........|
|00000130| 00 01 13 00 00 00 00 00 | 00 00 00 01 14 00 00 00 |........|........|
|00000140| 00 00 00 00 00 01 26 48 | 65 61 64 69 6e 67 20 32 |......&H|eading 2|
|00000150| 4c 00 00 10 00 00 00 00 | 2b 00 00 00 19 00 00 00 |L.......|+.......|
|00000160| 1a ff ff ff 21 00 20 00 | 1c f0 00 00 00 1d 00 1e |....!. .|........|
|00000170| 01 1f 00 22 10 54 69 6d | 65 73 20 4e 65 77 20 52 |...".Tim|es New R|
|00000180| 6f 6d 61 6e 03 24 00 4c | 00 00 00 02 00 00 00 00 |oman.$.L|........|
|00000190| 03 00 00 00 00 04 07 00 | 00 00 05 00 07 f0 00 00 |........|........|
|000001a0| 00 08 00 09 f0 00 00 00 | 0a 3c 00 00 00 0c 01 11 |........|.<......|
|000001b0| 00 00 00 00 00 00 00 00 | 01 12 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 01 13 00 00 00 00 | 00 00 00 00 01 14 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 01 26 | 48 65 61 64 69 6e 67 20 |.......&|Heading |
|000001e0| 33 4c 00 00 10 00 00 00 | 00 2b 00 00 00 19 00 00 |3L......|.+......|
|000001f0| 00 1a ff ff ff 21 00 20 | 01 1c f0 00 00 00 1d 00 |.....!. |........|
|00000200| 1e 00 1f 00 22 10 54 69 | 6d 65 73 20 4e 65 77 20 |....".Ti|mes New |
|00000210| 52 6f 6d 61 6e 03 24 00 | 4a 00 00 00 02 00 00 00 |Roman.$.|J.......|
|00000220| 00 03 00 00 00 00 04 00 | 00 00 00 05 00 07 f0 00 |........|........|
|00000230| 00 00 08 00 09 00 00 00 | 00 0a 00 00 00 00 11 00 |........|........|
|00000240| 00 00 00 00 00 00 00 01 | 12 00 00 00 00 00 00 00 |........|........|
|00000250| 00 01 13 00 00 00 00 00 | 00 00 00 01 14 00 00 00 |........|........|
|00000260| 00 00 00 00 00 01 2e 42 | 75 6c 6c 65 74 20 6c 69 |.......B|ullet li|
|00000270| 73 74 4f 00 00 10 00 00 | 00 00 00 00 00 00 19 00 |stO.....|........|
|00000280| 00 00 04 1b 01 00 00 0c | 01 15 10 b3 00 00 00 95 |........|........|
|00000290| 01 00 00 00 06 53 77 69 | 73 73 00 12 43 6f 64 65 |.....Swi|ss..Code|
|000002a0| 00 00 00 00 00 00 00 00 | 1a 00 00 00 21 00 20 00 |........|....!. .|
|000002b0| 1d 00 1e 00 1f 00 22 0c | 43 6f 75 72 69 65 72 20 |......".|Courier |
|000002c0| 4e 65 77 02 24 00 13 00 | 00 00 02 c5 02 00 00 07 |New.$...|........|
|000002d0| f0 00 00 00 08 00 0a 00 | 00 00 00 0b 01 36 4c 69 |........|.....6Li|
|000002e0| 73 74 20 42 75 6c 6c 65 | 74 20 32 00 00 00 00 00 |st Bulle|t 2.....|
|000002f0| 00 00 00 0c 00 00 00 21 | 00 20 00 1d 00 1e 00 1f |.......!|. ......|
|00000300| 00 24 00 0c 00 00 00 07 | f0 00 00 00 08 00 0a 00 |.$......|........|
|00000310| 00 00 00 1a 4c 69 73 74 | 20 32 00 00 00 00 00 00 |....List| 2......|
|00000320| 00 00 0c 00 00 00 21 00 | 20 00 1d 00 1e 00 1f 00 |......!.| .......|
|00000330| 24 00 16 00 00 00 02 36 | 02 00 00 04 e5 fe ff ff |$......6|........|
|00000340| 07 f0 00 00 00 08 00 0a | 00 00 00 00 16 54 69 74 |........|.....Tit|
|00000350| 6c 65 00 00 00 00 00 00 | 00 00 19 00 00 00 21 00 |le......|......!.|
|00000360| 20 00 1c 40 01 00 00 1d | 00 1e 01 1f 00 22 06 41 | ..@....|.....".A|
|00000370| 72 69 61 6c 01 24 00 13 | 00 00 00 05 01 07 f0 00 |rial.$..|........|
|00000380| 00 00 08 00 09 f0 00 00 | 00 0a 3c 00 00 00 1a 4c |........|..<....L|
|00000390| 69 73 74 20 33 00 00 00 | 00 00 00 00 00 0c 00 00 |ist 3...|........|
|000003a0| 00 21 00 20 00 1d 00 1e | 00 1f 00 24 00 16 00 00 |.!. ....|...$....|
|000003b0| 00 02 51 03 00 00 04 e5 | fe ff ff 07 f0 00 00 00 |..Q.....|........|
|000003c0| 08 00 0a 00 00 00 00 2e | 4c 69 73 74 20 42 75 6c |........|List Bul|
|000003d0| 6c 65 74 00 00 00 00 00 | 00 00 00 0c 00 00 00 21 |let.....|.......!|
|000003e0| 00 20 00 1d 00 1e 00 1f | 00 24 00 0c 00 00 00 07 |. ......|.$......|
|000003f0| f0 00 00 00 08 00 0a 00 | 00 00 00 36 4c 69 73 74 |........|...6List|
|00000400| 20 43 6f 6e 74 69 6e 75 | 65 00 00 00 00 00 00 00 | Continu|e.......|
|00000410| 00 0c 00 00 00 21 00 20 | 00 1d 00 1e 00 1f 00 24 |.....!. |.......$|
|00000420| 00 11 00 00 00 02 1b 01 | 00 00 07 f0 00 00 00 08 |........|........|
|00000430| 00 0a 78 00 00 00 26 42 | 6f 64 79 20 54 65 78 74 |..x...&B|ody Text|
|00000440| 00 00 00 00 00 00 00 00 | 0c 00 00 00 21 00 20 00 |........|....!. .|
|00000450| 1d 00 1e 00 1f 00 24 00 | 0c 00 00 00 07 f0 00 00 |......$.|........|
|00000460| 00 08 00 0a 78 00 00 00 | 42 42 6f 64 79 20 54 65 |....x...|BBody Te|
|00000470| 78 74 20 49 6e 64 65 6e | 74 00 00 00 00 00 00 00 |xt Inden|t.......|
|00000480| 00 0c 00 00 00 21 00 20 | 00 1d 00 1e 00 1f 00 24 |.....!. |.......$|
|00000490| 00 11 00 00 00 02 1b 01 | 00 00 07 f0 00 00 00 08 |........|........|
|000004a0| 00 0a 78 00 00 00 36 4e | 6f 72 6d 61 6c 20 49 6e |..x...6N|ormal In|
|000004b0| 64 65 6e 74 00 00 00 00 | 00 00 00 00 0c 00 00 00 |dent....|........|
|000004c0| 21 00 20 00 1d 00 1e 00 | 1f 00 24 00 11 00 00 00 |!. .....|..$.....|
|000004d0| 02 d0 02 00 00 07 f0 00 | 00 00 08 00 0a 00 00 00 |........|........|
|000004e0| 00 2e 4c 69 73 74 20 4e | 75 6d 62 65 72 00 00 00 |..List N|umber...|
|000004f0| 00 00 00 00 00 0c 00 00 | 00 21 00 20 00 1d 00 1e |........|.!. ....|
|00000500| 00 1f 00 24 00 0c 00 00 | 00 07 f0 00 00 00 08 00 |...$....|........|
|00000510| 0a 00 00 00 00 36 4c 69 | 73 74 20 4e 75 6d 62 65 |.....6Li|st Numbe|
|00000520| 72 20 32 00 00 00 00 00 | 00 00 00 0c 00 00 00 21 |r 2.....|.......!|
|00000530| 00 20 00 1d 00 1e 00 1f | 00 24 00 0c 00 00 00 07 |. ......|.$......|
|00000540| f0 00 00 00 08 00 0a 00 | 00 00 00 ff ff ff ff ff |........|........|
|00000550| ff ff ff ff ff ff ff ff | ff ff ff 01 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 01 01 00 | 00 00 11 00 00 00 16 68 |........|.......h|
|00000570| 01 00 00 17 33 10 00 00 | 02 17 72 20 00 00 03 00 |....3...|..r ....|
|00000580| 00 00 00 01 00 00 00 01 | 00 00 00 01 00 00 00 00 |........|........|
|00000590| 01 00 00 00 00 00 00 00 | 00 00 01 01 00 00 00 11 |........|........|
|000005a0| 00 00 00 16 68 01 00 00 | 17 33 10 00 00 02 17 72 |....h...|.3.....r|
|000005b0| 20 00 00 03 00 00 00 00 | 01 00 00 00 01 00 00 00 | .......|........|
|000005c0| 01 00 00 00 00 01 00 00 | 00 d0 02 00 00 d0 02 00 |........|........|
|000005d0| 00 8a 05 00 00 8a 05 00 | 00 8a 05 00 00 8a 05 00 |........|........|
|000005e0| 00 01 00 00 00 00 00 00 | 00 00 00 00 00 00 5c 00 |........|......\.|
|000005f0| 00 10 63 00 00 10 5b 05 | 00 00 65 00 00 10 00 00 |..c...[.|..e.....|
|00000600| 00 00 66 00 00 10 63 05 | 00 00 64 00 00 10 02 06 |..f...c.|..d.....|
|00000610| 01 00 00 00 00 00 00 00 | 00 00 00 00 00 5c 00 00 |........|.....\..|
|00000620| 10 63 00 00 10 90 05 00 | 00 65 00 00 10 00 00 00 |.c......|.e......|
|00000630| 00 66 00 00 10 98 05 00 | 00 64 00 00 10 02 06 fd |.f......|.d......|
|00000640| 00 00 10 82 2e 00 00 c6 | 41 00 00 00 93 bb 05 00 |........|A.......|
|00000650| 4f 50 50 20 4d 61 6e 75 | 61 6c 06 56 65 72 73 69 |OPP Manu|al.Versi|
|00000660| 6f 6e 20 31 2e 39 06 31 | 2e 09 49 4e 54 52 4f 44 |on 1.9.1|..INTROD|
|00000670| 55 43 54 49 4f 4e 20 06 | 4f 50 50 20 69 73 20 61 |UCTION .|OPP is a|
|00000680| 20 66 72 6f 6e 74 2d 65 | 6e 64 20 4f 50 4c 20 70 | front-e|nd OPL p|
|00000690| 72 65 2d 70 72 6f 63 65 | 73 73 6f 72 20 66 6f 72 |re-proce|ssor for|
|000006a0| 20 74 68 65 20 50 73 69 | 6f 6e 20 4f 50 4c 20 6c | the Psi|on OPL l|
|000006b0| 61 6e 67 75 61 67 65 2e | 20 49 66 20 79 6f 75 20 |anguage.| If you |
|000006c0| 61 72 65 20 66 61 6d 69 | 6c 69 61 72 20 77 69 74 |are fami|liar wit|
|000006d0| 68 20 74 68 65 20 6f 70 | 65 72 61 74 69 6f 6e 20 |h the op|eration |
|000006e0| 6f 66 20 61 20 43 20 70 | 72 65 2d 70 72 6f 63 65 |of a C p|re-proce|
|000006f0| 73 73 6f 72 20 74 68 65 | 6e 20 74 68 65 20 66 75 |ssor the|n the fu|
|00000700| 6e 63 74 69 6f 6e 20 6f | 66 20 4f 50 50 20 77 69 |nction o|f OPP wi|
|00000710| 6c 6c 20 62 65 20 69 6d | 6d 65 64 69 61 74 65 6c |ll be im|mediatel|
|00000720| 79 20 63 6c 65 61 72 2e | 20 53 33 41 54 52 41 4e |y clear.| S3ATRAN|
|00000730| 20 61 6e 64 20 70 72 6f | 76 69 64 65 73 20 73 69 | and pro|vides si|
|00000740| 6d 69 6c 61 72 20 66 61 | 63 69 6c 69 74 69 65 73 |milar fa|cilities|
|00000750| 20 77 68 65 6e 20 74 72 | 61 6e 73 6c 61 74 69 6e | when tr|anslatin|
|00000760| 67 20 45 50 4f 43 31 36 | 20 4f 50 4c 20 63 6f 64 |g EPOC16| OPL cod|
|00000770| 65 20 6f 6e 20 61 20 50 | 43 2e 20 4f 50 50 20 70 |e on a P|C. OPP p|
|00000780| 72 6f 76 69 64 65 73 20 | 74 68 65 20 73 61 6d 65 |rovides |the same|
|00000790| 20 66 61 63 69 6c 69 74 | 69 65 73 20 61 73 20 53 | facilit|ies as S|
|000007a0| 33 41 54 52 41 4e 20 70 | 6c 75 73 20 61 20 6c 61 |3ATRAN p|lus a la|
|000007b0| 72 67 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 61 64 |rge numb|er of ad|
|000007c0| 64 69 74 69 6f 6e 61 6c | 20 66 65 61 74 75 72 65 |ditional| feature|
|000007d0| 73 20 67 72 65 61 74 6c | 79 20 65 78 74 65 6e 64 |s greatl|y extend|
|000007e0| 69 6e 67 20 74 68 65 20 | 4f 50 4c 20 6c 61 6e 67 |ing the |OPL lang|
|000007f0| 75 61 67 65 2e 20 54 68 | 65 73 65 20 61 64 64 69 |uage. Th|ese addi|
|00000800| 74 69 6f 6e 61 6c 20 69 | 6e 63 6c 75 64 65 20 73 |tional i|nclude s|
|00000810| 75 70 70 6f 72 74 20 66 | 6f 72 20 6d 75 6c 74 69 |upport f|or multi|
|00000820| 2d 64 69 6d 65 6e 73 69 | 6f 6e 61 6c 20 61 72 72 |-dimensi|onal arr|
|00000830| 61 79 73 20 61 6e 64 20 | 43 20 73 74 79 6c 65 20 |ays and |C style |
|00000840| 73 74 72 75 63 74 75 72 | 65 73 2e 20 41 6c 73 6f |structur|es. Also|
|00000850| 2c 20 77 68 65 72 65 61 | 73 20 53 33 41 54 52 41 |, wherea|s S3ATRA|
|00000860| 4e 20 6f 6e 6c 79 20 72 | 75 6e 73 20 6f 6e 20 61 |N only r|uns on a|
|00000870| 20 50 43 20 61 6e 64 20 | 61 6c 6c 6f 77 73 20 45 | PC and |allows E|
|00000880| 50 4f 43 31 36 20 63 6f | 64 65 20 74 6f 20 62 65 |POC16 co|de to be|
|00000890| 20 74 72 61 6e 73 6c 61 | 74 65 64 2c 20 4f 50 50 | transla|ted, OPP|
|000008a0| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 20 66 6f | is avai|lable fo|
|000008b0| 72 20 62 6f 74 68 20 45 | 50 4f 43 31 36 20 61 6e |r both E|POC16 an|
|000008c0| 64 20 45 50 4f 43 33 32 | 20 64 65 76 65 6c 6f 70 |d EPOC32| develop|
|000008d0| 6d 65 6e 74 20 63 61 72 | 72 69 65 64 20 6f 75 74 |ment car|ried out|
|000008e0| 20 75 70 6f 6e 20 61 20 | 50 43 2c 20 50 73 69 6f | upon a |PC, Psio|
|000008f0| 6e 20 45 50 4f 43 31 36 | 2c 20 61 6e 64 20 45 50 |n EPOC16|, and EP|
|00000900| 4f 43 33 32 20 70 6c 61 | 74 66 6f 72 6d 73 2e 06 |OC32 pla|tforms..|
|00000910| 57 68 65 6e 20 75 73 69 | 6e 67 20 61 20 70 72 65 |When usi|ng a pre|
|00000920| 2d 70 72 6f 63 65 73 73 | 6f 72 20 61 64 64 69 74 |-process|or addit|
|00000930| 69 6f 6e 61 6c 20 70 72 | 65 2d 70 72 6f 63 65 73 |ional pr|e-proces|
|00000940| 73 6f 72 20 63 6f 6d 6d | 61 6e 64 73 20 61 72 65 |sor comm|ands are|
|00000950| 20 61 64 64 65 64 20 69 | 6e 2d 6c 69 6e 65 20 74 | added i|n-line t|
|00000960| 6f 20 74 68 65 20 73 6f | 75 72 63 65 20 66 69 6c |o the so|urce fil|
|00000970| 65 2e 20 54 68 65 73 65 | 20 63 6f 6d 6d 61 6e 64 |e. These| command|
|00000980| 73 20 61 72 65 20 72 65 | 61 64 20 61 6e 64 20 65 |s are re|ad and e|
|00000990| 78 65 63 75 74 65 64 20 | 62 79 20 74 68 65 20 70 |xecuted |by the p|
|000009a0| 72 65 2d 70 72 6f 63 65 | 73 73 6f 72 20 77 68 69 |re-proce|ssor whi|
|000009b0| 63 68 20 73 74 72 69 70 | 73 20 74 68 65 20 6c 69 |ch strip|s the li|
|000009c0| 6e 65 73 20 6f 75 74 20 | 70 72 69 6f 72 20 74 6f |nes out |prior to|
|000009d0| 20 74 68 65 20 61 63 74 | 75 61 6c 20 63 6f 6d 70 | the act|ual comp|
|000009e0| 69 6c 61 74 69 6f 6e 20 | 6f 72 20 74 72 61 6e 73 |ilation |or trans|
|000009f0| 6c 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 73 6f |lation o|f the so|
|00000a00| 75 72 63 65 20 66 69 6c | 65 2e 20 4f 50 50 20 6c |urce fil|e. OPP l|
|00000a10| 6f 6f 6b 73 20 66 6f 72 | 20 6c 69 6e 65 73 20 77 |ooks for| lines w|
|00000a20| 69 74 68 69 6e 20 74 68 | 65 20 4f 50 4c 20 73 6f |ithin th|e OPL so|
|00000a30| 75 72 63 65 20 66 69 6c | 65 20 77 68 69 63 68 20 |urce fil|e which |
|00000a40| 62 65 67 69 6e 20 77 69 | 74 68 20 61 20 23 20 63 |begin wi|th a # c|
|00000a50| 68 61 72 61 63 74 65 72 | 2e 20 54 68 65 73 65 20 |haracter|. These |
|00000a60| 6c 69 6e 65 73 20 63 6f | 6e 74 61 69 6e 20 63 6f |lines co|ntain co|
|00000a70| 6d 6d 61 6e 64 73 20 77 | 68 69 63 68 20 61 72 65 |mmands w|hich are|
|00000a80| 20 72 65 61 64 20 61 6e | 64 20 61 63 74 65 64 20 | read an|d acted |
|00000a90| 75 70 6f 6e 20 62 79 20 | 74 68 65 20 70 72 65 2d |upon by |the pre-|
|00000aa0| 70 72 6f 63 65 73 73 6f | 72 2e 20 41 6e 79 20 23 |processo|r. Any #|
|00000ab0| 20 6c 69 6e 65 73 20 61 | 72 65 20 72 65 6d 6f 76 | lines a|re remov|
|00000ac0| 65 64 20 70 72 69 6f 72 | 20 74 6f 20 64 69 73 70 |ed prior| to disp|
|00000ad0| 61 74 63 68 69 6e 67 20 | 74 68 65 20 6c 69 6e 65 |atching |the line|
|00000ae0| 73 20 74 6f 20 74 68 65 | 20 4f 50 4c 20 74 72 61 |s to the| OPL tra|
|00000af0| 6e 73 6c 61 74 6f 72 2e | 20 54 68 65 20 73 74 61 |nslator.| The sta|
|00000b00| 6e 64 61 72 64 20 4f 50 | 4c 20 63 6f 64 65 20 69 |ndard OP|L code i|
|00000b10| 73 20 61 6c 73 6f 20 73 | 63 61 6e 6e 65 64 20 62 |s also s|canned b|
|00000b20| 79 20 74 68 65 20 70 72 | 65 2d 70 72 6f 63 65 73 |y the pr|e-proces|
|00000b30| 73 6f 72 20 77 68 69 63 | 68 20 6d 61 79 20 73 75 |sor whic|h may su|
|00000b40| 62 73 74 69 74 75 74 65 | 20 73 79 6d 62 6f 6c 69 |bstitute| symboli|
|00000b50| 63 20 6e 61 6d 65 73 20 | 66 6f 72 20 74 65 78 74 |c names |for text|
|00000b60| 20 64 65 66 69 6e 65 64 | 20 75 73 69 6e 67 20 74 | defined| using t|
|00000b70| 68 65 20 23 20 63 6f 6d | 6d 61 6e 64 73 2e 20 54 |he # com|mands. T|
|00000b80| 68 65 20 6f 75 74 70 75 | 74 20 66 72 6f 6d 20 4f |he outpu|t from O|
|00000b90| 50 50 20 69 73 20 70 75 | 72 65 20 4f 50 4c 20 73 |PP is pu|re OPL s|
|00000ba0| 6f 75 72 63 65 20 63 6f | 64 65 2e 20 54 68 69 73 |ource co|de. This|
|00000bb0| 20 72 65 73 75 6c 74 61 | 6e 74 20 70 72 65 2d 70 | resulta|nt pre-p|
|00000bc0| 72 6f 63 65 73 73 65 64 | 20 4f 50 4c 20 63 6f 64 |rocessed| OPL cod|
|00000bd0| 65 20 69 73 20 70 61 73 | 73 65 64 20 6f 6e 20 74 |e is pas|sed on t|
|00000be0| 6f 20 74 68 65 20 4f 50 | 4c 20 74 72 61 6e 73 6c |o the OP|L transl|
|00000bf0| 61 74 6f 72 20 77 68 69 | 63 68 20 64 6f 65 73 20 |ator whi|ch does |
|00000c00| 74 68 65 20 61 63 74 75 | 61 6c 20 6a 6f 62 20 6f |the actu|al job o|
|00000c10| 66 20 63 72 65 61 74 69 | 6e 67 20 61 6e 20 4f 50 |f creati|ng an OP|
|00000c20| 4f 20 6f 72 20 4f 50 41 | 20 66 69 6c 65 2e 06 54 |O or OPA| file..T|
|00000c30| 68 65 20 6f 70 65 72 61 | 74 69 6f 6e 20 6f 66 20 |he opera|tion of |
|00000c40| 74 68 65 20 70 72 65 2d | 70 72 6f 63 65 73 73 6f |the pre-|processo|
|00000c50| 72 20 63 61 6e 20 62 65 | 20 73 65 65 6e 20 77 69 |r can be| seen wi|
|00000c60| 74 68 20 61 6e 20 65 78 | 61 6d 70 6c 65 2e 20 49 |th an ex|ample. I|
|00000c70| 6e 20 74 68 65 20 50 72 | 6f 67 72 61 6d 20 65 64 |n the Pr|ogram ed|
|00000c80| 69 74 6f 72 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |itor the| followi|
|00000c90| 6e 67 20 63 6f 64 65 20 | 69 73 20 77 72 69 74 74 |ng code |is writt|
|00000ca0| 65 6e 3a 06 23 64 65 66 | 69 6e 65 20 41 52 52 41 |en:.#def|ine ARRA|
|00000cb0| 59 5f 53 49 5a 45 09 31 | 30 07 23 64 65 66 69 6e |Y_SIZE.1|0.#defin|
|00000cc0| 65 20 46 4e 28 78 29 09 | 09 28 33 2a 78 2a 2a 32 |e FN(x).|.(3*x**2|
|00000cd0| 2b 32 2a 78 2b 31 29 07 | 2f 2a 20 48 65 72 65 20 |+2*x+1).|/* Here |
|00000ce0| 69 73 20 74 68 65 20 6d | 61 69 6e 20 70 72 6f 63 |is the m|ain proc|
|00000cf0| 65 64 75 72 65 20 2a 2f | 07 50 52 4f 43 20 6d 61 |edure */|.PROC ma|
|00000d00| 69 6e 3a 20 07 09 6c 6f | 63 61 6c 20 78 25 2c 20 |in: ..lo|cal x%, |
|00000d10| 79 25 28 41 52 52 41 59 | 5f 53 49 5a 45 29 09 07 |y%(ARRAY|_SIZE)..|
|00000d20| 09 23 69 66 64 65 66 20 | 44 45 42 55 47 09 2f 2a |.#ifdef |DEBUG./*|
|00000d30| 20 70 72 69 6e 74 20 64 | 65 62 75 67 20 69 6e 66 | print d|ebug inf|
|00000d40| 6f 20 69 66 20 72 65 71 | 75 69 72 65 64 20 2a 2f |o if req|uired */|
|00000d50| 07 09 09 70 72 69 6e 74 | 20 93 49 6e 20 6d 61 69 |...print| .In mai|
|00000d60| 6e 94 07 09 23 65 6e 64 | 69 66 09 07 09 77 68 69 |n...#end|if...whi|
|00000d70| 6c 65 20 78 25 3c 41 52 | 52 41 59 5f 53 49 5a 45 |le x%<AR|RAY_SIZE|
|00000d80| 07 09 09 78 25 3d 78 25 | 2b 31 07 09 09 79 25 28 |...x%=x%|+1...y%(|
|00000d90| 78 25 29 3d 46 4e 28 78 | 25 29 07 09 65 6e 64 77 |x%)=FN(x|%)..endw|
|00000da0| 68 07 09 66 6f 6f 3a 07 | 45 4e 44 50 07 23 69 6e |h..foo:.|ENDP.#in|
|00000db0| 63 6c 75 64 65 20 93 66 | 6f 6f 2e 6f 70 68 94 06 |clude .f|oo.oph..|
|00000dc0| 54 68 65 20 4f 50 4c 20 | 70 72 65 2d 70 72 6f 63 |The OPL |pre-proc|
|00000dd0| 65 73 73 6f 72 20 72 65 | 61 64 73 20 69 6e 20 74 |essor re|ads in t|
|00000de0| 68 65 20 61 62 6f 76 65 | 20 63 6f 64 65 20 61 6e |he above| code an|
|00000df0| 64 20 6f 75 74 70 75 74 | 73 20 74 68 65 20 66 6f |d output|s the fo|
|00000e00| 6c 6c 6f 77 69 6e 67 20 | 63 6f 64 65 20 74 6f 20 |llowing |code to |
|00000e10| 74 68 65 20 4f 50 4c 20 | 74 72 61 6e 73 6c 61 74 |the OPL |translat|
|00000e20| 6f 72 3a 06 50 52 4f 43 | 20 6d 61 69 6e 3a 07 09 |or:.PROC| main:..|
|00000e30| 6c 6f 63 61 6c 20 78 25 | 2c 20 79 25 28 31 30 29 |local x%|, y%(10)|
|00000e40| 07 09 77 68 69 6c 65 20 | 78 25 3c 31 30 07 09 09 |..while |x%<10...|
|00000e50| 78 25 3d 78 25 2b 31 07 | 09 09 79 25 28 78 25 29 |x%=x%+1.|..y%(x%)|
|00000e60| 3d 28 33 2a 78 25 2a 2a | 32 2b 32 2a 78 25 2b 31 |=(3*x%**|2+2*x%+1|
|00000e70| 29 07 09 65 6e 64 77 68 | 07 09 66 6f 6f 3a 07 45 |)..endwh|..foo:.E|
|00000e80| 4e 44 50 07 28 74 68 65 | 20 72 65 73 74 20 6f 66 |NDP.(the| rest of|
|00000e90| 20 74 68 65 20 66 6f 6f | 2e 6f 70 68 20 66 69 6c | the foo|.oph fil|
|00000ea0| 65 20 61 70 70 65 61 72 | 73 20 68 65 72 65 2e 2e |e appear|s here..|
|00000eb0| 2e 29 06 54 68 65 20 4f | 50 4c 20 74 72 61 6e 73 |.).The O|PL trans|
|00000ec0| 6c 61 74 6f 72 20 74 68 | 65 6e 20 72 65 61 64 73 |lator th|en reads|
|00000ed0| 20 69 6e 20 74 68 65 20 | 61 62 6f 76 65 20 63 6f | in the |above co|
|00000ee0| 64 65 20 61 6e 64 20 6f | 75 74 70 75 74 73 20 74 |de and o|utputs t|
|00000ef0| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 20 4f |he appro|priate O|
|00000f00| 50 4f 20 6f 72 20 4f 50 | 41 20 66 69 6c 65 2e 06 |PO or OP|A file..|
|00000f10| 41 73 20 63 61 6e 20 62 | 65 20 73 65 65 6e 20 66 |As can b|e seen f|
|00000f20| 72 6f 6d 20 74 68 65 20 | 61 62 6f 76 65 20 65 78 |rom the |above ex|
|00000f30| 61 6d 70 6c 65 20 74 68 | 65 20 6d 61 69 6e 20 70 |ample th|e main p|
|00000f40| 75 72 70 6f 73 65 20 6f | 66 20 61 20 70 72 65 2d |urpose o|f a pre-|
|00000f50| 70 72 6f 63 65 73 73 6f | 72 20 69 73 20 74 6f 20 |processo|r is to |
|00000f60| 65 6e 61 62 6c 65 20 73 | 6f 75 72 63 65 20 63 6f |enable s|ource co|
|00000f70| 64 65 20 74 6f 20 62 65 | 20 77 72 69 74 74 65 6e |de to be| written|
|00000f80| 20 77 68 69 63 68 20 69 | 73 20 65 61 73 69 65 72 | which i|s easier|
|00000f90| 20 74 6f 20 72 65 61 64 | 20 61 6e 64 20 6d 61 69 | to read| and mai|
|00000fa0| 6e 74 61 69 6e 2e 06 32 | 2e 09 4b 45 59 20 46 45 |ntain..2|..KEY FE|
|00000fb0| 41 54 55 52 45 53 20 06 | 4f 50 50 20 68 61 73 20 |ATURES .|OPP has |
|00000fc0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6b 65 |the foll|owing ke|
|00000fd0| 79 20 66 65 61 74 75 72 | 65 73 3a 06 41 76 61 69 |y featur|es:.Avai|
|00000fe0| 6c 61 62 6c 65 20 69 6e | 20 74 68 72 65 65 20 76 |lable in| three v|
|00000ff0| 65 72 73 69 6f 6e 73 3a | 06 31 2e 09 56 65 72 73 |ersions:|.1..Vers|
|00001000| 69 6f 6e 20 77 68 69 63 | 68 20 72 75 6e 73 20 6f |ion whic|h runs o|
|00001010| 6e 20 61 20 50 73 69 6f | 6e 20 45 50 4f 43 33 32 |n a Psio|n EPOC32|
|00001020| 20 6d 61 63 68 69 6e 65 | 20 28 53 65 72 69 65 73 | machine| (Series|
|00001030| 35 2c 20 47 65 6f 66 6f | 78 2d 4f 6e 65 2c 2e 2e |5, Geofo|x-One,..|
|00001040| 2e 29 20 69 6e 20 63 6f | 6e 6a 75 6e 63 74 69 6f |.) in co|njunctio|
|00001050| 6e 20 77 69 74 68 20 74 | 68 65 20 4f 50 4c 2b 20 |n with t|he OPL+ |
|00001060| 64 65 76 65 6c 6f 70 6d | 65 6e 74 20 65 6e 76 69 |developm|ent envi|
|00001070| 72 6f 6e 6d 65 6e 74 06 | 32 2e 09 56 65 72 73 69 |ronment.|2..Versi|
|00001080| 6f 6e 20 77 68 69 63 68 | 20 72 75 6e 73 20 6f 6e |on which| runs on|
|00001090| 20 61 20 50 73 69 6f 6e | 20 45 50 4f 43 31 36 20 | a Psion| EPOC16 |
|000010a0| 6d 61 63 68 69 6e 65 20 | 28 53 65 72 69 65 73 20 |machine |(Series |
|000010b0| 33 61 2f 33 63 20 6f 72 | 20 53 69 65 6e 61 29 06 |3a/3c or| Siena).|
|000010c0| 33 2e 09 56 65 72 73 69 | 6f 6e 20 77 68 69 63 68 |3..Versi|on which|
|000010d0| 20 72 75 6e 73 20 75 6e | 64 65 72 20 4d 53 44 4f | runs un|der MSDO|
|000010e0| 53 20 65 69 74 68 65 72 | 20 73 74 61 6e 64 61 6c |S either| standal|
|000010f0| 6f 6e 65 2c 20 77 69 74 | 68 20 74 68 65 20 4f 50 |one, wit|h the OP|
|00001100| 50 44 65 76 20 6f 72 20 | 77 69 74 68 20 74 68 65 |PDev or |with the|
|00001110| 20 50 73 69 6f 6e 20 4f | 44 45 20 64 65 76 65 6c | Psion O|DE devel|
|00001120| 6f 70 6d 65 6e 74 20 65 | 6e 76 69 72 6f 6e 6d 65 |opment e|nvironme|
|00001130| 6e 74 2e 06 23 64 65 66 | 69 6e 65 20 64 69 72 65 |nt..#def|ine dire|
|00001140| 63 74 69 76 65 20 66 6f | 72 20 73 69 6d 70 6c 65 |ctive fo|r simple|
|00001150| 20 6d 61 63 72 6f 73 2c | 20 65 2e 67 2e 20 06 23 | macros,| e.g. .#|
|00001160| 64 65 66 69 6e 65 20 4d | 41 58 5f 41 52 52 41 59 |define M|AX_ARRAY|
|00001170| 09 31 30 06 23 64 65 66 | 69 6e 65 20 64 69 72 65 |.10.#def|ine dire|
|00001180| 63 74 69 76 65 20 66 6f | 72 20 6d 61 63 72 6f 20 |ctive fo|r macro |
|00001190| 66 75 6e 63 74 69 6f 6e | 73 2c 20 65 2e 67 2e 20 |function|s, e.g. |
|000011a0| 06 23 64 65 66 69 6e 65 | 20 46 4e 28 78 29 09 09 |.#define| FN(x)..|
|000011b0| 33 2a 78 2a 2a 32 2b 32 | 2a 78 2b 31 06 23 75 6e |3*x**2+2|*x+1.#un|
|000011c0| 64 65 66 20 74 6f 20 75 | 6e 64 65 66 69 6e 65 20 |def to u|ndefine |
|000011d0| 6d 61 63 72 6f 73 06 56 | 61 72 69 6f 75 73 20 62 |macros.V|arious b|
|000011e0| 75 69 6c 74 2d 69 6e 20 | 6d 61 63 72 6f 73 20 73 |uilt-in |macros s|
|000011f0| 75 63 68 20 61 73 3a 20 | 06 5f 5f 4c 49 4e 45 5f |uch as: |.__LINE_|
|00001200| 5f 2c 20 5f 5f 46 49 4c | 45 5f 5f 2c 20 5f 5f 44 |_, __FIL|E__, __D|
|00001210| 41 54 45 5f 5f 5f 2c 20 | 5f 5f 54 49 4d 45 5f 5f |ATE___, |__TIME__|
|00001220| 2c 20 5f 5f 50 52 4f 43 | 5f 5f 2c 20 65 74 63 2e |, __PROC|__, etc.|
|00001230| 06 41 4e 53 49 20 23 20 | 73 74 72 69 6e 67 20 70 |.ANSI # |string p|
|00001240| 72 6f 64 75 63 65 72 20 | 73 75 70 70 6f 72 74 65 |roducer |supporte|
|00001250| 64 20 69 6e 20 6d 61 63 | 72 6f 20 66 75 6e 63 74 |d in mac|ro funct|
|00001260| 69 6f 6e 73 20 28 61 6c | 74 68 6f 75 67 68 20 74 |ions (al|though t|
|00001270| 68 65 20 21 20 63 68 61 | 72 61 63 74 65 72 20 69 |he ! cha|racter i|
|00001280| 73 20 75 73 65 64 20 72 | 61 74 68 65 72 20 74 68 |s used r|ather th|
|00001290| 61 6e 20 23 29 2e 06 41 | 4e 53 49 20 23 23 20 74 |an #)..A|NSI ## t|
|000012a0| 6f 6b 65 6e 20 70 61 73 | 74 69 6e 67 20 73 75 70 |oken pas|ting sup|
|000012b0| 70 6f 72 74 65 64 20 69 | 6e 20 6d 61 63 72 6f 20 |ported i|n macro |
|000012c0| 66 75 6e 63 74 69 6f 6e | 73 20 28 61 6c 74 68 6f |function|s (altho|
|000012d0| 75 67 68 20 74 68 65 20 | 21 21 20 63 68 61 72 61 |ugh the |!! chara|
|000012e0| 63 74 65 72 73 20 61 72 | 65 20 75 73 65 64 20 72 |cters ar|e used r|
|000012f0| 61 74 68 65 72 20 74 68 | 61 6e 20 23 23 29 2e 06 |ather th|an ##)..|
|00001300| 43 6f 6e 64 69 74 69 6f | 6e 61 6c 20 74 72 61 6e |Conditio|nal tran|
|00001310| 73 6c 61 74 69 6f 6e 20 | 64 69 72 65 63 74 69 76 |slation |directiv|
|00001320| 65 73 3a 20 23 69 66 2c | 20 23 69 66 64 65 66 2c |es: #if,| #ifdef,|
|00001330| 20 23 69 66 6e 64 65 66 | 2c 20 23 65 6c 73 65 2c | #ifndef|, #else,|
|00001340| 20 23 65 6c 69 66 2c 20 | 23 65 6e 64 69 66 2e 06 | #elif, |#endif..|
|00001350| 49 6e 63 6c 75 64 65 20 | 66 69 6c 65 73 2c 20 62 |Include |files, b|
|00001360| 6f 74 68 20 73 79 73 74 | 65 6d 20 61 6e 64 20 73 |oth syst|em and s|
|00001370| 74 61 6e 64 61 72 64 2c | 20 65 2e 67 2e 20 06 23 |tandard,| e.g. .#|
|00001380| 69 6e 63 6c 75 64 65 20 | 3c 6f 73 5c 63 61 6c 6c |include |<os\call|
|00001390| 73 3e 09 07 23 69 6e 63 | 6c 75 64 65 20 93 6d 79 |s>..#inc|lude .my|
|000013a0| 70 72 6f 63 73 2e 6f 70 | 68 94 06 45 50 4f 43 31 |procs.op|h..EPOC1|
|000013b0| 36 20 76 65 72 73 69 6f | 6e 20 73 75 70 70 6c 69 |6 versio|n suppli|
|000013c0| 65 64 20 77 69 74 68 20 | 6c 6f 74 73 20 6f 66 20 |ed with |lots of |
|000013d0| 73 79 73 74 65 6d 20 69 | 6e 63 6c 75 64 65 20 66 |system i|nclude f|
|000013e0| 69 6c 65 73 20 28 4f 53 | 20 63 61 6c 6c 73 2c 20 |iles (OS| calls, |
|000013f0| 65 74 63 2e 29 2e 06 4c | 69 6e 65 20 63 6f 6e 74 |etc.)..L|ine cont|
|00001400| 69 6e 75 61 74 69 6f 6e | 20 63 68 61 72 61 63 74 |inuation| charact|
|00001410| 65 72 2c 20 65 2e 67 2e | 20 06 6d 65 6e 75 09 93 |er, e.g.| .menu..|
|00001420| 6d 65 6e 75 94 2c 09 09 | 5c 07 09 93 69 74 65 6d |menu.,..|\...item|
|00001430| 31 94 2c 25 69 09 09 5c | 07 09 93 69 74 65 6d 32 |1.,%i..\|...item2|
|00001440| 94 2c 25 6a 06 4d 75 6c | 74 69 2d 64 69 6d 65 6e |.,%j.Mul|ti-dimen|
|00001450| 73 69 6f 6e 61 6c 20 61 | 72 72 61 79 20 73 75 70 |sional a|rray sup|
|00001460| 70 6f 72 74 20 28 73 74 | 61 6e 64 61 72 64 20 4f |port (st|andard O|
|00001470| 50 4c 20 69 73 20 6c 69 | 6d 69 74 65 64 20 74 6f |PL is li|mited to|
|00001480| 20 31 20 64 69 6d 65 6e | 73 69 6f 6e 61 6c 20 61 | 1 dimen|sional a|
|00001490| 72 72 61 79 73 2c 20 4f | 50 50 20 61 6c 6c 6f 77 |rrays, O|PP allow|
|000014a0| 73 20 4e 2d 64 69 6d 65 | 6e 73 69 6f 6e 61 6c 20 |s N-dime|nsional |
|000014b0| 61 72 72 61 79 73 29 2e | 06 43 20 73 74 79 6c 65 |arrays).|.C style|
|000014c0| 20 73 74 72 75 63 74 75 | 72 65 73 20 61 6e 64 20 | structu|res and |
|000014d0| 70 6f 69 6e 74 65 72 73 | 20 74 6f 20 73 74 72 75 |pointers| to stru|
|000014e0| 63 74 75 72 65 73 2c 20 | 65 2e 67 2e 20 06 53 54 |ctures, |e.g. .ST|
|000014f0| 52 55 43 54 20 6d 79 5f | 73 74 72 75 63 74 07 09 |RUCT my_|struct..|
|00001500| 6e 61 6d 65 24 28 31 30 | 29 07 09 76 61 6c 75 65 |name$(10|)..value|
|00001510| 25 07 09 6e 65 78 74 25 | 07 45 4e 44 53 07 50 52 |%..next%|.ENDS.PR|
|00001520| 4f 43 20 74 65 73 74 07 | 09 6c 6f 63 61 6c 20 3c |OC test.|.local <|
|00001530| 6d 79 5f 73 74 72 75 63 | 74 2a 3e 70 25 07 09 70 |my_struc|t*>p%..p|
|00001540| 25 3d 61 6c 6c 6f 63 28 | 53 49 5a 45 4f 46 28 6d |%=alloc(|SIZEOF(m|
|00001550| 79 5f 73 74 72 75 63 74 | 29 29 20 07 09 70 25 2d |y_struct|)) ..p%-|
|00001560| 3e 6e 61 6d 65 24 20 20 | 3d 20 93 74 65 73 74 94 |>name$ |= .test.|
|00001570| 07 09 70 25 2d 3e 76 61 | 6c 75 65 25 20 3d 20 31 |..p%->va|lue% = 1|
|00001580| 07 09 70 25 2d 3e 6e 65 | 78 74 25 20 20 3d 20 30 |..p%->ne|xt% = 0|
|00001590| 07 45 4e 44 50 06 41 20 | 6e 75 6d 62 65 72 20 6f |.ENDP.A |number o|
|000015a0| 66 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 43 20 73 |f additi|onal C s|
|000015b0| 74 79 6c 65 20 6f 70 65 | 72 61 74 6f 72 73 20 61 |tyle ope|rators a|
|000015c0| 72 65 20 73 75 70 70 6f | 72 74 65 64 2c 20 65 2e |re suppo|rted, e.|
|000015d0| 67 2e 20 06 69 25 2b 2b | 07 69 25 2d 2d 07 69 25 |g. .i%++|.i%--.i%|
|000015e0| 2b 3d 32 07 69 25 2d 3d | 32 07 69 25 2a 3d 32 07 |+=2.i%-=|2.i%*=2.|
|000015f0| 69 25 2f 3d 32 06 43 20 | 61 6e 64 20 43 2b 2b 20 |i%/=2.C |and C++ |
|00001600| 73 74 79 6c 65 20 63 6f | 6d 6d 65 6e 74 73 2c 20 |style co|mments, |
|00001610| 65 2e 67 2e 20 06 2f 2a | 20 54 68 69 73 20 69 73 |e.g. ./*| This is|
|00001620| 20 61 20 43 20 73 74 79 | 6c 65 20 63 6f 6d 6d 65 | a C sty|le comme|
|00001630| 6e 74 20 2a 2f 06 67 6c | 6f 62 61 6c 20 61 25 20 |nt */.gl|obal a% |
|00001640| 2f 2a 20 65 6d 62 65 64 | 64 65 64 20 63 6f 6d 6d |/* embed|ded comm|
|00001650| 65 6e 74 20 2a 2f 2c 20 | 62 25 06 2f 2a 20 41 20 |ent */, |b%./* A |
|00001660| 6d 75 6c 74 69 2d 07 6c | 69 6e 65 20 63 6f 6d 6d |multi-.l|ine comm|
|00001670| 65 6e 74 20 2a 2f 06 2f | 2f 20 61 20 43 2b 2b 20 |ent */./|/ a C++ |
|00001680| 63 6f 6d 6d 65 6e 74 06 | 54 68 65 20 45 50 4f 43 |comment.|The EPOC|
|00001690| 31 36 20 76 65 72 73 69 | 6f 6e 20 70 72 6f 76 69 |16 versi|on provi|
|000016a0| 64 65 73 20 68 6f 6f 6b | 73 20 66 6f 72 20 61 6e |des hook|s for an|
|000016b0| 20 4f 50 4c 20 72 75 6e | 2d 74 69 6d 65 20 64 65 | OPL run|-time de|
|000016c0| 62 75 67 67 65 72 20 77 | 68 69 63 68 20 69 73 20 |bugger w|hich is |
|000016d0| 61 76 61 69 6c 61 62 6c | 65 20 73 65 70 61 72 61 |availabl|e separa|
|000016e0| 74 65 6c 79 20 28 73 65 | 65 20 23 70 72 61 67 6d |tely (se|e #pragm|
|000016f0| 61 20 64 65 62 75 67 29 | 2e 20 06 46 61 63 69 6c |a debug)|. .Facil|
|00001700| 69 74 79 20 66 6f 72 20 | 63 72 65 61 74 69 6e 67 |ity for |creating|
|00001710| 20 6c 69 62 72 61 72 79 | 20 4f 50 4c 20 73 6f 75 | library| OPL sou|
|00001720| 72 63 65 20 66 69 6c 65 | 73 20 63 6f 6e 74 61 69 |rce file|s contai|
|00001730| 6e 69 6e 67 20 75 73 65 | 66 75 6c 20 70 72 6f 63 |ning use|ful proc|
|00001740| 65 64 75 72 65 73 20 77 | 68 69 63 68 20 61 72 65 |edures w|hich are|
|00001750| 20 6f 6e 6c 79 20 69 6e | 63 6c 75 64 65 64 20 69 | only in|cluded i|
|00001760| 6e 20 74 68 65 20 72 65 | 73 75 6c 74 61 6e 74 20 |n the re|sultant |
|00001770| 4f 50 4f 20 6d 6f 64 75 | 6c 65 20 69 66 20 74 68 |OPO modu|le if th|
|00001780| 65 79 20 61 72 65 20 63 | 61 6c 6c 65 64 2e 06 43 |ey are c|alled..C|
|00001790| 61 6e 20 63 68 65 63 6b | 20 66 6f 72 20 63 61 6c |an check| for cal|
|000017a0| 6c 73 20 74 6f 20 75 6e | 64 65 66 69 6e 65 64 20 |ls to un|defined |
|000017b0| 70 72 6f 63 65 64 75 72 | 65 73 20 6f 72 20 70 72 |procedur|es or pr|
|000017c0| 6f 63 65 64 75 72 65 73 | 20 77 68 69 63 68 20 61 |ocedures| which a|
|000017d0| 72 65 20 6e 65 76 65 72 | 20 65 78 70 6c 69 63 69 |re never| explici|
|000017e0| 74 6c 79 20 63 61 6c 6c | 65 64 2e 06 45 50 4f 43 |tly call|ed..EPOC|
|000017f0| 31 36 20 76 65 72 73 69 | 6f 6e 20 69 6e 74 65 67 |16 versi|on integ|
|00001800| 72 61 74 65 73 20 77 69 | 74 68 20 74 68 65 20 50 |rates wi|th the P|
|00001810| 73 69 6f 6e 20 50 72 6f | 67 72 61 6d 20 65 64 69 |sion Pro|gram edi|
|00001820| 74 6f 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |tor appl|ication |
|00001830| 61 6e 64 20 74 68 65 20 | 4f 50 4c 20 74 72 61 6e |and the |OPL tran|
|00001840| 73 6c 61 74 6f 72 2e 06 | 45 50 4f 43 33 32 20 76 |slator..|EPOC32 v|
|00001850| 65 72 73 69 6f 6e 20 73 | 75 70 70 6c 69 65 64 20 |ersion s|upplied |
|00001860| 77 69 74 68 20 4f 50 4c | 2b 2c 20 61 6e 20 69 6d |with OPL|+, an im|
|00001870| 70 72 6f 76 64 20 4f 50 | 4c 20 64 65 76 65 6c 6f |provd OP|L develo|
|00001880| 70 6d 65 6e 74 20 65 6e | 76 69 72 6f 6e 6d 65 6e |pment en|vironmen|
|00001890| 74 2e 06 53 75 70 70 6f | 72 74 20 66 6f 72 20 77 |t..Suppo|rt for w|
|000018a0| 72 69 74 69 6e 67 20 45 | 50 4f 43 31 36 20 61 6e |riting E|POC16 an|
|000018b0| 64 20 45 50 4f 43 33 32 | 20 70 6f 72 74 61 62 6c |d EPOC32| portabl|
|000018c0| 65 20 63 6f 64 65 20 28 | 61 20 67 65 6e 65 72 69 |e code (|a generi|
|000018d0| 63 20 70 6f 69 6e 74 65 | 72 20 74 79 70 65 20 69 |c pointe|r type i|
|000018e0| 73 20 73 75 70 70 6f 72 | 74 65 64 20 66 6f 72 20 |s suppor|ted for |
|000018f0| 31 36 2f 33 32 62 69 74 | 20 61 64 64 72 65 73 73 |16/32bit| address|
|00001900| 69 6e 67 29 06 46 61 63 | 69 6c 69 74 79 20 74 6f |ing).Fac|ility to|
|00001910| 20 61 62 6f 72 74 20 74 | 72 61 6e 73 6c 61 74 69 | abort t|ranslati|
|00001920| 6f 6e 20 61 74 20 61 6e | 79 20 70 6f 69 6e 74 2e |on at an|y point.|
|00001930| 20 06 33 2e 09 4d 41 43 | 52 4f 53 20 06 4d 61 63 | .3..MAC|ROS .Mac|
|00001940| 72 6f 73 20 61 72 65 20 | 61 20 63 6f 6e 76 65 6e |ros are |a conven|
|00001950| 69 65 6e 74 20 77 61 79 | 20 6f 66 20 72 65 70 72 |ient way| of repr|
|00001960| 65 73 65 6e 74 69 6e 67 | 20 61 20 73 65 71 75 65 |esenting| a seque|
|00001970| 6e 63 65 20 6f 66 20 63 | 6f 6d 6d 6f 6e 6c 79 20 |nce of c|ommonly |
|00001980| 75 73 65 64 20 63 68 61 | 72 61 63 74 65 72 73 20 |used cha|racters |
|00001990| 77 69 74 68 20 61 20 73 | 79 6d 62 6f 6c 69 63 20 |with a s|ymbolic |
|000019a0| 6e 61 6d 65 2e 20 53 75 | 70 70 6f 73 65 20 66 6f |name. Su|ppose fo|
|000019b0| 72 20 65 78 61 6d 70 6c | 65 20 74 68 65 72 65 20 |r exampl|e there |
|000019c0| 69 73 20 61 20 66 69 78 | 65 64 20 73 69 7a 65 20 |is a fix|ed size |
|000019d0| 4f 50 4c 20 61 72 72 61 | 79 20 77 68 69 63 68 20 |OPL arra|y which |
|000019e0| 68 61 73 20 61 20 73 69 | 7a 65 20 6f 66 20 31 30 |has a si|ze of 10|
|000019f0| 2e 20 54 68 65 20 73 69 | 7a 65 20 6f 66 20 74 68 |. The si|ze of th|
|00001a00| 65 20 61 72 72 61 79 20 | 6d 61 79 20 62 65 20 72 |e array |may be r|
|00001a10| 65 66 65 72 65 6e 63 65 | 64 20 69 6e 20 61 20 6e |eference|d in a n|
|00001a20| 75 6d 62 65 72 20 6f 66 | 20 70 6c 61 63 65 73 20 |umber of| places |
|00001a30| 74 68 72 6f 75 67 68 6f | 75 74 20 74 68 65 20 4f |througho|ut the O|
|00001a40| 50 4c 20 63 6f 64 65 20 | 61 6e 64 20 69 74 20 69 |PL code |and it i|
|00001a50| 73 20 74 68 65 72 65 66 | 6f 72 65 20 75 73 65 66 |s theref|ore usef|
|00001a60| 75 6c 20 74 6f 20 64 65 | 66 69 6e 65 20 61 20 73 |ul to de|fine a s|
|00001a70| 79 6d 62 6f 6c 20 6f 72 | 20 6d 61 63 72 6f 20 66 |ymbol or| macro f|
|00001a80| 6f 72 20 74 68 65 20 76 | 61 6c 75 65 20 31 30 2e |or the v|alue 10.|
|00001a90| 20 54 68 65 20 73 79 6d | 62 6f 6c 69 63 20 6e 61 | The sym|bolic na|
|00001aa0| 6d 65 20 69 73 20 74 68 | 65 6e 20 75 73 65 64 20 |me is th|en used |
|00001ab0| 74 68 72 6f 75 67 68 6f | 75 74 20 74 68 65 20 63 |througho|ut the c|
|00001ac0| 6f 64 65 2e 20 54 68 69 | 73 20 6d 61 6b 65 73 20 |ode. Thi|s makes |
|00001ad0| 69 74 20 6d 6f 72 65 20 | 6f 62 76 69 6f 75 73 20 |it more |obvious |
|00001ae0| 77 68 61 74 20 74 68 65 | 20 76 61 6c 75 65 20 31 |what the| value 1|
|00001af0| 30 20 72 65 70 72 65 73 | 65 6e 74 73 20 69 6e 20 |0 repres|ents in |
|00001b00| 65 61 63 68 20 70 61 72 | 74 69 63 75 6c 61 72 20 |each par|ticular |
|00001b10| 63 61 73 65 2e 20 41 6c | 73 6f 2c 20 69 66 20 65 |case. Al|so, if e|
|00001b20| 76 65 72 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 |ver the |size of |
|00001b30| 74 68 65 20 61 72 72 61 | 79 20 6e 65 65 64 73 20 |the arra|y needs |
|00001b40| 74 6f 20 62 65 20 63 68 | 61 6e 67 65 64 20 74 68 |to be ch|anged th|
|00001b50| 69 73 20 6f 6e 6c 79 20 | 68 61 73 20 74 6f 20 62 |is only |has to b|
|00001b60| 65 20 64 6f 6e 65 20 69 | 6e 20 6f 6e 65 20 70 6c |e done i|n one pl|
|00001b70| 61 63 65 20 72 61 74 68 | 65 72 20 74 68 61 6e 20 |ace rath|er than |
|00001b80| 74 68 72 6f 75 67 68 6f | 75 74 20 74 68 65 20 73 |througho|ut the s|
|00001b90| 6f 75 72 63 65 20 63 6f | 64 65 2e 06 33 2e 31 2e |ource co|de..3.1.|
|00001ba0| 09 44 65 66 69 6e 69 6e | 67 20 73 69 6d 70 6c 65 |.Definin|g simple|
|00001bb0| 20 6d 61 63 72 6f 73 20 | 06 54 68 65 20 23 64 65 | macros |.The #de|
|00001bc0| 66 69 6e 65 20 70 72 65 | 2d 70 72 6f 63 65 73 73 |fine pre|-process|
|00001bd0| 6f 72 20 64 69 72 65 63 | 74 69 76 65 20 69 73 20 |or direc|tive is |
|00001be0| 75 73 65 64 20 74 6f 20 | 63 72 65 61 74 65 20 61 |used to |create a|
|00001bf0| 20 73 69 6d 70 6c 65 20 | 6d 61 63 72 6f 20 64 65 | simple |macro de|
|00001c00| 66 69 6e 69 74 69 6f 6e | 2e 20 46 6f 72 20 65 78 |finition|. For ex|
|00001c10| 61 6d 70 6c 65 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |ample th|e follow|
|00001c20| 69 6e 67 20 6c 69 6e 65 | 20 69 73 20 61 64 64 65 |ing line| is adde|
|00001c30| 64 20 74 6f 20 74 68 65 | 20 4f 50 50 20 73 6f 75 |d to the| OPP sou|
|00001c40| 72 63 65 20 66 69 6c 65 | 3a 06 23 64 65 66 69 6e |rce file|:.#defin|
|00001c50| 65 20 4d 41 58 5f 41 52 | 52 41 59 09 31 30 06 46 |e MAX_AR|RAY.10.F|
|00001c60| 72 6f 6d 20 74 68 69 73 | 20 70 6f 69 6e 74 20 6f |rom this| point o|
|00001c70| 6e 77 61 72 64 73 20 61 | 6e 79 20 6f 63 63 75 72 |nwards a|ny occur|
|00001c80| 72 65 6e 63 65 20 6f 66 | 20 4d 41 58 5f 41 52 52 |rence of| MAX_ARR|
|00001c90| 41 59 20 69 6e 20 74 68 | 65 20 4f 50 50 20 63 6f |AY in th|e OPP co|
|00001ca0| 64 65 20 77 69 6c 6c 20 | 62 65 20 72 65 70 6c 61 |de will |be repla|
|00001cb0| 63 65 64 20 62 79 20 31 | 30 20 77 68 65 6e 20 74 |ced by 1|0 when t|
|00001cc0| 68 65 20 70 72 65 2d 70 | 72 6f 63 65 73 73 6f 72 |he pre-p|rocessor|
|00001cd0| 20 69 73 20 72 75 6e 2e | 06 54 68 65 20 23 20 63 | is run.|.The # c|
|00001ce0| 68 61 72 61 63 74 65 72 | 20 6d 75 73 74 20 62 65 |haracter| must be|
|00001cf0| 20 74 68 65 20 66 69 72 | 73 74 20 6e 6f 6e 65 2d | the fir|st none-|
|00001d00| 73 70 61 63 65 20 63 68 | 61 72 61 63 74 65 72 20 |space ch|aracter |
|00001d10| 6f 6e 20 74 68 65 20 6c | 69 6e 65 3b 20 69 74 20 |on the l|ine; it |
|00001d20| 6d 61 79 20 62 65 20 70 | 72 6f 63 65 65 64 65 64 |may be p|roceeded|
|00001d30| 20 62 79 20 61 6e 79 20 | 6e 75 6d 62 65 72 20 6f | by any |number o|
|00001d40| 66 20 73 70 61 63 65 20 | 6f 72 20 74 61 62 20 63 |f space |or tab c|
|00001d50| 68 61 72 61 63 74 65 72 | 73 2e 20 49 6e 20 67 65 |haracter|s. In ge|
|00001d60| 6e 65 72 61 6c 20 74 68 | 65 72 65 20 6d 61 79 20 |neral th|ere may |
|00001d70| 62 65 20 61 6e 79 20 6e | 75 6d 62 65 72 20 6f 66 |be any n|umber of|
|00001d80| 20 73 70 61 63 65 20 6f | 72 20 74 61 62 20 63 68 | space o|r tab ch|
|00001d90| 61 72 61 63 74 65 72 73 | 20 74 68 72 6f 75 67 68 |aracters| through|
|00001da0| 6f 75 74 20 74 68 65 20 | 6c 69 6e 65 20 70 72 6f |out the |line pro|
|00001db0| 76 69 64 65 64 20 74 68 | 61 74 20 74 68 65 72 65 |vided th|at there|
|00001dc0| 20 69 73 20 61 74 20 6c | 65 61 73 74 20 6f 6e 65 | is at l|east one|
|00001dd0| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 64 65 66 | between| the def|
|00001de0| 69 6e 65 20 61 6e 64 20 | 74 68 65 20 6d 61 63 72 |ine and |the macr|
|00001df0| 6f 20 6e 61 6d 65 2c 20 | 61 6e 64 20 74 68 65 20 |o name, |and the |
|00001e00| 6d 61 63 72 6f 20 6e 61 | 6d 65 20 61 6e 64 20 69 |macro na|me and i|
|00001e10| 74 73 20 76 61 6c 75 65 | 2e 06 4d 61 63 72 6f 73 |ts value|..Macros|
|00001e20| 20 6d 61 79 20 62 65 20 | 64 65 66 69 6e 65 64 20 | may be |defined |
|00001e30| 66 72 6f 6d 20 6f 74 68 | 65 72 20 6d 61 63 72 6f |from oth|er macro|
|00001e40| 73 2c 20 65 2e 67 2e 06 | 23 64 65 66 69 6e 65 20 |s, e.g..|#define |
|00001e50| 57 49 44 54 48 09 09 35 | 07 23 64 65 66 69 6e 65 |WIDTH..5|.#define|
|00001e60| 20 48 45 49 47 48 54 09 | 31 30 07 23 64 65 66 69 | HEIGHT.|10.#defi|
|00001e70| 6e 65 20 53 49 5a 45 09 | 09 28 57 49 44 54 48 2a |ne SIZE.|.(WIDTH*|
|00001e80| 48 45 49 47 48 54 29 06 | 49 6e 20 74 68 65 20 61 |HEIGHT).|In the a|
|00001e90| 62 6f 76 65 20 63 61 73 | 65 20 77 68 65 6e 20 65 |bove cas|e when e|
|00001ea0| 78 70 61 6e 64 69 6e 67 | 20 74 68 65 20 6d 61 63 |xpanding| the mac|
|00001eb0| 72 6f 20 53 49 5a 45 20 | 74 68 65 20 76 61 6c 75 |ro SIZE |the valu|
|00001ec0| 65 20 28 35 2a 31 30 29 | 20 77 6f 75 6c 64 20 62 |e (5*10)| would b|
|00001ed0| 65 20 73 75 62 73 74 69 | 74 75 74 65 64 2e 20 54 |e substi|tuted. T|
|00001ee0| 68 65 20 6f 72 64 65 72 | 20 69 73 20 6e 6f 74 20 |he order| is not |
|00001ef0| 69 6d 70 6f 72 74 61 6e | 74 20 73 69 6e 63 65 20 |importan|t since |
|00001f00| 6d 61 63 72 6f 73 20 61 | 72 65 20 65 78 70 61 6e |macros a|re expan|
|00001f10| 64 65 64 20 77 68 65 6e | 20 74 68 65 79 20 61 72 |ded when| they ar|
|00001f20| 65 20 72 65 66 65 72 65 | 6e 63 65 64 20 72 61 74 |e refere|nced rat|
|00001f30| 68 65 72 20 74 68 61 6e | 20 77 68 65 6e 20 74 68 |her than| when th|
|00001f40| 65 79 20 61 72 65 20 64 | 65 66 69 6e 65 64 2c 20 |ey are d|efined, |
|00001f50| 69 2e 65 2e 20 69 6e 20 | 74 68 65 6f 72 79 20 74 |i.e. in |theory t|
|00001f60| 68 65 20 61 62 6f 76 65 | 20 63 6f 75 6c 64 20 62 |he above| could b|
|00001f70| 65 20 77 72 69 74 74 65 | 6e 3a 06 23 64 65 66 69 |e writte|n:.#defi|
|00001f80| 6e 65 20 53 49 5a 45 09 | 09 28 57 49 44 54 48 2a |ne SIZE.|.(WIDTH*|
|00001f90| 48 45 49 47 48 54 29 07 | 23 64 65 66 69 6e 65 20 |HEIGHT).|#define |
|00001fa0| 57 49 44 54 48 09 09 35 | 07 23 64 65 66 69 6e 65 |WIDTH..5|.#define|
|00001fb0| 20 48 45 49 47 48 54 09 | 31 30 06 4e 6f 74 65 20 | HEIGHT.|10.Note |
|00001fc0| 74 68 61 74 20 6d 61 63 | 72 6f 73 20 77 68 69 63 |that mac|ros whic|
|00001fd0| 68 20 69 6e 63 6c 75 64 | 65 20 6f 70 65 72 61 74 |h includ|e operat|
|00001fe0| 6f 72 73 20 61 72 65 20 | 6e 6f 74 20 61 75 74 6f |ors are |not auto|
|00001ff0| 6d 61 74 69 63 61 6c 6c | 79 20 65 76 61 6c 75 61 |maticall|y evalua|
|00002000| 74 65 64 20 62 79 20 4f | 50 50 2e 20 54 68 75 73 |ted by O|PP. Thus|
|00002010| 20 74 68 65 20 6d 61 63 | 72 6f 20 53 49 5a 45 20 | the mac|ro SIZE |
|00002020| 69 73 20 73 65 6e 74 20 | 74 6f 20 74 68 65 20 4f |is sent |to the O|
|00002030| 50 4c 20 74 72 61 6e 73 | 6c 61 74 6f 72 20 61 73 |PL trans|lator as|
|00002040| 20 28 35 2a 31 30 29 20 | 6e 6f 74 20 61 73 20 35 | (5*10) |not as 5|
|00002050| 30 2e 20 54 68 69 73 20 | 63 61 6e 20 63 61 75 73 |0. This |can caus|
|00002060| 65 20 70 72 6f 62 6c 65 | 6d 73 20 77 69 74 68 20 |e proble|ms with |
|00002070| 74 68 65 20 4f 50 4c 20 | 74 72 61 6e 73 6c 61 74 |the OPL |translat|
|00002080| 6f 72 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 20 |or. For |example |
|00002090| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 77 69 |the foll|owing wi|
|000020a0| 6c 6c 20 6e 6f 74 20 77 | 6f 72 6b 3a 06 6c 6f 63 |ll not w|ork:.loc|
|000020b0| 61 6c 20 61 72 72 61 79 | 25 28 53 49 5a 45 29 06 |al array|%(SIZE).|
|000020c0| 54 68 65 20 70 72 6f 62 | 6c 65 6d 20 69 73 20 74 |The prob|lem is t|
|000020d0| 68 61 74 20 74 68 65 20 | 4f 50 4c 20 74 72 61 6e |hat the |OPL tran|
|000020e0| 73 6c 61 74 6f 72 20 61 | 6c 73 6f 20 64 6f 65 73 |slator a|lso does|
|000020f0| 20 6e 6f 74 20 65 76 61 | 6c 75 61 74 65 20 61 6e | not eva|luate an|
|00002100| 79 20 65 78 70 72 65 73 | 73 69 6f 6e 73 20 77 68 |y expres|sions wh|
|00002110| 65 6e 20 74 68 65 20 63 | 6f 64 65 20 69 73 20 62 |en the c|ode is b|
|00002120| 65 69 6e 67 20 74 72 61 | 6e 73 6c 61 74 65 64 20 |eing tra|nslated |
|00002130| 61 6e 64 20 68 65 6e 63 | 65 20 65 78 70 65 63 74 |and henc|e expect|
|00002140| 73 20 61 6e 20 69 6e 74 | 65 67 65 72 20 66 6f 72 |s an int|eger for|
|00002150| 20 74 68 65 20 61 72 72 | 61 79 20 73 69 7a 65 2c | the arr|ay size,|
|00002160| 20 6e 6f 74 20 61 6e 20 | 65 78 70 72 65 73 73 69 | not an |expressi|
|00002170| 6f 6e 2e 20 59 6f 75 20 | 63 61 6e 20 77 6f 72 6b |on. You |can work|
|00002180| 20 61 72 6f 75 6e 64 20 | 74 68 69 73 20 70 72 6f | around |this pro|
|00002190| 62 6c 65 6d 20 75 73 69 | 6e 67 20 61 20 62 75 69 |blem usi|ng a bui|
|000021a0| 6c 74 20 69 6e 20 4f 50 | 50 20 66 75 6e 63 74 69 |lt in OP|P functi|
|000021b0| 6f 6e 20 6d 61 63 72 6f | 20 28 73 65 65 20 6e 65 |on macro| (see ne|
|000021c0| 78 74 20 73 65 63 74 69 | 6f 6e 29 2e 06 46 6f 6c |xt secti|on)..Fol|
|000021d0| 6c 6f 77 69 6e 67 20 74 | 68 65 20 41 4e 53 49 20 |lowing t|he ANSI |
|000021e0| 73 74 61 6e 64 61 72 64 | 2c 20 69 66 20 61 20 72 |standard|, if a r|
|000021f0| 65 63 75 72 73 69 76 65 | 20 6d 61 63 72 6f 20 69 |ecursive| macro i|
|00002200| 73 20 65 6e 63 6f 75 6e | 74 65 72 65 64 20 69 74 |s encoun|tered it|
|00002210| 20 69 73 20 6e 6f 74 20 | 66 75 72 74 68 65 72 20 | is not |further |
|00002220| 65 78 70 61 6e 64 65 64 | 2c 20 65 2e 67 2e 06 23 |expanded|, e.g..#|
|00002230| 64 65 66 69 6e 65 20 4f | 4e 45 09 28 54 57 4f 2d |define O|NE.(TWO-|
|00002240| 31 29 07 23 64 65 66 69 | 6e 65 20 54 57 4f 09 28 |1).#defi|ne TWO.(|
|00002250| 4f 4e 45 2b 31 29 06 54 | 68 69 73 20 63 6f 75 6c |ONE+1).T|his coul|
|00002260| 64 20 6c 65 61 64 20 74 | 6f 20 61 20 72 65 63 75 |d lead t|o a recu|
|00002270| 72 73 69 76 65 20 65 78 | 70 61 6e 73 69 6f 6e 2c |rsive ex|pansion,|
|00002280| 20 65 2e 67 2e 20 77 68 | 65 6e 20 65 78 70 61 6e | e.g. wh|en expan|
|00002290| 64 69 6e 67 20 54 57 4f | 20 69 74 20 77 6f 75 6c |ding TWO| it woul|
|000022a0| 64 20 6c 65 61 64 20 74 | 6f 3a 06 54 57 4f 07 28 |d lead t|o:.TWO.(|
|000022b0| 4f 4e 45 2b 31 29 07 28 | 28 54 57 4f 2d 31 29 2b |ONE+1).(|(TWO-1)+|
|000022c0| 31 29 07 28 28 28 4f 4e | 45 2b 31 29 2d 31 29 2b |1).(((ON|E+1)-1)+|
|000022d0| 31 29 07 65 74 63 2e 06 | 54 68 65 20 41 4e 53 49 |1).etc..|The ANSI|
|000022e0| 20 73 74 61 6e 64 61 72 | 64 20 73 74 61 74 65 73 | standar|d states|
|000022f0| 20 74 68 61 74 20 74 68 | 65 20 65 78 70 61 6e 73 | that th|e expans|
|00002300| 69 6f 6e 20 77 69 6c 6c | 20 74 65 72 6d 69 6e 61 |ion will| termina|
|00002310| 74 65 20 61 74 20 74 68 | 65 20 76 61 6c 75 65 20 |te at th|e value |
|00002320| 28 28 54 57 4f 2d 31 29 | 2b 31 29 2e 06 41 6c 74 |((TWO-1)|+1)..Alt|
|00002330| 68 6f 75 67 68 20 61 74 | 20 66 69 72 73 74 20 73 |hough at| first s|
|00002340| 69 74 65 20 74 68 65 20 | 61 62 6f 76 65 20 72 65 |ite the |above re|
|00002350| 63 75 72 73 69 76 65 20 | 6d 61 63 72 6f 20 64 65 |cursive |macro de|
|00002360| 66 69 6e 69 74 69 6f 6e | 20 77 6f 75 6c 64 20 61 |finition| would a|
|00002370| 70 70 65 61 72 20 74 6f | 20 62 65 20 70 6f 69 6e |ppear to| be poin|
|00002380| 74 6c 65 73 73 2c 20 69 | 74 20 64 6f 65 73 20 68 |tless, i|t does h|
|00002390| 61 76 65 20 69 74 73 20 | 75 73 65 73 2c 20 61 73 |ave its |uses, as|
|000023a0| 20 64 65 6d 6f 6e 73 74 | 72 61 74 65 64 20 62 65 | demonst|rated be|
|000023b0| 6c 6f 77 3a 06 23 64 65 | 66 69 6e 65 20 4f 50 45 |low:.#de|fine OPE|
|000023c0| 4e 20 50 52 49 4e 54 20 | 93 44 45 42 55 47 20 4d |N PRINT |.DEBUG M|
|000023d0| 45 53 53 41 47 45 3a 6f | 70 65 6e 69 6e 67 20 66 |ESSAGE:o|pening f|
|000023e0| 69 6c 65 94 20 3a 4f 50 | 45 4e 06 49 6e 20 74 68 |ile. :OP|EN.In th|
|000023f0| 65 20 61 62 6f 76 65 20 | 63 61 73 65 20 74 68 65 |e above |case the|
|00002400| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 4f 50 50 20 63 | followi|ng OPP c|
|00002410| 6f 64 65 2e 2e 2e 06 4f | 50 45 4e 20 93 66 69 6c |ode....O|PEN .fil|
|00002420| 65 2e 6f 70 64 94 2c 61 | 2c 61 24 2c 62 24 06 2e |e.opd.,a|,a$,b$..|
|00002430| 2e 2e 77 6f 75 6c 64 20 | 65 78 70 61 6e 64 20 74 |..would |expand t|
|00002440| 6f 2e 2e 2e 06 50 52 49 | 4e 54 20 93 44 45 42 55 |o....PRI|NT .DEBU|
|00002450| 47 20 4d 45 53 53 41 47 | 45 3a 20 6f 70 65 6e 69 |G MESSAG|E: openi|
|00002460| 6e 67 20 66 69 6c 65 94 | 20 3a 4f 50 45 4e 20 93 |ng file.| :OPEN .|
|00002470| 66 69 6c 65 2e 6f 70 64 | 94 2c 61 2c 61 24 2c 62 |file.opd|.,a,a$,b|
|00002480| 24 06 4e 6f 74 65 20 74 | 68 61 74 20 74 68 65 20 |$.Note t|hat the |
|00002490| 4f 50 45 4e 20 6d 61 63 | 72 6f 20 61 62 6f 76 65 |OPEN mac|ro above|
|000024a0| 20 63 6f 75 6c 64 20 61 | 6c 73 6f 20 62 65 20 77 | could a|lso be w|
|000024b0| 72 69 74 74 65 6e 20 6d | 6f 72 65 20 63 6c 65 61 |ritten m|ore clea|
|000024c0| 72 6c 79 20 61 73 3a 06 | 23 64 65 66 69 6e 65 20 |rly as:.|#define |
|000024d0| 4f 50 45 4e 09 09 09 09 | 09 09 20 09 09 09 09 20 |OPEN....|.. .... |
|000024e0| 5c 07 09 50 52 49 4e 54 | 20 93 44 45 42 55 47 20 |\..PRINT| .DEBUG |
|000024f0| 4d 45 53 53 41 47 45 3a | 6f 70 65 6e 69 6e 67 20 |MESSAGE:|opening |
|00002500| 66 69 6c 65 94 09 3a 5c | 07 09 4f 50 45 4e 06 41 |file..:\|..OPEN.A|
|00002510| 20 6c 69 6e 65 20 63 6f | 6e 74 69 6e 75 61 74 69 | line co|ntinuati|
|00002520| 6f 6e 20 63 68 61 72 61 | 63 74 65 72 20 69 73 20 |on chara|cter is |
|00002530| 75 73 65 64 20 69 6e 20 | 74 68 65 20 61 62 6f 76 |used in |the abov|
|00002540| 65 20 6d 61 63 72 6f 20 | 64 65 66 69 6e 69 74 69 |e macro |definiti|
|00002550| 6f 6e 2e 20 49 66 20 74 | 68 65 20 93 5c 94 20 63 |on. If t|he .\. c|
|00002560| 68 61 72 61 63 74 65 72 | 20 69 73 20 74 68 65 20 |haracter| is the |
|00002570| 76 65 72 79 20 6c 61 73 | 74 20 63 68 61 72 61 63 |very las|t charac|
|00002580| 74 65 72 20 6f 6e 20 61 | 20 6c 69 6e 65 20 4f 50 |ter on a| line OP|
|00002590| 50 20 64 72 6f 70 73 20 | 74 68 65 20 93 5c 94 20 |P drops |the .\. |
|000025a0| 63 68 61 72 61 63 74 65 | 72 20 61 6e 64 20 63 6f |characte|r and co|
|000025b0| 6e 63 61 74 65 6e 61 74 | 65 73 20 74 68 65 20 6c |ncatenat|es the l|
|000025c0| 69 6e 65 20 77 69 74 68 | 20 74 68 65 20 66 6f 6c |ine with| the fol|
|000025d0| 6c 6f 77 69 6e 67 20 6c | 69 6e 65 20 74 6f 20 70 |lowing l|ine to p|
|000025e0| 72 6f 64 75 63 65 20 6f | 6e 65 20 6c 6f 6e 67 20 |roduce o|ne long |
|000025f0| 6c 69 6e 65 2e 20 4d 75 | 6c 74 69 70 6c 65 20 73 |line. Mu|ltiple s|
|00002600| 70 61 63 65 73 20 6f 72 | 20 74 61 62 73 20 61 74 |paces or| tabs at|
|00002610| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | the beg|inning o|
|00002620| 66 20 74 68 65 20 6c 69 | 6e 65 20 66 6f 6c 6c 6f |f the li|ne follo|
|00002630| 77 69 6e 67 20 74 68 65 | 20 93 5c 94 20 61 72 65 |wing the| .\. are|
|00002640| 20 72 65 70 6c 61 63 65 | 64 20 77 69 74 68 20 61 | replace|d with a|
|00002650| 20 73 69 6e 67 6c 65 20 | 73 70 61 63 65 20 6f 72 | single |space or|
|00002660| 20 74 61 62 20 63 68 61 | 72 61 63 74 65 72 2e 20 | tab cha|racter. |
|00002670| 54 68 65 20 74 6f 74 61 | 6c 20 6c 65 6e 67 74 68 |The tota|l length|
|00002680| 20 6f 66 20 61 20 6c 69 | 6e 65 20 63 6f 6e 73 69 | of a li|ne consi|
|00002690| 73 74 69 6e 67 20 6f 66 | 20 63 6f 6e 63 61 74 65 |sting of| concate|
|000026a0| 6e 61 74 65 64 20 6c 69 | 6e 65 73 20 6d 75 73 74 |nated li|nes must|
|000026b0| 20 6e 6f 74 20 65 78 63 | 65 65 64 20 32 35 35 20 | not exc|eed 255 |
|000026c0| 63 68 61 72 61 63 74 65 | 72 73 2e 20 54 68 65 20 |characte|rs. The |
|000026d0| 93 3a 94 20 63 68 61 72 | 61 63 74 65 72 20 69 73 |.:. char|acter is|
|000026e0| 20 72 65 71 75 69 72 65 | 64 20 62 79 20 74 68 65 | require|d by the|
|000026f0| 20 4f 50 4c 20 74 72 61 | 6e 73 6c 61 74 6f 72 20 | OPL tra|nslator |
|00002700| 69 6e 20 74 68 65 20 61 | 62 6f 76 65 20 65 78 61 |in the a|bove exa|
|00002710| 6d 70 6c 65 20 74 6f 20 | 73 65 70 61 72 61 74 65 |mple to |separate|
|00002720| 20 6d 75 6c 74 69 70 6c | 65 20 73 74 61 74 65 6d | multipl|e statem|
|00002730| 65 6e 74 73 20 6f 6e 20 | 6f 6e 65 20 6c 69 6e 65 |ents on |one line|
|00002740| 2e 06 54 68 65 20 6c 69 | 6e 65 20 63 6f 6e 74 69 |..The li|ne conti|
|00002750| 6e 75 61 74 69 6f 6e 20 | 63 68 61 72 61 63 74 65 |nuation |characte|
|00002760| 72 20 6d 61 79 20 62 65 | 20 75 73 65 64 20 69 6e |r may be| used in|
|00002770| 20 6c 6f 6e 67 20 6f 72 | 20 6d 75 6c 74 69 2d 73 | long or| multi-s|
|00002780| 74 61 74 65 6d 65 6e 74 | 20 6d 61 63 72 6f 20 64 |tatement| macro d|
|00002790| 65 66 69 6e 69 74 69 6f | 6e 73 20 28 61 73 20 61 |efinitio|ns (as a|
|000027a0| 62 6f 76 65 29 20 6f 72 | 20 69 6e 20 6e 6f 72 6d |bove) or| in norm|
|000027b0| 61 6c 20 4f 50 4c 20 63 | 6f 64 65 2c 20 65 2e 67 |al OPL c|ode, e.g|
|000027c0| 2e 06 64 63 68 6f 69 63 | 65 20 93 43 68 6f 69 63 |..dchoic|e .Choic|
|000027d0| 65 94 2c 09 93 56 61 6c | 75 65 31 2c 09 5c 07 09 |e.,..Val|ue1,.\..|
|000027e0| 09 09 09 09 09 09 20 56 | 61 6c 75 65 32 2c 09 5c |...... V|alue2,.\|
|000027f0| 07 09 09 09 09 09 09 09 | 20 56 61 6c 75 65 33 94 |........| Value3.|
|00002800| 06 33 2e 32 2e 09 44 65 | 66 69 6e 69 6e 67 20 66 |.3.2..De|fining f|
|00002810| 75 6e 63 74 69 6f 6e 20 | 6d 61 63 72 6f 73 06 4d |unction |macros.M|
|00002820| 61 63 72 6f 20 66 75 6e | 63 74 69 6f 6e 73 20 61 |acro fun|ctions a|
|00002830| 72 65 20 61 6e 20 65 78 | 74 65 6e 73 69 6f 6e 20 |re an ex|tension |
|00002840| 6f 66 20 74 68 65 20 73 | 69 6d 70 6c 65 20 6d 61 |of the s|imple ma|
|00002850| 63 72 6f 73 20 64 65 73 | 63 72 69 62 65 64 20 69 |cros des|cribed i|
|00002860| 6e 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 73 |n the pr|evious s|
|00002870| 65 63 74 69 6f 6e 2e 20 | 54 68 65 79 20 61 72 65 |ection. |They are|
|00002880| 20 61 6e 61 6c 6f 67 6f | 75 73 20 74 6f 20 4f 50 | analogo|us to OP|
|00002890| 4c 20 70 72 6f 63 65 64 | 75 72 65 73 20 69 6e 20 |L proced|ures in |
|000028a0| 74 68 61 74 20 74 68 65 | 79 20 74 61 6b 65 20 61 |that the|y take a|
|000028b0| 72 67 75 6d 65 6e 74 73 | 2e 20 46 6f 72 20 65 78 |rguments|. For ex|
|000028c0| 61 6d 70 6c 65 3a 06 23 | 64 65 66 69 6e 65 20 47 |ample:.#|define G|
|000028d0| 54 3f 28 61 2c 62 29 09 | 69 66 20 28 61 3c 3d 62 |T?(a,b).|if (a<=b|
|000028e0| 29 09 09 09 09 3a 5c 07 | 09 09 09 09 70 72 69 6e |)....:\.|....prin|
|000028f0| 74 20 61 2c 94 3e 93 2c | 62 2c 94 66 61 69 6c 65 |t a,.>.,|b,.faile|
|00002900| 64 94 09 09 3a 5c 07 09 | 09 09 65 6e 64 69 66 06 |d...:\..|..endif.|
|00002910| 57 69 74 68 20 74 68 65 | 20 61 62 6f 76 65 20 64 |With the| above d|
|00002920| 65 66 69 6e 69 74 69 6f | 6e 20 74 68 65 20 66 6f |efinitio|n the fo|
|00002930| 6c 6c 6f 77 69 6e 67 20 | 4f 50 50 20 63 6f 64 65 |llowing |OPP code|
|00002940| 2e 2e 2e 2e 06 47 54 3f | 28 78 25 2c 30 29 06 2e |.....GT?|(x%,0)..|
|00002950| 2e 2e 77 6f 75 6c 64 20 | 65 78 70 61 6e 64 20 74 |..would |expand t|
|00002960| 6f 2e 2e 2e 06 69 66 20 | 28 78 25 3c 3d 30 29 20 |o....if |(x%<=0) |
|00002970| 3a 70 72 69 6e 74 20 78 | 25 2c 94 3e 94 2c 30 2c |:print x|%,.>.,0,|
|00002980| 94 66 61 69 6c 65 64 94 | 20 3a 65 6e 64 69 66 06 |.failed.| :endif.|
|00002990| 54 6f 20 64 65 66 69 6e | 65 20 61 20 6d 61 63 72 |To defin|e a macr|
|000029a0| 6f 20 66 75 6e 63 74 69 | 6f 6e 20 6d 61 6b 65 20 |o functi|on make |
|000029b0| 73 75 72 65 20 74 68 61 | 74 20 74 68 65 20 93 28 |sure tha|t the .(|
|000029c0| 93 20 66 6f 6c 6c 6f 77 | 73 20 69 6d 6d 65 64 69 |. follow|s immedi|
|000029d0| 61 74 65 6c 79 20 61 66 | 74 65 72 20 74 68 65 20 |ately af|ter the |
|000029e0| 6d 61 63 72 6f 20 66 75 | 6e 63 74 69 6f 6e 20 6e |macro fu|nction n|
|000029f0| 61 6d 65 2e 20 54 68 69 | 73 20 69 73 20 66 6f 6c |ame. Thi|s is fol|
|00002a00| 6c 6f 77 65 64 20 62 79 | 20 61 20 63 6f 6d 6d 61 |lowed by| a comma|
|00002a10| 20 73 65 70 61 72 61 74 | 65 64 20 6c 69 73 74 20 | separat|ed list |
|00002a20| 6f 66 20 66 75 6e 63 74 | 69 6f 6e 20 76 61 72 69 |of funct|ion vari|
|00002a30| 61 62 6c 65 73 20 74 65 | 72 6d 69 6e 61 74 65 64 |ables te|rminated|
|00002a40| 20 62 79 20 61 20 93 29 | 94 2e 20 41 20 6d 61 63 | by a .)|.. A mac|
|00002a50| 72 6f 20 66 75 6e 63 74 | 69 6f 6e 20 6d 61 79 20 |ro funct|ion may |
|00002a60| 68 61 76 65 20 61 6e 79 | 20 6e 75 6d 62 65 72 20 |have any| number |
|00002a70| 6f 66 20 61 72 67 75 6d | 65 6e 74 73 20 62 65 74 |of argum|ents bet|
|00002a80| 77 65 65 6e 20 30 20 61 | 6e 64 20 32 30 20 69 6e |ween 0 a|nd 20 in|
|00002a90| 63 6c 75 73 69 76 65 2e | 06 45 61 63 68 20 6f 63 |clusive.|.Each oc|
|00002aa0| 63 75 72 72 65 6e 63 65 | 20 6f 66 20 61 20 66 75 |currence| of a fu|
|00002ab0| 6e 63 74 69 6f 6e 20 61 | 72 67 75 6d 65 6e 74 20 |nction a|rgument |
|00002ac0| 77 69 74 68 69 6e 20 74 | 68 65 20 6d 61 63 72 6f |within t|he macro|
|00002ad0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 69 73 20 72 | definit|ion is r|
|00002ae0| 65 70 6c 61 63 65 64 20 | 62 79 20 74 68 65 20 61 |eplaced |by the a|
|00002af0| 73 73 6f 63 69 61 74 65 | 64 20 76 61 6c 75 65 20 |ssociate|d value |
|00002b00| 77 68 65 6e 20 74 68 65 | 20 6d 61 63 72 6f 20 69 |when the| macro i|
|00002b10| 73 20 65 78 70 61 6e 64 | 65 64 2e 06 4c 69 6b 65 |s expand|ed..Like|
|00002b20| 20 73 69 6d 70 6c 65 20 | 6d 61 63 72 6f 73 2c 20 | simple |macros, |
|00002b30| 61 20 6d 61 63 72 6f 20 | 66 75 6e 63 74 69 6f 6e |a macro |function|
|00002b40| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 6d 61 79 20 | definit|ion may |
|00002b50| 69 6e 63 6c 75 64 65 20 | 6f 74 68 65 72 20 6d 61 |include |other ma|
|00002b60| 63 72 6f 73 2c 20 66 6f | 72 20 65 78 61 6d 70 6c |cros, fo|r exampl|
|00002b70| 65 3a 06 23 64 65 66 69 | 6e 65 20 41 58 09 09 09 |e:.#defi|ne AX...|
|00002b80| 09 09 61 78 72 65 67 25 | 07 23 64 65 66 69 6e 65 |..axreg%|.#define|
|00002b90| 20 4f 53 46 4c 41 47 53 | 09 09 09 6f 73 66 6c 61 | OSFLAGS|...osfla|
|00002ba0| 67 73 25 07 23 64 65 66 | 69 6e 65 20 4f 53 46 4e |gs%.#def|ine OSFN|
|00002bb0| 28 66 6e 29 09 09 4f 53 | 46 4c 41 47 53 3d 6f 73 |(fn)..OS|FLAGS=os|
|00002bc0| 28 66 6e 2c 61 64 64 72 | 28 41 58 29 29 07 23 64 |(fn,addr|(AX)).#d|
|00002bd0| 65 66 69 6e 65 20 4f 53 | 53 55 42 28 66 6e 2c 73 |efine OS|SUB(fn,s|
|00002be0| 75 62 29 09 41 58 3d 73 | 75 62 20 3a 4f 53 46 4e |ub).AX=s|ub :OSFN|
|00002bf0| 28 66 6e 29 06 55 73 69 | 6e 67 20 73 6f 6d 65 20 |(fn).Usi|ng some |
|00002c00| 6f 66 20 74 68 65 20 61 | 62 6f 76 65 20 6d 61 63 |of the a|bove mac|
|00002c10| 72 6f 73 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ros the |followin|
|00002c20| 67 20 63 6f 64 65 20 64 | 65 6d 6f 6e 73 74 72 61 |g code d|emonstra|
|00002c30| 74 65 73 20 68 6f 77 20 | 74 6f 20 61 63 63 65 73 |tes how |to acces|
|00002c40| 73 20 61 6e 20 4f 53 20 | 63 61 6c 6c 20 69 6e 20 |s an OS |call in |
|00002c50| 74 68 65 20 50 73 69 6f | 6e 20 45 50 4f 43 31 36 |the Psio|n EPOC16|
|00002c60| 20 52 4f 4d 20 75 73 69 | 6e 67 20 61 20 6d 61 63 | ROM usi|ng a mac|
|00002c70| 72 6f 20 66 75 6e 63 74 | 69 6f 6e 20 28 74 68 65 |ro funct|ion (the|
|00002c80| 20 66 75 6c 6c 20 6d 61 | 63 72 6f 20 64 65 66 69 | full ma|cro defi|
|00002c90| 6e 69 74 69 6f 6e 73 20 | 61 70 70 65 61 72 20 69 |nitions |appear i|
|00002ca0| 6e 20 74 68 65 20 73 75 | 70 70 6c 69 65 64 20 69 |n the su|pplied i|
|00002cb0| 6e 63 6c 75 64 65 20 66 | 69 6c 65 73 20 4f 53 5c |nclude f|iles OS\|
|00002cc0| 63 61 6c 6c 2e 6f 70 68 | 20 61 6e 64 20 6f 73 5c |call.oph| and os\|
|00002cd0| 67 65 6e 2e 6f 70 68 29 | 3a 06 23 69 6e 63 6c 75 |gen.oph)|:.#inclu|
|00002ce0| 64 65 20 3c 6f 73 5c 67 | 65 6e 3e 07 23 69 6e 63 |de <os\g|en>.#inc|
|00002cf0| 6c 75 64 65 20 3c 6f 73 | 5c 63 61 6c 6c 3e 07 50 |lude <os|\call>.P|
|00002d00| 52 4f 43 20 6d 61 69 6e | 3a 07 09 6c 6f 63 61 6c |ROC main|:..local|
|00002d10| 20 4f 53 52 45 47 53 07 | 09 4f 53 53 55 42 28 47 | OSREGS.|.OSSUB(G|
|00002d20| 65 6e 4d 61 6e 61 67 65 | 72 2c 47 65 6e 47 65 74 |enManage|r,GenGet|
|00002d30| 52 61 6d 53 69 7a 65 49 | 6e 50 61 72 61 73 29 07 |RamSizeI|nParas).|
|00002d40| 09 70 72 69 6e 74 20 2d | 28 41 58 2f 36 34 29 3b |.print -|(AX/64);|
|00002d50| 94 4b 20 52 41 4d 94 07 | 09 67 65 74 07 45 4e 44 |.K RAM..|.get.END|
|00002d60| 50 06 54 68 65 72 65 20 | 69 73 20 61 20 62 75 69 |P.There |is a bui|
|00002d70| 6c 74 20 69 6e 20 6d 61 | 63 72 6f 20 66 75 6e 63 |lt in ma|cro func|
|00002d80| 74 69 6f 6e 20 63 61 6c | 6c 65 64 20 4f 50 50 45 |tion cal|led OPPE|
|00002d90| 56 41 4c 28 29 20 77 68 | 69 63 68 20 74 61 6b 65 |VAL() wh|ich take|
|00002da0| 73 20 6f 6e 65 20 61 72 | 67 75 6d 65 6e 74 2e 20 |s one ar|gument. |
|00002db0| 57 68 65 6e 20 70 72 65 | 2d 70 72 6f 63 65 73 73 |When pre|-process|
|00002dc0| 69 6e 67 20 61 20 66 69 | 6c 65 20 74 68 65 20 61 |ing a fi|le the a|
|00002dd0| 72 67 75 6d 65 6e 74 20 | 69 73 20 65 76 61 6c 75 |rgument |is evalu|
|00002de0| 61 74 65 64 20 62 79 20 | 4f 50 50 2c 20 66 6f 72 |ated by |OPP, for|
|00002df0| 20 65 78 61 6d 70 6c 65 | 2c 20 67 6f 69 6e 67 20 | example|, going |
|00002e00| 62 61 63 6b 20 74 6f 20 | 74 68 65 20 65 78 61 6d |back to |the exam|
|00002e10| 70 6c 65 20 69 6e 20 74 | 68 65 20 70 72 65 76 69 |ple in t|he previ|
|00002e20| 6f 75 73 20 73 65 63 74 | 69 6f 6e 3a 06 23 64 65 |ous sect|ion:.#de|
|00002e30| 66 69 6e 65 20 57 49 44 | 54 48 09 35 07 23 64 65 |fine WID|TH.5.#de|
|00002e40| 66 69 6e 65 20 48 45 49 | 47 48 54 09 31 30 07 23 |fine HEI|GHT.10.#|
|00002e50| 64 65 66 69 6e 65 20 53 | 49 5a 45 09 28 57 49 44 |define S|IZE.(WID|
|00002e60| 54 48 2a 48 45 49 47 48 | 54 29 07 6c 6f 63 61 6c |TH*HEIGH|T).local|
|00002e70| 20 61 72 72 61 79 25 28 | 4f 50 50 45 56 41 4c 28 | array%(|OPPEVAL(|
|00002e80| 53 49 5a 45 29 29 06 54 | 68 65 20 4f 50 50 45 56 |SIZE)).T|he OPPEV|
|00002e90| 41 4c 28 29 20 66 75 6e | 63 74 69 6f 6e 20 69 73 |AL() fun|ction is|
|00002ea0| 20 72 65 71 75 69 72 65 | 64 20 69 6e 20 6f 72 64 | require|d in ord|
|00002eb0| 65 72 20 74 6f 20 65 76 | 61 6c 75 61 74 65 20 28 |er to ev|aluate (|
|00002ec0| 35 2a 31 30 29 20 73 69 | 6e 63 65 20 6f 74 68 65 |5*10) si|nce othe|
|00002ed0| 72 77 69 73 65 20 4f 50 | 50 20 77 6f 75 6c 64 20 |rwise OP|P would |
|00002ee0| 70 61 73 73 20 74 68 65 | 20 6c 69 6e 65 20 61 73 |pass the| line as|
|00002ef0| 20 66 6f 6c 6c 6f 77 73 | 20 74 6f 20 74 68 65 20 | follows| to the |
|00002f00| 4f 50 4c 20 74 72 61 6e | 73 6c 61 74 6f 72 3a 06 |OPL tran|slator:.|
|00002f10| 6c 6f 63 61 6c 20 61 72 | 72 61 79 25 28 28 35 2a |local ar|ray%((5*|
|00002f20| 31 30 29 29 06 54 68 69 | 73 20 77 6f 75 6c 64 20 |10)).Thi|s would |
|00002f30| 66 61 69 6c 20 73 69 6e | 63 65 20 74 68 65 20 4f |fail sin|ce the O|
|00002f40| 50 4c 20 74 72 61 6e 73 | 6c 61 74 6f 72 20 63 61 |PL trans|lator ca|
|00002f50| 6e 20 6f 6e 6c 79 20 68 | 61 6e 64 6c 65 20 73 69 |n only h|andle si|
|00002f60| 6d 70 6c 65 20 6e 75 6d | 62 65 72 73 20 69 6e 20 |mple num|bers in |
|00002f70| 61 6e 20 61 72 72 61 79 | 20 64 69 6d 65 6e 73 69 |an array| dimensi|
|00002f80| 6f 6e 2e 06 54 68 65 20 | 4f 50 50 45 56 41 4c 28 |on..The |OPPEVAL(|
|00002f90| 29 20 6d 61 63 72 6f 20 | 6d 61 79 20 61 6c 73 6f |) macro |may also|
|00002fa0| 20 62 65 20 75 73 65 64 | 20 74 6f 20 65 76 61 6c | be used| to eval|
|00002fb0| 75 61 74 65 20 61 6e 20 | 65 78 70 72 65 73 73 69 |uate an |expressi|
|00002fc0| 6f 6e 20 61 74 20 74 72 | 61 6e 73 6c 61 74 69 6f |on at tr|anslatio|
|00002fd0| 6e 20 74 69 6d 65 20 72 | 61 74 68 65 72 20 74 68 |n time r|ather th|
|00002fe0| 61 6e 20 61 74 20 72 75 | 6e 20 74 69 6d 65 20 66 |an at ru|n time f|
|00002ff0| 6f 72 20 70 65 72 66 6f | 72 6d 61 6e 63 65 20 61 |or perfo|rmance a|
|00003000| 6e 64 20 73 70 61 63 65 | 20 72 65 61 73 6f 6e 73 |nd space| reasons|
|00003010| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 3a 06 23 |, for ex|ample:.#|
|00003020| 64 65 66 69 6e 65 20 46 | 4c 41 47 4d 41 53 4b 20 |define F|LAGMASK |
|00003030| 4f 50 50 45 56 41 4c 28 | 46 4c 41 47 31 20 4f 52 |OPPEVAL(|FLAG1 OR|
|00003040| 20 46 4c 41 47 32 20 4f | 52 20 46 4c 41 47 33 29 | FLAG2 O|R FLAG3)|
|00003050| 06 49 66 20 74 68 65 20 | 4f 50 50 45 56 41 4c 28 |.If the |OPPEVAL(|
|00003060| 29 20 66 75 6e 63 74 69 | 6f 6e 20 77 61 73 20 6e |) functi|on was n|
|00003070| 6f 74 20 70 72 65 73 65 | 6e 74 20 69 6e 20 74 68 |ot prese|nt in th|
|00003080| 65 20 61 62 6f 76 65 20 | 64 65 66 69 6e 69 74 69 |e above |definiti|
|00003090| 6f 6e 20 74 68 65 6e 20 | 66 6f 72 20 65 76 65 72 |on then |for ever|
|000030a0| 79 20 6f 63 63 75 72 72 | 65 6e 63 65 20 6f 66 20 |y occurr|ence of |
|000030b0| 46 4c 41 47 4d 41 53 4b | 20 77 69 74 68 69 6e 20 |FLAGMASK| within |
|000030c0| 74 68 65 20 4f 50 4c 20 | 73 6f 75 72 63 65 20 61 |the OPL |source a|
|000030d0| 20 63 61 6c 63 75 6c 61 | 74 69 6f 6e 20 77 6f 75 | calcula|tion wou|
|000030e0| 6c 64 20 62 65 20 72 65 | 71 75 69 72 65 64 20 61 |ld be re|quired a|
|000030f0| 74 20 72 75 6e 20 74 69 | 6d 65 2e 06 33 2e 33 2e |t run ti|me..3.3.|
|00003100| 09 4e 6f 74 65 73 20 6f | 6e 20 6d 61 63 72 6f 20 |.Notes o|n macro |
|00003110| 65 78 70 61 6e 73 69 6f | 6e 20 06 57 68 65 6e 20 |expansio|n .When |
|00003120| 70 72 65 2d 70 72 6f 63 | 65 73 73 69 6e 67 20 61 |pre-proc|essing a|
|00003130| 20 6c 69 6e 65 20 4f 50 | 50 20 6c 6f 6f 6b 73 20 | line OP|P looks |
|00003140| 66 6f 72 20 6d 61 63 72 | 6f 20 73 79 6d 62 6f 6c |for macr|o symbol|
|00003150| 73 20 64 65 6c 69 6d 69 | 74 65 64 20 62 79 20 63 |s delimi|ted by c|
|00003160| 65 72 74 61 69 6e 20 63 | 68 61 72 61 63 74 65 72 |ertain c|haracter|
|00003170| 73 2e 20 54 68 65 20 63 | 6f 6d 70 6c 65 74 65 20 |s. The c|omplete |
|00003180| 73 65 74 20 6f 66 20 63 | 68 61 72 61 63 74 65 72 |set of c|haracter|
|00003190| 73 20 69 73 3a 06 28 09 | 2c 09 2d 09 3c 09 3a 09 |s is:.(.|,.-.<.:.|
|000031a0| 53 50 41 43 45 06 29 09 | 3d 09 2a 09 3e 09 7c 09 |SPACE.).|=.*.>.|.|
|000031b0| 54 41 42 06 3b 09 2b 09 | 2f 09 23 09 21 09 53 54 |TAB.;.+.|/.#.!.ST|
|000031c0| 41 52 54 2f 45 4e 44 20 | 4f 46 20 4c 49 4e 45 09 |ART/END |OF LINE.|
|000031d0| 2e 09 09 09 09 09 06 54 | 68 65 20 73 61 6d 65 20 |.......T|he same |
|000031e0| 64 65 6c 69 6d 69 74 65 | 72 73 20 61 72 65 20 61 |delimite|rs are a|
|000031f0| 6c 73 6f 20 75 73 65 64 | 20 77 68 65 6e 20 4f 50 |lso used| when OP|
|00003200| 50 20 6c 6f 6f 6b 73 20 | 66 6f 72 20 61 72 67 75 |P looks |for argu|
|00003210| 6d 65 6e 74 20 76 61 72 | 69 61 62 6c 65 73 20 77 |ment var|iables w|
|00003220| 69 74 68 69 6e 20 61 20 | 6d 61 63 72 6f 20 66 75 |ithin a |macro fu|
|00003230| 6e 63 74 69 6f 6e 20 64 | 65 66 69 6e 69 74 69 6f |nction d|efinitio|
|00003240| 6e 2e 06 57 68 65 6e 20 | 74 68 65 20 70 72 65 2d |n..When |the pre-|
|00003250| 70 72 6f 63 65 73 73 6f | 72 20 65 6e 63 6f 75 6e |processo|r encoun|
|00003260| 74 65 72 73 20 61 6e 79 | 20 73 74 72 69 6e 67 73 |ters any| strings|
|00003270| 20 74 68 65 79 20 61 72 | 65 20 63 6f 70 69 65 64 | they ar|e copied|
|00003280| 20 64 69 72 65 63 74 6c | 79 20 77 69 74 68 6f 75 | directl|y withou|
|00003290| 74 20 70 72 65 2d 70 72 | 6f 63 65 73 73 69 6e 67 |t pre-pr|ocessing|
|000032a0| 2e 06 54 61 6b 65 20 74 | 68 65 20 66 6f 6c 6c 6f |..Take t|he follo|
|000032b0| 77 69 6e 67 20 6d 61 63 | 72 6f 20 64 65 66 69 6e |wing mac|ro defin|
|000032c0| 69 74 69 6f 6e 2e 2e 2e | 06 23 64 65 66 69 6e 65 |ition...|.#define|
|000032d0| 20 54 45 53 54 20 31 06 | 2e 2e 2e 74 68 65 6e 20 | TEST 1.|...then |
|000032e0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 65 78 |the foll|owing ex|
|000032f0| 61 6d 70 6c 65 73 20 64 | 65 6d 6f 6e 73 74 72 61 |amples d|emonstra|
|00003300| 74 65 20 77 68 61 74 20 | 77 69 6c 6c 20 61 6e 64 |te what |will and|
|00003310| 20 77 69 6c 6c 20 6e 6f | 74 20 62 65 20 65 78 70 | will no|t be exp|
|00003320| 61 6e 64 65 64 3a 06 70 | 72 69 6e 74 20 28 54 45 |anded:.p|rint (TE|
|00003330| 53 54 2b 31 29 09 54 45 | 53 54 20 65 78 70 61 6e |ST+1).TE|ST expan|
|00003340| 64 65 64 06 70 72 69 6e | 74 20 28 54 65 73 74 2b |ded.prin|t (Test+|
|00003350| 31 29 09 54 65 73 74 20 | 6e 6f 74 20 65 78 70 61 |1).Test |not expa|
|00003360| 6e 64 65 64 20 2d 20 6d | 61 63 72 6f 73 20 61 72 |nded - m|acros ar|
|00003370| 65 20 63 61 73 65 20 73 | 65 6e 73 69 74 69 76 65 |e case s|ensitive|
|00003380| 20 06 70 72 69 6e 74 20 | 28 54 45 53 54 25 2b 31 | .print |(TEST%+1|
|00003390| 29 09 54 45 53 54 20 6e | 6f 74 20 65 78 70 61 6e |).TEST n|ot expan|
|000033a0| 64 65 64 20 73 69 6e 63 | 65 20 25 20 69 73 20 6e |ded sinc|e % is n|
|000033b0| 6f 74 20 61 20 64 65 6c | 69 6d 69 74 65 72 20 06 |ot a del|imiter .|
|000033c0| 70 72 69 6e 74 20 93 54 | 45 53 54 94 09 09 54 45 |print .T|EST...TE|
|000033d0| 53 54 20 6e 6f 74 20 65 | 78 70 61 6e 64 65 64 20 |ST not e|xpanded |
|000033e0| 2d 20 61 6e 79 20 73 74 | 72 69 6e 67 73 20 61 72 |- any st|rings ar|
|000033f0| 65 20 6e 6f 74 20 70 72 | 65 2d 70 72 6f 63 65 73 |e not pr|e-proces|
|00003400| 73 65 64 06 33 2e 34 2e | 09 55 6e 64 65 66 69 6e |sed.3.4.|.Undefin|
|00003410| 69 6e 67 20 6d 61 63 72 | 6f 73 06 41 20 6d 61 63 |ing macr|os.A mac|
|00003420| 72 6f 20 64 65 66 69 6e | 69 74 69 6f 6e 20 6d 61 |ro defin|ition ma|
|00003430| 79 20 62 65 20 72 65 6d | 6f 76 65 64 20 75 73 69 |y be rem|oved usi|
|00003440| 6e 67 20 74 68 65 20 23 | 75 6e 64 65 66 20 64 69 |ng the #|undef di|
|00003450| 72 65 63 74 69 76 65 20 | 66 6f 6c 6c 6f 77 65 64 |rective |followed|
|00003460| 20 62 79 20 74 68 65 20 | 6d 61 63 72 6f 20 6e 61 | by the |macro na|
|00003470| 6d 65 2c 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 3a |me, for |example:|
|00003480| 06 23 64 65 66 69 6e 65 | 20 44 45 42 55 47 07 23 |.#define| DEBUG.#|
|00003490| 64 65 66 69 6e 65 20 4d | 4f 44 28 61 2c 62 29 09 |define M|OD(a,b).|
|000034a0| 28 61 2d 28 61 2f 62 29 | 2a 62 29 07 23 75 6e 64 |(a-(a/b)|*b).#und|
|000034b0| 65 66 20 44 45 42 55 47 | 07 23 75 6e 64 65 66 20 |ef DEBUG|.#undef |
|000034c0| 4d 4f 44 06 33 2e 35 2e | 09 42 75 69 6c 74 2d 69 |MOD.3.5.|.Built-i|
|000034d0| 6e 20 6d 61 63 72 6f 73 | 20 06 4f 50 50 20 69 6e |n macros| .OPP in|
|000034e0| 63 6c 75 64 65 73 20 61 | 20 6e 75 6d 62 65 72 20 |cludes a| number |
|000034f0| 6f 66 20 70 72 65 2d 64 | 65 66 69 6e 65 64 20 62 |of pre-d|efined b|
|00003500| 75 69 6c 74 2d 69 6e 20 | 6d 61 63 72 6f 73 3a 06 |uilt-in |macros:.|
|00003510| 4d 61 63 72 6f 09 09 09 | 50 75 72 70 6f 73 65 20 |Macro...|Purpose |
|00003520| 26 20 45 78 61 6d 70 6c | 65 20 6f 66 20 76 61 6c |& Exampl|e of val|
|00003530| 75 65 06 5f 5f 46 49 4c | 45 5f 5f 09 09 09 4e 61 |ue.__FIL|E__...Na|
|00003540| 6d 65 20 6f 66 20 66 69 | 6c 65 20 62 65 69 6e 67 |me of fi|le being|
|00003550| 20 74 72 61 6e 73 6c 61 | 74 65 64 2c 20 93 4c 4f | transla|ted, .LO|
|00003560| 43 3a 3a 4d 3a 5c 4f 50 | 50 5c 54 45 53 54 2e 4f |C::M:\OP|P\TEST.O|
|00003570| 50 50 94 06 5f 5f 4c 49 | 4e 45 5f 5f 09 09 4c 69 |PP..__LI|NE__..Li|
|00003580| 6e 65 20 6e 75 6d 62 65 | 72 20 62 65 69 6e 67 20 |ne numbe|r being |
|00003590| 74 72 61 6e 73 6c 61 74 | 65 64 2c 20 32 33 06 5f |translat|ed, 23._|
|000035a0| 5f 44 41 54 45 5f 5f 09 | 09 44 61 74 65 20 6f 66 |_DATE__.|.Date of|
|000035b0| 20 74 72 61 6e 73 6c 61 | 74 69 6f 6e 2c 20 93 4d | transla|tion, .M|
|000035c0| 61 79 20 31 30 20 31 39 | 39 35 94 06 5f 5f 54 49 |ay 10 19|95..__TI|
|000035d0| 4d 45 5f 5f 09 09 54 69 | 6d 65 20 6f 66 20 74 72 |ME__..Ti|me of tr|
|000035e0| 61 6e 73 6c 61 74 69 6f | 6e 2c 20 93 32 33 3a 35 |anslatio|n, .23:5|
|000035f0| 33 3a 30 36 94 06 5f 5f | 50 52 4f 43 5f 5f 09 09 |3:06..__|PROC__..|
|00003600| 4e 61 6d 65 20 6f 66 20 | 63 75 72 72 65 6e 74 20 |Name of |current |
|00003610| 70 72 6f 63 65 64 75 72 | 65 2c 20 93 6d 61 69 6e |procedur|e, .main|
|00003620| 94 06 4f 50 50 09 09 09 | 09 4f 50 50 20 76 65 72 |..OPP...|.OPP ver|
|00003630| 73 69 6f 6e 20 6e 75 6d | 62 65 72 2c 20 24 32 30 |sion num|ber, $20|
|00003640| 46 06 50 73 69 6f 6e 2a | 09 09 09 09 49 6e 64 69 |F.Psion*|....Indi|
|00003650| 63 61 74 65 73 20 74 72 | 61 6e 73 6c 61 74 69 6e |cates tr|anslatin|
|00003660| 67 20 6f 6e 20 61 20 50 | 73 69 6f 6e 09 06 44 4f |g on a P|sion..DO|
|00003670| 53 09 09 09 09 49 6e 64 | 69 63 61 74 65 73 20 74 |S....Ind|icates t|
|00003680| 72 61 6e 73 6c 61 74 69 | 6e 67 20 6f 6e 20 61 20 |ranslati|ng on a |
|00003690| 50 43 09 06 58 54 72 61 | 6e 2a 09 09 09 53 65 74 |PC..XTra|n*...Set|
|000036a0| 20 69 66 20 74 72 61 6e | 73 6c 61 74 69 6e 67 20 | if tran|slating |
|000036b0| 66 6f 72 20 53 33 20 6f | 6e 20 61 20 53 33 61 09 |for S3 o|n a S3a.|
|000036c0| 06 4f 73 56 65 72 73 69 | 6f 6e 2a 09 09 50 73 69 |.OsVersi|on*..Psi|
|000036d0| 6f 6e 20 4f 53 20 76 65 | 72 73 69 6f 6e 20 6e 75 |on OS ve|rsion nu|
|000036e0| 6d 62 65 72 2c 20 33 2e | 31 38 46 3d 09 24 33 31 |mber, 3.|18F=.$31|
|000036f0| 38 46 06 52 6f 6d 56 65 | 72 73 69 6f 6e 2a 09 09 |8F.RomVe|rsion*..|
|00003700| 50 73 69 6f 6e 20 52 4f | 4d 20 76 65 72 73 69 6f |Psion RO|M versio|
|00003710| 6e 20 6e 75 6d 62 65 72 | 2c 20 33 2e 32 30 46 3d |n number|, 3.20F=|
|00003720| 09 24 33 32 30 46 06 50 | 73 75 54 79 70 65 2a 09 |.$320F.P|suType*.|
|00003730| 09 09 50 6f 77 65 72 20 | 73 75 70 70 6c 79 20 74 |..Power |supply t|
|00003740| 79 70 65 20 30 3d 6f 6c | 64 20 4d 43 2c 20 31 3d |ype 0=ol|d MC, 1=|
|00003750| 4d 43 2c 20 32 3d 53 65 | 72 69 65 73 20 33 2c 20 |MC, 2=Se|ries 3, |
|00003760| 33 3d 53 65 72 69 65 73 | 20 33 61 09 33 06 4c 63 |3=Series| 3a.3.Lc|
|00003770| 64 54 79 70 65 2a 09 09 | 09 4c 43 44 20 74 79 70 |dType*..|.LCD typ|
|00003780| 65 2c 20 31 31 3d 53 33 | 61 2c 20 31 31 06 4f 50 |e, 11=S3|a, 11.OP|
|00003790| 50 45 56 41 4c 28 29 09 | 09 45 76 61 6c 75 61 74 |PEVAL().|.Evaluat|
|000037a0| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 2c 20 4f 50 |e expres|sion, OP|
|000037b0| 50 45 56 41 4c 28 53 49 | 5a 45 2b 32 29 06 53 49 |PEVAL(SI|ZE+2).SI|
|000037c0| 5a 45 4f 46 28 29 09 09 | 09 53 65 65 20 73 65 63 |ZEOF()..|.See sec|
|000037d0| 74 69 6f 6e 20 6f 6e 20 | 73 74 72 75 63 74 75 72 |tion on |structur|
|000037e0| 65 73 2c 20 53 49 5a 45 | 4f 46 28 6d 79 5f 73 74 |es, SIZE|OF(my_st|
|000037f0| 72 75 63 74 29 06 4f 46 | 46 53 45 54 4f 46 28 29 |ruct).OF|FSETOF()|
|00003800| 09 09 53 65 65 20 73 65 | 63 74 69 6f 6e 20 6f 6e |..See se|ction on|
|00003810| 20 73 74 72 75 63 74 75 | 72 65 73 2c 20 4f 46 46 | structu|res, OFF|
|00003820| 53 45 54 4f 46 28 6d 79 | 5f 73 74 72 75 63 74 2c |SETOF(my|_struct,|
|00003830| 66 69 65 6c 64 29 06 2a | 54 68 65 73 65 20 6d 61 |field).*|These ma|
|00003840| 63 72 6f 73 20 61 72 65 | 20 6f 6e 6c 79 20 61 76 |cros are| only av|
|00003850| 61 69 6c 61 62 6c 65 20 | 77 68 65 6e 20 75 73 69 |ailable |when usi|
|00003860| 6e 67 20 74 68 65 20 50 | 73 69 6f 6e 20 45 50 4f |ng the P|sion EPO|
|00003870| 43 31 36 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 4f |C16 vers|ion of O|
|00003880| 50 50 2e 06 33 2e 36 2e | 09 21 20 73 70 65 63 69 |PP..3.6.|.! speci|
|00003890| 61 6c 20 63 68 61 72 61 | 63 74 65 72 20 06 54 68 |al chara|cter .Th|
|000038a0| 65 20 41 4e 53 49 20 73 | 74 61 6e 64 61 72 64 20 |e ANSI s|tandard |
|000038b0| 64 65 66 69 6e 65 73 20 | 74 68 65 20 23 20 63 68 |defines |the # ch|
|000038c0| 61 72 61 63 74 65 72 20 | 74 6f 20 68 61 76 65 20 |aracter |to have |
|000038d0| 61 20 73 70 65 63 69 61 | 6c 20 6d 65 61 6e 69 6e |a specia|l meanin|
|000038e0| 67 20 77 69 74 68 69 6e | 20 61 20 6d 61 63 72 6f |g within| a macro|
|000038f0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 2e 20 44 75 65 | definit|ion. Due|
|00003900| 20 74 6f 20 74 68 65 20 | 66 61 63 74 20 74 68 61 | to the |fact tha|
|00003910| 74 20 23 20 69 73 20 75 | 73 65 64 20 77 69 74 68 |t # is u|sed with|
|00003920| 69 6e 20 4f 50 4c 2c 20 | 4f 50 50 20 6c 6f 6f 6b |in OPL, |OPP look|
|00003930| 73 20 66 6f 72 20 74 68 | 65 20 63 68 61 72 61 63 |s for th|e charac|
|00003940| 74 65 72 20 21 20 72 61 | 74 68 65 72 20 74 68 61 |ter ! ra|ther tha|
|00003950| 6e 20 23 2e 20 43 6f 6e | 73 69 64 65 72 3a 06 23 |n #. Con|sider:.#|
|00003960| 64 65 66 69 6e 65 20 41 | 53 53 45 52 54 28 65 78 |define A|SSERT(ex|
|00003970| 70 72 29 09 69 66 20 6e | 6f 74 20 28 65 78 70 72 |pr).if n|ot (expr|
|00003980| 29 09 09 09 09 09 3a 5c | 07 09 09 09 09 09 09 09 |).....:\|........|
|00003990| 09 09 70 72 69 6e 74 20 | 21 65 78 70 72 2c 94 66 |..print |!expr,.f|
|000039a0| 61 69 6c 65 64 94 09 3a | 5c 07 09 09 09 09 09 09 |ailed..:|\.......|
|000039b0| 09 09 65 6e 64 69 66 06 | 54 68 65 20 70 72 65 73 |..endif.|The pres|
|000039c0| 65 6e 63 65 20 6f 66 20 | 74 68 65 20 21 20 63 68 |ence of |the ! ch|
|000039d0| 61 72 61 63 74 65 72 20 | 62 65 66 6f 72 65 20 74 |aracter |before t|
|000039e0| 68 65 20 6d 61 63 72 6f | 20 66 75 6e 63 74 69 6f |he macro| functio|
|000039f0| 6e 20 76 61 72 69 61 62 | 6c 65 20 69 6e 73 74 72 |n variab|le instr|
|00003a00| 75 63 74 73 20 4f 50 50 | 20 74 6f 20 71 75 6f 74 |ucts OPP| to quot|
|00003a10| 65 20 74 68 65 20 65 78 | 70 72 65 73 73 69 6f 6e |e the ex|pression|
|00003a20| 20 77 68 65 6e 20 65 78 | 70 61 6e 64 65 64 2e 20 | when ex|panded. |
|00003a30| 54 68 75 73 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |Thus the| followi|
|00003a40| 6e 67 20 6c 69 6e 65 2e | 2e 2e 06 41 53 53 45 52 |ng line.|...ASSER|
|00003a50| 54 28 61 25 3e 30 29 06 | 2e 2e 2e 77 6f 75 6c 64 |T(a%>0).|...would|
|00003a60| 20 65 78 70 61 6e 64 20 | 74 6f 2e 2e 2e 06 69 66 | expand |to....if|
|00003a70| 20 6e 6f 74 20 28 61 25 | 3e 30 29 20 3a 70 72 69 | not (a%|>0) :pri|
|00003a80| 6e 74 20 93 61 25 3e 30 | 94 2c 94 66 61 69 6c 65 |nt .a%>0|.,.faile|
|00003a90| 64 94 20 3a 65 6e 64 69 | 66 06 54 68 69 73 20 6d |d. :endi|f.This m|
|00003aa0| 65 63 68 61 6e 69 73 6d | 20 69 73 20 72 65 71 75 |echanism| is requ|
|00003ab0| 69 72 65 64 20 73 69 6e | 63 65 20 73 69 6d 70 6c |ired sin|ce simpl|
|00003ac0| 79 20 61 64 64 69 6e 67 | 20 71 75 6f 74 65 73 20 |y adding| quotes |
|00003ad0| 61 72 6f 75 6e 64 20 74 | 68 65 20 76 61 72 69 61 |around t|he varia|
|00003ae0| 62 6c 65 20 77 6f 75 6c | 64 20 63 61 75 73 65 20 |ble woul|d cause |
|00003af0| 4f 50 50 20 74 6f 20 63 | 6f 70 79 20 74 68 65 20 |OPP to c|opy the |
|00003b00| 73 74 72 69 6e 67 20 64 | 69 72 65 63 74 6c 79 2c |string d|irectly,|
|00003b10| 20 69 2e 65 2e 20 69 66 | 20 74 68 65 20 64 65 66 | i.e. if| the def|
|00003b20| 69 6e 69 74 69 6f 6e 20 | 77 61 73 2e 2e 2e 06 23 |inition |was....#|
|00003b30| 64 65 66 69 6e 65 20 41 | 53 53 45 52 54 28 65 78 |define A|SSERT(ex|
|00003b40| 70 72 29 09 69 66 20 6e | 6f 74 20 28 65 78 70 72 |pr).if n|ot (expr|
|00003b50| 29 09 09 09 09 09 09 3a | 5c 07 09 09 09 09 09 09 |)......:|\.......|
|00003b60| 09 09 09 70 72 69 6e 74 | 20 93 65 78 70 72 94 2c |...print| .expr.,|
|00003b70| 94 66 61 69 6c 65 64 94 | 09 09 3a 5c 07 09 09 09 |.failed.|..:\....|
|00003b80| 09 09 09 09 09 65 6e 64 | 69 66 06 2e 2e 2e 74 68 |.....end|if....th|
|00003b90| 65 6e 20 74 68 65 20 61 | 62 6f 76 65 20 6c 69 6e |en the a|bove lin|
|00003ba0| 65 20 77 6f 75 6c 64 20 | 65 78 70 61 6e 64 20 74 |e would |expand t|
|00003bb0| 6f 2e 2e 2e 06 69 66 20 | 6e 6f 74 20 28 61 25 3e |o....if |not (a%>|
|00003bc0| 30 29 20 3a 70 72 69 6e | 74 20 93 65 78 70 72 94 |0) :prin|t .expr.|
|00003bd0| 2c 94 66 61 69 6c 65 64 | 94 20 3a 65 6e 64 69 66 |,.failed|. :endif|
|00003be0| 06 33 2e 37 2e 09 21 21 | 20 73 70 65 63 69 61 6c |.3.7..!!| special|
|00003bf0| 20 63 68 61 72 61 63 74 | 65 72 73 20 06 23 23 20 | charact|ers .## |
|00003c00| 69 73 20 61 6e 6f 74 68 | 65 72 20 41 4e 53 49 20 |is anoth|er ANSI |
|00003c10| 73 74 61 6e 64 61 72 64 | 20 74 6f 6b 65 6e 2e 20 |standard| token. |
|00003c20| 41 67 61 69 6e 2c 20 64 | 75 65 20 74 6f 20 74 68 |Again, d|ue to th|
|00003c30| 65 20 75 73 65 20 6f 66 | 20 23 20 62 79 20 4f 50 |e use of| # by OP|
|00003c40| 4c 2c 20 74 68 65 20 70 | 72 65 2d 70 72 6f 63 65 |L, the p|re-proce|
|00003c50| 73 73 6f 72 20 75 73 65 | 73 20 74 68 65 20 69 64 |ssor use|s the id|
|00003c60| 65 6e 74 69 66 69 65 72 | 73 20 21 21 20 69 6e 73 |entifier|s !! ins|
|00003c70| 74 65 61 64 2e 20 43 6f | 6e 73 69 64 65 72 20 74 |tead. Co|nsider t|
|00003c80| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 6d 61 63 |he follo|wing mac|
|00003c90| 72 6f 20 64 65 66 69 6e | 69 74 69 6f 6e 3a 06 23 |ro defin|ition:.#|
|00003ca0| 64 65 66 69 6e 65 20 4d | 28 6e 61 6d 65 29 09 6d |define M|(name).m|
|00003cb0| 6f 64 75 6c 65 21 21 6e | 61 6d 65 21 21 25 3a 06 |odule!!n|ame!!%:.|
|00003cc0| 54 68 65 20 21 21 20 63 | 68 61 72 61 63 74 65 72 |The !! c|haracter|
|00003cd0| 73 20 69 6e 64 69 63 61 | 74 65 20 61 20 64 65 6c |s indica|te a del|
|00003ce0| 69 6d 69 74 65 72 20 66 | 6f 72 20 61 20 6d 61 63 |imiter f|or a mac|
|00003cf0| 72 6f 20 66 75 6e 63 74 | 69 6f 6e 20 61 72 67 75 |ro funct|ion argu|
|00003d00| 6d 65 6e 74 2e 20 4f 50 | 50 20 6e 6f 74 65 73 20 |ment. OP|P notes |
|00003d10| 74 68 65 20 64 65 6c 69 | 6d 69 74 65 72 20 61 6e |the deli|miter an|
|00003d20| 64 20 74 68 65 6e 20 64 | 69 73 63 61 72 64 73 20 |d then d|iscards |
|00003d30| 74 68 65 20 21 21 20 63 | 68 61 72 61 63 74 65 72 |the !! c|haracter|
|00003d40| 73 20 66 72 6f 6d 20 74 | 68 65 20 65 78 70 61 6e |s from t|he expan|
|00003d50| 73 69 6f 6e 2e 20 54 68 | 75 73 20 74 68 65 20 66 |sion. Th|us the f|
|00003d60| 6f 6c 6c 6f 77 69 6e 67 | 2e 2e 2e 06 4d 28 61 29 |ollowing|....M(a)|
|00003d70| 06 2e 2e 2e 77 6f 75 6c | 64 20 65 78 70 61 6e 64 |....woul|d expand|
|00003d80| 20 74 6f 2e 2e 2e 06 6d | 6f 64 75 6c 65 61 25 3a | to....m|odulea%:|
|00003d90| 06 57 69 74 68 6f 75 74 | 20 74 68 65 20 21 21 20 |.Without| the !! |
|00003da0| 4f 50 50 20 77 6f 75 6c | 64 20 6e 6f 74 20 64 65 |OPP woul|d not de|
|00003db0| 74 65 63 74 20 74 68 65 | 20 70 72 65 73 65 6e 63 |tect the| presenc|
|00003dc0| 65 20 6f 66 20 74 68 65 | 20 6e 61 6d 65 20 61 72 |e of the| name ar|
|00003dd0| 67 75 6d 65 6e 74 20 73 | 69 6e 63 65 20 6e 65 69 |gument s|ince nei|
|00003de0| 74 68 65 72 20 93 65 94 | 20 6e 6f 72 20 25 20 61 |ther .e.| nor % a|
|00003df0| 72 65 20 6e 6f 72 6d 61 | 6c 20 64 65 6c 69 6d 69 |re norma|l delimi|
|00003e00| 74 65 72 20 63 68 61 72 | 61 63 74 65 72 73 2e 20 |ter char|acters. |
|00003e10| 06 34 2e 09 43 4f 4e 44 | 49 54 49 4f 4e 53 20 06 |.4..COND|ITIONS .|
|00003e20| 4f 50 4c 20 69 6e 63 6c | 75 64 65 73 20 74 68 65 |OPL incl|udes the|
|00003e30| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 69 66 2c 20 | conditi|ons if, |
|00003e40| 65 6c 73 65 2c 20 65 6c | 73 65 69 66 20 61 6e 64 |else, el|seif and|
|00003e50| 20 65 6e 64 69 66 2e 20 | 4f 50 50 20 68 61 73 20 | endif. |OPP has |
|00003e60| 73 69 6d 69 6c 61 72 20 | 64 69 72 65 63 74 69 76 |similar |directiv|
|00003e70| 65 73 20 23 69 66 2c 20 | 23 69 66 64 65 66 2c 20 |es #if, |#ifdef, |
|00003e80| 23 69 66 6e 64 65 66 2c | 20 23 65 6c 73 65 2c 20 |#ifndef,| #else, |
|00003e90| 23 65 6c 69 66 20 61 6e | 64 20 23 65 6e 64 69 66 |#elif an|d #endif|
|00003ea0| 20 77 68 69 63 68 20 61 | 72 65 20 61 6e 61 6c 6f | which a|re analo|
|00003eb0| 67 6f 75 73 20 74 6f 20 | 4f 50 4c 20 63 6f 6d 6d |gous to |OPL comm|
|00003ec0| 61 6e 64 73 2e 06 55 73 | 69 6e 67 20 63 6f 6e 64 |ands..Us|ing cond|
|00003ed0| 69 74 69 6f 6e 61 6c 20 | 70 72 65 2d 70 72 6f 63 |itional |pre-proc|
|00003ee0| 65 73 73 6f 72 20 64 69 | 72 65 63 74 69 76 65 73 |essor di|rectives|
|00003ef0| 20 70 72 6f 76 69 64 65 | 73 20 63 6f 6e 74 72 6f | provide|s contro|
|00003f00| 6c 20 6f 76 65 72 20 74 | 68 65 20 73 65 63 74 69 |l over t|he secti|
|00003f10| 6f 6e 73 20 6f 66 20 4f | 50 50 20 63 6f 64 65 20 |ons of O|PP code |
|00003f20| 77 68 69 63 68 20 61 72 | 65 20 74 6f 20 62 65 20 |which ar|e to be |
|00003f30| 74 72 61 6e 73 6c 61 74 | 65 64 2e 20 46 6f 72 20 |translat|ed. For |
|00003f40| 65 78 61 6d 70 6c 65 3a | 06 23 64 65 66 69 6e 65 |example:|.#define|
|00003f50| 20 44 45 42 55 47 07 23 | 69 66 64 65 66 20 44 45 | DEBUG.#|ifdef DE|
|00003f60| 42 55 47 09 07 09 70 72 | 69 6e 74 20 93 54 72 61 |BUG...pr|int .Tra|
|00003f70| 6e 73 6c 61 74 65 64 20 | 77 69 74 68 20 62 72 69 |nslated |with bri|
|00003f80| 65 66 20 64 65 62 75 67 | 20 65 6e 61 62 6c 65 64 |ef debug| enabled|
|00003f90| 94 09 07 09 23 69 66 64 | 65 66 20 4d 4f 52 45 44 |....#ifd|ef MORED|
|00003fa0| 45 42 55 47 09 09 07 09 | 09 70 72 69 6e 74 20 93 |EBUG....|.print .|
|00003fb0| 54 72 61 6e 73 6c 61 74 | 65 64 20 77 69 74 68 20 |Translat|ed with |
|00003fc0| 61 64 64 69 74 69 6f 6e | 61 6c 20 64 65 62 75 67 |addition|al debug|
|00003fd0| 20 65 6e 61 62 6c 65 64 | 94 07 09 23 65 6e 64 69 | enabled|...#endi|
|00003fe0| 66 07 23 65 6c 73 65 09 | 07 09 70 72 69 6e 74 20 |f.#else.|..print |
|00003ff0| 93 44 65 62 75 67 20 63 | 6f 64 65 20 6e 6f 74 20 |.Debug c|ode not |
|00004000| 74 72 61 6e 73 6c 61 74 | 65 64 94 07 23 65 6e 64 |translat|ed..#end|
|00004010| 69 66 06 54 68 65 20 23 | 69 66 64 65 66 20 64 69 |if.The #|ifdef di|
|00004020| 72 65 63 74 69 76 65 20 | 74 65 73 74 73 20 66 6f |rective |tests fo|
|00004030| 72 20 74 68 65 20 70 72 | 65 73 65 6e 63 65 20 6f |r the pr|esence o|
|00004040| 66 20 61 20 6d 61 63 72 | 6f 2c 20 69 66 20 69 74 |f a macr|o, if it|
|00004050| 20 65 78 69 73 74 73 20 | 74 68 65 6e 20 74 68 65 | exists |then the|
|00004060| 20 72 65 6d 61 69 6e 69 | 6e 67 20 63 6f 64 65 20 | remaini|ng code |
|00004070| 75 70 20 74 6f 20 61 20 | 6d 61 74 63 68 69 6e 67 |up to a |matching|
|00004080| 20 23 65 6e 64 69 66 20 | 6f 72 20 23 65 6c 73 65 | #endif |or #else|
|00004090| 20 69 73 20 70 61 73 73 | 65 64 20 74 6f 20 74 68 | is pass|ed to th|
|000040a0| 65 20 4f 50 4c 20 74 72 | 61 6e 73 6c 61 74 6f 72 |e OPL tr|anslator|
|000040b0| 2e 20 23 69 66 6e 64 65 | 66 20 68 61 73 20 74 68 |. #ifnde|f has th|
|000040c0| 65 20 6f 70 70 6f 73 69 | 74 65 20 61 66 66 65 63 |e opposi|te affec|
|000040d0| 74 2c 20 69 2e 65 2e 20 | 74 68 65 20 63 6f 6e 64 |t, i.e. |the cond|
|000040e0| 69 74 69 6f 6e 20 69 73 | 20 74 72 75 65 20 69 66 |ition is| true if|
|000040f0| 20 74 68 65 20 6d 61 63 | 72 6f 20 64 6f 65 73 20 | the mac|ro does |
|00004100| 6e 6f 74 20 65 78 69 73 | 74 2e 06 54 68 65 20 63 |not exis|t..The c|
|00004110| 6f 6e 64 69 74 69 6f 6e | 20 93 23 69 66 20 65 78 |ondition| .#if ex|
|00004120| 70 72 65 73 73 69 6f 6e | 94 20 69 73 20 74 72 75 |pression|. is tru|
|00004130| 65 20 69 66 20 74 68 65 | 20 65 78 70 72 65 73 73 |e if the| express|
|00004140| 69 6f 6e 20 65 76 61 6c | 75 61 74 65 73 20 74 6f |ion eval|uates to|
|00004150| 20 74 72 75 65 20 6f 72 | 20 6e 6f 6e 2d 7a 65 72 | true or| non-zer|
|00004160| 6f 2e 20 45 78 61 6d 70 | 6c 65 73 20 6f 66 20 76 |o. Examp|les of v|
|00004170| 61 6c 69 64 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |alid exp|ressions|
|00004180| 20 61 72 65 20 61 73 20 | 66 6f 6c 6c 6f 77 73 3a | are as |follows:|
|00004190| 06 23 69 66 20 44 45 42 | 55 47 5f 4c 45 56 45 4c |.#if DEB|UG_LEVEL|
|000041a0| 20 3e 20 32 07 23 69 66 | 20 4f 73 56 65 72 73 69 | > 2.#if| OsVersi|
|000041b0| 6f 6e 20 3e 3d 20 24 33 | 30 30 07 23 69 66 20 4c |on >= $3|00.#if L|
|000041c0| 63 64 54 79 70 65 20 3d | 20 31 31 07 23 69 66 20 |cdType =| 11.#if |
|000041d0| 28 50 73 75 54 79 70 65 | 20 3d 20 32 29 20 6f 72 |(PsuType| = 2) or|
|000041e0| 20 28 50 73 75 54 79 70 | 65 20 3d 20 33 29 06 54 | (PsuTyp|e = 3).T|
|000041f0| 68 65 20 93 23 65 6c 69 | 66 20 65 78 70 72 65 73 |he .#eli|f expres|
|00004200| 73 69 6f 6e 94 20 6d 61 | 79 20 62 65 20 75 73 65 |sion. ma|y be use|
|00004210| 64 20 61 73 20 66 6f 6c | 6c 6f 77 73 3a 06 23 69 |d as fol|lows:.#i|
|00004220| 66 20 44 45 42 55 47 5f | 4c 45 56 45 4c 20 3d 20 |f DEBUG_|LEVEL = |
|00004230| 31 09 07 09 70 72 69 6e | 74 20 93 64 65 62 75 67 |1...prin|t .debug|
|00004240| 20 6c 65 76 65 6c 20 31 | 94 07 23 65 6c 69 66 20 | level 1|..#elif |
|00004250| 44 45 42 55 47 5f 4c 45 | 56 45 4c 20 3d 20 32 09 |DEBUG_LE|VEL = 2.|
|00004260| 07 09 70 72 69 6e 74 20 | 93 64 65 62 75 67 20 6c |..print |.debug l|
|00004270| 65 76 65 6c 20 32 94 07 | 23 65 6c 69 66 20 44 45 |evel 2..|#elif DE|
|00004280| 42 55 47 5f 4c 45 56 45 | 4c 20 3d 20 33 09 07 09 |BUG_LEVE|L = 3...|
|00004290| 70 72 69 6e 74 20 93 64 | 65 62 75 67 20 6c 65 76 |print .d|ebug lev|
|000042a0| 65 6c 20 33 94 07 23 65 | 6c 73 65 07 09 70 72 69 |el 3..#e|lse..pri|
|000042b0| 6e 74 20 93 6e 6f 20 64 | 65 62 75 67 94 07 23 65 |nt .no d|ebug..#e|
|000042c0| 6e 64 69 66 06 4e 6f 74 | 65 20 74 68 61 74 20 74 |ndif.Not|e that t|
|000042d0| 68 65 20 63 75 72 72 65 | 6e 74 20 72 65 6c 65 61 |he curre|nt relea|
|000042e0| 73 65 20 6f 66 20 4f 50 | 50 20 64 6f 65 73 20 6e |se of OP|P does n|
|000042f0| 6f 74 20 73 75 70 70 6f | 72 74 20 75 73 65 20 6f |ot suppo|rt use o|
|00004300| 66 20 93 64 65 66 69 6e | 65 64 28 29 94 20 69 6e |f .defin|ed(). in|
|00004310| 20 23 69 66 20 6f 72 20 | 23 65 6c 69 66 20 65 78 | #if or |#elif ex|
|00004320| 70 72 65 73 73 69 6f 6e | 73 2e 06 35 2e 09 49 4e |pression|s..5..IN|
|00004330| 43 4c 55 44 45 20 46 49 | 4c 45 53 20 06 4f 74 68 |CLUDE FI|LES .Oth|
|00004340| 65 72 20 4f 50 50 20 66 | 69 6c 65 73 20 6d 61 79 |er OPP f|iles may|
|00004350| 20 62 65 20 69 6e 63 6c | 75 64 65 64 20 69 6e 74 | be incl|uded int|
|00004360| 6f 20 74 68 65 20 66 69 | 6c 65 20 62 65 69 6e 67 |o the fi|le being|
|00004370| 20 74 72 61 6e 73 6c 61 | 74 65 64 20 75 73 69 6e | transla|ted usin|
|00004380| 67 20 74 68 65 20 23 69 | 6e 63 6c 75 64 65 20 64 |g the #i|nclude d|
|00004390| 69 72 65 63 74 69 76 65 | 2e 20 54 68 69 73 20 74 |irective|. This t|
|000043a0| 61 6b 65 73 20 6f 6e 65 | 20 6f 66 20 74 77 6f 20 |akes one| of two |
|000043b0| 66 6f 72 6d 73 20 61 73 | 20 73 68 6f 77 6e 20 69 |forms as| shown i|
|000043c0| 6e 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |n the fo|llowing |
|000043d0| 65 78 61 6d 70 6c 65 73 | 3a 06 23 69 6e 63 6c 75 |examples|:.#inclu|
|000043e0| 64 65 20 3c 6f 73 5c 63 | 61 6c 6c 73 3e 09 07 23 |de <os\c|alls>..#|
|000043f0| 69 6e 63 6c 75 64 65 20 | 93 6d 79 5f 70 72 6f 63 |include |.my_proc|
|00004400| 73 2e 6f 70 68 94 06 54 | 68 65 20 66 69 72 73 74 |s.oph..T|he first|
|00004410| 20 23 69 6e 63 6c 75 64 | 65 20 77 69 6c 6c 20 63 | #includ|e will c|
|00004420| 61 75 73 65 20 74 68 65 | 20 70 72 65 2d 70 72 6f |ause the| pre-pro|
|00004430| 63 65 73 73 6f 72 20 74 | 6f 20 73 65 61 72 63 68 |cessor t|o search|
|00004440| 20 66 6f 72 20 61 20 66 | 69 6c 65 20 69 6e 20 74 | for a f|ile in t|
|00004450| 68 65 20 73 79 73 74 65 | 6d 20 69 6e 63 6c 75 64 |he syste|m includ|
|00004460| 65 20 64 69 72 65 63 74 | 6f 72 79 2e 06 46 6f 72 |e direct|ory..For|
|00004470| 20 74 68 65 20 45 50 4f | 43 33 32 20 76 65 72 73 | the EPO|C32 vers|
|00004480| 69 6f 6e 20 6f 66 20 4f | 50 50 20 74 68 65 20 64 |ion of O|PP the d|
|00004490| 65 66 61 75 6c 74 20 73 | 79 73 74 65 6d 20 69 6e |efault s|ystem in|
|000044a0| 63 6c 75 64 65 20 64 69 | 72 65 63 74 6f 72 79 20 |clude di|rectory |
|000044b0| 69 73 3a 06 43 3a 5c 53 | 79 73 74 65 6d 5c 41 70 |is:.C:\S|ystem\Ap|
|000044c0| 70 73 5c 4f 50 4c 50 6c | 75 73 5c 49 6e 63 6c 75 |ps\OPLPl|us\Inclu|
|000044d0| 64 65 5c 06 2e 2e 2e 74 | 68 69 73 20 6c 6f 63 61 |de\....t|his loca|
|000044e0| 74 69 6f 6e 20 63 61 6e | 20 62 65 20 61 6c 74 65 |tion can| be alte|
|000044f0| 72 65 64 20 66 72 6f 6d | 20 74 68 65 20 4f 50 4c |red from| the OPL|
|00004500| 2b 20 93 50 72 6f 6a 65 | 63 74 2d 3e 46 6f 6c 64 |+ .Proje|ct->Fold|
|00004510| 65 72 73 94 20 6d 65 6e | 75 2e 06 46 6f 72 20 74 |ers. men|u..For t|
|00004520| 68 65 20 45 50 4f 43 31 | 36 20 76 65 72 73 69 6f |he EPOC1|6 versio|
|00004530| 6e 20 6f 66 20 4f 50 50 | 20 74 68 65 20 64 65 66 |n of OPP| the def|
|00004540| 61 75 6c 74 20 73 79 73 | 74 65 6d 20 69 6e 63 6c |ault sys|tem incl|
|00004550| 75 64 65 20 64 69 72 65 | 63 74 6f 72 79 20 69 73 |ude dire|ctory is|
|00004560| 3a 06 4d 3a 5c 4f 50 50 | 5c 49 4e 43 4c 55 44 45 |:.M:\OPP|\INCLUDE|
|00004570| 5c 06 4f 72 20 69 6e 20 | 74 68 65 20 63 61 73 65 |\.Or in |the case|
|00004580| 20 6f 66 20 74 68 65 20 | 4d 53 44 4f 53 20 76 65 | of the |MSDOS ve|
|00004590| 72 73 69 6f 6e 20 74 68 | 65 20 66 69 6c 65 20 77 |rsion th|e file w|
|000045a0| 69 6c 6c 20 62 65 20 73 | 65 61 72 63 68 65 64 20 |ill be s|earched |
|000045b0| 66 6f 72 20 69 6e 20 74 | 68 65 20 64 69 72 65 63 |for in t|he direc|
|000045c0| 74 6f 72 79 85 06 43 3a | 5c 4f 50 50 5c 49 4e 43 |tory..C:|\OPP\INC|
|000045d0| 4c 55 44 45 5c 06 85 75 | 6e 6c 65 73 73 20 74 68 |LUDE\..u|nless th|
|000045e0| 65 20 2d 49 20 6f 70 74 | 69 6f 6e 20 69 73 20 75 |e -I opt|ion is u|
|000045f0| 73 65 64 20 6f 6e 20 74 | 68 65 20 4f 50 50 20 63 |sed on t|he OPP c|
|00004600| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 2c 20 65 2e 67 |ommand l|ine, e.g|
|00004610| 2e 06 4f 50 50 20 2d 69 | 44 3a 5c 50 53 49 4f 4e |..OPP -i|D:\PSION|
|00004620| 5c 4f 50 50 5c 49 4e 43 | 4c 55 44 45 20 54 45 53 |\OPP\INC|LUDE TES|
|00004630| 54 2e 4f 50 50 06 49 66 | 20 74 68 65 20 66 69 6c |T.OPP.If| the fil|
|00004640| 65 20 69 73 20 66 6f 75 | 6e 64 20 69 74 20 77 69 |e is fou|nd it wi|
|00004650| 6c 6c 20 62 65 20 69 6e | 63 6c 75 64 65 64 20 69 |ll be in|cluded i|
|00004660| 6e 74 6f 20 74 68 65 20 | 74 72 61 6e 73 6c 61 74 |nto the |translat|
|00004670| 69 6f 6e 20 61 74 20 74 | 68 61 74 20 70 6f 69 6e |ion at t|hat poin|
|00004680| 74 2e 20 54 68 69 73 20 | 66 6f 72 6d 20 6f 66 20 |t. This |form of |
|00004690| 69 6e 63 6c 75 64 65 20 | 69 73 20 75 73 65 64 20 |include |is used |
|000046a0| 66 6f 72 20 73 79 73 74 | 65 6d 20 69 6e 63 6c 75 |for syst|em inclu|
|000046b0| 64 65 20 66 69 6c 65 73 | 2e 20 54 68 65 73 65 20 |de files|. These |
|000046c0| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 73 20 61 72 |include |files ar|
|000046d0| 65 20 67 65 6e 65 72 69 | 63 20 66 69 6c 65 73 20 |e generi|c files |
|000046e0| 77 68 69 63 68 20 61 72 | 65 20 6e 6f 74 20 77 72 |which ar|e not wr|
|000046f0| 69 74 74 65 6e 20 66 6f | 72 20 61 6e 79 20 6f 6e |itten fo|r any on|
|00004700| 65 20 73 70 65 63 69 66 | 69 63 20 4f 50 50 20 70 |e specif|ic OPP p|
|00004710| 72 6f 67 72 61 6d 2e 06 | 4e 6f 74 65 20 74 68 61 |rogram..|Note tha|
|00004720| 74 20 62 79 20 64 65 66 | 61 75 6c 74 20 74 68 65 |t by def|ault the|
|00004730| 20 4f 50 48 20 65 78 74 | 65 6e 73 69 6f 6e 20 69 | OPH ext|ension i|
|00004740| 73 20 61 73 73 75 6d 65 | 64 20 66 6f 72 20 73 79 |s assume|d for sy|
|00004750| 73 74 65 6d 20 69 6e 63 | 6c 75 64 65 20 66 69 6c |stem inc|lude fil|
|00004760| 65 73 2c 20 61 6c 74 68 | 6f 75 67 68 20 74 68 69 |es, alth|ough thi|
|00004770| 73 20 6d 61 79 20 62 65 | 20 6f 76 65 72 72 69 64 |s may be| overrid|
|00004780| 64 65 6e 20 62 79 20 65 | 78 70 6c 69 63 69 74 6c |den by e|xplicitl|
|00004790| 79 20 73 74 61 74 69 6e | 67 20 74 68 65 20 65 78 |y statin|g the ex|
|000047a0| 74 65 6e 73 69 6f 6e 20 | 69 6e 20 74 68 65 20 69 |tension |in the i|
|000047b0| 6e 63 6c 75 64 65 20 66 | 69 6c 65 6e 61 6d 65 2e |nclude f|ilename.|
|000047c0| 06 54 68 65 20 73 65 63 | 6f 6e 64 20 66 6f 72 6d |.The sec|ond form|
|000047d0| 20 6f 66 20 69 6e 63 6c | 75 64 65 2c 20 77 68 69 | of incl|ude, whi|
|000047e0| 63 68 20 75 73 65 73 20 | 74 68 65 20 64 65 6c 69 |ch uses |the deli|
|000047f0| 6d 69 74 65 72 73 20 93 | 93 20 72 61 74 68 65 72 |miters .|. rather|
|00004800| 20 74 68 61 6e 20 3c 3e | 2c 20 69 73 20 66 6f 72 | than <>|, is for|
|00004810| 20 73 70 65 63 69 66 79 | 69 6e 67 20 69 6e 63 6c | specify|ing incl|
|00004820| 75 64 65 20 66 69 6c 65 | 73 20 77 68 69 63 68 20 |ude file|s which |
|00004830| 61 72 65 20 73 70 65 63 | 69 66 69 63 20 74 6f 20 |are spec|ific to |
|00004840| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 62 65 69 6e |the prog|ram bein|
|00004850| 67 20 74 72 61 6e 73 6c | 61 74 65 64 2e 20 54 68 |g transl|ated. Th|
|00004860| 65 20 70 72 6f 63 65 73 | 73 6f 72 20 77 69 6c 6c |e proces|sor will|
|00004870| 20 64 65 66 61 75 6c 74 | 20 74 6f 20 6c 6f 6f 6b | default| to look|
|00004880| 69 6e 67 20 69 6e 20 74 | 68 65 20 73 61 6d 65 20 |ing in t|he same |
|00004890| 64 69 72 65 63 74 6f 72 | 79 20 61 73 20 74 68 65 |director|y as the|
|000048a0| 20 70 72 6f 67 72 61 6d | 20 62 65 69 6e 67 20 74 | program| being t|
|000048b0| 72 61 6e 73 6c 61 74 65 | 64 20 61 6e 64 20 77 69 |ranslate|d and wi|
|000048c0| 6c 6c 20 6c 6f 6f 6b 20 | 66 6f 72 20 61 20 66 69 |ll look |for a fi|
|000048d0| 6c 65 20 77 69 74 68 20 | 74 68 65 20 73 61 6d 65 |le with |the same|
|000048e0| 20 65 78 74 65 6e 73 69 | 6f 6e 2e 20 41 20 66 75 | extensi|on. A fu|
|000048f0| 6c 6c 20 66 69 6c 65 6e | 61 6d 65 20 77 68 69 63 |ll filen|ame whic|
|00004900| 68 20 69 6e 63 6c 75 64 | 65 73 20 61 20 70 61 74 |h includ|es a pat|
|00004910| 68 20 61 6e 64 20 66 69 | 6c 65 20 65 78 74 65 6e |h and fi|le exten|
|00004920| 73 69 6f 6e 20 6d 61 79 | 20 62 65 20 67 69 76 65 |sion may| be give|
|00004930| 6e 20 74 6f 20 6f 76 65 | 72 72 69 64 65 20 74 68 |n to ove|rride th|
|00004940| 69 73 2e 06 55 73 75 61 | 6c 6c 79 20 69 6e 63 6c |is..Usua|lly incl|
|00004950| 75 64 65 20 66 69 6c 65 | 73 20 6f 6e 6c 79 20 63 |ude file|s only c|
|00004960| 6f 6e 74 61 69 6e 20 70 | 72 65 2d 70 72 6f 63 65 |ontain p|re-proce|
|00004970| 73 73 6f 72 20 64 69 72 | 65 63 74 69 76 65 73 20 |ssor dir|ectives |
|00004980| 73 75 63 68 20 61 73 20 | 6d 61 63 72 6f 20 64 65 |such as |macro de|
|00004990| 66 69 6e 69 74 69 6f 6e | 73 2c 20 69 6e 20 77 68 |finition|s, in wh|
|000049a0| 69 63 68 20 63 61 73 65 | 20 74 68 65 20 66 69 6c |ich case| the fil|
|000049b0| 65 20 65 78 74 65 6e 73 | 69 6f 6e 20 4f 50 48 20 |e extens|ion OPH |
|000049c0| 73 68 6f 75 6c 64 20 62 | 65 20 75 73 65 64 20 72 |should b|e used r|
|000049d0| 61 74 68 65 72 20 74 68 | 61 6e 20 4f 50 50 2e 20 |ather th|an OPP. |
|000049e0| 54 68 65 20 4f 50 48 20 | 65 64 69 74 6f 72 20 69 |The OPH |editor i|
|000049f0| 73 20 73 75 70 70 6c 69 | 65 64 20 74 6f 20 61 6c |s suppli|ed to al|
|00004a00| 6c 6f 77 20 69 6e 63 6c | 75 64 65 20 66 69 6c 65 |low incl|ude file|
|00004a10| 73 20 74 6f 20 62 65 20 | 6c 69 73 74 65 64 20 6f |s to be |listed o|
|00004a20| 6e 20 74 68 65 20 73 79 | 73 74 65 6d 20 73 63 72 |n the sy|stem scr|
|00004a30| 65 65 6e 20 73 65 70 61 | 72 61 74 65 20 66 72 6f |een sepa|rate fro|
|00004a40| 6d 20 61 6e 79 20 4f 50 | 50 20 61 6e 64 20 4f 50 |m any OP|P and OP|
|00004a50| 4c 20 66 69 6c 65 73 2e | 06 4e 6f 74 65 3a 20 4f |L files.|.Note: O|
|00004a60| 6e 20 45 50 4f 43 33 32 | 20 74 68 65 20 4f 50 4c |n EPOC32| the OPL|
|00004a70| 20 74 72 61 6e 73 6c 61 | 74 6f 72 20 73 75 70 70 | transla|tor supp|
|00004a80| 6f 72 74 73 20 74 68 65 | 20 69 6e 63 6c 75 64 65 |orts the| include|
|00004a90| 20 6b 65 79 77 6f 72 64 | 20 6d 61 69 6e 6c 79 20 | keyword| mainly |
|00004aa0| 66 6f 72 20 69 6e 63 6c | 75 64 69 6e 67 20 4f 50 |for incl|uding OP|
|00004ab0| 58 20 68 65 61 64 65 72 | 73 2e 20 49 74 20 69 73 |X header|s. It is|
|00004ac0| 20 69 6d 70 6f 72 74 61 | 6e 74 20 74 6f 20 75 6e | importa|nt to un|
|00004ad0| 64 65 72 73 74 61 6e 64 | 20 74 68 61 74 20 74 68 |derstand| that th|
|00004ae0| 65 20 4f 50 4c 20 69 6e | 63 6c 75 64 65 20 73 74 |e OPL in|clude st|
|00004af0| 61 74 65 6d 65 6e 74 20 | 77 69 6c 6c 20 62 65 20 |atement |will be |
|00004b00| 72 65 61 64 20 61 6e 64 | 20 68 61 6e 64 6c 65 64 |read and| handled|
|00004b10| 20 62 79 20 74 68 65 20 | 4f 50 4c 20 74 72 61 6e | by the |OPL tran|
|00004b20| 73 6c 61 74 6f 72 2c 20 | 61 6e 64 20 74 68 65 20 |slator, |and the |
|00004b30| 23 69 6e 63 6c 75 64 65 | 20 6b 65 79 77 6f 72 64 |#include| keyword|
|00004b40| 20 72 65 61 64 20 61 6e | 64 20 68 61 6e 64 6c 65 | read an|d handle|
|00004b50| 64 20 62 79 20 4f 50 50 | 2e 20 54 68 69 73 20 68 |d by OPP|. This h|
|00004b60| 61 73 20 74 77 6f 20 69 | 6d 70 6f 72 74 61 6e 74 |as two i|mportant|
|00004b70| 20 63 6f 6e 73 65 71 75 | 65 6e 63 65 73 3a 06 41 | consequ|ences:.A|
|00004b80| 6c 77 61 79 73 20 75 73 | 65 20 74 68 65 20 4f 50 |lways us|e the OP|
|00004b90| 4c 20 69 6e 63 6c 75 64 | 65 20 66 6f 72 20 4f 50 |L includ|e for OP|
|00004ba0| 58 20 68 65 61 64 65 72 | 20 66 69 6c 65 73 2c 20 |X header| files, |
|00004bb0| 66 61 69 6c 75 72 65 20 | 74 6f 20 64 6f 20 73 6f |failure |to do so|
|00004bc0| 20 77 69 6c 6c 20 63 6f | 6e 66 75 73 65 20 74 68 | will co|nfuse th|
|00004bd0| 65 20 74 72 61 6e 73 6c | 61 74 6f 72 2e 06 44 6f |e transl|ator..Do|
|00004be0| 20 6e 6f 74 20 61 64 64 | 20 61 6e 79 20 4f 50 50 | not add| any OPP|
|00004bf0| 20 65 78 74 65 6e 73 69 | 6f 6e 73 20 74 6f 20 61 | extensi|ons to a|
|00004c00| 6e 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 20 77 |n includ|e file w|
|00004c10| 68 69 63 68 20 69 73 20 | 69 6e 63 6c 75 64 65 64 |hich is |included|
|00004c20| 20 75 73 69 6e 67 20 74 | 68 65 20 4f 50 4c 20 69 | using t|he OPL i|
|00004c30| 6e 63 6c 75 64 65 20 6b | 65 79 77 6f 72 64 2e 06 |nclude k|eyword..|
|00004c40| 53 79 73 74 65 6d 20 69 | 6e 63 6c 75 64 65 20 66 |System i|nclude f|
|00004c50| 69 6c 65 73 20 66 6f 72 | 20 45 50 4f 43 31 36 20 |iles for| EPOC16 |
|00004c60| 06 41 20 6c 61 72 67 65 | 20 6e 75 6d 62 65 72 20 |.A large| number |
|00004c70| 6f 66 20 73 79 73 74 65 | 6d 20 69 6e 63 6c 75 64 |of syste|m includ|
|00004c80| 65 20 66 69 6c 65 73 20 | 61 72 65 20 73 75 70 70 |e files |are supp|
|00004c90| 6c 69 65 64 20 77 69 74 | 68 20 74 68 65 20 4d 53 |lied wit|h the MS|
|00004ca0| 44 4f 53 20 61 6e 64 20 | 45 50 4f 43 31 36 20 76 |DOS and |EPOC16 v|
|00004cb0| 65 72 73 69 6f 6e 73 20 | 6f 66 20 4f 50 50 20 77 |ersions |of OPP w|
|00004cc0| 69 74 68 20 6c 6f 74 73 | 20 6f 66 20 75 73 65 66 |ith lots| of usef|
|00004cd0| 75 6c 20 70 72 65 2d 64 | 65 66 69 6e 65 64 20 6d |ul pre-d|efined m|
|00004ce0| 61 63 72 6f 20 64 65 66 | 69 6e 69 74 69 6f 6e 73 |acro def|initions|
|00004cf0| 2e 20 4e 6f 74 65 20 74 | 68 61 74 20 63 75 72 72 |. Note t|hat curr|
|00004d00| 65 6e 74 6c 79 20 73 79 | 73 74 65 6d 20 69 6e 63 |ently sy|stem inc|
|00004d10| 6c 75 64 65 20 66 69 6c | 65 73 20 61 72 65 20 6e |lude fil|es are n|
|00004d20| 6f 74 20 73 75 70 70 6c | 69 65 64 20 77 69 74 68 |ot suppl|ied with|
|00004d30| 20 74 68 65 20 45 50 4f | 43 33 32 20 76 65 72 73 | the EPO|C32 vers|
|00004d40| 69 6f 6e 20 6f 66 20 4f | 50 50 2e 06 54 68 65 72 |ion of O|PP..Ther|
|00004d50| 65 20 61 72 65 20 6d 61 | 63 72 6f 20 64 65 66 69 |e are ma|cro defi|
|00004d60| 6e 69 74 69 6f 6e 73 20 | 66 6f 72 20 74 68 65 20 |nitions |for the |
|00004d70| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|00004d80| 20 63 61 6c 6c 73 20 61 | 76 61 69 6c 61 62 6c 65 | calls a|vailable|
|00004d90| 20 69 6e 20 74 68 65 20 | 50 73 69 6f 6e 20 52 4f | in the |Psion RO|
|00004da0| 4d 2c 20 6d 61 63 72 6f | 73 20 75 73 65 64 20 77 |M, macro|s used w|
|00004db0| 69 74 68 20 50 73 69 6f | 6e 92 73 20 4f 4f 50 20 |ith Psio|n.s OOP |
|00004dc0| 6d 65 74 68 6f 64 73 2c | 20 73 79 6d 62 6f 6c 69 |methods,| symboli|
|00004dd0| 63 20 6d 61 63 72 6f 73 | 20 75 73 65 64 20 77 69 |c macros| used wi|
|00004de0| 74 68 20 76 61 72 69 6f | 75 73 20 4f 50 4c 20 63 |th vario|us OPL c|
|00004df0| 6f 6d 6d 61 6e 64 73 20 | 61 6e 64 20 76 61 72 69 |ommands |and vari|
|00004e00| 6f 75 73 20 6f 74 68 65 | 72 20 75 73 65 66 75 6c |ous othe|r useful|
|00004e10| 20 6d 61 63 72 6f 73 2e | 20 46 6f 72 20 65 78 61 | macros.| For exa|
|00004e20| 6d 70 6c 65 3a 06 4d 61 | 63 72 6f 20 6e 61 6d 65 |mple:.Ma|cro name|
|00004e30| 09 09 09 09 50 75 72 70 | 6f 73 65 20 06 45 53 43 |....Purp|ose .ESC|
|00004e40| 09 09 09 09 09 09 09 52 | 65 70 72 65 73 65 6e 74 |.......R|epresent|
|00004e50| 73 20 65 73 63 61 70 65 | 20 63 68 61 72 61 63 74 |s escape| charact|
|00004e60| 65 72 2c 20 32 37 06 50 | 5f 46 55 50 44 41 54 45 |er, 27.P|_FUPDATE|
|00004e70| 09 09 09 09 09 55 73 65 | 64 20 77 69 74 68 20 74 |.....Use|d with t|
|00004e80| 68 65 20 4f 50 4c 20 63 | 6f 6d 6d 61 6e 64 20 69 |he OPL c|ommand i|
|00004e90| 6f 6f 70 65 6e 28 29 06 | 46 69 6c 45 78 65 63 75 |oopen().|FilExecu|
|00004ea0| 74 65 09 09 09 09 09 4f | 53 20 63 61 6c 6c 20 6e |te.....O|S call n|
|00004eb0| 75 6d 62 65 72 06 53 50 | 52 49 4e 54 46 28 62 75 |umber.SP|RINTF(bu|
|00004ec0| 66 2c 66 6f 72 6d 61 74 | 2c 61 72 67 73 29 09 55 |f,format|,args).U|
|00004ed0| 73 65 73 20 4f 53 20 63 | 61 6c 6c 20 61 6c 6f 6e |ses OS c|all alon|
|00004ee0| 67 20 6c 69 6e 65 73 20 | 6f 66 20 43 20 73 70 72 |g lines |of C spr|
|00004ef0| 69 6e 74 66 28 29 06 06 | 54 68 65 20 6d 61 63 72 |intf()..|The macr|
|00004f00| 6f 73 20 61 72 65 20 66 | 6f 72 20 75 73 65 20 77 |os are f|or use w|
|00004f10| 69 74 68 20 45 50 4f 43 | 31 36 20 61 6e 64 20 6f |ith EPOC|16 and o|
|00004f20| 6e 20 74 68 65 20 77 68 | 6f 6c 65 20 77 69 6c 6c |n the wh|ole will|
|00004f30| 20 62 65 20 6f 66 20 6e | 6f 20 75 73 65 20 69 66 | be of n|o use if|
|00004f40| 20 79 6f 75 20 61 72 65 | 20 75 73 69 6e 67 20 4f | you are| using O|
|00004f50| 50 50 20 77 69 74 68 20 | 45 50 4f 43 33 32 20 63 |PP with |EPOC32 c|
|00004f60| 6f 64 65 2e 06 4f 72 69 | 67 69 6e 20 61 6e 64 20 |ode..Ori|gin and |
|00004f70| 6f 72 67 61 6e 69 73 61 | 74 69 6f 6e 20 6f 66 20 |organisa|tion of |
|00004f80| 45 50 4f 43 31 36 20 69 | 6e 63 6c 75 64 65 20 66 |EPOC16 i|nclude f|
|00004f90| 69 6c 65 73 06 53 74 61 | 72 74 69 6e 67 20 66 72 |iles.Sta|rting fr|
|00004fa0| 6f 6d 20 76 65 72 73 69 | 6f 6e 20 31 2e 35 46 20 |om versi|on 1.5F |
|00004fb0| 6f 66 20 4f 50 50 20 74 | 68 65 20 73 79 73 74 65 |of OPP t|he syste|
|00004fc0| 6d 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 73 20 |m includ|e files |
|00004fd0| 75 73 65 64 20 77 69 74 | 68 20 4f 50 50 20 61 72 |used wit|h OPP ar|
|00004fe0| 65 20 62 61 73 65 64 20 | 6f 6e 20 74 68 65 20 73 |e based |on the s|
|00004ff0| 79 73 74 65 6d 20 69 6e | 63 6c 75 64 65 20 66 69 |ystem in|clude fi|
|00005000| 6c 65 73 20 73 75 70 70 | 6c 69 65 64 20 77 69 74 |les supp|lied wit|
|00005010| 68 20 74 68 65 20 50 73 | 69 6f 6e 20 43 20 53 44 |h the Ps|ion C SD|
|00005020| 4b 2e 20 54 68 65 73 65 | 20 66 69 6c 65 73 20 77 |K. These| files w|
|00005030| 65 72 65 20 6f 72 69 67 | 69 6e 61 6c 6c 79 20 63 |ere orig|inally c|
|00005040| 6f 70 79 72 69 67 68 74 | 20 50 73 69 6f 6e 20 61 |opyright| Psion a|
|00005050| 6e 64 20 61 72 65 20 73 | 75 70 70 6c 69 65 64 20 |nd are s|upplied |
|00005060| 77 69 74 68 20 6b 69 6e | 64 20 70 65 72 6d 69 73 |with kin|d permis|
|00005070| 73 69 6f 6e 20 66 72 6f | 6d 20 50 73 69 6f 6e 2e |sion fro|m Psion.|
|00005080| 20 54 68 65 20 4f 50 50 | 20 76 65 72 73 69 6f 6e | The OPP| version|
|00005090| 73 20 6f 66 20 74 68 65 | 20 69 6e 63 6c 75 64 65 |s of the| include|
|000050a0| 20 66 69 6c 65 73 20 63 | 6f 6e 74 61 69 6e 20 65 | files c|ontain e|
|000050b0| 78 61 63 74 6c 79 20 74 | 68 65 20 73 61 6d 65 20 |xactly t|he same |
|000050c0| 6d 61 63 72 6f 73 20 61 | 6e 64 20 73 74 72 75 63 |macros a|nd struc|
|000050d0| 74 75 72 65 73 20 77 68 | 69 63 68 20 61 72 65 20 |tures wh|ich are |
|000050e0| 64 65 66 69 6e 65 64 20 | 69 6e 20 74 68 65 20 53 |defined |in the S|
|000050f0| 44 4b 20 69 6e 63 6c 75 | 64 65 20 66 69 6c 65 73 |DK inclu|de files|
|00005100| 2e 20 54 68 65 20 4f 50 | 50 20 69 6e 63 6c 75 64 |. The OP|P includ|
|00005110| 65 20 66 69 6c 65 73 20 | 61 6c 73 6f 20 68 61 76 |e files |also hav|
|00005120| 65 20 73 69 6d 69 6c 61 | 72 6c 79 20 6e 61 6d 65 |e simila|rly name|
|00005130| 73 20 74 6f 20 74 68 65 | 20 43 20 53 44 4b 20 69 |s to the| C SDK i|
|00005140| 6e 63 6c 75 64 65 20 66 | 69 6c 65 73 2e 20 48 6f |nclude f|iles. Ho|
|00005150| 77 65 76 65 72 20 77 69 | 74 68 20 4f 50 50 20 74 |wever wi|th OPP t|
|00005160| 68 65 20 69 6e 63 6c 75 | 64 65 20 66 69 6c 65 73 |he inclu|de files|
|00005170| 20 61 72 65 20 6f 72 67 | 61 6e 69 73 65 64 20 73 | are org|anised s|
|00005180| 6c 69 67 68 74 6c 79 20 | 64 69 66 66 65 72 65 6e |lightly |differen|
|00005190| 74 6c 79 2e 20 54 68 65 | 20 4f 50 50 20 66 69 6c |tly. The| OPP fil|
|000051a0| 65 73 20 61 72 65 20 73 | 70 6c 69 74 20 69 6e 74 |es are s|plit int|
|000051b0| 6f 20 61 20 6e 75 6d 62 | 65 72 20 6f 66 20 64 69 |o a numb|er of di|
|000051c0| 72 65 63 74 6f 72 69 65 | 73 20 28 69 6e 20 74 68 |rectorie|s (in th|
|000051d0| 65 20 53 44 4b 20 61 6c | 6c 20 61 72 65 20 6c 6f |e SDK al|l are lo|
|000051e0| 63 61 74 65 64 20 69 6e | 20 61 20 73 69 6e 67 6c |cated in| a singl|
|000051f0| 65 20 64 69 72 65 63 74 | 6f 72 79 29 20 61 73 20 |e direct|ory) as |
|00005200| 66 6f 6c 6c 6f 77 73 3a | 06 44 69 72 65 63 74 6f |follows:|.Directo|
|00005210| 72 79 09 09 09 09 09 43 | 6f 6e 74 65 6e 74 73 06 |ry.....C|ontents.|
|00005220| 5c 4f 50 50 5c 49 4e 43 | 4c 55 44 45 5c 4c 49 42 |\OPP\INC|LUDE\LIB|
|00005230| 5c 09 09 4f 50 50 20 6c | 69 62 72 61 72 79 20 66 |\..OPP l|ibrary f|
|00005240| 69 6c 65 73 2e 20 53 65 | 65 20 73 65 63 74 69 6f |iles. Se|e sectio|
|00005250| 6e 20 31 30 2e 33 20 66 | 6f 72 20 64 65 74 61 69 |n 10.3 f|or detai|
|00005260| 6c 73 2e 06 5c 4f 50 50 | 5c 49 4e 43 4c 55 44 45 |ls..\OPP|\INCLUDE|
|00005270| 5c 4f 4f 5c 09 09 4f 4f | 50 20 64 65 66 69 6e 65 |\OO\..OO|P define|
|00005280| 73 2e 20 54 68 65 73 65 | 20 61 72 65 20 75 73 65 |s. These| are use|
|00005290| 64 20 77 68 65 6e 20 6d | 61 6b 69 6e 67 20 75 73 |d when m|aking us|
|000052a0| 65 20 6f 66 20 50 73 69 | 6f 6e 92 73 20 4f 62 6a |e of Psi|on.s Obj|
|000052b0| 65 63 74 20 4f 72 69 65 | 6e 74 65 64 20 50 72 6f |ect Orie|nted Pro|
|000052c0| 67 72 61 6d 6d 69 6e 67 | 20 74 65 63 68 6e 69 71 |gramming| techniq|
|000052d0| 75 65 2e 20 54 68 65 20 | 66 69 6c 65 73 20 69 6e |ue. The |files in|
|000052e0| 63 6c 75 64 65 20 63 61 | 74 65 67 6f 72 79 20 68 |clude ca|tegory h|
|000052f0| 61 6e 64 6c 65 73 20 61 | 6e 64 20 6d 65 74 68 6f |andles a|nd metho|
|00005300| 64 20 6e 75 6d 62 65 72 | 73 2e 20 49 6e 20 74 68 |d number|s. In th|
|00005310| 65 20 53 44 4b 20 74 68 | 65 73 65 20 64 65 66 69 |e SDK th|ese defi|
|00005320| 6e 65 73 20 61 72 65 20 | 6d 69 78 65 64 20 77 69 |nes are |mixed wi|
|00005330| 74 68 20 74 68 65 20 6f | 74 68 65 72 20 66 69 6c |th the o|ther fil|
|00005340| 65 73 2c 20 49 20 68 61 | 76 65 20 73 70 6c 69 74 |es, I ha|ve split|
|00005350| 20 74 68 65 6d 20 6f 75 | 74 20 74 6f 20 72 65 64 | them ou|t to red|
|00005360| 75 63 65 20 74 68 65 20 | 6d 65 6d 6f 72 79 20 72 |uce the |memory r|
|00005370| 65 71 75 69 72 65 6d 65 | 6e 74 73 20 66 6f 72 20 |equireme|nts for |
|00005380| 74 68 65 20 66 69 6c 65 | 73 2e 06 5c 4f 50 50 5c |the file|s..\OPP\|
|00005390| 49 4e 43 4c 55 44 45 5c | 4f 50 50 5c 09 09 4f 50 |INCLUDE\|OPP\..OP|
|000053a0| 50 20 73 70 65 63 69 66 | 69 63 20 61 64 64 69 74 |P specif|ic addit|
|000053b0| 69 6f 6e 73 2e 20 54 68 | 65 73 65 20 61 72 65 20 |ions. Th|ese are |
|000053c0| 6d 79 20 6f 77 6e 20 69 | 6e 63 6c 75 64 65 73 20 |my own i|ncludes |
|000053d0| 77 69 74 68 20 73 6f 6d | 65 20 75 73 65 66 75 6c |with som|e useful|
|000053e0| 20 4f 50 4c 20 73 70 65 | 63 69 66 69 63 20 64 65 | OPL spe|cific de|
|000053f0| 66 69 6e 69 74 69 6f 6e | 73 2e 06 5c 4f 50 50 5c |finition|s..\OPP\|
|00005400| 49 4e 43 4c 55 44 45 5c | 4f 53 5c 09 09 54 68 65 |INCLUDE\|OS\..The|
|00005410| 73 65 20 69 6e 63 6c 75 | 64 65 20 66 69 6c 65 73 |se inclu|de files|
|00005420| 20 63 6f 6e 74 61 69 6e | 20 64 65 66 69 6e 65 73 | contain| defines|
|00005430| 20 75 73 65 64 20 77 68 | 65 6e 20 61 63 63 65 73 | used wh|en acces|
|00005440| 73 69 6e 67 20 74 68 65 | 20 4f 53 20 66 75 6e 63 |sing the| OS func|
|00005450| 74 69 6f 6e 73 20 61 76 | 61 69 6c 61 62 6c 65 20 |tions av|ailable |
|00005460| 69 6e 20 74 68 65 20 50 | 73 69 6f 6e 20 52 4f 4d |in the P|sion ROM|
|00005470| 2e 20 46 75 6e 63 74 69 | 6f 6e 20 61 6e 64 20 73 |. Functi|on and s|
|00005480| 75 62 2d 66 75 6e 63 74 | 69 6f 6e 20 6e 75 6d 62 |ub-funct|ion numb|
|00005490| 65 72 73 20 61 72 65 20 | 64 65 66 69 6e 65 64 2e |ers are |defined.|
|000054a0| 06 5c 4f 50 50 5c 49 4e | 43 4c 55 44 45 5c 50 5c |.\OPP\IN|CLUDE\P\|
|000054b0| 09 09 09 54 68 65 73 65 | 20 61 72 65 20 62 61 73 |...These| are bas|
|000054c0| 65 64 20 65 6e 74 69 72 | 65 6c 79 20 6f 6e 20 74 |ed entir|ely on t|
|000054d0| 68 65 20 53 44 4b 20 70 | 5f 2a 20 69 6e 63 6c 75 |he SDK p|_* inclu|
|000054e0| 64 65 73 2e 20 4e 6f 74 | 65 20 74 68 61 74 20 74 |des. Not|e that t|
|000054f0| 68 65 20 6c 65 61 64 69 | 6e 67 20 70 5f 20 68 61 |he leadi|ng p_ ha|
|00005500| 73 20 62 65 65 6e 20 73 | 74 72 69 70 70 65 64 20 |s been s|tripped |
|00005510| 6f 66 66 20 61 6e 64 20 | 74 68 61 74 20 61 6e 79 |off and |that any|
|00005520| 20 4f 4f 50 20 64 65 66 | 69 6e 65 73 20 72 65 6d | OOP def|ines rem|
|00005530| 6f 76 65 64 20 61 6e 64 | 20 70 6c 61 63 65 64 20 |oved and| placed |
|00005540| 69 6e 20 74 68 65 20 4f | 4f 20 64 69 72 65 63 74 |in the O|O direct|
|00005550| 6f 72 79 20 69 6e 63 6c | 75 64 65 73 20 74 6f 20 |ory incl|udes to |
|00005560| 73 61 76 65 20 6d 65 6d | 6f 72 79 2e 06 5c 4f 50 |save mem|ory..\OP|
|00005570| 50 5c 49 4e 43 4c 55 44 | 45 5c 53 44 4b 5c 09 09 |P\INCLUD|E\SDK\..|
|00005580| 54 68 65 20 72 65 6d 61 | 69 6e 69 6e 67 20 53 44 |The rema|ining SD|
|00005590| 4b 20 69 6e 63 6c 75 64 | 65 73 2e 06 45 50 4f 43 |K includ|es..EPOC|
|000055a0| 31 36 20 4f 4f 20 69 6e | 63 6c 75 64 65 20 66 69 |16 OO in|clude fi|
|000055b0| 6c 65 73 20 06 54 68 65 | 20 69 6e 63 6c 75 64 65 |les .The| include|
|000055c0| 20 66 69 6c 65 73 20 77 | 69 74 68 69 6e 20 74 68 | files w|ithin th|
|000055d0| 65 20 4f 4f 20 64 69 72 | 65 63 74 6f 72 79 20 63 |e OO dir|ectory c|
|000055e0| 6f 6e 74 61 69 6e 20 64 | 65 66 69 6e 69 74 69 6f |ontain d|efinitio|
|000055f0| 6e 73 20 75 73 65 64 20 | 77 69 74 68 20 74 68 65 |ns used |with the|
|00005600| 20 6f 62 6a 65 63 74 20 | 6f 72 69 65 6e 74 65 64 | object |oriented|
|00005610| 20 6c 69 62 72 61 72 69 | 65 73 20 69 6e 20 74 68 | librari|es in th|
|00005620| 65 20 50 73 69 6f 6e 20 | 52 4f 4d 2c 20 69 2e 65 |e Psion |ROM, i.e|
|00005630| 2e 20 63 61 74 65 67 6f | 72 79 20 61 6e 64 20 6d |. catego|ry and m|
|00005640| 65 74 68 6f 64 20 6e 75 | 6d 62 65 72 73 2e 20 54 |ethod nu|mbers. T|
|00005650| 6f 20 75 73 65 20 74 68 | 65 73 65 20 66 69 6c 65 |o use th|ese file|
|00005660| 73 20 79 6f 75 20 6e 65 | 65 64 20 74 6f 20 62 65 |s you ne|ed to be|
|00005670| 20 66 61 6d 69 6c 69 61 | 72 20 77 69 74 68 20 74 | familia|r with t|
|00005680| 68 65 20 4f 62 6a 65 63 | 74 20 4f 72 69 65 6e 74 |he Objec|t Orient|
|00005690| 65 64 20 50 72 6f 67 72 | 61 6d 6d 69 6e 67 20 28 |ed Progr|amming (|
|000056a0| 4f 4f 50 29 20 74 65 63 | 68 6e 69 71 75 65 73 20 |OOP) tec|hniques |
|000056b0| 75 73 65 64 20 77 69 74 | 68 20 74 68 65 20 50 73 |used wit|h the Ps|
|000056c0| 69 6f 6e 2e 20 54 68 65 | 20 50 73 69 6f 6e 20 53 |ion. The| Psion S|
|000056d0| 44 4b 20 63 6f 6e 74 61 | 69 6e 73 20 64 65 74 61 |DK conta|ins deta|
|000056e0| 69 6c 65 64 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |iled inf|ormation|
|000056f0| 20 6f 6e 20 75 73 69 6e | 67 20 4f 4f 50 2e 20 54 | on usin|g OOP. T|
|00005700| 68 65 72 65 20 69 73 20 | 6f 6e 65 20 70 75 62 6c |here is |one publ|
|00005710| 69 63 6c 79 20 61 76 61 | 69 6c 61 62 6c 65 20 73 |icly ava|ilable s|
|00005720| 6f 75 72 63 65 20 6f 66 | 20 69 6e 66 6f 72 6d 61 |ource of| informa|
|00005730| 74 69 6f 6e 20 6f 6e 20 | 75 73 69 6e 67 20 4f 4f |tion on |using OO|
|00005740| 50 20 74 65 63 68 6e 69 | 71 75 65 73 2c 20 74 68 |P techni|ques, th|
|00005750| 69 73 20 69 73 20 69 6e | 20 74 68 65 20 66 6f 72 |is is in| the for|
|00005760| 6d 20 6f 66 20 61 20 4d | 69 63 72 6f 73 6f 66 74 |m of a M|icrosoft|
|00005770| 20 57 6f 72 64 20 66 69 | 6c 65 20 77 68 69 63 68 | Word fi|le which|
|00005780| 20 63 6f 6e 74 61 69 6e | 73 20 61 6e 20 65 61 72 | contain|s an ear|
|00005790| 6c 79 20 63 6f 70 79 20 | 6f 66 20 6f 6e 65 20 6f |ly copy |of one o|
|000057a0| 66 20 74 68 65 20 6d 61 | 6e 75 61 6c 73 20 66 72 |f the ma|nuals fr|
|000057b0| 6f 6d 20 74 68 65 20 53 | 44 4b 2e 20 54 68 69 73 |om the S|DK. This|
|000057c0| 20 6d 61 6e 75 61 6c 20 | 64 69 73 63 75 73 73 65 | manual |discusse|
|000057d0| 73 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 75 73 |s progra|mming us|
|000057e0| 69 6e 67 20 74 68 65 20 | 48 57 49 4d 20 6c 69 62 |ing the |HWIM lib|
|000057f0| 72 61 72 79 20 77 68 69 | 63 68 20 69 73 20 62 75 |rary whi|ch is bu|
|00005800| 69 6c 74 20 69 6e 74 6f | 20 74 68 65 20 50 73 69 |ilt into| the Psi|
|00005810| 6f 6e 20 52 4f 4d 2e 20 | 4d 6f 73 74 20 50 73 69 |on ROM. |Most Psi|
|00005820| 6f 6e 20 61 72 63 68 69 | 76 65 20 73 69 74 65 73 |on archi|ve sites|
|00005830| 20 63 6f 6e 74 61 69 6e | 20 74 68 69 73 20 66 69 | contain| this fi|
|00005840| 6c 65 20 61 73 20 74 68 | 65 20 61 72 63 68 69 76 |le as th|e archiv|
|00005850| 65 20 4f 4f 44 4f 43 32 | 30 31 2e 5a 49 50 2e 06 |e OODOC2|01.ZIP..|
|00005860| 45 50 4f 43 31 36 20 4f | 50 50 20 69 6e 63 6c 75 |EPOC16 O|PP inclu|
|00005870| 64 65 20 66 69 6c 65 73 | 06 54 68 65 20 66 69 6c |de files|.The fil|
|00005880| 65 73 20 69 6e 20 74 68 | 65 20 4f 50 50 20 64 69 |es in th|e OPP di|
|00005890| 72 65 63 74 6f 72 79 20 | 63 6f 6e 74 61 69 6e 20 |rectory |contain |
|000058a0| 6d 61 63 72 6f 73 20 75 | 73 65 64 20 77 69 74 68 |macros u|sed with|
|000058b0| 20 67 65 6e 65 72 61 6c | 20 4f 50 4c 20 63 6f 6d | general| OPL com|
|000058c0| 6d 61 6e 64 73 3a 06 49 | 6e 63 6c 75 64 65 20 66 |mands:.I|nclude f|
|000058d0| 69 6c 65 09 09 55 73 61 | 67 65 06 64 65 62 75 67 |ile..Usa|ge.debug|
|000058e0| 2e 6f 70 68 09 09 09 64 | 65 62 75 67 20 6d 61 63 |.oph...d|ebug mac|
|000058f0| 72 6f 73 20 66 6f 72 20 | 74 72 61 63 69 6e 67 20 |ros for |tracing |
|00005900| 63 6f 64 65 06 64 69 61 | 6c 6f 67 2e 6f 70 68 09 |code.dia|log.oph.|
|00005910| 6d 61 63 72 6f 73 20 75 | 73 65 64 20 77 69 74 68 |macros u|sed with|
|00005920| 20 4f 50 4c 20 64 69 61 | 6c 6f 67 75 65 20 62 6f | OPL dia|logue bo|
|00005930| 78 65 73 06 65 6e 76 61 | 72 73 2e 6f 70 68 09 09 |xes.enva|rs.oph..|
|00005940| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 76 61 72 69 |environm|ent vari|
|00005950| 61 62 6c 65 73 06 67 72 | 61 70 68 69 63 73 2e 6f |ables.gr|aphics.o|
|00005960| 70 68 09 09 6d 61 63 72 | 6f 73 20 75 73 65 64 20 |ph..macr|os used |
|00005970| 77 69 74 68 20 4f 50 4c | 20 67 72 61 70 68 69 63 |with OPL| graphic|
|00005980| 73 20 66 75 6e 63 74 69 | 6f 6e 73 06 68 77 2e 6f |s functi|ons.hw.o|
|00005990| 70 68 09 09 09 64 65 66 | 69 6e 65 73 20 53 33 74 |ph...def|ines S3t|
|000059a0| 20 69 66 20 4f 50 50 20 | 75 73 65 64 20 6f 6e 20 | if OPP |used on |
|000059b0| 53 65 72 69 65 73 20 33 | 2c 20 53 33 61 20 69 73 |Series 3|, S3a is|
|000059c0| 20 75 73 65 64 20 6f 6e | 20 61 20 53 65 72 69 65 | used on| a Serie|
|000059d0| 73 20 33 61 06 6b 65 79 | 73 2e 6f 70 68 09 09 09 |s 3a.key|s.oph...|
|000059e0| 6b 65 79 20 63 6f 64 65 | 20 64 65 66 69 6e 69 74 |key code| definit|
|000059f0| 69 6f 6e 73 2c 20 65 2e | 67 2e 20 23 64 65 66 69 |ions, e.|g. #defi|
|00005a00| 6e 65 20 45 53 43 20 32 | 37 06 6c 69 6d 69 74 73 |ne ESC 2|7.limits|
|00005a10| 2e 6f 70 68 09 09 09 50 | 73 69 6f 6e 20 64 61 74 |.oph...P|sion dat|
|00005a20| 61 74 79 70 65 20 6c 69 | 6d 69 74 73 2c 20 65 2e |atype li|mits, e.|
|00005a30| 67 2e 20 23 64 65 66 69 | 6e 65 20 49 4e 54 5f 4d |g. #defi|ne INT_M|
|00005a40| 41 58 20 33 32 37 36 37 | 06 6d 69 73 63 2e 6f 70 |AX 32767|.misc.op|
|00005a50| 68 09 09 09 76 61 72 69 | 6f 75 73 20 6d 61 63 72 |h...vari|ous macr|
|00005a60| 6f 73 2c 20 65 2e 67 2e | 20 23 64 65 66 69 6e 65 |os, e.g.| #define|
|00005a70| 20 54 52 55 45 20 2d 31 | 06 6f 70 61 2e 6f 70 68 | TRUE -1|.opa.oph|
|00005a80| 09 09 09 75 73 65 64 20 | 77 68 65 6e 20 62 75 69 |...used |when bui|
|00005a90| 6c 64 69 6e 67 20 4f 50 | 41 92 73 2c 20 65 2e 67 |lding OP|A.s, e.g|
|00005aa0| 2e 20 23 64 65 66 69 6e | 65 20 4f 50 41 5f 33 41 |. #defin|e OPA_3A|
|00005ab0| 49 43 4f 4e 20 24 31 30 | 30 30 06 70 72 6f 63 65 |ICON $10|00.proce|
|00005ac0| 73 73 2e 6f 70 68 09 09 | 75 73 65 64 20 77 68 65 |ss.oph..|used whe|
|00005ad0| 6e 20 61 63 63 65 73 73 | 69 6e 67 20 61 20 70 72 |n access|ing a pr|
|00005ae0| 6f 63 65 73 73 65 73 20 | 6c 6f 77 20 6d 65 6d 6f |ocesses |low memo|
|00005af0| 72 79 20 61 64 64 72 65 | 73 73 65 73 06 45 50 4f |ry addre|sses.EPO|
|00005b00| 43 31 36 20 4f 53 20 69 | 6e 63 6c 75 64 65 20 66 |C16 OS i|nclude f|
|00005b10| 69 6c 65 73 20 06 54 68 | 65 72 65 20 61 72 65 20 |iles .Th|ere are |
|00005b20| 61 20 6c 61 72 67 65 20 | 6e 75 6d 62 65 72 20 6f |a large |number o|
|00005b30| 66 20 75 73 65 66 75 6c | 20 6f 70 65 72 61 74 69 |f useful| operati|
|00005b40| 6e 67 20 73 79 73 74 65 | 6d 20 66 75 6e 63 74 69 |ng syste|m functi|
|00005b50| 6f 6e 73 20 61 76 61 69 | 6c 61 62 6c 65 20 69 6e |ons avai|lable in|
|00005b60| 20 74 68 65 20 50 73 69 | 6f 6e 20 52 4f 4d 20 74 | the Psi|on ROM t|
|00005b70| 68 61 74 20 6d 61 79 20 | 63 61 6c 6c 65 64 20 66 |hat may |called f|
|00005b80| 72 6f 6d 20 4f 50 4c 2e | 20 54 68 65 20 4f 50 4c |rom OPL.| The OPL|
|00005b90| 20 63 6f 6d 6d 61 6e 64 | 73 20 43 41 4c 4c 20 61 | command|s CALL a|
|00005ba0| 6e 64 20 4f 53 20 70 72 | 6f 76 69 64 65 20 61 63 |nd OS pr|ovide ac|
|00005bb0| 63 65 73 73 20 74 6f 20 | 74 68 65 73 65 20 66 75 |cess to |these fu|
|00005bc0| 6e 63 74 69 6f 6e 73 2e | 20 57 68 65 6e 20 75 73 |nctions.| When us|
|00005bd0| 69 6e 67 20 74 68 65 73 | 65 20 63 6f 6d 6d 61 6e |ing thes|e comman|
|00005be0| 64 73 20 79 6f 75 20 6e | 65 65 64 20 74 6f 20 6b |ds you n|eed to k|
|00005bf0| 6e 6f 77 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |now the |function|
|00005c00| 20 61 6e 64 20 73 75 62 | 2d 66 75 6e 63 74 69 6f | and sub|-functio|
|00005c10| 6e 20 6e 75 6d 62 65 72 | 73 20 6f 66 20 74 68 65 |n number|s of the|
|00005c20| 20 66 75 6e 63 74 69 6f | 6e 20 79 6f 75 20 61 72 | functio|n you ar|
|00005c30| 65 20 63 61 6c 6c 69 6e | 67 2e 20 46 6f 72 20 65 |e callin|g. For e|
|00005c40| 78 61 6d 70 6c 65 2c 20 | 74 68 65 72 65 20 69 73 |xample, |there is|
|00005c50| 20 61 20 66 75 6e 63 74 | 69 6f 6e 20 63 61 6c 6c | a funct|ion call|
|00005c60| 65 64 20 46 69 6c 45 78 | 65 63 75 74 65 2c 20 77 |ed FilEx|ecute, w|
|00005c70| 68 69 63 68 20 61 6c 6c | 6f 77 73 20 79 6f 75 20 |hich all|ows you |
|00005c80| 74 6f 20 73 74 61 72 74 | 20 61 6e 6f 74 68 65 72 |to start| another|
|00005c90| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 66 72 6f | applica|tion fro|
|00005ca0| 6d 20 4f 50 4c 2c 20 74 | 68 69 73 20 66 75 6e 63 |m OPL, t|his func|
|00005cb0| 74 69 6f 6e 20 69 73 20 | 69 64 65 6e 74 69 66 69 |tion is |identifi|
|00005cc0| 65 64 20 62 79 20 66 75 | 6e 63 74 69 6f 6e 20 6e |ed by fu|nction n|
|00005cd0| 75 6d 62 65 72 20 24 38 | 37 20 61 6e 64 20 73 75 |umber $8|7 and su|
|00005ce0| 62 2d 66 75 6e 63 74 69 | 6f 6e 20 24 30 31 2e 20 |b-functi|on $01. |
|00005cf0| 4f 53 20 63 61 6c 6c 73 | 20 61 72 65 20 67 72 6f |OS calls| are gro|
|00005d00| 75 70 65 64 20 62 79 20 | 66 75 6e 63 74 69 6f 6e |uped by |function|
|00005d10| 20 6e 75 6d 62 65 72 2c | 20 73 6f 20 66 69 6c 65 | number,| so file|
|00005d20| 20 72 65 6c 61 74 65 64 | 20 66 75 6e 63 74 69 6f | related| functio|
|00005d30| 6e 73 20 68 61 76 65 20 | 74 68 65 20 73 61 6d 65 |ns have |the same|
|00005d40| 20 24 38 37 20 66 75 6e | 63 74 69 6f 6e 20 6e 75 | $87 fun|ction nu|
|00005d50| 6d 62 65 72 2e 06 54 68 | 65 20 69 6e 63 6c 75 64 |mber..Th|e includ|
|00005d60| 65 20 66 69 6c 65 73 20 | 77 69 74 68 20 74 68 65 |e files |with the|
|00005d70| 20 4f 53 5c 20 70 72 65 | 66 69 78 20 63 6f 6e 74 | OS\ pre|fix cont|
|00005d80| 61 69 6e 20 4f 53 20 63 | 61 6c 6c 20 66 75 6e 63 |ain OS c|all func|
|00005d90| 74 69 6f 6e 20 61 6e 64 | 20 73 75 62 2d 66 75 6e |tion and| sub-fun|
|00005da0| 63 74 69 6f 6e 20 6e 75 | 6d 62 65 72 73 20 61 6e |ction nu|mbers an|
|00005db0| 64 20 4f 53 20 63 61 6c | 6c 20 6d 61 63 72 6f 73 |d OS cal|l macros|
|00005dc0| 2e 20 54 68 65 73 65 20 | 61 72 65 20 67 72 6f 75 |. These |are grou|
|00005dd0| 70 65 64 20 62 79 20 66 | 75 6e 63 74 69 6f 6e 20 |ped by f|unction |
|00005de0| 6e 75 6d 62 65 72 2c 20 | 73 6f 20 74 68 65 20 66 |number, |so the f|
|00005df0| 69 6c 65 20 72 65 6c 61 | 74 65 64 20 66 75 6e 63 |ile rela|ted func|
|00005e00| 74 69 6f 6e 73 20 61 72 | 65 20 69 6e 20 4f 53 5c |tions ar|e in OS\|
|00005e10| 46 49 4c 2e 4f 50 48 2e | 20 52 61 74 68 65 72 20 |FIL.OPH.| Rather |
|00005e20| 74 68 61 6e 20 77 72 69 | 74 69 6e 67 20 63 6f 64 |than wri|ting cod|
|00005e30| 65 20 75 73 69 6e 67 20 | 74 68 65 20 6e 75 6d 62 |e using |the numb|
|00005e40| 65 72 73 20 24 38 37 20 | 61 6e 64 20 24 30 31 2c |ers $87 |and $01,|
|00005e50| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 6d 61 6b 65 | you sho|uld make|
|00005e60| 20 75 73 65 20 6f 66 20 | 74 68 65 20 23 64 65 66 | use of |the #def|
|00005e70| 69 6e 65 73 20 66 6f 72 | 20 74 68 65 73 65 20 6e |ines for| these n|
|00005e80| 75 6d 62 65 72 73 20 69 | 6e 20 6f 72 64 65 72 20 |umbers i|n order |
|00005e90| 74 6f 20 6d 61 6b 65 20 | 74 68 65 20 63 6f 64 65 |to make |the code|
|00005ea0| 20 6d 6f 72 65 20 72 65 | 61 64 61 62 6c 65 2e 20 | more re|adable. |
|00005eb0| 53 6f 20 69 6e 20 74 68 | 65 20 63 61 73 65 20 6f |So in th|e case o|
|00005ec0| 66 20 74 68 65 20 46 69 | 6c 45 78 65 63 75 74 65 |f the Fi|lExecute|
|00005ed0| 20 66 75 6e 63 74 69 6f | 6e 20 74 68 65 20 66 6f | functio|n the fo|
|00005ee0| 6c 6c 6f 77 69 6e 67 20 | 74 77 6f 20 23 64 65 66 |llowing |two #def|
|00005ef0| 69 6e 65 73 2c 20 77 68 | 69 63 68 20 61 72 65 20 |ines, wh|ich are |
|00005f00| 64 65 63 6c 61 72 65 64 | 20 69 6e 20 4f 53 5c 46 |declared| in OS\F|
|00005f10| 49 4c 2e 4f 50 48 2c 20 | 73 68 6f 75 6c 64 20 62 |IL.OPH, |should b|
|00005f20| 65 20 75 73 65 64 3a 06 | 23 64 65 66 69 6e 65 20 |e used:.|#define |
|00005f30| 46 69 6c 4d 61 6e 61 67 | 65 72 20 24 38 37 06 23 |FilManag|er $87.#|
|00005f40| 64 65 66 69 6e 65 20 46 | 69 6c 45 78 65 63 75 74 |define F|ilExecut|
|00005f50| 65 20 24 30 31 30 30 06 | 54 68 65 20 62 65 73 74 |e $0100.|The best|
|00005f60| 20 73 6f 75 72 63 65 20 | 6f 66 20 69 6e 66 6f 72 | source |of infor|
|00005f70| 6d 61 74 69 6f 6e 20 6f | 6e 20 68 6f 77 20 74 6f |mation o|n how to|
|00005f80| 20 75 73 65 20 50 73 69 | 6f 6e 20 4f 53 20 63 61 | use Psi|on OS ca|
|00005f90| 6c 6c 73 2c 20 64 65 66 | 69 6e 65 73 20 6f 72 20 |lls, def|ines or |
|00005fa0| 70 72 6f 67 72 61 6d 6d | 69 6e 67 20 66 6f 72 20 |programm|ing for |
|00005fb0| 50 73 69 6f 6e 20 69 6e | 20 67 65 6e 65 72 61 6c |Psion in| general|
|00005fc0| 20 69 73 20 74 68 65 20 | 73 6f 66 74 77 61 72 65 | is the |software|
|00005fd0| 20 64 65 76 65 6c 6f 70 | 6d 65 6e 74 20 6b 69 74 | develop|ment kit|
|00005fe0| 20 28 53 44 4b 29 20 61 | 76 61 69 6c 61 62 6c 65 | (SDK) a|vailable|
|00005ff0| 20 66 72 6f 6d 20 50 73 | 69 6f 6e 2e 20 54 68 65 | from Ps|ion. The|
|00006000| 72 65 20 69 73 20 61 6c | 73 6f 20 61 20 70 75 62 |re is al|so a pub|
|00006010| 6c 69 63 6c 79 20 61 76 | 61 69 6c 61 62 6c 65 20 |licly av|ailable |
|00006020| 73 6f 75 72 63 65 20 6f | 66 20 69 6e 66 6f 72 6d |source o|f inform|
|00006030| 61 74 69 6f 6e 20 6f 6e | 20 74 68 65 20 50 73 69 |ation on| the Psi|
|00006040| 6f 6e 20 6f 70 65 72 61 | 74 69 6e 67 20 73 79 73 |on opera|ting sys|
|00006050| 74 65 6d 20 63 61 6c 6c | 73 2e 20 54 68 65 20 93 |tem call|s. The .|
|00006060| 50 73 69 6f 6e 69 63 73 | 20 66 69 6c 65 73 94 20 |Psionics| files. |
|00006070| 69 6e 63 6c 75 64 65 20 | 6d 61 6e 79 20 64 65 74 |include |many det|
|00006080| 61 69 6c 73 20 61 62 6f | 75 74 20 74 68 65 20 4f |ails abo|ut the O|
|00006090| 53 20 63 61 6c 6c 73 20 | 69 6e 20 74 68 65 20 50 |S calls |in the P|
|000060a0| 73 69 6f 6e 20 52 4f 4d | 20 61 73 20 77 65 6c 6c |sion ROM| as well|
|000060b0| 20 61 73 20 66 69 6c 65 | 20 66 6f 72 6d 61 74 73 | as file| formats|
|000060c0| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 69 6e 74 | used by| the int|
|000060d0| 65 72 6e 61 6c 20 61 70 | 70 6c 69 63 61 74 69 6f |ernal ap|plicatio|
|000060e0| 6e 73 2e 20 54 68 65 73 | 65 20 66 69 6c 65 73 20 |ns. Thes|e files |
|000060f0| 61 72 65 20 61 76 61 69 | 6c 61 62 6c 65 20 66 72 |are avai|lable fr|
|00006100| 6f 6d 20 74 68 65 20 75 | 73 75 61 6c 20 61 72 63 |om the u|sual arc|
|00006110| 68 69 76 65 73 20 6f 66 | 20 50 73 69 6f 6e 20 73 |hives of| Psion s|
|00006120| 6f 66 74 77 61 72 65 20 | 28 49 6d 70 65 72 69 61 |oftware |(Imperia|
|00006130| 6c 20 43 6f 6c 6c 65 67 | 65 20 61 72 63 68 69 76 |l Colleg|e archiv|
|00006140| 65 2c 20 46 72 6f 6e 74 | 69 65 72 6e 65 74 2c 20 |e, Front|iernet, |
|00006150| 43 6f 6d 70 75 53 65 72 | 76 65 2c 20 43 49 58 2c |CompuSer|ve, CIX,|
|00006160| 20 33 4c 69 62 2c 2e 2e | 2e 29 2e 20 52 65 66 65 | 3Lib,..|.). Refe|
|00006170| 72 20 74 6f 20 74 68 65 | 73 65 20 66 69 6c 65 73 |r to the|se files|
|00006180| 20 66 6f 72 20 66 75 72 | 74 68 65 72 20 69 6e 66 | for fur|ther inf|
|00006190| 6f 72 6d 61 74 69 6f 6e | 20 6f 6e 20 68 6f 77 20 |ormation| on how |
|000061a0| 74 6f 20 75 73 65 20 74 | 68 65 20 6f 70 65 72 61 |to use t|he opera|
|000061b0| 74 69 6e 67 20 73 79 73 | 74 65 6d 20 63 61 6c 6c |ting sys|tem call|
|000061c0| 73 2e 06 54 68 65 20 66 | 69 6c 65 20 4f 53 5c 43 |s..The f|ile OS\C|
|000061d0| 41 4c 4c 53 2e 4f 50 48 | 20 63 6f 6e 74 61 69 6e |ALLS.OPH| contain|
|000061e0| 73 20 73 6f 6d 65 20 75 | 73 65 66 75 6c 20 6d 61 |s some u|seful ma|
|000061f0| 63 72 6f 73 20 74 6f 20 | 75 73 65 20 77 68 65 6e |cros to |use when|
|00006200| 20 6d 61 6b 69 6e 67 20 | 4f 53 20 63 61 6c 6c 73 | making |OS calls|
|00006210| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 |. For ex|ample, t|
|00006220| 6f 20 64 65 74 65 72 6d | 69 6e 65 20 74 68 65 20 |o determ|ine the |
|00006230| 6c 6f 63 61 6c 65 20 6f | 66 20 74 68 65 20 50 73 |locale o|f the Ps|
|00006240| 69 6f 6e 20 62 65 69 6e | 67 20 75 73 65 64 20 28 |ion bein|g used (|
|00006250| 45 6e 67 6c 69 73 68 2c | 20 47 65 72 6d 61 6e 2c |English,| German,|
|00006260| 20 46 72 65 6e 63 68 2c | 2e 2e 2e 29 20 74 68 65 | French,|...) the|
|00006270| 72 65 20 69 73 20 74 68 | 65 20 47 65 6e 47 65 74 |re is th|e GenGet|
|00006280| 4c 61 6e 67 61 75 67 65 | 20 4f 53 20 63 61 6c 6c |Langauge| OS call|
|00006290| 2e 20 54 6f 20 75 73 65 | 20 74 68 69 73 20 63 61 |. To use| this ca|
|000062a0| 6c 6c 20 77 69 74 68 6f | 75 74 20 4f 50 50 20 79 |ll witho|ut OPP y|
|000062b0| 6f 75 20 77 6f 75 6c 64 | 20 77 72 69 74 65 20 63 |ou would| write c|
|000062c0| 6f 64 65 20 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 06 |ode as f|ollows:.|
|000062d0| 50 52 4f 43 20 67 65 74 | 6c 61 6e 67 3a 07 09 6c |PROC get|lang:..l|
|000062e0| 6f 63 61 6c 20 61 78 72 | 65 67 25 2c 62 78 72 65 |ocal axr|eg%,bxre|
|000062f0| 67 25 2c 63 78 72 65 67 | 25 2c 64 78 72 65 67 25 |g%,cxreg|%,dxreg%|
|00006300| 2c 73 69 72 65 67 25 2c | 64 69 72 65 67 25 2c 6f |,sireg%,|direg%,o|
|00006310| 73 66 6c 61 67 73 25 07 | 09 61 78 72 65 67 25 3d |sflags%.|.axreg%=|
|00006320| 24 31 42 30 30 07 09 6f | 73 66 6c 61 67 73 25 3d |$1B00..o|sflags%=|
|00006330| 4f 53 28 24 38 42 2c 61 | 64 64 72 28 61 78 72 65 |OS($8B,a|ddr(axre|
|00006340| 67 25 29 29 07 09 50 52 | 49 4e 54 20 61 78 72 65 |g%))..PR|INT axre|
|00006350| 67 25 07 45 4e 44 50 06 | 54 68 65 20 66 6f 6c 6c |g%.ENDP.|The foll|
|00006360| 6f 77 69 6e 67 20 73 68 | 6f 77 73 20 68 6f 77 20 |owing sh|ows how |
|00006370| 74 68 65 20 4f 53 5c 43 | 41 4c 4c 2e 4f 50 48 20 |the OS\C|ALL.OPH |
|00006380| 61 6e 64 20 4f 53 5c 47 | 45 4e 2e 4f 50 48 20 66 |and OS\G|EN.OPH f|
|00006390| 69 6c 65 73 20 63 61 6e | 20 62 65 20 75 73 65 64 |iles can| be used|
|000063a0| 20 77 69 74 68 20 4f 50 | 50 20 74 6f 20 64 6f 20 | with OP|P to do |
|000063b0| 74 68 65 20 73 61 6d 65 | 20 74 68 69 6e 67 3a 06 |the same| thing:.|
|000063c0| 23 69 6e 63 6c 75 64 65 | 20 3c 6f 73 5c 63 61 6c |#include| <os\cal|
|000063d0| 6c 3e 07 23 69 6e 63 6c | 75 64 65 20 3c 6f 73 5c |l>.#incl|ude <os\|
|000063e0| 67 65 6e 3e 07 50 52 4f | 43 20 67 65 74 6c 61 6e |gen>.PRO|C getlan|
|000063f0| 67 3a 07 09 6c 6f 63 61 | 6c 20 4f 53 52 45 47 53 |g:..loca|l OSREGS|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.