Created
July 24, 2012 19:54
-
-
Save WideWord/3172232 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:main | |
set a, process1 | |
jsr process_create | |
set a, process2 | |
jsr process_create | |
jsr process_exit; exit from main process | |
:process1 | |
set [mutex], 1; lock | |
sub [data], 1 | |
set [mutex], 0; unlock | |
set pc, process1; loop | |
:process2 | |
set [mutex], 1;lock | |
add [data], 1 | |
set [mutex], 0;unlock | |
set pc, process2; loop | |
:data | |
dat 0x5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
library: https://gist.github.com/3172206