《操作系统》的实验代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
246 B

  1. # assumes %bx has loop count in it
  2. .main
  3. .top
  4. # critical section
  5. mov 2000, %ax # get the value at the address
  6. add $1, %ax # increment it
  7. mov %ax, 2000 # store it back
  8. # see if we're still looping
  9. sub $1, %bx
  10. test $0, %bx
  11. jgt .top
  12. halt