<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 9/1/10 4:57 PM, Programmingkid wrote:
    <blockquote
      cite="mid:677550D5-1759-403C-8588-BFBBB7FE1E85@gmail.com"
      type="cite"><br>
      <div>
        <div>On Sep 1, 2010, at 6:00 AM, <a moz-do-not-send="true"
            href="mailto:openbios-request@openbios.org">openbios-request@openbios.org</a>
          wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite"><span class="Apple-style-span"
            style="border-collapse: separate; font-family: Helvetica;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-indent: 0px; text-transform: none;
            white-space: normal; widows: 2; word-spacing: 0px;
            font-size: medium;">Message: 5<br>
            Date: Tue, 31 Aug 2010 20:11:30 -0400<br>
            From: Tarl Neustaedter <<a moz-do-not-send="true"
              href="mailto:tarl-b2@tarl.net">tarl-b2@tarl.net</a>><br>
            To: The OpenBIOS Mailinglist <<a moz-do-not-send="true"
              href="mailto:openbios@openbios.org">openbios@openbios.org</a>><br>
            Subject: Re: [OpenBIOS] Concatenating strings<br>
            Message-ID: <<a moz-do-not-send="true"
              href="mailto:4C7D9A32.2070300@tarl.net">4C7D9A32.2070300@tarl.net</a>><br>
            Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
            <br>
             On 2010-8-31 8:06 PM, Programmingkid wrote:<br>
            <blockquote type="cite">Could someone provide me with a code
              example on how to combine two strings<span
                class="Apple-converted-space"> </span><br>
            </blockquote>
            <blockquote type="cite">together in forth please. Here is my
              attempt. For some reason it doesn't<span
                class="Apple-converted-space"> </span><br>
            </blockquote>
            <blockquote type="cite">work. Any help would be great.<br>
            </blockquote>
            <br>
            The below takes two strings of the form (addr len),
            allocates a chunk of<span class="Apple-converted-space"> </span><br>
            memory for them, and concatenates them into that allocated
            memory, returning<span class="Apple-converted-space"> </span><br>
            addr len.<br>
            <br>
            : $cat2  ( $1 $2 -- $3 )<br>
               2 pick over +  dup >r alloc-mem >r<br>
               2swap tuck  r@ swap move           ( $2 $1-len )<br>
               r@ + swap move                     ( )<br>
               r> r><br>
            ;<br>
          </span></blockquote>
      </div>
      <br>
      <div>Thank you very much Tarl. This word should be added to
        OpenBIOS. </div>
      <div><br>
      </div>
    </blockquote>
    Please make sure whether the already existing functions (ie. in
    openbios/forth/lib/string.fs) work for you before adding new stuff.<br>
    <br>
    Stefan<br>
  </body>
</html>