Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Command: Fill words of main memory with a value.

((PUBPRI))
   WORDFILL (StartAddress, Value, Count )

  • StartAddress is an expression indicating the location of the first word of memory to fill with Value.
  • Value is an expression indicating the value to fill words with.
  • Count is an expression indicating the number of words to fill, starting with StartAddress.

...

Explanation

WORDFILL is one of three commands (BYTEFILL, WORDFILL, and LONGFILL) used to fill blocks of main memory with a specific value. WORDFILL fills Count words of main memory with Value, starting at location StartAddress.

...

Using WORDFILL

WORDFILL is a great way to clear large blocks of word-sized memory. For example:

Code Block
VAR

...


  word Buff[100]

...

 

PUB Main

...


  wordfill(@Buff, 0, 100)        'Clear Buff to 0  

The first line of the Main method, above, clears the entire 100-word (200-byte) Buff array to all zeros. WORDFILL is faster at this task than a dedicated REPEAT loop is.