Skip to main content

Thread: converting integer to binary


here code segmentation fault dont know why
code:
    ; ****************************************************************** ;  convert integer ascii/binary string. ;    note, no error checking required on integer. ; ----- ;  arguments: ;    1) integer, value ;    2) string, address ; ----- ;  returns: ;    ascii/binary string (null terminated)  global    cvtinttoasciibinary cvtinttoasciibinary:  ;    code goes here push    ebp mov    ebp, esp push    eax push    ebx push    ecx push    edx push    esi push    edi  mov eax,dword[ebp+8] ;get value of number mov ebx,dword[ebp+12], address of string mov ecx,8  convert: mov edx,0 div dword[two] mov byte[ebx],dl       ;save value inc ebx loop convert  mov byte[ebx],null  pop    edi pop    esi pop    edx pop    ecx pop    ebx pop    eax mov    esp, ebp pop    ebp

hey there


may try posting in programming section,
there lots of posts in general visible longer on there , may draw attention of more knowledge scripting/programming folks


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] converting integer to binary


Ubuntu

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?