Store files data into specified memory (RAM) address - help?

Reply

Join Date: Nov 2006
Posts: 1
Reputation: sg57 is an unknown quantity at this point 
Solved Threads: 0
sg57 sg57 is offline Offline
Newbie Poster

Store files data into specified memory (RAM) address - help?

 
0
  #1
Nov 3rd, 2006
Hello. Im new here and at but a wee little age of 14, so go easy on me :-|

Anyways... Before I begin, I want to make a note I can use inline assembly with C, so the loading and storing of the file's data into a buffer is already done. I just need to use assembly and move that buffer/data to a specified address in RAM... Unless someone knows a C routine for this, can anyone please assist me in anyway?

Thanks alot if you can
Last edited by sg57; Nov 3rd, 2006 at 1:11 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,342
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1460
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: Store files data into specified memory (RAM) address - help?

 
0
  #2
Nov 3rd, 2006
depends on the operating system. MS-Windows and *nix: you can not do that because the os will not permit it unless the address is one which you got from allocating memory using malloc().

in assembly just store the destination address in edi register, source address in esi register, number of bytes to copy in ecx, then rep movsb instruction. There are quite a few posts on this board that demonstrate this, like this one.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC