linux - error of floating point exception(core dumped) -
global _start section .data var dq 12494f04a6344129h msg db "the number of times 4 present in given number" len equ $-msg novar db 00 section .bss section .text mov dl,0ah mov cl,10 _start : mov rsi,var up: mov al,byte ptr [rsi] mov ah,00 div dl cmp ah,04 je dn jne dn1 dn: inc byte[novar] dn1: inc rsi dec cl jne jmp exit exit: mov eax,4 mov ebx,1 mov ecx,msg mov edx,len int 80h mov eax,4 mov ebx,1 mov ecx,novar mov edx,1 int 80h mov eax,1 mov ebx,0 int 80h
nasm doesn't use "ptr" - won't assemble.
the first 2 lines - above _start:
label - never executed, registers never initialized. that's causes exception. dl
zero!
len
fine - it's equate, not variable.
you want add character '0'
novar
before printing it.
none of looks useful me. sure question you're trying answer, @shubham satpute?
Comments
Post a Comment