Author Topic: How to use the Copy and Fill commands  (Read 3178 times)

0 Members and 1 Guest are viewing this topic.

Offline hardyboy16jm

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
How to use the Copy and Fill commands
« on: November 03, 2012, 11:37:33 pm »
How do I use the Copy and Fill commands? Are they related? Please go in depth.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: How to use the Copy and Fill commands
« Reply #1 on: November 03, 2012, 11:39:54 pm »
Fill(PTR,SIZE) : The byte already at PTR is copied to all the bytes after it until SIZE bytes have been filled with that value. Zero is not a valid Size.
Fill(PTR,SIZE,BYTE) : SIZE bytes of data starting at PTR are filled with a value. SIZE must be greater than 1.

Copy(PTR1,PTR2,SIZE) : SIZE bytes starting from PTR1 are copied to PTR2 onwards. Zero is not a valid Size.

This is what the commands index says. I think it's pretty straightforward unless you don't understand pointers. If you don't understand pointers, check out this explanation, it's pretty good. (You can find other excellent tutorials and explanations of stuff here) If you still have questions, feel free to clarify/respond.
« Last Edit: November 03, 2012, 11:45:18 pm by squidgetx »