Answer to Question #250834 in C for Samzzy

Question #250834
write an assembly language program that uses 3 byte variables a,b,c. the variables are initialized be for the program starts with the values 2,5 and 0 respectively . the program will add ,sub,divide and multiply the contents of the variable a to that of b and store the result in to c.
1
Expert's answer
2021-10-14T04:49:36-0400
SECTION .data

    extern printf
    global main

fmt:
    db "%d", 10, 0

SECTION .text

main:
    mov     eax, 14
    mov     ebx, 10
    add     eax, ebx

    push    eax
    push    fmt
    call    printf

    mov     eax, 1
    int     0x80

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS