Discover the answers you need at Westonci.ca, where experts provide clear and concise information on various topics. Explore thousands of questions and answers from a knowledgeable community of experts on our user-friendly platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

I want to receive an executable file of the assembler program. Originally the code worked, but after adding the section and trying to compile it in nasm and gcc it does not run. Added file is original programm
[bits 32]
; sourceIndex destinationIndex

; esp -> [ret]
extern _printf
extern _exit

section .data
format: db "kajak kajak"

length equ $ - format
db 0xA, 0

section .text

global _main

_main:
getaddr:

; esp -> [format][ret]

mov ecx, length ; ecx = length

shr ecx, 1 ; ecx = ecx >> 1 = ecx /2

jz end ; jump if zero ; jump if ZF = 1

mov esi, [esp] ; esi = *(int*)esp = format
lea edi, [esi+length-1] ; edi = format + length -1

.loop mov al, [esi] ; al = *(char*)esi
mov ah, [edi] ; ah = *(char*)edi

mov [esi], ah ; *(char*)esi= ah
mov [edi], al ; *(char*)edi = al

cmp ah, al ; ah - al
jne notequal ; jump if not equal
inc esi ; esi++
dec edi ; edi--

loop .loop
jp equal ; jump if equal

equal:
call _printf ; printf(format);

message_equal: db "its palindrome",0xA,0x00
getaddr2:
call [ebx + 3*4] ; printf(message_equal)
add esp, 4 ; esp = esp + 4
jmp end

notequal:
call _printf ; printf(format);

message_notequal: db "Its not palindrome",0xA, 0x00
getaddr3:
call _printf ; printf(format);
add esp, 4 ; esp = esp + 4
jmp end
end:
push 0 ; esp -> [00 00 00 00]
call _exit


I Want To Receive An Executable File Of The Assembler Program Originally The Code Worked But After Adding The Section And Trying To Compile It In Nasm And Gcc I class=