issueid=375 04-01-2013 12:49
Super Moderator
Number of reported issues by Petr Schreiber: 162
We have Peek for retrieving memory, Poke for writing memory, but no simple memory copy command


I think in addition to traditional single task Peek and Poke it would be nice to have function performing memory copy from address x to addres y.
The syntax could look like:
Memory_Copy(sourceAddress, destinationAddress, lengthInBytes)
The functionality would be similar to this ThinBASIC equivalent:
Sub Memory_Copy(sourceAddress As DWord, destinationAddress As DWord, lengthInBytes As DWord)
  String sourceData =  Peek$(sourceAddress, lengthInBytes)  
  Poke$(destinationAddress, sourceData)
End Sub
Issue Details
Issue Number 375
Issue Type Feature
Project thinBasic
Category Core engine (thinCore.dll)
Status Implemented
Priority 2
Suggested Version 1.9.1
Implemented Version 1.9.2
Milestone (none)
Votes for this feature 0
Votes against this feature 0
Assigned Users (none)
Tags (none)

06-01-2013 12:20
thinBasic author
Check attached new thinCore 1.9.2 Beta (bottom of this thread)

I've implemented the following functions:

String = Memory_Get(Address, Size)
String = Memory_Set(DestinationAddress, sBuffer [, Size])
String = Memory_Copy(SourceAddress, DestinationAddress, Size)
All functions return a string representing the memory area involved into the operation

Let me know.

07-01-2013 09:40
Super Moderator
I almost forgot how fast you are Eros :D, perfect!

I just tested all the 3 on OpenCL example and they work 100%


+ Reply