Skip to content

Instantly share code, notes, and snippets.

@ox
Forked from Codonaut/prob2.s
Created March 29, 2012 15:33
Show Gist options
  • Save ox/2238567 to your computer and use it in GitHub Desktop.
Save ox/2238567 to your computer and use it in GitHub Desktop.
Tested to work right
.text
.globl
getCharAsInt:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl 12(%ebp), %edx
addl %edx, %eax
movb (%eax), %al
movsbl %al, %eax
popl %ebp
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment