Code:
.data
HelloWorld:
.asciz "Hello World!\n"
ZeroFlagSet:
.asciz "Zero Flag was Set!"
ZeroFlagNotSet:
.asciz "Zero Flag Not Set!"
.text
.globl _start
_start:
nop
movl $10, %eax
xorl %eax, %eax
jz PrintHelloWorld
FlagNotSetPrint:
movl $4, %eax
movl $1, %ebx
leal ZeroFlagNotSet, %ecx
movl $19, %edx
int $0x80
jmp ExitCall
FlagSetPrint:
movl $4, %eax
movl $1, %ebx
leal ZeroFlagSet, %ecx
movl $19, %edx
int $0x80
jmp ExitCall
ExitCall:
movl $1, %eax
movl $0, %ebx
int $0x80
PrintHelloWorld:
movl $10, %ecx
PrintTenTimes:
pushl %ecx
movl $4, %eax
movl $1, %ebx
leal HelloWorld, %ecx
movl $14, %edx
int $0x80
popl %ecx
loop PrintTenTimes
jmp ExitCall
Disclaimer: We are a infosec video aggregator and this video is linked from an external website. The original author may be different from the user re-posting/linking it here. Please do not assume the authors to be same without verifying.
Security tube is also providing linux Assembly course for 99$ here -> http://securitytube-training.com/online-...ly-expert/