FAQ  •  Register  •  Login

poke string address,string$

<<

programandala.net

Posts: 98

Joined: Fri Apr 09, 2010 12:50 am

Location: España/Hispanujo/Spain

Post Wed May 21, 2014 5:17 pm

poke string address,string$

I think POKE STRING would be useful in many situations. It would poke the content of a string (not its lenght). I've written it this way:

  Code:
sub fastcall pokeString(address as uinteger,text$ as string)
  asm
  ; HL = first parameter, address
  ex de,hl    ; DE = address
  pop bc      ; return address
  pop hl      ; second parameter, address of the text$ lenght
  push bc     ; restore the return address
  ld c,(hl)
  inc hl
  ld b,(hl)   ; BC = text$ lenght
  inc hl      ; HL = first char of text$
  ldir
  end asm
end sub


The advantage of a native POKE STRING would be POKE would work with all current types.
<<

programandala.net

Posts: 98

Joined: Fri Apr 09, 2010 12:50 am

Location: España/Hispanujo/Spain

Post Sat May 24, 2014 4:56 pm

Re: poke string address,string$

I've just found a thread by LCD on the same subject, POKE STRING and @string$, where Boriel explains the memcopy library can be used instead.

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO