6. Exercises

See the book for exercises using x86.py:

$ cat loop.s
.main
.top
sub  $1,%dx
test $0,%dx
jgte .top
halt

$ python ./x86.py -p loop.s -t 1 -i 100 -R dx

   dx          Thread 0
    ?
    ?   1000 sub  $1,%dx
    ?   1001 test $0,%dx
    ?   1002 jgte .top
    ?   1003 halt

$ python ./x86.py -p loop.s -t 1 -i 100 -R dx -c

   dx          Thread 0
    0
   -1   1000 sub  $1,%dx
   -1   1001 test $0,%dx
   -1   1002 jgte .top
   -1   1003 halt