Unsolved Assembly error
-
How do I fix this errors?
kod1.asm(123): fatal error A1010: unmached block nesting : MAIN
NMAKE: fatal eror U1077: 'ML' : return code '1'.MODEL SMALL
.STACK 100H
.DATAautor DB 10,13,10,13,"Autor: Dawid Sitko$"
wstep DB "Dodawanie: "1"",0dh,0ah,"Odejmowanie: "2"",0dh,0ah, "$"
wybor DB 10,13,"Wybierz:$"
pierw DB 10,13,10,13,"Podaj 1 liczbe:$"
drug DB 10,13,"Podaj 2 liczbe:$"wynik DB 10,13,10,13,"Wynik:$"
NUM1 DB ?
NUM2 DB ?
RESULT DB ?
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AXLEA DX,wstep MOV AH,9 INT 21H LEA DX,wybor MOV AH,9 INT 21H MOV AH,1 INT 21H MOV BH,AL SUB BH,48 CMP BH,1 JE doda CMP BH,2 JE odejm
JMP EXIT_P
doda:
LEA DX,pierw
MOV AH,9
INT 21HMOV AH,1 INT 21H MOV BL,AL LEA DX,drug MOV AH,9 INT 21H MOV AH,1 INT 21H MOV CL,AL ADD AL,BL MOV AH,0 AAA MOV BX,AX ADD BH,48 ADD BL,48 LEA DX,wynik MOV AH,9 INT 21H MOV AH,2 MOV DL,BH INT 21H MOV AH,2 MOV DL,BL INT 21H JMP EXIT_P
odejm:
LEA DX,pierw MOV AH,9 INT 21H MOV AH,1 INT 21H MOV BL,AL LEA DX,drug MOV AH,9 INT 21H MOV AH,1 INT 21H MOV CL,AL SUB BL,CL ADD BL,48 LEA DX,wynik MOV AH,9 INT 21H MOV AH,2 MOV DL,BL INT 21H JMP EXIT_P
EXIT_P:
LEA DX,autor
MOV AH,9
INT 21H
end -
@synthetic
When does this happen to you, and how does it relate to Qt? -
@synthetic @JonB This looks like 16bit x86 assembler to me :-)
Doubt it has any relation to Qt. -
@jsulm
Is this a genuine query, or one of those spurious "place markers"? :) -
@JonB highly suspicious, but not yet enough evidence to nuke it (IMHO).
Let's see if @synthetic replies at all.
-
It is Dos ASM, 16 bit. And the OP is mixing, as far as I can tell, write string and write char DOS functions (those interrupt 21h calls take function num from AH register) for absolutely no reason... But I might be wrong, last functional code in TASM I wrote somewhere in 1998/99.
But why it's here in the first place is beyond my understanding. -
@artwaw I don't understand what to do, I'm bad at assembler, where write string ;xxxxx
-
@synthetic You also should ask this in an appropriate forum. This is Qt forum and your question has absolutely nothing to do with Qt...
-
@synthetic Since you're from Poland I believe you should start with this book. That's where I started in '90s. https://allegro.pl/oferta/turbo-assembler-biblia-uzytkownika-10146934672
And really, this forum is for different language...
EOT from my side.