51 lines
1.6 KiB
HTML
51 lines
1.6 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20">
|
||
|
<TITLE>cc65 function reference: Alphabetical function reference: _swap</TITLE>
|
||
|
<LINK HREF="funcref-54.html" REL=next>
|
||
|
<LINK HREF="funcref-52.html" REL=previous>
|
||
|
<LINK HREF="funcref.html#toc3" REL=contents>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<A HREF="funcref-54.html">Next</A>
|
||
|
<A HREF="funcref-52.html">Previous</A>
|
||
|
<A HREF="funcref.html#toc3">Contents</A>
|
||
|
<HR>
|
||
|
<H2><A NAME="_swap"></A> 3.8 <A HREF="funcref.html#toc3.8">_swap</A></H2>
|
||
|
|
||
|
|
||
|
<P>
|
||
|
<BLOCKQUOTE>
|
||
|
<DL>
|
||
|
<DT><B>Function</B><DD><P>Swap the contents of memory areas.</P>
|
||
|
<DT><B>Header</B><DD><P><CODE>
|
||
|
<A HREF="funcref-38.html#stdlib.h">stdlib.h</A></CODE></P>
|
||
|
<DT><B>Declaration</B><DD><P><CODE>void __fastcall__ _swap (void* p, void* q, size_t size);</CODE></P>
|
||
|
<DT><B>Description</B><DD><P><CODE>_swap</CODE> will swap (exchange) the contents of the two memory
|
||
|
areas pointed to by <CODE>p</CODE> and <CODE>q</CODE>. Both memory areas are assumed to be
|
||
|
<CODE>size</CODE> bytes in size.</P>
|
||
|
<DT><B>Limits</B><DD><P>
|
||
|
<UL>
|
||
|
<LI>The memory areas may not overlap, otherwise the results are undefined.</LI>
|
||
|
<LI>The function is only available as fastcall function, so it may only be
|
||
|
used in presence of a prototype.</LI>
|
||
|
</UL>
|
||
|
</P>
|
||
|
<DT><B>Availability</B><DD><P>cc65</P>
|
||
|
<DT><B>See also</B><DD><P>
|
||
|
<A HREF="funcref-141.html#memcpy">memcpy</A>,
|
||
|
<A HREF="funcref-142.html#memmove">memmove</A></P>
|
||
|
<DT><B>Example</B><DD><P>None.</P>
|
||
|
</DL>
|
||
|
</BLOCKQUOTE>
|
||
|
</P>
|
||
|
|
||
|
|
||
|
<HR>
|
||
|
<A HREF="funcref-54.html">Next</A>
|
||
|
<A HREF="funcref-52.html">Previous</A>
|
||
|
<A HREF="funcref.html#toc3">Contents</A>
|
||
|
</BODY>
|
||
|
</HTML>
|