PokeByte.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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>PokeByte bank,offset,value</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. bank - bank handle <br />
  13. offset - offset in bytes, that the poke operation will be started at <br />
  14. value - value that will be written to bank
  15. </td>
  16. </tr>
  17. </table>
  18. <h1>Description</h1>
  19. <table>
  20. <tr>
  21. <td>
  22. Writes a byte into a memory bank. <br />
  23. <br />
  24. A byte takes up one byte of a memory bank. Values can be in the range 0 to 255.
  25. <br>
  26. <br>
  27. See also: <a class=small href=PokeShort.htm>PokeShort</a>, <a class=small href=PokeInt.htm>PokeInt</a>, <a class=small href=PokeFloat.htm>PokeFloat</a>.
  28. </td>
  29. </tr>
  30. </table>
  31. <h1><a href=../2d_examples/PokeByte.bb>Example</a></h1>
  32. <table>
  33. <tr>
  34. <td>
  35. ; Bank Commands Example <br />
  36. ; --------------------- <br />
  37. <br />
  38. bnkTest=CreateBank(12) <br />
  39. <br />
  40. PokeByte bnkTest,0,Rand(255) <br />
  41. PokeShort bnkTest,1,Rand(65535) <br />
  42. PokeInt bnkTest,3,Rand(-2147483648,2147483647) <br />
  43. PokeFloat bnkTest,7,0.5 <br />
  44. <br />
  45. Print PeekByte(bnkTest,0) <br />
  46. Print PeekShort(bnkTest,1) <br />
  47. Print PeekInt(bnkTest,3) <br />
  48. Print PeekFloat(bnkTest,7) <br />
  49. <br />
  50. FreeBank bnkTest
  51. </td>
  52. </tr>
  53. </table>
  54. <br>
  55. <a target=_top href=../index.htm>Index</a><br>
  56. <br>
  57. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=PokeByte&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  58. </html>