<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title> words/word.asm </title>
    <meta name="keywords" content="amforth programming language Forth ATmega ATMEL">
    <meta name="description" content="amforth - laguage Forth for ATMEL ATmega">
    <!-- AUTOINCLUDE START "Page/Head.en.ihtml" DO NOT REMOVE -->
    <link rel="StyleSheet" href="../../../../Web/CSS/MLAB.css" type="text/css" title="MLAB Basic Style">
    <link rel="StyleSheet" href="../../../../Web/CSS/MLAB_Print.css" type="text/css" media="print">
    <link rel="shortcut icon" type="image/x-icon" href="../../../../Web/PIC/MLAB.ico">
    <script type="text/javascript" src="../../../../Web/JS/MLAB_Menu.js"></script>
    <!-- AUTOINCLUDE END -->
  </head>

  <body lang="en">

    <!-- AUTOINCLUDE START "Page/Header.en.ihtml" DO NOT REMOVE -->
    <!-- ============== HEADER ============== -->
    <div class="Header">
      <script type="text/javascript">
      <!--
        SetRelativePath("../../../../");
        DrawHeader();
      // -->
      </script>
      <noscript>
        <p><b> JavaScript is required for including of the header </b></p>
      </noscript>
    </div>
    <!-- AUTOINCLUDE END -->

    <!-- AUTOINCLUDE START "Page/Menu.en.ihtml" DO NOT REMOVE -->
    <!-- ============== MENU ============== -->
    <div class="Menu">
      <script type="text/javascript">
      <!--
        SetRelativePath("../../../../");
        DrawMenu();
      // -->
      </script>
      <noscript>
        <p><b> JavaScript is required for including of the menu </b><p>
      </noscript>
    </div>
    <!-- AUTOINCLUDE END -->

    <!-- ============== TEXT ============== -->
    <div class="Text">

      <h1> words/word.asm </h1>

      <p>
        <input type=button onClick="history.back()" value="Back">
        <input type=button onClick="history.forward()" value="Forward">
        <a href="../WordList.en.html">Jump to Vocabulary</a>
      </p>

      <pre>
; ( c -- addr ) Tools
; R( -- )
; skip leading delimiter characters and parses TIB to the next delimiter. copy the word into PAD
VE_WORD:
    .db $04, &quot;word&quot;,0
    .dw VE_HEAD
    .set VE_HEAD = VE_WORD
XT_WORD:
    .dw DO_COLON
PFA_WORD:
    .dw XT_TO_R     ; ( -- )
    .dw XT_SOURCE   ; ( -- addr len)
    .dw XT_G_IN     ; ( -- addr len &gt;in)
    .dw XT_FETCH
    .dw XT_SLASHSTRING ; ( -- addr' len' )

    .dw XT_SWAP        ; ( -- len' addr' )
    .dw XT_OVER        ; ( -- len' addr' len')
    .dw XT_R_FETCH     ; ( -- len' addr' len' c)
    .dw XT_CSKIP       ; ( -- len' addr'' len'')
    .dw XT_ROT         ; ( -- addr'' len'' len')
    .dw XT_OVER        ; ( -- addr'' len'' len' len'')
    .dw XT_MINUS       ; ( -- addr'' len'' dlen)
    .dw XT_G_IN        ; ( -- addr'' len'' dlen &gt;in)
    .dw XT_PLUSSTORE   ; ( -- addr'' len'')

    .dw XT_R_FROM      ; ( -- addr'' len'' c)
    .dw XT_CSCAN       ; ( -- addr''' len''')
    .dw XT_DUP         ; ( -- addr''' len''' len''')
    .dw XT_1PLUS       ;
    .dw XT_G_IN
    .dw XT_PLUSSTORE   ; ( -- addr''' len''')
    .dw XT_PAD         ; ( -- addr''' len''' pad)
    .dw XT_OVER        ; ( -- addr''' len''' pad len''')
    .dw XT_OVER        ; ( -- addr''' len''' pad len''' pad)
    .dw XT_CSTORE      ; ( -- addr''' len''' pad)
    .dw XT_1PLUS       ; ( -- addr''' len''' pad+1)
    .dw XT_SWAP        ; ( -- addr''' pad+1 len''')
    .dw XT_CMOVE_G     ; ( --- )
    .dw XT_PAD

    .dw XT_ZERO        ; append a zero byte. find/icompare _does_ need it
    .dw XT_PAD
    .dw XT_DUP
    .dw XT_CFETCH
    .dw XT_PLUS        ; ( -- pad pad+len )
    .dw XT_1PLUS
    .dw XT_CSTORE
    .dw XT_EXIT
</pre>

      <p>
        <input type=button onClick="history.back()" value="Back">
        <input type=button onClick="history.forward()" value="Forward">
        <a href="../WordList.en.html">Jump to Vocabulary</a>
      </p>

    </div>

    <!-- AUTOINCLUDE START "Page/Footer.en.ihtml" DO NOT REMOVE -->
    <!-- ============== FOOTER ============== -->
    <div class="Footer">
      <script type="text/javascript">
      <!--
        SetRelativePath("../../../../");
        DrawFooter();
      // -->
      </script>
      <noscript>
        <p><b> JavaScript is required for including of the footer </b></p>
      </noscript>
    </div>
    <!-- AUTOINCLUDE END -->

  </body>
</html>