File: floattest.asm

package info (click to toggle)
nasm 3.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,660 kB
  • sloc: ansic: 129,101; asm: 40,471; perl: 8,238; sh: 4,146; makefile: 1,281; xml: 726; python: 582; lisp: 578; sed: 11
file content (26 lines) | stat: -rw-r--r-- 359 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
; nasm -O99 -f elf32 floattest.asm
; ld -m elf_i386 -o floattest floattest.o -I/lib/ld-linux.so.2 -lc

	global _start
	extern printf

	section .text
_start:

	fld qword [num1]
	fadd qword [num2]
	sub esp, 8
	fstp qword [esp]
	push fmt
	call printf
	add esp, 4*3

	mov eax, 1
	xor ebx, ebx
	int 80h

	section .data
num1	dq 41.5
num2	dq 0.5

fmt	db "%f", 10, 0