#INCLUDE "course.module"

PROC forked.thing (MOBILE []INT data)
  SEQ i = 0 FOR 1000
    RESCHEDULE () -- do nothing
:

PROC main (CHAN BYTE kyb?, scr!, err!)
  FORKING
    MOBILE []INT data:
    SEQ
      data := MOBILE [8]INT
      SEQ i = 0 FOR SIZE data
        data[i] := #3113

      out.string ("pre-FORK, SIZE data = ", 0, scr!)
      out.int (SIZE data, 0, scr!)
      scr ! '*n'

      FORK forked.thing (CLONE data)

      out.string ("post-FORK, SIZE data = ", 0, scr!)
      out.int (SIZE data, 0, scr!)
      scr ! '*n'
:
