Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋼) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[NASM] komische Ausgabe

Empfohlene Antworten

Veröffentlicht

Hallo,

ich bekomme folgende Ausgabe:

c=a+b*c, a=4.94066e-324, b=9.88131e-324, c=0

c=a+b*c, a=4.94066e-324, b=9.88131e-324, c=0

nach der Übersetzung (Netwide Assembler und MinGW gcc):

nasm -fwin32 z1.s

gcc -o z1.exe z1.obj

woran kann dss liegen, das so komische werte rauskommen???

hier der code (auch nachzulesen unter:

Sample nasm programs )

BITS 32

extern _printf

%macro pabc 1 ; a "simple" print macro

section .data

.str db %1,0 ; %1 is macro call first actual parameter

section .text

; push onto stack backwards

push dword [c+4] ; double c (bottom)

push dword [c] ; double c

push dword [b+4] ; double b (bottom)

push dword ; double b

push dword [a+4] ; double a (bottom)

push dword [a] ; double a

push dword .str ; users string

push dword fmt ; address of format string

call _printf ; Call C function

add esp,32 ; pop stack 8*4 bytes

%endmacro

section .data

fmt: db "%s, a=%g, b=%g, c=%g",10,0

a: dq 1

b: dq 2

five: dq 5.0 ; constant 5.0

section .bss ; unitialized space

c: resq 1 ; reserve a 64-bit word

section .text

global _main

_main:

@l1:

fld qword [a]

fld qword

fld qword [c]

fmulp

faddp

pabc "c=a+b*c"

mov eax, 0

leave

ret

Am Ende der Anwendung wird auch ein Speicherzugriffs Meldung von

Windows ausgespuckt *pfui ... :(

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.