tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Compiling to memory


From: David Mertens
Subject: Re: [Tinycc-devel] Compiling to memory
Date: Sun, 24 Jul 2016 07:10:23 -0400

Hello Philip,

Yes, you can allocate your own memory block where you want the compiled code to be placed. I think it was one of the pointer arguments to tcc_compile(), but I don't quite remember off the top of my head. Check the comments in libtcc.h, I believe it's specified there. Let me know if you can't find it.

David

On Sat, Jul 23, 2016 at 12:53 PM, Philip Picard <address@hidden> wrote:

I am emulating a fantasy computer based on a late 1980s computer. I did not want to write my own C compiler for this fantasy computer so I want to port TCC. However the main road block I have encountered is controlling where TCC compiles when it compiles to memory. For this emulator I need to control specifically where in the block of memory the code is located. With the TO_MEMORY option can I somehow change where in memory the binary code is placed?

 

Thanks,

Philip

 

Sent from Mail for Windows 10

 


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




--
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]