samedi 9 mai 2015

Print floats in nasm without binding to C functions

I'm wondering, how to print float numbers in nasm using only syscalls in linux. I have the following code, but it prints only @

section .data
  num dq 2.0
  len equ $ - msg

section .text
global _start
_start:
  mov edx, len
  mov ecx, num
  mov ebx, 1
  mov eax, 4
  int 80h

  mov eax, 1
  int 80h

Who to make it right?

Aucun commentaire:

Enregistrer un commentaire