home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / armforth / !ARMforth / Manual / WordSpecs < prev   
Encoding:
Text File  |  1989-12-30  |  15.8 KB  |  1,603 lines

  1.                 FORTH WORD SPECS
  2.  
  3. LIT
  4.    ( ... n)
  5.    Not used by any new words, but used by predefined system words.
  6.  
  7.  
  8. EXECUTE
  9.    (addr ... )
  10.  
  11.  
  12. BRANCH
  13.    ( ... )
  14.    Use dependent on SPEED
  15.  
  16.  
  17. 0BRANCH
  18.    (f ... )
  19.    Use dependent on SPEED
  20.  
  21.  
  22. (LOOP)
  23.    ( ... )
  24.    Use dependent on SPEED
  25.  
  26.  
  27. (+LOOP)
  28.    (n ... )
  29.    Use dependent on SPEED
  30.  
  31.  
  32. (DO)
  33.    (n1\n2 ... )
  34.    Use dependent on SPEED
  35.    Saves old values of index and limit on rpp
  36.  
  37.  
  38. I
  39.    Imm/Comp
  40.    ( ... n)
  41.    Plants inline code regardless of SPEED
  42.  
  43.  
  44. J
  45.    Imm/Comp
  46.    ( .. n)
  47.    Plants inline code regardless of SPEED
  48.  
  49.  
  50. DIGIT
  51.    (c\n1 ... n2\tf)
  52.    (c\n1 ... ff)
  53.  
  54.  
  55. (FIND)
  56.    (addr1\addr2 ... cfa\n\tf)
  57.    (addr1\addr2 ... ff)
  58.    Ignores words with smudge bit set
  59.    Actual length of name is left on stack, not manipulated length as in a
  60.    header
  61.  
  62.  
  63. ENCLOSE
  64.    (addr\c ... addr\n1\n2\n3)
  65.  
  66.  
  67. POLL-ESCAPE
  68.    (addr\n ... )
  69.    Called by forth system poll routine after poll.
  70.    addr = address of buffer used by poll
  71.    n    = Reason code returned by Wimp_Poll in R0
  72.  
  73.  
  74. <EMIT>
  75.    (n ... )
  76.    Nowimp EMIT
  77.    Clears top bit of char before printing
  78.  
  79.  
  80. EMIT
  81.    ( ... )
  82.    Vectored
  83.  
  84.  
  85. <WEMIT>
  86.    (n ... )
  87.    Wimp EMIT
  88.    Recognises VDU 7 and VDU 12
  89.  
  90.  
  91. <KEY>
  92.    ( ... n)
  93.    Nowimp KEY
  94.    Does not accept chars < &20 (except &0D), and >= &80
  95.    If escape pressed, jump to QUIT
  96.  
  97.  
  98. <WTYPE>
  99.    (addr\n ... )
  100.    Wimp TYPE
  101.    Clears top bit of byte before printing each char
  102.  
  103.  
  104. <WKEY>
  105.    ( ... n)
  106.    Wimp KEY
  107.  
  108.  
  109. KEY
  110.    ( ... )
  111.    Vectored
  112.  
  113.  
  114. ?TERMINAL
  115.    ( ... f)
  116.    f = 1 if ESCAPE pressed
  117.      = 0 if ESCAPE not pressed
  118.    Only works in Nowimp mode
  119.  
  120.  
  121. CR
  122.    ( ... )
  123.    Outputs CR then LF
  124.  
  125.  
  126. CMOVE
  127.    (addr1\addr2\n)
  128.    Moves as bytes
  129.  
  130.  
  131. U*
  132.    (n1\n2 ... n3)
  133.    No distinction between signed and unsigned
  134.  
  135.  
  136. U/
  137.    (n1\n2 ... n3)
  138.  
  139.  
  140. AND
  141.    (n1\n2 ... n3)
  142.  
  143.  
  144. OR
  145.    (n1\n2 ... n3)
  146.  
  147.  
  148. XOR
  149.    (n1\n2 ... n3)
  150.  
  151.  
  152. SP@
  153.    ( ... addr)
  154.  
  155.  
  156. SP!
  157.    ( ... )
  158.  
  159.  
  160. RP@
  161.    ( ... addr)
  162.  
  163.  
  164. RP!
  165.    ( ... )
  166.  
  167.  
  168. ;S
  169.    Imm
  170.    ( ... )
  171.  
  172.  
  173. LEAVE
  174.    Imm/Comp
  175.    Plants inline code regardless of SPEED
  176.  
  177.  
  178. >R
  179.    (n ... )
  180.  
  181.  
  182. R>
  183.    ( ... n)
  184.  
  185.  
  186. R
  187.    ( ... n)
  188.    Clears flag bits before putting on stack
  189.  
  190.  
  191. >R>
  192.    (n ... n)
  193.    Copies top of sp to rpp
  194.  
  195.  
  196. N>R
  197.    (n1\n2\... ... )
  198.    Copies n1 items from sp to rpp
  199.    n2 will end up on top of rpp
  200.    Assumes n1 >= 1
  201.  
  202.  
  203. R<N
  204.    (n1\n2... ... )
  205.    Copies n1 items from sp to rpp
  206.    n2 is placed on rpp first, so reverse order to N>R
  207.    Assumes n1 >= 1
  208.  
  209.  
  210. 0=
  211.    (n ... f)
  212.  
  213.  
  214. 0<
  215.    (n ... f)
  216.  
  217.  
  218. +
  219.    (n1\n2 ... n3)
  220.  
  221.  
  222. -
  223.    (n1\n2 ... n3)
  224.  
  225.  
  226. OVER
  227.    (n1\n2 ... n1\n2\n1)
  228.  
  229.  
  230. DROP
  231.    Imm
  232.    (n ... )
  233.    If executing, then drop top of stack
  234.    If compiling, compile inline code regardless of SPEED
  235.  
  236.  
  237. SWAP
  238.    (n1\n2 ... n2\n1)
  239.  
  240.  
  241. DUP
  242.    (n1 ... n1\n1)
  243.  
  244.  
  245. 2DROP
  246.    (n1\n2 ... )
  247.  
  248.  
  249. NDROP
  250.    (n1\n2... ... )
  251.    Drops n1 items from stack
  252.  
  253.  
  254. 2DUP
  255.    (n1\n2 ... n1\n2\n1\n2)
  256.  
  257.  
  258. 2OVER
  259.    (n1\n2\n3\n4 ... n1\n2\n3\n4\n1\n2)
  260.  
  261.  
  262. 2SWAP
  263.    (n1\n2\n3\n4 ... n3\n4\n1\n2)
  264.  
  265.  
  266. +!
  267.    (n\addr ... )
  268.  
  269.  
  270. TOGGLE
  271.    (addr\n ... )
  272.  
  273.  
  274. @
  275.    (addr ... n)
  276.    Doesn't clear flag bits before fetching
  277.  
  278.  
  279. C@
  280.    (addr ... n)
  281.  
  282.  
  283. !
  284.    (n\addr ... )
  285.  
  286.  
  287. ><!
  288.    (addr\n ... )
  289.    Same as ! but params reversed
  290.  
  291.  
  292. !++
  293.    (n\addr1 ... addr2)
  294.    addr2 = addr1 + 4
  295.  
  296.  
  297. ><!++
  298.    (addr1\n ... addr2)
  299.    addr2 = addr1 + 4
  300.  
  301.  
  302. C!
  303.    (n\addr ... )
  304.  
  305. ><C!
  306.    (addr\n ... )
  307.    Same as C! but params reversed
  308.  
  309.  
  310. C!++
  311.    (n\addr1 ... addr2)
  312.    addr2 = addr1 + 1
  313.  
  314.  
  315. ><C!++
  316.    (addr1\n ... addr2)
  317.    addr2 = addr1 + 1
  318.  
  319.  
  320. :
  321.    Imm
  322.    ( ... )
  323.  
  324.  
  325. ;
  326.    Imm
  327.    ( ... )
  328.  
  329.  
  330. R:
  331.    Imm
  332.    ( ... )
  333.    Recursive :
  334.    Same as : but smudges after to make word FINDable
  335.  
  336.  
  337. R;
  338.    Imm
  339.    ( ... )
  340.    Recursive ;
  341.    Same as ; but smudges after to make word FINDable
  342.  
  343.  
  344. EXIT
  345.    Imm
  346.    ( ... )
  347.  
  348.  
  349. NOOP
  350.    ( ... )
  351.  
  352.  
  353. CONSTANT
  354.    (n ... )
  355.  
  356.  
  357. ICONSTANT
  358.    (n\addr ... )
  359.    Creates a constant with name of string at addr
  360.  
  361.  
  362. VARIABLE
  363.    (n ... )
  364.  
  365.  
  366. IVARIABLE
  367.    (n\addr ... )
  368.    Creates a variable with name of string at addr
  369.  
  370.  
  371. USER
  372.    (n ... )
  373.  
  374.  
  375. IUSER
  376.    (n\addr ... )
  377.    Creates a user variable with name of string at addr
  378.  
  379.  
  380. BL
  381.    ( ... n)
  382.  
  383.  
  384. C/L
  385.    ( ... n)
  386.  
  387.  
  388. FIRST
  389.    ( ... n)
  390.  
  391.  
  392. LIMIT
  393.    ( ... n)
  394.  
  395.  
  396. B/BUF
  397.    ( ... n)
  398.  
  399.  
  400. B/SCR
  401.    ( ... n)
  402.  
  403.  
  404. S/FILE
  405.    ( ... n)
  406.  
  407.  
  408. +ORIGIN
  409.    (n ... addr)
  410.  
  411.  
  412. S0
  413.    ( ... addr)
  414.  
  415.  
  416. R0
  417.    ( ... addr)
  418.  
  419.  
  420. TIB
  421.    ( ... addr)
  422.  
  423.  
  424. WIDTH
  425.    ( ... addr)
  426.  
  427.  
  428. WARNING
  429.    ( ... addr)
  430.  
  431.  
  432. FENCE
  433.    ( ... addr)
  434.  
  435.  
  436. DP
  437.    ( ... addr)
  438.  
  439.  
  440. VOC-LINK
  441.    ( ... addr)
  442.  
  443.  
  444. BLK
  445.    ( ... addr)
  446.  
  447.  
  448. IN
  449.    ( ... addr)
  450.  
  451.  
  452. OUT
  453.    ( ... addr)
  454.  
  455.  
  456. SCR
  457.    ( ... addr)
  458.  
  459.  
  460. OFFSET
  461.    ( ... addr)
  462.  
  463.  
  464. CONTEXT
  465.    ( ... addr)
  466.  
  467.  
  468. CURRENT
  469.    ( ... addr)
  470.  
  471.  
  472. STATE
  473.    ( ... addr)
  474.  
  475.  
  476. BASE
  477.    ( ... addr)
  478.  
  479.  
  480. DPL
  481.    ( ... addr)
  482.  
  483.  
  484. FLD
  485.    ( ... addr)
  486.  
  487.  
  488. CSP
  489.    ( ... addr)
  490.  
  491.  
  492. R#
  493.    ( ... addr)
  494.  
  495.  
  496. HLD
  497.    ( ... addr)
  498.  
  499.  
  500. SPEED
  501.    ( ... addr)
  502.  
  503.  
  504. 1-
  505.    (n1 ... n2)
  506.  
  507.  
  508. 2-
  509.    (n1 ... n2)
  510.  
  511.  
  512. 1+
  513.    (n1 ... n2)
  514.  
  515.  
  516. 2+
  517.    (n1 ... n2)
  518.  
  519.  
  520. HERE
  521.    ( ... addr)
  522.  
  523.  
  524. ALLOT
  525.    (n ... )
  526.    Doesn't round n before allotting
  527.  
  528.  
  529. ,
  530.    (n ... )
  531.  
  532.  
  533. C,
  534.    (n ... )
  535.  
  536.  
  537. NEGATE
  538.    (n1 ... n2)
  539.  
  540.  
  541. =
  542.    (n1\n2 ... f)
  543.  
  544.  
  545. <
  546.    (n1\n2 ... f)
  547.  
  548.  
  549. >
  550.    (n1\n2 ... f)
  551.  
  552.  
  553. >=
  554.    (n1\n2 ... f)
  555.  
  556.  
  557. <=
  558.    (n1\n2 ... f)
  559.  
  560.  
  561. <>
  562.    (n1\n2 ... f)
  563.  
  564.  
  565. ROT
  566.    (n1\n2\n3 ... n2\n3\n1)
  567.  
  568.  
  569. PICK
  570.    (n1 ... n2)
  571.    n1 must be >= 1
  572.  
  573.  
  574. ROLL
  575.    (n ... )
  576.    n must be >= 2
  577.  
  578.  
  579. INSERT
  580.    (n1\n2 ... )
  581.    n1 = item to be inserted
  582.    n2 = position to insert, must be >= 2
  583.  
  584.  
  585. SHUFFLE
  586.    (n1...\n2 ... )
  587.    n1 = current position of item which will end up as top of stack
  588.    n2 = number to shuffle
  589.    e.g. 23 65 78 12    4 3 2 1   4 SHUFFLE
  590.    results in
  591.         12 78 65 23
  592.  
  593.  
  594. QSHUFFLE
  595.    (n1\n2 ... )
  596.    n1 = shuffle position specifier (each pos is in 4 bit field)
  597.    n2 = number to shuffle
  598.    e.g. HEX 23 65 78 12   4321   4 QSHUFFLE
  599.    results in
  600.         12 78 65 23
  601.  
  602.  
  603. SPACE
  604.    ( ... )
  605.  
  606.  
  607. -DUP
  608.    (n ... n\n)
  609.    (n ... n)
  610.  
  611.  
  612. TRAVERSE
  613.    (addr1\n ... addr2)
  614.    addr2 = address of last byte of name
  615.        or
  616.          = address of nfa
  617.  
  618.  
  619. LATEST
  620.    ( ... n)
  621.  
  622.  
  623. LFA
  624.    (n1 ... n2)
  625.  
  626.  
  627. CFA
  628.    (n1 ... n2)
  629.    No code field, so n1 = n2
  630.  
  631.  
  632. NFA
  633.    (n1 ... n2)
  634.  
  635.  
  636. PFA
  637.    (n1 ... n2)
  638.  
  639.  
  640. !CSP
  641.    ( ... )
  642.  
  643.  
  644. ?ERROR
  645.    (f\n ... )
  646.  
  647.  
  648. ?COMP
  649.    ( ... )
  650.  
  651.  
  652. ?EXEC
  653.    ( ... )
  654.  
  655.  
  656. ?PAIRS
  657.    ( ... )
  658.  
  659.  
  660. ?CSP
  661.    ( ... )
  662.  
  663.  
  664. ?LOADING
  665.    ( ... )
  666.  
  667.  
  668. <?WKEY>
  669.    (n ... f)
  670.    Wimp ?KEY
  671.    n = internal key number of key to be checked
  672.    f = 1 if that key is pressed
  673.      = 0 if that key is not pressed
  674.  
  675.  
  676. <?KEY>
  677.    (n .. f)
  678.    Nowimp ?KEY
  679.    See <?WKEY>
  680.  
  681.  
  682. ?KEY
  683.    ( ... )
  684.    Vectored
  685.  
  686.  
  687. <?WKEYBOARD>
  688.    ( ... n)
  689.    Wimp ?KEYBOARD
  690.    n = internal key number of key pressed (always > 0)
  691.      = 0 if no key pressed
  692.  
  693.  
  694. <?KEYBOARD>
  695.    ( ... n)
  696.    Nowimp ?KEYBOARD
  697.    See <?WKEYBOARD>
  698.  
  699.  
  700. ?KEYBOARD
  701.    ( ... )
  702.    Vectored
  703.  
  704.  
  705. COMPILE
  706.    ( ... )
  707.  
  708.  
  709. [
  710.    Imm
  711.    ( ... )
  712.  
  713.  
  714. ]
  715.    ( ... )
  716.  
  717.  
  718. SMUDGE
  719.    ( ... )
  720.  
  721.  
  722. HEX
  723.    ( ... )
  724.  
  725.  
  726. DECIMAL
  727.    ( ... )
  728.  
  729.  
  730. (;CODE)
  731.    ( ... )
  732.  
  733.  
  734. ;CODE
  735.    Imm
  736.    ( ... )
  737.  
  738.  
  739. <BUILDS
  740.    ( ... )
  741.  
  742.  
  743. <IBUILDS
  744.    (addr ... )
  745.    addr = address of string to be entered into dictionary
  746.  
  747.  
  748. DOES>
  749.    ( ... )
  750.  
  751.  
  752. COUNT
  753.    (addr1 ... addr2\n)
  754.    n = a 32 bit length, not a byte
  755.  
  756.  
  757. <TYPE>
  758.    (addr\n ... )
  759.    Nowimp TYPE
  760.  
  761.  
  762. TYPE
  763.    ( ... )
  764.    Vectored
  765.  
  766.  
  767. -TRAILING
  768.    (addr\n1 ... addr\n2)
  769.    Strips space chars only
  770.  
  771.  
  772. (.")
  773.    ( ... )
  774.  
  775.  
  776. ."
  777.    Imm
  778.    ( ... )
  779.  
  780.  
  781. EXPECT
  782.    (addr\n ... )
  783.    Stores 2 zero bytes after string
  784.  
  785.  
  786. QUERY
  787.    ( ... )
  788.  
  789.  
  790. \0
  791.    ( ... )
  792.  
  793.  
  794. FILL
  795.    (addr\n\b ... )
  796.  
  797.  
  798. ERASE
  799.    (addr\n ... )
  800.  
  801.  
  802. BLANKS
  803.    (addr\n ... )
  804.  
  805.  
  806. HOLD
  807.    (b ... )
  808.  
  809.  
  810. PAD
  811.    ( ... )
  812.  
  813.  
  814. WORD
  815.    (b ... )
  816.  
  817.  
  818. <NUMBER>
  819.    (addr ... n)
  820.  
  821.  
  822. NUMBER
  823.    ( ... )
  824.    Vectored
  825.  
  826.  
  827. -FIND
  828.    ( ... cfa\n\tf)
  829.    ( ... ff)
  830.  
  831.  
  832. -IFIND
  833.    (addr ... cfa\n\tf)
  834.    (addr ... ff)
  835.    addr = address of string containing word to be searched for.
  836.    String is first moved to HERE, and followed by two zero bytes.
  837.  
  838.  
  839. ERROR
  840.    (n ... )
  841.  
  842.  
  843. ESCAPE
  844.    ( ... )
  845.  
  846.  
  847. ID.
  848.    (addr ... )
  849.    Doesn't print word if SMUDGE bit set
  850.    Doesn't print space after word
  851.  
  852.  
  853. <CREATE>
  854.    ( ... )
  855.    Stores a BL to next instruction
  856.  
  857.  
  858. CREATE
  859.    ( ... )
  860.    Vectored
  861.  
  862.  
  863. <ICREATE>
  864.    (addr ... )
  865.    addr = address of string to be created as word
  866.  
  867.  
  868. ICREATE
  869.    ( ... )
  870.    Vectored
  871.  
  872.  
  873. [COMPILE]
  874.    Imm
  875.    ( ... )
  876.  
  877.  
  878. LITERAL
  879.    Imm
  880.    (n ... )
  881.  
  882.  
  883. DLITERAL
  884.    Imm
  885.    (n ... )
  886.    Same as LITERAL
  887.  
  888.  
  889. ?STACK
  890.    ( ... )
  891.  
  892.  
  893. ?PARAMS
  894.    (n ... f)
  895.    f = 1 if req no of items are on stack
  896.    f = 0 if req no of items are not on stack
  897.  
  898.  
  899. INTERPRET
  900.    ( ... )
  901.  
  902.  
  903. IMMEDIATE
  904.    ( ... )
  905.  
  906.  
  907. VOCABULARY
  908.    ( ... )
  909.  
  910.  
  911. FORTH
  912.    Imm
  913.    ( ... )
  914.  
  915.  
  916. DEFINITIONS
  917.    ( ... )
  918.  
  919.  
  920. (
  921.    ( ... )
  922.  
  923.  
  924. QUIT
  925.    ( ... )
  926.    Closes text files first
  927.  
  928.  
  929. <ABORT>
  930.    ( ... )
  931.    Closes text files first
  932.  
  933.  
  934. ABORT
  935.    ( ... )
  936.    Vectored
  937.  
  938.  
  939. WARM
  940.    ( ... )
  941.  
  942.  
  943. COLD
  944.    ( ... )
  945.  
  946.  
  947. <<
  948.    (n1\n2 ... n3)
  949.  
  950.  
  951. >>
  952.    (n1\n2 ... n3)
  953.  
  954.  
  955. >>>
  956.    (n1\n2 ... n3)
  957.    Arithmetic shift
  958.  
  959.  
  960. >><<
  961.    (n1 ... n2)
  962.    Swaps halves of a register
  963.  
  964.  
  965. ><
  966.    (n1 ... n2)
  967.    Swaps halves of a 16 bit value on stack
  968.  
  969.  
  970. +-
  971.    (n1\n2 ... n3)
  972.  
  973.  
  974. D+-
  975.    (n1\n2 ... n3)
  976.    Same as +-
  977.  
  978.  
  979. ABS
  980.    (n1 ... n2)
  981.  
  982.  
  983. DABS
  984.    (n1 ... n2)
  985.    Same as ABS
  986.  
  987.  
  988. MIN
  989.    (n1\n2 ... n3)
  990.  
  991.  
  992. MAX
  993.    (n1\n2 ... n3)
  994.  
  995.  
  996. M*
  997.    (n1\n2 ... n3)
  998.  
  999.  
  1000. M/
  1001.    (n1\n2 ... n3\n4)
  1002.  
  1003.  
  1004. *
  1005.    (n1\n2 ... n3)
  1006.  
  1007.  
  1008. 2*
  1009.    (n1 ... n2)
  1010.  
  1011.  
  1012. 4*
  1013.    (n1 ... n2)
  1014.  
  1015.  
  1016. /MOD
  1017.    (n1\n2 ... n3\n4)
  1018.    Same as M/
  1019.  
  1020.  
  1021. /
  1022.    (n1\n2 ... n3)
  1023.  
  1024.  
  1025. 2/
  1026.    (n1 ... n2)
  1027.  
  1028.  
  1029. 4/
  1030.    (n1 ... n2)
  1031.  
  1032.  
  1033. MOD
  1034.    (n1\n2 ... n3)
  1035.  
  1036.  
  1037. */MOD
  1038.    (n1\n2\n3 ... n4\n5)
  1039.  
  1040.  
  1041. */
  1042.    (n1\n2\n3 ... n4)
  1043.  
  1044.  
  1045. M/MOD
  1046.    (n1\n2 ... n3\n4)
  1047.    Same as U/
  1048.  
  1049.  
  1050. USE
  1051.    ( ... addr)
  1052.  
  1053.  
  1054. PREV
  1055.    ( ... addr)
  1056.  
  1057.  
  1058. +BUF
  1059.    (addr1 ... addr2\f)
  1060.  
  1061.  
  1062. <UPDATE>
  1063.    ( ... )
  1064.  
  1065.  
  1066. UPDATE
  1067.    ( ... )
  1068.    Vectored
  1069.  
  1070.  
  1071. EMPTY-BUFFERS
  1072.    ( ... )
  1073.  
  1074.  
  1075. BUFFER
  1076.    (n ... addr)
  1077.  
  1078.  
  1079. BLOCK
  1080.    (n ... addr)
  1081.  
  1082.  
  1083. (LINE)
  1084.    (n1\n2 ... addr\n3)
  1085.  
  1086.  
  1087. .LINE
  1088.    (n1\n2 ... )
  1089.  
  1090.  
  1091. <MESSAGE>
  1092.    (n ... )
  1093.  
  1094.  
  1095. MESSAGE
  1096.    ( ... )
  1097.    Vectored
  1098.  
  1099.  
  1100. LOAD
  1101.    ( n ... )
  1102.  
  1103.  
  1104. -->
  1105.    ( ... )
  1106.  
  1107.  
  1108. <R/W>
  1109.    (addr\n1\f ... )
  1110.  
  1111.  
  1112. R/W
  1113.    ( ... )
  1114.    Vectored
  1115.  
  1116.  
  1117. FLOAD
  1118.    (addr ... )
  1119.    Interprets the text file whose name is in the string at address addr
  1120.  
  1121.  
  1122. (FLOAD")
  1123.    ( ... )
  1124.    Inline string FLOAD
  1125.  
  1126.  
  1127. FLOAD"
  1128.    ( ... )
  1129.    Interprets file whose name appears immediately after in stream
  1130.  
  1131.  
  1132. '
  1133.    Imm
  1134.    ( ... )
  1135.  
  1136.  
  1137. FORGET
  1138.    ( ... )
  1139.  
  1140.  
  1141. BACK
  1142.    (addr ... )
  1143.  
  1144.  
  1145. BEGIN
  1146.    Imm/Comp
  1147.    ( ... )
  1148.  
  1149.  
  1150. ENDIF
  1151.    Imm/Comp
  1152.    (... )
  1153.    Dependent on SPEED
  1154.  
  1155.  
  1156. THEN
  1157.    Imm/Comp
  1158.    ( ... )
  1159.    Same as ENDIF
  1160.  
  1161.  
  1162. DO
  1163.    Imm/Comp
  1164.    ( ... )
  1165.    Dependent on SPEED
  1166.  
  1167.  
  1168. LOOP
  1169.    Imm/Comp
  1170.    ( ... )
  1171.    Dependent on SPEED
  1172.  
  1173.  
  1174. +LOOP
  1175.    Imm/Comp
  1176.    (n ... )
  1177.    Dependent on SPEED
  1178.  
  1179.  
  1180. UNTIL
  1181.    Imm/Comp
  1182.    (f ... )
  1183.    Dependent on SPEED
  1184.  
  1185.  
  1186. END
  1187.    Imm/Comp
  1188.    (f ... )
  1189.    Same as UNTIL
  1190.  
  1191.  
  1192. AGAIN
  1193.    Imm/Comp
  1194.    ( ... )
  1195.    Dependent on SPEED
  1196.  
  1197.  
  1198. REPEAT
  1199.    Imm/Comp
  1200.    ( ... )
  1201.    Dependent on SPEED
  1202.  
  1203.  
  1204. IF
  1205.    Imm/Comp
  1206.    (f ... )
  1207.    Dependent on SPEED
  1208.  
  1209.  
  1210. ELSE
  1211.    Imm/Comp
  1212.    ( ... )
  1213.    Dependent on SPEED
  1214.  
  1215.  
  1216. WHILE
  1217.    Imm/Comp
  1218.    ( ... )
  1219.    Dependent on SPEED
  1220.  
  1221.  
  1222. SPACES
  1223.    (n ... )
  1224.  
  1225.  
  1226. <#
  1227.    ( ... )
  1228.  
  1229.  
  1230. #>
  1231.    (n1 ... addr\n2)
  1232.  
  1233.  
  1234. SIGN
  1235.    (n1\n2 ... n2)
  1236.  
  1237.  
  1238. #
  1239.    (n1 ... n2)
  1240.  
  1241.  
  1242. #S
  1243.    (n1 ... n2)
  1244.  
  1245.  
  1246. .R
  1247.    (n1\n2 ... )
  1248.  
  1249.  
  1250. .
  1251.    (n ... )
  1252.  
  1253.  
  1254. DEC.
  1255.    (n ... )
  1256.  
  1257.  
  1258. H.
  1259.    (n ... )
  1260.  
  1261.  
  1262. DEPTH
  1263.    ( ... n)
  1264.  
  1265.  
  1266. ?
  1267.    (addr ... )
  1268.  
  1269.  
  1270. LIST
  1271.    (n ... )
  1272.  
  1273.  
  1274. INDEX
  1275.    (n1\n2 ... )
  1276.  
  1277.  
  1278. TRIAD
  1279.    (n ... )
  1280.  
  1281.  
  1282. VLIST
  1283.    ( ... )
  1284.    Space pauses listing
  1285.    While paused, pressing TAB abandons listing.
  1286.    Any other key continues listing
  1287.  
  1288.  
  1289. CREATE-SCREEN
  1290.    (n ... )
  1291.    n = number of screen to be created.
  1292.    If file containing this screen does not exist it will be created,
  1293.    else read/write error
  1294.  
  1295.  
  1296. .S
  1297.    ( ... )
  1298.  
  1299.  
  1300. (OSCLI)
  1301.    ( ... )
  1302.    Inline string version of OSCLI
  1303.  
  1304.  
  1305. <WOSCLI>
  1306.    (addr\n ... )
  1307.    Wimp OSCLI
  1308.    addr = address of string
  1309.    n = length of string
  1310.  
  1311.  
  1312. <OSCLI>
  1313.    (addr\n ... )
  1314.    Nowimp OSCLI
  1315.    addr = address of string
  1316.    n = length of string
  1317.  
  1318.  
  1319. OSCLI
  1320.    ( ... )
  1321.    Vectored
  1322.  
  1323.  
  1324. OSCLI"
  1325.    Imm
  1326.    String follows immediately in input stream
  1327.  
  1328.  
  1329. EXVEC:
  1330.    Imm
  1331.    ( ... )
  1332.  
  1333.  
  1334. ASSIGN
  1335.    ( ... )
  1336.  
  1337.  
  1338. TO-DO
  1339.     (addr ... )
  1340.  
  1341.  
  1342. CASE:
  1343.    Imm
  1344.    ( ... )
  1345.    e.g.
  1346.    CASE: ROB
  1347.          ACTION0 ACTION1 ACTION2 ACTION3
  1348.    CASE;
  1349.  
  1350.  
  1351. CASE;
  1352.    Imm
  1353.    ( ... )
  1354.  
  1355.  
  1356. PCASE:
  1357.    Imm
  1358.    ( ... )
  1359.    e.g.
  1360.    PCASE: ROB
  1361.           5 ACTION1 62 ACTION2 19 ACTION3
  1362.    PCASE;
  1363.  
  1364.  
  1365. PLOT
  1366.    (n1\n2\n3 ... )
  1367.  
  1368.  
  1369. .ERROR
  1370.    (addr ... )
  1371.    Prints "Error x s"
  1372.    where x = [addr]
  1373.    s = text found at addr + 4
  1374.  
  1375.  
  1376. NOWIMPS
  1377.    ( ... )
  1378.    Enters Mode 0
  1379.  
  1380.  
  1381. WIMPS
  1382.    ( ... )
  1383.    Enters Wimp environment
  1384.  
  1385.  
  1386. .RS
  1387.    ( ... )
  1388.    Prints return stack
  1389.  
  1390.  
  1391. HIDE
  1392.    ( ... )
  1393.    Makes word appearing in input stream unFINDable by SMUDGing
  1394.  
  1395.  
  1396. CREATE-PROG
  1397.    ( ... )
  1398.    (n ... )
  1399.    (n1\n2 ... )
  1400.    (n1\n2\n3 ... )
  1401.    (n1\n2\n3\n4 ... )
  1402.  
  1403.    Creates a standalone program
  1404.    Top of stack is program type i.e.
  1405.    1 - normal Forth entry, icon appears on icon bar
  1406.    2 - No main window shown
  1407.        ABORT not called
  1408.        run_addr called
  1409.        stack: load_addr\run_addr
  1410.    3 - Main window shown
  1411.        ABORT not called
  1412.        run_addr called
  1413.        stack: load_addr\run_addr
  1414.    4 - normal Forth entry
  1415.        No Wimp environment
  1416.        stack: load_addr
  1417.    5 - No Wimp environment
  1418.        ABORT not called
  1419.        run_addr called
  1420.        stack: load_addr\run_addr
  1421.    6 - No Wimp environment
  1422.        normal Forth entry
  1423.        Mode init_mode
  1424.        stack: load_addr\init_mode
  1425.    7 - No Wimp environment
  1426.        ABORT not called
  1427.        run_addr called
  1428.        Mode init_mode
  1429.        stack: load_addr\init_mode\run_addr
  1430.  
  1431.  
  1432. NODEBUG
  1433.    ( ... )
  1434.  
  1435.  
  1436. DEBUG
  1437.    (n1\n2 ... )
  1438.    n2 - bit 0 = 0 hex stack print
  1439.               = 1 decimal stack print
  1440.         bit 1 = 0 no return stack print
  1441.               = 1 return stack print (hex)
  1442.         bit 2 = 1 pause after stack print for left alt key press
  1443.    n1 = delay between word prints ( 0 fastest )
  1444.  
  1445.  
  1446. TASK:
  1447.    Imm
  1448.    ( ... )
  1449.    Defines a task word
  1450.    This word contains calls to other words as normal,
  1451.    but may contain calls to PAUSE to invoke other task words
  1452.  
  1453.  
  1454. TASK;
  1455.    Imm
  1456.    ( ... )
  1457.    Paired with TASK:
  1458.  
  1459.  
  1460. TEX:
  1461.    Imm
  1462.    ( ... )
  1463.    Used to define a normal forth word which contains invocation of task words
  1464.    This word must consist of triplets, the first item being the size of
  1465.    the computation stack, the second the size of the return stack
  1466.    (both in long words), followed by the task word
  1467.    When the word defined by TEX: is executed, it starts the first task word
  1468.    defined in its body running, thereafter the execution sequence is
  1469.    determined by the bodies of the task words.
  1470.  
  1471.  
  1472. TEX;
  1473.    Imm
  1474.    ( ... )
  1475.    Paired with TEX:
  1476.    Task example
  1477.  
  1478.    TASK: T1 ." T1 FIRST " PAUSE ." T1 SECOND " TASK;
  1479.    TASK: T2 ." T2 FIRST " PAUSE ." T2 SECOND " TASK;
  1480.    TEX: AT 100 100 T1 100 100 T2 TEX;
  1481.  
  1482.    TASK: OT1 ." OT1 FIRST " AT PAUSE ." OT1 SECOND " TASK;
  1483.    TASK: OT2 ." OT2 FIRST " PAUSE ." OT2 SECOND " TASK;
  1484.  
  1485.    TEX: AT2 100 100 OT1 100 100 OT2 TEX;
  1486.  
  1487.    : TT AT2 CR ." FINISHED " CR ;
  1488.  
  1489.  
  1490. PAUSE
  1491.    ( ... )
  1492.    suspend current task and continue with next task in sequence
  1493.    if there are any.
  1494.  
  1495. STRING
  1496.    (n ... )
  1497.    n = max size of string in bytes
  1498.    Followed by name of string
  1499.  
  1500.  
  1501. STRING[]
  1502.    (n1\n2 ... )
  1503.    Defines two dimensional string
  1504.    n1 = number of strings
  1505.    n2 = max length of each string
  1506.    Followed by name of string
  1507.  
  1508.  
  1509. ARRAY
  1510.    (n ... )
  1511.    n = number of elements
  1512.    Followed by name of string
  1513.  
  1514.  
  1515. ARRAY[]
  1516.    (n1\n2 ... )
  1517.    Defines two dimensional array
  1518.    n1 = first dimension
  1519.    n2 = second dimension
  1520.    Followed by name of string
  1521.  
  1522.  
  1523. .STR
  1524.    (addr ... )
  1525.    addr = address of string
  1526.    Prints string at address addr
  1527.  
  1528.  
  1529. STRLEN
  1530.    (addr ... )
  1531.    addr = address of string
  1532.    Returns length of string at addr
  1533.  
  1534.  
  1535. STRCPY
  1536.    (addr1\addr2 ... )
  1537.    addr1 = address of dest string
  1538.    addr2 = address of source string
  1539.    Copies source to dest
  1540.    Does not check if string will fit
  1541.  
  1542.  
  1543. (STRCPY")
  1544.    (addr ... )
  1545.    addr = address of dest string
  1546.    Copies inline string to dest
  1547.  
  1548.  
  1549. STRCPY"
  1550.    Imm
  1551.    (addr ... )
  1552.    addr = address of dest string
  1553.    Followed by string to copy to dest
  1554.  
  1555.  
  1556. STRCAT
  1557.    (addr1\addr2 ... )
  1558.    addr1 = address of dest string
  1559.    addr2 = address of source string
  1560.    Concatenates source to dest
  1561.    Does not check if string will fit
  1562.  
  1563.  
  1564. (STRCAT")
  1565.    (addr ... )
  1566.    addr = address of dest string
  1567.    Concatenates inline string to dest
  1568.  
  1569.  
  1570. STRCAT"
  1571.    Imm
  1572.    (addr ... )
  1573.    addr = address of dest string
  1574.    Followed by string to concatenate to dest
  1575.  
  1576.  
  1577. STRCMP
  1578.    (addr1\addr2 ... f)
  1579.    addr1 = address of dest string
  1580.    addr2 = address of source string
  1581.    Compares source to dest
  1582.    f = 0 if string same
  1583.    f = 1 if strings different
  1584.  
  1585. (STRCAT")
  1586.    (addr ... f)
  1587.    addr = address of dest string
  1588.    Compares inline string to dest
  1589.    f = 0 if string same
  1590.    f = 1 if strings different
  1591.  
  1592.  
  1593. STRCAT"
  1594.    Imm
  1595.    (addr ... f)
  1596.    addr = address of dest string
  1597.    Followed by string to compare to dest
  1598.    f = 0 if string same
  1599.    f = 1 if strings different
  1600.  
  1601.  
  1602.  
  1603.