Shop OBEX P1 Docs P2 Docs Learn Events
Embedding data — Parallax Forums

Embedding data

When I first looked at Rogloh's universal video driver, I thought that it worked because when invoked, the compiler would just throw out everything that isn't used. Then Rayman explicitly mentioned embedding data in his video/graphics driver. So, there is something here I don't quite understand. And it looks to be pretty cool.

Can any amount of data be embedded?

Thanks

Rich

Comments

  • Flex Prop loader program can load multiple items at one time.

    So if you have a bitmap that you want to load at an address you can do that along with your program. No need to embed.

    Mike
  • RaymanRayman Posts: 14,646
    The "File" command is one great thing about Spin&Spin2. I don't know why there isn't such a thing in C...

    Yes, I think any amount can be embedded.

    As @iseries said, another, more complex way, is to use the loader to copy files into RAM at launch.
  • RaymanRayman Posts: 14,646
    My understanding is that FlexProp will only compile what is needed into the binary.
    But, the PropTool compiles all the code into the binary.

    There are pluses and minuses to each approach...
  • I believe if you enable “No Optimization”, it puts everything, including unused library routines and dead code in there.
  • rjo__rjo__ Posts: 2,114
    Amazing facility... I was in the habit of loading everything into HubRam... because I thought I had to:)
  • Cluso99Cluso99 Posts: 18,069
    IIRC @rogloh code is PASM. Compilers cannot remove dead pasm code (routines).
Sign In or Register to comment.