<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 1, 2010, at 6:00 AM, <a 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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Message: 5<br>Date: Tue, 31 Aug 2010 20:11:30 -0400<br>From: Tarl Neustaedter <<a href="mailto:tarl-b2@tarl.net">tarl-b2@tarl.net</a>><br>To: The OpenBIOS Mailinglist <<a href="mailto:openbios@openbios.org">openbios@openbios.org</a>><br>Subject: Re: [OpenBIOS] Concatenating strings<br>Message-ID: <<a 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></body></html>