> On Sep 5, 2010, at 6:00 AM, openbios-request(a)openbios.org wrote:
> On 9/1/10 4:57 PM, Programmingkid wrote:
> On Sep 1, 2010, at 6:00 AM, openbios-request(a)openbios.org
> <mailto:firstname.lastname@example.org> wrote:
> Message: 5
> Date: Tue, 31 Aug 2010 20:11:30 -0400
> From: Tarl Neustaedter <tarl-b2(a)tarl.net <mailto:email@example.com>>
> To: The OpenBIOS Mailinglist <openbios(a)openbios.org
> Subject: Re: [OpenBIOS] Concatenating strings
> Message-ID: <4C7D9A32.2070300(a)tarl.net
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> On 2010-8-31 8:06 PM, Programmingkid wrote:
> Could someone provide me with a code example on how to combine two
> together in forth please. Here is my attempt. For some reason it
> work. Any help would be great.
> The below takes two strings of the form (addr len), allocates a chunk of
> memory for them, and concatenates them into that allocated memory,
> addr len.
> : $cat2 ( $1 $2 -- $3 )
> 2 pick over + dup >r alloc-mem >r
> 2swap tuck r@ swap move ( $2 $1-len )
> r@ + swap move ( )
> r> r>
> Thank you very much Tarl. This word should be added to OpenBIOS.
> Please make sure whether the already existing functions (ie. in
> openbios/forth/lib/string.fs) work for you before adding new stuff.
Sorry Stefan, but the words there are not very useful. $cat looks a lot more useful and user-friendly than tmpstrcat. Adding $cat to string.fs would make an excellent addition the OpenBIOS.