I was experimenting with some code and I left out the .data section, and it the program worked, but it was just smaller, so then I took out the .code section, the program still worked but it was just smaller, I understand the point of the import , export, and resource sections but what is the point of having the .data and .code sections? It seems like all they do is bloat the file...
section flags. code != writable. bloat? Such tiny amounts that it shouldn't matter.
so basically its pointless to use .code and .data, ok thanks.
no, it's not useless. Having your code section read-only helps catch code overwrite bugs. If you're programming 64k (or smaller) intros, there might be a point in collapsing the sections, but otherwise there isn't. Same thing with using 512byte align instead of 4k.