add loop.s example, and correct jgt not jgte

This commit is contained in:
Remzi Arpaci-Dusseau 2023-10-05 10:23:14 -04:00
parent ee7b3d36d0
commit 35f8c4039a
2 changed files with 8 additions and 1 deletions

View File

@ -125,7 +125,7 @@ now. Here is a code snippet of a loop:
.top
sub $1,%dx
test $0,%dx
jgte .top
jgt .top
halt
```sh

7
threads-locks/loop.s Normal file
View File

@ -0,0 +1,7 @@
.main
.top
sub $1,%dx
test $0,%dx
jgt .top
halt