[关闭]
@JudyYe 2016-04-26T11:45:05.000000Z 字数 4941 阅读 444

SPOC 练习题

os


  1. dx Thread 0
  2. 0
  3. -1 1000 sub $1,%dx
  4. -1 1001 test $0,%dx
  5. -1 1002 jgte .top
  6. -1 1003 halt
  1. dx Thread 0 Thread 1
  2. 3
  3. 2 1000 sub $1,%dx
  4. 2 1001 test $0,%dx
  5. 2 1002 jgte .top
  6. 1 1000 sub $1,%dx
  7. 1 1001 test $0,%dx
  8. 1 1002 jgte .top
  9. 0 1000 sub $1,%dx
  10. 0 1001 test $0,%dx
  11. 0 1002 jgte .top
  12. -1 1000 sub $1,%dx
  13. -1 1001 test $0,%dx
  14. -1 1002 jgte .top
  15. -1 1003 halt
  16. 3 ----- Halt;Switch ----- ----- Halt;Switch -----
  17. 2 1000 sub $1,%dx
  18. 2 1001 test $0,%dx
  19. 2 1002 jgte .top
  20. 1 1000 sub $1,%dx
  21. 1 1001 test $0,%dx
  22. 1 1002 jgte .top
  23. 0 1000 sub $1,%dx
  24. 0 1001 test $0,%dx
  25. 0 1002 jgte .top
  26. -1 1000 sub $1,%dx
  27. -1 1001 test $0,%dx
  28. -1 1002 jgte .top
  29. -1 1003 halt
  1. dx Thread 0 Thread 1
  2. 3
  3. 2 1000 sub $1,%dx
  4. 3 ------ Interrupt ------ ------ Interrupt ------
  5. 2 1000 sub $1,%dx
  6. 2 1001 test $0,%dx
  7. 2 ------ Interrupt ------ ------ Interrupt ------
  8. 2 1001 test $0,%dx
  9. 2 1002 jgte .top
  10. 1 1000 sub $1,%dx
  11. 2 ------ Interrupt ------ ------ Interrupt ------
  12. 2 1002 jgte .top
  13. 1 ------ Interrupt ------ ------ Interrupt ------
  14. 1 1001 test $0,%dx
  15. 1 1002 jgte .top
  16. 0 1000 sub $1,%dx
  17. 2 ------ Interrupt ------ ------ Interrupt ------
  18. 1 1000 sub $1,%dx
  19. 1 1001 test $0,%dx
  20. 1 1002 jgte .top
  21. 0 ------ Interrupt ------ ------ Interrupt ------
  22. 0 1001 test $0,%dx
  23. 0 1002 jgte .top
  24. -1 1000 sub $1,%dx
  25. 1 ------ Interrupt ------ ------ Interrupt ------
  26. 0 1000 sub $1,%dx
  27. 0 1001 test $0,%dx
  28. -1 ------ Interrupt ------ ------ Interrupt ------
  29. -1 1001 test $0,%dx
  30. -1 1002 jgte .top
  31. -1 1003 halt
  32. 0 ----- Halt;Switch ----- ----- Halt;Switch -----
  33. 0 ------ Interrupt ------ ------ Interrupt ------
  34. 0 1002 jgte .top
  35. -1 1000 sub $1,%dx
  36. -1 ------ Interrupt ------ ------ Interrupt ------
  37. -1 1001 test $0,%dx
  38. -1 1002 jgte .top
  39. -1 ------ Interrupt ------ ------ Interrupt ------
  40. -1 1003 halt
  1. 2000 bx Thread 0
  2. 0 0
  3. 0 0 1000 mov 2000, %ax
  4. 0 0 1001 add $1, %ax
  5. 1 0 1002 mov %ax, 2000
  6. 1 -1 1003 sub $1, %bx
  7. 1 -1 1004 test $0, %bx
  8. 1 -1 1005 jgt .top
  9. 1 -1 1006 halt
  1. dx Thread 0 Thread 1
  2. 3
  3. 2 1000 sub $1,%dx
  4. 3 ------ Interrupt ------ ------ Interrupt ------
  5. 2 1000 sub $1,%dx
  6. 2 1001 test $0,%dx
  7. 2 ------ Interrupt ------ ------ Interrupt ------
  8. 2 1001 test $0,%dx
  9. 2 1002 jgte .top
  10. 1 1000 sub $1,%dx
  11. 2 ------ Interrupt ------ ------ Interrupt ------
  12. 2 1002 jgte .top
  13. 1 ------ Interrupt ------ ------ Interrupt ------
  14. 1 1001 test $0,%dx
  15. 1 1002 jgte .top
  16. 2 ------ Interrupt ------ ------ Interrupt ------
  17. 1 1000 sub $1,%dx
  18. 1 1001 test $0,%dx
  19. 1 ------ Interrupt ------ ------ Interrupt ------
  20. 0 1000 sub $1,%dx
  21. 1 ------ Interrupt ------ ------ Interrupt ------
  22. 1 1002 jgte .top
  23. 0 ------ Interrupt ------ ------ Interrupt ------
  24. 0 1001 test $0,%dx
  25. 0 1002 jgte .top
  26. -1 1000 sub $1,%dx
  27. 1 ------ Interrupt ------ ------ Interrupt ------
  28. 0 1000 sub $1,%dx
  29. 0 1001 test $0,%dx
  30. -1 ------ Interrupt ------ ------ Interrupt ------
  31. -1 1001 test $0,%dx
  32. -1 1002 jgte .top
  33. 0 ------ Interrupt ------ ------ Interrupt ------
  34. 0 1002 jgte .top
  35. -1 ------ Interrupt ------ ------ Interrupt ------
  36. -1 1003 halt
  37. 0 ----- Halt;Switch ----- ----- Halt;Switch -----
  38. -1 1000 sub $1,%dx
  39. -1 1001 test $0,%dx
  40. -1 ------ Interrupt ------ ------ Interrupt ------
  41. -1 1002 jgte .top
  42. -1 1003 halt
  1. 2000 bx Thread 0 Thread 1
  2. 0 0
  3. 0 0 1000 mov 2000, %ax
  4. 0 0 1001 add $1, %ax
  5. 0 0 ------ Interrupt ------ ------ Interrupt ------
  6. 0 0 1000 mov 2000, %ax
  7. 0 0 1001 add $1, %ax
  8. 0 0 ------ Interrupt ------ ------ Interrupt ------
  9. 1 0 1002 mov %ax, 2000
  10. 1 -1 1003 sub $1, %bx
  11. 1 -1 1004 test $0, %bx
  12. 1 0 ------ Interrupt ------ ------ Interrupt ------
  13. 1 0 1002 mov %ax, 2000
  14. 1 -1 ------ Interrupt ------ ------ Interrupt ------
  15. 1 -1 1005 jgt .top
  16. 1 -1 1006 halt
  17. 1 0 ----- Halt;Switch ----- ----- Halt;Switch -----
  18. 1 0 ------ Interrupt ------ ------ Interrupt ------
  19. 1 -1 1003 sub $1, %bx
  20. 1 -1 1004 test $0, %bx
  21. 1 -1 ------ Interrupt ------ ------ Interrupt ------
  22. 1 -1 1005 jgt .top
  23. 1 -1 1006 halt
  1. 2000 bx Thread 0 Thread 1
  2. 0 0
  3. 0 0 1000 mov 2000, %ax
  4. 0 0 1001 add $1, %ax
  5. 1 0 1002 mov %ax, 2000
  6. 1 -1 1003 sub $1, %bx
  7. 1 0 ------ Interrupt ------ ------ Interrupt ------
  8. 1 0 1000 mov 2000, %ax
  9. 1 0 1001 add $1, %ax
  10. 1 -1 ------ Interrupt ------ ------ Interrupt ------
  11. 1 -1 1004 test $0, %bx
  12. 1 -1 1005 jgt .top
  13. 1 0 ------ Interrupt ------ ------ Interrupt ------
  14. 2 0 1002 mov %ax, 2000
  15. 2 -1 1003 sub $1, %bx
  16. 2 -1 1004 test $0, %bx
  17. 2 -1 ------ Interrupt ------ ------ Interrupt ------
  18. 2 -1 1006 halt
  19. 2 -1 ----- Halt;Switch ----- ----- Halt;Switch -----
  20. 2 -1 1005 jgt .top
  21. 2 -1 1006 halt
  1. 2000 bx Thread 0 Thread 1
  2. 0 1
  3. 0 1 1000 mov 2000, %ax
  4. 0 1 ------ Interrupt ------ ------ Interrupt ------
  5. 0 1 1000 mov 2000, %ax
  6. 0 1 ------ Interrupt ------ ------ Interrupt ------
  7. 0 1 1001 add $1, %ax
  8. 0 1 ------ Interrupt ------ ------ Interrupt ------
  9. 0 1 1001 add $1, %ax
  10. 0 1 ------ Interrupt ------ ------ Interrupt ------
  11. 1 1 1002 mov %ax, 2000
  12. 1 1 ------ Interrupt ------ ------ Interrupt ------
  13. 1 1 1002 mov %ax, 2000
  14. 1 1 ------ Interrupt ------ ------ Interrupt ------
  15. 1 0 1003 sub $1, %bx
  16. 1 1 ------ Interrupt ------ ------ Interrupt ------
  17. 1 0 1003 sub $1, %bx
  18. 1 0 ------ Interrupt ------ ------ Interrupt ------
  19. 1 0 1004 test $0, %bx
  20. 1 0 ------ Interrupt ------ ------ Interrupt ------
  21. 1 0 1004 test $0, %bx
  22. 1 0 ------ Interrupt ------ ------ Interrupt ------
  23. 1 0 1005 jgt .top
  24. 1 0 ------ Interrupt ------ ------ Interrupt ------
  25. 1 0 1005 jgt .top
  26. 1 0 ------ Interrupt ------ ------ Interrupt ------
  27. 1 0 1006 halt
  28. 1 0 ----- Halt;Switch ----- ----- Halt;Switch -----
  29. 1 0 ------ Interrupt ------ ------ Interrupt ------
  30. 1 0 1006 halt
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注