A86: Re: Strings and stuff


[Prev][Next][Index][Thread]

A86: Re: Strings and stuff




On the string question, I'd copy it to temporary space, say _textShadow.

ld hl,_op2                    ;copy from _op2
ld de,_textShadow     ;to _textShadow
ld bc,(bytes in string not including terminator) ;x bytes
ldir                                ;copy
ld hl,_op1                    ;copy from _op1
ld bc,(bytes in second string including terminator)
ldir                                ;to _textShadow + length of last string

The result is _op1's string is appended to the end of _op2's and is stuck in
_textShadow

-Tim


----- Original Message -----
From: "Jason Shirey" <shiwokarauotoko@juno.com>
To: <assembly-86@lists.ticalc.org>
Sent: Friday, October 06, 2000 2:45 PM
Subject: A86: Strings and stuff


>
> How does one append strings in assembly? Here's an example:
> I create some string from a real value and store it into some op, say
> op1...what if I store op1 into op2, repeat the process, getting another
> string in op1, and wish to output op1 appended to op2: how would I do
this?
> in BASIC: set a="1", b="2"; a+b="12"
>
> Also, how do I get the dimensions of an arrayed variable? Is it part of
the
> variable's name, like data type?
> in BASIC: set a={1,2,3}; diml a=3 or set a==[[1,2][3,4]]; dim a={2,2}
>
>
>
>




References: