You may not need to modify dag2gs2 at all. The system was designed so all the functionality is the data files.
opt0.dag contains the base functionality required to compile all code. opt1.dag contains optimizations for some common dag combinations. This was done so it's easy to debug.
I've looked thru the dags extensively, I think for the most part, as you have mentioned, that I will be able to make the modifications there, except for a few things...
ie:
predefined data - this doesn't appear to be handled in the dags, whether it be the equ statement or the data/dc lines. As our compilers work differently in this regard, I'll have to figure out how to tweak the code to make it work
Sure, no problem.
You really need to read opt0.dag and opt1.dag.
dag2gs2 basically has no intelligence. It's basically a pattern matching utility that outputs a string when a pattern is matched. All the patterns are in the opt0.dag and opt1.dag files.
Toshi
I'm still not sure where some of itcomes from, even looking thru the dags, I'm not sure what exactly it was trying to do - I'm sure this is because of the way orca dictates coding for relocateable programs (like the r15 question - I have no idea where that r15 appeared from, I'm assuming at this point it is something that has to do with orca as a single example in the opt0.dag...
RETV()
lda r15
add.l #local
sta r15
rts
it appears that r15 is important.... I know (or I think I know) this return is a return from void, but I don't know why it appears to be storing a return value (or at least, that's what I'm guessing r15 is?)
It's rather interesting to see how two ways of handling a single language can cause confusion
Once again, I do appreciate all of the help. I'm studying my orca/m manual now for how it handled things, and then I'm going to try at the dags again to conver them to my compiler, then go in and convert any source code to handle the other tweaks (like data storage, equ statements, etc.).
-Tony