DPANS6.HTM (90211B)
1 <HTML><HEAD> 2 <TITLE>DPANS94</TITLE> 3 <link disabled rel="stylesheet" href="mpexc6.css"> 4 <style>@import url(mpexc6.css);</style> 5 </head> 6 7 <BODY> 8 <table width=100%> 9 <tr> 10 <td align=left> 11 <a href=dpans5.htm><img src=left.gif 12 width=26 height=26 align=ALIGN border=0></a> 13 <a href=dpans7.htm><img src=right.gif 14 width=26 height=26 align=ALIGN border=0></a> 15 </td> 16 <td align=right> 17 <a href=dpans.htm#toc><img src=up.gif 18 width=26 height=26 align=ALIGN border=0></a> 19 <a name=6.>Table of Contents</a> 20 </td> 21 </tr> 22 </table> 23 <p> 24 <hr size=4> 25 26 <H1>6. Glossary</H1> 27 28 <code><p> 29 See: 30 <a href=dpansa6.htm#A.6>A.6</a> Glossary 31 <p> 32 </code> 33 34 <hr> 35 <A name=6.1></A> 36 <H2>6.1 Core words</H2> 37 </a> 38 39 40 41 <hr> 42 <A name=6.1.0010> 43 <code> 44 6.1.0010 <B>!</B> 45 </code> 46 </a> 47 <BR> 48 <B>store</B> CORE 49 <BR> 50 <pre> 51 ( x a-addr -- ) 52 </pre> 53 <P> 54 55 Store x at 56 a-addr. 57 58 <P> 59 60 <code> 61 See: 62 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 63 </code> 64 65 <P> 66 67 <hr> 68 <A name=6.1.0030> 69 <code> 70 6.1.0030 <B>#</B> 71 </code> 72 </a> 73 <BR> 74 <B>number-sign</B> CORE 75 <br> 76 <pre> 77 ( ud1 -- ud2 ) 78 </pre> 79 <P> 80 81 Divide ud1 by the number in 82 <a href=dpans6.htm#6.1.0750>BASE</a> 83 giving the quotient ud2 and the 84 remainder n. (n is the least-significant digit of ud1.) Convert n to 85 external form and add the resulting character to the beginning of the 86 pictured numeric output string. An ambiguous condition exists if # 87 executes outside of a 88 <a href=dpans6.htm#6.1.0490><#</a> 89 <a href=dpans6.htm#6.1.0040>#></a> 90 delimited number conversion. 91 92 <P> 93 94 <code> 95 See: 96 <A href=dpans6.htm#6.1.0050>6.1.0050 #S</a> 97 </code> 98 99 <P> 100 101 <hr> 102 <A name=6.1.0040> 103 <code> 104 6.1.0040 <B>#></B> 105 </code> 106 </a> 107 <BR> 108 <B>number-sign-greater</B> CORE 109 <BR> 110 <pre> 111 ( xd -- c-addr u ) 112 </pre> 113 114 <P> 115 116 Drop xd. Make the pictured numeric output string available as a 117 character string. c-addr and u specify the resulting character string. 118 A program may replace characters within the string. 119 120 <P> 121 122 <code> 123 See: 124 <A href=dpans6.htm#6.1.0030>6.1.0030 #</a> , 125 <A href=dpans6.htm#6.1.0050>6.1.0050 #S</a> , 126 <A href=dpans6.htm#6.1.0490>6.1.0490 <#</a> 127 </code> 128 129 <P> 130 131 <hr> 132 <A name=6.1.0050> 133 <code> 134 6.1.0050 <B>#S</B> 135 </code> 136 </a> 137 <BR> 138 <B>number-sign-s</B> CORE 139 <BR> 140 <pre> 141 ( ud1 -- ud2 ) 142 </pre> 143 144 <P> 145 146 Convert one digit of ud1 according to the rule for 147 <a href=dpans6.htm#6.1.0030>#</a>. Continue 148 conversion until the quotient is zero. ud2 is zero. An ambiguous 149 condition exists if #S executes outside of a 150 <a href=dpans6.htm#6.1.0490><#</a> 151 <a href=dpans6.htm#6.1.0040>#></a> 152 delimited number 153 conversion. 154 155 <P> 156 157 158 <hr> 159 <A name=6.1.0070> 160 <code> 161 6.1.0070 <B>'</B> 162 </code> 163 </a> 164 <BR> 165 <B>tick</B> CORE 166 <BR> 167 <pre> 168 ( <B>"<spaces>name"</B> -- xt ) 169 </pre> 170 171 <P> 172 173 Skip leading space delimiters. Parse name delimited by a space. Find 174 name and return xt, the execution token for name. An ambiguous 175 condition exists if name is not found. 176 177 <P> 178 179 When interpreting, <b><code>' xyz EXECUTE</code></b> is equivalent to xyz. 180 181 <P> 182 183 <code> 184 See: 185 <A href=dpans3.htm#3.4>3.4</a> The Forth text interpreter, 186 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 187 <A href=dpansa6.htm#A.6.1.2033>A.6.1.2033 POSTPONE</a> , 188 <A href=dpans6.htm#6.1.2510>6.1.2510 [']</a> , 189 <a href=dpansa6.htm#A.6.1.0070>A.6.1.0070 '</a> , 190 <A href=dpansd.htm#D.6.7>D.6.7</a> Immediacy. 191 </code> 192 193 <P> 194 195 <hr> 196 <A name=6.1.0080> 197 <code> 198 6.1.0080 <B>(</B> 199 </code> 200 </a> 201 <BR> 202 <B>paren</B> CORE 203 <BR> 204 205 <P> 206 <pre> 207 Compilation: Perform the execution semantics given below. 208 </pre> 209 <P> 210 <pre> 211 Execution: ( <B>"ccc<paren>"</B> -- ) 212 </pre> 213 <P> 214 215 Parse ccc delimited by ) 216 (right parenthesis). ( is an immediate word. 217 218 <P> 219 220 The number of characters in ccc may be zero to the number of characters 221 in the parse area. 222 223 <P> 224 225 <code> 226 See: 227 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 228 <A href=dpans11.htm#11.6.1.0080>11.6.1.0080 (</a> , 229 <a href=dpansa6.htm#A.6.1.0080>A.6.1.0080 (</a> 230 </code> 231 232 <P> 233 234 <hr> 235 <A name=6.1.0090> 236 <code> 237 6.1.0090 <B>*</B> 238 </code> 239 </a> 240 <BR> 241 <B>star</B> CORE 242 <BR> 243 <pre> 244 ( n1|u1 n2|u2 -- n3|u3 ) 245 </pre> 246 247 <P> 248 249 Multiply n1|u1 by n2|u2 250 giving the product n3|u3. 251 252 <P> 253 254 <hr> 255 <A name=6.1.0100> 256 <code> 257 6.1.0100 <B>*/</B> 258 </code> 259 </a> 260 <BR> 261 <B>star-slash</B> CORE 262 <BR> 263 <pre> 264 ( n1 n2 n3 -- n4 ) 265 </pre> 266 267 <P> 268 269 Multiply n1 by n2 producing the intermediate double-cell result d. 270 Divide d by n3 giving the single-cell quotient n4. An ambiguous 271 condition exists if n3 is zero or if the quotient n4 lies outside the 272 range of a signed number. If d and n3 differ in sign, the 273 implementation-defined result returned will be the same as that returned 274 by either the phrase 275 <b><code> 276 >R M* R> FM/MOD SWAP DROP 277 </code></b> 278 or the phrase 279 <b><code> 280 >R M* R> SM/REM SWAP DROP 281 </code></b>. 282 283 <P> 284 285 <code> 286 See: 287 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division 288 </code> 289 290 <P> 291 292 <hr> 293 <A name=6.1.0110> 294 <code> 295 6.1.0110 <B>*/MOD</B> 296 </code> 297 </a> 298 <BR> 299 <B>star-slash-mod</B> CORE 300 <BR> 301 <pre> 302 ( n1 n2 n3 -- n4 n5 ) 303 </pre> 304 305 <P> 306 307 Multiply n1 by n2 producing the intermediate double-cell result d. Divide d 308 by n3 producing the single-cell remainder n4 and the single-cell quotient n5. 309 An ambiguous condition exists if n3 is zero, or if the quotient n5 lies 310 outside the range of a single-cell signed integer. If d and n3 differ in 311 sign, the implementation-defined result returned will be the same as that 312 returned by either the phrase 313 <b><code> 314 >R M* R> FM/MOD 315 </code></b> 316 or the phrase 317 <b><code> 318 >R M* R> SM/REM 319 </code></b>. 320 321 <P> 322 323 <code> 324 See: 325 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division 326 </code> 327 328 <P> 329 330 <hr> 331 <A name=6.1.0120> 332 <code> 333 6.1.0120 <B>+</B> 334 </code> 335 </a> 336 <BR> 337 <B>plus</B> CORE 338 <BR> 339 <pre> 340 ( n1|u1 n2|u2 -- n3|u3 ) 341 </pre> 342 343 <P> 344 345 Add n2|u2 346 to n1|u1, giving the sum n3|u3. 347 348 <P> 349 350 <code> 351 See: 352 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 353 </code> 354 355 <P> 356 357 <hr> 358 <A name=6.1.0130> 359 <code> 360 6.1.0130 <B>+!</B> 361 </code> 362 </a> 363 <BR> 364 <B>plus-store</B> CORE 365 <BR> 366 <pre> 367 ( n|u a-addr -- ) 368 </pre> 369 370 <P> 371 372 Add n|u 373 to the single-cell number at a-addr. 374 375 <P> 376 377 <code> 378 See: 379 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 380 </code> 381 382 <P> 383 384 <hr> 385 <A name=6.1.0140> 386 <code> 387 6.1.0140 <B>+LOOP</B> 388 </code> 389 </a> 390 <BR> 391 <B>plus-loop</B> CORE 392 <BR> 393 394 <P> 395 <pre> 396 Interpretation: Interpretation semantics for this word are undefined. 397 </pre> 398 <P> 399 <pre> 400 Compilation: ( C: do-sys -- ) 401 </pre> 402 <P> 403 404 Append the run-time semantics given below to the current definition. 405 Resolve the destination of all unresolved occurrences of 406 <a href=dpans6.htm#6.1.1760>LEAVE</a> between 407 the location given by do-sys and the next location for a transfer of 408 control, to execute the words following +LOOP. 409 <P> 410 <pre> 411 Run-time: ( n -- ) ( R: loop-sys1 -- | loop-sys2 ) 412 </pre> 413 <P> 414 415 An ambiguous condition exists if the loop control parameters are 416 unavailable. Add n to the loop index. If the loop index did not cross 417 the boundary between the loop limit minus one and the loop limit, 418 continue execution at the beginning of the loop. Otherwise, discard the 419 current loop control parameters and continue execution immediately 420 following the loop. 421 422 <P> 423 424 <code> 425 See: 426 <A href=dpans6.htm#6.1.1240>6.1.1240 DO</a> , 427 <A href=dpans6.htm#6.1.1680>6.1.1680 I</a> , 428 <A href=dpans6.htm#6.1.1760>6.1.1760 LEAVE</a> , 429 <a href=dpansa6.htm#A.6.1.0140>A.6.1.0140 +LOOP</a> 430 </code> 431 432 <P> 433 434 <hr> 435 <A name=6.1.0150> 436 <code> 437 6.1.0150 <B>,</B> 438 </code> 439 </a> 440 <BR> 441 <B>comma</B> CORE 442 <BR> 443 <pre> 444 ( x -- ) 445 </pre> 446 447 <P> 448 449 Reserve one cell of data space and store x in the cell. If the data-space 450 pointer is aligned when , begins execution, it will remain aligned when , 451 finishes execution. An ambiguous condition exists if the data-space pointer 452 is not aligned prior to execution of ,. 453 454 <P> 455 456 <code> 457 See: 458 <A href=dpans3.htm#3.3.3>3.3.3</a> Data space, 459 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment, 460 <a href=dpansa6.htm#A.6.1.0150>A.6.1.0150 ,</a> 461 </code> 462 463 464 <P> 465 466 <hr> 467 <A name=6.1.0160> 468 <code> 469 6.1.0160 <B>-</B> 470 </code> 471 </a> 472 <BR> 473 <B>minus</B> CORE 474 <BR> 475 <pre> 476 ( n1|u1 n2|u2 -- n3|u3 ) 477 </pre> 478 479 <P> 480 481 Subtract n2|u2 482 from n1|u1, giving the difference n3|u3. 483 484 <P> 485 486 <code> 487 See: 488 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment. 489 </code> 490 491 492 <P> 493 494 <hr> 495 <A name=6.1.0180> 496 <code> 497 6.1.0180 <B>.</B> 498 </code> 499 </a> 500 <BR> 501 <B>dot</B> CORE 502 <BR> 503 <pre> 504 ( n -- ) 505 </pre> 506 507 <P> 508 509 Display n in 510 free field format. 511 512 <P> 513 514 <code> 515 See: 516 <A href=dpans3.htm#3.2.1.2>3.2.1.2</a> Digit conversion, 517 <A href=dpans3.htm#3.2.1.3>3.2.1.3</a> Free-field number display. 518 </code> 519 520 <P> 521 522 <hr> 523 <A name=6.1.0190> 524 <code> 525 6.1.0190 <B>."</B> 526 </code> 527 </a> 528 <BR> 529 <B>dot-quote</B> CORE 530 <BR> 531 532 <P> 533 <pre> 534 Interpretation: Interpretation semantics for this word are undefined. 535 </pre> 536 <P> 537 <pre> 538 Compilation: ( <B>"ccc<quote>"</B> -- ) 539 </pre> 540 <P> 541 542 Parse ccc delimited by " (double-quote). Append the run-time semantics 543 given below to the current definition. 544 545 546 <PRE> 547 Run-time: ( -- ) 548 </PRE> 549 550 <P> 551 552 Display 553 ccc. 554 555 <P> 556 557 <code> 558 See: 559 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 560 <A href=dpans6.htm#6.2.0200>6.2.0200 .(</a> , 561 <a href=dpansa6.htm#A.6.1.0190>A.6.1.0190 ."</a> 562 </code> 563 564 <P> 565 566 <hr> 567 <A name=6.1.0230> 568 <code> 569 6.1.0230 <B>/</B> 570 </code> 571 </a> 572 <BR> 573 <B>slash</B> CORE 574 <BR> 575 <pre> 576 ( n1 n2 -- n3 ) 577 </pre> 578 579 <P> 580 581 Divide n1 by n2, giving the single-cell quotient n3. An ambiguous 582 condition exists if n2 is zero. If n1 and n2 differ in sign, the 583 implementation-defined result returned will be the same as that returned 584 by either the phrase 585 <b><code> 586 >R S>D R> FM/MOD SWAP DROP 587 </code></b> 588 or the phrase 589 <b><code> 590 >R S>D R> SM/REM SWAP DROP 591 </code></b>. 592 593 <P> 594 595 <code> 596 See: 597 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division 598 </code> 599 600 <P> 601 602 <hr> 603 <A name=6.1.0240> 604 <code> 605 6.1.0240 <B>/MOD</B> 606 </code> 607 </a> 608 <BR> 609 <B>slash-mod</B> CORE 610 <BR> 611 <pre> 612 ( n1 n2 -- n3 n4 ) 613 </pre> 614 615 <P> 616 617 Divide n1 by n2, giving the single-cell remainder n3 and the single-cell 618 quotient n4. An ambiguous condition exists if n2 is zero. If n1 and n2 619 differ in sign, the implementation-defined result returned will be the 620 same as that returned by either the phrase 621 <b><code> 622 >R S>D R> FM/MOD 623 </code></b> 624 or the phrase 625 <b><code> 626 >R S>D R> SM/REM 627 </code></b>. 628 629 <P> 630 631 <code> 632 See: 633 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division 634 </code> 635 636 <P> 637 638 <hr> 639 <A name=6.1.0250> 640 <code> 641 6.1.0250 <B>0<</B> 642 </code> 643 </a> 644 <BR> 645 <B>zero-less</B> CORE 646 <BR> 647 <pre> 648 ( n -- flag ) 649 </pre> 650 651 <P> 652 653 flag is true 654 if and only if n is less than zero. 655 656 <P> 657 658 <hr> 659 <A name=6.1.0270> 660 <code> 661 6.1.0270 <B>0=</B> 662 </code> 663 </a> 664 <BR> 665 <B>zero-equals</B> CORE 666 <BR> 667 <pre> 668 ( x -- flag ) 669 </pre> 670 671 <P> 672 673 flag is 674 true if and only if x is equal to zero. 675 676 <P> 677 678 <hr> 679 <A name=6.1.0290> 680 <code> 681 6.1.0290 <B>1+</B> 682 </code> 683 </a> 684 <BR> 685 <B>one-plus</B> CORE 686 <BR> 687 <pre> 688 ( n1|u1 -- n2|u2 ) 689 </pre> 690 691 <P> 692 693 Add one (1) 694 to n1|u1 giving the sum n2|u2. 695 696 <P> 697 698 <hr> 699 <A name=6.1.0300> 700 <code> 701 6.1.0300 <B>1-</B> 702 </code> 703 </a> 704 <BR> 705 <B>one-minus</B> CORE 706 <BR> 707 <pre> 708 ( n1|u1 -- n2|u2 ) 709 </pre> 710 711 <P> 712 713 Subtract one (1) 714 from n1|u1 giving the difference n2|u2. 715 716 <P> 717 718 <hr> 719 <A name=6.1.0310> 720 <code> 721 6.1.0310 <B>2!</B> 722 </code> 723 </a> 724 <BR> 725 <B>two-store</B> CORE 726 <BR> 727 <pre> 728 ( x1 x2 a-addr -- ) 729 </pre> 730 731 <P> 732 733 Store the cell pair x1 x2 at a-addr, with x2 at a-addr and x1 at the next 734 consecutive cell. It is equivalent to the sequence 735 <b><code> 736 SWAP OVER ! CELL+ ! 737 </code></b>. 738 739 <P> 740 741 <code> 742 See: 743 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 744 </code> 745 746 <P> 747 748 <hr> 749 <A name=6.1.0320> 750 <code> 751 6.1.0320 <B>2*</B> 752 </code> 753 </a> 754 <BR> 755 <B>two-star</B> CORE 756 <BR> 757 <pre> 758 ( x1 -- x2 ) 759 </pre> 760 761 <P> 762 763 x2 is the result of shifting x1 one bit toward the most-significant bit, 764 filling the vacated least-significant bit with zero. 765 766 <P> 767 <code> 768 See: 769 <a href=dpansa6.htm#A.6.1.0320>A.6.1.0320 2*</a> 770 </code> 771 <p> 772 773 <hr> 774 <A name=6.1.0330> 775 <code> 776 6.1.0330 <B>2/</B> 777 </code> 778 </a> 779 <BR> 780 <B>two-slash</B> CORE 781 <BR> 782 <pre> 783 ( x1 -- x2 ) 784 </pre> 785 786 <P> 787 788 x2 is the result of shifting x1 one bit toward the least-significant 789 bit, leaving the most-significant bit unchanged. 790 791 <P> 792 <code> 793 See: 794 <a href=dpansa6.htm#A.6.1.0330>A.6.1.0330 2/</a> 795 </code> 796 <p> 797 798 <hr> 799 <A name=6.1.0350> 800 <code> 801 6.1.0350 <B>2@</B> 802 </code> 803 </a> 804 <BR> 805 <B>two-fetch</B> CORE 806 <BR> 807 <pre> 808 ( a-addr -- x1 x2 ) 809 </pre> 810 811 <P> 812 813 Fetch the cell pair x1 x2 stored at a-addr. x2 is stored at a-addr and 814 x1 at the next consecutive cell. It is equivalent to the sequence 815 <b><code> 816 DUP CELL+ @ SWAP @ 817 </code></b>. 818 819 <P> 820 821 <code> 822 See: 823 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment, 824 <A href=dpans6.htm#6.1.0310>6.1.0310 2!</a> , 825 <a href=dpansa6.htm#A.6.1.0350>A.6.1.0350 2@</a> 826 </code> 827 828 <P> 829 830 <hr> 831 <A name=6.1.0370> 832 <code> 833 6.1.0370 <B>2DROP</B> 834 </code> 835 </a> 836 <BR> 837 <B>two-drop</B> CORE 838 <BR> 839 <pre> 840 ( x1 x2 -- ) 841 </pre> 842 843 <P> 844 845 Drop cell 846 pair x1 x2 from the stack. 847 848 <P> 849 850 <hr> 851 <A name=6.1.0380> 852 <code> 853 6.1.0380 <B>2DUP</B> 854 </code> 855 </a> 856 <BR> 857 <B>two-dupe</B> CORE 858 <BR> 859 <pre> 860 ( x1 x2 -- x1 x2 x1 x2 ) 861 </pre> 862 863 <P> 864 865 Duplicate cell 866 pair x1 x2. 867 868 <P> 869 870 <hr> 871 <A name=6.1.0400> 872 <code> 873 6.1.0400 <B>2OVER</B> 874 </code> 875 </a> 876 <BR> 877 <B>two-over</B> CORE 878 <BR> 879 <pre> 880 ( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 ) 881 </pre> 882 883 <P> 884 885 Copy cell 886 pair x1 x2 to the top of the stack. 887 888 <P> 889 890 <hr> 891 <A name=6.1.0430> 892 <code> 893 6.1.0430 <B>2SWAP</B> 894 </code> 895 </a> 896 <BR> 897 <B>two-swap</B> CORE 898 <BR> 899 <pre> 900 ( x1 x2 x3 x4 -- x3 x4 x1 x2 ) 901 </pre> 902 903 <P> 904 905 Exchange the 906 top two cell pairs. 907 908 <P> 909 910 <hr> 911 <A name=6.1.0450> 912 <code> 913 6.1.0450 <B>:</B> 914 </code> 915 </a> 916 <BR> 917 <B>colon</B> CORE 918 <BR> 919 <pre> 920 ( C: <B>"<spaces>name"</B> -- colon-sys ) 921 </pre> 922 923 <P> 924 925 Skip leading space delimiters. Parse name delimited by a space. Create 926 a definition for name, called a <B>colon definition</B>. Enter 927 compilation state and start the current definition, producing colon-sys. 928 Append the initiation semantics given below to the current definition. 929 930 <P> 931 932 The execution semantics of name will be determined by the words compiled 933 into the body of the definition. The current definition shall not be 934 findable in the dictionary until it is ended (or until the execution of 935 <a href=dpans6.htm#6.1.1250>DOES></a> 936 in some systems). 937 <P> 938 <pre> 939 Initiation: ( i*x -- i*x ) ( R: -- nest-sys ) 940 </pre> 941 <P> 942 943 Save implementation-dependent information nest-sys about the calling 944 definition. The stack effects i*x represent arguments to name. 945 946 <P> 947 <pre> 948 <i>name</i> Execution: ( i*x -- j*x ) 949 </pre> 950 <P> 951 952 Execute the definition name. The stack effects i*x and j*x represent 953 arguments to and results from name, respectively. 954 955 <P> 956 957 <code> 958 See: 959 <A href=dpans3.htm#3.4>3.4</a> The Forth text interpreter, 960 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 961 <A href=dpans3.htm#3.4.5>3.4.5</a> Compilation, 962 <A href=dpans6.htm#6.1.2500>6.1.2500 [</a> , 963 <A href=dpans6.htm#6.1.2540>6.1.2540 ]</a> , 964 <A href=dpans15.htm#15.6.2.0470>15.6.2.0470 ;CODE</a> , 965 <a href=dpansa6.htm#A.6.1.0450>A.6.1.0450 :</a> , 966 <a href=a0005.htm>RFI 0005</a> Initiation semantics. 967 </code> 968 969 970 <P> 971 972 <hr> 973 <A name=6.1.0460> 974 <code> 975 6.1.0460 <B>;</B> 976 </code> 977 </a> 978 <BR> 979 <B>semicolon</B> CORE 980 <BR> 981 982 <P> 983 <pre> 984 Interpretation: Interpretation semantics for this word are undefined. 985 </pre> 986 <P> 987 <pre> 988 Compilation: ( C: colon-sys -- ) 989 </pre> 990 <P> 991 992 Append the run-time semantics below to the current definition. End the 993 current definition, allow it to be found in the dictionary and enter 994 interpretation state, consuming colon-sys. If the data-space pointer is 995 not aligned, reserve enough data space to align it. 996 997 <P> 998 <pre> 999 Run-time: ( -- ) ( R: nest-sys -- ) 1000 </pre> 1001 <P> 1002 1003 Return to 1004 the calling definition specified by nest-sys. 1005 1006 <P> 1007 1008 <code> 1009 See: 1010 <A href=dpans3.htm#3.4>3.4</a> The Forth text interpreter, 1011 <A href=dpans3.htm#3.4.5>3.4.5</a> Compilation, 1012 <a href=dpansa6.htm#A.6.1.0460>A.6.1.0460 ;</a> 1013 </code> 1014 1015 <P> 1016 1017 <hr> 1018 <A name=6.1.0480> 1019 <code> 1020 6.1.0480 <B><</B> 1021 </code> 1022 </a> 1023 <BR> 1024 <B>less-than</B> CORE 1025 <BR> 1026 <pre> 1027 ( n1 n2 -- flag ) 1028 </pre> 1029 1030 <P> 1031 1032 flag is 1033 true if and only if n1 is less than n2. 1034 1035 <P> 1036 1037 <code> 1038 See: 1039 <A href=dpans6.htm#6.1.2340>6.1.2340 U<</a> 1040 </code> 1041 1042 <P> 1043 1044 <hr> 1045 <A name=6.1.0490> 1046 <code> 1047 6.1.0490 <B><#</B> 1048 </code> 1049 </a> 1050 <BR> 1051 <B>less-number-sign</B> CORE 1052 <BR> 1053 <pre> 1054 ( -- ) 1055 </pre> 1056 1057 <P> 1058 1059 Initialize the 1060 pictured numeric output conversion process. 1061 1062 <P> 1063 1064 <code> 1065 See: 1066 <A href=dpans6.htm#6.1.0030>6.1.0030 #</a> , 1067 <A href=dpans6.htm#6.1.0040>6.1.0040 #></a> , 1068 <A href=dpans6.htm#6.1.0050>6.1.0050 #S</a> 1069 </code> 1070 1071 <P> 1072 1073 <hr> 1074 <A name=6.1.0530> 1075 <code> 1076 6.1.0530 <B>=</B> 1077 </code> 1078 </a> 1079 <BR> 1080 <B>equals</B> CORE 1081 <BR> 1082 <pre> 1083 ( x1 x2 -- flag ) 1084 </pre> 1085 1086 <P> 1087 1088 flag is true 1089 if and only if x1 is bit-for-bit the same as x2. 1090 1091 <P> 1092 1093 <hr> 1094 <A name=6.1.0540> 1095 <code> 1096 6.1.0540 <B>></B> 1097 </code> 1098 </a> 1099 <BR> 1100 <B>greater-than</B> CORE 1101 <BR> 1102 <pre> 1103 ( n1 n2 -- flag ) 1104 </pre> 1105 1106 <P> 1107 1108 flag is true 1109 if and only if n1 is greater than n2. 1110 1111 <P> 1112 1113 <code> 1114 See: 1115 <A href=dpans6.htm#6.2.2350>6.2.2350 U></a> 1116 </code> 1117 1118 <P> 1119 1120 <hr> 1121 <A name=6.1.0550> 1122 <code> 1123 6.1.0550 <B>>BODY</B> 1124 </code> 1125 </a> 1126 <BR> 1127 <B>to-body</B> CORE 1128 <BR> 1129 <pre> 1130 ( xt -- a-addr ) 1131 </pre> 1132 1133 <P> 1134 1135 a-addr is the data-field address corresponding to xt. An ambiguous 1136 condition exists if xt is not for a word defined via 1137 <a href=dpans6.htm#6.1.1000>CREATE</a>. 1138 1139 <P> 1140 1141 <code> 1142 See: 1143 <A href=dpans3.htm#3.3.3>3.3.3</a> Data space, 1144 <a href=dpansa6.htm#A.6.1.0550>A.6.1.0550 >BODY</a> 1145 </code> 1146 1147 1148 <P> 1149 1150 <hr> 1151 <A name=6.1.0560> 1152 <code> 1153 6.1.0560 <B>>IN</B> 1154 </code> 1155 </a> 1156 <BR> 1157 <B>to-in</B> CORE 1158 <BR> 1159 <pre> 1160 ( -- a-addr ) 1161 </pre> 1162 1163 <P> 1164 1165 a-addr is the address of a cell containing the offset in characters from 1166 the start of the input buffer to the start of the parse area. 1167 1168 <P> 1169 1170 <hr> 1171 <A name=6.1.0570> 1172 <code> 1173 6.1.0570 <B>>NUMBER</B> 1174 </code> 1175 </a> 1176 <BR> 1177 <B>to-number</B> CORE 1178 <BR> 1179 <pre> 1180 ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 ) 1181 </pre> 1182 1183 <P> 1184 1185 ud2 is the unsigned result of converting the characters within the 1186 string specified by c-addr1 u1 into digits, using the number in 1187 <a href=dpans6.htm#6.1.0750>BASE</a>, 1188 and adding each into ud1 after multiplying ud1 by the number in BASE. 1189 Conversion continues left-to-right until a character that is not 1190 convertible, including any <B>+</B> or <B>-</B>, is encountered or the 1191 string is entirely converted. c-addr2 is the location of the first 1192 unconverted character or the first character past the end of the string 1193 if the string was entirely converted. u2 is the number of unconverted 1194 characters in the string. An ambiguous condition exists if ud2 1195 overflows during the conversion. 1196 1197 <P> 1198 1199 <code> 1200 See: 1201 <A href=dpans3.htm#3.2.1.2>3.2.1.2</a> Digit conversion 1202 </code> 1203 1204 <P> 1205 1206 <hr> 1207 <A name=6.1.0580> 1208 <code> 1209 6.1.0580 <B>>R</B> 1210 </code> 1211 </a> 1212 <BR> 1213 <B>to-r</B> CORE 1214 <BR> 1215 1216 <P> 1217 <pre> 1218 Interpretation: Interpretation semantics for this word are undefined. 1219 </pre> 1220 <P> 1221 <pre> 1222 Execution: ( x -- ) ( R: -- x ) 1223 </pre> 1224 <P> 1225 1226 Move x to 1227 the return stack. 1228 1229 <P> 1230 1231 <code> 1232 See: 1233 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 1234 <A href=dpans6.htm#6.1.2060>6.1.2060 R></a> , 1235 <A href=dpans6.htm#6.1.2070>6.1.2070 R@</a> , 1236 <A href=dpans6.htm#6.2.0340>6.2.0340 2>R</a> , 1237 <A href=dpans6.htm#6.2.0410>6.2.0410 2R></a> , 1238 <A href=dpans6.htm#6.2.0415>6.2.0415 2R@</a> 1239 </code> 1240 <P> 1241 1242 <hr> 1243 <A name=6.1.0630> 1244 <code> 1245 6.1.0630 <B>?DUP</B> 1246 </code> 1247 </a> 1248 <BR> 1249 <B>question-dupe</B> CORE 1250 <BR> 1251 <pre> 1252 ( x -- 0 | x x ) 1253 </pre> 1254 1255 <P> 1256 1257 Duplicate x 1258 if it is non-zero. 1259 1260 <P> 1261 1262 <hr> 1263 <A name=6.1.0650> 1264 <code> 1265 6.1.0650 <B>@</B> 1266 </code> 1267 </a> 1268 <BR> 1269 <B>fetch</B> CORE 1270 <BR> 1271 <pre> 1272 ( a-addr -- x ) 1273 </pre> 1274 1275 <P> 1276 1277 x is the 1278 value stored at a-addr. 1279 1280 <P> 1281 1282 <code> 1283 See: 1284 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 1285 </code> 1286 1287 <P> 1288 1289 <hr> 1290 <A name=6.1.0670> 1291 <code> 1292 6.1.0670 <B>ABORT</B> 1293 </code> 1294 </a> 1295 <BR> 1296 CORE 1297 <BR> 1298 <pre> 1299 ( i*x -- ) ( R: j*x -- ) 1300 </pre> 1301 1302 <P> 1303 1304 Empty the data stack and perform the function of 1305 <a href=dpans6.htm#6.1.2050>QUIT</a>, which includes 1306 emptying the return stack, without displaying a message. 1307 1308 <P> 1309 1310 <code> 1311 See: 1312 <A href=dpans9.htm#9.6.2.0670>9.6.2.0670 ABORT</a> 1313 </code> 1314 1315 <P> 1316 1317 <hr> 1318 <A name=6.1.0680> 1319 <code> 1320 6.1.0680 <B>ABORT"</B> 1321 </code> 1322 </a> 1323 <BR> 1324 <B>abort-quote</B> CORE 1325 <BR> 1326 1327 <P> 1328 <pre> 1329 Interpretation: Interpretation semantics for this word are undefined. 1330 </pre> 1331 <P> 1332 <pre> 1333 Compilation: ( <B>"ccc<quote>"</B> -- ) 1334 </pre> 1335 <P> 1336 1337 Parse ccc delimited by a " (double-quote). Append the run-time semantics 1338 given below to the current definition. 1339 1340 <p> 1341 <pre> 1342 Run-time: ( i*x x1 -- | i*x ) ( R: j*x -- | j*x ) 1343 </pre> 1344 <P> 1345 1346 Remove x1 from the stack. If any bit of x1 is not zero, display ccc and 1347 perform an implementation-defined abort sequence that includes the 1348 function of 1349 <a href=dpans6.htm#6.1.0670>ABORT</a>. 1350 1351 <P> 1352 1353 <code> 1354 See: 1355 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 1356 <A href=dpans9.htm#9.6.2.0680>9.6.2.0680 ABORT"</a> , 1357 <a href=dpansa6.htm#A.6.1.0680>A.6.1.0680 ABORT"</a> 1358 </code> 1359 1360 <P> 1361 1362 <hr> 1363 <A name=6.1.0690> 1364 <code> 1365 6.1.0690 <B>ABS</B> 1366 </code> 1367 </a> 1368 <BR> 1369 <B>abs</B> CORE 1370 <BR> 1371 <pre> 1372 ( n -- u ) 1373 </pre> 1374 1375 <P> 1376 1377 u is the 1378 absolute value of n. 1379 1380 <P> 1381 1382 <hr> 1383 <A name=6.1.0695> 1384 <code> 1385 6.1.0695 <B>ACCEPT</B> 1386 </code> 1387 </a> 1388 <BR> 1389 CORE 1390 <pre> 1391 ( c-addr +n1 -- +n2 ) 1392 </pre> 1393 1394 <P> 1395 1396 Receive a string of at most +n1 characters. An ambiguous condition 1397 exists if +n1 is zero or greater than 32,767. Display graphic 1398 characters as they are received. A program that depends on the presence 1399 or absence of non-graphic characters in the string has an environmental 1400 dependency. The editing functions, if any, that the system performs in 1401 order to construct the string are implementation-defined. 1402 1403 <P> 1404 1405 Input terminates when an implementation-defined line terminator is 1406 received. When input terminates, nothing is appended to the string, and 1407 the display is maintained in an implementation-defined way. 1408 1409 <P> 1410 1411 +n2 is the 1412 length of the string stored at c-addr. 1413 1414 <P> 1415 <code> 1416 See: 1417 <a href=dpansa6.htm#A.6.1.0695>A.6.1.0695 ACCEPT</a> 1418 </code> 1419 <p> 1420 1421 <hr> 1422 <A name=6.1.0705> 1423 <code> 1424 6.1.0705 <B>ALIGN</B> 1425 </code> 1426 </a> 1427 <BR> 1428 CORE 1429 <BR> 1430 <pre> 1431 ( -- ) 1432 </pre> 1433 1434 <P> 1435 1436 If the data-space pointer is not aligned, reserve enough space to align 1437 it. 1438 1439 <P> 1440 1441 <code> 1442 See: 1443 <A href=dpans3.htm#3.3.3>3.3.3</a> Data space, 1444 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment, 1445 <a href=dpansa6.htm#A.6.1.0705>A.6.1.0705 ALIGN</a> 1446 </code> 1447 1448 1449 <P> 1450 1451 <hr> 1452 <A name=6.1.0706> 1453 <code> 1454 6.1.0706 <B>ALIGNED</B> 1455 </code> 1456 </a> 1457 <BR> 1458 CORE 1459 <BR> 1460 <pre> 1461 ( addr -- a-addr ) 1462 </pre> 1463 1464 <P> 1465 1466 a-addr 1467 is the first aligned address greater than or equal to addr. 1468 1469 <P> 1470 1471 <code> 1472 See: 1473 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment, 1474 <a href=dpans6.htm#6.1.0705>6.1.0705 ALIGN</a> 1475 </code> 1476 1477 1478 <P> 1479 1480 <hr> 1481 <A name=6.1.0710> 1482 <code> 1483 6.1.0710 <B>ALLOT</B> 1484 </code> 1485 </a> 1486 <BR> 1487 CORE 1488 <BR> 1489 <pre> 1490 ( n -- ) 1491 </pre> 1492 1493 <P> 1494 1495 If n is greater than zero, reserve n address units of data space. If n 1496 is less than zero, release |n| address units of data space. If n is 1497 zero, leave the data-space pointer unchanged. 1498 1499 <P> 1500 1501 If the data-space pointer is aligned and n is a multiple of the size of 1502 a cell when ALLOT begins execution, it will remain aligned when ALLOT 1503 finishes execution. 1504 1505 <P> 1506 1507 If the data-space pointer is character aligned and n is a multiple of 1508 the size of a character when ALLOT begins execution, it will remain 1509 character aligned when ALLOT finishes execution. 1510 1511 <P> 1512 1513 <code> 1514 See: 1515 <A href=dpans3.htm#3.3.3>3.3.3</a> Data space 1516 </code> 1517 1518 <P> 1519 1520 <hr> 1521 <A name=6.1.0720> 1522 <code> 1523 6.1.0720 <B>AND</B> 1524 </code> 1525 </a> 1526 <BR> 1527 CORE 1528 <BR> 1529 <pre> 1530 ( x1 x2 -- x3 ) 1531 </pre> 1532 1533 <P> 1534 1535 x3 is 1536 the bit-by-bit logical <B>and</B> of x1 with x2. 1537 1538 <P> 1539 1540 <hr> 1541 <A name=6.1.0750> 1542 <code> 1543 6.1.0750 <B>BASE</B> 1544 </code> 1545 </a> 1546 <BR> 1547 CORE 1548 <BR> 1549 <pre> 1550 ( -- a-addr ) 1551 </pre> 1552 1553 <P> 1554 1555 a-addr is the address of a cell containing the current number-conversion 1556 radix {{2...36}}. 1557 1558 <P> 1559 1560 <hr> 1561 <A name=6.1.0760> 1562 <code> 1563 6.1.0760 <B>BEGIN</B> 1564 </code> 1565 </a> 1566 <BR> 1567 CORE 1568 <BR> 1569 1570 <P> 1571 <pre> 1572 Interpretation: Interpretation semantics for this word are undefined. 1573 </pre> 1574 <P> 1575 <pre> 1576 Compilation: ( C: -- dest ) 1577 </pre> 1578 <P> 1579 1580 Put the next location for a transfer of control, dest, onto the control 1581 flow stack. Append the run-time semantics given below to the current 1582 definition. 1583 1584 <P> 1585 <pre> 1586 Run-time: ( -- ) 1587 </pre> 1588 <P> 1589 1590 Continue 1591 execution. 1592 1593 <P> 1594 1595 <code> 1596 See: 1597 <A href=dpans3.htm#3.2.3.2>3.2.3.2</a> Control-flow stack, 1598 <A href=dpans6.htm#6.1.2140>6.1.2140 REPEAT</a> , 1599 <A href=dpans6.htm#6.1.2390>6.1.2390 UNTIL</a> , 1600 <A href=dpans6.htm#6.1.2430>6.1.2430 WHILE</a> , 1601 <a href=dpansa6.htm#A.6.1.0760>A.6.1.0760 BEGIN</a> 1602 </code> 1603 1604 <P> 1605 1606 <hr> 1607 <A name=6.1.0770> 1608 <code> 1609 6.1.0770 <B>BL</B> 1610 </code> 1611 </a> 1612 <BR> 1613 <B>b-l</B> CORE 1614 <BR> 1615 <pre> 1616 ( -- char ) 1617 </pre> 1618 1619 <P> 1620 1621 char is 1622 the character value for a space. 1623 1624 <P> 1625 <code> 1626 See: 1627 <a href=dpansa6.htm#A.6.1.0770>A.6.1.0770 BL</a> 1628 </code> 1629 <p> 1630 1631 <hr> 1632 <A name=6.1.0850> 1633 <code> 1634 6.1.0850 <B>C!</B> 1635 </code> 1636 </a> 1637 <BR> 1638 <B>c-store</B> CORE 1639 <BR> 1640 <pre> 1641 ( char c-addr -- ) 1642 </pre> 1643 1644 <P> 1645 1646 Store char at c-addr. When character size is smaller than cell size, 1647 only the number of low-order bits corresponding to character size are 1648 transferred. 1649 1650 <P> 1651 1652 <code> 1653 See: 1654 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 1655 </code> 1656 1657 <P> 1658 1659 <hr> 1660 <A name=6.1.0860> 1661 <code> 1662 6.1.0860 <B>C,</B> 1663 </code> 1664 </a> 1665 <BR> 1666 <B>c-comma</B> CORE 1667 <BR> 1668 <pre> 1669 ( char -- ) 1670 </pre> 1671 1672 <P> 1673 1674 Reserve space for one character in the data space and store char in the 1675 space. If the data-space pointer is character aligned when C, begins 1676 execution, it will remain character aligned when C, finishes execution. 1677 An ambiguous condition exists if the data-space pointer is not 1678 character-aligned prior to execution of C,. 1679 1680 <P> 1681 1682 <code> 1683 See: 1684 <A href=dpans3.htm#3.3.3>3.3.3</a> Data space, 1685 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment. 1686 </code> 1687 1688 <P> 1689 1690 <hr> 1691 <A name=6.1.0870> 1692 <code> 1693 6.1.0870 <B>C@</B> 1694 </code> 1695 </a> 1696 <BR> 1697 <B>c-fetch</B> CORE 1698 <BR> 1699 <pre> 1700 ( c-addr -- char ) 1701 </pre> 1702 1703 <P> 1704 1705 Fetch the character stored at c-addr. When the cell size is greater 1706 than character size, the unused high-order bits are all zeroes. 1707 1708 <P> 1709 1710 <code> 1711 See: 1712 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 1713 </code> 1714 1715 <P> 1716 1717 <hr> 1718 <A name=6.1.0880> 1719 <code> 1720 6.1.0880 <B>CELL+</B> 1721 </code> 1722 </a> 1723 <BR> 1724 CORE 1725 <BR> 1726 <pre> 1727 ( a-addr1 -- a-addr2 ) 1728 </pre> 1729 1730 <P> 1731 1732 Add the 1733 size in address units of a cell to a-addr1, giving a-addr2. 1734 1735 <P> 1736 1737 <code> 1738 See: 1739 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment, 1740 <a href=dpansa6.htm#A.6.1.0880>A.6.1.0880 CELL+</a> 1741 </code> 1742 1743 1744 <P> 1745 1746 <hr> 1747 <A name=6.1.0890> 1748 <code> 1749 6.1.0890 <B>CELLS</B> 1750 </code> 1751 </a> 1752 <BR> 1753 CORE 1754 <BR> 1755 <pre> 1756 ( n1 -- n2 ) 1757 </pre> 1758 1759 <P> 1760 1761 n2 is 1762 the size in address units of n1 cells. 1763 1764 <P> 1765 <code> 1766 See: 1767 <a href=dpansa6.htm#A.6.1.0890>A.6.1.0890 CELLS</a> 1768 </code> 1769 <p> 1770 1771 <hr> 1772 <A name=6.1.0895> 1773 <code> 1774 6.1.0895 <B>CHAR</B> 1775 </code> 1776 </a> 1777 <BR> 1778 <B>char</B> CORE 1779 <BR> 1780 <pre> 1781 ( <B>"<spaces>name"</B> -- char ) 1782 </pre> 1783 1784 <P> 1785 1786 Skip leading 1787 space delimiters. Parse name delimited by a space. Put the 1788 value of its first character onto the stack. 1789 1790 <P> 1791 1792 <code> 1793 See: 1794 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 1795 <A href=dpans6.htm#6.1.2520>6.1.2520 [CHAR]</a> , 1796 <a href=dpansa6.htm#A.6.1.0895>A.6.1.0895 CHAR</a> 1797 </code> 1798 1799 <P> 1800 1801 <hr> 1802 <A name=6.1.0897> 1803 <code> 1804 6.1.0897 <B>CHAR+</B> 1805 </code> 1806 </a> 1807 <BR> 1808 <B>char-plus</B> CORE 1809 <BR> 1810 <pre> 1811 ( c-addr1 -- c-addr2 ) 1812 </pre> 1813 1814 <P> 1815 1816 Add the 1817 size in address units of a character to c-addr1, giving c-addr2. 1818 1819 <P> 1820 1821 <code> 1822 See: 1823 <A href=dpans3.htm#3.3.3.1>3.3.3.1</a> Address alignment 1824 </code> 1825 1826 <P> 1827 1828 <hr> 1829 <A name=6.1.0898> 1830 <code> 1831 6.1.0898 <B>CHARS</B> 1832 </code> 1833 </a> 1834 <BR> 1835 <B>chars</B> CORE 1836 <BR> 1837 <pre> 1838 ( n1 -- n2 ) 1839 </pre> 1840 1841 <P> 1842 1843 n2 is 1844 the size in address units of n1 characters. 1845 1846 1847 <P> 1848 1849 <hr> 1850 <A name=6.1.0950> 1851 <code> 1852 6.1.0950 <B>CONSTANT</B> 1853 </code> 1854 </a> 1855 <BR> 1856 CORE 1857 <BR> 1858 <pre> 1859 ( x <B>"<spaces>name"</B> -- ) 1860 </pre> 1861 1862 <P> 1863 1864 Skip leading 1865 space delimiters. Parse name delimited by a space. Create a 1866 definition for name with the execution semantics defined below. 1867 1868 <P> 1869 1870 name is 1871 referred to as a <B>constant</B>. 1872 1873 <P> 1874 <pre> 1875 <i>name</i> Execution: ( -- x ) 1876 </pre> 1877 <P> 1878 1879 Place x 1880 on the stack. 1881 1882 <P> 1883 1884 <code> 1885 See: 1886 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 1887 <a href=dpansa6.htm#A.6.1.0950>A.6.1.0950 CONSTANT</a> 1888 </code> 1889 1890 <P> 1891 1892 <hr> 1893 <A name=6.1.0980> 1894 <code> 1895 6.1.0980 <B>COUNT</B> 1896 </code> 1897 </a> 1898 <BR> 1899 CORE 1900 <BR> 1901 <pre> 1902 ( c-addr1 -- c-addr2 u ) 1903 </pre> 1904 1905 <P> 1906 1907 Return the 1908 character string specification for the counted string stored at 1909 c-addr1. c-addr2 is the address of the first character after c-addr1. u is 1910 the contents of the character at c-addr1, which is the length in characters of 1911 the string at c-addr2. 1912 1913 <P> 1914 1915 <hr> 1916 <A name=6.1.0990> 1917 <code> 1918 6.1.0990 <B>CR</B> 1919 </code> 1920 </a> 1921 <BR> 1922 <B>c-r</B> CORE 1923 <BR> 1924 <pre> 1925 ( -- ) 1926 </pre> 1927 1928 <P> 1929 1930 Cause subsequent 1931 output to appear at the beginning of the next line. 1932 1933 <P> 1934 1935 <hr> 1936 <A name=6.1.1000> 1937 <code> 1938 6.1.1000 <B>CREATE</B> 1939 </code> 1940 </a> 1941 <BR> 1942 CORE 1943 <BR> 1944 <pre> 1945 ( <B>"<spaces>name"</B> -- ) 1946 </pre> 1947 1948 <P> 1949 1950 Skip leading 1951 space delimiters. Parse name delimited by a space. Create a 1952 definition for name with the execution semantics defined below. If the 1953 data-space pointer is not aligned, reserve enough data space to align it. The 1954 new data-space pointer defines name's data field. CREATE does not allocate 1955 data space in name's data field. 1956 1957 <P> 1958 <pre> 1959 <i>name</i> Execution: ( -- a-addr ) 1960 </pre> 1961 <P> 1962 1963 a-addr is the address of name's data field. The execution semantics of name 1964 may be extended by using 1965 <a href=dpans6.htm#6.1.1250>DOES></a>. 1966 1967 <P> 1968 1969 <code> 1970 See: 1971 <A href=dpans3.htm#3.3.3>3.3.3</a> Data space, 1972 <a href=dpansa6.htm#A.6.1.1000>A.6.1.1000 CREATE</a> 1973 </code> 1974 1975 <P> 1976 1977 <hr> 1978 <A name=6.1.1170> 1979 <code> 1980 6.1.1170 <B>DECIMAL</B> 1981 </code> 1982 </a> 1983 <BR> 1984 CORE 1985 <BR> 1986 <pre> 1987 ( -- ) 1988 </pre> 1989 1990 <P> 1991 1992 Set the 1993 numeric conversion radix to ten (decimal). 1994 1995 <P> 1996 1997 <hr> 1998 <A name=6.1.1200> 1999 <code> 2000 6.1.1200 <B>DEPTH</B> 2001 </code> 2002 </a> 2003 <BR> 2004 CORE 2005 <BR> 2006 <pre> 2007 ( -- +n ) 2008 </pre> 2009 2010 <P> 2011 2012 +n is the number of single-cell values contained in the data stack 2013 before +n was placed on the stack. 2014 2015 <P> 2016 2017 <hr> 2018 <A name=6.1.1240> 2019 <code> 2020 6.1.1240 <B>DO</B> 2021 </code> 2022 </a> 2023 <BR> 2024 CORE 2025 <BR> 2026 2027 <P> 2028 <pre> 2029 Interpretation: Interpretation semantics for this word are undefined. 2030 </pre> 2031 <P> 2032 <pre> 2033 Compilation: ( C: -- do-sys ) 2034 </pre> 2035 <P> 2036 2037 Place do-sys onto the control-flow stack. Append the run-time semantics 2038 given below to the current definition. The semantics are incomplete 2039 until resolved by a consumer of do-sys such as 2040 <a href=dpans6.htm#6.1.1800>LOOP</a>. 2041 2042 <P> 2043 <pre> 2044 Run-time: ( n1|u1 n2|u2 -- ) ( R: -- loop-sys ) 2045 </pre> 2046 <P> 2047 2048 Set up loop control parameters with index n2|u2 and limit n1|u1. An 2049 ambiguous condition exists if n1|u1 and n2|u2 are not both the same 2050 type. Anything already on the return stack becomes unavailable until 2051 the loop-control parameters are discarded. 2052 2053 <P> 2054 2055 <code> 2056 See: 2057 <A href=dpans3.htm#3.2.3.2>3.2.3.2</a> Control-flow stack, 2058 <A href=dpans6.htm#6.1.0140>6.1.0140 +LOOP</a> , 2059 <a href=dpansa6.htm#A.6.1.1240>A.6.1.1240 DO</a> 2060 </code> 2061 2062 <P> 2063 2064 <hr> 2065 <A name=6.1.1250> 2066 <code> 2067 6.1.1250 <B>DOES></B> 2068 </code> 2069 </a> 2070 <BR> 2071 <B>does</B> CORE 2072 <BR> 2073 2074 <P> 2075 <pre> 2076 Interpretation: Interpretation semantics for this word are undefined. 2077 </pre> 2078 <P> 2079 <pre> 2080 Compilation: ( C: colon-sys1 -- colon-sys2 ) 2081 </pre> 2082 <P> 2083 2084 Append the run-time semantics below to the current definition. Whether 2085 or not the current definition is rendered findable in the dictionary by 2086 the compilation of DOES> is implementation defined. Consume 2087 colon-sys1 and produce colon-sys2. Append the initiation semantics 2088 given below to the current definition. 2089 2090 <P> 2091 <pre> 2092 Run-time: ( -- ) ( R: nest-sys1 -- ) 2093 </pre> 2094 <P> 2095 2096 Replace the execution semantics of the most recent definition, referred 2097 to as name, with the name execution semantics given below. Return 2098 control to the calling definition specified by nest-sys1. An ambiguous 2099 condition exists if name was not defined with 2100 <a href=dpans6.htm#6.1.1000>CREATE</a> 2101 or a user-defined 2102 word that calls CREATE. 2103 2104 <P> 2105 <pre> 2106 Initiation: ( i*x -- i*x a-addr ) ( R: -- nest-sys2 ) 2107 </pre> 2108 <P> 2109 2110 Save implementation-dependent information nest-sys2 about the calling 2111 definition. Place name's data field address on the stack. The stack 2112 effects i*x represent arguments to name. 2113 2114 <P> 2115 <pre> 2116 <i>name</i> Execution: ( i*x -- j*x ) 2117 </pre> 2118 <P> 2119 2120 Execute the portion of the definition that begins with the initiation 2121 semantics appended by the DOES> which modified name. The stack 2122 effects i*x and j*x represent arguments to and results from name, 2123 respectively. 2124 2125 <P> 2126 2127 <code> 2128 See: 2129 <a href=dpansa6.htm#A.6.1.1250>A.6.1.1250 DOES></a> , 2130 <a href=a0003.htm>RFI 0003</a> Defining words etc., 2131 <a href=a0005.htm>RFI 0005</a> Initiation semantics. 2132 </code> 2133 2134 <P> 2135 2136 <hr> 2137 <A name=6.1.1260> 2138 <code> 2139 6.1.1260 <B>DROP</B> 2140 </code> 2141 </a> 2142 <BR> 2143 CORE 2144 <BR> 2145 <pre> 2146 ( x -- ) 2147 </pre> 2148 2149 <P> 2150 2151 Remove x 2152 from the stack. 2153 2154 <P> 2155 2156 <hr> 2157 <A name=6.1.1290> 2158 <code> 2159 6.1.1290 <B>DUP</B> 2160 </code> 2161 </a> 2162 <BR> 2163 <B>dupe</B> CORE 2164 <BR> 2165 <pre> 2166 ( x -- x x ) 2167 </pre> 2168 2169 <P> 2170 2171 Duplicate 2172 x. 2173 2174 <P> 2175 2176 <hr> 2177 <A name=6.1.1310> 2178 <code> 2179 6.1.1310 <B>ELSE</B> 2180 </code> 2181 </a> 2182 <BR> 2183 CORE 2184 <BR> 2185 2186 <P> 2187 <pre> 2188 Interpretation: Interpretation semantics for this word are undefined. 2189 </pre> 2190 <P> 2191 <pre> 2192 Compilation: ( C: orig1 -- orig2 ) 2193 </pre> 2194 <P> 2195 2196 Put the location of a new unresolved forward reference orig2 onto the 2197 control flow stack. Append the run-time semantics given below to the 2198 current definition. The semantics will be incomplete until orig2 is 2199 resolved (e.g., by 2200 <a href=dpans6.htm#6.1.2270>THEN</a>). 2201 Resolve the forward reference orig1 using the 2202 location following the appended run-time semantics. 2203 2204 <P> 2205 <pre> 2206 Run-time: ( -- ) 2207 </pre> 2208 <P> 2209 2210 Continue execution at the location given by the resolution of orig2. 2211 2212 <P> 2213 2214 <code> 2215 See: 2216 <A href=dpans6.htm#6.1.1700>6.1.1700 IF</a> , 2217 <a href=dpansa6.htm#A.6.1.1310>A.6.1.1310 ELSE</a> 2218 </code> 2219 2220 <P> 2221 2222 <hr> 2223 <A name=6.1.1320> 2224 <code> 2225 6.1.1320 <B>EMIT</B> 2226 </code> 2227 </a> 2228 <BR> 2229 CORE 2230 <BR> 2231 <pre> 2232 ( x -- ) 2233 </pre> 2234 2235 <P> 2236 2237 If x is a graphic character in the implementation-defined character set, 2238 display x. The effect of EMIT for all other values of x is 2239 implementation-defined. 2240 2241 <P> 2242 2243 When passed a character whose character-defining bits have a value 2244 between hex 20 and 7E inclusive, the corresponding standard character, 2245 specified by 2246 <a href=dpans3.htm#3.1.2.1>3.1.2.1</a> 2247 Graphic characters, is displayed. Because 2248 different output devices can respond differently to control characters, 2249 programs that use control characters to perform specific functions have 2250 an environmental dependency. Each EMIT deals with only one character. 2251 2252 <P> 2253 2254 <code> 2255 See: 2256 <A href=dpans6.htm#6.1.2310>6.1.2310 TYPE</a> 2257 </code> 2258 2259 <P> 2260 2261 <hr> 2262 <A name=6.1.1345> 2263 <code> 2264 6.1.1345 <B>ENVIRONMENT?</B> 2265 </code> 2266 </a> 2267 <BR> 2268 <B>environment-query</B> CORE 2269 <BR> 2270 <pre> 2271 ( c-addr u -- false | i*x true ) 2272 </pre> 2273 2274 <P> 2275 2276 c-addr is the address of a character string and u is the string's 2277 character count. u may have a value in the range from zero to an 2278 implementation-defined maximum which shall not be less than 31. The 2279 character string should contain a keyword from 2280 <a href=dpans3.htm#3.2.6>3.2.6</a> Environmental 2281 queries or the optional word sets to be checked for correspondence with 2282 an attribute of the present environment. If the system treats the 2283 attribute as unknown, the returned flag is false; otherwise, the flag is 2284 true and the i*x returned is of the type specified in the table for the 2285 attribute queried. 2286 2287 <P> 2288 <code> 2289 See: 2290 <a href=dpansa6.htm#A.6.1.1345>A.6.1.1345 ENVIRONMENT?</a> 2291 </code> 2292 <p> 2293 2294 <hr> 2295 <A name=6.1.1360> 2296 <code> 2297 6.1.1360 <B>EVALUATE</B> 2298 </code> 2299 </a> 2300 <BR> 2301 CORE 2302 <BR> 2303 <pre> 2304 ( i*x c-addr u -- j*x ) 2305 </pre> 2306 2307 <P> 2308 2309 Save the current input source specification. Store minus-one (-1) in 2310 <a href=dpans6.htm#6.2.2218>SOURCE-ID</a> 2311 if it is present. Make the string described by c-addr and u 2312 both the input source and input buffer, set 2313 <a href=dpans6.htm#6.1.0560>>IN</a> 2314 to zero, and 2315 interpret. When the parse area is empty, restore the prior input source 2316 specification. Other stack effects are due to the words EVALUATEd. 2317 2318 <P> 2319 <code> 2320 See: 2321 <a href=dpans7.htm#7.6.1.1360>7.6.1.1360 EVALUATE</a> , 2322 <a href=dpansa6.htm#A.6.1.1360>A.6.1.1360 EVALUATE</a> , 2323 <a href=a0006.htm>RFI 0006</a> Writing to Input Buffers. 2324 </code> 2325 <p> 2326 2327 <hr> 2328 <A name=6.1.1370> 2329 <code> 2330 6.1.1370 <B>EXECUTE</B> 2331 </code> 2332 </a> 2333 <BR> 2334 CORE 2335 <BR> 2336 <pre> 2337 ( i*x xt -- j*x ) 2338 </pre> 2339 2340 <P> 2341 2342 Remove xt from the stack and perform the semantics identified by it. 2343 Other stack effects are due to the word EXECUTEd. 2344 2345 <P> 2346 2347 <code> 2348 See: 2349 <A href=dpans6.htm#6.1.0070>6.1.0070 '</a> , 2350 <A href=dpans6.htm#6.1.2510>6.1.2510 [']</a> 2351 </code> 2352 2353 <P> 2354 2355 <hr> 2356 <A name=6.1.1380> 2357 <code> 2358 6.1.1380 <B>EXIT</B> 2359 </code> 2360 </a> 2361 <BR> 2362 CORE 2363 <BR> 2364 2365 <P> 2366 <pre> 2367 Interpretation: Interpretation semantics for this word are undefined. 2368 </pre> 2369 <P> 2370 <pre> 2371 Execution: ( -- ) ( R: nest-sys -- ) 2372 </pre> 2373 <P> 2374 2375 Return control to the calling definition specified by nest-sys. Before 2376 executing EXIT within a do-loop, a program shall discard the loop-control 2377 parameters by executing 2378 <a href=dpans6.htm#6.1.2380>UNLOOP</a>. 2379 2380 <P> 2381 2382 <code> 2383 See: 2384 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 2385 <a href=dpansa6.htm#A.6.1.1380>A.6.1.1380 EXIT</a> 2386 </code> 2387 2388 <P> 2389 2390 <hr> 2391 <A name=6.1.1540> 2392 <code> 2393 6.1.1540 <B>FILL</B> 2394 </code> 2395 </a> 2396 <BR> 2397 CORE 2398 <BR> 2399 <pre> 2400 ( c-addr u char -- ) 2401 </pre> 2402 2403 <P> 2404 2405 If u 2406 is greater than zero, store char in each of u consecutive characters of 2407 memory beginning at c-addr. 2408 2409 <P> 2410 2411 <hr> 2412 <A name=6.1.1550> 2413 <code> 2414 6.1.1550 <B>FIND</B> 2415 </code> 2416 </a> 2417 <BR> 2418 CORE 2419 <BR> 2420 <pre> 2421 ( c-addr -- c-addr 0 | xt 1 | xt -1 ) 2422 </pre> 2423 2424 <P> 2425 2426 Find the definition named in the counted string at c-addr. If the 2427 definition is not found, return c-addr and zero. If the definition is 2428 found, return its execution token xt. If the definition is immediate, 2429 also return one (1), otherwise also return minus-one (-1). For a given 2430 string, the values returned by FIND while compiling may differ from 2431 those returned while not compiling. 2432 2433 <P> 2434 2435 <code> 2436 See: 2437 <A href=dpans3.htm#3.4.2>3.4.2</a> Finding definition names, 2438 <A href=dpans6.htm#6.1.0070>6.1.0070 '</a> , 2439 <A href=dpans6.htm#6.1.2510>6.1.2510 [']</a> , 2440 <a href=dpansa6.htm#A.6.1.1550>A.6.1.1550 FIND</a> , 2441 <A href=dpansa6.htm#A.6.1.2033>A.6.1.2033 POSTPONE</a> , 2442 <A href=dpansd.htm#D.6.7>D.6.7</a> Immediacy. 2443 </code> 2444 2445 <P> 2446 2447 <hr> 2448 <A name=6.1.1561> 2449 <code> 2450 6.1.1561 <B>FM/MOD</B> 2451 </code> 2452 </a> 2453 <BR> 2454 <B>f-m-slash-mod</B> CORE 2455 <BR> 2456 <pre> 2457 ( d1 n1 -- n2 n3 ) 2458 </pre> 2459 2460 <P> 2461 2462 Divide d1 by n1, giving the floored quotient n3 and the remainder n2. 2463 Input and output stack arguments are signed. An ambiguous condition 2464 exists if n1 is zero or if the quotient lies outside the range of a 2465 single-cell signed integer. 2466 2467 <P> 2468 2469 <code> 2470 See: 2471 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division, 2472 <A href=dpans6.htm#6.1.2214>6.1.2214 SM/REM</a> , 2473 <A href=dpans6.htm#6.1.2370>6.1.2370 UM/MOD</a> , 2474 <a href=dpansa6.htm#A.6.1.1561>A.6.1.1561 FM/MOD</a> 2475 </code> 2476 2477 <P> 2478 2479 <hr> 2480 <A name=6.1.1650> 2481 <code> 2482 6.1.1650 <B>HERE</B> 2483 </code> 2484 </a> 2485 <BR> 2486 CORE 2487 <BR> 2488 <pre> 2489 ( -- addr ) 2490 </pre> 2491 2492 <P> 2493 2494 addr is 2495 the data-space pointer. 2496 2497 <P> 2498 2499 <code> 2500 See: 2501 <A href=dpans3.htm#3.3.3.2>3.3.3.2</a> Contiguous regions 2502 </code> 2503 2504 <P> 2505 2506 <hr> 2507 <A name=6.1.1670> 2508 <code> 2509 6.1.1670 <B>HOLD</B> 2510 </code> 2511 </a> 2512 <BR> 2513 CORE 2514 <BR> 2515 <pre> 2516 ( char -- ) 2517 </pre> 2518 2519 <P> 2520 2521 Add char 2522 to the beginning of the pictured numeric output string. An ambiguous 2523 condition exists if HOLD executes outside of a 2524 <a href=dpans6.htm#6.1.0490><#</a> 2525 <a href=dpans6.htm#6.1.0040>#></a> 2526 delimited number 2527 conversion. 2528 2529 <P> 2530 2531 <hr> 2532 <A name=6.1.1680> 2533 <code> 2534 6.1.1680 <B>I</B> 2535 </code> 2536 </a> 2537 <BR> 2538 CORE 2539 <BR> 2540 2541 <P> 2542 <pre> 2543 Interpretation: Interpretation semantics for this word are undefined. 2544 </pre> 2545 <P> 2546 <pre> 2547 Execution: ( -- n|u ) ( R: loop-sys -- loop-sys ) 2548 </pre> 2549 <P> 2550 2551 n|u is a copy of the current (innermost) loop index. An ambiguous condition 2552 exists if the loop control parameters are unavailable. 2553 2554 <P> 2555 2556 <hr> 2557 <A name=6.1.1700> 2558 <code> 2559 6.1.1700 <B>IF</B> 2560 </code> 2561 </a> 2562 <BR> 2563 CORE 2564 <BR> 2565 2566 <P> 2567 <pre> 2568 Interpretation: Interpretation semantics for this word are undefined. 2569 </pre> 2570 <P> 2571 <pre> 2572 Compilation: ( C: -- orig ) 2573 </pre> 2574 <P> 2575 2576 Put the location of a new unresolved forward reference orig onto the 2577 control flow stack. Append the run-time semantics given below to the 2578 current definition. The semantics are incomplete until orig is 2579 resolved, e.g., by 2580 <a href=dpans6.htm#6.1.2270>THEN</a> or 2581 <a href=dpans6.htm#6.1.1310>ELSE</a>. 2582 2583 <P> 2584 <pre> 2585 Run-time: ( x -- ) 2586 </pre> 2587 <P> 2588 2589 If all bits of x are zero, continue execution at the location specified 2590 by the resolution of orig. 2591 2592 <P> 2593 2594 <code> 2595 See: 2596 <A href=dpans3.htm#3.2.3.2>3.2.3.2</a> Control flow stack, 2597 <a href=dpansa6.htm#A.6.1.1700>A.6.1.1700 IF</a> 2598 </code> 2599 2600 <P> 2601 2602 <hr> 2603 <A name=6.1.1710> 2604 <code> 2605 6.1.1710 <B>IMMEDIATE</B> 2606 </code> 2607 </a> 2608 <BR> 2609 CORE 2610 <BR> 2611 <pre> 2612 ( -- ) 2613 </pre> 2614 2615 <P> 2616 2617 Make the 2618 most recent definition an immediate word. An ambiguous condition 2619 exists if the most recent definition does not have a name. 2620 2621 <P> 2622 2623 <code> 2624 See: 2625 <a href=dpansa6.htm#A.6.1.1710>A.6.1.1710 IMMEDIATE</a> , 2626 <A href=dpansd.htm#D.6.7>D.6.7</a> Immediacy, 2627 <a href=a0007.htm>RFI 0007</a> Distinction between <em>immediacy</em> and <em>special compilation semantics</em>. 2628 </code> 2629 2630 <P> 2631 2632 <hr> 2633 <A name=6.1.1720> 2634 <code> 2635 6.1.1720 <B>INVERT</B> 2636 </code> 2637 </a> 2638 <BR> 2639 CORE 2640 <BR> 2641 <pre> 2642 ( x1 -- x2 ) 2643 </pre> 2644 2645 <P> 2646 2647 Invert all 2648 bits of x1, giving its logical inverse x2. 2649 2650 <P> 2651 2652 <code> 2653 See: 2654 <A href=dpans6.htm#6.1.1910>6.1.1910 NEGATE</a> , 2655 <A href=dpans6.htm#6.1.0270>6.1.0270 0=</a> , 2656 <a href=dpansa6.htm#A.6.1.1720>A.6.1.1720 INVERT</a> 2657 </code> 2658 2659 <P> 2660 2661 <hr> 2662 <A name=6.1.1730> 2663 <code> 2664 6.1.1730 <B>J</B> 2665 </code> 2666 </a> 2667 <BR> 2668 CORE 2669 <BR> 2670 2671 <P> 2672 <pre> 2673 Interpretation: Interpretation semantics for this word are undefined. 2674 </pre> 2675 <P> 2676 <pre> 2677 Execution: ( -- n|u ) ( R: loop-sys1 loop-sys2 -- loop-sys1 loop-sys2 ) 2678 </pre> 2679 <P> 2680 2681 n|u is a copy of the next-outer loop index. An ambiguous condition 2682 exists if the loop control parameters of the next-outer loop, loop-sys1, 2683 are unavailable. 2684 2685 <P> 2686 <code> 2687 See: 2688 <a href=dpansa6.htm#A.6.1.1730>A.6.1.1730 J</a> 2689 </code> 2690 <p> 2691 2692 <hr> 2693 <A name=6.1.1750> 2694 <code> 2695 6.1.1750 <B>KEY</B> 2696 </code> 2697 </a> 2698 <BR> 2699 CORE 2700 <BR> 2701 <pre> 2702 ( -- char ) 2703 </pre> 2704 2705 <P> 2706 2707 Receive one character char, a member of the implementation-defined 2708 character set. Keyboard events that do not correspond to such 2709 characters are discarded until a valid character is received, and those 2710 events are subsequently unavailable. 2711 2712 <P> 2713 2714 All standard characters can be received. Characters received by KEY are 2715 not displayed. 2716 2717 <P> 2718 2719 Any standard character returned by KEY has the numeric value specified 2720 in 2721 <a href=dpans3.htm#3.1.2.1>3.1.2.1</a> 2722 Graphic characters. Programs that require the ability to 2723 receive control characters have an environmental dependency. 2724 2725 <P> 2726 2727 <code> 2728 See: 2729 <A href=dpans10.htm#10.6.2.1305>10.6.2.1305 EKEY</a> , 2730 <A href=dpans10.htm#10.6.1.1755>10.6.1.1755 KEY?</a> 2731 </code> 2732 2733 <P> 2734 2735 <hr> 2736 <A name=6.1.1760> 2737 <code> 2738 6.1.1760 <B>LEAVE</B> 2739 </code> 2740 </a> 2741 <BR> 2742 CORE 2743 <BR> 2744 2745 <P> 2746 <pre> 2747 Interpretation: Interpretation semantics for this word are undefined. 2748 </pre> 2749 <P> 2750 <pre> 2751 Execution: ( -- ) ( R: loop-sys -- ) 2752 </pre> 2753 <P> 2754 2755 Discard the current loop control parameters. An ambiguous condition 2756 exists if they are unavailable. Continue execution immediately 2757 following the innermost syntactically enclosing 2758 <a href=dpans6.htm#6.1.1240>DO</a> ... 2759 <a href=dpans6.htm#6.1.1800>LOOP</a> 2760 or DO ... 2761 <a href=dpans6.htm#6.1.0140>+LOOP</a>. 2762 2763 <P> 2764 2765 <code> 2766 See: 2767 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 2768 <a href=dpansa6.htm#A.6.1.1760>A.6.1.1760 LEAVE</a> 2769 </code> 2770 2771 <P> 2772 2773 <hr> 2774 <A name=6.1.1780> 2775 <code> 2776 6.1.1780 <B>LITERAL</B> 2777 </code> 2778 </a> 2779 <BR> 2780 CORE 2781 <BR> 2782 2783 <P> 2784 <pre> 2785 Interpretation: Interpretation semantics for this word are undefined. 2786 </pre> 2787 <P> 2788 <pre> 2789 Compilation: ( x -- ) 2790 </pre> 2791 <P> 2792 2793 Append the run-time semantics 2794 given below to the current definition. 2795 2796 <P> 2797 <pre> 2798 Run-time: ( -- x ) 2799 </pre> 2800 <P> 2801 2802 Place x 2803 on the stack. 2804 2805 <P> 2806 <code> 2807 See: 2808 <a href=dpansa6.htm#A.6.1.1780>A.6.1.1780 LITERAL</a> 2809 </code> 2810 <p> 2811 2812 <hr> 2813 <A name=6.1.1800> 2814 <code> 2815 6.1.1800 <B>LOOP</B> 2816 </code> 2817 </a> 2818 <BR> 2819 CORE 2820 <BR> 2821 2822 <P> 2823 <pre> 2824 Interpretation: Interpretation semantics for this word are undefined. 2825 </pre> 2826 <P> 2827 <pre> 2828 Compilation: ( C: do-sys -- ) 2829 </pre> 2830 <P> 2831 2832 Append the run-time semantics given below to the current definition. 2833 Resolve the destination of all unresolved occurrences of 2834 <a href=dpans6.htm#6.1.1760>LEAVE</a> 2835 between 2836 the location given by do-sys and the next location for a transfer of 2837 control, to execute the words following the LOOP. 2838 2839 <P> 2840 <pre> 2841 Run-time: ( -- ) ( R: loop-sys1 -- | loop-sys2 ) 2842 </pre> 2843 <P> 2844 2845 An ambiguous condition exists if the loop control parameters are 2846 unavailable. Add one to the loop index. If the loop index is then 2847 equal to the loop limit, discard the loop parameters and continue 2848 execution immediately following the loop. Otherwise continue execution 2849 at the beginning of the loop. 2850 2851 <P> 2852 2853 <code> 2854 See: 2855 <A href=dpans6.htm#6.1.1240>6.1.1240 DO</a> , 2856 <A href=dpans6.htm#6.1.1680>6.1.1680 I</a> , 2857 <a href=dpansa6.htm#A.6.1.1800>A.6.1.1800 LOOP</a> 2858 </code> 2859 2860 <P> 2861 2862 <hr> 2863 <A name=6.1.1805> 2864 <code> 2865 6.1.1805 <B>LSHIFT</B> 2866 </code> 2867 </a> 2868 <BR> 2869 <B>l-shift</B> CORE 2870 <BR> 2871 <pre> 2872 ( x1 u -- x2 ) 2873 </pre> 2874 2875 <P> 2876 2877 Perform a 2878 logical left shift of u bit-places on x1, giving x2. Put zeroes 2879 into the least significant bits vacated by the shift. An ambiguous condition 2880 exists if u is greater than or equal to the number of bits in a cell. 2881 2882 <P> 2883 2884 <hr> 2885 <A name=6.1.1810> 2886 <code> 2887 6.1.1810 <B>M*</B> 2888 </code> 2889 </a> 2890 <BR> 2891 <B>m-star</B> CORE 2892 <BR> 2893 <pre> 2894 ( n1 n2 -- d ) 2895 </pre> 2896 2897 <P> 2898 2899 d is 2900 the signed product of n1 times n2. 2901 2902 <P> 2903 <code> 2904 See: 2905 <a href=dpansa6.htm#A.6.1.1810>A.6.1.1810 M*</a> 2906 </code> 2907 <p> 2908 2909 <hr> 2910 <A name=6.1.1870> 2911 <code> 2912 6.1.1870 <B>MAX</B> 2913 </code> 2914 </a> 2915 <BR> 2916 CORE 2917 <BR> 2918 <pre> 2919 ( n1 n2 -- n3 ) 2920 </pre> 2921 2922 <P> 2923 2924 n3 is 2925 the greater of n1 and n2. 2926 2927 <P> 2928 2929 <hr> 2930 <A name=6.1.1880> 2931 <code> 2932 6.1.1880 <B>MIN</B> 2933 </code> 2934 </a> 2935 <BR> 2936 CORE 2937 <BR> 2938 <pre> 2939 ( n1 n2 -- n3 ) 2940 </pre> 2941 2942 <P> 2943 2944 n3 is 2945 the lesser of n1 and n2. 2946 2947 <P> 2948 2949 <hr> 2950 <A name=6.1.1890> 2951 <code> 2952 6.1.1890 <B>MOD</B> 2953 </code> 2954 </a> 2955 <BR> 2956 CORE 2957 <BR> 2958 <pre> 2959 ( n1 n2 -- n3 ) 2960 </pre> 2961 2962 <P> 2963 2964 Divide n1 by n2, giving the single-cell remainder n3. An ambiguous 2965 condition exists if n2 is zero. If n1 and n2 differ in sign, the 2966 implementation-defined result returned will be the same as that returned 2967 by either the phrase 2968 <b><code>>R S>D R> FM/MOD DROP</code></b> 2969 or the phrase 2970 <b><code>>R S>D R> SM/REM DROP</code></b>. 2971 2972 <P> 2973 2974 <code> 2975 See: 2976 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division 2977 </code> 2978 2979 <P> 2980 2981 <hr> 2982 <A name=6.1.1900> 2983 <code> 2984 6.1.1900 <B>MOVE</B> 2985 </code> 2986 </a> 2987 <BR> 2988 CORE 2989 <BR> 2990 <pre> 2991 ( addr1 addr2 u -- ) 2992 </pre> 2993 2994 <P> 2995 2996 If u is greater than zero, copy the contents of u consecutive address 2997 units at addr1 to the u consecutive address units at addr2. After MOVE 2998 completes, the u consecutive address units at addr2 contain exactly what 2999 the u consecutive address units at addr1 contained before the move. 3000 3001 <P> 3002 3003 <code> 3004 See: 3005 <A href=dpans17.htm#17.6.1.0910>17.6.1.0910 CMOVE</a> , 3006 <A href=dpans17.htm#17.6.1.0920>17.6.1.0920 CMOVE></a> , 3007 <a href=dpansa6.htm#A.6.1.1900>A.6.1.1900 MOVE</a> 3008 </code> 3009 3010 <P> 3011 3012 <hr> 3013 <A name=6.1.1910> 3014 <code> 3015 6.1.1910 <B>NEGATE</B> 3016 </code> 3017 </a> 3018 <BR> 3019 CORE 3020 <BR> 3021 <pre> 3022 ( n1 -- n2 ) 3023 </pre> 3024 3025 <P> 3026 3027 Negate n1, 3028 giving its arithmetic inverse n2. 3029 3030 <P> 3031 3032 <code> 3033 See: 3034 <A href=dpans6.htm#6.1.1720>6.1.1720 INVERT</a> , 3035 <A href=dpans6.htm#6.1.0270>6.1.0270 0=</a> 3036 </code> 3037 3038 <P> 3039 3040 <hr> 3041 <A name=6.1.1980> 3042 <code> 3043 6.1.1980 <B>OR</B> 3044 </code> 3045 </a> 3046 <BR> 3047 CORE 3048 <BR> 3049 <pre> 3050 ( x1 x2 -- x3 ) 3051 </pre> 3052 3053 <P> 3054 3055 x3 is 3056 the bit-by-bit inclusive-or of x1 with x2. 3057 3058 <P> 3059 3060 <hr> 3061 <A name=6.1.1990> 3062 <code> 3063 6.1.1990 <B>OVER</B> 3064 </code> 3065 </a> 3066 <BR> 3067 CORE 3068 <BR> 3069 <pre> 3070 ( x1 x2 -- x1 x2 x1 ) 3071 </pre> 3072 3073 <P> 3074 3075 Place a 3076 copy of x1 on top of the stack. 3077 3078 <hr> 3079 <A name=6.1.2033> 3080 <code> 3081 6.1.2033 <B>POSTPONE</b> 3082 </code> 3083 </a> 3084 <BR> 3085 CORE 3086 <BR> 3087 3088 <P> 3089 <pre> 3090 Interpretation: Interpretation semantics for this word are undefined. 3091 </pre> 3092 <P> 3093 <pre> 3094 Compilation: ( <B>"<spaces>name"</B> -- ) 3095 </pre> 3096 <P> 3097 3098 Skip leading space delimiters. Parse name delimited by a space. Find 3099 name. Append the compilation semantics of name to the current 3100 definition. An ambiguous condition exists if name is not found. 3101 3102 <P> 3103 3104 <code> 3105 See: 3106 <a href=dpansd.htm#D.6.7>D.6.7</a> Immediacy, 3107 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 3108 <a href=dpansa6.htm#A.6.1.2033>A.6.1.2033 POSTPONE</a> , 3109 <a href=dpans6.htm#6.2.2530>6.2.2530 [COMPILE]</a> 3110 </code> 3111 3112 <P> 3113 3114 3115 <hr> 3116 <A name=6.1.2050> 3117 <code> 3118 6.1.2050 <b>QUIT</b> 3119 </code> 3120 </a> 3121 <BR> 3122 CORE 3123 <BR> 3124 <pre> 3125 ( -- ) ( R: i*x -- ) 3126 </pre> 3127 3128 <P> 3129 3130 Empty the return stack, store zero in 3131 <a href=dpans6.htm#6.2.2218>SOURCE-ID</a> 3132 if it is present, make 3133 the user input device the input source, and enter interpretation state. 3134 Do not display a message. Repeat the following: 3135 3136 <UL> 3137 <LI>Accept a line from the input source into the input buffer, set 3138 <a href=dpans6.htm#6.1.0560>>IN</a> 3139 to zero, and interpret. 3140 <LI>Display the implementation-defined system prompt if in interpretation 3141 state, all processing has been completed, and no ambiguous condition 3142 exists. 3143 </ul> 3144 <P> 3145 3146 <code> 3147 See: 3148 <A href=dpans3.htm#3.4>3.4</a> The Forth text interpreter 3149 </code> 3150 3151 <P> 3152 3153 <hr> 3154 <A name=6.1.2060> 3155 <code> 3156 6.1.2060 <b>R></b> 3157 </code> 3158 </a> 3159 <BR> 3160 <B>r-from</B> CORE 3161 <BR> 3162 3163 <P> 3164 <pre> 3165 Interpretation: Interpretation semantics for this word are undefined. 3166 </pre> 3167 <P> 3168 <pre> 3169 Execution: ( -- x ) ( R: x -- ) 3170 </pre> 3171 <P> 3172 3173 Move x from 3174 the return stack to the data stack. 3175 3176 <P> 3177 3178 <code> 3179 See: 3180 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 3181 <A href=dpans6.htm#6.1.0580>6.1.0580 >R</a> , 3182 <A href=dpans6.htm#6.1.2070>6.1.2070 R@</a> , 3183 <A href=dpans6.htm#6.2.0340>6.2.0340 2>R</a> , 3184 <A href=dpans6.htm#6.2.0410>6.2.0410 2R></a> , 3185 <A href=dpans6.htm#6.2.0415>6.2.0415 2R@</a> 3186 </code> 3187 3188 <P> 3189 3190 <hr> 3191 <A name=6.1.2070> 3192 <code> 3193 6.1.2070 <b>R@</b> 3194 </code> 3195 </a> 3196 <BR> 3197 <B>r-fetch</B> CORE 3198 <BR> 3199 3200 <P> 3201 <pre> 3202 Interpretation: Interpretation semantics for this word are undefined. 3203 </pre> 3204 <P> 3205 <pre> 3206 Execution: ( -- x ) ( R: x -- x ) 3207 </pre> 3208 <P> 3209 3210 Copy x from 3211 the return stack to the data stack. 3212 3213 <P> 3214 3215 <code> 3216 See: 3217 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 3218 <A href=dpans6.htm#6.1.0580>6.1.0580 >R</a> , 3219 <A href=dpans6.htm#6.1.2060>6.1.2060 R></a> , 3220 <A href=dpans6.htm#6.2.0340>6.2.0340 2>R</a> , 3221 <A href=dpans6.htm#6.2.0410>6.2.0410 2R></a> , 3222 <A href=dpans6.htm#6.2.0415>6.2.0415 2R@</a> 3223 </code> 3224 3225 <P> 3226 3227 <hr> 3228 <A name=6.1.2120> 3229 <code> 3230 6.1.2120 <b>RECURSE</b> 3231 </code> 3232 </a> 3233 <BR> 3234 CORE 3235 <BR> 3236 3237 <P> 3238 <pre> 3239 Interpretation: Interpretation semantics for this word are undefined. 3240 </pre> 3241 <P> 3242 <pre> 3243 Compilation: ( -- ) 3244 </pre> 3245 <P> 3246 3247 Append the execution semantics of the current definition to the current 3248 definition. An ambiguous condition exists if RECURSE appears in a 3249 definition after 3250 <a href=dpans6.htm#6.1.1250>DOES></a>. 3251 3252 <P> 3253 3254 <code> 3255 See: 3256 <A href=dpans6.htm#6.1.2120>6.1.2120 RECURSE</a> , 3257 <a href=dpansa6.htm#A.6.1.2120>A.6.1.2120 RECURSE</a> 3258 </code> 3259 3260 <P> 3261 3262 <hr> 3263 <A name=6.1.2140> 3264 <code> 3265 6.1.2140 <b>REPEAT</b> 3266 </code> 3267 </a> 3268 <BR> 3269 CORE 3270 <BR> 3271 3272 <P> 3273 <pre> 3274 Interpretation: Interpretation semantics for this word are undefined. 3275 </pre> 3276 <P> 3277 <pre> 3278 Compilation: ( C: orig dest -- ) 3279 </pre> 3280 <P> 3281 3282 Append the run-time semantics given below to the current definition, 3283 resolving the backward reference dest. Resolve the forward reference 3284 orig using the location following the appended run-time semantics. 3285 3286 <P> 3287 <pre> 3288 Run-time: ( -- ) 3289 </pre> 3290 <P> 3291 3292 Continue execution 3293 at the location given by dest. 3294 3295 <P> 3296 3297 <code> 3298 See: 3299 <A href=dpans6.htm#6.1.0760>6.1.0760 BEGIN</a> , 3300 <A href=dpans6.htm#6.1.2430>6.1.2430 WHILE</a> , 3301 <a href=dpansa6.htm#A.6.1.2140>A.6.1.2140 REPEAT</a> 3302 </code> 3303 3304 3305 <P> 3306 3307 <hr> 3308 <A name=6.1.2160> 3309 <code> 3310 6.1.2160 <b>ROT</b> 3311 </code> 3312 </a> 3313 <BR> 3314 <B>rote</B> CORE 3315 <BR> 3316 <pre> 3317 ( x1 x2 x3 -- x2 x3 x1 ) 3318 </pre> 3319 3320 <P> 3321 3322 Rotate the 3323 top three stack entries. 3324 3325 3326 <P> 3327 3328 <hr> 3329 <A name=6.1.2162> 3330 <code> 3331 6.1.2162 <b>RSHIFT</b> 3332 </code> 3333 </a> 3334 <BR> 3335 <B>r-shift</B> CORE 3336 <BR> 3337 <pre> 3338 ( x1 u -- x2 ) 3339 </pre> 3340 3341 <P> 3342 3343 Perform a logical right shift of u bit-places on x1, giving x2. Put 3344 zeroes into the most significant bits vacated by the shift. An 3345 ambiguous condition exists if u is greater than or equal to the number 3346 of bits in a cell. 3347 3348 <P> 3349 3350 <hr> 3351 <A name=6.1.2165> 3352 <code> 3353 6.1.2165 <b>S"</b> 3354 </code> 3355 </a> 3356 <BR> 3357 <B>s-quote</B> CORE 3358 <BR> 3359 3360 <P> 3361 <pre> 3362 Interpretation: Interpretation semantics for this word are undefined. 3363 </pre> 3364 <P> 3365 <pre> 3366 Compilation: ( <B>"ccc<quote>"</B> -- ) 3367 </pre> 3368 <P> 3369 3370 Parse ccc delimited by " (double-quote). Append the run-time semantics 3371 given below to the current definition. 3372 3373 3374 <PRE> 3375 Run-time: ( -- c-addr u ) 3376 </PRE> 3377 3378 <P> 3379 3380 Return c-addr and u describing a string consisting of the characters 3381 ccc. A program shall not alter the returned string. 3382 3383 <P> 3384 3385 <code> 3386 See: 3387 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 3388 <A href=dpans6.htm#6.2.0855>6.2.0855 C"</a> , 3389 <A href=dpans11.htm#11.6.1.2165>11.6.1.2165 S"</a> , 3390 <a href=dpansa6.htm#A.6.1.2165>A.6.1.2165 S"</a> 3391 </code> 3392 3393 <P> 3394 3395 <hr> 3396 <A name=6.1.2170> 3397 <code> 3398 6.1.2170 <b>S>D</b> 3399 </code> 3400 </a> 3401 <BR> 3402 <B>s-to-d</B> CORE 3403 <BR> 3404 <pre> 3405 ( n -- d ) 3406 </pre> 3407 3408 <P> 3409 3410 Convert the 3411 number n to the double-cell number d with the same numerical 3412 value. 3413 3414 <P> 3415 3416 <hr> 3417 <A name=6.1.2210> 3418 <code> 3419 6.1.2210 <b>SIGN</b> 3420 </code> 3421 </a> 3422 <BR> 3423 CORE 3424 <BR> 3425 <pre> 3426 ( n -- ) 3427 </pre> 3428 3429 <P> 3430 3431 If n is negative, add a minus sign to the beginning of the pictured 3432 numeric output string. An ambiguous condition exists if SIGN executes 3433 outside of a 3434 <a href=dpans6.htm#6.1.0490><#</a> 3435 <a href=dpans6.htm#6.1.0040>#></a> 3436 delimited number conversion. 3437 3438 <P> 3439 3440 <hr> 3441 <A name=6.1.2214> 3442 <code> 3443 6.1.2214 <b>SM/REM</b> 3444 </code> 3445 </a> 3446 <BR> 3447 <B>s-m-slash-rem</B> CORE 3448 <BR> 3449 <pre> 3450 ( d1 n1 -- n2 n3 ) 3451 </pre> 3452 3453 <P> 3454 3455 Divide d1 by n1, giving the symmetric quotient n3 and the remainder n2. 3456 Input and output stack arguments are signed. An ambiguous condition 3457 exists if n1 is zero or if the quotient lies outside the range of a 3458 single-cell signed integer. 3459 3460 <P> 3461 3462 <code> 3463 See: 3464 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division, 3465 <A href=dpans6.htm#6.1.1561>6.1.1561 FM/MOD</a> , 3466 <A href=dpans6.htm#6.1.2370>6.1.2370 UM/MOD</a> , 3467 <a href=dpansa6.htm#A.6.1.2214>A.6.1.2214 SM/REM</a> 3468 </code> 3469 3470 <P> 3471 3472 <hr> 3473 <A name=6.1.2216> 3474 <code> 3475 6.1.2216 <b>SOURCE</b> 3476 </code> 3477 </a> 3478 <BR> 3479 CORE 3480 <BR> 3481 <pre> 3482 ( -- c-addr u ) 3483 </pre> 3484 3485 <P> 3486 3487 c-addr is the address of, and u is the number of characters in, the 3488 input buffer. 3489 3490 <P> 3491 <code> 3492 See: 3493 <a href=dpansa6.htm#A.6.1.2216>A.6.1.2216 SOURCE</a> , 3494 <a href=a0006.htm>RFI 0006</a> Writing to Input Buffers. 3495 </code> 3496 <p> 3497 3498 <hr> 3499 <A name=6.1.2220> 3500 <code> 3501 6.1.2220 <b>SPACE</b> 3502 </code> 3503 </a> 3504 <BR> 3505 CORE 3506 <BR> 3507 <pre> 3508 ( -- ) 3509 </pre> 3510 3511 <P> 3512 3513 Display one 3514 space. 3515 3516 <P> 3517 3518 <hr> 3519 <A name=6.1.2230> 3520 <code> 3521 6.1.2230 <b>SPACES</b> 3522 </code> 3523 </a> 3524 <BR> 3525 CORE 3526 <BR> 3527 <pre> 3528 ( n -- ) 3529 </pre> 3530 3531 <P> 3532 3533 If n 3534 is greater than zero, display n spaces. 3535 3536 <P> 3537 3538 <hr> 3539 <A name=6.1.2250> 3540 <code> 3541 6.1.2250 <b>STATE</b> 3542 </code> 3543 </a> 3544 <BR> 3545 CORE 3546 <BR> 3547 <pre> 3548 ( -- a-addr ) 3549 </pre> 3550 3551 <P> 3552 3553 a-addr is the address of a cell containing the compilation-state flag. 3554 STATE is true when in compilation state, false otherwise. The true 3555 value in STATE is non-zero, but is otherwise implementation-defined. 3556 Only the following standard words alter the value in STATE: : 3557 (<a href=dpans6.htm#6.1.0450>colon</a>), ; 3558 (<a href=dpans6.htm#6.1.0460>semicolon</a>), 3559 <a href=dpans6.htm#6.1.0670>ABORT</a>, 3560 <a href=dpans6.htm#6.1.2050>QUIT</a>, 3561 <a href=dpans6.htm#6.2.0455>:NONAME</a>, [ 3562 (<a href=dpans6.htm#6.1.2500>left-bracket</a>), and ] 3563 (<a href=dpans6.htm#6.1.2540>right-bracket</a>). 3564 <p> 3565 3566 <b>Note:</b> A program shall not directly alter the contents of 3567 STATE. 3568 3569 3570 <P> 3571 3572 <code> 3573 See: 3574 <A href=dpans3.htm#3.4>3.4</a> The Forth text interpreter, 3575 <A href=dpans15.htm#15.6.2.2250>15.6.2.2250 STATE</a> , 3576 <a href=dpansa6.htm#A.6.1.2250>A.6.1.2250 STATE</a> , 3577 <a href=a0007.htm>RFI 0007</a> Distinction between <em>immediacy</em> and <em>special compilation semantics</em>. 3578 </code> 3579 3580 <P> 3581 3582 <hr> 3583 <A name=6.1.2260> 3584 <code> 3585 6.1.2260 <b>SWAP</b> 3586 </code> 3587 </a> 3588 <BR> 3589 CORE 3590 <BR> 3591 <pre> 3592 ( x1 x2 -- x2 x1 ) 3593 </pre> 3594 3595 <P> 3596 3597 Exchange the 3598 top two stack items. 3599 3600 <P> 3601 3602 <hr> 3603 <A name=6.1.2270> 3604 <code> 3605 6.1.2270 <b>THEN</b> 3606 </code> 3607 </a> 3608 <BR> 3609 CORE 3610 <BR> 3611 3612 <P> 3613 <pre> 3614 Interpretation: Interpretation semantics for this word are undefined. 3615 </pre> 3616 <P> 3617 <pre> 3618 Compilation: ( C: orig -- ) 3619 </pre> 3620 <P> 3621 3622 Append the run-time semantics given below to the current definition. 3623 Resolve the forward reference orig using the location of the appended 3624 run-time semantics. 3625 3626 <P> 3627 <pre> 3628 Run-time: ( -- ) 3629 </pre> 3630 <P> 3631 3632 Continue 3633 execution. 3634 3635 <P> 3636 3637 <code> 3638 See: 3639 <A href=dpans6.htm#6.1.1310>6.1.1310 ELSE</a> , 3640 <A href=dpans6.htm#6.1.1700>6.1.1700 IF</a> , 3641 <a href=dpansa6.htm#A.6.1.2270>A.6.1.2270 THEN</a> 3642 </code> 3643 3644 <P> 3645 3646 <hr> 3647 <A name=6.1.2310> 3648 <code> 3649 6.1.2310 <b>TYPE</b> 3650 </code> 3651 </a> 3652 <BR> 3653 CORE 3654 <BR> 3655 <pre> 3656 ( c-addr u -- ) 3657 </pre> 3658 3659 <P> 3660 3661 If u is greater than zero, display the character string specified by 3662 c-addr and u. 3663 3664 <P> 3665 3666 When passed a character in a character string whose character-defining 3667 bits have a value between hex 20 and 7E inclusive, the corresponding 3668 standard character, specified by 3669 <a href=dpans3.htm#3.1.2.1>3.1.2.1</a> graphic characters, is 3670 displayed. Because different output devices can respond differently to 3671 control characters, programs that use control characters to perform 3672 specific functions have an environmental dependency. 3673 3674 <P> 3675 3676 <code> 3677 See: 3678 <A href=dpans6.htm#6.1.1320>6.1.1320 EMIT</a> 3679 </code> 3680 3681 <P> 3682 3683 <hr> 3684 <A name=6.1.2320> 3685 <code> 3686 6.1.2320 <b>U.</b> 3687 </code> 3688 </a> 3689 <BR> 3690 <B>u-dot</B> CORE 3691 <BR> 3692 <pre> 3693 ( u -- ) 3694 </pre> 3695 3696 <P> 3697 3698 Display u 3699 in free field format. 3700 3701 <P> 3702 3703 <hr> 3704 <A name=6.1.2340> 3705 <code> 3706 6.1.2340 <b>U<</b> 3707 </code> 3708 </a> 3709 <BR> 3710 <B>u-less-than</B> CORE 3711 <BR> 3712 <pre> 3713 ( u1 u2 -- flag ) 3714 </pre> 3715 3716 <P> 3717 3718 flag is 3719 true if and only if u1 is less than u2. 3720 3721 <P> 3722 3723 <code> 3724 See: 3725 <A href=dpans6.htm#6.1.0480>6.1.0480 <</a> 3726 </code> 3727 3728 <P> 3729 3730 <hr> 3731 <A name=6.1.2360> 3732 <code> 3733 6.1.2360 <b>UM*</b> 3734 </code> 3735 </a> 3736 <BR> 3737 <B>u-m-star</B> CORE 3738 <BR> 3739 <pre> 3740 ( u1 u2 -- ud ) 3741 </pre> 3742 3743 <P> 3744 3745 Multiply u1 by u2, giving the unsigned double-cell product ud. All 3746 values and arithmetic are unsigned. 3747 3748 <P> 3749 3750 <hr> 3751 <A name=6.1.2370> 3752 <code> 3753 6.1.2370 <b>UM/MOD</b> 3754 </code> 3755 </a> 3756 <BR> 3757 <B>u-m-slash-mod</B> CORE 3758 <BR> 3759 <pre> 3760 ( ud u1 -- u2 u3 ) 3761 </pre> 3762 3763 <P> 3764 3765 Divide ud by u1, giving the quotient u3 and the remainder u2. All 3766 values and arithmetic are unsigned. An ambiguous condition exists if u1 3767 is zero or if the quotient lies outside the range of a single-cell 3768 unsigned integer. 3769 3770 <P> 3771 3772 <code> 3773 See: 3774 <A href=dpans3.htm#3.2.2.1>3.2.2.1</a> Integer division, 3775 <A href=dpans6.htm#6.1.1561>6.1.1561 FM/MOD</a> , 3776 <A href=dpans6.htm#6.1.2214>6.1.2214 SM/REM</a> 3777 </code> 3778 3779 <P> 3780 3781 <hr> 3782 <A name=6.1.2380> 3783 <code> 3784 6.1.2380 <b>UNLOOP</b> 3785 </code> 3786 </a> 3787 <BR> 3788 CORE 3789 <BR> 3790 3791 <P> 3792 <pre> 3793 Interpretation: Interpretation semantics for this word are undefined. 3794 </pre> 3795 <P> 3796 <pre> 3797 Execution: ( -- ) ( R: loop-sys -- ) 3798 </pre> 3799 <P> 3800 3801 Discard the loop-control parameters for the current nesting level. An 3802 UNLOOP is required for each nesting level before the definition may be 3803 <a href=dpans6.htm#6.1.1380>EXIT</a>ed. 3804 An ambiguous condition exists if the loop-control parameters 3805 are unavailable. 3806 3807 <P> 3808 3809 <code> 3810 See: 3811 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 3812 <a href=dpansa6.htm#A.6.1.2380>A.6.1.2380 UNLOOP</a> 3813 </code> 3814 3815 <P> 3816 3817 <hr> 3818 <A name=6.1.2390> 3819 <code> 3820 6.1.2390 <b>UNTIL</b> 3821 </code> 3822 </a> 3823 <BR> 3824 CORE 3825 <BR> 3826 3827 <P> 3828 <pre> 3829 Interpretation: Interpretation semantics for this word are undefined. 3830 </pre> 3831 <P> 3832 <pre> 3833 Compilation: ( C: dest -- ) 3834 </pre> 3835 <P> 3836 3837 Append the run-time semantics given below to the current definition, 3838 resolving the backward reference dest. 3839 3840 <P> 3841 <pre> 3842 Run-time: ( x -- ) 3843 </pre> 3844 <P> 3845 3846 If all bits of x are zero, continue execution at the location specified 3847 by dest. 3848 3849 <P> 3850 3851 <code> 3852 See: 3853 <A href=dpans6.htm#6.1.0760>6.1.0760 BEGIN</a> , 3854 <a href=dpansa6.htm#A.6.1.2390>A.6.1.2390 UNTIL</a> 3855 </code> 3856 3857 <P> 3858 3859 <hr> 3860 <A name=6.1.2410> 3861 <code> 3862 6.1.2410 <b>VARIABLE</b> 3863 </code> 3864 </a> 3865 <BR> 3866 CORE 3867 <BR> 3868 <pre> 3869 ( <B>"<spaces>name"</B> -- ) 3870 </pre> 3871 3872 <P> 3873 3874 Skip leading space delimiters. Parse name delimited by a space. Create 3875 a definition for name with the execution semantics defined below. 3876 Reserve one cell of data space at an aligned address. 3877 3878 <P> 3879 3880 name is referred 3881 to as a <B>variable</B>. 3882 3883 <P> 3884 <pre> 3885 <i>name</i> Execution: ( -- a-addr ) 3886 </pre> 3887 <P> 3888 3889 a-addr is the address of the reserved cell. A program is responsible 3890 for initializing the contents of the reserved cell. 3891 3892 <P> 3893 3894 <code> 3895 See: 3896 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 3897 <a href=dpansa6.htm#A.6.1.2410>A.6.1.2410 VARIABLE</a> 3898 </code> 3899 3900 <P> 3901 3902 <hr> 3903 <A name=6.1.2430> 3904 <code> 3905 6.1.2430 <b>WHILE</b> 3906 </code> 3907 </a> 3908 <BR> 3909 CORE 3910 <BR> 3911 3912 <P> 3913 <pre> 3914 Interpretation: Interpretation semantics for this word are undefined. 3915 </pre> 3916 <P> 3917 <pre> 3918 Compilation: ( C: dest -- orig dest ) 3919 </pre> 3920 <P> 3921 3922 Put the location of a new unresolved forward reference orig onto the 3923 control flow stack, under the existing dest. Append the run-time 3924 semantics given below to the current definition. The semantics are 3925 incomplete until orig and dest are resolved (e.g., by 3926 <a href=dpans6.htm#6.1.2140>REPEAT</a>). 3927 3928 <P> 3929 <pre> 3930 Run-time: ( x -- ) 3931 </pre> 3932 <P> 3933 3934 If all bits of x are zero, continue execution at the location specified 3935 by the resolution of orig. 3936 3937 <P> 3938 <code> 3939 See: 3940 <a href=dpansa6.htm#A.6.1.2430>A.6.1.2430 WHILE</a> 3941 </code> 3942 <p> 3943 3944 <hr> 3945 <A name=6.1.2450> 3946 <code> 3947 6.1.2450 <b>WORD</b> 3948 </code> 3949 </a> 3950 <BR> 3951 CORE 3952 <BR> 3953 <pre> 3954 ( char <B>"<chars>ccc<char>"</B> -- c-addr ) 3955 </pre> 3956 3957 <P> 3958 3959 Skip leading delimiters. Parse characters ccc delimited by char. An 3960 ambiguous condition exists if the length of the parsed string is greater 3961 than the implementation-defined length of a counted string. 3962 3963 <P> 3964 3965 c-addr is the address of a transient region containing the parsed word 3966 as a counted string. If the parse area was empty or contained no 3967 characters other than the delimiter, the resulting string has a zero 3968 length. A space, not included in the length, follows the string. A 3969 program may replace characters within the string. 3970 3971 <P> 3972 3973 <b>Note:</b> The requirement to follow the string with a space is 3974 obsolescent and is included as a concession to existing programs that 3975 use 3976 <a href=dpans6.htm#6.2.0970>CONVERT</a>. 3977 A program shall not depend on the existence of the 3978 space. 3979 3980 3981 <P> 3982 3983 <code> 3984 See: 3985 <A href=dpans3.htm#3.3.3.6>3.3.3.6</a> Other transient regions, 3986 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 3987 <a href=dpans6.htm#6.2.2008>6.2.2008 PARSE</a> , 3988 <a href=dpansa6.htm#A.6.1.2450>A.6.1.2450 WORD</a> 3989 </code> 3990 3991 <P> 3992 3993 <hr> 3994 <A name=6.1.2490> 3995 <code> 3996 6.1.2490 <b>XOR</b> 3997 </code> 3998 </a> 3999 <BR> 4000 <B>x-or</B> CORE 4001 <BR> 4002 <pre> 4003 ( x1 x2 -- x3 ) 4004 </pre> 4005 4006 <P> 4007 4008 x3 is 4009 the bit-by-bit exclusive-or of x1 with x2. 4010 4011 <P> 4012 4013 <hr> 4014 <A name=6.1.2500> 4015 <code> 4016 6.1.2500 <b>[</b> 4017 </code> 4018 </a> 4019 <BR> 4020 <B>left-bracket</B> CORE 4021 <BR> 4022 4023 <P> 4024 <pre> 4025 Interpretation: Interpretation semantics for this word are undefined. 4026 </pre> 4027 <P> 4028 <pre> 4029 Compilation: Perform the execution semantics given below. 4030 </pre> 4031 <P> 4032 <pre> 4033 Execution: ( -- ) 4034 </pre> 4035 <P> 4036 4037 Enter interpretation 4038 state. [ is an immediate word. 4039 4040 <P> 4041 4042 <code> 4043 See: 4044 <A href=dpans3.htm#3.4>3.4</a> The Forth text interpreter, 4045 <A href=dpans3.htm#3.4.5>3.4.5</a> Compilation, 4046 <A href=dpans6.htm#6.1.2540>6.1.2540 ]</a> , 4047 <a href=dpansa6.htm#A.6.1.2500>A.6.1.2500 [</a> 4048 </code> 4049 4050 <P> 4051 4052 <hr> 4053 <A name=6.1.2510> 4054 <code> 4055 6.1.2510 <b>[']</b> 4056 </code> 4057 </a> 4058 <BR> 4059 <B>bracket-tick</B> CORE 4060 <BR> 4061 4062 <P> 4063 <pre> 4064 Interpretation: Interpretation semantics for this word are undefined. 4065 </pre> 4066 <P> 4067 <pre> 4068 Compilation: ( <B>"<spaces>name"</B> -- ) 4069 </pre> 4070 <P> 4071 4072 Skip leading space delimiters. Parse name delimited by a space. Find 4073 name. Append the run-time semantics given below to the current 4074 definition. 4075 4076 <P> 4077 4078 An ambiguous condition 4079 exists if name is not found. 4080 4081 <P> 4082 <pre> 4083 Run-time: ( -- xt ) 4084 </pre> 4085 <P> 4086 4087 Place name's execution token xt on the stack. The execution token 4088 returned by the compiled phrase 4089 <b><code>['] X</code></b> is the same value returned 4090 by <b><code>' X</code></b> outside of compilation state. 4091 4092 <P> 4093 4094 <code> 4095 See: 4096 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 4097 <A href=dpans6.htm#6.1.0070>6.1.0070 '</a> , 4098 <A href=dpansa6.htm#A.6.1.2033>A.6.1.2033 POSTPONE</a> , 4099 <a href=dpansa6.htm#A.6.1.2510>A.6.1.2510 [']</a> , 4100 <A href=dpansd.htm#D.6.7>D.6.7</a> Immediacy. 4101 </code> 4102 4103 <P> 4104 4105 <hr> 4106 <A name=6.1.2520> 4107 <code> 4108 6.1.2520 <b>[CHAR]</b> 4109 </code> 4110 </a> 4111 <BR> 4112 <B>bracket-char</B> CORE 4113 <BR> 4114 4115 <P> 4116 <pre> 4117 Interpretation: Interpretation semantics for this word are undefined. 4118 </pre> 4119 <P> 4120 <pre> 4121 Compilation: ( <B>"<spaces>name"</B> -- ) 4122 </pre> 4123 <P> 4124 4125 Skip leading space delimiters. Parse name delimited by a space. Append the 4126 run-time semantics given below to the current definition. 4127 4128 <P> 4129 <pre> 4130 Run-time: ( -- char ) 4131 </pre> 4132 <P> 4133 4134 Place char, the 4135 value of the first character of name, on the stack. 4136 4137 <P> 4138 4139 <code> 4140 See: 4141 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 4142 <A href=dpans6.htm#6.1.0895>6.1.0895 CHAR</a> , 4143 <a href=dpansa6.htm#A.6.1.2520>A.6.1.2520 [CHAR]</a> 4144 </code> 4145 4146 <P> 4147 4148 <hr> 4149 <A name=6.1.2540> 4150 <code> 4151 6.1.2540 <b>]</b> 4152 </code> 4153 </a> 4154 <BR> 4155 <B>right-bracket</B> CORE 4156 <BR> 4157 <pre> 4158 ( -- ) 4159 </pre> 4160 4161 <P> 4162 4163 Enter compilation 4164 state. 4165 4166 <P> 4167 4168 <code> 4169 See: 4170 <A href=dpans3.htm#3.4>3.4</a> The Forth text interpreter, 4171 <A href=dpans3.htm#3.4.5>3.4.5</a> Compilation, 4172 <A href=dpans6.htm#6.1.2500>6.1.2500 [</a> , 4173 <a href=dpansa6.htm#A.6.1.2540>A.6.1.2540 ]</a> , 4174 </code> 4175 4176 4177 <hr> 4178 <a name=6.2> 4179 <H2>6.2 Core extension words</H2> 4180 </a> 4181 4182 <p> 4183 <code> 4184 See: 4185 <a href=dpansa6.htm#A.6.2>A.6.2</a> Core extension words 4186 </code> 4187 <p> 4188 4189 <hr> 4190 <A name=6.2.0060> 4191 <code> 4192 6.2.0060 <b>#TIB</b> 4193 </code> 4194 </a> 4195 <BR> 4196 <B>number-t-i-b</B> CORE EXT 4197 <BR> 4198 <pre> 4199 ( -- a-addr ) 4200 </pre> 4201 4202 <P> 4203 4204 a-addr 4205 is the address of a cell containing the number of characters in the 4206 terminal input buffer. 4207 4208 <P> 4209 4210 <b>Note:</b> This word is obsolescent and is included as a concession to 4211 existing implementations. 4212 4213 4214 <P> 4215 <code> 4216 See: 4217 <a href=dpansa6.htm#A.6.2.0060>A.6.2.0060 #TIB</a> 4218 </code> 4219 <p> 4220 4221 <hr> 4222 <A name=6.2.0200> 4223 <code> 4224 6.2.0200 <b>.(</b> 4225 </code> 4226 </a> 4227 <BR> 4228 <B>dot-paren</B> CORE EXT 4229 <BR> 4230 4231 <P> 4232 <pre> 4233 Compilation: Perform the execution semantics given below. 4234 </pre> 4235 <P> 4236 <pre> 4237 Execution: ( <B>"ccc<paren>"</B> -- ) 4238 </pre> 4239 <P> 4240 4241 Parse and display ccc delimited by ) (right parenthesis). .( is an 4242 immediate word. 4243 4244 <P> 4245 4246 <code> 4247 See: 4248 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 4249 <A href=dpans6.htm#6.1.0190>6.1.0190 ."</a> , 4250 <a href=dpansa6.htm#A.6.2.0200>A.6.2.0200 .(</a> 4251 </code> 4252 4253 <P> 4254 4255 <hr> 4256 <A name=6.2.0210> 4257 <code> 4258 6.2.0210 <b>.R</b> 4259 </code> 4260 </a> 4261 <BR> 4262 <B>dot-r</B> CORE EXT 4263 <BR> 4264 <pre> 4265 ( n1 n2 -- ) 4266 </pre> 4267 4268 <P> 4269 4270 Display n1 right aligned in a field n2 characters wide. If the number 4271 of characters required to display n1 is greater than n2, all digits are 4272 displayed with no leading spaces in a field as wide as necessary. 4273 4274 <P> 4275 <code> 4276 See: 4277 <a href=dpansa6.htm#A.6.2.0210>A.6.2.0210 .R</a> 4278 </code> 4279 <p> 4280 4281 <hr> 4282 <A name=6.2.0260> 4283 <code> 4284 6.2.0260 <b>0<></b> 4285 </code> 4286 </a> 4287 <BR> 4288 <B>zero-not-equals</B> CORE EXT 4289 <BR> 4290 <pre> 4291 ( x -- flag ) 4292 </pre> 4293 4294 <P> 4295 4296 flag is 4297 true if and only if x is not equal to zero. 4298 4299 <P> 4300 4301 <hr> 4302 <A name=6.2.0280> 4303 <code> 4304 6.2.0280 <b>0></b> 4305 </code> 4306 </a> 4307 <BR> 4308 <B>zero-greater</B> CORE EXT 4309 <BR> 4310 <pre> 4311 ( n -- flag ) 4312 </pre> 4313 4314 <P> 4315 4316 flag is 4317 true if and only if n is greater than zero. 4318 4319 <P> 4320 4321 <hr> 4322 <A name=6.2.0340> 4323 <code> 4324 6.2.0340 <b>2>R</b> 4325 </code> 4326 </a> 4327 <BR> 4328 <B>two-to-r</B> CORE EXT 4329 <BR> 4330 4331 <P> 4332 <pre> 4333 Interpretation: Interpretation semantics for this word are undefined. 4334 </pre> 4335 <P> 4336 <pre> 4337 Execution: ( x1 x2 -- ) ( R: -- x1 x2 ) 4338 </pre> 4339 <P> 4340 4341 Transfer cell pair x1 x2 to the return stack. Semantically equivalent 4342 to 4343 <b><code> 4344 SWAP >R >R 4345 </code></b>. 4346 4347 <P> 4348 4349 <code> 4350 See: 4351 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 4352 <A href=dpans6.htm#6.1.0580>6.1.0580 >R</a> , 4353 <A href=dpans6.htm#6.1.2060>6.1.2060 R></a> , 4354 <A href=dpans6.htm#6.1.2070>6.1.2070 R@</a> , 4355 <A href=dpans6.htm#6.2.0410>6.2.0410 2R></a> , 4356 <A href=dpans6.htm#6.2.0415>6.2.0415 2R@</a> , 4357 <a href=dpansa6.htm#A.6.2.0340>A.6.2.0340 2>R</a> 4358 </code> 4359 4360 <P> 4361 4362 <hr> 4363 <A name=6.2.0410> 4364 <code> 4365 6.2.0410 <b>2R></b> 4366 </code> 4367 </a> 4368 <BR> 4369 <B>two-r-from</B> CORE EXT 4370 <BR> 4371 4372 <P> 4373 <pre> 4374 Interpretation: Interpretation semantics for this word are undefined. 4375 </pre> 4376 <P> 4377 <pre> 4378 Execution: ( -- x1 x2 ) ( R: x1 x2 -- ) 4379 </pre> 4380 <P> 4381 4382 Transfer cell pair x1 x2 from the return stack. Semantically equivalent 4383 to 4384 <b><code> 4385 R> R> SWAP 4386 </code></b>. 4387 4388 <P> 4389 4390 <code> 4391 See: 4392 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 4393 <A href=dpans6.htm#6.1.0580>6.1.0580 >R</a> , 4394 <A href=dpans6.htm#6.1.2060>6.1.2060 R></a> , 4395 <A href=dpans6.htm#6.1.2070>6.1.2070 R@</a> , 4396 <A href=dpans6.htm#6.2.0340>6.2.0340 2>R</a> , 4397 <A href=dpans6.htm#6.2.0415>6.2.0415 2R@</a> , 4398 <a href=dpansa6.htm#A.6.2.0410>A.6.2.0410 2R></a> 4399 </code> 4400 4401 <P> 4402 4403 <hr> 4404 <A name=6.2.0415> 4405 <code> 4406 6.2.0415 <b>2R@</b> 4407 </code> 4408 </a> 4409 <BR> 4410 <B>two-r-fetch</B> CORE EXT 4411 <BR> 4412 4413 <P> 4414 <pre> 4415 Interpretation: Interpretation semantics for this word are undefined. 4416 </pre> 4417 <P> 4418 <pre> 4419 Execution: ( -- x1 x2 ) ( R: x1 x2 -- x1 x2 ) 4420 </pre> 4421 <P> 4422 4423 Copy cell pair x1 x2 from the return stack. Semantically equivalent to 4424 <b><code> 4425 R> R> 2DUP >R >R SWAP 4426 </code></b>. 4427 4428 <P> 4429 4430 <code> 4431 See: 4432 <A href=dpans3.htm#3.2.3.3>3.2.3.3</a> Return stack, 4433 <A href=dpans6.htm#6.1.0580>6.1.0580 >R</a> , 4434 <A href=dpans6.htm#6.1.2060>6.1.2060 R></a> , 4435 <A href=dpans6.htm#6.1.2070>6.1.2070 R@</a> , 4436 <A href=dpans6.htm#6.2.0340>6.2.0340 2>R</a> , 4437 <A href=dpans6.htm#6.2.0410>6.2.0410 2R></a> 4438 </code> 4439 4440 <P> 4441 4442 <hr> 4443 <A name=6.2.0455> 4444 <code> 4445 6.2.0455 <b>:NONAME</b> 4446 </code> 4447 </a> 4448 <BR> 4449 <B>colon-no-name</B> CORE EXT 4450 <BR> 4451 <pre> 4452 ( C: -- colon-sys ) ( S: -- xt ) 4453 </pre> 4454 4455 <P> 4456 4457 Create an execution token xt, enter compilation state and start the 4458 current definition, producing colon-sys. Append the initiation 4459 semantics given below to the current definition. 4460 4461 <P> 4462 4463 The execution semantics of xt will be determined by the words compiled 4464 into the body of the definition. This definition can be executed later 4465 by using xt 4466 <a href=dpans6.htm#6.1.1370>EXECUTE</a>. 4467 4468 <P> 4469 4470 If the control-flow stack is implemented using the data stack, colon-sys 4471 shall be the topmost item on the data stack. 4472 4473 <p> 4474 4475 <pre> 4476 Initiation: ( i*x -- i*x ) ( R: -- nest-sys ) 4477 </pre> 4478 <P> 4479 4480 Save implementation-dependent information nest-sys about the calling 4481 definition. The stack effects i*x represent arguments to xt. 4482 4483 <P> 4484 <pre> 4485 <i>xt</i> Execution: ( i*x -- j*x ) 4486 </pre> 4487 <P> 4488 4489 Execute the definition specified by xt. The stack effects i*x and j*x 4490 represent arguments to and results from xt, respectively. 4491 4492 <P> 4493 <code> 4494 See: 4495 <a href=dpansa6.htm#A.6.2.0455>A.6.2.0455 :NONAME</a> , 4496 <A href=dpans3.htm#3.2.3.2>3.2.3.2</a> Control-flow stack. 4497 </code> 4498 <p> 4499 4500 <hr> 4501 <A name=6.2.0500> 4502 <code> 4503 6.2.0500 <b><></b> 4504 </code> 4505 </a> 4506 <BR> 4507 <B>not-equals</B> CORE EXT 4508 <BR> 4509 <pre> 4510 ( x1 x2 -- flag ) 4511 </pre> 4512 4513 <P> 4514 4515 flag is 4516 true if and only if x1 is not bit-for-bit the same as x2. 4517 4518 <P> 4519 4520 <hr> 4521 <A name=6.2.0620> 4522 <code> 4523 6.2.0620 <b>?DO</b> 4524 </code> 4525 </a> 4526 <BR> 4527 <B>question-do</B> CORE EXT 4528 <BR> 4529 4530 <P> 4531 <pre> 4532 Interpretation: Interpretation semantics for this word are undefined. 4533 </pre> 4534 <P> 4535 <pre> 4536 Compilation: ( C: -- do-sys ) 4537 </pre> 4538 <P> 4539 4540 Put do-sys onto the control-flow stack. Append the run-time semantics 4541 given below to the current definition. The semantics are incomplete 4542 until resolved by a consumer of do-sys such as 4543 <a href=dpans6.htm#6.1.1800>LOOP</a>. 4544 <P> 4545 <pre> 4546 Run-time: ( n1|u1 n2|u2 -- ) ( R: -- | loop-sys ) 4547 </pre> 4548 <P> 4549 4550 If n1|u1 is equal to n2|u2, continue execution at the location given by 4551 the consumer of do-sys. Otherwise set up loop control parameters with 4552 index n2|u2 and limit n1|u1 and continue executing immediately following 4553 ?DO. Anything already on the return stack becomes unavailable until the 4554 loop control parameters are discarded. An ambiguous condition exists if 4555 n1|u1 and n2|u2 are not both of the same type. 4556 4557 <P> 4558 4559 <code> 4560 See: 4561 <A href=dpans3.htm#3.2.3.2>3.2.3.2</a> Control-flow stack, 4562 <A href=dpans6.htm#6.1.0140>6.1.0140 +LOOP</a> , 4563 <A href=dpans6.htm#6.1.1240>6.1.1240 DO</a> , 4564 <A href=dpans6.htm#6.1.1680>6.1.1680 I</a> , 4565 <A href=dpans6.htm#6.1.1760>6.1.1760 LEAVE</a> , 4566 <A href=dpans6.htm#6.1.2380>6.1.2380 UNLOOP</a> , 4567 <a href=dpansa6.htm#A.6.2.0620>A.6.2.0620 ?DO</a> 4568 </code> 4569 4570 <P> 4571 4572 <hr> 4573 <A name=6.2.0700> 4574 <code> 4575 6.2.0700 <b>AGAIN</b> 4576 </code> 4577 </a> 4578 <BR> 4579 CORE EXT 4580 <BR> 4581 4582 <P> 4583 <pre> 4584 Interpretation: Interpretation semantics for this word are undefined. 4585 </pre> 4586 <P> 4587 <pre> 4588 Compilation: ( C: dest -- ) 4589 </pre> 4590 <P> 4591 4592 Append the run-time semantics given below to the current definition, 4593 resolving the backward reference dest. 4594 4595 <P> 4596 <pre> 4597 Run-time: ( -- ) 4598 </pre> 4599 <P> 4600 4601 Continue execution at the location specified by dest. If no other 4602 control flow words are used, any program code after AGAIN will not be 4603 executed. 4604 4605 <p> 4606 <code> 4607 See: 4608 <A href=dpans6.htm#6.1.0760>6.1.0760 BEGIN</a> , 4609 <a href=dpansa6.htm#A.6.2.0700>A.6.2.0700 AGAIN</a> 4610 </code> 4611 4612 <P> 4613 4614 <hr> 4615 <A name=6.2.0855> 4616 <code> 4617 6.2.0855 <b>C"</b> 4618 </code> 4619 </a> 4620 <BR> 4621 <B>c-quote</B> CORE EXT 4622 <BR> 4623 4624 <P> 4625 <pre> 4626 Interpretation: Interpretation semantics for this word are undefined. 4627 </pre> 4628 <P> 4629 <pre> 4630 Compilation: ( <B>"ccc<quote>"</B> -- ) 4631 </pre> 4632 <P> 4633 4634 Parse ccc delimited by " (double-quote) and append the run-time 4635 semantics given below to the current definition. 4636 4637 <P> 4638 <pre> 4639 Run-time: ( -- c-addr ) 4640 </pre> 4641 <P> 4642 4643 Return c-addr, a counted string consisting of the characters ccc. A 4644 program shall not alter the returned string. 4645 4646 <P> 4647 4648 <code> 4649 See: 4650 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 4651 <A href=dpans6.htm#6.1.2165>6.1.2165 S"</a> , 4652 <A href=dpans11.htm#11.6.1.2165>11.6.1.2165 S"</a> , 4653 <a href=dpansa6.htm#A.6.2.0855>A.6.2.0855 C"</a> 4654 </code> 4655 4656 <P> 4657 4658 <hr> 4659 <A name=6.2.0873> 4660 <code> 4661 6.2.0873 <b>CASE</b> 4662 </code> 4663 </a> 4664 <BR> 4665 CORE EXT 4666 <BR> 4667 4668 <P> 4669 <pre> 4670 Interpretation: Interpretation semantics for this word are undefined. 4671 </pre> 4672 <P> 4673 <pre> 4674 Compilation: ( C: -- case-sys ) 4675 </pre> 4676 <P> 4677 4678 Mark the start of the CASE ... 4679 <a href=dpans6.htm#6.2.1950>OF</a> ... 4680 <a href=dpans6.htm#6.2.1343>ENDOF</a> ... 4681 <a href=dpans6.htm#6.2.1342>ENDCASE</a> structure. 4682 Append the run-time semantics given below to the current definition. 4683 4684 <P> 4685 <pre> 4686 Run-time: ( -- ) 4687 </pre> 4688 <P> 4689 4690 Continue 4691 execution. 4692 4693 <P> 4694 4695 <code> 4696 See: 4697 <a href=dpansa6.htm#A.6.2.0873>A.6.2.0873 CASE</a> 4698 </code> 4699 4700 <P> 4701 4702 <hr> 4703 <A name=6.2.0945> 4704 <code> 4705 6.2.0945 <b>COMPILE,</b> 4706 </code> 4707 </a> 4708 <BR> 4709 <B>compile-comma</B> CORE EXT 4710 <BR> 4711 4712 <P> 4713 <pre> 4714 Interpretation: Interpretation semantics for this word are undefined. 4715 </pre> 4716 <P> 4717 <pre> 4718 Execution: ( xt -- ) 4719 </pre> 4720 <P> 4721 4722 Append the execution semantics of the definition represented by xt to 4723 the execution semantics of the current definition. 4724 4725 <P> 4726 <code> 4727 See: 4728 <a href=dpansa6.htm#A.6.2.0945>A.6.2.0945 COMPILE,</a> 4729 </code> 4730 <p> 4731 4732 <hr> 4733 <A name=6.2.0970> 4734 <code> 4735 6.2.0970 <b>CONVERT</b> 4736 </code> 4737 </a> 4738 <BR> 4739 CORE EXT 4740 <BR> 4741 <pre> 4742 ( ud1 c-addr1 -- ud2 c-addr2 ) 4743 </pre> 4744 4745 <P> 4746 4747 ud2 is the result of converting the characters within the text beginning 4748 at the first character after c-addr1 into digits, using the number in 4749 <a href=dpans6.htm#6.1.0750>BASE</a>, 4750 and adding each digit to ud1 after multiplying ud1 by the number 4751 in BASE. Conversion continues until a character that is not convertible 4752 is encountered. c-addr2 is the location of the first unconverted 4753 character. An ambiguous condition exists if ud2 overflows. 4754 4755 <P> 4756 4757 <b>Note:</b> This word is obsolescent and is included as a concession to 4758 existing implementations. Its function is superseded by 4759 <a href=dpans6.htm#6.1.0570>6.1.0570</a> 4760 >NUMBER. 4761 4762 <P> 4763 4764 <code> 4765 See: 4766 <A href=dpans3.htm#3.2.1.2>3.2.1.2</a> Digit conversion, 4767 <a href=dpansa6.htm#A.6.2.0970>A.6.2.0970 CONVERT</a> 4768 </code> 4769 4770 <P> 4771 4772 <hr> 4773 <A name=6.2.1342> 4774 <code> 4775 6.2.1342 <b>ENDCASE</b> 4776 </code> 4777 </a> 4778 <BR> 4779 <B>end-case</B> CORE EXT 4780 <BR> 4781 4782 <P> 4783 <pre> 4784 Interpretation: Interpretation semantics for this word are undefined. 4785 </pre> 4786 <P> 4787 <pre> 4788 Compilation: ( C: case-sys -- ) 4789 </pre> 4790 <P> 4791 4792 Mark the end of the 4793 <a href=dpans6.htm#6.2.0873>CASE</a> ... 4794 <a href=dpans6.htm#6.2.1950>OF</a> ... 4795 <a href=dpans6.htm#6.2.1343>ENDOF</a> 4796 ... ENDCASE structure. Use 4797 case-sys to resolve the entire structure. Append the run-time semantics 4798 given below to the current definition. 4799 4800 <P> 4801 <pre> 4802 Run-time: ( x -- ) 4803 </pre> 4804 <P> 4805 4806 Discard the 4807 case selector x and continue execution. 4808 4809 <P> 4810 4811 <code> 4812 See: 4813 <a href=dpansa6.htm#A.6.2.1342>A.6.2.1342 ENDCASE</a> 4814 </code> 4815 4816 <P> 4817 4818 <hr> 4819 <A name=6.2.1343> 4820 <code> 4821 6.2.1343 <b>ENDOF</b> 4822 </code> 4823 </a> 4824 <BR> 4825 <B>end-of</B> CORE EXT 4826 <BR> 4827 4828 <P> 4829 <pre> 4830 Interpretation: Interpretation semantics for this word are undefined. 4831 </pre> 4832 <P> 4833 <pre> 4834 Compilation: ( C: case-sys1 of-sys -- case-sys2 ) 4835 </pre> 4836 <P> 4837 4838 Mark the end of the 4839 <a href=dpans6.htm#6.2.1950>OF</a> 4840 ... ENDOF part of the 4841 <a href=dpans6.htm#6.2.0873>CASE</a> 4842 structure. The next 4843 location for a transfer of control resolves the reference given by 4844 of-sys. Append the run-time semantics given below to the current 4845 definition. Replace case-sys1 with case-sys2 on the control-flow stack, 4846 to be resolved by 4847 <a href=dpans6.htm#6.2.1342>ENDCASE</a>. 4848 4849 <P> 4850 <pre> 4851 Run-time: ( -- ) 4852 </pre> 4853 <P> 4854 4855 Continue execution at 4856 the location specified by the consumer of case-sys2. 4857 4858 <P> 4859 4860 <code> 4861 See: 4862 <a href=dpansa6.htm#A.6.2.1343>A.6.2.1343 ENDOF</a> 4863 </code> 4864 4865 <P> 4866 4867 <hr> 4868 <A name=6.2.1350> 4869 <code> 4870 6.2.1350 <b>ERASE</b> 4871 </code> 4872 </a> 4873 <BR> 4874 CORE EXT 4875 <BR> 4876 <pre> 4877 ( addr u -- ) 4878 </pre> 4879 4880 <P> 4881 4882 If u 4883 is greater than zero, clear all bits in each of u consecutive address 4884 units of memory beginning at addr . 4885 4886 <P> 4887 4888 <hr> 4889 <A name=6.2.1390> 4890 <code> 4891 6.2.1390 <b>EXPECT</b> 4892 </code> 4893 </a> 4894 <BR> 4895 CORE EXT 4896 <BR> 4897 <pre> 4898 ( c-addr +n -- ) 4899 </pre> 4900 4901 <P> 4902 4903 Receive a string of at most +n characters. Display graphic characters 4904 as they are received. A program that depends on the presence or absence 4905 of non-graphic characters in the string has an environmental dependency. 4906 The editing functions, if any, that the system performs in order to 4907 construct the string of characters are implementation-defined. 4908 4909 <P> 4910 4911 Input terminates when an implementation-defined line terminator is 4912 received or when the string is +n characters long. When input 4913 terminates, nothing is appended to the string and the display is 4914 maintained in an implementation-defined way. 4915 4916 <P> 4917 4918 Store the 4919 string at c-addr and its length in 4920 <a href=dpans6.htm#6.2.2240>SPAN</a>. 4921 4922 <P> 4923 4924 <b>Note:</b> This word is obsolescent and is included as a concession to 4925 existing implementations. Its function is superseded by 4926 <a href=dpans6.htm#6.1.0695>6.1.0695</a> 4927 ACCEPT. 4928 4929 4930 <P> 4931 <code> 4932 See: 4933 <a href=dpansa6.htm#A.6.2.1390>A.6.2.1390 EXPECT</a> 4934 </code> 4935 <p> 4936 4937 <hr> 4938 <A name=6.2.1485> 4939 <code> 4940 6.2.1485 <b>FALSE</b> 4941 </code> 4942 </a> 4943 <BR> 4944 CORE EXT 4945 <BR> 4946 <pre> 4947 ( -- false ) 4948 </pre> 4949 4950 <P> 4951 4952 Return a 4953 false flag. 4954 4955 <P> 4956 4957 <code> 4958 See: 4959 <A href=dpans3.htm#3.1.3.1>3.1.3.1</a> Flags 4960 </code> 4961 4962 <P> 4963 4964 <hr> 4965 <A name=6.2.1660> 4966 <code> 4967 6.2.1660 <b>HEX</b> 4968 </code> 4969 </a> 4970 <BR> 4971 CORE EXT 4972 <BR> 4973 <pre> 4974 ( -- ) 4975 </pre> 4976 4977 <P> 4978 4979 Set contents 4980 of 4981 <a href=dpans6.htm#6.1.0750>BASE</a> 4982 to sixteen. 4983 4984 4985 <P> 4986 4987 <hr> 4988 <A name=6.2.1850> 4989 <code> 4990 6.2.1850 <b>MARKER</b> 4991 </code> 4992 </a> 4993 <BR> 4994 CORE EXT 4995 <BR> 4996 <pre> 4997 ( <B>"<spaces>name"</B> -- ) 4998 </pre> 4999 5000 <P> 5001 5002 Skip leading space delimiters. Parse name delimited by a space. Create 5003 a definition for name with the execution semantics defined below. 5004 5005 <P> 5006 <pre> 5007 <i>name</i> Execution: ( -- ) 5008 </pre> 5009 <P> 5010 5011 Restore all dictionary allocation and search order pointers to the state 5012 they had just prior to the definition of name. Remove the definition of 5013 name and all subsequent definitions. Restoration of any structures 5014 still existing that could refer to deleted definitions or deallocated 5015 data space is not necessarily provided. No other contextual information 5016 such as numeric base is affected. 5017 5018 <P> 5019 5020 <code> 5021 See: 5022 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 5023 <A href=dpans15.htm#15.6.2.1580>15.6.2.1580 FORGET</a> , 5024 <a href=dpansa6.htm#A.6.2.1850>A.6.2.1850 MARKER</a> 5025 </code> 5026 5027 5028 <P> 5029 5030 <hr> 5031 <A name=6.2.1930> 5032 <code> 5033 6.2.1930 <b>NIP</b> 5034 </code> 5035 </a> 5036 <BR> 5037 CORE EXT 5038 <BR> 5039 <pre> 5040 ( x1 x2 -- x2 ) 5041 </pre> 5042 5043 <P> 5044 5045 Drop the 5046 first item below the top of stack. 5047 5048 5049 <P> 5050 5051 <hr> 5052 <A name=6.2.1950> 5053 <code> 5054 6.2.1950 <b>OF</b> 5055 </code> 5056 </a> 5057 <BR> 5058 CORE EXT 5059 <BR> 5060 5061 <P> 5062 <pre> 5063 Interpretation: Interpretation semantics for this word are undefined. 5064 </pre> 5065 <P> 5066 <pre> 5067 Compilation: ( C: -- of-sys ) 5068 </pre> 5069 <P> 5070 5071 Put of-sys onto the control flow stack. Append the run-time semantics 5072 given below to the current definition. The semantics are incomplete 5073 until resolved by a consumer of of-sys such as 5074 <a href=dpans6.htm#6.2.1343>ENDOF</a>. 5075 5076 <P> 5077 <pre> 5078 Run-time: ( x1 x2 -- | x1 ) 5079 </pre> 5080 <P> 5081 5082 If the two values on the stack are not equal, discard the top value and 5083 continue execution at the location specified by the consumer of of-sys, 5084 e.g., following the next ENDOF. Otherwise, discard both values and 5085 continue execution in line. 5086 5087 <P> 5088 5089 <code> 5090 See: 5091 <A href=dpans6.htm#6.2.0873>6.2.0873 CASE</a> , 5092 <A href=dpans6.htm#6.2.1342>6.2.1342 ENDCASE</a> , 5093 <a href=dpansa6.htm#A.6.2.1950>A.6.2.1950 OF</a> 5094 </code> 5095 5096 <P> 5097 5098 <hr> 5099 <A name=6.2.2000> 5100 <code> 5101 6.2.2000 <b>PAD</b> 5102 </code> 5103 </a> 5104 <BR> 5105 CORE EXT 5106 <BR> 5107 <pre> 5108 ( -- c-addr ) 5109 </pre> 5110 5111 <P> 5112 5113 c-addr is the address of a transient region that can be used to hold 5114 data for intermediate processing. 5115 5116 <P> 5117 5118 <code> 5119 See: 5120 <A href=dpans3.htm#3.3.3.6>3.3.3.6</a> Other transient regions, 5121 <a href=dpansa6.htm#A.6.2.2000>A.6.2.2000 PAD</a> 5122 </code> 5123 5124 <P> 5125 5126 <hr> 5127 <A name=6.2.2008> 5128 <code> 5129 6.2.2008 <b>PARSE</b> 5130 </code> 5131 </a> 5132 <BR> 5133 CORE EXT 5134 <BR> 5135 <pre> 5136 ( char <B>"ccc<char>"</B> -- c-addr u ) 5137 </pre> 5138 5139 <P> 5140 5141 Parse ccc 5142 delimited by the delimiter char. 5143 5144 <P> 5145 5146 c-addr is the address (within the input buffer) and u is the length of 5147 the parsed string. If the parse area was empty, the resulting string 5148 has a zero length. 5149 5150 <P> 5151 5152 <code> 5153 See: 5154 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 5155 <a href=dpansa6.htm#A.6.2.2008>A.6.2.2008 PARSE</a> 5156 </code> 5157 5158 5159 <P> 5160 5161 <hr> 5162 <A name=6.2.2030> 5163 <code> 5164 6.2.2030 <b>PICK</b> 5165 </code> 5166 </a> 5167 <BR> 5168 CORE EXT 5169 <BR> 5170 <pre> 5171 ( xu ... x1 x0 u -- xu ... x1 x0 xu ) 5172 </pre> 5173 5174 <P> 5175 5176 Remove u. 5177 Copy the xu to the top of the stack. An ambiguous condition exists 5178 if there are less than u+2 items on the stack before PICK is executed. 5179 5180 <P> 5181 <code> 5182 See: 5183 <a href=dpansa6.htm#A.6.2.2030>A.6.2.2030 PICK</a> 5184 </code> 5185 <p> 5186 5187 <hr> 5188 <A name=6.2.2040> 5189 <code> 5190 6.2.2040 <b>QUERY</b> 5191 </code> 5192 </a> 5193 <BR> 5194 CORE EXT 5195 <BR> 5196 <pre> 5197 ( -- ) 5198 </pre> 5199 5200 <P> 5201 5202 Make the user input device the input source. Receive input into the 5203 terminal input buffer, replacing any previous contents. Make the 5204 result, whose address is returned by 5205 <a href=dpans6.htm#6.2.2290>TIB</a>, 5206 the input buffer. Set 5207 <a href=dpans6.htm#6.1.0560>>IN</a> 5208 to zero. 5209 5210 <P> 5211 5212 <b>Note:</b> This word is obsolescent and is included as a concession to 5213 existing implementations. 5214 5215 <P> 5216 <code> 5217 See: 5218 <a href=dpansa6.htm#A.6.2.2040>A.6.2.2040 QUERY</a> , 5219 <a href=a0006.htm>RFI 0006</a>. 5220 </code> 5221 <p> 5222 5223 <hr> 5224 <A name=6.2.2125> 5225 <code> 5226 6.2.2125 <b>REFILL</b> 5227 </code> 5228 </a> 5229 <BR> 5230 CORE EXT 5231 <BR> 5232 <pre> 5233 ( -- flag ) 5234 </pre> 5235 5236 <P> 5237 5238 Attempt to fill the input buffer from the input source, returning a true 5239 flag if successful. 5240 5241 <P> 5242 5243 When the input source is the user input device, attempt to receive input 5244 into the terminal input buffer. If successful, make the result the 5245 input buffer, set 5246 <a href=dpans6.htm#6.1.0560>>IN</a> 5247 to zero, and return true. Receipt of a line 5248 containing no characters is considered successful. If there is no input 5249 available from the current input source, return false. 5250 5251 <P> 5252 5253 When the input source is a string from 5254 <a href=dpans6.htm#6.1.1360>EVALUATE</a>, 5255 return false and 5256 perform no other action. 5257 5258 <P> 5259 5260 <code> 5261 See: 5262 <A href=dpans7.htm#7.6.2.2125>7.6.2.2125 REFILL</a> , 5263 <A href=dpans11.htm#11.6.2.2125>11.6.2.2125 REFILL</a> , 5264 <a href=dpansa6.htm#A.6.2.2125>A.6.2.2125 REFILL</a> 5265 </code> 5266 5267 <P> 5268 5269 <hr> 5270 <A name=6.2.2148> 5271 <code> 5272 6.2.2148 <b>RESTORE-INPUT</b> 5273 </code> 5274 </a> 5275 <BR> 5276 CORE EXT 5277 <BR> 5278 <pre> 5279 ( xn ... x1 n -- flag ) 5280 </pre> 5281 5282 <P> 5283 5284 Attempt to restore the input source specification to the state described 5285 by x1 through xn. flag is true if the input source specification cannot 5286 be so restored. 5287 5288 <P> 5289 5290 An ambiguous condition exists if the input source represented by the 5291 arguments is not the same as the current input source. 5292 5293 <P> 5294 5295 <code> 5296 See: 5297 <A href=dpansa6.htm#A.6.2.2182>A.6.2.2182 SAVE-INPUT</a> 5298 </code> 5299 5300 <P> 5301 5302 <hr> 5303 <A name=6.2.2150> 5304 <code> 5305 6.2.2150 <b>ROLL</b> 5306 </code> 5307 </a> 5308 <BR> 5309 CORE EXT 5310 <BR> 5311 <pre> 5312 ( xu xu-1 ... x0 u -- xu-1 ... x0 xu ) 5313 </pre> 5314 5315 <P> 5316 5317 Remove u. Rotate u+1 items on the top of the stack. An ambiguous 5318 condition exists if there are less than u+2 items on the stack before 5319 ROLL is executed. 5320 5321 <P> 5322 <code> 5323 See: 5324 <a href=dpansa6.htm#A.6.2.2150>A.6.2.2150 ROLL</a> 5325 </code> 5326 <p> 5327 5328 <hr> 5329 <A name=6.2.2182> 5330 <code> 5331 6.2.2182 <b>SAVE-INPUT</b> 5332 </code> 5333 </a> 5334 <BR> 5335 CORE EXT 5336 <BR> 5337 <pre> 5338 ( -- xn ... x1 n ) 5339 </pre> 5340 5341 <P> 5342 5343 x1 through xn describe the current state of the input source 5344 specification for later use by 5345 <a href=dpans6.htm#6.2.2148>RESTORE-INPUT</a>. 5346 5347 <P> 5348 <code> 5349 See: 5350 <a href=dpansa6.htm#A.6.2.2182>A.6.2.2182 SAVE-INPUT</a> 5351 </code> 5352 <p> 5353 5354 <hr> 5355 <A name=6.2.2218> 5356 <code> 5357 6.2.2218 <b>SOURCE-ID</b> 5358 </code> 5359 </a> 5360 <BR> 5361 <B>source-i-d</B> CORE EXT 5362 <BR> 5363 <pre> 5364 ( -- 0 | -1 ) 5365 </pre> 5366 5367 <P> 5368 5369 Identifies the 5370 input source as follows: 5371 5372 <P> 5373 5374 5375 <PRE> 5376 SOURCE-ID Input source 5377 -1 String (via <a href=dpans6.htm#6.1.1360>EVALUATE</a>) 5378 0 User input device 5379 </PRE> 5380 5381 <P> 5382 5383 <code> 5384 See: 5385 <A href=dpans11.htm#11.6.1.2218>11.6.1.2218 SOURCE-ID</a> 5386 </code> 5387 5388 <P> 5389 5390 <hr> 5391 <A name=6.2.2240> 5392 <code> 5393 6.2.2240 <b>SPAN</b> 5394 </code> 5395 </a> 5396 <BR> 5397 CORE EXT 5398 <BR> 5399 <pre> 5400 ( -- a-addr ) 5401 </pre> 5402 5403 <P> 5404 5405 a-addr is the address of a cell containing the count of characters 5406 stored by the last execution of 5407 <a href=dpans6.htm#6.2.1390>EXPECT</a>. 5408 5409 <P> 5410 5411 <b>Note:</b> This word is obsolescent and is included as a concession to 5412 existing implementations. 5413 5414 5415 <P> 5416 5417 <hr> 5418 <A name=6.2.2290> 5419 <code> 5420 6.2.2290 <b>TIB</b> 5421 </code> 5422 </a> 5423 <BR> 5424 <B>t-i-b</B> CORE EXT 5425 <BR> 5426 <pre> 5427 ( -- c-addr ) 5428 </pre> 5429 5430 <P> 5431 5432 c-addr 5433 is the address of the terminal input buffer. 5434 5435 <P> 5436 5437 <b>Note:</b> This word is obsolescent and is included as a concession to 5438 existing implementations. 5439 5440 <P> 5441 <code> 5442 See: 5443 <a href=dpansa6.htm#A.6.2.2290>A.6.2.2290 TIB</a> , 5444 <a href=a0006.htm>RFI 0006</a>. 5445 </code> 5446 <P> 5447 5448 <hr> 5449 <A name=6.2.2295> 5450 <code> 5451 6.2.2295 <b>TO</b> 5452 </code> 5453 </a> 5454 <BR> 5455 CORE EXT 5456 <BR> 5457 5458 <P> 5459 5460 <pre> 5461 Interpretation: ( x <B>"<spaces>name"</B> -- ) 5462 </pre> 5463 <P> 5464 5465 Skip leading spaces and parse name delimited by a space. Store x in 5466 name. An ambiguous condition exists if name was not defined by 5467 <a href=dpans6.htm#6.2.2405>VALUE</a>. 5468 5469 <P> 5470 <pre> 5471 Compilation: ( <B>"<spaces>name"</B> -- ) 5472 </pre> 5473 <P> 5474 5475 Skip leading spaces and parse name delimited by a space. Append the 5476 run-time semantics given below to the current definition. An ambiguous 5477 condition exists if name was not defined by VALUE. 5478 5479 <P> 5480 <pre> 5481 Run-time: ( x -- ) 5482 </pre> 5483 <P> 5484 5485 Store x 5486 in name. 5487 5488 <P> 5489 5490 <b>Note:</b> An ambiguous condition exists if either 5491 <a href=dpans6.htm#6.1.2033>POSTPONE</a> or 5492 <a href=dpans6.htm#6.2.2530>[COMPILE]</a> 5493 is applied to TO. 5494 5495 <P> 5496 5497 <code> 5498 See: 5499 <A href=dpans13.htm#13.6.1.2295>13.6.1.2295 TO</a> , 5500 <a href=dpansa6.htm#A.6.2.2295>A.6.2.2295 TO</a> 5501 </code> 5502 5503 <P> 5504 5505 <hr> 5506 <A name=6.2.2298> 5507 <code> 5508 6.2.2298 <b>TRUE</b> 5509 </code> 5510 </a> 5511 <BR> 5512 CORE EXT 5513 <BR> 5514 <pre> 5515 ( -- true ) 5516 </pre> 5517 5518 <P> 5519 5520 Return a 5521 true flag, a single-cell value with all bits set. 5522 5523 <P> 5524 5525 <code> 5526 See: 5527 <A href=dpans3.htm#3.1.3.1>3.1.3.1</a> Flags, 5528 <a href=dpansa6.htm#A.6.2.2298>A.6.2.2298 TRUE</a> 5529 </code> 5530 5531 <P> 5532 5533 <hr> 5534 <A name=6.2.2300> 5535 <code> 5536 6.2.2300 <b>TUCK</b> 5537 </code> 5538 </a> 5539 <BR> 5540 CORE EXT 5541 <BR> 5542 <pre> 5543 ( x1 x2 -- x2 x1 x2 ) 5544 </pre> 5545 5546 <P> 5547 5548 Copy the 5549 first (top) stack item below the second stack item. 5550 5551 <P> 5552 5553 <hr> 5554 <A name=6.2.2330> 5555 <code> 5556 6.2.2330 <b>U.R</b> 5557 </code> 5558 </a> 5559 <BR> 5560 <B>u-dot-r</B> CORE EXT 5561 <BR> 5562 <pre> 5563 ( u n -- ) 5564 </pre> 5565 5566 <P> 5567 5568 Display u right aligned in a field n characters wide. If the number of 5569 characters required to display u is greater than n, all digits are 5570 displayed with no leading spaces in a field as wide as necessary. 5571 5572 <P> 5573 5574 <hr> 5575 <A name=6.2.2350> 5576 <code> 5577 6.2.2350 <b>U></b> 5578 </code> 5579 </a> 5580 <BR> 5581 <B>u-greater-than</B> CORE EXT 5582 <BR> 5583 <pre> 5584 ( u1 u2 -- flag ) 5585 </pre> 5586 5587 <P> 5588 5589 flag is 5590 true if and only if u1 is greater than u2. 5591 5592 <P> 5593 5594 <code> 5595 See: 5596 <A href=dpans6.htm#6.1.0540>6.1.0540 ></a> 5597 </code> 5598 5599 <P> 5600 5601 <hr> 5602 <A name=6.2.2395> 5603 <code> 5604 6.2.2395 <b>UNUSED</b> 5605 </code> 5606 </a> 5607 <BR> 5608 CORE EXT 5609 <BR> 5610 <pre> 5611 ( -- u ) 5612 </pre> 5613 5614 <P> 5615 5616 u is 5617 the amount of space remaining in the region addressed by 5618 <a href=dpans6.htm#6.1.1650>HERE</a> , in 5619 address units. 5620 5621 <P> 5622 5623 <hr> 5624 <A name=6.2.2405> 5625 <code> 5626 6.2.2405 <b>VALUE</b> 5627 </code> 5628 </a> 5629 <BR> 5630 CORE EXT 5631 <BR> 5632 <pre> 5633 ( x <B>"<spaces>name"</B> -- ) 5634 </pre> 5635 5636 <P> 5637 5638 Skip leading 5639 space delimiters. Parse name delimited by a space. Create a 5640 definition for name with the execution semantics defined below, with an 5641 initial value equal to x. 5642 5643 <P> 5644 5645 name is 5646 referred to as a <B>value</B>. 5647 5648 <P> 5649 <pre> 5650 <i>name</i> Execution: ( -- x ) 5651 </pre> 5652 <P> 5653 5654 Place x on the stack. The value of x is that given when name 5655 was created, 5656 until the phrase <b><code>x TO name</code></b> 5657 is executed, causing a new value of x to be 5658 associated with name. 5659 5660 <P> 5661 5662 <code> 5663 See: 5664 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 5665 <a href=dpansa6.htm#A.6.2.2405>A.6.2.2405 VALUE</a> , 5666 <a href=dpans6.htm#6.2.2295>6.2.2295 TO</a> 5667 </code> 5668 5669 <P> 5670 5671 <hr> 5672 <A name=6.2.2440> 5673 <code> 5674 6.2.2440 <b>WITHIN</b> 5675 </code> 5676 </a> 5677 <BR> 5678 CORE EXT 5679 <BR> 5680 <pre> 5681 ( n1|u1 n2|u2 n3|u3 -- flag ) 5682 </pre> 5683 5684 <P> 5685 5686 Perform a comparison of a test value n1|u1 with a lower limit n2|u2 and 5687 an upper limit n3|u3, returning true if either (n2|u2 < n3|u3 and 5688 (n2|u2 <= n1|u1 and n1|u1 < n3|u3)) or (n2|u2 > n3|u3 and 5689 (n2|u2 <= n1|u1 or n1|u1 < n3|u3)) is true, returning false 5690 otherwise. An ambiguous condition exists if n1|u1, n2|u2, and n3|u3 are 5691 not all the same type. 5692 5693 <P> 5694 <code> 5695 See: 5696 <a href=dpansa6.htm#A.6.2.2440>A.6.2.2440 WITHIN</a> 5697 </code> 5698 <p> 5699 5700 <hr> 5701 <A name=6.2.2530> 5702 <code> 5703 6.2.2530 <b>[COMPILE]</b> 5704 </code> 5705 </a> 5706 <BR> 5707 <B>bracket-compile</B> CORE EXT 5708 <BR> 5709 5710 <P> 5711 <pre> 5712 Intrepretation: Interpretation semantics for this word are undefined. 5713 </pre> 5714 <P> 5715 <pre> 5716 Compilation: ( <B>"<spaces>name"</B> -- ) 5717 </pre> 5718 <P> 5719 5720 Skip leading space delimiters. Parse name delimited by a space. Find 5721 name. If name has other than default compilation semantics, append them 5722 to the current definition; otherwise append the execution semantics of 5723 name. An ambiguous condition exists if name is not found. 5724 5725 <P> 5726 5727 <code> 5728 See: 5729 <A href=dpans3.htm#3.4.1>3.4.1</a> Parsing, 5730 <a href=dpans6.htm#6.1.2033>6.1.2033 POSTPONE</a> , 5731 <a href=dpansa6.htm#A.6.2.2530>A.6.2.2530 [COMPILE]</a> 5732 </code> 5733 5734 <P> 5735 5736 <hr> 5737 <A name=6.2.2535> 5738 <code> 5739 6.2.2535 <b>\</b> 5740 </code> 5741 </a> 5742 <BR> 5743 <B>backslash</B> CORE EXT 5744 <BR> 5745 5746 <P> 5747 <pre> 5748 Compilation: Perform the execution semantics given below. 5749 </pre> 5750 <P> 5751 <pre> 5752 Execution: ( <B>"ccc<eol>"</B>-- ) 5753 </pre> 5754 <P> 5755 5756 Parse and discard 5757 the remainder of the parse area. \ is an immediate word. 5758 5759 <P> 5760 5761 <code> 5762 See: 5763 <A href=dpans7.htm#7.6.2.2535>7.6.2.2535 \</a> , 5764 <a href=dpansa6.htm#A.6.2.2535>A.6.2.2535 \</a> 5765 </code> 5766 5767 <P> 5768 5769 5770 <hr> 5771 <A href=dpans.htm#toc><IMG src="up.gif" ></A> Table of Contents 5772 <BR> 5773 <A href=dpans7.htm><IMG src="right.gif" ></A> 5774 Next Section 5775 <P> 5776 </BODY> 5777 </HTML> 5778