
\ ------------------------------------------------------------------------------
\  A little bit of artwork using the multitasker
\ ------------------------------------------------------------------------------

task: printrandom-task

: printrandom& ( -- )

  printrandom-task activate

  begin
    random dup 0<
    if
      [char] /
    else
      [char] \
    then

    over $4000 and if $80 or then \ Random highlight

    swap

    \ Calculate position from the random number in a 16x8 grid
    dup  $07 and          xres *
    swap $78 and 3 rshift 80 +
    +

    char!
    30 ms
  again
;

printrandom& multitask

tasks
