Skip to content

Instantly share code, notes, and snippets.

@WideWord
Created July 24, 2012 19:54
Show Gist options
  • Save WideWord/3172232 to your computer and use it in GitHub Desktop.
Save WideWord/3172232 to your computer and use it in GitHub Desktop.
: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
@Quby
Copy link

Quby commented Jul 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment