add ostep homeworks

This commit is contained in:
yuchen
2015-03-15 16:54:19 +08:00
parent dab71e324d
commit 5ec5376f5b
44 changed files with 10610 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# assumes %bx has loop count in it
.main
.top
# critical section
mov 2000, %ax # get the value at the address
add $1, %ax # increment it
mov %ax, 2000 # store it back
# see if we're still looping
sub $1, %bx
test $0, %bx
jgt .top
halt