i am getting this error
cndtlBranch.s:
Assembler messages:
cndtlBranch.s:47: Error: operand type mismatch for `push'
cndtlBranch.s:53: Error: operand type mismatch for `pop'
I am confused how to use push and pop instructions in assembly language.
Here is my code:
.data
String1:
.ascii "hai!\n"
String2:
.ascii "hai ra!\n"
String3:
.ascii "hai ra mama!\n"
.text
.globl _start
_start:
nop
movl $10, %eax
xorl %eax, %eax
jz HelloWorld
jumpIfZeroNot:
movl $4, %eax
movl $1, %ebx
movl $String1, %ecx
movl $5, %edx
int $0x80
jmp Exit
jumpIfZero:
movl $4, %eax
movl $1, %ebx
movl $String2, %ecx
movl $8, %edx
int $0x80
jmp Exit
Exit:
movl $1, %eax
movl $0, %ebx
int $0x80
HelloWorld:
movl $10, %ecx
printTenTimes:
push %ecx
movl $4, %eax
movl $1, %ebx
leal String3, %ecx
movl $13, %edx
int $0x80
pop %ecx
loop printTenTimes
jmp Exit