Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need help adding to lists in assembly.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kraciop
How do I cheat?
Reputation: 0

Joined: 23 Oct 2009
Posts: 0

PostPosted: Fri Oct 23, 2009 1:11 pm    Post subject: Need help adding to lists in assembly. Reply with quote

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"
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Fri Oct 23, 2009 2:34 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites