kraciop How do I cheat?
Reputation: 0
Joined: 23 Oct 2009 Posts: 0
|
Posted: Fri Oct 23, 2009 1:11 pm Post subject: Need help adding to lists in assembly. |
|
|
This code works fine and prints out both lists right after eachother. I have no idea where to start. I think i need an empty list to push the values too, but i may be wrong. I'm new at this so any code or comments would be greatly appreciated. thank you.
.data
.section .rodata
List1: .long 11111, 22222, 33333, 44444
List2: .long 55555, 66666, 77777, 88888
List3: .long 0, 0, 0, 0
pl:
.string "Number:\t%d\n"
Length:
.int 4
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
subl $40, %esp
pushl $List1
pushl $Length
call print1
pushl $List2
pushl $Length
call print1
leave
ret
.size main, .-main
print1:
pushl %ebp
movl %esp, %ebp
movl $0, %eax
movl $0, %edx
movl $0, %esi
movl $0, %edi
movl 8(%ebp), %esi
movl 12(%ebp), %ecx
movl $4 , %ebx
loop1:
movl (%ecx), %edi
pushl %ebx
pushl %eax
pushl %ecx
pushl %edi
pushl $pl
call printf
popl %ecx
popl %edi
popl %ecx
popl %eax
popl %ebx
inc %eax
addl $4, %ecx
cmpl %ebx, %eax
jne loop1
leave
ret
.size print1, .-print1
.section .note.GNU-stack,"",@progbits
.ident "GCC: (GNU) 3.3.5"
|
|
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Fri Oct 23, 2009 2:34 pm Post subject: |
|
|
have you checked assembler.pas to see if the problem is in there ?
anyhow, in the off chance this topic has nothing to do with the cheat engine sourcecode, I'll just move it to general programming
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|