FAQ  •  Register  •  Login

Help understand where things end up in memory

<<

emook

Posts: 27

Joined: Tue Dec 06, 2016 1:23 am

Post Sun Mar 12, 2017 5:02 pm

Help understand where things end up in memory

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?
<<

Luzie

Posts: 32

Joined: Thu Nov 05, 2015 9:11 pm

Post Wed Oct 25, 2017 6:17 am

Re: Help understand where things end up in memory

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:
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Thu Oct 26, 2017 9:56 am

Re: Help understand where things end up in memory

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:
<<

Luzie

Posts: 32

Joined: Thu Nov 05, 2015 9:11 pm

Post Fri Oct 27, 2017 3:19 pm

Re: Help understand where things end up in memory

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.
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:

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?
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Oct 27, 2017 8:22 pm

Re: Help understand where things end up in memory

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

Return to Help & Support

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO