Skip to content

Instantly share code, notes, and snippets.

@biels
Created October 21, 2017 10:55
Show Gist options
  • Save biels/760d4cd796779c07650505ca2e240893 to your computer and use it in GitHub Desktop.
Save biels/760d4cd796779c07650505ca2e240893 to your computer and use it in GitHub Desktop.
.text
.align 4
.globl Asignar
.type Asignar,@function
Asignar:
pushl %ebp
movl %esp, %ebp
addl 24(%ebp), %edx # pos
imull $12, %edx # 12*pos
addl 8(%ebp), %edx # @v[pos]
movb 12(%ebp), %al # X.c
movb %al, (%edx) # v[pos].c = X.c
movl 16(%ebp), %eax # X.k
movl %eax, 4(%edx) # v[pos].k = X.k
movl 20(%ebp), %eax # X.m
movl %eax, 8(%edx) # v[pos].m = X.m
movl %ebp, %esp
popl %ebp
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment