Need help so that it prints out "42" [duplicate]

segment .data
num1: db 40
num2: db 2
num3: db 44

segment .text
        global  asm_main
asm_main:
        enter   0,0               
        pusha

        mov     eax,[num1]
        add     eax,[num2]
        call    print_int
        call    print_nl

        mov     eax,[num3]
        sub     eax,[num2]

        call    print_int
        call    print_nl

        popa
        mov     eax, 0            
        leave
        ret

This prints out 623652394 1143264298

My professor says to use dump_regs macro to make this print "42" and I'm not sure how to do that.



from Recent Questions - Stack Overflow https://ift.tt/3icgJfF
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation