Thread: AsmPro 1.19
View Single Post
Old 24 January 2023, 19:51   #37
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,182
Quote:
Originally Posted by a/b View Post
I've put another version in the zone. Restart, trailing "/" fixed (if someone has a problem with this, let me know; you can't do "weird" things any more but it's called INCDIR and not INCBASE so...), more optimizations.
About working on the includes and the whole ZI stuff: the alternative (I didn't know about this either) is to use INCSRC <index> to include a source buffer directly and bypass caching and disk I/O.

Now to the main thing, includes (this also works with INCBIN, INCLINK, and INCIFF*) are now searched in this order:
- INCDIR (if not specified: default dir set in the prefs), this basically is the old method so the existing code should load the same files,
- source dir (where the current source file is),
- for INCLUDE files only, INCLUDE: assign if there's one (this is checked once per assemble until found so performance will be ok), this is mainly to take care of system includes without causing extra INCDIR gymnastics.
Very nice, seems to work more or less exactly like I wanted! Hope it doesn't break existing code.

Putting QA cap back on (this is minor stuff):
- Incdir seems to persist (even if you use "zi"), i.e. assemble file with incdir foo: / include bar.i (it correctly includes foo:bar.i), then remove incdir, update files, zap includes, assemble again and it finds "foo:bar.i" (restart works).
- Ancient issue (present in many assemblers): You include a file that also includes other stuff and the transitive includes can't be found - first file is reported for "file error" (e.g. set include path to $INCLUDES$/exec and include exec.i - it says "file error" for exec.i, but issue is with first file included from that). No problem, but can be confusing.
- Including non-file tries to do weird stuff (e.g. "include dh0:") - solution is obviously "don't do that" but there you are
paraj is offline  
 
Page generated in 0.04341 seconds with 11 queries