Re: A86: String Variables


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

Re: A86: String Variables



The easiest thing to do is generally just to copy it to some ram location and
work with it from there:

ld hl,stringvar
rst 20h
rst 10h
call _DATA_SIZE_TO_DE
call _SET_ABS_SRC_ADDR
xor a
ld hl,deststring   ;whereever you want to copy to
call _SET_ABS_DEST_ADDR
ex de,hl
call _MM_LDIR_SET_SIZE

This would copy the entire contents of the string to deststring, so you can
just do ld hl,deststring and copy it wherever you want, or display it, or
compare it, or whatever else it is you want to do with it!  :-)


In a message dated 2/11/2001 1:42:05 PM Eastern Standard Time,
shiwokarauotoko@juno.com writes:


How does one get hl to point to a string variable so as to be able to use
the variable in calls like _strcopy etc?
I tried something like:
ld hl,stringvar1
rst 20h
rst 10h
call _ex_ahl_bde
call _load_ram_ahl
jp _puts;just to display the string to make sure everything's working
properly





----
Jonah Cohen
<ComAsYuAre@aol.com>
http://jonah.ticalc.org