language: Assembler (nasm-2.10.01)
date: 856 days 14 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.extern printf
.section .data
         printtext:
              .asciz "value %d\n"
.section .text
.global do_shit_in_asm
.type do_shit_in_asm, @function
 
do_shit_in_asm:
    pushl %ebp
    movl %esp, %ebp
    movl 8(%ebp), %eax
    movl 12(%ebp), %ecx
    movl $0, %edi
 
#lop: 
  movl (%eax,%edi,4), %edx
 # cmpl %edi, %ecx
 # je exitt
  pushl %edi
  pushl %ecx
  pushl %edx
  pushl $printtext
  call printf
  addl $8, %esp
  popl %ecx
  popl %edi
  addl $1,%edi
#  jmp lop
# exitt:
    movl %ebp, %esp
    popl %ebp
ret