Hello.
First off, I am aware that you can poke a string via P8SCII:
@addrnnnn[binstr] poke nnnn bytes to address addr
!addr[binstr] poke all remaining characters to address addr
Yet that is a little unusual for us beginners and I would like to suggest @zep that you add this ability to poke()
so you can have poke(addr,string)
which would take the entire contents of that string and convert every character to a byte and POKE it in the memory location stated.
In return this should also have PEEK thus: string=peek(addr,len)
which would transfer the contents of memory addr
with a length of len
to the string in question.
Bonus for poking arrays and peeking arrays additionally.
poke4(addr,array[])
which would normally take the array which uses 4-bytes per element and stuff that into memory addr
Same with peek array[index]=peek4(addr,len)
However these other two would be nice, poke2(addr,array[]) and array[index]=peek2(addr,len)
where in this case array[] would not contain a decimal value and only return a number from -32768 to 32767.
And poke(addr,array[])
and array[index]=peek(addr,len)
would create an array that only contains numbers 0 to 255.
One last item, to be able to poke a single character thus: poke(addr,string[1])
which would poke the ord()
(ASCII) of the very first character in string. Currently it does not work without ord() poke(addr,ord(string[1])
a="hello" cls() poke(0x6000,ord(a[1])) ?"",0,64 |
What do you think guys, would you like this ?
[Please log in to post a comment]