repo.or.cz
/
nasm
/
autotest.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Document that underscores in numbers is permitted.
[nasm/autotest.git]
/
test
/
floattest.asm
blob
a8db5acb5798ecabdb86d4c63a915567f28e62dd
1
;Testname=optimized; Arguments=-Ox -felf -ofloattest.o; Files=.stdout .stderr floattest.o
2
3
; nasm -O99 -f elf32 floattest.asm
4
; ld -m elf_i386 -o floattest floattest.o -I/lib/ld-linux.so.2 -lc
5
6
global
_start
7
extern printf
8
9
section
.text
10
_start:
11
12
fld
qword
[
num1
]
13
fadd
qword
[
num2
]
14
sub
esp
,
8
15
fstp
qword
[
esp
]
16
push
fmt
17
call
printf
18
add
esp
,
4
*
3
19
20
mov
eax
,
1
21
xor
ebx
,
ebx
22
int
80h
23
24
section
.data
25
num1
dq
41.5
26
num2
dq
0.5
27
28
fmt
db
"%f"
,
10
,
0