I've managed 'Hello World' with Gnu as!
So, next thing is print 1 to 10 right? (Maybe in ruby)
At the moment, I'll be happy to print A closely followed by B. Here's what I have.
.section .text
.globl _start
_start:
# Print A
movl $4,%eax
pushl $0x41
movl %esp,%ecx # Would rather movl $0x41,%ecx
movl $1,%ebx
movl $1,%edx
int $0x80
# Closely followed by B
movl $4,%eax
incl (%esp) # Rather incl(%ecx) here
movl %esp,%ecx
movl $1,%ebx
movl $1,%edx
int $0x80
movl $1,%eax
movl $0,%ebx
int $0x80
And it actually works, but my question is, why can't I
movl $0x41,%ecx
To begin with, and then
incl (%ecx)
a little later on?