Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Assembly error
Forum Updated to NodeBB v4.3 + New Features

Assembly error

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 5 Posters 535 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    synthetic
    wrote on last edited by
    #1

    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
    .DATA

    autor 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,AX

    LEA 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 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
    
    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

    JonBJ jsulmJ 2 Replies Last reply
    0
    • S synthetic

      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
      .DATA

      autor 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,AX

      LEA 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 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
      
      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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @synthetic
      When does this happen to you, and how does it relate to Qt?

      1 Reply Last reply
      0
      • S synthetic

        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
        .DATA

        autor 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,AX

        LEA 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 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
        
        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

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @synthetic @JonB This looks like 16bit x86 assembler to me :-)
        Doubt it has any relation to Qt.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        JonBJ 1 Reply Last reply
        1
        • jsulmJ jsulm

          @synthetic @JonB This looks like 16bit x86 assembler to me :-)
          Doubt it has any relation to Qt.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @jsulm
          Is this a genuine query, or one of those spurious "place markers"? :)

          J.HilkJ 1 Reply Last reply
          0
          • JonBJ JonB

            @jsulm
            Is this a genuine query, or one of those spurious "place markers"? :)

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @JonB highly suspicious, but not yet enough evidence to nuke it (IMHO).

            Let's see if @synthetic replies at all.


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            1
            • artwawA Offline
              artwawA Offline
              artwaw
              wrote on last edited by
              #6

              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.

              For more information please re-read.

              Kind Regards,
              Artur

              S 1 Reply Last reply
              2
              • artwawA artwaw

                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.

                S Offline
                S Offline
                synthetic
                wrote on last edited by
                #7

                @artwaw I don't understand what to do, I'm bad at assembler, where write string ;xxxxx

                jsulmJ artwawA 2 Replies Last reply
                -1
                • S synthetic

                  @artwaw I don't understand what to do, I'm bad at assembler, where write string ;xxxxx

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @synthetic You also should ask this in an appropriate forum. This is Qt forum and your question has absolutely nothing to do with Qt...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  4
                  • S synthetic

                    @artwaw I don't understand what to do, I'm bad at assembler, where write string ;xxxxx

                    artwawA Offline
                    artwawA Offline
                    artwaw
                    wrote on last edited by
                    #9

                    @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.

                    For more information please re-read.

                    Kind Regards,
                    Artur

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved