![]() |
|
Help understand where things end up in memory - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://forum.boriel.com/forumdisplay.php?fid=16) +---- Thread: Help understand where things end up in memory (/showthread.php?tid=799) |
Help understand where things end up in memory - emook - 2017-03-12 Hello, I've been using ZXBC for some projects I am doing, one of the things is that I working with very limited memory. I'm writing my code to start at 25000. When I am doing an ASM include no matter where in the code I place it, there is still ZXBC code after. If I place all my inlcudes at the end of my program, they still appear around 40-50 bytes in. I need to be able to tag the includes on at the end of the file, not in the middle as once I have moved them to another located they can be discarded but with ZXBC code appear AFTER the includes it means I keep running into trouble. I know about ORG in ASM but I'd rather ZXBC obey me when I have a include as the last lines to see in memory that it also appears at the end of the code. Any ideas? Re: Help understand where things end up in memory - Luzie - 2017-10-25 I have a similar question: How can I discover the size /end of the program ZXB compiles? I can have a look at size of.TAP-file created. But more userfriendly would be if ZXB.EXE prints length or start and end when compiling ends. May I suggest this to be added to future ZXB versions? :lol: Re: Help understand where things end up in memory - boriel - 2017-10-26 You can supply the --mmap=memory_map.txt file to the compiler, it will display a list of all the labels and their respective memory addresses. Or also compile with -dd (or -ddd the more d's the more info). It will display all assembler instructions with it's resulting address. Does this help?? :roll: Re: Help understand where things end up in memory - Luzie - 2017-10-27 boriel Wrote:You can supply the --mmap=memory_map.txt file to the compiler, it will display a list of all the labels and their respective memory addresses.Yes. I like --mmap=memory_map.txt ! I know I should better read Help before posting ;-) But one thing about it: Can you please add an option to generate a Memory-Map with decimal adresses instead of hex adresses? Re: Help understand where things end up in memory - boriel - 2017-10-27 Ok. Will take that into account. Also, remember that in ZX Basic you can use hex numbers directly with any of these formats: 0xNNNN, 0NNNNh |