File:  [gforth] / gforth / arch / r8c / tasker.fs
Revision 1.8: download - view: text, annotated - select for diffs
Wed Dec 10 15:44:12 2008 UTC (13 years, 11 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Cleared distribution conditions

    1: \ Multitasker
    2: \ this file is in the public domain
    3: 
    4: rom
    5: 
    6: Variable bgtask ram $20 cells allot rom
    7: :noname  bgtask @ 0= ?EXIT
    8:     rp@ bgtask @ sp@ cell+ bgtask ! sp! rp! ;
    9: IS pause
   10: : task r> bgtask $20 cells + !
   11:   bgtask $20 cells + bgtask $10 cells + !
   12:   bgtask $10 cells + bgtask ! ;
   13: :noname echo @ IF
   14:      BEGIN pause key? UNTIL THEN (key) ;
   15: is key
   16: 
   17: ram

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>