Versions Compared

Key

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

Command: Fill longs of main memory with a value.

((PUBPRI))
   LONGFILL(StartAddress, Value, Count )

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

...

Explanation

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

...

...

Using LONGFILL

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

Code Block
VAR

...


  long Buff[100]

...



PUB Main

...


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

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