online 1
gast (50)

/ Forum / Anwendungen(Java,C++...)

Anwendungen(Java,C++...)Anwendungen(Java,C++...)

Fragevon steenvoortl vom 18.07.2020, 20:24 Options

Problem in Assembler: Invalid combination of opcode and operands

Ich bekomme von NASM folgende Fehlermeldungen:
assemb~1\Addieren.asm:9: error: invalid combination of opcode and operands
assemb~1\Addieren.asm:19: error: operation size not specified
assemb~1\Addieren.asm:22: error: invalid combination of opcode and operands
assemb~1\Addieren.asm:31: error: invalid combination of opcode and operands
assemb~1\Addieren.asm:39: warning: word data exceeds bounds
assemb~1\Addieren.asm:44: error: operation size not specified
assemb~1\Addieren.asm:47: error: invalid combination of opcode and operands

Könnt ihr mir helfen?

Das ist mein Quellcode:

org 100h
start:
mov ah, 09h
mov dx, Summd1
int 21h
schleife:
mov ah,00
int 16
push al
mov ah,00
int 16
cmp ah, 1ch
loopne schleife

mov cx, 4
weiter:
pop ax
sub ax, 30h
mul [multipli]
mov [summand1], ax
mov ax, [multipli]
div 100h
loop weiter
undfuer2:
mov ah, 09h
mov dx, Summd2
int 21h
schleif2:
mov ah,00
int 16
push al
mov ah,00
int 16
cmp ah, 1ch
loopne schleif2


mov cx, 4
mov ax, 100000h
mov [multipli], ax
weiter2:
pop ax
sub ax, 30h
mul [multipli]
mov [summand2], ax
mov ax, [multipli]
div 100h
loop weiter2

ergbn:
xor ax, ax
mov ax, [summand1]
add ax, [summand2]
mov [ergebnis], ax

mov ax, [summand1+2]
adc ax, [summand2+2]
mov [ergebnis+2], ax

section .data
Summd1 db 'Gib den ersten Summanden ein (max. 5 Zahlen)', 13, 10, '$'
Summd2 db 'Gib den zweiten Summanden ein (max. 5 Zahlen)', 13, 10, '$'
summand1 DQ 00000000h
summand2 DQ 00000000h
multipli DQ 100000h
ergebnis DQ 00000000h


Antwort schreiben

Ähnliche Themen

Eigenen Funktionen
JoeKe  29.08.2006 - 1941 Hits -

NASM (Netwide Assembler)
muhll  04.07.2008 - 101 Hits - 8 Antworten

Wie liest man in Assembler eine Zahl ein?
steenvoortl  17.07.2008 - 7 Hits - 2 Antworten

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Mon Jan 26 20:06:00 2026