22 March 2021, 21:13 | #1 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
|
Hints for organizing asm-code?
I'm poking through a very old and big (17,000 rows) asm-project of mine. I want to split up different parts to different files to "include". I'm pretty sure none of the included files will compile on it's own (since they most likely needs variables/stuff from other parts).
Not entirely sure how I should do this, but I'm after some hints and tips here. How are you guys organizing your "projects"? I'm using Asm-One btw if that matters. Thanks in advance |
22 March 2021, 22:58 | #2 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
|
I tend to split my files by functionality and if this still leads to files that are too big, I split up further. So for example, I might have a graphics.asm but if that gets too big, I might have a blitter.asm and a sprites.asm.
Structure definitions, constants, macros etc I tend to put in .i files (along with external references). |
24 March 2021, 07:17 | #3 | ||
Oldtimer
Join Date: Nov 2010
Location: VXO / Sweden
Posts: 153
|
Quote:
I usally break out parts of the code that I feel is stabel and I'm finished with. If you use "include" there is no problem with accessing stuff in other files, just keep the include statement in the same place as the code was that is to be included. Data I almost always keep in separate files in a "assets" subdir. Quote:
|
||
24 March 2021, 11:23 | #4 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
|
|
12 April 2021, 23:41 | #5 |
Registered User
Join Date: Dec 2019
Location: North Dakota
Posts: 741
|
I simply use Notepad++ and use block folding feature (open/close). The ASM file is preprocessed by my own parser before I feed it into vasm/vlink.
This way, a 10,000-line file can be viewed fully folded on a single screen and I only zoom [on demand] into parts that require my attention. Definitely beats switching between 50 files (been there, done that, thanks but no thanks ) |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Organizing .asm projects | juice | Coders. Asm / Hardware | 13 | 28 July 2020 20:11 |
Asm-One 1.02 original source code | kamelito | request.Apps | 4 | 20 November 2017 12:15 |
Can someone explain this Suntronic ASM code? | 1988 | Coders. Asm / Hardware | 1 | 31 May 2015 17:32 |
Problems with a little ASM code | VoltureX | Coders. General | 7 | 12 December 2011 13:10 |
Lots of ASM code | Ray Norrish | Coders. General | 9 | 22 February 2006 02:20 |
|
|