basic.%memxcpy C Function/BASIC Program

basic.%memxcpy

Command basic.%memxcpy C Function/BASIC Program
Applicable release versions: AP/Unix
Category BASIC Program (486)
Description copies "number/2" characters from memory area "s2" into "s1", and converts each input character into two ASCII hexadecimal characters '0' to '9' and 'A' to 'F'.

"s1" and "s2" are either Pick/BASIC strings or pointers to a character. "variable" is a pointer after the last converted character in "s2" . If "s2" is a Pick string, the value returned by this function has no meaning.
Syntax variable=(char*)%memxcpy(s1, s2, number )
Options
Example
* Obtain Unix space
ptr=(char*)%malloc( 2048 )
* Read from Unix file
n=%read( fd, (char*)ptr, 1024 ) 
* Convert the binary data into HEX ASCII
char buffer[2048]
%memxcpy( buffer, (char*)ptr, n*2 )
Purpose
Related basic.cfunction
basic.cfunc
basic.%memccpy
basic.%memcpy