aboutsummaryrefslogtreecommitdiff
path: root/S/atoulong.S
diff options
context:
space:
mode:
Diffstat (limited to 'S/atoulong.S')
-rw-r--r--S/atoulong.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/S/atoulong.S b/S/atoulong.S
new file mode 100644
index 0000000..7d141ed
--- /dev/null
+++ b/S/atoulong.S
@@ -0,0 +1,17 @@
+.globl atoulong
+.type atoulong,@function
+atoulong:
+ xorl %edx,%edx
+ xorl %eax,%eax
+ movl 4(%esp),%ecx
+ jmp .L1
+.L2:
+ imull $10,%eax,%eax
+ addl %edx,%eax
+ incl %ecx
+.L1:
+ movb (%ecx),%dl
+ subb $48,%dl
+ cmpb $9,%dl
+ jbe .L2
+ ret