CopyBank.htm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>CopyBank src_bank,src_offset,dest_bank,dest_offset,count</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. src_bank = handle of source memory bank <br />
  13. src_offset = offset location to start copying from <br />
  14. dest_bank = handle of destination memory bank <br />
  15. dest_offset = offset location to start writing to <br />
  16. count = how many bytes to copy
  17. </td>
  18. </tr>
  19. </table>
  20. <h1>Description</h1>
  21. <table>
  22. <tr>
  23. <td>
  24. Copies data from one memory bank to another.
  25. </td>
  26. </tr>
  27. </table>
  28. <h1><a href=../2d_examples/CopyBank.bb>Example</a></h1>
  29. <table>
  30. <tr>
  31. <td>
  32. ; BankSize, ResizeBank, CopyBank Example <br />
  33. <br />
  34. ; create a bank <br />
  35. bnkTest=CreateBank(5000) <br />
  36. <br />
  37. ; Fill it with rand Integers <br />
  38. For t = 0 To 4999 <br />
  39. PokeByte bnkTest,t,Rand(9) <br />
  40. Next <br />
  41. <br />
  42. ; Resize the bank <br />
  43. ResizeBank bnkTest,10000 <br />
  44. <br />
  45. ; Copy the first half of the bank to the second half <br />
  46. CopyBank bnkTest,0,bnkTest,5000,5000 <br />
  47. <br />
  48. ; Print final banksize <br />
  49. Print BankSize(bnkTest)
  50. </td>
  51. </tr>
  52. </table>
  53. <br>
  54. <a target=_top href=../index.htm>Index</a><br>
  55. <br>
  56. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=CopyBank&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  57. </html>