assembly - ASM Floating-point unit giving wrong numbers -


i making bigger program using floating-point unitin asm, getting wrong numbers. made simple code, giving false numbers. got idea why? wrong here? using ubuntu 32b.

sysexit = 1  .align 32 .data  a: .float 1 b: .float 2 test1: .float 0  .text .global main  main:  finit  fld fld b  loop: fmulp fstp test1  mov $sysexit, %eax int $0x80 

i using gdb, , after "print a" shows huge number instead of 1 , same other 2 variables (b, test1).

what wrong here?

you need use print/f a in order interpret , print numbers floating-point values instead of integers.

reference.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -