An assembly program to add integersΒΆ

    .intel_syntax noprefix

    .text
    .global main
main:   push    rbp
    mov rbp, rsp

    mov rax, [rip + a]
    mov rcx, [rip + b]
    add rcx, rax
    mov [rip + c], rcx

    mov rax, 0
    pop rbp
    ret


    .data
a:  .quad   123
b:  .quad   456

    .bss
c:  .zero   8
You have attempted of activities on this page