home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Higher Ed / A-F / Fractal Lab Kit 3.0.sit / Fractal Lab Kit 3.0 / Documentation / TeachText / Manual 3.0 (Part 2) < prev   
MacBinary  |  1994-03-17  |  25.3 KB  |  [TEXT/ttxt]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Mar 17 15:33:12 1994, modified Thu Mar 17 15:33:12 1994, creator SimpleText, type ASCII, 25304 bytes "Manual 3.0 (Part 2)" , at 0x6358 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ttxt]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 4d 61 6e 75 61 6c | 20 33 2e 30 20 28 50 61 |..Manual| 3.0 (Pa|
|00000010| 72 74 20 32 29 00 00 00 | 00 00 00 00 00 00 00 00 |rt 2)...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 74 74 78 | 74 01 00 00 00 00 00 00 |.TEXTttx|t.......|
|00000050| 00 00 00 00 00 62 d8 00 | 00 01 7e a9 ae 6f 08 a9 |.....b..|..~..o..|
|00000060| ae 6f 08 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.o......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 58 d9 00 00 |........|....X...|
|00000080| a5 a5 42 61 73 69 63 20 | 63 6f 6d 6d 61 6e 64 73 |..Basic |commands|
|00000090| 0d 0d 41 20 6c 69 73 74 | 20 6f 66 20 74 68 65 20 |..A list| of the |
|000000a0| 62 61 73 69 63 2c 20 61 | 6e 64 20 6d 6f 73 74 20 |basic, a|nd most |
|000000b0| 69 6e 74 65 72 61 63 74 | 69 76 65 2c 20 63 6f 6d |interact|ive, com|
|000000c0| 6d 61 6e 64 73 20 61 72 | 65 20 70 72 65 73 65 6e |mands ar|e presen|
|000000d0| 74 65 64 20 61 6c 6f 6e | 67 20 77 69 74 68 20 61 |ted alon|g with a|
|000000e0| 6e 20 65 78 61 6d 70 6c | 65 20 6f 66 20 74 68 65 |n exampl|e of the|
|000000f0| 69 72 20 75 73 65 2e 20 | 20 54 68 65 73 65 20 61 |ir use. | These a|
|00000100| 72 65 20 74 68 65 20 6d | 69 6e 69 6d 75 6d 20 63 |re the m|inimum c|
|00000110| 6f 6d 6d 61 6e 64 73 20 | 6e 65 63 65 73 73 61 72 |ommands |necessar|
|00000120| 79 20 74 6f 20 75 73 65 | 20 74 68 65 20 70 72 6f |y to use| the pro|
|00000130| 67 72 61 6d 3a 0d 0d 0d | 64 72 61 77 0d 09 44 72 |gram:...|draw..Dr|
|00000140| 61 77 20 61 20 66 72 61 | 63 74 61 6c 20 62 61 73 |aw a fra|ctal bas|
|00000150| 65 64 20 6f 6e 20 74 68 | 65 20 63 75 72 72 65 6e |ed on th|e curren|
|00000160| 74 20 6d 61 70 73 2e 20 | 20 50 72 65 73 73 20 61 |t maps. | Press a|
|00000170| 20 6b 65 79 20 74 6f 20 | 73 74 6f 70 2e 0d 09 45 | key to |stop...E|
|00000180| 2e 67 2e 09 67 72 65 65 | 6e 20 63 6f 6c 6f 72 20 |.g..gree|n color |
|00000190| 66 65 72 6e 20 64 72 61 | 77 0d 0d 63 64 72 61 77 |fern dra|w..cdraw|
|000001a0| 0d 09 50 6c 6f 74 73 20 | 65 61 63 68 20 6d 61 70 |..Plots |each map|
|000001b0| 20 69 6e 20 61 20 64 69 | 66 66 65 72 65 6e 74 20 | in a di|fferent |
|000001c0| 63 6f 6c 6f 72 2e 0d 09 | 45 2e 67 2e 09 73 70 69 |color...|E.g..spi|
|000001d0| 72 61 6c 20 63 64 72 61 | 77 0d 0d 3c 6e 3e 20 65 |ral cdra|w..<n> e|
|000001e0| 64 69 74 0d 09 45 64 69 | 74 20 74 68 65 20 6e 2d |dit..Edi|t the n-|
|000001f0| 74 68 20 6d 61 70 2e 20 | 20 45 6e 74 65 72 20 61 |th map. | Enter a|
|00000200| 20 6e 65 77 20 76 61 6c | 75 65 20 6f 72 20 70 72 | new val|ue or pr|
|00000210| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 6c 65 |ess retu|rn to le|
|00000220| 61 76 65 20 74 68 65 0d | 09 65 78 69 73 74 69 6e |ave the.|.existin|
|00000230| 67 20 76 61 6c 75 65 20 | 61 73 20 69 73 2e 0d 09 |g value |as is...|
|00000240| 45 2e 67 2e 09 32 20 65 | 64 69 74 0d 09 20 20 61 |E.g..2 e|dit.. a|
|00000250| 20 3d 20 30 2e 35 09 09 | 3f 2d 30 2e 35 09 28 6e | = 0.5..|?-0.5.(n|
|00000260| 65 77 20 76 61 6c 75 65 | 29 0d 09 20 20 62 20 3d |ew value|).. b =|
|00000270| 20 2d 30 2e 35 09 09 3f | 3c 72 65 74 75 72 6e 3e | -0.5..?|<return>|
|00000280| 20 20 20 65 74 63 2e 0d | 0d 7a 65 72 6f 2d 6d 61 | etc..|.zero-ma|
|00000290| 70 73 0d 09 45 72 61 73 | 65 20 61 6c 6c 20 74 77 |ps..Eras|e all tw|
|000002a0| 65 6c 76 65 20 6d 61 70 | 73 2e 0d 09 45 2e 67 2e |elve map|s...E.g.|
|000002b0| 09 7a 65 72 6f 2d 6d 61 | 70 73 0d 0d 3c 63 6f 6c |.zero-ma|ps..<col|
|000002c0| 6f 72 2e 6e 61 6d 65 3e | 20 63 6f 6c 6f 72 0d 09 |or.name>| color..|
|000002d0| 53 65 74 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |Set the |current |
|000002e0| 64 72 61 77 69 6e 67 20 | 63 6f 6c 6f 72 20 74 6f |drawing |color to|
|000002f0| 20 74 68 65 20 63 6f 6c | 6f 72 20 6e 61 6d 65 64 | the col|or named|
|00000300| 2e 20 20 56 61 6c 69 64 | 20 63 6f 6c 6f 72 73 20 |. Valid| colors |
|00000310| 61 72 65 0d 09 62 6c 61 | 63 6b 2c 20 77 69 74 65 |are..bla|ck, wite|
|00000320| 2c 20 72 65 64 2c 20 67 | 72 65 65 6e 2c 20 62 6c |, red, g|reen, bl|
|00000330| 75 65 2c 20 79 65 6c 6c | 6f 77 2c 20 63 79 61 6e |ue, yell|ow, cyan|
|00000340| 2c 20 6d 61 67 65 6e 74 | 61 0d 09 45 2e 67 2e 09 |, magent|a..E.g..|
|00000350| 6d 61 67 65 6e 74 61 20 | 63 6f 6c 6f 72 0d 0d 3c |magenta |color..<|
|00000360| 6e 3e 20 6d 61 70 73 0d | 09 53 65 74 20 74 68 65 |n> maps.|.Set the|
|00000370| 20 6e 75 6d 62 65 72 20 | 6f 66 20 6d 61 70 73 20 | number |of maps |
|00000380| 74 6f 20 75 73 65 20 74 | 6f 20 3c 6e 3e 2e 0d 09 |to use t|o <n>...|
|00000390| 45 2e 67 2e 09 34 20 6d | 61 70 73 0d 0d 3c 78 3e |E.g..4 m|aps..<x>|
|000003a0| 20 3c 79 3e 20 6f 72 69 | 67 69 6e 0d 09 53 65 74 | <y> ori|gin..Set|
|000003b0| 20 74 68 65 20 6f 72 69 | 67 69 6e 20 74 6f 20 28 | the ori|gin to (|
|000003c0| 78 2c 79 29 2e 20 20 58 | 20 61 6e 64 20 59 20 61 |x,y). X| and Y a|
|000003d0| 72 65 20 66 6c 6f 61 74 | 69 6e 67 20 70 6f 69 6e |re float|ing poin|
|000003e0| 74 20 6e 75 6d 62 65 72 | 73 2e 0d 09 45 2e 67 2e |t number|s...E.g.|
|000003f0| 09 2d 30 2e 33 35 34 20 | 2e 37 38 39 20 6f 72 69 |.-0.354 |.789 ori|
|00000400| 67 69 6e 0d 0d 3c 75 3e | 20 3c 76 3e 20 73 63 72 |gin..<u>| <v> scr|
|00000410| 65 65 6e 0d 09 53 65 74 | 20 74 68 65 20 73 63 72 |een..Set| the scr|
|00000420| 65 65 6e 20 6f 72 69 67 | 69 6e 20 74 6f 20 28 75 |een orig|in to (u|
|00000430| 2c 76 29 20 28 70 69 78 | 65 6c 73 29 2e 0d 09 45 |,v) (pix|els)...E|
|00000440| 2e 67 2e 09 31 32 30 20 | 32 32 30 20 73 63 72 65 |.g..120 |220 scre|
|00000450| 65 6e 0d 0d 3c 72 3e 20 | 72 61 6e 67 65 0d 09 53 |en..<r> |range..S|
|00000460| 65 74 20 74 68 65 20 72 | 61 6e 67 65 20 74 6f 20 |et the r|ange to |
|00000470| 3c 72 3e 20 28 66 6c 6f | 61 74 69 6e 67 20 70 6f |<r> (flo|ating po|
|00000480| 69 6e 74 29 2e 20 20 54 | 68 65 20 76 69 65 77 69 |int). T|he viewi|
|00000490| 6e 67 20 77 69 6e 64 6f | 77 20 69 73 20 61 0d 09 |ng windo|w is a..|
|000004a0| 73 71 75 61 72 65 20 77 | 69 74 68 20 74 68 65 20 |square w|ith the |
|000004b0| 6c 6f 77 65 72 20 6c 65 | 66 74 20 63 6f 72 6e 65 |lower le|ft corne|
|000004c0| 72 20 61 73 20 74 68 65 | 20 6f 72 69 67 69 6e 20 |r as the| origin |
|000004d0| 61 6e 64 20 73 69 64 65 | 20 6c 65 6e 67 74 68 0d |and side| length.|
|000004e0| 09 61 73 20 72 61 6e 67 | 65 2e 0d 09 45 2e 67 2e |.as rang|e...E.g.|
|000004f0| 09 30 2e 35 20 72 61 6e | 67 65 0d 0d 3c 78 3e 20 |.0.5 ran|ge..<x> |
|00000500| 3c 79 3e 20 73 63 61 6c | 65 0d 09 53 65 74 20 74 |<y> scal|e..Set t|
|00000510| 68 65 20 78 2d 61 78 69 | 73 20 61 6e 64 20 79 2d |he x-axi|s and y-|
|00000520| 61 78 69 73 20 73 63 61 | 6c 65 73 20 74 6f 20 74 |axis sca|les to t|
|00000530| 68 65 20 66 6c 6f 61 74 | 69 6e 67 20 70 6f 69 6e |he float|ing poin|
|00000540| 74 20 76 61 6c 75 65 73 | 20 67 69 76 65 6e 2e 0d |t values| given..|
|00000550| 09 54 68 65 20 64 65 66 | 61 75 6c 74 20 73 63 61 |.The def|ault sca|
|00000560| 6c 65 20 69 73 20 31 2e | 30 20 66 6f 72 20 61 20 |le is 1.|0 for a |
|00000570| 66 75 6c 6c 20 73 63 72 | 65 65 6e 20 69 6d 61 67 |full scr|een imag|
|00000580| 65 2e 20 20 43 68 61 6e | 67 69 6e 67 20 74 68 65 |e. Chan|ging the|
|00000590| 20 73 63 61 6c 65 0d 09 | 74 6f 20 61 20 76 61 6c | scale..|to a val|
|000005a0| 75 65 20 6c 65 73 73 20 | 74 68 61 6e 20 6f 6e 65 |ue less |than one|
|000005b0| 20 73 68 72 69 6e 6b 73 | 20 74 68 65 20 69 6d 61 | shrinks| the ima|
|000005c0| 67 65 2c 20 67 72 65 61 | 74 65 72 20 74 68 61 6e |ge, grea|ter than|
|000005d0| 20 6f 6e 65 20 65 78 70 | 61 6e 64 73 0d 09 74 68 | one exp|ands..th|
|000005e0| 65 20 69 6d 61 67 65 2e | 0d 09 45 2e 67 2e 09 32 |e image.|..E.g..2|
|000005f0| 2e 30 20 32 2e 30 20 73 | 63 61 6c 65 0d 0d 6d 6f |.0 2.0 s|cale..mo|
|00000600| 75 73 65 0d 09 57 68 65 | 6e 20 69 73 73 75 65 64 |use..Whe|n issued|
|00000610| 2c 20 6d 6f 75 73 65 20 | 77 69 6c 6c 20 74 72 61 |, mouse |will tra|
|00000620| 6e 73 6c 61 74 65 20 74 | 68 65 20 70 6f 73 69 74 |nslate t|he posit|
|00000630| 69 6f 6e 20 6f 66 20 74 | 68 65 20 70 6f 69 6e 74 |ion of t|he point|
|00000640| 65 72 20 69 6e 74 6f 0d | 09 61 6e 20 78 2c 79 20 |er into.|.an x,y |
|00000650| 63 6f 6f 72 64 69 6e 61 | 74 65 20 61 6c 6c 6f 77 |coordina|te allow|
|00000660| 69 6e 67 20 74 68 65 20 | 75 73 65 72 20 74 6f 20 |ing the |user to |
|00000670| 27 73 65 65 27 20 77 68 | 65 72 65 20 63 65 72 74 |'see' wh|ere cert|
|00000680| 61 69 6e 20 70 61 72 74 | 73 20 6f 66 20 0d 09 74 |ain part|s of ..t|
|00000690| 68 65 20 69 6d 61 67 65 | 20 61 72 65 2e 20 20 43 |he image| are. C|
|000006a0| 6c 69 63 6b 69 6e 67 20 | 74 68 65 20 6d 6f 75 73 |licking |the mous|
|000006b0| 65 20 62 75 74 74 6f 6e | 20 77 69 6c 6c 20 73 65 |e button| will se|
|000006c0| 6c 65 63 74 20 74 68 61 | 74 20 70 6f 69 6e 74 20 |lect tha|t point |
|000006d0| 61 73 0d 09 74 68 65 20 | 6e 65 77 20 6f 72 69 67 |as..the |new orig|
|000006e0| 69 6e 20 61 6e 64 20 64 | 65 63 72 65 61 73 65 20 |in and d|ecrease |
|000006f0| 74 68 65 20 72 61 6e 67 | 65 20 62 79 20 61 20 66 |the rang|e by a f|
|00000700| 61 63 74 6f 72 20 6f 66 | 20 74 77 6f 2e 0d 0d 6f |actor of| two...o|
|00000710| 6e 7c 6f 66 66 20 61 78 | 65 73 0d 09 54 75 72 6e |n|off ax|es..Turn|
|00000720| 20 74 68 65 20 63 6f 6f | 72 64 69 6e 61 74 65 20 | the coo|rdinate |
|00000730| 61 78 65 73 20 28 72 65 | 61 6c 6c 79 20 61 20 6d |axes (re|ally a m|
|00000740| 61 72 6b 20 6f 6e 20 74 | 68 65 20 6f 72 69 67 69 |ark on t|he origi|
|00000750| 6e 29 20 4f 4e 20 6f 72 | 20 4f 46 46 2e 0d 09 45 |n) ON or| OFF...E|
|00000760| 2e 67 2e 09 6f 66 66 20 | 61 78 65 73 0d 0d 6f 6e |.g..off |axes..on|
|00000770| 7c 6f 66 66 20 6f 75 74 | 6c 69 6e 65 73 0d 09 53 ||off out|lines..S|
|00000780| 65 74 20 73 68 6f 77 69 | 6e 67 20 74 68 65 20 6d |et showi|ng the m|
|00000790| 61 70 20 6f 75 74 6c 69 | 6e 65 73 20 6f 6e 20 6f |ap outli|nes on o|
|000007a0| 72 20 6f 66 66 2c 20 70 | 72 65 73 73 20 61 20 6b |r off, p|ress a k|
|000007b0| 65 79 20 74 6f 20 63 6f | 6e 74 69 6e 75 65 0d 09 |ey to co|ntinue..|
|000007c0| 61 66 74 65 72 20 76 69 | 65 77 69 6e 67 20 74 68 |after vi|ewing th|
|000007d0| 65 20 6f 75 74 6c 69 6e | 65 73 2e 0d 09 45 2e 67 |e outlin|es...E.g|
|000007e0| 2e 09 6f 6e 20 6f 75 74 | 6c 69 6e 65 73 0d 0d 73 |..on out|lines..s|
|000007f0| 65 74 74 69 6e 67 73 0d | 09 53 68 6f 77 20 61 20 |ettings.|.Show a |
|00000800| 6c 69 73 74 20 6f 66 20 | 74 68 65 20 63 75 72 72 |list of |the curr|
|00000810| 65 6e 74 20 6f 72 69 67 | 69 6e 2c 20 73 63 72 65 |ent orig|in, scre|
|00000820| 65 6e 20 6f 72 69 67 69 | 6e 2c 20 72 61 6e 67 65 |en origi|n, range|
|00000830| 2c 20 73 63 61 6c 65 2c | 20 6e 75 6d 62 65 72 0d |, scale,| number.|
|00000840| 09 6f 66 20 6d 61 70 73 | 20 61 6e 64 20 77 68 65 |.of maps| and whe|
|00000850| 74 68 65 72 20 74 68 65 | 20 61 78 65 73 20 61 6e |ther the| axes an|
|00000860| 64 20 6f 75 74 6c 69 6e | 65 73 20 61 72 65 20 6f |d outlin|es are o|
|00000870| 6e 20 6f 72 20 6f 66 66 | 2e 0d 09 45 2e 67 2e 09 |n or off|...E.g..|
|00000880| 73 65 74 74 69 6e 67 73 | 0d 0d 66 69 6e 64 6d 61 |settings|..findma|
|00000890| 70 0d 09 41 6c 6c 6f 77 | 73 20 74 68 65 20 75 73 |p..Allow|s the us|
|000008a0| 65 72 20 74 6f 20 65 6e | 74 65 72 20 74 68 72 65 |er to en|ter thre|
|000008b0| 65 20 69 6e 69 74 69 61 | 6c 20 63 6f 6f 72 64 69 |e initia|l coordi|
|000008c0| 6e 61 74 65 73 20 61 6e | 64 20 74 68 72 65 65 20 |nates an|d three |
|000008d0| 69 6d 61 67 65 0d 09 63 | 6f 6f 72 64 69 6e 61 74 |image..c|oordinat|
|000008e0| 65 73 20 61 6e 64 20 63 | 61 6c 63 75 6c 61 74 65 |es and c|alculate|
|000008f0| 73 20 74 68 65 20 6d 61 | 70 20 66 6f 72 20 74 68 |s the ma|p for th|
|00000900| 6f 73 65 20 76 61 6c 75 | 65 73 2e 0d 09 45 2e 67 |ose valu|es...E.g|
|00000910| 2e 09 66 69 6e 64 6d 61 | 70 0d 0d 6d 61 6b 65 0d |..findma|p..make.|
|00000920| 09 50 75 74 73 20 74 68 | 65 20 6d 6f 73 74 20 72 |.Puts th|e most r|
|00000930| 65 63 65 6e 74 20 76 61 | 6c 75 65 73 20 66 72 6f |ecent va|lues fro|
|00000940| 6d 20 66 69 6e 64 6d 61 | 70 20 6f 6e 20 74 68 65 |m findma|p on the|
|00000950| 20 73 74 61 63 6b 20 69 | 6e 20 6f 72 64 65 72 0d | stack i|n order.|
|00000960| 09 66 6f 72 20 73 65 74 | 2e 20 20 54 68 65 20 75 |.for set|. The u|
|00000970| 73 65 72 20 6e 65 65 64 | 73 20 74 6f 20 61 64 64 |ser need|s to add|
|00000980| 20 74 68 65 20 70 72 6f | 62 61 62 69 6c 69 74 79 | the pro|bability|
|00000990| 20 61 6e 64 20 6d 61 70 | 20 6e 75 6d 62 65 72 0d | and map| number.|
|000009a0| 09 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 |.before |calling |
|000009b0| 73 65 74 2e 0d 09 45 2e | 67 2e 09 6d 61 6b 65 20 |set...E.|g..make |
|000009c0| 2e 33 33 33 20 31 20 73 | 65 74 0d 0d 3c 61 3e 20 |.333 1 s|et..<a> |
|000009d0| 3c 62 3e 20 3c 63 3e 20 | 3c 64 3e 20 3c 65 3e 20 |<b> <c> |<d> <e> |
|000009e0| 3c 66 3e 20 3c 70 3e 20 | 3c 6e 3e 20 73 65 74 0d |<f> <p> |<n> set.|
|000009f0| 09 53 65 74 73 20 74 68 | 65 20 70 61 72 61 6d 65 |.Sets th|e parame|
|00000a00| 74 65 72 73 20 66 6f 72 | 20 61 20 6d 61 70 2e 20 |ters for| a map. |
|00000a10| 20 54 68 65 20 6c 65 74 | 74 65 72 73 20 61 2d 66 | The let|ters a-f|
|00000a20| 20 63 6f 72 72 65 73 70 | 6f 6e 64 20 74 6f 20 74 | corresp|ond to t|
|00000a30| 68 65 20 0d 09 76 61 6c | 75 65 73 20 66 6f 72 20 |he ..val|ues for |
|00000a40| 74 68 65 20 6d 61 74 72 | 69 78 20 61 6e 64 20 6f |the matr|ix and o|
|00000a50| 66 66 73 65 74 20 76 65 | 63 74 6f 72 2c 20 3c 70 |ffset ve|ctor, <p|
|00000a60| 3e 20 69 73 20 74 68 65 | 20 70 72 6f 62 61 62 69 |> is the| probabi|
|00000a70| 6c 69 74 79 20 66 6f 72 | 0d 09 74 68 65 20 6d 61 |lity for|..the ma|
|00000a80| 70 20 61 6e 64 20 3c 6e | 3e 20 69 73 20 74 68 65 |p and <n|> is the|
|00000a90| 20 6d 61 70 20 6e 75 6d | 62 65 72 2e 20 20 41 6c | map num|ber. Al|
|00000aa0| 6c 20 76 61 6c 75 65 73 | 20 65 78 63 65 70 74 20 |l values| except |
|00000ab0| 3c 6e 3e 20 61 72 65 20 | 74 6f 0d 09 62 65 20 66 |<n> are |to..be f|
|00000ac0| 6c 6f 61 74 69 6e 67 20 | 70 6f 69 6e 74 20 6e 75 |loating |point nu|
|00000ad0| 6d 62 65 72 73 2e 0d 09 | 45 2e 67 2e 09 30 2e 35 |mbers...|E.g..0.5|
|00000ae0| 20 2d 30 2e 35 20 30 2e | 35 20 30 2e 35 20 30 2e | -0.5 0.|5 0.5 0.|
|00000af0| 30 20 30 2e 30 20 30 2e | 35 20 31 20 73 65 74 0d |0 0.0 0.|5 1 set.|
|00000b00| 0d 3c 6d 31 3e 20 3c 6d | 32 3e 20 63 6f 70 79 0d |.<m1> <m|2> copy.|
|00000b10| 09 43 6f 70 79 20 6d 61 | 70 20 6e 75 6d 62 65 72 |.Copy ma|p number|
|00000b20| 20 3c 6d 31 3e 20 74 6f | 20 3c 6d 32 3e 20 77 69 | <m1> to| <m2> wi|
|00000b30| 74 68 6f 75 74 20 64 69 | 73 74 75 72 62 69 6e 67 |thout di|sturbing|
|00000b40| 20 3c 6d 31 3e 2e 0d 09 | 45 2e 67 2e 09 32 20 35 | <m1>...|E.g..2 5|
|00000b50| 20 63 6f 70 79 0d 0d 3c | 6d 3e 20 64 65 6c 65 74 | copy..<|m> delet|
|00000b60| 65 0d 09 44 65 6c 65 74 | 65 20 6d 61 70 20 6e 75 |e..Delet|e map nu|
|00000b70| 6d 62 65 72 20 3c 6d 3e | 20 61 6e 64 20 6d 6f 76 |mber <m>| and mov|
|00000b80| 65 20 61 6e 79 20 6f 74 | 68 65 72 20 6d 61 70 73 |e any ot|her maps|
|00000b90| 20 75 70 20 69 6e 20 6d | 65 6d 6f 72 79 2e 0d 09 | up in m|emory...|
|00000ba0| 45 2e 67 2e 09 33 20 64 | 65 6c 65 74 65 0d 3c 6d |E.g..3 d|elete.<m|
|00000bb0| 3e 20 69 6e 73 65 72 74 | 0d 09 49 6e 73 65 72 74 |> insert|..Insert|
|00000bc0| 20 61 20 62 6c 61 6e 6b | 20 6d 61 70 20 62 65 66 | a blank| map bef|
|00000bd0| 6f 72 65 20 6d 61 70 20 | 3c 6d 3e 2e 0d 09 45 2e |ore map |<m>...E.|
|00000be0| 67 2e 09 31 20 69 6e 73 | 65 72 74 0d 0d 63 6c 73 |g..1 ins|ert..cls|
|00000bf0| 0d 09 43 6c 65 61 72 20 | 74 68 65 20 77 69 6e 64 |..Clear |the wind|
|00000c00| 6f 77 2e 0d 09 45 2e 67 | 2e 09 63 6c 73 0d 0d 62 |ow...E.g|..cls..b|
|00000c10| 79 65 0d 09 45 78 69 74 | 20 46 72 61 63 74 61 6c |ye..Exit| Fractal|
|00000c20| 20 4c 61 62 20 4b 69 74 | 2e 0d 09 45 2e 67 2e 09 | Lab Kit|...E.g..|
|00000c30| 62 79 65 0d 0d a5 a5 55 | 73 69 6e 67 20 74 68 65 |bye....U|sing the|
|00000c40| 20 46 69 6e 64 4d 61 70 | 20 63 6f 6d 6d 61 6e 64 | FindMap| command|
|00000c50| 0d 0d 5f 46 69 6e 64 4d | 61 70 5f 20 61 6c 6c 6f |.._FindM|ap_ allo|
|00000c60| 77 73 20 74 68 65 20 75 | 73 65 72 20 74 6f 20 66 |ws the u|ser to f|
|00000c70| 69 6e 64 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 |ind the |paramete|
|00000c80| 72 73 20 66 6f 72 20 61 | 20 6d 61 70 20 62 79 20 |rs for a| map by |
|00000c90| 65 6e 74 65 72 69 6e 67 | 20 74 68 65 20 63 6f 6f |entering| the coo|
|00000ca0| 72 64 69 6e 61 74 65 73 | 20 61 6e 64 20 77 68 65 |rdinates| and whe|
|00000cb0| 72 65 20 74 68 65 79 20 | 6d 61 70 20 74 6f 2e 20 |re they |map to. |
|00000cc0| 20 54 68 69 73 20 65 78 | 61 6d 70 6c 65 20 77 69 | This ex|ample wi|
|00000cd0| 6c 6c 20 75 73 65 20 74 | 68 65 20 46 69 6e 64 4d |ll use t|he FindM|
|00000ce0| 61 70 20 63 6f 6d 6d 61 | 6e 64 20 74 6f 20 63 61 |ap comma|nd to ca|
|00000cf0| 6c 63 75 6c 61 74 65 20 | 74 68 65 20 6d 61 70 73 |lculate |the maps|
|00000d00| 20 66 6f 72 20 74 68 65 | 20 4d 61 6e 64 65 6c 62 | for the| Mandelb|
|00000d10| 72 6f 74 20 44 72 61 67 | 6f 6e 2e 0d 0d 57 69 74 |rot Drag|on...Wit|
|00000d20| 68 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 72 75 |h the pr|ogram ru|
|00000d30| 6e 6e 69 6e 67 20 65 6e | 74 65 72 20 27 66 69 6e |nning en|ter 'fin|
|00000d40| 64 6d 61 70 27 2e 20 20 | 59 6f 75 20 77 69 6c 6c |dmap'. |You will|
|00000d50| 20 73 65 65 20 62 65 20 | 61 73 6b 65 64 20 74 6f | see be |asked to|
|00000d60| 20 65 6e 74 65 72 20 74 | 68 65 20 63 6f 6f 72 64 | enter t|he coord|
|00000d70| 69 6e 61 74 65 73 20 6f | 66 20 74 68 72 65 65 20 |inates o|f three |
|00000d80| 70 6f 69 6e 74 73 20 66 | 72 6f 6d 20 74 68 65 20 |points f|rom the |
|00000d90| 6f 72 69 67 69 6e 61 6c | 20 6d 61 70 2e 20 20 54 |original| map. T|
|00000da0| 68 65 20 6f 72 69 67 69 | 6e 2c 20 74 68 65 20 6c |he origi|n, the l|
|00000db0| 6f 77 65 72 20 72 69 67 | 68 74 20 61 6e 64 20 75 |ower rig|ht and u|
|00000dc0| 70 70 65 72 20 6c 65 66 | 74 20 63 6f 72 6e 65 72 |pper lef|t corner|
|00000dd0| 73 20 6f 66 20 74 68 65 | 20 69 6e 69 74 69 61 6c |s of the| initial|
|00000de0| 20 62 6f 78 20 28 72 65 | 6d 65 6d 62 65 72 2c 20 | box (re|member, |
|00000df0| 69 74 20 67 6f 65 73 20 | 66 72 6f 6d 20 30 2e 2e |it goes |from 0..|
|00000e00| 31 20 69 6e 20 62 6f 74 | 68 20 78 20 61 6e 64 20 |1 in bot|h x and |
|00000e10| 79 29 20 6d 61 6b 65 20 | 67 6f 6f 64 20 73 74 61 |y) make |good sta|
|00000e20| 72 74 69 6e 67 20 70 6c | 61 63 65 73 2e 20 20 54 |rting pl|aces. T|
|00000e30| 68 65 72 65 66 6f 72 65 | 2c 20 65 6e 74 65 72 20 |herefore|, enter |
|00000e40| 30 20 66 6f 72 20 78 31 | 20 61 6e 64 20 30 20 66 |0 for x1| and 0 f|
|00000e50| 6f 72 20 79 31 2c 20 28 | 31 2c 30 29 20 66 6f 72 |or y1, (|1,0) for|
|00000e60| 20 28 78 32 2c 79 32 29 | 2c 20 61 6e 64 20 28 30 | (x2,y2)|, and (0|
|00000e70| 2c 31 29 20 66 6f 72 20 | 28 78 33 2c 79 33 29 2e |,1) for |(x3,y3).|
|00000e80| 20 54 68 65 73 65 20 61 | 72 65 20 74 68 65 20 64 | These a|re the d|
|00000e90| 65 66 61 75 6c 74 20 76 | 61 6c 75 65 73 2e 20 20 |efault v|alues. |
|00000ea0| 59 6f 75 20 64 6f 20 6e | 6f 74 20 6e 65 65 64 20 |You do n|ot need |
|00000eb0| 74 6f 20 65 6e 74 65 72 | 20 61 20 64 65 63 69 6d |to enter| a decim|
|00000ec0| 61 6c 20 70 6f 69 6e 74 | 20 77 69 74 68 20 65 61 |al point| with ea|
|00000ed0| 63 68 20 6e 75 6d 62 65 | 72 20 69 6e 20 74 68 69 |ch numbe|r in thi|
|00000ee0| 73 20 63 61 73 65 2c 20 | 70 72 65 73 73 69 6e 67 |s case, |pressing|
|00000ef0| 20 72 65 74 75 72 6e 20 | 75 73 65 73 20 74 68 65 | return |uses the|
|00000f00| 20 76 61 6c 75 65 20 64 | 69 73 70 6c 61 79 65 64 | value d|isplayed|
|00000f10| 2e 20 20 46 6f 72 20 74 | 68 65 20 69 6d 61 67 65 |. For t|he image|
|00000f20| 20 70 6f 69 6e 74 73 2c | 20 65 6e 74 65 72 20 28 | points,| enter (|
|00000f30| 78 31 27 2c 79 31 27 29 | 20 61 73 20 28 30 2c 30 |x1',y1')| as (0,0|
|00000f40| 29 2c 20 28 78 32 27 2c | 79 32 27 29 20 61 73 20 |), (x2',|y2') as |
|00000f50| 28 30 2e 35 2c 30 2e 35 | 29 20 61 6e 64 20 28 78 |(0.5,0.5|) and (x|
|00000f60| 33 27 2c 79 33 27 29 20 | 61 73 20 28 2d 30 2e 35 |3',y3') |as (-0.5|
|00000f70| 2c 30 2e 35 29 2e 20 20 | 54 68 65 20 70 72 6f 67 |,0.5). |The prog|
|00000f80| 72 61 6d 20 77 69 6c 6c | 20 63 61 6c 63 75 6c 61 |ram will| calcula|
|00000f90| 74 65 20 74 68 65 20 61 | 70 70 72 6f 70 72 69 61 |te the a|ppropria|
|00000fa0| 74 65 20 6d 61 70 20 61 | 6e 64 20 64 69 73 70 6c |te map a|nd displ|
|00000fb0| 61 79 20 69 74 73 20 76 | 61 6c 75 65 73 2e 20 20 |ay its v|alues. |
|00000fc0| 41 74 20 74 68 65 20 70 | 72 6f 6d 70 74 2c 20 65 |At the p|rompt, e|
|00000fd0| 6e 74 65 72 0d 0d 6d 61 | 6b 65 20 30 2e 35 20 31 |nter..ma|ke 0.5 1|
|00000fe0| 20 73 65 74 0d 0d 74 6f | 20 6d 61 6b 65 20 74 68 | set..to| make th|
|00000ff0| 69 73 20 6e 65 77 6c 79 | 20 63 61 6c 63 75 6c 61 |is newly| calcula|
|00001000| 74 65 64 20 6d 61 70 20 | 74 68 65 20 66 69 72 73 |ted map |the firs|
|00001010| 74 20 6d 61 70 2e 20 20 | 45 6e 74 65 72 20 27 66 |t map. |Enter 'f|
|00001020| 69 6e 64 6d 61 70 27 20 | 61 67 61 69 6e 20 61 6e |indmap' |again an|
|00001030| 64 20 70 72 65 73 73 20 | 72 65 74 75 72 6e 20 66 |d press |return f|
|00001040| 6f 72 20 65 61 63 68 20 | 6f 66 20 74 68 65 20 6f |or each |of the o|
|00001050| 72 69 67 69 6e 61 6c 20 | 70 6f 69 6e 74 73 20 73 |riginal |points s|
|00001060| 69 6e 63 65 20 77 65 20 | 77 69 6c 6c 20 75 73 65 |ince we |will use|
|00001070| 20 74 68 65 20 73 61 6d | 65 20 6f 6e 65 73 20 61 | the sam|e ones a|
|00001080| 73 20 62 65 66 6f 72 65 | 2e 20 20 46 6f 72 20 74 |s before|. For t|
|00001090| 68 65 20 69 6d 61 67 65 | 20 70 6f 69 6e 74 73 20 |he image| points |
|000010a0| 65 6e 74 65 72 20 28 78 | 31 27 2c 79 31 27 29 20 |enter (x|1',y1') |
|000010b0| 61 73 20 28 31 2c 30 29 | 2c 20 28 78 32 27 2c 79 |as (1,0)|, (x2',y|
|000010c0| 32 27 29 20 61 73 20 28 | 30 2e 35 2c 30 2e 35 29 |2') as (|0.5,0.5)|
|000010d0| 20 61 6e 64 20 28 78 33 | 27 2c 79 33 27 29 20 61 | and (x3|',y3') a|
|000010e0| 73 20 28 30 2e 35 2c 2d | 30 2e 35 29 2e 20 20 54 |s (0.5,-|0.5). T|
|000010f0| 68 65 6e 20 65 6e 74 65 | 72 2c 0d 0d 6d 61 6b 65 |hen ente|r,..make|
|00001100| 20 30 2e 35 20 32 20 73 | 65 74 20 0d 0d 74 6f 20 | 0.5 2 s|et ..to |
|00001110| 66 69 78 20 74 68 69 73 | 20 61 73 20 74 68 65 20 |fix this| as the |
|00001120| 73 65 63 6f 6e 64 20 6d | 61 70 2e 20 20 4c 61 73 |second m|ap. Las|
|00001130| 74 6c 79 2c 20 65 6e 74 | 65 72 2c 0d 0d 32 20 6d |tly, ent|er,..2 m|
|00001140| 61 70 73 20 31 32 30 20 | 32 32 30 20 73 63 72 65 |aps 120 |220 scre|
|00001150| 65 6e 20 63 64 72 61 77 | 0d 0d 74 6f 20 75 73 65 |en cdraw|..to use|
|00001160| 20 74 77 6f 20 6d 61 70 | 73 2c 20 61 64 6a 75 73 | two map|s, adjus|
|00001170| 74 20 74 68 65 20 73 63 | 72 65 65 6e 20 6f 72 69 |t the sc|reen ori|
|00001180| 67 69 6e 20 73 6f 20 74 | 68 65 20 69 6d 61 67 65 |gin so t|he image|
|00001190| 20 77 69 6c 6c 20 66 69 | 74 2c 20 61 6e 64 20 64 | will fi|t, and d|
|000011a0| 72 61 77 20 75 73 69 6e | 67 20 63 6f 6c 6f 72 2e |raw usin|g color.|
|000011b0| 0d 0d a5 a5 57 72 69 74 | 69 6e 67 20 79 6f 75 72 |....Writ|ing your|
|000011c0| 20 6f 77 6e 20 66 72 61 | 63 74 61 6c 73 20 74 6f | own fra|ctals to|
|000011d0| 20 64 69 73 6b 0d 0d 55 | 6e 66 6f 72 74 75 6e 61 | disk..U|nfortuna|
|000011e0| 74 65 6c 79 2c 20 46 72 | 61 63 74 61 6c 20 4c 61 |tely, Fr|actal La|
|000011f0| 62 20 4b 69 74 20 69 73 | 20 75 6e 61 62 6c 65 20 |b Kit is| unable |
|00001200| 74 6f 20 77 72 69 74 65 | 20 66 72 61 63 74 61 6c |to write| fractal|
|00001210| 20 6d 61 70 73 20 74 6f | 20 64 69 73 6b 2e 20 54 | maps to| disk. T|
|00001220| 68 65 72 65 66 6f 72 65 | 2c 20 77 68 65 6e 20 79 |herefore|, when y|
|00001230| 6f 75 20 75 73 65 20 7b | 5c 74 74 20 46 69 6e 64 |ou use {|\tt Find|
|00001240| 4d 61 70 7d 20 74 6f 20 | 63 72 65 61 74 65 20 61 |Map} to |create a|
|00001250| 20 6e 65 77 20 6d 61 70 | 20 79 6f 75 20 6d 75 73 | new map| you mus|
|00001260| 74 20 77 72 69 74 65 20 | 69 74 20 64 6f 77 6e 20 |t write |it down |
|00001270| 62 79 20 68 61 6e 64 2e | 20 57 68 65 6e 20 79 6f |by hand.| When yo|
|00001280| 75 20 61 72 65 20 66 69 | 6e 69 73 68 65 64 20 64 |u are fi|nished d|
|00001290| 65 73 69 67 6e 69 6e 67 | 20 61 20 6e 65 77 20 66 |esigning| a new f|
|000012a0| 72 61 63 74 61 6c 20 79 | 6f 75 20 63 61 6e 20 75 |ractal y|ou can u|
|000012b0| 73 65 20 61 6e 79 20 74 | 65 78 74 20 65 64 69 74 |se any t|ext edit|
|000012c0| 6f 72 2c 20 6c 69 6b 65 | 20 20 54 65 61 63 68 54 |or, like| TeachT|
|000012d0| 65 78 74 2c 20 74 6f 20 | 63 72 65 61 74 65 20 61 |ext, to |create a|
|000012e0| 20 66 69 6c 65 20 74 6f | 20 6c 6f 61 64 20 74 68 | file to| load th|
|000012f0| 65 20 6d 61 70 20 66 72 | 6f 6d 20 64 69 73 6b 2e |e map fr|om disk.|
|00001300| 20 53 69 6d 70 6c 79 20 | 65 6e 74 65 72 20 74 68 | Simply |enter th|
|00001310| 65 20 73 6b 65 6c 65 74 | 6f 6e 20 63 6f 64 65 20 |e skelet|on code |
|00001320| 6f 6e 20 74 68 65 20 6e | 65 78 74 20 66 65 77 20 |on the n|ext few |
|00001330| 6c 69 6e 65 73 2c 20 73 | 75 62 73 74 69 74 75 74 |lines, s|ubstitut|
|00001340| 69 6e 67 20 79 6f 75 72 | 20 76 61 6c 75 65 73 20 |ing your| values |
|00001350| 66 6f 72 20 74 68 65 20 | 6c 65 74 74 65 72 73 20 |for the |letters |
|00001360| 69 6e 64 69 63 61 74 65 | 64 2e 20 20 53 65 65 20 |indicate|d. See |
|00001370| 74 68 65 20 73 74 72 75 | 63 74 75 72 65 20 6f 66 |the stru|cture of|
|00001380| 20 74 68 65 20 69 6e 63 | 6c 75 64 65 64 20 66 72 | the inc|luded fr|
|00001390| 61 63 74 61 6c 73 20 61 | 73 20 61 6e 20 65 78 61 |actals a|s an exa|
|000013a0| 6d 70 6c 65 2e 0d 0d 3a | 20 6d 79 66 72 61 63 74 |mple...:| myfract|
|000013b0| 61 6c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |al | |
|000013c0| 20 28 20 67 69 76 65 20 | 69 74 20 61 20 6e 61 6d | ( give |it a nam|
|000013d0| 65 2c 20 72 65 6d 65 6d | 62 65 72 2c 20 63 6f 6d |e, remem|ber, com|
|000013e0| 6d 65 6e 74 73 20 69 6e | 20 70 61 72 65 6e 74 68 |ments in| parenth|
|000013f0| 65 73 65 73 20 29 0d 20 | 20 20 61 20 62 20 63 20 |eses ). | a b c |
|00001400| 64 20 65 20 66 20 70 20 | 31 20 73 65 74 20 20 20 |d e f p |1 set |
|00001410| 20 20 20 20 20 20 28 20 | 65 6e 74 65 72 20 74 68 | ( |enter th|
|00001420| 65 20 76 61 6c 75 65 73 | 20 66 6f 72 20 6d 61 70 |e values| for map|
|00001430| 20 31 20 29 0d 20 20 20 | 61 27 20 62 27 20 63 27 | 1 ). |a' b' c'|
|00001440| 20 64 27 20 65 27 20 66 | 27 20 70 27 20 32 20 73 | d' e' f|' p' 2 s|
|00001450| 65 74 20 20 28 20 65 6e | 74 65 72 20 74 68 65 20 |et ( en|ter the |
|00001460| 76 61 6c 75 65 73 20 66 | 6f 72 20 6d 61 70 20 32 |values f|or map 2|
|00001470| 2c 20 65 74 63 2e 20 29 | 0d 20 20 20 6e 20 6d 61 |, etc. )|. n ma|
|00001480| 70 73 20 3b 20 20 20 20 | 20 20 20 20 20 20 20 20 |ps ; | |
|00001490| 20 20 28 20 60 6e 27 20 | 69 73 20 74 68 65 20 6e | ( `n' |is the n|
|000014a0| 75 6d 62 65 72 20 6f 66 | 20 6d 61 70 73 20 79 6f |umber of| maps yo|
|000014b0| 75 20 61 72 65 20 65 6e | 74 65 72 69 6e 67 20 29 |u are en|tering )|
|000014c0| 0d 0d 4f 6e 63 65 20 6c | 6f 61 64 65 64 20 66 72 |..Once l|oaded fr|
|000014d0| 6f 6d 20 64 69 73 6b 2c | 20 79 6f 75 20 6e 65 65 |om disk,| you nee|
|000014e0| 64 20 74 6f 20 65 6e 74 | 65 72 20 74 68 65 20 6e |d to ent|er the n|
|000014f0| 61 6d 65 20 6f 66 20 74 | 68 65 20 66 72 61 63 74 |ame of t|he fract|
|00001500| 61 6c 20 74 6f 20 6c 6f | 61 64 20 74 68 65 20 6d |al to lo|ad the m|
|00001510| 61 70 73 20 61 6e 64 20 | 79 6f 75 20 61 72 65 20 |aps and |you are |
|00001520| 72 65 61 64 79 20 74 6f | 20 64 72 61 77 2e 0d 0d |ready to| draw...|
|00001530| a5 41 64 76 61 6e 63 65 | 64 20 46 65 61 74 75 72 |.Advance|d Featur|
|00001540| 65 73 0d 0d a5 a5 41 20 | 76 65 72 79 20 28 76 65 |es....A |very (ve|
|00001550| 72 79 29 20 62 72 69 65 | 66 20 69 6e 74 72 6f 64 |ry) brie|f introd|
|00001560| 75 63 74 69 6f 6e 20 74 | 6f 20 70 72 6f 67 72 61 |uction t|o progra|
|00001570| 6d 6d 69 6e 67 20 69 6e | 20 46 6f 72 74 68 0d 0d |mming in| Forth..|
|00001580| 46 6f 72 74 68 20 69 73 | 20 61 6e 20 69 6e 74 65 |Forth is| an inte|
|00001590| 72 70 72 65 74 65 64 2c | 20 73 74 61 63 6b 20 62 |rpreted,| stack b|
|000015a0| 61 73 65 64 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |ased pro|gramming|
|000015b0| 20 6c 61 6e 67 75 61 67 | 65 20 6b 6e 6f 77 6e 20 | languag|e known |
|000015c0| 66 6f 72 20 69 74 73 20 | 73 70 65 65 64 20 61 6e |for its |speed an|
|000015d0| 64 20 65 78 74 65 6e 73 | 69 62 69 6c 69 74 79 2e |d extens|ibility.|
|000015e0| 20 20 54 68 69 73 20 69 | 73 20 6e 6f 74 20 61 6e | This i|s not an|
|000015f0| 20 61 74 74 65 6d 70 74 | 20 74 6f 20 63 6f 6d 70 | attempt| to comp|
|00001600| 6c 65 74 65 6c 79 20 74 | 65 61 63 68 20 46 6f 72 |letely t|each For|
|00001610| 74 68 20 73 6f 20 6d 75 | 63 68 20 61 73 20 74 6f |th so mu|ch as to|
|00001620| 20 74 65 61 63 68 20 61 | 20 6c 69 74 74 6c 65 20 | teach a| little |
|00001630| 61 62 6f 75 74 20 46 6f | 72 74 68 20 73 6f 20 74 |about Fo|rth so t|
|00001640| 68 61 74 20 74 68 65 20 | 75 73 65 72 20 77 68 6f |hat the |user who|
|00001650| 20 69 73 20 75 6e 66 61 | 6d 69 6c 69 61 72 20 77 | is unfa|miliar w|
|00001660| 69 74 68 20 46 6f 72 74 | 68 20 63 61 6e 20 6d 61 |ith Fort|h can ma|
|00001670| 6b 65 20 73 6f 6d 65 20 | 75 73 65 20 6f 66 20 74 |ke some |use of t|
|00001680| 68 65 20 6c 61 6e 67 75 | 61 67 65 2e 0d 0d 46 6f |he langu|age...Fo|
|00001690| 72 74 68 20 69 73 20 61 | 20 73 74 61 63 6b 20 62 |rth is a| stack b|
|000016a0| 61 73 65 64 20 6c 61 6e | 67 75 61 67 65 2c 20 64 |ased lan|guage, d|
|000016b0| 61 74 61 20 69 73 20 6d | 61 6e 69 70 75 6c 61 74 |ata is m|anipulat|
|000016c0| 65 64 20 75 73 69 6e 67 | 20 61 20 73 74 61 63 6b |ed using| a stack|
|000016d0| 20 74 68 61 74 20 77 6f | 72 6b 73 20 69 6e 20 61 | that wo|rks in a|
|000016e0| 20 77 61 79 20 76 65 72 | 79 20 73 69 6d 69 6c 61 | way ver|y simila|
|000016f0| 72 20 74 6f 20 74 68 65 | 20 6c 75 6e 63 68 20 74 |r to the| lunch t|
|00001700| 72 61 79 73 20 69 6e 20 | 61 20 63 61 66 65 74 65 |rays in |a cafete|
|00001710| 72 69 61 2e 20 20 54 68 | 65 20 6c 61 73 74 20 74 |ria. Th|e last t|
|00001720| 72 61 79 20 69 6e 20 74 | 68 65 20 73 74 61 63 6b |ray in t|he stack|
|00001730| 20 69 73 20 74 68 65 20 | 66 69 72 73 74 20 6f 6e | is the |first on|
|00001740| 65 20 6f 75 74 2e 20 20 | 42 65 63 61 75 73 65 20 |e out. |Because |
|00001750| 6f 66 20 74 68 69 73 2c | 20 61 6c 6c 20 6d 61 74 |of this,| all mat|
|00001760| 68 65 6d 61 74 69 63 61 | 6c 20 6f 70 65 72 61 74 |hematica|l operat|
|00001770| 69 6f 6e 73 20 61 72 65 | 20 69 6e 20 70 6f 73 74 |ions are| in post|
|00001780| 66 69 78 20 66 6f 72 6d | 61 74 2c 20 69 2e 65 2e |fix form|at, i.e.|
|00001790| 2c 20 69 6e 73 74 65 61 | 64 20 6f 66 20 74 79 70 |, instea|d of typ|
|000017a0| 69 6e 67 20 34 20 2b 20 | 37 20 6f 6e 65 20 77 6f |ing 4 + |7 one wo|
|000017b0| 75 6c 64 20 74 79 70 65 | 20 34 20 37 20 20 2b 20 |uld type| 4 7 + |
|000017c0| 77 68 69 63 68 20 77 6f | 75 6c 64 20 6c 65 61 76 |which wo|uld leav|
|000017d0| 65 20 74 68 65 20 76 61 | 6c 75 65 20 31 31 20 6f |e the va|lue 11 o|
|000017e0| 6e 20 74 68 65 20 74 6f | 70 20 6f 66 20 74 68 65 |n the to|p of the|
|000017f0| 20 73 74 61 63 6b 2e 20 | 20 54 68 69 73 20 69 6c | stack. | This il|
|00001800| 6c 75 73 74 72 61 74 65 | 73 20 61 6e 20 69 6d 70 |lustrate|s an imp|
|00001810| 6f 72 74 61 6e 74 20 74 | 68 69 6e 67 20 74 6f 20 |ortant t|hing to |
|00001820| 72 65 6d 65 6d 62 65 72 | 20 61 62 6f 75 74 20 75 |remember| about u|
|00001830| 73 69 6e 67 20 46 6f 72 | 74 68 2c 20 61 6e 79 74 |sing For|th, anyt|
|00001840| 68 69 6e 67 20 74 68 61 | 74 20 69 73 20 65 6e 74 |hing tha|t is ent|
|00001850| 65 72 65 64 20 69 73 20 | 69 6e 74 65 72 70 72 65 |ered is |interpre|
|00001860| 74 65 64 20 61 73 20 65 | 69 74 68 65 72 20 61 20 |ted as e|ither a |
|00001870| 77 6f 72 64 20 69 6e 20 | 74 68 65 20 64 69 63 74 |word in |the dict|
|00001880| 69 6f 6e 61 72 79 20 28 | 6d 6f 72 65 20 6f 6e 20 |ionary (|more on |
|00001890| 74 68 61 74 20 6c 61 74 | 65 72 29 20 6f 72 20 61 |that lat|er) or a|
|000018a0| 20 6e 75 6d 62 65 72 20 | 74 6f 20 62 65 20 70 75 | number |to be pu|
|000018b0| 73 68 65 64 20 6f 6e 20 | 74 68 65 20 73 74 61 63 |shed on |the stac|
|000018c0| 6b 2c 20 73 6f 20 65 6e | 74 65 72 69 6e 67 20 34 |k, so en|tering 4|
|000018d0| 20 37 20 2b 20 74 6f 6c | 64 20 46 6f 72 74 68 20 | 7 + tol|d Forth |
|000018e0| 74 6f 20 70 75 73 68 20 | 61 20 34 20 6f 6e 20 74 |to push |a 4 on t|
|000018f0| 68 65 20 73 74 61 63 6b | 20 66 6f 6c 6c 6f 77 65 |he stack| followe|
|00001900| 64 20 62 79 20 61 20 37 | 20 61 6e 64 20 74 68 65 |d by a 7| and the|
|00001910| 20 2b 20 77 6f 72 64 20 | 61 64 64 73 20 74 68 65 | + word |adds the|
|00001920| 20 74 6f 70 20 74 77 6f | 20 73 74 61 63 6b 20 69 | top two| stack i|
|00001930| 74 65 6d 73 2e 20 20 54 | 6f 20 73 65 65 20 74 68 |tems. T|o see th|
|00001940| 65 20 76 61 6c 75 65 20 | 73 74 6f 72 65 64 20 6f |e value |stored o|
|00001950| 6e 20 74 68 65 20 74 6f | 70 20 6f 66 20 74 68 65 |n the to|p of the|
|00001960| 20 73 74 61 63 6b 20 75 | 73 65 20 74 68 65 20 2e | stack u|se the .|
|00001970| 20 77 6f 72 64 2e 20 20 | 4e 6f 74 65 20 74 68 61 | word. |Note tha|
|00001980| 74 20 74 68 69 73 20 69 | 73 20 61 20 64 65 73 74 |t this i|s a dest|
|00001990| 72 75 63 74 69 76 65 20 | 6f 70 65 72 61 74 69 6f |ructive |operatio|
|000019a0| 6e 2c 20 69 74 20 70 72 | 69 6e 74 73 20 74 68 65 |n, it pr|ints the|
|000019b0| 20 76 61 6c 75 65 20 61 | 74 20 74 68 65 20 74 6f | value a|t the to|
|000019c0| 70 20 6f 66 20 74 68 65 | 20 73 74 61 63 6b 20 61 |p of the| stack a|
|000019d0| 6e 64 20 72 65 6d 6f 76 | 65 73 20 69 74 20 66 72 |nd remov|es it fr|
|000019e0| 6f 6d 20 74 68 65 20 73 | 74 61 63 6b 20 61 73 20 |om the s|tack as |
|000019f0| 77 65 6c 6c 2e 20 20 54 | 6f 20 73 65 65 20 74 68 |well. T|o see th|
|00001a00| 65 20 74 6f 70 20 73 74 | 61 63 6b 20 76 61 6c 75 |e top st|ack valu|
|00001a10| 65 20 62 75 74 20 6e 6f | 74 20 72 65 6d 6f 76 65 |e but no|t remove|
|00001a20| 20 69 74 20 79 6f 75 20 | 6e 65 65 64 20 74 6f 20 | it you |need to |
|00001a30| 65 6e 74 65 72 20 64 75 | 70 20 2e 20 74 6f 20 66 |enter du|p . to f|
|00001a40| 69 72 73 74 20 64 75 70 | 6c 69 63 61 74 65 20 74 |irst dup|licate t|
|00001a50| 68 65 20 74 6f 70 20 69 | 74 65 6d 20 61 6e 64 20 |he top i|tem and |
|00001a60| 74 68 65 6e 20 70 72 69 | 6e 74 20 69 74 2e 20 20 |then pri|nt it. |
|00001a70| 42 79 20 64 65 66 61 75 | 6c 74 2c 20 46 6f 72 74 |By defau|lt, Fort|
|00001a80| 68 20 6f 6e 6c 79 20 6f | 70 65 72 61 74 65 73 20 |h only o|perates |
|00001a90| 6f 6e 20 31 36 2d 62 69 | 74 20 69 6e 74 65 67 65 |on 16-bi|t intege|
|00001aa0| 72 73 20 62 75 74 20 50 | 6f 63 6b 65 74 20 46 6f |rs but P|ocket Fo|
|00001ab0| 72 74 68 20 73 75 70 70 | 6f 72 74 73 20 72 65 61 |rth supp|orts rea|
|00001ac0| 6c 20 6e 75 6d 62 65 72 | 73 20 61 73 20 77 65 6c |l number|s as wel|
|00001ad0| 6c 2e 20 20 46 6f 72 74 | 68 20 77 69 6c 6c 20 69 |l. Fort|h will i|
|00001ae0| 6e 74 65 72 70 72 65 74 | 20 61 20 76 61 6c 75 65 |nterpret| a value|
|00001af0| 20 61 73 20 61 20 72 65 | 61 6c 20 6e 75 6d 62 65 | as a re|al numbe|
|00001b00| 72 20 6f 6e 6c 79 20 69 | 66 20 69 74 20 63 6f 6e |r only i|f it con|
|00001b10| 74 61 69 6e 73 20 61 20 | 64 65 63 69 6d 61 6c 20 |tains a |decimal |
|00001b20| 70 6f 69 6e 74 21 20 20 | 49 74 20 69 73 20 74 68 |point! |It is th|
|00001b30| 65 72 65 66 6f 72 65 20 | 69 6d 70 6f 72 74 61 6e |erefore |importan|
|00001b40| 74 20 74 6f 20 65 6e 74 | 65 72 20 61 20 64 65 63 |t to ent|er a dec|
|00001b50| 69 6d 61 6c 20 70 6f 69 | 6e 74 20 66 6f 72 20 65 |imal poi|nt for e|
|00001b60| 76 65 72 79 20 6e 75 6d | 62 65 72 20 74 68 61 74 |very num|ber that|
|00001b70| 20 73 68 6f 75 6c 64 20 | 62 65 20 61 20 72 65 61 | should |be a rea|
|00001b80| 6c 20 6e 75 6d 62 65 72 | 20 61 6e 64 20 74 6f 20 |l number| and to |
|00001b90| 6e 6f 74 20 75 73 65 20 | 6f 6e 65 20 6f 6e 20 6e |not use |one on n|
|00001ba0| 75 6d 62 65 72 73 20 74 | 68 61 74 20 73 68 6f 75 |umbers t|hat shou|
|00001bb0| 6c 64 20 62 65 20 69 6e | 74 65 67 65 72 73 2e 0d |ld be in|tegers..|
|00001bc0| 0d 46 6f 72 74 68 20 73 | 75 70 70 6f 72 74 73 20 |.Forth s|upports |
|00001bd0| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 61 72 69 |the stan|dard ari|
|00001be0| 74 68 6d 65 74 69 63 20 | 6f 70 65 72 61 74 69 6f |thmetic |operatio|
|00001bf0| 6e 73 3a 20 2b 2c 20 2d | 2c 20 2a 2c 20 2f 20 20 |ns: +, -|, *, / |
|00001c00| 28 69 6e 74 65 67 65 72 | 73 29 20 61 6e 64 20 66 |(integer|s) and f|
|00001c10| 2b 2c 20 66 2d 2c 20 66 | 2a 2c 20 66 2f 20 28 72 |+, f-, f|*, f/ (r|
|00001c20| 65 61 6c 20 6e 75 6d 62 | 65 72 73 29 2e 20 20 55 |eal numb|ers). U|
|00001c30| 73 65 20 66 2e 20 74 6f | 20 70 72 69 6e 74 20 74 |se f. to| print t|
|00001c40| 68 65 20 74 6f 70 20 6f | 66 20 73 74 61 63 6b 20 |he top o|f stack |
|00001c50| 61 73 20 61 20 72 65 61 | 6c 20 6e 75 6d 62 65 72 |as a rea|l number|
|00001c60| 2e 20 20 66 64 75 70 20 | 64 75 70 6c 69 63 61 74 |. fdup |duplicat|
|00001c70| 65 73 20 74 68 65 20 72 | 65 61 6c 20 6e 75 6d 62 |es the r|eal numb|
|00001c80| 65 72 20 61 74 20 74 68 | 65 20 74 6f 70 20 6f 66 |er at th|e top of|
|00001c90| 20 74 68 65 20 73 74 61 | 63 6b 20 77 68 69 6c 65 | the sta|ck while|
|00001ca0| 20 66 73 77 61 70 20 77 | 69 6c 6c 20 73 77 69 74 | fswap w|ill swit|
|00001cb0| 63 68 20 74 68 65 20 74 | 6f 70 20 74 77 6f 20 72 |ch the t|op two r|
|00001cc0| 65 61 6c 20 6e 75 6d 62 | 65 72 73 20 6f 6e 20 74 |eal numb|ers on t|
|00001cd0| 68 65 20 73 74 61 63 6b | 2e 20 20 54 68 65 73 65 |he stack|. These|
|00001ce0| 20 66 65 77 20 77 6f 72 | 64 73 20 77 69 6c 6c 20 | few wor|ds will |
|00001cf0| 61 6c 6c 6f 77 20 66 6f | 72 20 75 73 69 6e 67 20 |allow fo|r using |
|00001d00| 46 6f 72 74 68 20 61 73 | 20 61 20 73 69 6d 70 6c |Forth as| a simpl|
|00001d10| 65 20 63 61 6c 63 75 6c | 61 74 6f 72 2e 20 20 46 |e calcul|ator. F|
|00001d20| 6f 72 74 68 2c 20 74 79 | 70 69 63 61 6c 6c 79 2c |orth, ty|pically,|
|00001d30| 20 64 6f 65 73 20 6e 6f | 74 20 73 75 70 70 6f 72 | does no|t suppor|
|00001d40| 74 20 68 69 67 68 65 72 | 20 6d 61 74 68 65 6d 61 |t higher| mathema|
|00001d50| 74 69 63 61 6c 20 66 75 | 6e 63 74 69 6f 6e 73 2c |tical fu|nctions,|
|00001d60| 20 74 68 6f 75 67 68 20 | 50 6f 63 6b 65 74 20 46 | though |Pocket F|
|00001d70| 6f 72 74 68 20 64 6f 65 | 73 2e 0d 0d 46 6f 72 74 |orth doe|s...Fort|
|00001d80| 68 20 64 65 72 69 76 65 | 73 20 69 74 73 20 65 78 |h derive|s its ex|
|00001d90| 74 65 6e 73 69 62 69 6c | 69 74 79 20 66 72 6f 6d |tensibil|ity from|
|00001da0| 20 74 68 65 20 77 61 79 | 20 69 6e 20 77 68 69 63 | the way| in whic|
|00001db0| 68 20 70 72 6f 67 72 61 | 6d 73 20 61 72 65 20 77 |h progra|ms are w|
|00001dc0| 72 69 74 74 65 6e 2e 20 | 20 41 73 20 46 6f 72 74 |ritten. | As Fort|
|00001dd0| 68 20 69 6e 74 65 72 70 | 72 65 74 73 20 74 6f 6b |h interp|rets tok|
|00001de0| 65 6e 73 20 66 72 6f 6d | 20 74 68 65 20 69 6e 70 |ens from| the inp|
|00001df0| 75 74 20 6c 69 6e 65 20 | 28 61 6e 79 74 68 69 6e |ut line |(anythin|
|00001e00| 67 20 73 75 72 72 6f 75 | 6e 64 65 64 20 62 79 20 |g surrou|nded by |
|00001e10| 73 70 61 63 65 73 20 69 | 73 20 61 20 74 6f 6b 65 |spaces i|s a toke|
|00001e20| 6e 29 20 69 74 20 65 69 | 74 68 65 72 20 70 75 73 |n) it ei|ther pus|
|00001e30| 68 65 73 20 69 74 20 6f | 6e 20 74 68 65 20 73 74 |hes it o|n the st|
|00001e40| 61 63 6b 20 61 73 20 61 | 20 6e 75 6d 62 65 72 20 |ack as a| number |
|00001e50| 6f 72 20 6c 6f 6f 6b 73 | 20 69 74 20 75 70 20 61 |or looks| it up a|
|00001e60| 73 20 61 20 77 6f 72 64 | 20 69 6e 20 69 74 73 20 |s a word| in its |
|00001e70| 64 69 63 74 69 6f 6e 61 | 72 79 2e 20 20 41 20 46 |dictiona|ry. A F|
|00001e80| 6f 72 74 68 20 70 72 6f | 67 72 61 6d 2c 20 74 68 |orth pro|gram, th|
|00001e90| 65 72 65 66 6f 72 65 2c | 20 63 6f 6e 73 69 73 74 |erefore,| consist|
|00001ea0| 73 20 6f 66 20 61 64 64 | 69 6e 67 20 64 65 66 69 |s of add|ing defi|
|00001eb0| 6e 69 74 69 6f 6e 73 20 | 74 6f 20 74 68 65 20 64 |nitions |to the d|
|00001ec0| 69 63 74 69 6f 6e 61 72 | 79 2e 20 20 44 65 66 69 |ictionar|y. Defi|
|00001ed0| 6e 69 74 69 6f 6e 73 20 | 61 72 65 20 62 65 67 69 |nitions |are begi|
|00001ee0| 6e 20 77 69 74 68 20 74 | 68 65 20 3a 20 77 6f 72 |n with t|he : wor|
|00001ef0| 64 20 61 6e 64 20 65 6e | 64 20 77 69 74 68 20 61 |d and en|d with a|
|00001f00| 20 3b 20 77 6f 72 64 2e | 20 20 4f 6e 63 65 20 64 | ; word.| Once d|
|00001f10| 65 66 69 6e 65 64 2c 20 | 74 68 65 20 77 6f 72 64 |efined, |the word|
|00001f20| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 69 6e 20 | can be |used in |
|00001f30| 73 75 62 73 65 71 75 65 | 6e 74 20 64 65 66 69 6e |subseque|nt defin|
|00001f40| 69 74 69 6f 6e 73 2e 20 | 20 50 61 72 61 6d 65 74 |itions. | Paramet|
|00001f50| 65 72 73 20 61 72 65 20 | 70 61 73 73 65 64 20 76 |ers are |passed v|
|00001f60| 69 61 20 74 68 65 20 73 | 74 61 63 6b 2e 20 20 46 |ia the s|tack. F|
|00001f70| 6f 72 74 68 20 64 6f 65 | 73 20 61 6c 6c 6f 77 20 |orth doe|s allow |
|00001f80| 66 6f 72 20 74 68 65 20 | 75 73 65 20 6f 66 20 76 |for the |use of v|
|00001f90| 61 72 69 61 62 6c 65 73 | 20 61 6e 64 20 63 6f 6e |ariables| and con|
|00001fa0| 73 74 61 6e 74 73 2c 20 | 74 68 6f 75 67 68 20 74 |stants, |though t|
|00001fb0| 68 65 73 65 20 61 72 65 | 20 73 6c 6f 77 65 72 20 |hese are| slower |
|00001fc0| 74 68 61 6e 20 74 68 65 | 20 73 74 61 63 6b 2e 20 |than the| stack. |
|00001fd0| 20 55 73 65 20 74 68 65 | 20 77 6f 72 64 20 76 61 | Use the| word va|
|00001fe0| 72 69 61 62 6c 65 20 28 | 6f 72 20 66 76 61 72 69 |riable (|or fvari|
|00001ff0| 61 62 6c 65 29 20 66 6f | 6c 6c 6f 77 65 64 20 62 |able) fo|llowed b|
|00002000| 79 20 74 68 65 20 6e 61 | 6d 65 20 66 6f 72 20 74 |y the na|me for t|
|00002010| 68 65 20 76 61 72 69 61 | 62 6c 65 20 74 6f 20 63 |he varia|ble to c|
|00002020| 72 65 61 74 65 20 6f 6e | 65 2e 20 20 55 73 65 20 |reate on|e. Use |
|00002030| c7 76 61 6c 75 65 c8 20 | 63 6f 6e 73 74 61 6e 74 |.value. |constant|
|00002040| 20 28 20 6f 72 20 66 63 | 6f 6e 73 74 61 6e 74 29 | ( or fc|onstant)|
|00002050| 20 c7 6e 61 6d 65 c8 20 | 74 6f 20 64 65 66 69 6e | .name. |to defin|
|00002060| 65 20 61 20 63 6f 6e 73 | 74 61 6e 74 2e 20 20 0d |e a cons|tant. .|
|00002070| 45 78 61 6d 70 6c 65 73 | 3a 20 20 74 79 70 69 6e |Examples|: typin|
|00002080| 67 20 27 66 76 61 72 69 | 61 62 6c 65 20 73 74 64 |g 'fvari|able std|
|00002090| 64 65 76 27 20 28 6e 6f | 20 71 75 6f 74 65 73 29 |dev' (no| quotes)|
|000020a0| 20 77 69 6c 6c 20 63 72 | 65 61 74 65 20 72 6f 6f | will cr|eate roo|
|000020b0| 6d 20 69 6e 20 74 68 65 | 20 64 69 63 74 69 6f 6e |m in the| diction|
|000020c0| 61 72 79 20 66 6f 72 20 | 61 20 66 6c 6f 61 74 69 |ary for |a floati|
|000020d0| 6e 67 20 70 6f 69 6e 74 | 20 76 61 72 69 61 62 6c |ng point| variabl|
|000020e0| 65 20 6e 61 6d 65 64 20 | 73 74 64 64 65 76 20 77 |e named |stddev w|
|000020f0| 68 69 6c 65 20 74 79 70 | 69 6e 67 20 33 2e 31 34 |hile typ|ing 3.14|
|00002100| 31 35 39 32 20 66 63 6f | 6e 73 74 61 6e 74 20 50 |1592 fco|nstant P|
|00002110| 49 20 77 69 6c 6c 20 63 | 72 65 61 74 65 20 61 20 |I will c|reate a |
|00002120| 63 6f 6e 73 74 61 6e 74 | 20 66 6f 72 20 70 69 2e |constant| for pi.|
|00002130| 20 46 6f 72 74 68 20 69 | 73 20 63 61 73 65 2d 69 | Forth i|s case-i|
|00002140| 6e 73 65 6e 73 69 74 69 | 76 65 2e 20 20 43 6f 6e |nsensiti|ve. Con|
|00002150| 73 74 61 6e 74 73 20 61 | 72 65 20 72 65 61 6c 6c |stants a|re reall|
|00002160| 79 20 73 70 65 63 69 61 | 6c 20 77 6f 72 64 73 20 |y specia|l words |
|00002170| 74 68 61 74 20 70 75 73 | 68 20 74 68 65 20 76 61 |that pus|h the va|
|00002180| 6c 75 65 20 6f 6e 20 74 | 68 65 20 73 74 61 63 6b |lue on t|he stack|
|00002190| 20 73 6f 20 74 68 61 74 | 20 74 79 70 69 6e 67 20 | so that| typing |
|000021a0| 70 69 20 77 69 6c 6c 20 | 63 61 75 73 65 20 74 68 |pi will |cause th|
|000021b0| 65 20 76 61 6c 75 65 20 | 74 6f 20 62 65 20 70 75 |e value |to be pu|
|000021c0| 73 68 65 64 20 6f 6e 20 | 74 68 65 20 73 74 61 63 |shed on |the stac|
|000021d0| 6b 2e 20 20 48 6f 77 65 | 76 65 72 2c 20 20 65 6e |k. Howe|ver, en|
|000021e0| 74 65 72 69 6e 67 20 74 | 68 65 20 6e 61 6d 65 20 |tering t|he name |
|000021f0| 6f 66 20 61 20 76 61 72 | 69 61 62 6c 65 20 77 69 |of a var|iable wi|
|00002200| 6c 6c 20 4e 4f 54 20 70 | 6c 61 63 65 20 69 74 73 |ll NOT p|lace its|
|00002210| 20 76 61 6c 75 65 20 6f | 6e 20 74 68 65 20 73 74 | value o|n the st|
|00002220| 61 63 6b 2c 20 62 75 74 | 20 72 61 74 68 65 72 2c |ack, but| rather,|
|00002230| 20 74 68 65 20 61 64 64 | 72 65 73 73 20 77 68 65 | the add|ress whe|
|00002240| 72 65 20 74 68 65 20 76 | 61 72 69 61 62 6c 65 20 |re the v|ariable |
|00002250| 69 73 20 73 74 6f 72 65 | 64 20 77 69 6c 6c 20 62 |is store|d will b|
|00002260| 65 20 70 6c 61 63 65 64 | 20 6f 6e 20 74 68 65 20 |e placed| on the |
|00002270| 73 74 61 63 6b 2e 20 20 | 54 6f 20 67 65 74 20 74 |stack. |To get t|
|00002280| 68 65 20 76 61 6c 75 65 | 20 6f 66 20 61 20 76 61 |he value| of a va|
|00002290| 72 69 61 62 6c 65 20 61 | 20 74 77 6f 20 77 6f 72 |riable a| two wor|
|000022a0| 64 20 63 6f 6d 62 69 6e | 61 74 69 6f 6e 20 6d 75 |d combin|ation mu|
|000022b0| 73 74 20 62 65 20 75 73 | 65 64 3a 20 20 73 74 64 |st be us|ed: std|
|000022c0| 64 65 76 20 66 40 20 77 | 69 6c 6c 20 60 66 65 74 |dev f@ w|ill `fet|
|000022d0| 63 68 27 20 74 68 65 20 | 66 6c 6f 61 74 69 6e 67 |ch' the |floating|
|000022e0| 20 70 6f 69 6e 74 20 6e | 75 6d 62 65 72 20 73 74 | point n|umber st|
|000022f0| 6f 72 65 64 20 61 74 20 | 74 68 65 20 61 64 64 72 |ored at |the addr|
|00002300| 65 73 73 20 74 68 61 74 | 20 73 74 64 64 65 76 20 |ess that| stddev |
|00002310| 70 6c 61 63 65 73 20 6f | 6e 20 74 68 65 20 73 74 |places o|n the st|
|00002320| 61 63 6b 2e 20 20 53 69 | 6d 69 6c 61 72 6c 79 2c |ack. Si|milarly,|
|00002330| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 61 6e | the val|ue of an|
|00002340| 20 69 6e 74 65 67 65 72 | 20 76 61 72 69 61 62 6c | integer| variabl|
|00002350| 65 20 69 73 20 66 6f 75 | 6e 64 20 75 73 69 6e 67 |e is fou|nd using|
|00002360| 20 40 20 69 6e 73 74 65 | 61 64 20 6f 66 20 66 40 | @ inste|ad of f@|
|00002370| 2e 20 20 54 6f 20 73 74 | 6f 72 65 20 61 20 76 61 |. To st|ore a va|
|00002380| 6c 75 65 20 69 6e 20 61 | 20 76 61 72 69 61 62 6c |lue in a| variabl|
|00002390| 65 2c 20 75 73 65 20 21 | 20 6f 72 20 66 21 2c 20 |e, use !| or f!, |
|000023a0| 20 33 20 61 67 65 20 21 | 20 6f 72 20 31 2e 34 31 | 3 age !| or 1.41|
|000023b0| 34 20 73 71 72 32 20 66 | 21 2e 0d 0d 46 6f 72 74 |4 sqr2 f|!...Fort|
|000023c0| 68 20 75 73 65 73 20 73 | 65 76 65 72 61 6c 20 73 |h uses s|everal s|
|000023d0| 74 61 6e 64 61 72 64 20 | 63 6f 6e 74 72 6f 6c 20 |tandard |control |
|000023e0| 73 74 72 75 63 74 75 72 | 65 73 3a 20 20 c7 69 66 |structur|es: .if|
|000023f0| 20 65 6c 73 65 20 74 68 | 65 6e c8 2c 20 c7 64 6f | else th|en., .do|
|00002400| 20 6c 6f 6f 70 20 6f 72 | 20 2b 6c 6f 6f 70 c8 2c | loop or| +loop.,|
|00002410| 20 c7 62 65 67 69 6e 20 | 75 6e 74 69 6c c8 2c 20 | .begin |until., |
|00002420| c7 62 65 67 69 6e 20 77 | 68 69 6c 65 20 72 65 70 |.begin w|hile rep|
|00002430| 65 61 74 c8 2c 20 61 6e | 64 20 c7 62 65 67 69 6e |eat., an|d .begin|
|00002440| 20 61 67 61 69 6e c8 2e | 20 20 54 68 65 20 70 68 | again..| The ph|
|00002450| 72 61 73 65 0d 20 0d 63 | 6f 75 6e 74 20 40 20 31 |rase. .c|ount @ 1|
|00002460| 30 30 20 3c 20 69 66 20 | 2e 22 20 59 65 73 2c 20 |00 < if |." Yes, |
|00002470| 74 68 65 72 65 20 69 73 | 20 72 6f 6f 6d 22 20 63 |there is| room" c|
|00002480| 72 20 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r . | |
|00002490| 20 20 20 20 20 20 65 6c | 73 65 20 2e 22 20 4e 6f | el|se ." No|
|000024a0| 2c 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 72 6f |, there |is no ro|
|000024b0| 6f 6d 2e 22 20 63 72 20 | 74 68 65 6e 0d 0d 77 69 |om." cr |then..wi|
|000024c0| 6c 6c 20 63 68 65 63 6b | 20 77 68 65 74 68 65 72 |ll check| whether|
|000024d0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 76 61 6c | the cur|rent val|
|000024e0| 75 65 20 6f 66 20 63 6f | 75 6e 74 20 69 73 20 6c |ue of co|unt is l|
|000024f0| 65 73 73 20 74 68 61 6e | 20 31 30 30 20 6f 72 20 |ess than| 100 or |
|00002500| 6e 6f 74 2e 20 20 46 6f | 72 74 68 20 73 75 70 70 |not. Fo|rth supp|
|00002510| 6f 72 74 73 20 3c 2c 20 | 3e 2c 20 61 6e 64 20 3d |orts <, |>, and =|
|00002520| 20 66 6f 72 20 63 6f 6d | 70 61 72 69 6e 67 20 69 | for com|paring i|
|00002530| 6e 74 65 67 65 72 20 76 | 61 6c 75 65 73 2e 20 20 |nteger v|alues. |
|00002540| 50 6f 63 6b 65 74 20 46 | 6f 72 74 68 20 68 61 73 |Pocket F|orth has|
|00002550| 20 61 20 0d 73 69 6e 67 | 6c 65 20 77 6f 72 64 20 | a .sing|le word |
|00002560| 66 6f 72 20 63 6f 6d 70 | 61 72 69 6e 67 20 66 6c |for comp|aring fl|
|00002570| 6f 61 74 69 6e 67 20 70 | 6f 69 6e 74 20 6e 75 6d |oating p|oint num|
|00002580| 62 65 72 73 2c 20 66 63 | 6f 6d 70 61 72 65 2c 20 |bers, fc|ompare, |
|00002590| 77 68 69 63 68 20 72 65 | 74 75 72 6e 73 20 0d 61 |which re|turns .a|
|000025a0| 20 2d 31 20 69 66 20 66 | 31 3c 66 32 2c 20 30 20 | -1 if f|1<f2, 0 |
|000025b0| 69 66 20 66 31 3d 66 32 | 2c 20 61 6e 64 20 2b 31 |if f1=f2|, and +1|
|000025c0| 20 69 66 20 66 31 3e 66 | 32 2c 20 77 68 65 72 65 | if f1>f|2, where|
|000025d0| 20 66 31 20 61 6e 64 20 | 66 32 20 61 72 65 20 74 | f1 and |f2 are t|
|000025e0| 68 65 20 74 6f 70 20 74 | 77 6f 20 73 74 61 63 6b |he top t|wo stack|
|000025f0| 20 6e 75 6d 62 65 72 73 | 20 28 61 73 73 75 6d 65 | numbers| (assume|
|00002600| 64 20 74 6f 20 62 65 20 | 66 6c 6f 61 74 69 6e 67 |d to be |floating|
|00002610| 20 70 6f 69 6e 74 29 2e | 20 20 49 74 20 69 73 20 | point).| It is |
|00002620| 69 6d 70 6f 72 74 61 6e | 74 20 74 6f 20 6e 6f 74 |importan|t to not|
|00002630| 65 20 74 68 61 74 20 75 | 6e 6c 69 6b 65 20 6d 6f |e that u|nlike mo|
|00002640| 73 74 20 6f 74 68 65 72 | 20 46 6f 72 74 68 20 77 |st other| Forth w|
|00002650| 6f 72 64 73 2c 20 66 63 | 6f 6d 70 61 72 65 20 64 |ords, fc|ompare d|
|00002660| 6f 65 73 20 5f 6e 6f 74 | 5f 20 72 65 6d 6f 76 65 |oes _not|_ remove|
|00002670| 20 74 68 65 20 74 6f 70 | 20 74 77 6f 20 0d 66 6c | the top| two .fl|
|00002680| 6f 61 74 69 6e 67 20 70 | 6f 69 6e 74 20 6e 75 6d |oating p|oint num|
|00002690| 62 65 72 73 2e 20 20 54 | 68 65 20 64 6f 20 6c 6f |bers. T|he do lo|
|000026a0| 6f 70 20 69 73 20 73 69 | 6d 69 6c 61 72 20 74 6f |op is si|milar to|
|000026b0| 20 74 68 65 20 66 6f 72 | 20 6c 6f 6f 70 73 20 69 | the for| loops i|
|000026c0| 6e 20 6f 74 68 65 72 20 | 6c 61 6e 67 75 61 67 65 |n other |language|
|000026d0| 73 2e 20 20 41 73 20 6d | 69 67 68 74 20 62 65 20 |s. As m|ight be |
|000026e0| 65 78 70 65 63 74 65 64 | 2c 20 74 68 65 20 73 79 |expected|, the sy|
|000026f0| 6e 74 61 78 20 69 73 20 | 20 0d 0d c7 68 69 c8 20 |ntax is | ...hi. |
|00002700| 20 c7 6c 6f c8 20 20 64 | 6f 20 20 c7 62 6f 64 79 | .lo. d|o .body|
|00002710| c8 20 6c 6f 6f 70 20 0d | 0d 77 68 65 72 65 20 74 |. loop .|.where t|
|00002720| 68 65 20 69 6e 64 65 78 | 20 28 70 75 73 68 65 64 |he index| (pushed|
|00002730| 20 6f 6e 20 74 68 65 20 | 73 74 61 63 6b 20 62 79 | on the |stack by|
|00002740| 20 74 68 65 20 77 6f 72 | 64 20 72 29 20 77 69 6c | the wor|d r) wil|
|00002750| 6c 20 67 6f 20 66 72 6f | 6d 20 6c 6f 20 74 6f 20 |l go fro|m lo to |
|00002760| 68 69 2d 31 2e 20 20 20 | 41 20 76 61 72 69 61 74 |hi-1. |A variat|
|00002770| 69 6f 6e 20 69 73 20 74 | 6f 20 75 73 65 20 2b 6c |ion is t|o use +l|
|00002780| 6f 6f 70 20 69 6e 73 74 | 65 61 64 20 6f 66 20 6c |oop inst|ead of l|
|00002790| 6f 6f 70 20 74 6f 20 6a | 75 6d 70 20 62 79 20 74 |oop to j|ump by t|
|000027a0| 68 65 20 76 61 6c 75 65 | 20 6f 6e 20 74 68 65 20 |he value| on the |
|000027b0| 74 6f 70 20 6f 66 20 74 | 68 65 20 73 74 61 63 6b |top of t|he stack|
|000027c0| 20 28 77 68 69 63 68 20 | 6d 75 73 74 20 62 65 20 | (which |must be |
|000027d0| 70 6f 73 69 74 69 76 65 | 29 2e 20 20 c7 42 65 67 |positive|). .Beg|
|000027e0| 69 6e 20 75 6e 74 69 6c | c8 20 61 6e 64 20 c7 62 |in until|. and .b|
|000027f0| 65 67 69 6e 20 77 68 69 | 6c 65 20 72 65 70 65 61 |egin whi|le repea|
|00002800| 74 c8 0d 61 72 65 20 66 | 6f 72 20 62 6f 74 74 6f |t..are f|or botto|
|00002810| 6d 20 74 65 73 74 65 64 | 20 61 6e 64 20 74 6f 70 |m tested| and top|
|00002820| 20 74 65 73 74 65 64 20 | 63 6f 6e 64 69 74 69 6f | tested |conditio|
|00002830| 6e 61 6c 20 6c 6f 6f 70 | 73 2e 20 20 54 68 65 20 |nal loop|s. The |
|00002840| 63 6f 6e 64 69 74 69 6f | 6e 20 69 73 20 74 68 65 |conditio|n is the|
|00002850| 20 73 61 6d 65 20 61 73 | 20 74 68 65 20 69 66 20 | same as| the if |
|00002860| 73 74 61 74 65 6d 65 6e | 74 3a 0d 0d 30 20 62 65 |statemen|t:..0 be|
|00002870| 67 69 6e 20 20 2e 22 20 | 48 65 6c 6c 6f 22 20 63 |gin ." |Hello" c|
|00002880| 72 20 31 2b 20 64 75 70 | 20 39 39 20 3e 20 75 6e |r 1+ dup| 99 > un|
|00002890| 74 69 6c 20 20 0d 0d 77 | 69 6c 6c 20 70 72 69 6e |til ..w|ill prin|
|000028a0| 74 20 74 68 65 20 77 6f | 72 64 20 60 48 65 6c 6c |t the wo|rd `Hell|
|000028b0| 6f 27 20 31 30 30 20 74 | 69 6d 65 73 2e 20 20 53 |o' 100 t|imes. S|
|000028c0| 69 6d 69 6c 61 72 6c 79 | 2c 20 74 68 69 73 20 66 |imilarly|, this f|
|000028d0| 72 61 67 6d 65 6e 74 20 | 77 69 6c 6c 20 61 6c 73 |ragment |will als|
|000028e0| 6f 20 0d 70 72 69 6e 74 | 20 60 48 65 6c 6c 6f 27 |o .print| `Hello'|
|000028f0| 20 31 30 30 20 74 69 6d | 65 73 3a 0d 0d 30 20 62 | 100 tim|es:..0 b|
|00002900| 65 67 69 6e 20 20 64 75 | 70 20 31 30 30 20 3c 20 |egin du|p 100 < |
|00002910| 20 77 68 69 6c 65 20 20 | 2e 22 20 48 65 6c 6c 6f | while |." Hello|
|00002920| 22 20 63 72 20 31 2b 20 | 20 72 65 70 65 61 74 0d |" cr 1+ | repeat.|
|00002930| 0d 0d a5 a5 50 75 74 74 | 69 6e 67 20 69 74 20 61 |....Putt|ing it a|
|00002940| 6c 6c 20 74 6f 67 65 74 | 68 65 72 0d 0d 09 54 68 |ll toget|her...Th|
|00002950| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 65 78 61 6d |e follow|ing exam|
|00002960| 70 6c 65 73 20 77 69 6c | 6c 20 69 6c 6c 75 73 74 |ples wil|l illust|
|00002970| 72 61 74 65 20 74 68 65 | 20 63 72 65 61 74 69 6f |rate the| creatio|
|00002980| 6e 20 6f 66 20 73 69 6d | 70 6c 65 20 46 6f 72 74 |n of sim|ple Fort|
|00002990| 68 20 77 6f 72 64 73 2e | 0d 0d 31 2e 20 20 41 76 |h words.|..1. Av|
|000029a0| 65 72 61 67 69 6e 67 20 | 66 6f 75 72 20 6e 75 6d |eraging |four num|
|000029b0| 62 65 72 73 3a 0d 0d 20 | 20 20 20 20 20 20 20 20 |bers:.. | |
|000029c0| 20 20 20 20 09 3a 20 20 | 61 76 65 34 20 20 28 20 | .: |ave4 ( |
|000029d0| 61 20 62 20 63 20 64 20 | 2d 2d 20 61 76 65 72 61 |a b c d |-- avera|
|000029e0| 67 65 20 29 20 20 2b 20 | 2b 20 2b 20 34 20 2f 20 |ge ) + |+ + 4 / |
|000029f0| 3b 0d 0d 55 73 69 6e 67 | 20 69 6e 74 65 67 65 72 |;..Using| integer|
|00002a00| 20 61 72 69 74 68 6d 65 | 74 69 63 2c 20 73 75 6d | arithme|tic, sum|
|00002a10| 20 74 68 65 20 74 6f 70 | 20 66 6f 75 72 20 73 74 | the top| four st|
|00002a20| 61 63 6b 20 69 74 65 6d | 73 20 61 6e 64 20 64 69 |ack item|s and di|
|00002a30| 76 69 64 65 20 74 68 65 | 20 72 65 73 75 6c 74 20 |vide the| result |
|00002a40| 62 79 20 34 2e 20 20 49 | 6c 6c 75 73 74 72 61 74 |by 4. I|llustrat|
|00002a50| 65 73 20 63 6f 6d 6d 65 | 6e 74 73 20 77 68 69 63 |es comme|nts whic|
|00002a60| 68 20 61 72 65 20 61 6e | 79 74 68 69 6e 67 20 73 |h are an|ything s|
|00002a70| 75 72 72 6f 75 6e 64 65 | 64 20 62 79 20 60 28 29 |urrounde|d by `()|
|00002a80| 27 2c 20 6e 6f 74 65 20 | 74 68 65 20 73 70 61 63 |', note |the spac|
|00002a90| 65 20 61 66 74 65 72 20 | 74 68 65 20 60 28 27 2e |e after |the `('.|
|00002aa0| 20 20 54 68 65 20 63 6f | 6d 6d 65 6e 74 20 67 69 | The co|mment gi|
|00002ab0| 76 65 6e 20 69 73 20 6b | 6e 6f 77 6e 20 61 73 20 |ven is k|nown as |
|00002ac0| 61 20 5f 73 74 61 63 6b | 20 65 66 66 65 63 74 20 |a _stack| effect |
|00002ad0| 63 6f 6d 6d 65 6e 74 5f | 20 61 6e 64 20 73 68 6f |comment_| and sho|
|00002ae0| 77 73 20 74 68 65 20 77 | 6f 72 64 27 73 20 65 66 |ws the w|ord's ef|
|00002af0| 66 65 63 74 20 6f 6e 20 | 74 68 65 20 73 74 61 63 |fect on |the stac|
|00002b00| 6b 2e 20 20 49 6e 69 74 | 69 61 6c 20 73 74 61 63 |k. Init|ial stac|
|00002b10| 6b 20 69 74 65 6d 73 20 | 61 72 65 20 6f 6e 20 74 |k items |are on t|
|00002b20| 68 65 20 6c 65 66 74 20 | 6f 66 20 74 68 65 20 60 |he left |of the `|
|00002b30| 2d 2d 27 20 61 6e 64 20 | 74 68 65 20 72 65 73 75 |--' and |the resu|
|00002b40| 6c 74 20 69 73 20 6f 6e | 20 74 68 65 20 72 69 67 |lt is on| the rig|
|00002b50| 68 74 2e 0d 0d 32 2e 20 | 20 41 76 65 72 61 67 69 |ht...2. | Averagi|
|00002b60| 6e 67 20 4e 20 66 6c 6f | 61 74 69 6e 67 20 70 6f |ng N flo|ating po|
|00002b70| 69 6e 74 20 6e 75 6d 62 | 65 72 73 0d 0d 09 20 20 |int numb|ers... |
|00002b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 20 20 61 | | : a|
|00002b90| 76 65 72 61 67 65 4e 20 | 28 20 61 31 2e 20 2e 2e |verageN |( a1. ..|
|00002ba0| 2e 20 61 4e 2e 20 4e 20 | 2d 2d 20 61 76 65 72 61 |. aN. N |-- avera|
|00002bb0| 67 65 2e 20 29 0d 09 09 | 20 20 20 20 20 20 20 20 |ge. )...| |
|00002bc0| 20 20 20 20 20 20 20 20 | 20 20 64 75 70 20 3e 72 | | dup >r|
|00002bd0| 20 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 | . | (|
|00002be0| 20 73 61 76 65 20 4e 20 | 6f 6e 20 74 68 65 20 72 | save N |on the r|
|00002bf0| 65 74 75 72 6e 20 73 74 | 61 63 6b 20 29 0d 09 09 |eturn st|ack )...|
|00002c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c10| 20 20 31 2d 20 30 20 64 | 6f 20 66 2b 20 6c 6f 6f | 1- 0 d|o f+ loo|
|00002c20| 70 09 28 20 61 64 6a 75 | 73 74 20 4e 20 61 6e 64 |p.( adju|st N and|
|00002c30| 20 61 64 64 20 74 68 65 | 20 76 61 6c 75 65 73 20 | add the| values |
|00002c40| 29 20 0d 09 09 20 20 20 | 20 20 20 20 20 20 20 20 |) ... | |
|00002c50| 20 20 20 20 20 20 20 20 | 72 3e 20 09 20 20 20 20 | |r> . |
|00002c60| 20 20 20 20 09 20 20 20 | 20 20 20 20 20 28 20 67 | . | ( g|
|00002c70| 65 74 20 4e 20 6f 66 66 | 20 74 68 65 20 72 65 74 |et N off| the ret|
|00002c80| 75 72 6e 20 73 74 61 63 | 6b 20 29 0d 09 09 20 20 |urn stac|k )... |
|00002c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ca0| 20 30 20 64 3e 66 20 66 | 2f 20 3b 20 09 20 20 20 | 0 d>f f|/ ; . |
|00002cb0| 20 20 20 20 28 20 6d 61 | 6b 65 20 69 74 20 72 65 | ( ma|ke it re|
|00002cc0| 61 6c 20 61 6e 64 20 64 | 69 76 69 64 65 20 74 6f |al and d|ivide to|
|00002cd0| 20 66 69 6e 64 20 61 76 | 65 72 61 67 65 20 29 0d | find av|erage ).|
|00002ce0| 0d 54 68 69 73 20 65 78 | 61 6d 70 6c 65 20 69 6c |.This ex|ample il|
|00002cf0| 6c 75 73 74 72 61 74 65 | 73 20 75 73 65 20 6f 66 |lustrate|s use of|
|00002d00| 20 74 68 65 20 72 65 74 | 75 72 6e 20 73 74 61 63 | the ret|urn stac|
|00002d10| 6b 2e 20 20 54 68 65 20 | 72 65 74 75 72 6e 20 73 |k. The |return s|
|00002d20| 74 61 63 6b 20 69 73 20 | 74 68 65 20 70 6c 61 63 |tack is |the plac|
|00002d30| 65 20 77 68 65 72 65 20 | 46 6f 72 74 68 20 70 6c |e where |Forth pl|
|00002d40| 61 63 65 73 20 61 64 64 | 72 65 73 73 65 73 20 74 |aces add|resses t|
|00002d50| 6f 20 72 65 74 75 72 6e | 20 74 6f 20 77 68 65 6e |o return| to when|
|00002d60| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 77 6f 72 | the cur|rent wor|
|00002d70| 64 20 69 73 20 64 6f 6e | 65 20 65 78 65 63 75 74 |d is don|e execut|
|00002d80| 69 6e 67 2e 20 20 57 68 | 69 6c 65 20 61 20 77 6f |ing. Wh|ile a wo|
|00002d90| 72 64 20 69 73 20 65 78 | 65 63 75 74 69 6e 67 20 |rd is ex|ecuting |
|00002da0| 69 74 20 69 73 20 70 6f | 73 73 69 62 6c 65 20 74 |it is po|ssible t|
|00002db0| 6f 20 75 73 65 20 74 68 | 65 20 72 65 74 75 72 6e |o use th|e return|
|00002dc0| 20 73 74 61 63 6b 20 66 | 6f 72 20 74 65 6d 70 6f | stack f|or tempo|
|00002dd0| 72 61 72 79 20 73 74 6f | 72 61 67 65 2c 20 62 75 |rary sto|rage, bu|
|00002de0| 74 20 6f 6e 65 20 6d 75 | 73 74 20 62 65 20 63 61 |t one mu|st be ca|
|00002df0| 72 65 66 75 6c 20 74 6f | 20 6d 61 6b 65 20 73 75 |reful to| make su|
|00002e00| 72 65 20 74 68 61 74 20 | 61 6c 6c 20 76 61 6c 75 |re that |all valu|
|00002e10| 65 73 20 70 6c 61 63 65 | 64 20 6f 6e 20 74 68 65 |es place|d on the|
|00002e20| 20 73 74 61 63 6b 20 62 | 79 20 3e 72 20 61 72 65 | stack b|y >r are|
|00002e30| 20 72 65 6d 6f 76 65 64 | 20 75 73 69 6e 67 20 72 | removed| using r|
|00002e40| 3e 20 62 65 66 6f 72 65 | 20 74 68 65 20 77 6f 72 |> before| the wor|
|00002e50| 64 20 69 73 20 64 6f 6e | 65 2c 20 6f 74 68 65 72 |d is don|e, other|
|00002e60| 77 69 73 65 20 46 6f 72 | 74 68 20 77 69 6c 6c 20 |wise For|th will |
|00002e70| 61 74 74 65 6d 70 74 20 | 74 6f 20 72 65 74 75 72 |attempt |to retur|
|00002e80| 6e 20 74 6f 20 77 68 6f | 20 6b 6e 6f 77 73 20 77 |n to who| knows w|
|00002e90| 68 65 72 65 20 61 6e 64 | 20 77 69 6c 6c 20 76 65 |here and| will ve|
|00002ea0| 72 79 20 0d 6c 69 6b 65 | 6c 79 20 63 72 61 73 68 |ry .like|ly crash|
|00002eb0| 2e 20 20 49 6e 74 65 67 | 65 72 73 20 61 72 65 20 |. Integ|ers are |
|00002ec0| 74 72 61 6e 73 66 6f 72 | 6d 65 64 20 69 6e 74 6f |transfor|med into|
|00002ed0| 20 72 65 61 6c 20 6e 75 | 6d 62 65 72 73 20 62 79 | real nu|mbers by|
|00002ee0| 20 74 68 65 20 74 77 6f | 20 77 6f 72 64 20 73 65 | the two| word se|
|00002ef0| 71 75 65 6e 63 65 20 30 | 20 64 3e 66 2e 20 54 68 |quence 0| d>f. Th|
|00002f00| 69 73 20 74 72 61 6e 73 | 66 6f 72 6d 73 20 74 68 |is trans|forms th|
|00002f10| 65 20 69 6e 74 65 67 65 | 72 20 69 6e 74 6f 20 61 |e intege|r into a|
|00002f20| 20 64 6f 75 62 6c 65 20 | 6c 65 6e 67 74 68 20 69 | double |length i|
|00002f30| 6e 74 65 67 65 72 20 61 | 6e 64 20 74 68 65 6e 20 |nteger a|nd then |
|00002f40| 69 6e 74 6f 20 61 20 72 | 65 61 6c 20 6e 75 6d 62 |into a r|eal numb|
|00002f50| 65 72 2e 0d 0d 33 2e 20 | 20 45 76 61 6c 75 61 74 |er...3. | Evaluat|
|00002f60| 69 6e 67 20 61 20 66 75 | 6e 63 74 69 6f 6e 3a 20 |ing a fu|nction: |
|00002f70| 20 79 20 3d 20 33 2e 34 | 65 5e 78 3a 0d 0d 09 20 | y = 3.4|e^x:... |
|00002f80| 20 20 20 20 20 20 66 76 | 61 72 69 61 62 6c 65 20 | fv|ariable |
|00002f90| 78 0d 09 20 20 20 20 20 | 20 20 3a 20 73 71 72 20 |x.. | : sqr |
|00002fa0| 20 28 20 78 2e 20 2d 2d | 20 78 2e 2a 78 2e 20 29 | ( x. --| x.*x. )|
|00002fb0| 20 20 66 64 75 70 20 66 | 2a 20 3b 0d 09 20 20 20 | fdup f|* ;.. |
|00002fc0| 20 20 20 20 3a 20 63 75 | 62 65 20 20 28 20 78 2e | : cu|be ( x.|
|00002fd0| 20 2d 2d 20 78 2e 5e 33 | 20 20 29 20 20 66 64 75 | -- x.^3| ) fdu|
|00002fe0| 70 20 66 64 75 70 20 66 | 2a 20 66 2a 20 3b 0d 09 |p fdup f|* f* ;..|
|00002ff0| 20 20 20 20 20 20 20 3a | 20 65 78 70 66 20 20 28 | :| expf (|
|00003000| 20 78 2e 20 2d 2d 20 65 | 78 70 5b 78 2e 5d 20 29 | x. -- e|xp[x.] )|
|00003010| 20 20 28 20 75 73 65 20 | 54 61 79 6c 6f 72 20 73 | ( use |Taylor s|
|00003020| 65 72 69 65 73 20 61 70 | 70 72 6f 78 2e 20 29 0d |eries ap|prox. ).|
|00003030| 09 20 20 20 20 20 20 20 | 20 20 20 20 20 20 66 64 |. | fd|
|00003040| 75 70 20 78 20 66 21 20 | 31 2e 30 20 66 2b 20 78 |up x f! |1.0 f+ x|
|00003050| 20 66 40 20 73 71 72 20 | 32 2e 30 20 66 2f 20 66 | f@ sqr |2.0 f/ f|
|00003060| 2b 20 78 20 66 40 20 63 | 75 62 65 20 36 2e 30 20 |+ x f@ c|ube 6.0 |
|00003070| 66 2f 20 66 2b 20 3b 0d | 09 20 20 20 20 20 20 20 |f/ f+ ;.|. |
|00003080| 3a 20 59 20 20 28 20 78 | 2e 20 2d 2d 20 20 59 5b |: Y ( x|. -- Y[|
|00003090| 78 2e 5d 20 29 20 20 65 | 78 70 66 20 33 2e 34 20 |x.] ) e|xpf 3.4 |
|000030a0| 66 2a 20 3b 20 28 20 6b | 65 65 70 20 78 20 3c 20 |f* ; ( k|eep x < |
|000030b0| 31 20 66 6f 72 20 61 63 | 63 75 72 61 63 79 20 29 |1 for ac|curacy )|
|000030c0| 0d 0d 54 68 69 73 20 69 | 73 20 61 6e 20 65 78 61 |..This i|s an exa|
|000030d0| 6d 70 6c 65 20 6f 66 20 | 66 61 63 74 6f 72 69 6e |mple of |factorin|
|000030e0| 67 2e 20 54 68 65 20 63 | 6f 64 65 20 66 6f 72 20 |g. The c|ode for |
|000030f0| 74 68 65 20 73 71 75 61 | 72 65 20 61 6e 64 20 63 |the squa|re and c|
|00003100| 75 62 65 20 63 6f 75 6c | 64 20 65 61 73 69 6c 79 |ube coul|d easily|
|00003110| 20 68 61 76 65 20 62 65 | 65 6e 20 6c 65 66 74 20 | have be|en left |
|00003120| 69 6e 20 74 68 65 20 64 | 65 66 69 6e 69 74 69 6f |in the d|efinitio|
|00003130| 6e 20 6f 66 20 65 78 70 | 66 20 62 75 74 20 66 61 |n of exp|f but fa|
|00003140| 63 74 6f 72 69 6e 67 20 | 74 68 65 6d 20 6f 75 74 |ctoring |them out|
|00003150| 20 6d 61 64 65 20 74 68 | 65 20 64 65 66 69 6e 69 | made th|e defini|
|00003160| 74 69 6f 6e 20 73 68 6f | 72 74 65 72 20 61 6e 64 |tion sho|rter and|
|00003170| 20 65 61 73 69 65 72 20 | 74 6f 20 72 65 61 64 2e | easier |to read.|
|00003180| 20 20 49 6e 20 74 68 65 | 6f 72 79 2c 20 61 63 63 | In the|ory, acc|
|00003190| 6f 72 64 69 6e 67 20 74 | 6f 20 73 6f 6d 65 2c 20 |ording t|o some, |
|000031a0| 61 20 70 72 6f 70 65 72 | 6c 79 20 66 61 63 74 6f |a proper|ly facto|
|000031b0| 72 65 64 20 46 6f 72 74 | 68 20 70 72 6f 67 72 61 |red Fort|h progra|
|000031c0| 6d 20 63 6f 6d 62 69 6e | 65 64 20 77 69 74 68 20 |m combin|ed with |
|000031d0| 77 65 6c 6c 20 63 68 6f | 73 65 6e 20 77 6f 72 64 |well cho|sen word|
|000031e0| 20 6e 61 6d 65 73 20 61 | 6e 64 20 73 74 61 63 6b | names a|nd stack|
|000031f0| 20 65 66 66 65 63 74 20 | 63 6f 6d 6d 65 6e 74 73 | effect |comments|
|00003200| 20 73 68 6f 75 6c 64 20 | 62 65 20 6e 65 61 72 6c | should |be nearl|
|00003210| 79 20 73 65 6c 66 2d 64 | 6f 63 75 6d 65 6e 74 69 |y self-d|ocumenti|
|00003220| 6e 67 2e 20 42 79 20 74 | 68 65 20 77 61 79 2c 20 |ng. By t|he way, |
|00003230| 50 6f 63 6b 65 74 20 46 | 6f 72 74 68 20 61 6c 72 |Pocket F|orth alr|
|00003240| 65 61 64 79 20 68 61 73 | 20 61 20 77 6f 72 64 20 |eady has| a word |
|00003250| 66 6f 72 20 63 61 6c 63 | 75 6c 61 74 69 6e 67 20 |for calc|ulating |
|00003260| 74 68 65 20 65 78 70 6f | 6e 65 6e 74 69 61 6c 2c |the expo|nential,|
|00003270| 20 65 78 70 74 2e 20 20 | 43 6f 6d 70 61 72 65 20 | expt. |Compare |
|00003280| 65 78 70 66 20 77 69 74 | 68 20 65 78 70 74 20 74 |expf wit|h expt t|
|00003290| 6f 20 73 65 65 20 68 6f | 77 20 6c 61 72 67 65 20 |o see ho|w large |
|000032a0| 78 20 63 61 6e 20 62 65 | 20 62 65 66 6f 72 65 20 |x can be| before |
|000032b0| 74 68 65 20 65 72 72 6f | 72 20 69 6e 74 72 6f 64 |the erro|r introd|
|000032c0| 75 63 65 64 20 62 79 20 | 74 72 75 6e 63 61 74 69 |uced by |truncati|
|000032d0| 6e 67 20 74 68 65 20 54 | 61 79 6c 6f 72 20 73 65 |ng the T|aylor se|
|000032e0| 72 69 65 73 20 61 74 20 | 78 5e 7b 33 7d 20 62 65 |ries at |x^{3} be|
|000032f0| 63 6f 6d 65 73 20 74 6f | 6f 20 67 72 65 61 74 2e |comes to|o great.|
|00003300| 0d 0d 54 68 65 73 65 20 | 65 78 61 6d 70 6c 65 73 |..These |examples|
|00003310| 20 61 72 65 20 62 72 69 | 65 66 2c 20 62 75 74 20 | are bri|ef, but |
|00003320| 68 6f 70 65 66 75 6c 6c | 79 20 73 68 6f 75 6c 64 |hopefull|y should|
|00003330| 20 62 65 20 73 75 66 66 | 69 63 69 65 6e 74 2c 20 | be suff|icient, |
|00003340| 65 73 70 65 63 69 61 6c | 6c 79 20 77 68 65 6e 20 |especial|ly when |
|00003350| 63 6f 6d 62 69 6e 65 64 | 20 77 69 74 68 20 61 20 |combined| with a |
|00003360| 6c 69 73 74 20 6f 66 20 | 46 6f 72 74 68 20 77 6f |list of |Forth wo|
|00003370| 72 64 73 2c 20 74 6f 20 | 61 6c 6c 6f 77 20 79 6f |rds, to |allow yo|
|00003380| 75 20 74 6f 20 77 72 69 | 74 65 20 73 69 6d 70 6c |u to wri|te simpl|
|00003390| 65 20 77 6f 72 64 73 20 | 74 6f 20 65 78 74 65 6e |e words |to exten|
|000033a0| 64 20 74 68 65 20 70 6f | 77 65 72 20 6f 66 20 74 |d the po|wer of t|
|000033b0| 68 65 20 70 72 6f 67 72 | 61 6d 2e 0d 0d 0d a5 a5 |he progr|am......|
|000033c0| 54 68 65 20 53 69 65 72 | 70 69 6e 73 6b 69 20 74 |The Sier|pinski t|
|000033d0| 72 69 61 6e 67 6c 65 2c | 20 61 6e 20 65 78 61 6d |riangle,| an exam|
|000033e0| 70 6c 65 0d 0d 0d 54 68 | 65 20 53 69 65 72 70 69 |ple...Th|e Sierpi|
|000033f0| 6e 73 6b 69 20 54 72 69 | 61 6e 67 6c 65 20 69 73 |nski Tri|angle is|
|00003400| 20 61 20 63 6f 6d 6d 6f | 6e 6c 79 20 73 65 65 6e | a commo|nly seen|
|00003410| 20 66 72 61 63 74 61 6c | 20 63 6f 6e 73 69 73 74 | fractal| consist|
|00003420| 69 6e 67 20 6f 66 20 61 | 20 74 72 69 61 6e 67 6c |ing of a| triangl|
|00003430| 65 20 6d 61 64 65 20 6f | 66 20 74 72 69 61 6e 67 |e made o|f triang|
|00003440| 6c 65 73 2e 20 20 54 68 | 69 73 20 77 69 6c 6c 20 |les. Th|is will |
|00003450| 73 65 72 76 65 20 61 73 | 20 61 6e 20 65 78 61 6d |serve as| an exam|
|00003460| 70 6c 65 20 6f 66 20 68 | 6f 77 20 74 68 65 20 70 |ple of h|ow the p|
|00003470| 72 6f 67 72 61 6d 20 63 | 61 6e 20 62 65 20 65 78 |rogram c|an be ex|
|00003480| 74 65 6e 64 65 64 20 62 | 79 20 61 64 64 69 6e 67 |tended b|y adding|
|00003490| 20 77 6f 72 64 73 20 74 | 6f 20 74 68 65 20 46 6f | words t|o the Fo|
|000034a0| 72 74 68 20 64 69 63 74 | 69 6f 6e 61 72 79 2e 20 |rth dict|ionary. |
|000034b0| 54 68 65 20 74 72 69 61 | 6e 67 6c 65 20 69 73 20 |The tria|ngle is |
|000034c0| 6d 61 64 65 20 75 70 20 | 6f 66 20 74 68 72 65 65 |made up |of three|
|000034d0| 20 6d 61 70 73 20 74 68 | 61 74 20 64 69 76 69 64 | maps th|at divid|
|000034e0| 65 20 74 68 65 20 72 65 | 67 69 6f 6e 20 30 2e 2e |e the re|gion 0..|
|000034f0| 31 20 69 6e 20 78 20 61 | 6e 64 20 30 2e 2e 31 20 |1 in x a|nd 0..1 |
|00003500| 69 6e 20 79 20 69 6e 74 | 6f 20 74 68 72 65 65 20 |in y int|o three |
|00003510| 65 71 75 61 6c 20 73 71 | 75 61 72 65 73 2e 20 20 |equal sq|uares. |
|00003520| 57 65 20 77 69 6c 6c 20 | 64 65 76 65 6c 6f 70 20 |We will |develop |
|00003530| 61 20 46 6f 72 74 68 20 | 77 6f 72 64 20 74 68 61 |a Forth |word tha|
|00003540| 74 20 77 69 6c 6c 20 66 | 69 6e 64 20 74 68 65 20 |t will f|ind the |
|00003550| 6d 61 70 73 20 66 6f 72 | 20 74 68 65 20 74 72 69 |maps for| the tri|
|00003560| 61 6e 67 6c 65 20 61 6e | 64 20 74 68 65 6e 20 67 |angle an|d then g|
|00003570| 65 6e 65 72 61 74 65 20 | 74 68 65 20 66 72 61 63 |enerate |the frac|
|00003580| 74 61 6c 2e 20 0d 0d 46 | 69 72 73 74 2c 20 77 65 |tal. ..F|irst, we|
|00003590| 20 6d 75 73 74 20 64 65 | 74 65 72 6d 69 6e 65 20 | must de|termine |
|000035a0| 74 68 65 20 6d 61 70 73 | 2e 20 20 54 68 65 20 66 |the maps|. The f|
|000035b0| 69 6e 64 6d 61 70 20 63 | 6f 6d 6d 61 6e 64 27 73 |indmap c|ommand's|
|000035c0| 20 69 6e 74 65 72 61 63 | 74 69 76 65 20 6e 61 74 | interac|tive nat|
|000035d0| 75 72 65 20 69 73 20 75 | 6e 73 75 69 74 65 64 20 |ure is u|nsuited |
|000035e0| 74 6f 20 6f 75 72 20 74 | 61 73 6b 2c 20 66 6f 72 |to our t|ask, for|
|000035f0| 74 75 6e 61 74 65 6c 79 | 2c 20 74 68 65 72 65 20 |tunately|, there |
|00003600| 61 72 65 20 74 68 72 65 | 65 20 60 70 72 69 6d 69 |are thre|e `primi|
|00003610| 74 69 76 65 27 20 28 69 | 2e 65 2e 20 6e 6f 6e 2d |tive' (i|.e. non-|
|00003620| 69 6e 74 65 72 61 63 74 | 69 76 65 29 20 77 6f 72 |interact|ive) wor|
|00003630| 64 73 20 74 68 61 74 20 | 77 69 6c 6c 20 70 65 72 |ds that |will per|
|00003640| 66 6f 72 6d 20 74 68 65 | 20 73 61 6d 65 20 74 61 |form the| same ta|
|00003650| 73 6b 3a 20 69 6e 69 74 | 69 61 6c 2c 20 69 6d 61 |sk: init|ial, ima|
|00003660| 67 65 2c 20 61 6e 64 20 | 73 6f 6c 76 65 2e 20 20 |ge, and |solve. |
|00003670| 54 68 65 73 65 20 77 6f | 72 64 73 20 6f 70 65 72 |These wo|rds oper|
|00003680| 61 74 65 20 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 0d |ate as f|ollows:.|
|00003690| 0d 78 31 20 79 31 20 20 | 78 32 20 79 32 20 20 78 |.x1 y1 |x2 y2 x|
|000036a0| 33 20 79 33 20 20 69 6e | 69 74 69 61 6c 20 20 20 |3 y3 in|itial |
|000036b0| 0d c7 53 65 74 73 20 74 | 68 65 20 69 6e 69 74 69 |..Sets t|he initi|
|000036c0| 61 6c 20 70 6f 69 6e 74 | 73 20 66 6f 72 20 66 69 |al point|s for fi|
|000036d0| 6e 64 69 6e 67 20 61 20 | 6d 61 70 2c 20 28 78 31 |nding a |map, (x1|
|000036e0| 2c 79 31 29 2c 28 78 32 | 2c 79 32 29 2c 28 78 33 |,y1),(x2|,y2),(x3|
|000036f0| 2c 79 33 29 c8 0d 0d 58 | 31 20 59 31 20 20 58 32 |,y3)...X|1 Y1 X2|
|00003700| 20 59 32 20 20 58 33 20 | 59 33 20 20 69 6d 61 67 | Y2 X3 |Y3 imag|
|00003710| 65 0d c7 53 65 74 73 20 | 74 68 65 20 69 6d 61 67 |e..Sets |the imag|
|00003720| 65 20 70 6f 69 6e 74 73 | 20 66 6f 72 20 66 69 6e |e points| for fin|
|00003730| 64 69 6e 67 20 61 20 6d | 61 70 2c 20 28 58 31 2c |ding a m|ap, (X1,|
|00003740| 59 31 29 2c 28 58 32 2c | 59 32 29 2c 28 58 33 2c |Y1),(X2,|Y2),(X3,|
|00003750| 59 33 29 c8 0d 0d 73 6f | 6c 76 65 0d c7 46 69 6e |Y3)...so|lve..Fin|
|00003760| 64 73 20 74 68 65 20 76 | 61 6c 75 65 73 20 74 68 |ds the v|alues th|
|00003770| 61 74 20 77 69 6c 6c 20 | 6d 61 70 20 74 68 65 20 |at will |map the |
|00003780| 69 6e 69 74 69 61 6c 20 | 70 6f 69 6e 74 73 20 74 |initial |points t|
|00003790| 6f 20 74 68 65 20 69 6d | 61 67 65 20 70 6f 69 6e |o the im|age poin|
|000037a0| 74 73 c8 0d 0d 54 68 65 | 73 65 20 77 6f 72 64 73 |ts...The|se words|
|000037b0| 2c 20 77 68 65 6e 20 63 | 6f 6d 62 69 6e 65 64 20 |, when c|ombined |
|000037c0| 77 69 74 68 20 27 6d 61 | 6b 65 27 20 61 6e 64 20 |with 'ma|ke' and |
|000037d0| 27 73 65 74 27 2c 20 77 | 69 6c 6c 20 61 6c 6c 6f |'set', w|ill allo|
|000037e0| 77 20 75 73 20 74 6f 20 | 63 72 65 61 74 65 20 61 |w us to |create a|
|000037f0| 20 73 69 6e 67 6c 65 20 | 46 6f 72 74 68 20 77 6f | single |Forth wo|
|00003800| 72 64 20 74 6f 20 66 69 | 6e 64 20 61 6c 6c 20 74 |rd to fi|nd all t|
|00003810| 68 72 65 65 20 6d 61 70 | 73 20 61 74 20 6f 6e 63 |hree map|s at onc|
|00003820| 65 2e 20 20 41 74 20 74 | 68 69 73 20 70 6f 69 6e |e. At t|his poin|
|00003830| 74 2c 20 74 68 65 6e 2c | 20 77 65 20 63 61 6e 20 |t, then,| we can |
|00003840| 77 72 69 74 65 3a 0d 0d | 3a 20 73 69 65 72 70 69 |write:..|: sierpi|
|00003850| 6e 73 6b 69 20 20 28 20 | 67 65 6e 65 72 61 74 65 |nski ( |generate|
|00003860| 73 20 74 68 65 20 53 69 | 65 72 70 69 6e 73 6b 69 |s the Si|erpinski|
|00003870| 20 54 72 69 61 6e 67 6c | 65 29 0d 09 28 20 53 65 | Triangl|e)..( Se|
|00003880| 74 20 75 70 20 69 6e 69 | 74 69 61 6c 20 76 61 6c |t up ini|tial val|
|00003890| 75 65 73 2c 20 66 6f 72 | 20 61 6c 6c 20 6d 61 70 |ues, for| all map|
|000038a0| 73 20 29 0d 09 30 2e 30 | 20 30 2e 30 20 31 2e 30 |s )..0.0| 0.0 1.0|
|000038b0| 20 30 2e 30 20 30 2e 30 | 20 31 2e 30 20 69 6e 69 | 0.0 0.0| 1.0 ini|
|000038c0| 74 69 61 6c 0d 09 28 20 | 46 69 72 73 74 20 6d 61 |tial..( |First ma|
|000038d0| 70 20 29 0d 09 30 2e 30 | 20 30 2e 30 20 30 2e 35 |p )..0.0| 0.0 0.5|
|000038e0| 20 30 2e 30 20 30 2e 30 | 20 30 2e 35 20 69 6d 61 | 0.0 0.0| 0.5 ima|
|000038f0| 67 65 20 20 73 6f 6c 76 | 65 0d 09 6d 61 6b 65 20 |ge solv|e..make |
|00003900| 30 2e 33 33 33 20 31 20 | 73 65 74 0d 09 28 20 53 |0.333 1 |set..( S|
|00003910| 65 63 6f 6e 64 20 6d 61 | 70 20 29 0d 09 30 2e 35 |econd ma|p )..0.5|
|00003920| 20 30 2e 30 20 31 2e 30 | 20 30 2e 30 20 30 2e 35 | 0.0 1.0| 0.0 0.5|
|00003930| 20 30 2e 35 20 69 6d 61 | 67 65 20 20 73 6f 6c 76 | 0.5 ima|ge solv|
|00003940| 65 0d 09 6d 61 6b 65 20 | 30 2e 33 33 33 20 32 20 |e..make |0.333 2 |
|00003950| 73 65 74 0d 09 28 20 54 | 68 69 72 64 20 6d 61 70 |set..( T|hird map|
|00003960| 20 29 0d 09 30 2e 32 35 | 20 30 2e 35 20 30 2e 37 | )..0.25| 0.5 0.7|
|00003970| 35 20 30 2e 35 20 30 2e | 32 35 20 31 2e 30 20 69 |5 0.5 0.|25 1.0 i|
|00003980| 6d 61 67 65 20 20 73 6f | 6c 76 65 0d 09 6d 61 6b |mage so|lve..mak|
|00003990| 65 20 30 2e 33 33 33 20 | 33 20 73 65 74 0d 0d 4e |e 0.333 |3 set..N|
|000039a0| 6f 77 20 62 65 66 6f 72 | 65 20 76 69 65 77 69 6e |ow befor|e viewin|
|000039b0| 67 20 74 68 65 20 66 72 | 61 63 74 61 6c 20 73 68 |g the fr|actal sh|
|000039c0| 6f 77 20 74 68 65 20 6d | 61 70 73 2c 20 72 65 73 |ow the m|aps, res|
|000039d0| 65 74 20 74 68 65 20 70 | 72 6f 67 72 61 6d 2c 20 |et the p|rogram, |
|000039e0| 73 68 6f 77 20 74 68 65 | 20 73 65 74 74 69 6e 67 |show the| setting|
|000039f0| 73 2c 20 61 6e 64 20 64 | 72 61 77 20 74 68 65 20 |s, and d|raw the |
|00003a00| 6f 75 74 6c 69 6e 65 73 | 3a 0d 0d 09 28 20 53 68 |outlines|:...( Sh|
|00003a10| 6f 77 20 74 68 65 20 6d | 61 70 73 20 29 0d 09 70 |ow the m|aps )..p|
|00003a20| 61 67 65 20 2e 22 20 54 | 68 65 20 53 69 65 72 70 |age ." T|he Sierp|
|00003a30| 69 6e 73 6b 69 20 6d 61 | 70 73 3a 20 22 20 63 72 |inski ma|ps: " cr|
|00003a40| 20 73 68 6f 77 6d 61 70 | 73 0d 09 72 65 73 65 74 | showmap|s..reset|
|00003a50| 20 20 73 65 74 74 69 6e | 67 73 0d 09 6b 65 79 20 | settin|gs..key |
|00003a60| 64 72 6f 70 20 20 28 20 | 77 61 69 74 20 66 6f 72 |drop ( |wait for|
|00003a70| 20 61 20 6b 65 79 20 70 | 72 65 73 73 20 29 0d 09 | a key p|ress )..|
|00003a80| 28 20 53 68 6f 77 20 6f | 75 74 6c 69 6e 65 73 20 |( Show o|utlines |
|00003a90| 77 68 65 6e 20 64 72 61 | 77 69 6e 67 20 29 0d 09 |when dra|wing )..|
|00003aa0| 6f 6e 20 6f 75 74 6c 69 | 6e 65 73 0d 09 28 20 52 |on outli|nes..( R|
|00003ab0| 65 73 65 74 20 74 68 65 | 20 70 72 6f 67 72 61 6d |eset the| program|
|00003ac0| 20 61 6e 64 20 64 72 61 | 77 20 74 68 65 20 66 72 | and dra|w the fr|
|00003ad0| 61 63 74 61 6c 20 29 0d | 09 63 64 72 61 77 20 20 |actal ).|.cdraw |
|00003ae0| 3b 0d 0d 54 72 79 20 74 | 68 69 73 20 77 6f 72 64 |;..Try t|his word|
|00003af0| 20 61 6e 64 20 73 65 65 | 20 77 68 61 74 20 68 61 | and see| what ha|
|00003b00| 70 70 65 6e 73 2e 0d 0d | a5 a5 42 61 73 69 63 20 |ppens...|..Basic |
|00003b10| 46 6f 72 74 68 20 77 6f | 72 64 73 0d 0d 54 68 65 |Forth wo|rds..The|
|00003b20| 20 74 61 62 6c 65 20 6c | 69 73 74 73 20 73 6f 6d | table l|ists som|
|00003b30| 65 20 62 61 73 69 63 20 | 46 6f 72 74 68 20 77 6f |e basic |Forth wo|
|00003b40| 72 64 73 20 61 6e 64 20 | 74 68 65 69 72 20 75 73 |rds and |their us|
|00003b50| 65 2e 20 20 57 69 74 68 | 20 74 68 65 73 65 20 69 |e. With| these i|
|00003b60| 74 20 73 68 6f 75 6c 64 | 20 62 65 20 70 6f 73 73 |t should| be poss|
|00003b70| 69 62 6c 65 20 74 6f 20 | 64 65 66 69 6e 65 20 79 |ible to |define y|
|00003b80| 6f 75 72 20 6f 77 6e 20 | 77 6f 72 64 73 20 66 6f |our own |words fo|
|00003b90| 72 20 75 73 65 20 77 69 | 74 68 20 74 68 65 20 70 |r use wi|th the p|
|00003ba0| 72 6f 67 72 61 6d 2e 0d | 0d 57 6f 72 64 20 20 20 |rogram..|.Word |
|00003bb0| 20 20 20 20 20 20 20 20 | 20 20 53 74 61 63 6b 20 | | Stack |
|00003bc0| 65 66 66 65 63 74 20 20 | 20 20 20 20 20 20 20 20 |effect | |
|00003bd0| 20 20 20 20 55 73 65 0d | 2d 2d 2d 2d 2d 2d 2d 2d | Use.|--------|
|00003be0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c10| 0d 73 77 61 70 20 20 20 | 20 20 20 20 20 20 20 20 |.swap | |
|00003c20| 20 20 28 20 61 20 62 20 | 2d 2d 20 62 20 61 20 29 | ( a b |-- b a )|
|00003c30| 20 20 20 20 20 20 20 20 | 20 20 20 53 77 69 74 63 | | Switc|
|00003c40| 68 20 74 6f 70 20 74 77 | 6f 20 73 74 61 63 6b 20 |h top tw|o stack |
|00003c50| 69 74 65 6d 73 20 0d 64 | 75 70 09 20 20 20 20 20 |items .d|up. |
|00003c60| 20 20 20 20 20 20 20 20 | 20 28 20 61 20 2d 2d 20 | | ( a -- |
|00003c70| 61 20 61 20 29 09 20 20 | 20 20 20 20 20 20 20 20 |a a ). | |
|00003c80| 20 20 44 75 70 6c 69 63 | 61 74 65 20 74 6f 70 20 | Duplic|ate top |
|00003c90| 6f 66 20 73 74 61 63 6b | 0d 6f 76 65 72 20 20 20 |of stack|.over |
|00003ca0| 20 20 20 20 20 20 20 20 | 20 20 20 28 20 61 20 62 | | ( a b|
|00003cb0| 20 2d 2d 20 61 20 62 20 | 61 20 29 20 20 09 20 20 | -- a b |a ) . |
|00003cc0| 20 20 20 42 72 69 6e 67 | 20 32 6e 64 20 74 6f 20 | Bring| 2nd to |
|00003cd0| 74 6f 70 0d 72 6f 74 20 | 20 20 20 20 20 20 20 20 |top.rot | |
|00003ce0| 20 20 20 20 20 20 20 28 | 20 61 20 62 20 63 20 2d | (| a b c -|
|00003cf0| 2d 20 62 20 63 20 61 20 | 29 20 20 20 20 20 20 52 |- b c a |) R|
|00003d00| 6f 74 61 74 65 20 73 74 | 61 63 6b 20 69 74 65 6d |otate st|ack item|
|00003d10| 73 0d 76 61 72 69 61 62 | 6c 65 20 20 20 20 20 20 |s.variab|le |
|00003d20| 20 20 28 20 2d 2d 20 29 | 09 20 20 20 20 20 20 20 | ( -- )|. |
|00003d30| 20 20 20 20 20 20 20 20 | 20 20 20 09 4d 61 6b 65 | | .Make|
|00003d40| 20 61 20 76 61 72 69 61 | 62 6c 65 20 6f 66 20 6e | a varia|ble of n|
|00003d50| 65 78 74 20 74 6f 6b 65 | 6e 0d 63 6f 6e 73 74 61 |ext toke|n.consta|
|00003d60| 6e 74 20 20 20 20 20 20 | 20 28 20 61 20 2d 2d 20 |nt | ( a -- |
|00003d70| 29 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |). | |
|00003d80| 20 09 20 4d 61 6b 65 20 | 61 20 63 6f 6e 73 74 61 | . Make |a consta|
|00003d90| 6e 74 20 6f 66 20 6e 65 | 78 74 20 74 6f 6b 65 6e |nt of ne|xt token|
|00003da0| 20 0d 2b 2c 20 2d 2c 20 | 2a 2c 20 2f 20 20 20 20 | .+, -, |*, / |
|00003db0| 20 09 28 20 61 20 62 20 | 2d 2d 20 61 24 62 20 29 | .( a b |-- a$b )|
|00003dc0| 09 20 20 20 20 20 20 20 | 20 20 4d 61 74 68 2c 20 |. | Math, |
|00003dd0| 77 68 65 72 65 20 24 20 | 69 73 20 61 6e 20 6f 70 |where $ |is an op|
|00003de0| 65 72 61 74 69 6f 6e 0d | 6d 6f 64 09 20 20 20 20 |eration.|mod. |
|00003df0| 20 20 20 20 20 20 20 20 | 28 20 61 20 62 20 2d 2d | |( a b --|
|00003e00| 20 61 20 6d 6f 64 20 62 | 20 29 20 20 20 20 52 65 | a mod b| ) Re|
|00003e10| 6d 61 69 6e 64 65 72 20 | 61 66 74 65 72 20 64 69 |mainder |after di|
|00003e20| 76 69 64 69 6e 67 0d 64 | 72 6f 70 09 20 20 20 20 |viding.d|rop. |
|00003e30| 20 20 20 20 20 20 20 28 | 20 61 20 2d 2d 20 29 09 | (| a -- ).|
|00003e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e50| 20 20 44 72 6f 70 20 74 | 68 65 20 74 6f 70 20 73 | Drop t|he top s|
|00003e60| 74 61 63 6b 20 69 74 65 | 6d 0d 63 72 09 20 20 20 |tack ite|m.cr. |
|00003e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 20 2d 2d | | ( --|
|00003e80| 20 29 09 09 20 20 20 20 | 20 20 20 20 20 20 20 20 | ).. | |
|00003e90| 20 20 20 20 20 20 50 72 | 69 6e 74 20 61 20 72 65 | Pr|int a re|
|00003ea0| 74 75 72 6e 20 63 68 61 | 72 61 63 74 65 72 20 0d |turn cha|racter .|
|00003eb0| 73 70 61 63 65 20 20 20 | 20 20 20 20 20 20 20 20 |space | |
|00003ec0| 20 28 20 2d 2d 20 29 09 | 20 20 20 20 20 20 20 20 | ( -- ).| |
|00003ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 50 72 69 6e | | Prin|
|00003ee0| 74 20 61 20 73 70 61 63 | 65 20 28 41 53 43 49 49 |t a spac|e (ASCII|
|00003ef0| 20 33 32 29 20 0d 65 6d | 69 74 20 20 20 20 20 20 | 32) .em|it |
|00003f00| 20 20 20 20 20 20 20 28 | 20 61 20 2d 2d 20 29 09 | (| a -- ).|
|00003f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 09 50 | | .P|
|00003f20| 72 69 6e 74 20 74 68 65 | 20 63 68 61 72 61 63 74 |rint the| charact|
|00003f30| 65 72 20 77 68 6f 73 65 | 20 63 6f 64 65 20 69 73 |er whose| code is|
|00003f40| 20 6f 6e 20 74 68 65 20 | 73 74 61 63 6b 0d 2e 22 | on the |stack.."|
|00003f50| 09 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003f60| 20 28 20 2d 2d 20 29 09 | 09 20 20 20 20 20 20 20 | ( -- ).|. |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 50 72 69 6e 74 | | Print|
|00003f80| 20 74 65 78 74 20 75 6e | 74 69 6c 20 61 20 22 20 | text un|til a " |
|00003f90| 66 6f 75 6e 64 20 28 64 | 65 66 69 6e 69 74 69 6f |found (d|efinitio|
|00003fa0| 6e 73 20 6f 6e 6c 79 29 | 0d 2e 09 20 20 20 20 20 |ns only)|... |
|00003fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 20 61 20 | | ( a |
|00003fc0| 2d 2d 20 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |-- ) | |
|00003fd0| 20 20 20 20 20 20 09 50 | 72 69 6e 74 20 74 68 65 | .P|rint the|
|00003fe0| 20 74 6f 70 20 6f 66 20 | 73 74 61 63 6b 0d 6b 65 | top of |stack.ke|
|00003ff0| 79 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 |y. | (|
|00004000| 20 2d 2d 20 61 20 29 20 | 20 20 20 20 20 20 20 20 | -- a ) | |
|00004010| 20 20 20 20 20 20 20 20 | 09 47 65 74 20 61 20 6b | |.Get a k|
|00004020| 65 79 2c 20 41 53 43 49 | 49 20 63 6f 64 65 20 6f |ey, ASCI|I code o|
|00004030| 6e 20 73 74 61 63 6b 0d | 62 79 65 20 20 20 20 20 |n stack.|bye |
|00004040| 20 20 20 20 20 20 20 20 | 09 28 20 2d 2d 20 29 09 | |.( -- ).|
|00004050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004060| 20 20 09 45 78 69 74 20 | 66 72 6f 6d 20 46 6f 72 | .Exit |from For|
|00004070| 74 68 0d 3f 74 65 72 6d | 69 6e 61 6c 20 20 20 20 |th.?term|inal |
|00004080| 28 20 2d 2d 20 62 20 29 | 09 09 20 20 20 20 20 20 |( -- b )|.. |
|00004090| 20 20 20 20 20 20 20 09 | 48 61 73 20 61 20 6b 65 | .|Has a ke|
|000040a0| 79 20 62 65 65 6e 20 70 | 72 65 73 73 65 64 3f 0d |y been p|ressed?.|
|000040b0| 28 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |(. | |
|000040c0| 09 28 20 2d 2d 20 29 09 | 20 20 09 20 20 20 20 20 |.( -- ).| . |
|000040d0| 20 20 20 20 20 20 20 20 | 20 20 20 53 74 61 72 74 | | Start|
|000040e0| 20 61 20 63 6f 6d 6d 65 | 6e 74 20 28 72 65 6d 65 | a comme|nt (reme|
|000040f0| 6d 62 65 72 20 73 70 61 | 63 65 29 0d 21 70 65 6e |mber spa|ce).!pen|
|00004100| 20 20 20 20 20 20 20 20 | 20 20 20 09 28 20 78 20 | | .( x |
|00004110| 79 20 2d 2d 20 29 20 20 | 20 20 20 20 20 20 20 20 |y -- ) | |
|00004120| 20 20 20 09 09 4d 6f 76 | 65 20 74 68 65 20 70 65 | ..Mov|e the pe|
|00004130| 6e 20 74 6f 20 28 78 2c | 79 29 20 28 70 69 78 65 |n to (x,|y) (pixe|
|00004140| 6c 73 29 0d 2d 74 6f 20 | 20 20 20 20 20 20 20 20 |ls).-to | |
|00004150| 20 20 20 09 28 20 78 20 | 79 20 2d 2d 20 29 09 20 | .( x |y -- ). |
|00004160| 20 20 20 20 20 20 20 20 | 20 20 09 09 4c 69 6e 65 | | ..Line|
|00004170| 20 66 72 6f 6d 20 63 75 | 72 72 65 6e 74 20 74 6f | from cu|rrent to|
|00004180| 20 28 78 2c 79 29 0d 70 | 61 67 65 09 20 20 20 20 | (x,y).p|age. |
|00004190| 20 20 20 20 20 20 28 20 | 2d 2d 20 29 09 09 20 20 | ( |-- ).. |
|000041a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041b0| 43 6c 65 61 72 20 74 68 | 65 20 73 63 72 65 65 6e |Clear th|e screen|
|000041c0| 0d 2d 2d 3e 20 20 20 20 | 20 20 20 20 20 20 20 20 |.--> | |
|000041d0| 09 28 20 2d 2d 20 29 09 | 09 20 20 20 20 20 20 20 |.( -- ).|. |
|000041e0| 20 20 20 20 20 20 20 20 | 20 09 4c 6f 61 64 20 66 | | .Load f|
|000041f0| 69 6c 65 6e 61 6d 65 2c | 20 6e 6f 20 73 70 61 63 |ilename,| no spac|
|00004200| 65 73 21 0d 6f 70 65 6e | 20 20 20 20 20 20 20 20 |es!.open| |
|00004210| 20 20 09 28 20 2d 2d 20 | 29 09 20 20 20 20 20 20 | .( -- |). |
|00004220| 20 20 20 20 20 20 20 20 | 20 20 20 20 09 4c 6f 61 | | .Loa|
|00004230| 64 20 66 69 6c 65 20 63 | 68 6f 73 65 6e 20 69 6e |d file c|hosen in|
|00004240| 20 4d 61 63 20 64 69 61 | 6c 6f 67 0d 3f 62 75 74 | Mac dia|log.?but|
|00004250| 74 6f 6e 20 20 20 20 20 | 09 28 20 2d 2d 20 74 20 |ton |.( -- t |
|00004260| 29 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |). | |
|00004270| 09 09 4d 6f 75 73 65 20 | 62 75 74 74 6f 6e 20 64 |..Mouse |button d|
|00004280| 6f 77 6e 3f 0d 40 6d 6f | 75 73 65 20 20 20 20 20 |own?.@mo|use |
|00004290| 20 20 28 20 2d 2d 20 78 | 20 79 20 29 20 20 20 20 | ( -- x| y ) |
|000042a0| 20 20 20 20 20 20 20 20 | 09 09 50 75 73 68 20 6d | |..Push m|
|000042b0| 6f 75 73 65 20 70 6f 73 | 69 74 69 6f 6e 20 6f 6e |ouse pos|ition on|
|000042c0| 20 73 74 61 63 6b 0d 73 | 61 76 65 20 20 20 20 20 | stack.s|ave |
|000042d0| 20 20 20 20 20 20 20 28 | 20 2d 2d 20 29 20 20 20 | (| -- ) |
|000042e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000042f0| 20 09 53 61 76 65 20 74 | 68 65 20 63 75 72 72 65 | .Save t|he curre|
|00004300| 6e 74 20 64 69 63 74 69 | 6f 6e 61 72 79 0d 0d 53 |nt dicti|onary..S|
|00004310| 65 65 20 74 68 65 20 72 | 65 66 65 72 65 6e 63 65 |ee the r|eference|
|00004320| 20 73 65 63 74 69 6f 6e | 20 66 6f 72 20 6d 6f 72 | section| for mor|
|00004330| 65 20 77 6f 72 64 73 20 | 74 68 61 74 20 61 72 65 |e words |that are|
|00004340| 20 70 72 6f 67 72 61 6d | 20 73 70 65 63 69 66 69 | program| specifi|
|00004350| 63 2e 20 20 54 68 65 20 | 6c 61 73 74 20 65 69 67 |c. The |last eig|
|00004360| 68 74 20 77 6f 72 64 73 | 20 6c 69 73 74 65 64 20 |ht words| listed |
|00004370| 61 72 65 20 73 70 65 63 | 69 61 6c 20 74 6f 20 50 |are spec|ial to P|
|00004380| 6f 63 6b 65 74 20 46 6f | 72 74 68 20 61 6e 64 20 |ocket Fo|rth and |
|00004390| 6d 61 79 20 6e 6f 74 20 | 62 65 20 61 76 61 69 6c |may not |be avail|
|000043a0| 61 62 6c 65 20 6f 6e 20 | 6f 74 68 65 72 20 46 6f |able on |other Fo|
|000043b0| 72 74 68 20 73 79 73 74 | 65 6d 73 2c 20 74 68 6f |rth syst|ems, tho|
|000043c0| 75 67 68 20 74 68 65 72 | 65 20 77 69 6c 6c 20 6c |ugh ther|e will l|
|000043d0| 69 6b 65 6c 79 20 62 65 | 20 73 6f 6d 65 74 68 69 |ikely be| somethi|
|000043e0| 6e 67 20 73 69 6d 69 6c | 61 72 2e 20 20 54 68 6f |ng simil|ar. Tho|
|000043f0| 73 65 20 69 6e 74 65 72 | 65 73 74 65 64 20 69 6e |se inter|ested in|
|00004400| 20 73 65 72 69 6f 75 73 | 6c 79 20 6c 65 61 72 6e | serious|ly learn|
|00004410| 69 6e 67 20 46 6f 72 74 | 68 20 28 73 6f 6d 65 20 |ing Fort|h (some |
|00004420| 73 77 65 61 72 20 74 68 | 61 74 20 69 74 20 69 73 |swear th|at it is|
|00004430| 20 74 68 65 20 62 65 73 | 74 20 63 6f 6d 70 75 74 | the bes|t comput|
|00004440| 65 72 20 6c 61 6e 67 75 | 61 67 65 20 74 68 65 72 |er langu|age ther|
|00004450| 65 20 69 73 29 20 73 68 | 6f 75 6c 64 20 67 65 74 |e is) sh|ould get|
|00004460| 20 61 20 68 6f 6c 64 20 | 6f 66 20 74 68 65 20 62 | a hold |of the b|
|00004470| 6f 6f 6b 20 5f 53 74 61 | 72 74 69 6e 67 20 46 6f |ook _Sta|rting Fo|
|00004480| 72 74 68 5f 20 62 79 20 | 4c 65 6f 20 42 72 6f 64 |rth_ by |Leo Brod|
|00004490| 69 65 20 28 32 6e 64 20 | 65 64 2e 20 31 39 38 37 |ie (2nd |ed. 1987|
|000044a0| 29 2c 20 69 74 20 69 73 | 20 61 6e 20 65 78 63 65 |), it is| an exce|
|000044b0| 6c 6c 65 6e 74 20 61 6e | 64 20 65 6e 74 65 72 74 |llent an|d entert|
|000044c0| 61 69 6e 69 6e 67 20 69 | 6e 74 72 6f 64 75 63 74 |aining i|ntroduct|
|000044d0| 69 6f 6e 2e 0d 0d a5 55 | 73 69 6e 67 20 74 68 65 |ion....U|sing the|
|000044e0| 20 53 68 65 6c 6c 0d 0d | 46 72 61 63 74 61 6c 20 | Shell..|Fractal |
|000044f0| 4c 61 62 20 4b 69 74 20 | 63 6f 6e 74 61 69 6e 73 |Lab Kit |contains|
|00004500| 20 61 20 6d 6f 75 73 65 | 20 64 72 69 76 65 6e 20 | a mouse| driven |
|00004510| 73 68 65 6c 6c 2e 20 20 | 54 68 65 20 73 68 65 6c |shell. |The shel|
|00004520| 6c 20 69 73 20 61 20 73 | 69 6e 67 6c 65 20 46 6f |l is a s|ingle Fo|
|00004530| 72 74 68 20 0d 77 6f 72 | 64 20 28 6e 61 6d 65 64 |rth .wor|d (named|
|00004540| 20 73 68 65 6c 6c 29 20 | 74 68 61 74 20 61 6c 6c | shell) |that all|
|00004550| 6f 77 73 20 79 6f 75 20 | 74 6f 20 75 73 65 20 74 |ows you |to use t|
|00004560| 68 65 20 6d 6f 75 73 65 | 20 74 6f 20 73 65 74 20 |he mouse| to set |
|00004570| 6d 61 6e 79 20 6f 66 20 | 74 68 65 20 70 61 72 61 |many of |the para|
|00004580| 6d 65 74 65 72 73 20 75 | 73 65 64 20 69 6e 20 67 |meters u|sed in g|
|00004590| 65 6e 65 72 61 74 69 6e | 67 20 66 72 61 63 74 61 |eneratin|g fracta|
|000045a0| 6c 73 2e 20 20 54 68 65 | 20 73 68 65 6c 6c 20 6d |ls. The| shell m|
|000045b0| 61 6b 65 73 20 69 74 20 | 65 61 73 79 20 74 6f 20 |akes it |easy to |
|000045c0| 63 68 61 6e 67 65 20 73 | 65 74 74 69 6e 67 73 2c |change s|ettings,|
|000045d0| 20 63 6f 6c 6f 72 73 2c | 20 65 64 69 74 20 61 6e | colors,| edit an|
|000045e0| 64 20 63 61 6c 63 75 6c | 61 74 65 20 6d 61 70 73 |d calcul|ate maps|
|000045f0| 2c 20 61 6e 64 20 64 72 | 61 77 2e 20 20 54 68 65 |, and dr|aw. The|
|00004600| 20 6f 6e 6c 79 20 74 68 | 69 6e 67 20 74 68 65 20 | only th|ing the |
|00004610| 73 68 65 6c 6c 20 63 61 | 6e 6e 6f 74 20 64 6f 20 |shell ca|nnot do |
|00004620| 69 73 20 6c 6f 61 64 20 | 66 72 61 63 74 61 6c 73 |is load |fractals|
|00004630| 20 66 72 6f 6d 20 64 69 | 73 6b 2e 20 20 54 68 65 | from di|sk. The|
|00004640| 20 75 73 65 20 6f 66 20 | 74 68 65 20 73 68 65 6c | use of |the shel|
|00004650| 6c 20 69 73 20 73 74 72 | 61 69 67 68 74 66 6f 72 |l is str|aightfor|
|00004660| 77 61 72 64 2c 20 73 69 | 6d 70 6c 79 20 63 6c 69 |ward, si|mply cli|
|00004670| 63 6b 20 6f 6e 20 74 68 | 65 20 63 6f 6d 6d 61 6e |ck on th|e comman|
|00004680| 64 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 65 78 |d you wa|nt to ex|
|00004690| 65 63 75 74 65 2e 20 20 | 4e 75 6d 65 72 69 63 61 |ecute. |Numerica|
|000046a0| 6c 20 64 61 74 61 20 69 | 73 20 65 6e 74 65 72 65 |l data i|s entere|
|000046b0| 64 20 61 74 20 74 68 65 | 20 62 6f 74 74 6f 6d 20 |d at the| bottom |
|000046c0| 6f 66 20 74 68 65 20 73 | 63 72 65 65 6e 2e 20 20 |of the s|creen. |
|000046d0| 57 68 65 6e 20 6d 6f 72 | 65 20 74 68 61 6e 20 6f |When mor|e than o|
|000046e0| 6e 65 20 69 74 65 6d 20 | 6f 66 20 69 6e 66 6f 72 |ne item |of infor|
|000046f0| 6d 61 74 69 6f 6e 20 6e | 65 65 64 73 20 74 6f 20 |mation n|eeds to |
|00004700| 62 65 20 65 6e 74 65 72 | 65 64 20 79 6f 75 20 6d |be enter|ed you m|
|00004710| 75 73 74 20 70 72 65 73 | 73 20 74 68 65 20 60 72 |ust pres|s the `r|
|00004720| 65 74 75 72 6e 27 20 6b | 65 79 20 61 66 74 65 72 |eturn' k|ey after|
|00004730| 20 65 61 63 68 20 69 74 | 65 6d 2e 20 20 54 68 65 | each it|em. The|
|00004740| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 6d 65 6e | applica|tion men|
|00004750| 75 20 62 61 72 20 69 73 | 20 64 69 73 61 62 6c 65 |u bar is| disable|
|00004760| 64 20 77 68 65 6e 20 74 | 68 65 20 73 68 65 6c 6c |d when t|he shell|
|00004770| 20 69 73 20 72 75 6e 6e | 69 6e 67 2c 20 75 73 65 | is runn|ing, use|
|00004780| 20 74 68 65 20 46 6f 72 | 74 68 20 6f 72 20 51 75 | the For|th or Qu|
|00004790| 69 74 20 63 6f 6d 6d 61 | 6e 64 73 20 74 6f 20 65 |it comma|nds to e|
|000047a0| 78 69 74 20 74 68 65 20 | 73 68 65 6c 6c 20 6f 72 |xit the |shell or|
|000047b0| 20 70 72 6f 67 72 61 6d | 2e 0d 0d 54 68 65 20 73 | program|...The s|
|000047c0| 68 65 6c 6c 20 75 73 65 | 73 20 6d 75 63 68 20 6f |hell use|s much o|
|000047d0| 66 20 74 68 65 20 6d 65 | 6d 6f 72 79 20 61 76 61 |f the me|mory ava|
|000047e0| 69 6c 61 62 6c 65 20 74 | 6f 20 46 6f 72 74 68 2e |ilable t|o Forth.|
|000047f0| 20 20 54 68 69 73 20 6d | 69 67 68 74 20 63 61 75 | This m|ight cau|
|00004800| 73 65 20 61 20 70 72 6f | 62 6c 65 6d 20 69 66 20 |se a pro|blem if |
|00004810| 79 6f 75 20 61 72 65 20 | 63 72 65 61 74 69 6e 67 |you are |creating|
|00004820| 20 6d 6f 72 65 20 73 6f | 70 68 69 73 74 69 63 61 | more so|phistica|
|00004830| 74 65 64 20 70 72 6f 67 | 72 61 6d 73 2e 20 20 59 |ted prog|rams. Y|
|00004840| 6f 75 20 63 61 6e 20 65 | 6c 69 6d 69 6e 61 74 65 |ou can e|liminate|
|00004850| 20 74 68 65 20 73 68 65 | 6c 6c 20 63 6f 64 65 20 | the she|ll code |
|00004860| 62 79 20 65 6e 74 65 72 | 69 6e 67 20 27 66 6f 72 |by enter|ing 'for|
|00004870| 67 65 74 20 73 68 65 6c | 6c 63 6f 64 65 27 20 77 |get shel|lcode' w|
|00004880| 68 65 6e 20 69 6e 20 69 | 6e 74 65 72 61 63 74 69 |hen in i|nteracti|
|00004890| 76 65 20 6d 6f 64 65 2e | 20 54 68 69 73 20 69 73 |ve mode.| This is|
|000048a0| 20 65 78 61 63 74 6c 79 | 20 77 68 61 74 20 74 68 | exactly| what th|
|000048b0| 65 20 43 61 74 68 65 64 | 72 61 6c 20 64 65 6d 6f |e Cathed|ral demo|
|000048c0| 20 70 72 6f 67 72 61 6d | 20 64 6f 65 73 2e 20 20 | program| does. |
|000048d0| 54 68 65 20 63 6f 64 65 | 20 69 73 20 65 72 61 73 |The code| is eras|
|000048e0| 65 64 20 66 72 6f 6d 20 | 46 6f 72 74 68 27 73 20 |ed from |Forth's |
|000048f0| 6d 65 6d 6f 72 79 20 61 | 6e 64 20 77 69 6c 6c 20 |memory a|nd will |
|00004900| 62 65 20 70 65 72 6d 61 | 6e 65 6e 74 6c 79 20 65 |be perma|nently e|
|00004910| 72 61 73 65 64 20 73 68 | 6f 75 6c 64 20 74 68 65 |rased sh|ould the|
|00004920| 20 77 6f 72 64 20 73 61 | 76 65 20 62 65 20 65 6e | word sa|ve be en|
|00004930| 74 65 72 65 64 20 61 66 | 74 65 72 20 74 68 65 20 |tered af|ter the |
|00004940| 63 6f 64 65 20 69 73 20 | 63 6c 65 61 72 65 64 2e |code is |cleared.|
|00004950| 20 20 41 6c 74 65 72 6e | 61 74 69 76 65 6c 79 2c | Altern|atively,|
|00004960| 20 6f 6e 65 20 63 6f 75 | 6c 64 20 73 65 6c 65 63 | one cou|ld selec|
|00004970| 74 20 27 53 61 76 65 20 | 44 69 63 74 69 6f 6e 61 |t 'Save |Dictiona|
|00004980| 72 79 27 20 66 72 6f 6d | 20 74 68 65 20 5f 46 69 |ry' from| the _Fi|
|00004990| 6c 65 5f 20 6d 65 6e 75 | 20 69 6e 73 74 65 61 64 |le_ menu| instead|
|000049a0| 20 6f 66 20 75 73 69 6e | 67 20 74 68 65 20 77 6f | of usin|g the wo|
|000049b0| 72 64 20 27 73 61 76 65 | 27 2e 20 20 54 68 69 73 |rd 'save|'. This|
|000049c0| 20 77 69 6c 6c 20 77 72 | 69 74 65 20 74 68 65 20 | will wr|ite the |
|000049d0| 63 75 72 72 65 6e 74 20 | 46 6f 72 74 68 20 64 69 |current |Forth di|
|000049e0| 63 74 69 6f 6e 61 72 79 | 20 69 6e 74 6f 20 74 68 |ctionary| into th|
|000049f0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 69 74 |e applic|ation it|
|00004a00| 73 65 6c 66 2e 20 20 54 | 68 69 73 20 73 68 6f 75 |self. T|his shou|
|00004a10| 6c 64 20 6e 65 76 65 72 | 20 62 65 20 61 20 70 72 |ld never| be a pr|
|00004a20| 6f 62 6c 65 6d 20 73 69 | 6e 63 65 20 65 76 65 72 |oblem si|nce ever|
|00004a30| 79 6f 6e 65 20 72 75 6e | 73 20 66 72 6f 6d 20 62 |yone run|s from b|
|00004a40| 61 63 6b 75 70 20 63 6f | 70 69 65 73 20 6f 6e 6c |ackup co|pies onl|
|00004a50| 79 2c 20 72 69 67 68 74 | 3f 20 20 54 68 69 73 20 |y, right|? This |
|00004a60| 69 73 20 61 6c 73 6f 20 | 61 20 77 61 79 20 74 6f |is also |a way to|
|00004a70| 20 63 72 65 61 74 65 20 | 61 20 76 65 72 73 69 6f | create |a versio|
|00004a80| 6e 20 6f 66 20 46 72 61 | 63 74 61 6c 20 4c 61 62 |n of Fra|ctal Lab|
|00004a90| 20 4b 69 74 20 74 68 61 | 74 20 68 61 73 20 6d 6f | Kit tha|t has mo|
|00004aa0| 72 65 20 6d 65 6d 6f 72 | 79 20 66 6f 72 20 79 6f |re memor|y for yo|
|00004ab0| 75 72 20 6f 77 6e 20 70 | 72 6f 67 72 61 6d 73 2e |ur own p|rograms.|
|00004ac0| 0d 0d 49 66 20 79 6f 75 | 20 61 72 65 20 64 65 73 |..If you| are des|
|00004ad0| 69 67 6e 69 6e 67 20 61 | 20 6e 65 77 20 66 72 61 |igning a| new fra|
|00004ae0| 63 74 61 6c 20 74 68 65 | 20 73 68 65 6c 6c 20 77 |ctal the| shell w|
|00004af0| 69 6c 6c 20 62 65 20 68 | 61 6e 64 79 20 73 69 6e |ill be h|andy sin|
|00004b00| 63 65 20 69 74 20 6c 65 | 74 73 20 79 6f 75 20 63 |ce it le|ts you c|
|00004b10| 68 61 6e 67 65 20 76 61 | 6c 75 65 73 20 71 75 69 |hange va|lues qui|
|00004b20| 63 6b 6c 79 2e 20 57 72 | 69 74 65 20 79 6f 75 72 |ckly. Wr|ite your|
|00004b30| 20 6d 61 70 73 20 64 6f | 77 6e 20 74 68 6f 75 67 | maps do|wn thoug|
|00004b40| 68 20 73 69 6e 63 65 20 | 46 72 61 63 74 61 6c 20 |h since |Fractal |
|00004b50| 4c 61 62 20 4b 69 74 20 | 68 61 73 20 6e 6f 20 61 |Lab Kit |has no a|
|00004b60| 62 69 6c 69 74 79 20 74 | 6f 20 73 61 76 65 20 6d |bility t|o save m|
|00004b70| 61 70 73 20 74 6f 20 64 | 69 73 6b 21 20 20 49 66 |aps to d|isk! If|
|00004b80| 20 79 6f 75 20 61 72 65 | 20 6d 61 6e 69 70 75 6c | you are| manipul|
|00004b90| 61 74 69 6e 67 20 61 20 | 66 72 61 63 74 61 6c 20 |ating a |fractal |
|00004ba0| 73 74 6f 72 65 64 20 6f | 6e 20 64 69 73 6b 20 79 |stored o|n disk y|
|00004bb0| 6f 75 20 6d 75 73 74 20 | 6c 6f 61 64 20 69 74 20 |ou must |load it |
|00004bc0| 69 6e 20 69 6e 74 65 72 | 61 63 74 69 76 65 20 6d |in inter|active m|
|00004bd0| 6f 64 65 20 28 69 2e 65 | 2e 20 67 6f 20 74 6f 20 |ode (i.e|. go to |
|00004be0| 46 6f 72 74 68 29 2c 20 | 65 6e 74 65 72 20 69 74 |Forth), |enter it|
|00004bf0| 73 20 6e 61 6d 65 20 74 | 6f 20 6c 6f 61 64 20 74 |s name t|o load t|
|00004c00| 68 65 20 6d 61 70 73 2c | 20 61 6e 64 20 74 68 65 |he maps,| and the|
|00004c10| 6e 20 65 6e 74 65 72 20 | 74 68 65 20 73 68 65 6c |n enter |the shel|
|00004c20| 6c 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |l. For |example,|
|00004c30| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6c | the fol|lowing l|
|00004c40| 69 6e 65 73 20 69 6e 20 | 69 6e 74 65 72 61 63 74 |ines in |interact|
|00004c50| 69 76 65 20 6d 6f 64 65 | 20 77 69 6c 6c 20 6c 6f |ive mode| will lo|
|00004c60| 61 64 20 74 68 65 20 66 | 65 72 6e 20 6d 61 70 73 |ad the f|ern maps|
|00004c70| 20 66 72 6f 6d 20 64 69 | 73 6b 20 61 6e 64 20 65 | from di|sk and e|
|00004c80| 6e 74 65 72 20 74 68 65 | 20 73 68 65 6c 6c 20 74 |nter the| shell t|
|00004c90| 6f 20 61 6c 6c 6f 77 20 | 79 6f 75 20 74 6f 20 77 |o allow |you to w|
|00004ca0| 6f 72 6b 20 77 69 74 68 | 20 74 68 65 20 66 72 61 |ork with| the fra|
|00004cb0| 63 74 61 6c 3a 0d 0d 2d | 2d 3e 20 3a 6d 61 70 73 |ctal:..-|-> :maps|
|00004cc0| 3a 66 65 72 6e 20 20 20 | 20 20 20 20 20 20 20 20 |:fern | |
|00004cd0| 20 20 20 20 28 6c 6f 61 | 64 20 74 68 65 20 6d 61 | (loa|d the ma|
|00004ce0| 70 73 20 66 72 6f 6d 20 | 64 69 73 6b 29 0d 66 65 |ps from |disk).fe|
|00004cf0| 72 6e 20 73 68 65 6c 6c | 20 20 20 20 20 20 20 20 |rn shell| |
|00004d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 6c 6f | | (lo|
|00004d10| 61 64 20 74 68 65 20 6d | 61 70 73 20 26 20 65 6e |ad the m|aps & en|
|00004d20| 74 65 72 20 74 68 65 20 | 73 68 65 6c 6c 29 0d 0d |ter the |shell)..|
|00004d30| 54 72 79 20 73 77 69 74 | 63 68 69 6e 67 20 74 68 |Try swit|ching th|
|00004d40| 65 20 73 69 67 6e 73 20 | 6f 66 20 74 68 65 20 61 |e signs |of the a|
|00004d50| 20 61 6e 64 20 63 20 76 | 61 6c 75 65 73 20 69 6e | and c v|alues in|
|00004d60| 20 74 68 65 20 66 69 72 | 73 74 20 66 65 72 6e 20 | the fir|st fern |
|00004d70| 6d 61 70 20 74 6f 20 63 | 68 61 6e 67 65 20 74 68 |map to c|hange th|
|00004d80| 65 20 66 65 72 6e 20 69 | 6e 74 6f 20 61 20 77 65 |e fern i|nto a we|
|00004d90| 65 64 2e 20 20 55 73 65 | 20 74 68 65 20 48 65 6c |ed. Use| the Hel|
|00004da0| 70 20 63 6f 6d 6d 61 6e | 64 20 66 6f 72 20 61 20 |p comman|d for a |
|00004db0| 71 75 69 63 6b 20 73 75 | 6d 6d 61 72 79 20 6f 66 |quick su|mmary of|
|00004dc0| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 73 20 61 76 | the com|mands av|
|00004dd0| 61 69 6c 61 62 6c 65 20 | 69 6e 20 74 68 65 20 73 |ailable |in the s|
|00004de0| 68 65 6c 6c 2e 20 20 4e | 6f 74 65 20 74 68 61 74 |hell. N|ote that|
|00004df0| 20 74 68 65 20 68 65 6c | 70 20 73 63 72 65 65 6e | the hel|p screen|
|00004e00| 20 69 6e 20 69 6e 74 65 | 72 61 63 74 69 76 65 20 | in inte|ractive |
|00004e10| 6d 6f 64 65 20 69 73 20 | 64 69 66 66 65 72 65 6e |mode is |differen|
|00004e20| 74 20 74 68 61 6e 20 74 | 68 65 20 6f 6e 65 20 69 |t than t|he one i|
|00004e30| 6e 20 73 68 65 6c 6c 20 | 6d 6f 64 65 2e 0d 0d a5 |n shell |mode....|
|00004e40| 52 65 66 65 72 65 6e 63 | 65 0d 0d a5 a5 43 6f 6d |Referenc|e....Com|
|00004e50| 6d 61 6e 64 73 0d 0d 64 | 72 61 77 0d 09 44 72 61 |mands..d|raw..Dra|
|00004e60| 77 20 61 20 66 72 61 63 | 74 61 6c 20 62 61 73 65 |w a frac|tal base|
|00004e70| 64 20 6f 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |d on the| current|
|00004e80| 20 6d 61 70 73 2e 20 20 | 50 72 65 73 73 20 61 20 | maps. |Press a |
|00004e90| 6b 65 79 20 74 6f 20 73 | 74 6f 70 2e 0d 09 45 2e |key to s|top...E.|
|00004ea0| 67 2e 09 67 72 65 65 6e | 20 63 6f 6c 6f 72 20 66 |g..green| color f|
|00004eb0| 65 72 6e 20 64 72 61 77 | 0d 0d 63 64 72 61 77 0d |ern draw|..cdraw.|
|00004ec0| 09 45 78 63 65 70 74 20 | 66 6f 72 20 70 6c 6f 74 |.Except |for plot|
|00004ed0| 74 69 6e 67 20 65 61 63 | 68 20 6d 61 70 20 69 6e |ting eac|h map in|
|00004ee0| 20 61 20 64 69 66 66 65 | 72 65 6e 74 20 63 6f 6c | a diffe|rent col|
|00004ef0| 6f 72 2c 20 69 74 20 69 | 73 20 74 68 65 20 73 61 |or, it i|s the sa|
|00004f00| 6d 65 20 61 73 0d 09 64 | 72 61 77 2e 0d 09 45 2e |me as..d|raw...E.|
|00004f10| 67 2e 09 73 70 69 72 61 | 6c 20 63 64 72 61 77 0d |g..spira|l cdraw.|
|00004f20| 0d 3c 6e 3e 20 69 64 72 | 61 77 20 6f 72 20 3c 6e |.<n> idr|aw or <n|
|00004f30| 3e 20 69 63 64 72 61 77 | 0d 09 53 61 6d 65 20 61 |> icdraw|..Same a|
|00004f40| 73 20 64 72 61 77 20 61 | 6e 64 20 63 64 72 61 77 |s draw a|nd cdraw|
|00004f50| 20 72 65 73 70 65 63 74 | 69 76 65 6c 79 20 65 78 | respect|ively ex|
|00004f60| 63 65 70 74 20 66 6f 72 | 20 69 74 65 72 61 74 69 |cept for| iterati|
|00004f70| 6e 67 20 74 68 72 6f 75 | 67 68 0d 09 3c 6e 3e 2a |ng throu|gh..<n>*|
|00004f80| 35 30 30 20 70 6f 69 6e | 74 73 2e 20 20 55 73 65 |500 poin|ts. Use|
|00004f90| 66 75 6c 20 66 6f 72 20 | 64 72 61 77 69 6e 67 20 |ful for |drawing |
|00004fa0| 61 20 66 72 61 63 74 61 | 6c 20 61 6e 64 20 73 74 |a fracta|l and st|
|00004fb0| 6f 70 70 69 6e 67 20 77 | 69 74 68 6f 75 74 0d 09 |opping w|ithout..|
|00004fc0| 75 73 65 72 20 69 6e 74 | 65 72 61 63 74 69 6f 6e |user int|eraction|
|00004fd0| 2e 0d 0d 3c 6e 3e 20 65 | 64 69 74 0d 09 45 64 69 |...<n> e|dit..Edi|
|00004fe0| 74 20 74 68 65 20 6e 2d | 74 68 20 6d 61 70 2e 20 |t the n-|th map. |
|00004ff0| 20 45 6e 74 65 72 20 61 | 20 6e 65 77 20 76 61 6c | Enter a| new val|
|00005000| 75 65 20 6f 72 20 70 72 | 65 73 73 20 72 65 74 75 |ue or pr|ess retu|
|00005010| 72 6e 20 74 6f 20 6c 65 | 61 76 65 20 74 68 65 0d |rn to le|ave the.|
|00005020| 09 65 78 69 73 74 69 6e | 67 20 76 61 6c 75 65 20 |.existin|g value |
|00005030| 61 73 20 69 73 2e 0d 09 | 45 2e 67 2e 09 32 20 65 |as is...|E.g..2 e|
|00005040| 64 69 74 0d 09 20 20 61 | 20 3d 20 30 2e 35 09 09 |dit.. a| = 0.5..|
|00005050| 3f 2d 30 2e 35 09 28 6e | 65 77 20 76 61 6c 75 65 |?-0.5.(n|ew value|
|00005060| 29 0d 09 20 20 62 20 3d | 20 2d 30 2e 35 09 09 3f |).. b =| -0.5..?|
|00005070| 3c 72 65 74 75 72 6e 3e | 20 20 20 65 74 63 2e 0d |<return>| etc..|
|00005080| 0d 7a 65 72 6f 2d 6d 61 | 70 73 0d 09 45 72 61 73 |.zero-ma|ps..Eras|
|00005090| 65 20 61 6c 6c 20 74 77 | 65 6c 76 65 20 6d 61 70 |e all tw|elve map|
|000050a0| 73 2e 0d 09 45 2e 67 2e | 09 7a 65 72 6f 2d 6d 61 |s...E.g.|.zero-ma|
|000050b0| 70 73 0d 0d 3c 63 6f 6c | 6f 72 2e 6e 61 6d 65 3e |ps..<col|or.name>|
|000050c0| 20 63 6f 6c 6f 72 0d 09 | 53 65 74 20 74 68 65 20 | color..|Set the |
|000050d0| 63 75 72 72 65 6e 74 20 | 64 72 61 77 69 6e 67 20 |current |drawing |
|000050e0| 63 6f 6c 6f 72 20 74 6f | 20 74 68 65 20 63 6f 6c |color to| the col|
|000050f0| 6f 72 20 6e 61 6d 65 64 | 2e 20 20 56 61 6c 69 64 |or named|. Valid|
|00005100| 20 63 6f 6c 6f 72 73 20 | 61 72 65 0d 09 62 6c 61 | colors |are..bla|
|00005110| 63 6b 2c 20 77 69 74 65 | 2c 20 72 65 64 2c 20 67 |ck, wite|, red, g|
|00005120| 72 65 65 6e 2c 20 62 6c | 75 65 2c 20 79 65 6c 6c |reen, bl|ue, yell|
|00005130| 6f 77 2c 20 63 79 61 6e | 2c 20 6d 61 67 65 6e 74 |ow, cyan|, magent|
|00005140| 61 0d 09 45 2e 67 2e 09 | 6d 61 67 65 6e 74 61 20 |a..E.g..|magenta |
|00005150| 63 6f 6c 6f 72 0d 0d 3c | 6e 3e 20 6d 61 70 73 0d |color..<|n> maps.|
|00005160| 09 53 65 74 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |.Set the| number |
|00005170| 6f 66 20 6d 61 70 73 20 | 74 6f 20 75 73 65 20 74 |of maps |to use t|
|00005180| 6f 20 3c 6e 3e 2e 0d 09 | 45 2e 67 2e 09 34 20 6d |o <n>...|E.g..4 m|
|00005190| 61 70 73 0d 0d 0d 3c 78 | 3e 20 3c 79 3e 20 6f 72 |aps...<x|> <y> or|
|000051a0| 69 67 69 6e 0d 09 53 65 | 74 20 74 68 65 20 6f 72 |igin..Se|t the or|
|000051b0| 69 67 69 6e 20 74 6f 20 | 28 78 2c 79 29 2e 20 20 |igin to |(x,y). |
|000051c0| 58 20 61 6e 64 20 59 20 | 61 72 65 20 66 6c 6f 61 |X and Y |are floa|
|000051d0| 74 69 6e 67 20 70 6f 69 | 6e 74 20 6e 75 6d 62 65 |ting poi|nt numbe|
|000051e0| 72 73 2e 0d 09 45 2e 67 | 2e 09 2d 30 2e 33 35 34 |rs...E.g|..-0.354|
|000051f0| 20 2e 37 38 39 20 6f 72 | 69 67 69 6e 0d 0d 3c 75 | .789 or|igin..<u|
|00005200| 3e 20 3c 76 3e 20 73 63 | 72 65 65 6e 0d 09 53 65 |> <v> sc|reen..Se|
|00005210| 74 20 74 68 65 20 73 63 | 72 65 65 6e 20 6f 72 69 |t the sc|reen ori|
|00005220| 67 69 6e 20 74 6f 20 28 | 75 2c 76 29 20 28 70 69 |gin to (|u,v) (pi|
|00005230| 78 65 6c 73 29 2e 0d 09 | 45 2e 67 2e 09 31 32 30 |xels)...|E.g..120|
|00005240| 20 32 32 30 20 73 63 72 | 65 65 6e 0d 0d 3c 72 3e | 220 scr|een..<r>|
|00005250| 20 72 61 6e 67 65 0d 09 | 53 65 74 20 74 68 65 20 | range..|Set the |
|00005260| 72 61 6e 67 65 20 74 6f | 20 3c 72 3e 20 28 66 6c |range to| <r> (fl|
|00005270| 6f 61 74 69 6e 67 20 70 | 6f 69 6e 74 29 2e 20 20 |oating p|oint). |
|00005280| 54 68 65 20 76 69 65 77 | 69 6e 67 20 77 69 6e 64 |The view|ing wind|
|00005290| 6f 77 20 69 73 20 61 0d | 09 73 71 75 61 72 65 20 |ow is a.|.square |
|000052a0| 77 69 74 68 20 74 68 65 | 20 6c 6f 77 65 72 20 6c |with the| lower l|
|000052b0| 65 66 74 20 63 6f 72 6e | 65 72 20 61 73 20 74 68 |eft corn|er as th|
|000052c0| 65 20 6f 72 69 67 69 6e | 20 61 6e 64 20 73 69 64 |e origin| and sid|
|000052d0| 65 20 6c 65 6e 67 74 68 | 0d 09 61 73 20 72 61 6e |e length|..as ran|
|000052e0| 67 65 2e 0d 09 45 2e 67 | 2e 09 30 2e 35 20 72 61 |ge...E.g|..0.5 ra|
|000052f0| 6e 67 65 0d 0d 3c 78 3e | 20 3c 79 3e 20 73 63 61 |nge..<x>| <y> sca|
|00005300| 6c 65 0d 09 53 65 74 20 | 74 68 65 20 78 2d 61 78 |le..Set |the x-ax|
|00005310| 69 73 20 61 6e 64 20 79 | 2d 61 78 69 73 20 73 63 |is and y|-axis sc|
|00005320| 61 6c 65 73 20 74 6f 20 | 74 68 65 20 66 6c 6f 61 |ales to |the floa|
|00005330| 74 69 6e 67 20 70 6f 69 | 6e 74 20 76 61 6c 75 65 |ting poi|nt value|
|00005340| 73 20 67 69 76 65 6e 2e | 0d 09 54 68 65 20 64 65 |s given.|..The de|
|00005350| 66 61 75 6c 74 20 73 63 | 61 6c 65 20 69 73 20 31 |fault sc|ale is 1|
|00005360| 2e 30 20 66 6f 72 20 61 | 20 66 75 6c 6c 20 73 63 |.0 for a| full sc|
|00005370| 72 65 65 6e 20 69 6d 61 | 67 65 2e 20 20 43 68 61 |reen ima|ge. Cha|
|00005380| 6e 67 69 6e 67 20 74 68 | 65 20 73 63 61 6c 65 0d |nging th|e scale.|
|00005390| 09 74 6f 20 61 20 76 61 | 6c 75 65 20 6c 65 73 73 |.to a va|lue less|
|000053a0| 20 74 68 61 6e 20 6f 6e | 65 20 73 68 72 69 6e 6b | than on|e shrink|
|000053b0| 73 20 74 68 65 20 69 6d | 61 67 65 2c 20 67 72 65 |s the im|age, gre|
|000053c0| 61 74 65 72 20 74 68 61 | 6e 20 6f 6e 65 20 65 78 |ater tha|n one ex|
|000053d0| 70 61 6e 64 73 0d 09 74 | 68 65 20 69 6d 61 67 65 |pands..t|he image|
|000053e0| 2e 0d 09 45 2e 67 2e 09 | 32 2e 30 20 32 2e 30 20 |...E.g..|2.0 2.0 |
|000053f0| 73 63 61 6c 65 0d 0d 6d | 6f 75 73 65 0d 09 57 68 |scale..m|ouse..Wh|
|00005400| 65 6e 20 69 73 73 75 65 | 64 2c 20 6d 6f 75 73 65 |en issue|d, mouse|
|00005410| 20 77 69 6c 6c 20 74 72 | 61 6e 73 6c 61 74 65 20 | will tr|anslate |
|00005420| 74 68 65 20 70 6f 73 69 | 74 69 6f 6e 20 6f 66 20 |the posi|tion of |
|00005430| 74 68 65 20 70 6f 69 6e | 74 65 72 20 69 6e 74 6f |the poin|ter into|
|00005440| 0d 09 61 6e 20 78 2c 79 | 20 63 6f 6f 72 64 69 6e |..an x,y| coordin|
|00005450| 61 74 65 20 61 6c 6c 6f | 77 69 6e 67 20 74 68 65 |ate allo|wing the|
|00005460| 20 75 73 65 72 20 74 6f | 20 27 73 65 65 27 20 77 | user to| 'see' w|
|00005470| 68 65 72 65 20 63 65 72 | 74 61 69 6e 20 70 61 72 |here cer|tain par|
|00005480| 74 73 20 6f 66 20 0d 09 | 74 68 65 20 69 6d 61 67 |ts of ..|the imag|
|00005490| 65 20 61 72 65 2e 20 20 | 43 6c 69 63 6b 69 6e 67 |e are. |Clicking|
|000054a0| 20 74 68 65 20 6d 6f 75 | 73 65 20 62 75 74 74 6f | the mou|se butto|
|000054b0| 6e 20 77 69 6c 6c 20 73 | 65 6c 65 63 74 20 74 68 |n will s|elect th|
|000054c0| 61 74 20 70 6f 69 6e 74 | 20 61 73 0d 09 74 68 65 |at point| as..the|
|000054d0| 20 6e 65 77 20 6f 72 69 | 67 69 6e 20 61 6e 64 20 | new ori|gin and |
|000054e0| 64 65 63 72 65 61 73 65 | 20 74 68 65 20 72 61 6e |decrease| the ran|
|000054f0| 67 65 20 62 79 20 61 20 | 66 61 63 74 6f 72 20 6f |ge by a |factor o|
|00005500| 66 20 74 77 6f 2e 0d 09 | 0d 6f 6e 7c 6f 66 66 20 |f two...|.on|off |
|00005510| 63 6c 65 61 72 0d 09 54 | 75 72 6e 20 63 6c 65 61 |clear..T|urn clea|
|00005520| 72 69 6e 67 20 6f 66 20 | 70 61 67 65 20 62 65 66 |ring of |page bef|
|00005530| 6f 72 65 20 64 72 61 77 | 69 6e 67 20 6f 6e 20 61 |ore draw|ing on a|
|00005540| 6e 64 20 6f 66 66 2e 20 | 44 65 66 61 75 6c 74 20 |nd off. |Default |
|00005550| 69 73 20 6f 6e 2e 0d 0d | 6f 6e 7c 6f 66 66 20 61 |is on...|on|off a|
|00005560| 78 65 73 0d 09 54 75 72 | 6e 20 74 68 65 20 63 6f |xes..Tur|n the co|
|00005570| 6f 72 64 69 6e 61 74 65 | 20 61 78 65 73 20 28 72 |ordinate| axes (r|
|00005580| 65 61 6c 6c 79 20 61 20 | 6d 61 72 6b 20 6f 6e 20 |eally a |mark on |
|00005590| 74 68 65 20 6f 72 69 67 | 69 6e 29 20 4f 4e 20 6f |the orig|in) ON o|
|000055a0| 72 20 4f 46 46 2e 0d 09 | 45 2e 67 2e 09 6f 66 66 |r OFF...|E.g..off|
|000055b0| 20 61 78 65 73 0d 0d 6f | 6e 7c 6f 66 66 20 6f 75 | axes..o|n|off ou|
|000055c0| 74 6c 69 6e 65 73 0d 09 | 53 65 74 20 73 68 6f 77 |tlines..|Set show|
|000055d0| 69 6e 67 20 74 68 65 20 | 6d 61 70 20 6f 75 74 6c |ing the |map outl|
|000055e0| 69 6e 65 73 20 6f 6e 20 | 6f 72 20 6f 66 66 2c 20 |ines on |or off, |
|000055f0| 70 72 65 73 73 20 61 20 | 6b 65 79 20 74 6f 20 63 |press a |key to c|
|00005600| 6f 6e 74 69 6e 75 65 0d | 09 61 66 74 65 72 20 76 |ontinue.|.after v|
|00005610| 69 65 77 69 6e 67 20 74 | 68 65 20 6f 75 74 6c 69 |iewing t|he outli|
|00005620| 6e 65 73 2e 0d 09 45 2e | 67 2e 09 6f 6e 20 6f 75 |nes...E.|g..on ou|
|00005630| 74 6c 69 6e 65 73 0d 0d | 73 65 74 74 69 6e 67 73 |tlines..|settings|
|00005640| 0d 09 53 68 6f 77 20 61 | 20 6c 69 73 74 20 6f 66 |..Show a| list of|
|00005650| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6f 72 69 | the cur|rent ori|
|00005660| 67 69 6e 2c 20 73 63 72 | 65 65 6e 20 6f 72 69 67 |gin, scr|een orig|
|00005670| 69 6e 2c 20 72 61 6e 67 | 65 2c 20 73 63 61 6c 65 |in, rang|e, scale|
|00005680| 2c 20 6e 75 6d 62 65 72 | 0d 09 6f 66 20 6d 61 70 |, number|..of map|
|00005690| 73 20 61 6e 64 20 77 68 | 65 74 68 65 72 20 74 68 |s and wh|ether th|
|000056a0| 65 20 61 78 65 73 20 61 | 6e 64 20 6f 75 74 6c 69 |e axes a|nd outli|
|000056b0| 6e 65 73 20 61 72 65 20 | 6f 6e 20 6f 72 20 6f 66 |nes are |on or of|
|000056c0| 66 2e 0d 09 45 2e 67 2e | 09 73 65 74 74 69 6e 67 |f...E.g.|.setting|
|000056d0| 73 0d 0d 66 69 6e 64 6d | 61 70 0d 09 41 6c 6c 6f |s..findm|ap..Allo|
|000056e0| 77 73 20 74 68 65 20 75 | 73 65 72 20 74 6f 20 65 |ws the u|ser to e|
|000056f0| 6e 74 65 72 20 74 68 72 | 65 65 20 69 6e 69 74 69 |nter thr|ee initi|
|00005700| 61 6c 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 20 61 |al coord|inates a|
|00005710| 6e 64 20 74 68 72 65 65 | 20 69 6d 61 67 65 0d 09 |nd three| image..|
|00005720| 63 6f 6f 72 64 69 6e 61 | 74 65 73 20 61 6e 64 20 |coordina|tes and |
|00005730| 63 61 6c 63 75 6c 61 74 | 65 73 20 74 68 65 20 6d |calculat|es the m|
|00005740| 61 70 20 66 6f 72 20 74 | 68 6f 73 65 20 76 61 6c |ap for t|hose val|
|00005750| 75 65 73 2e 0d 09 45 2e | 67 2e 09 66 69 6e 64 6d |ues...E.|g..findm|
|00005760| 61 70 0d 0d 6d 61 6b 65 | 0d 09 50 75 74 73 20 74 |ap..make|..Puts t|
|00005770| 68 65 20 6d 6f 73 74 20 | 72 65 63 65 6e 74 20 76 |he most |recent v|
|00005780| 61 6c 75 65 73 20 66 72 | 6f 6d 20 66 69 6e 64 6d |alues fr|om findm|
|00005790| 61 70 20 6f 6e 20 74 68 | 65 20 73 74 61 63 6b 20 |ap on th|e stack |
|000057a0| 69 6e 20 6f 72 64 65 72 | 0d 09 66 6f 72 20 73 65 |in order|..for se|
|000057b0| 74 2e 20 20 54 68 65 20 | 75 73 65 72 20 6e 65 65 |t. The |user nee|
|000057c0| 64 73 20 74 6f 20 61 64 | 64 20 74 68 65 20 70 72 |ds to ad|d the pr|
|000057d0| 6f 62 61 62 69 6c 69 74 | 79 20 61 6e 64 20 6d 61 |obabilit|y and ma|
|000057e0| 70 20 6e 75 6d 62 65 72 | 0d 09 62 65 66 6f 72 65 |p number|..before|
|000057f0| 20 63 61 6c 6c 69 6e 67 | 20 73 65 74 2e 0d 09 45 | calling| set...E|
|00005800| 2e 67 2e 09 6d 61 6b 65 | 20 2e 33 33 33 20 31 20 |.g..make| .333 1 |
|00005810| 73 65 74 0d 0d 3c 61 3e | 20 3c 62 3e 20 3c 63 3e |set..<a>| <b> <c>|
|00005820| 20 3c 64 3e 20 3c 65 3e | 20 3c 66 3e 20 3c 70 3e | <d> <e>| <f> <p>|
|00005830| 20 3c 6e 3e 20 73 65 74 | 0d 09 53 65 74 73 20 74 | <n> set|..Sets t|
|00005840| 68 65 20 70 61 72 61 6d | 65 74 65 72 73 20 66 6f |he param|eters fo|
|00005850| 72 20 61 20 6d 61 70 2e | 20 20 54 68 65 20 6c 65 |r a map.| The le|
|00005860| 74 74 65 72 73 20 61 2d | 66 20 63 6f 72 72 65 73 |tters a-|f corres|
|00005870| 70 6f 6e 64 20 74 6f 20 | 74 68 65 20 0d 09 76 61 |pond to |the ..va|
|00005880| 6c 75 65 73 20 66 6f 72 | 20 74 68 65 20 6d 61 74 |lues for| the mat|
|00005890| 72 69 78 20 61 6e 64 20 | 6f 66 66 73 65 74 20 76 |rix and |offset v|
|000058a0| 65 63 74 6f 72 2c 20 3c | 70 3e 20 69 73 20 74 68 |ector, <|p> is th|
|000058b0| 65 20 70 72 6f 62 61 62 | 69 6c 69 74 79 20 66 6f |e probab|ility fo|
|000058c0| 72 0d 09 74 68 65 20 6d | 61 70 20 61 6e 64 20 3c |r..the m|ap and <|
|000058d0| 6e 3e 20 69 73 20 74 68 | 65 20 6d 61 70 20 6e 75 |n> is th|e map nu|
|000058e0| 6d 62 65 72 2e 20 20 41 | 6c 6c 20 76 61 6c 75 65 |mber. A|ll value|
|000058f0| 73 20 65 78 63 65 70 74 | 20 3c 6e 3e 20 61 72 65 |s except| <n> are|
|00005900| 20 74 6f 0d 09 62 65 20 | 66 6c 6f 61 74 69 6e 67 | to..be |floating|
|00005910| 20 70 6f 69 6e 74 20 6e | 75 6d 62 65 72 73 2e 0d | point n|umbers..|
|00005920| 09 45 2e 67 2e 09 30 2e | 35 20 2d 30 2e 35 20 30 |.E.g..0.|5 -0.5 0|
|00005930| 2e 35 20 30 2e 35 20 30 | 2e 30 20 30 2e 30 20 30 |.5 0.5 0|.0 0.0 0|
|00005940| 2e 35 20 31 20 73 65 74 | 0d 0d 3c 6d 31 3e 20 3c |.5 1 set|..<m1> <|
|00005950| 6d 32 3e 20 63 6f 70 79 | 0d 09 43 6f 70 79 20 6d |m2> copy|..Copy m|
|00005960| 61 70 20 6e 75 6d 62 65 | 72 20 3c 6d 31 3e 20 74 |ap numbe|r <m1> t|
|00005970| 6f 20 3c 6d 32 3e 20 77 | 69 74 68 6f 75 74 20 64 |o <m2> w|ithout d|
|00005980| 69 73 74 75 72 62 69 6e | 67 20 3c 6d 31 3e 2e 0d |isturbin|g <m1>..|
|00005990| 09 45 2e 67 2e 09 32 20 | 35 20 63 6f 70 79 0d 0d |.E.g..2 |5 copy..|
|000059a0| 3c 6d 3e 20 64 65 6c 65 | 74 65 0d 09 44 65 6c 65 |<m> dele|te..Dele|
|000059b0| 74 65 20 6d 61 70 20 6e | 75 6d 62 65 72 20 3c 6d |te map n|umber <m|
|000059c0| 3e 20 61 6e 64 20 6d 6f | 76 65 20 61 6e 79 20 6f |> and mo|ve any o|
|000059d0| 74 68 65 72 20 6d 61 70 | 73 20 75 70 20 69 6e 20 |ther map|s up in |
|000059e0| 6d 65 6d 6f 72 79 2e 0d | 09 45 2e 67 2e 09 33 20 |memory..|.E.g..3 |
|000059f0| 64 65 6c 65 74 65 0d 0d | 3c 6d 3e 20 69 6e 73 65 |delete..|<m> inse|
|00005a00| 72 74 0d 09 49 6e 73 65 | 72 74 20 61 20 62 6c 61 |rt..Inse|rt a bla|
|00005a10| 6e 6b 20 6d 61 70 20 62 | 65 66 6f 72 65 20 6d 61 |nk map b|efore ma|
|00005a20| 70 20 3c 6d 3e 2e 0d 09 | 45 2e 67 2e 09 31 20 69 |p <m>...|E.g..1 i|
|00005a30| 6e 73 65 72 74 0d 0d 63 | 6c 73 0d 09 43 6c 65 61 |nsert..c|ls..Clea|
|00005a40| 72 20 74 68 65 20 77 69 | 6e 64 6f 77 2e 0d 09 45 |r the wi|ndow...E|
|00005a50| 2e 67 2e 09 63 6c 73 0d | 0d 62 79 65 0d 09 45 78 |.g..cls.|.bye..Ex|
|00005a60| 69 74 20 46 72 61 63 74 | 61 6c 20 4c 61 62 20 4b |it Fract|al Lab K|
|00005a70| 69 74 2e 0d 09 45 2e 67 | 2e 09 62 79 65 0d 09 0d |it...E.g|..bye...|
|00005a80| 6d 65 6d 0d 09 53 68 6f | 77 20 74 68 65 20 61 76 |mem..Sho|w the av|
|00005a90| 61 69 6c 61 62 6c 65 20 | 64 69 63 74 69 6f 6e 61 |ailable |dictiona|
|00005aa0| 72 79 20 73 70 61 63 65 | 2e 20 20 28 46 6f 72 74 |ry space|. (Fort|
|00005ab0| 68 20 6f 6e 6c 79 20 68 | 61 73 20 33 32 6b 29 0d |h only h|as 32k).|
|00005ac0| 09 45 2e 67 2e 09 6d 65 | 6d 0d 0d 3f 6f 72 69 67 |.E.g..me|m..?orig|
|00005ad0| 69 6e 2c 20 3f 73 63 72 | 65 65 6e 2c 20 3f 73 63 |in, ?scr|een, ?sc|
|00005ae0| 61 6c 65 2c 20 3f 72 61 | 6e 67 65 2c 20 3f 6d 61 |ale, ?ra|nge, ?ma|
|00005af0| 70 73 2c 20 3f 61 78 65 | 73 2c 20 3f 6f 75 74 6c |ps, ?axe|s, ?outl|
|00005b00| 69 6e 65 2c 20 3f 63 6c | 65 61 72 0d 09 53 68 6f |ine, ?cl|ear..Sho|
|00005b10| 77 20 69 6e 64 69 76 69 | 64 75 61 6c 20 73 65 74 |w indivi|dual set|
|00005b20| 74 69 6e 67 73 2e 20 20 | 73 65 74 74 69 6e 67 73 |tings. |settings|
|00005b30| 20 63 61 6c 6c 73 20 65 | 61 63 68 20 6f 66 20 74 | calls e|ach of t|
|00005b40| 68 65 73 65 2e 0d 0d 3c | 6e 3e 20 73 68 6f 77 0d |hese...<|n> show.|
|00005b50| 09 53 68 6f 77 20 74 68 | 65 20 76 61 6c 75 65 73 |.Show th|e values|
|00005b60| 20 6f 66 20 6d 61 70 20 | 3c 6e 3e 2e 0d 09 45 2e | of map |<n>...E.|
|00005b70| 67 2e 09 33 20 73 68 6f | 77 0d 0d a5 50 72 69 6d |g..3 sho|w...Prim|
|00005b80| 69 74 69 76 65 20 63 6f | 6d 6d 61 6e 64 73 0d 0d |itive co|mmands..|
|00005b90| 54 68 65 73 65 20 63 6f | 6d 6d 61 6e 64 73 20 28 |These co|mmands (|
|00005ba0| 77 6f 72 64 73 29 20 61 | 72 65 20 60 70 72 69 6d |words) a|re `prim|
|00005bb0| 69 74 69 76 65 27 20 69 | 6e 20 74 68 65 20 73 65 |itive' i|n the se|
|00005bc0| 6e 73 65 20 74 68 61 74 | 20 74 68 65 79 20 61 72 |nse that| they ar|
|00005bd0| 65 20 63 61 6c 6c 65 64 | 20 62 79 20 74 68 65 20 |e called| by the |
|00005be0| 72 65 67 75 6c 61 72 20 | 63 6f 6d 6d 61 6e 64 20 |regular |command |
|00005bf0| 77 6f 72 64 73 2e 20 20 | 41 73 20 74 68 65 79 20 |words. |As they |
|00005c00| 61 72 65 20 73 74 61 6e | 64 61 72 64 20 46 6f 72 |are stan|dard For|
|00005c10| 74 68 20 77 6f 72 64 73 | 20 74 68 65 79 20 61 72 |th words| they ar|
|00005c20| 65 20 61 76 61 69 6c 61 | 62 6c 65 20 74 6f 20 74 |e availa|ble to t|
|00005c30| 68 65 20 75 73 65 72 20 | 61 73 20 77 65 6c 6c 2e |he user |as well.|
|00005c40| 0d 0d 69 6e 70 75 74 20 | 20 20 28 20 2d 2d 20 61 |..input | ( -- a|
|00005c50| 20 29 0d 09 47 65 74 20 | 61 20 31 36 2d 62 69 74 | )..Get |a 16-bit|
|00005c60| 20 69 6e 74 65 67 65 72 | 20 6f 6e 20 74 68 65 20 | integer| on the |
|00005c70| 73 74 61 63 6b 2e 0d 0d | 66 69 6e 70 75 74 20 20 |stack...|finput |
|00005c80| 28 20 2d 2d 20 66 20 62 | 20 29 0d 09 47 65 74 20 |( -- f b| )..Get |
|00005c90| 61 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |a floati|ng point|
|00005ca0| 20 6e 75 6d 62 65 72 20 | 6f 6e 20 74 68 65 20 73 | number |on the s|
|00005cb0| 74 61 63 6b 20 61 6e 64 | 20 61 20 62 6f 6f 6c 65 |tack and| a boole|
|00005cc0| 61 6e 20 76 61 6c 75 65 | 20 74 68 61 74 20 69 73 |an value| that is|
|00005cd0| 0d 09 66 61 6c 73 65 20 | 69 66 20 74 68 65 20 75 |..false |if the u|
|00005ce0| 73 65 72 20 70 72 65 73 | 73 65 64 20 74 68 65 20 |ser pres|sed the |
|00005cf0| 72 65 74 75 72 6e 20 6b | 65 79 20 6f 6e 6c 79 2c |return k|ey only,|
|00005d00| 20 69 6e 20 77 68 69 63 | 68 20 63 61 73 65 20 74 | in whic|h case t|
|00005d10| 68 65 20 0d 09 6e 75 6d | 62 65 72 20 69 73 20 30 |he ..num|ber is 0|
|00005d20| 2e 30 2e 0d 0d 23 6d 61 | 70 2d 3e 61 64 64 72 20 |.0...#ma|p->addr |
|00005d30| 20 28 20 61 20 2d 2d 20 | 61 64 64 72 20 29 0d 09 | ( a -- |addr )..|
|00005d40| 43 6f 6e 76 65 72 74 20 | 61 20 6e 75 6d 62 65 72 |Convert |a number|
|00005d50| 20 66 6f 72 20 61 20 6d | 61 70 20 69 6e 74 6f 20 | for a m|ap into |
|00005d60| 61 6e 20 61 64 64 72 65 | 73 73 20 74 6f 20 74 68 |an addre|ss to th|
|00005d70| 65 20 6d 61 70 20 6c 6f | 63 61 74 69 6f 6e 20 69 |e map lo|cation i|
|00005d80| 6e 0d 09 6d 65 6d 6f 72 | 79 2e 0d 0d 67 65 74 20 |n..memor|y...get |
|00005d90| 20 20 28 20 6f 66 66 73 | 65 74 20 6d 61 70 23 20 | ( offs|et map# |
|00005da0| 2d 2d 20 76 61 6c 75 65 | 20 29 0d 09 47 65 74 20 |-- value| )..Get |
|00005db0| 61 20 76 61 6c 75 65 20 | 66 6f 72 20 61 20 70 61 |a value |for a pa|
|00005dc0| 72 74 69 63 75 6c 61 72 | 20 6d 61 70 2e 20 20 54 |rticular| map. T|
|00005dd0| 68 65 20 6f 66 66 73 65 | 74 20 69 73 20 61 20 62 |he offse|t is a b|
|00005de0| 72 61 6e 63 68 20 69 6e | 74 6f 20 74 68 65 0d 09 |ranch in|to the..|
|00005df0| 6d 61 70 2c 20 65 61 63 | 68 20 76 61 6c 75 65 20 |map, eac|h value |
|00005e00| 69 73 20 31 30 20 62 79 | 74 65 73 20 6c 6f 6e 67 |is 10 by|tes long|
|00005e10| 2e 20 20 54 68 65 20 63 | 6f 6e 73 74 61 6e 74 73 |. The c|onstants|
|00005e20| 20 61 2c 62 2c 63 2c 64 | 2c 65 2c 66 20 61 6e 64 | a,b,c,d|,e,f and|
|00005e30| 20 70 0d 09 61 72 65 20 | 64 65 66 69 6e 65 64 20 | p..are |defined |
|00005e40| 74 6f 20 67 69 76 65 20 | 74 68 65 20 70 72 6f 70 |to give |the prop|
|00005e50| 65 72 20 6f 66 66 73 65 | 74 3a 20 20 63 20 33 20 |er offse|t: c 3 |
|00005e60| 67 65 74 20 20 72 65 74 | 75 72 6e 73 20 74 68 65 |get ret|urns the|
|00005e70| 20 63 20 76 61 6c 75 65 | 0d 09 6f 66 20 74 68 65 | c value|..of the|
|00005e80| 20 74 68 69 72 64 20 6d | 61 70 2e 0d 0d 75 70 64 | third m|ap...upd|
|00005e90| 61 74 65 20 20 28 20 76 | 61 6c 75 65 20 6f 66 66 |ate ( v|alue off|
|00005ea0| 73 65 74 20 6d 61 70 23 | 20 2d 2d 20 29 0d 09 50 |set map#| -- )..P|
|00005eb0| 75 74 20 74 68 65 20 76 | 61 6c 75 65 20 69 6e 20 |ut the v|alue in |
|00005ec0| 74 68 65 20 6e 75 6d 62 | 65 72 65 64 20 6d 61 70 |the numb|ered map|
|00005ed0| 20 61 74 20 74 68 65 20 | 6f 66 66 73 65 74 20 28 | at the |offset (|
|00005ee0| 75 73 65 20 20 61 2d 66 | 20 6f 72 20 70 29 2e 0d |use a-f| or p)..|
|00005ef0| 0d 70 72 69 6e 74 20 20 | 28 20 61 64 64 72 20 2d |.print |( addr -|
|00005f00| 2d 20 29 0d 09 50 72 69 | 6e 74 20 74 68 65 20 6d |- )..Pri|nt the m|
|00005f10| 61 70 20 73 74 61 72 74 | 69 6e 67 20 61 74 20 61 |ap start|ing at a|
|00005f20| 64 64 72 2e 0d 0d 77 73 | 69 7a 65 20 20 20 28 20 |ddr...ws|ize ( |
|00005f30| 68 20 76 20 2d 2d 20 29 | 0d 09 52 65 73 69 7a 65 |h v -- )|..Resize|
|00005f40| 20 74 68 65 20 77 69 6e | 64 6f 77 20 74 6f 20 68 | the win|dow to h|
|00005f50| 20 70 69 78 65 6c 73 20 | 68 69 67 68 20 61 6e 64 | pixels |high and|
|00005f60| 20 76 20 70 69 78 65 6c | 73 20 61 63 72 6f 73 73 | v pixel|s across|
|00005f70| 2e 0d 0d 64 6f 74 20 20 | 20 28 20 75 20 76 20 2d |...dot | ( u v -|
|00005f80| 2d 20 29 0d 09 44 72 61 | 77 20 61 20 64 6f 74 20 |- )..Dra|w a dot |
|00005f90| 6f 6e 20 74 68 65 20 73 | 63 72 65 65 6e 20 61 74 |on the s|creen at|
|00005fa0| 20 28 75 2c 76 29 20 28 | 70 69 78 65 6c 73 29 2e | (u,v) (|pixels).|
|00005fb0| 0d 0d 70 6c 6f 74 20 20 | 20 28 20 78 2e 20 79 2e |..plot | ( x. y.|
|00005fc0| 20 2d 2d 20 29 0d 09 50 | 6c 6f 74 20 74 68 65 20 | -- )..P|lot the |
|00005fd0| 70 6f 69 6e 74 20 28 78 | 2c 79 29 20 6f 6e 20 74 |point (x|,y) on t|
|00005fe0| 68 65 20 73 63 72 65 65 | 6e 2e 0d 0d 70 6c 6f 74 |he scree|n...plot|
|00005ff0| 74 6f 20 20 20 28 20 78 | 2e 20 79 2e 20 2d 2d 20 |to ( x|. y. -- |
|00006000| 29 0d 09 44 72 61 77 20 | 61 20 6c 69 6e 65 20 66 |)..Draw |a line f|
|00006010| 72 6f 6d 20 74 68 65 20 | 6c 61 73 74 20 70 6c 6f |rom the |last plo|
|00006020| 74 74 65 64 20 70 6f 69 | 6e 74 20 74 6f 20 28 78 |tted poi|nt to (x|
|00006030| 2c 79 29 2e 0d 0d 64 65 | 74 65 72 6d 69 6e 61 6e |,y)...de|terminan|
|00006040| 74 20 20 28 20 2d 2d 20 | 64 20 29 0d 09 46 69 6e |t ( -- |d )..Fin|
|00006050| 64 20 74 68 65 20 64 65 | 74 65 72 6d 69 6e 61 6e |d the de|terminan|
|00006060| 74 20 6f 66 20 74 68 65 | 20 33 78 33 20 6d 61 74 |t of the| 3x3 mat|
|00006070| 72 69 78 20 77 68 6f 73 | 65 20 76 61 6c 75 65 73 |rix whos|e values|
|00006080| 20 61 72 65 20 73 74 6f | 72 65 64 0d 09 69 6e 20 | are sto|red..in |
|00006090| 74 68 65 20 66 6c 6f 61 | 74 69 6e 67 20 70 6f 69 |the floa|ting poi|
|000060a0| 6e 74 20 76 61 72 69 61 | 62 6c 65 73 20 64 31 20 |nt varia|bles d1 |
|000060b0| 74 68 72 6f 75 67 68 20 | 64 39 2e 20 20 56 61 6c |through |d9. Val|
|000060c0| 75 65 73 20 69 6e 20 74 | 68 65 20 66 6f 72 6d 3a |ues in t|he form:|
|000060d0| 0d 09 5b 20 5b 64 31 2c | 64 32 2c 64 33 5d 2c 5b |..[ [d1,|d2,d3],[|
|000060e0| 64 34 2c 64 35 2c 64 36 | 5d 2e 5b 64 37 2c 64 38 |d4,d5,d6|].[d7,d8|
|000060f0| 2c 64 39 5d 5d 2e 0d 0d | 78 2d 3e 64 20 20 28 20 |,d9]]...|x->d ( |
|00006100| 2d 2d 20 29 0d 09 43 6f | 70 79 20 74 68 65 20 76 |-- )..Co|py the v|
|00006110| 61 6c 75 65 73 20 69 6e | 20 78 31 2c 79 31 20 2e |alues in| x1,y1 .|
|00006120| 2e 20 78 33 2c 79 33 20 | 74 6f 20 74 68 65 20 6d |. x3,y3 |to the m|
|00006130| 61 74 72 69 78 20 64 2e | 20 20 55 73 65 64 20 74 |atrix d.| Used t|
|00006140| 6f 20 73 65 74 75 70 20 | 66 6f 72 0d 09 66 69 6e |o setup |for..fin|
|00006150| 64 69 6e 67 20 61 20 6d | 61 70 2e 0d 0d 78 79 2d |ding a m|ap...xy-|
|00006160| 3e 75 76 20 20 28 20 78 | 2e 20 79 2e 20 2d 2d 20 |>uv ( x|. y. -- |
|00006170| 75 20 76 20 29 0d 09 43 | 68 61 6e 67 65 20 72 65 |u v )..C|hange re|
|00006180| 61 6c 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 20 28 |al coord|inates (|
|00006190| 78 2c 79 29 20 69 6e 74 | 6f 20 73 63 72 65 65 6e |x,y) int|o screen|
|000061a0| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 28 75 2c | coordin|ates (u,|
|000061b0| 76 29 2e 20 20 43 61 6c | 6c 0d 09 66 61 63 74 6f |v). Cal|l..facto|
|000061c0| 72 20 66 69 72 73 74 2e | 0d 0d 66 61 63 74 6f 72 |r first.|..factor|
|000061d0| 20 20 28 20 2d 2d 20 29 | 0d 09 43 61 6c 63 75 6c | ( -- )|..Calcul|
|000061e0| 61 74 65 73 20 72 65 64 | 75 6e 64 61 6e 74 20 66 |ates red|undant f|
|000061f0| 61 63 74 6f 72 73 20 66 | 6f 72 20 78 79 2d 3e 75 |actors f|or xy->u|
|00006200| 76 20 74 6f 20 73 70 65 | 65 64 20 64 72 61 77 69 |v to spe|ed drawi|
|00006210| 6e 67 2e 0d 0d 66 69 72 | 73 74 70 6f 69 6e 74 73 |ng...fir|stpoints|
|00006220| 20 20 28 20 2d 2d 20 29 | 0d 09 47 65 74 20 74 68 | ( -- )|..Get th|
|00006230| 65 20 69 6e 69 74 69 61 | 6c 20 70 6f 69 6e 74 73 |e initia|l points|
|00006240| 20 66 6f 72 20 61 20 6d | 61 70 2c 20 69 6e 74 65 | for a m|ap, inte|
|00006250| 72 61 63 74 69 76 65 2e | 0d 0d 73 6f 6c 76 65 33 |ractive.|..solve3|
|00006260| 78 33 20 20 28 20 2d 2d | 20 66 2e 20 64 2e 20 63 |x3 ( --| f. d. c|
|00006270| 2e 20 65 2e 20 62 2e 20 | 61 2e 20 29 0d 09 53 6f |. e. b. |a. )..So|
|00006280| 6c 76 65 20 66 6f 72 20 | 61 20 6d 61 70 2c 20 63 |lve for |a map, c|
|00006290| 61 6c 63 75 6c 61 74 65 | 64 20 76 61 6c 75 65 73 |alculate|d values|
|000062a0| 20 6f 6e 20 73 74 61 63 | 6b 2e 20 20 43 61 6c 6c | on stac|k. Call|
|000062b0| 20 65 69 74 68 65 72 20 | 66 69 72 73 74 70 6f 69 | either |firstpoi|
|000062c0| 6e 74 73 0d 09 61 6e 64 | 20 69 6d 61 67 65 70 6f |nts..and| imagepo|
|000062d0| 69 6e 74 73 20 6f 72 20 | 69 6e 69 74 69 61 6c 20 |ints or |initial |
|000062e0| 61 6e 64 20 69 6d 61 67 | 65 20 62 65 66 6f 72 65 |and imag|e before|
|000062f0| 20 63 61 6c 6c 69 6e 67 | 20 73 6f 6c 76 65 33 78 | calling| solve3x|
|00006300| 33 2e 0d 0d 6f 75 74 70 | 75 74 6d 61 70 20 20 28 |3...outp|utmap (|
|00006310| 20 66 2e 20 64 2e 20 63 | 2e 20 65 2e 20 62 2e 20 | f. d. c|. e. b. |
|00006320| 61 2e 20 2d 2d 20 29 0d | 09 44 69 73 70 6c 61 79 |a. -- ).|.Display|
|00006330| 20 6d 61 70 20 76 61 6c | 75 65 73 20 6f 6e 20 74 | map val|ues on t|
|00006340| 68 65 20 73 74 61 63 6b | 20 6f 6e 20 74 68 65 20 |he stack| on the |
|00006350| 73 63 72 65 65 6e 2e 0d | 00 00 00 00 00 00 00 00 |screen..|........|
|00006360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006380| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00006390| 6f 72 64 69 6e 61 74 65 | 73 20 28 75 2c 76 29 2e |ordinate|s (u,v).|
|000063a0| 20 20 43 61 6c 6c 0d 09 | 66 61 63 74 6f 72 20 66 | Call..|factor f|
|000063b0| 13 4d 61 6e 75 61 6c 20 | 33 2e 30 20 28 50 61 72 |.Manual |3.0 (Par|
|000063c0| 74 20 32 29 02 00 00 00 | 54 45 58 54 74 74 78 74 |t 2)....|TEXTttxt|
|000063d0| 00 00 54 45 58 54 74 74 | 78 74 01 00 00 70 01 8a |..TEXTtt|xt...p..|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 a9 ad ff c3 00 00 | 62 d8 00 00 01 7e 67 2e |........|b....~g.|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.