So I'm fairly new at Assembly, but I get the jist of it. I'm trying to learn AT&T syntax, and the sort, but it's proving a bit difficult to adjust to.
This is supposed to be an infinate loop incrementation, that just prints the numbers as they increment. That's it. Can anyone point out where I went wrong? All criticism and tips would be great, as long as their is an explaination why I did it wrong.
.bss
count:
.long 0
.text
.globl main
main:
movl $5,%eax
movl $1,%ebx
repeat:
movl $count,%ecx
movl $count,%edx
int $0x80
incl count
jmp repeat
ret
I'm pretty sure using the BSS segment as a var for a simple incrementation is stupid, but I'm trying to figure out how using variables really works. I've tried this with the %esp and #esi register just to see if my usage of $count is wrong, but it turns out the same.
Any help would be nice.
