Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
poke string address,string$
#1
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.
Reply
#2
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)