Jump to content
Sign in to follow this  
SlidellMan

A programming question

Recommended Posts

I am confused with certain tutorials on whether to make certain routines part of the main file or start a new one for that routine? (The tutorials on SuperFamicom.org and SMS Power don't clarify this, which is why I asked.)

Share this post


Link to post
Share on other sites

Which programming language are you working with? I suppose modular programming is more tidy, in particular as you can reuse code later and build your own libraries, but you may also need to export labels, there could be linker issues if you by mistake used the same memory areas etc. Personally I've almost exclusively worked with one file projects, plus some external macro inclusions, but a friend of mine who does much larger projects build them from dozens of files.

Share this post


Link to post
Share on other sites

When you're working on a really, really large project that takes several minutes or even hours to compile it can make sense to split things up if your compiler/linker environment is smart enough to only work on the stuff that changed after the last build.

 

C64 crossassemblers usually need less than a second to finish their job on modern PCs though, so it pretty much boils down to personal preference.

 

Personally I prefer having all the stuff I work on in a single file, plus maybe some linked in binaries for music, charsets and the like.

  • Like 1

Share this post


Link to post
Share on other sites

Yup, it's just personal taste; i've written larger projects which are a single source file, smaller ones where large chunks of hand-unrolled code are split off into their own file to make the whole easier to read and so on. What suits you best'll becume obvious over time. =-)

Share this post


Link to post
Share on other sites

When I was programming on the 64 I tended to use a single monolithic file for assembly. When I programmed my BBS I used a single assembly source (though in retrospect I should have divided it up) along with numerous BASIC parts with heavy documentation for each section and a strict over-arching architectural design. I then had a program which would combine the parts into a single program which I would then compile with Blitz!.

 

Working on my TI projects now, I have multiple assembly source files: base framework, graphics, sound, main game loop, events, and whatever. Mind you, these projects are much bigger than what I did before, and I can only assume closer to the size professional developers back-in-the-day would have built. It is much easier to open the 4anoid_screens.a99 and page through it than have to search a massive file looking for something.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...