I mentioned here:
http://www.ultimateamiga.co.uk/index.php/topic,9520.msg44972.html#msg44972
that at least +w.s is corrupt. Looks like a fix is half-way programmed in it (?).
It doesn't look corrupt to me. I tried assembling it and found these files
Include "layers_lib.i"
Include "graphics_lib.i"
weren't with the other files, but I did find them in the includes files that came with DevPac 3.18
However, some of the variables used to define some other variables in the WB OS includes files are missing, and those are what appears to be generating the errors when assembling.
The problem with the way the code is written is that sometimes code references/jumps to code found in other files and can make it very hard to follow.
Can I suggest that you add the Includes files into your references (e.g File "A" requires files "B","C" etc.) and perhaps build a tree so it's easy to see which files are required to attempt to reassemble the sourcecode?
Thanks for the excellent feedback Lonewolf10. So far, I've only actually assembled the equates files to derive symbols for Resource to use. This stuff is coming from chasing a few AMOS Basic instructions up for the Reference Manual. I found this particular problem checking whether AMOS Memory Banks are cleared when they're created (they are). So, accepted that there are symbols and labels all over the place. That's not what I'm referring to.
Examples from the +w.s file:
Line 9,983 onwards is part of the jump table for system functions in amiga.library:
bra ChipMM ;55-SyChip: Reserve CHIP
bra FastMM ;56-SyFast: Reserve FASTYou won't find those symbols as destination labels anywhere in the sources nor the Amiga Includes directory and sub-directories.
A little further on, you'll find their 'replacements' at line 10,020:
bra WMemFast ;92-MemFast
bra WMemChip ;93-MemChip There are a few other labels in that jump table that seem to be both 'legacy' and 'current'.
Exploring a bit further, the only mention of these 'legacy' labels elsewhere is in the Monitor (+monitor.s) where they're used as parameters to a macro. So you see a somewhat different subroutine call table that look like this at line 905:
bsr TT_SPatch ChipMM ;55- Reserve CHIP
bsr TT_SPatch FastMM ;56- Reserve FASTThat macro is at line 953:
; Patch systeme normal...
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TT_SPatch
move.l a0,-(sp)
move.l 4(sp),a0
sub.l T_SyVect(a5),a0
subq.l #4,a0
add.l Old_SyVect(pc),a0
move.l a0,4(sp)
move.l (sp)+,a0
rtsI haven't gone any further than that yet as I'm overloaded to blazes with other stuff right at the moment (violin screeches in background
). But it looks suspiciously like a remapping of jump tables. At first I thought Pre-Pro and post-Pro perhaps? But more likley would be Monitor and Interpreter maybe. (And, as a relative newcomer returning to 68000 assembler after 20 years, I like the cute way of getting at the macro parameter...
.)
Anyhow. Surely +w.s won't assemble unless those symbols are resolved? And a few others in that jump table - mainly to do with memory management. So what I'm doing with a few percent of my head's multi-processor time is reconstructing the +w.s source from the amiga.library load file (V2.0 - straight out the box) to see what they resolve to when I get that far.
I've also already plonked all the sources into that database I mentioned earlier in this thread:
Other bits of interest:
•I've databased the sources in Access 2010. That process at least proved to me that all the sources are syntactically correct. (The +w.s problem results from missing labels, not syntax errors.)
That will let me build that 'tree' you mentioned. Time is the biggest problem at the moment though. I've got to get some other stuff completed and published before I chase all these other bits up.
If you want to have a go at the task yourself, drop me a PM and I can get a copy of that database to you. What we need are:
- "Which source goes with which AMOS component?" E.g. +w.s = amiga.library; +lib.s = AMOSPro.Lib; etc. A spreadsheet would do.
- Then, knowing what's what, move into "Which of these will assemble ok 'as is'". Most should if they've got the correct includes in them. Also, bear in mind that Francois used his own equates for Amiga library functions(??!) So you won't get a direct correlation to an Amiga Includes symbol. Though most use the same symbol name just to confuse things! But they will always be in +equ.s. That's the file I used to generate the user-defined Resource symbols files from and they're working spot-on so far in +w.s. Again, a spreadsheet would do for the results. If you have to change any of the original sources to get them to work, keep them separate and just note what's needed. What we're after is info at this stage. Then we can plan the changes under source-code version control.
- The objective is to reproduce AMOSPro V2.0 byte-for-byte, as it came 'out-of-the-box', from these sources plus whatever else is necessary to make that happen.
- Document the above. As suggested, spreadsheets would do. I can database those and relate them to the sources already there. Then start to build the 'big picture' out of that database.
If you do manage to get some load files out of them and want to compare them with the original load files, I've also got a powerful differencing tool that does the job if you don't have anything yourself. Just send 'em back to me. Unfortunately, it's Windows platform and it's part of a commercial package I've used for years and, although it's been abandonware for a while now, it's still copyright. So unless I can get permissions from the copyright owners, I can't exactly give it away.
As you've probably gathered by now, I'm insisting that this all gets databased. It provides an organised storage for what we're doing. It's the
initial code repository until we come up with something better. And I've many, many years of working magic with MS Access (wash my mouth out, etc, etc) from Version 1.0 through to 2010. So I can pull out just about any query results we may need for this project that way rather having to deal with text source files. As a side benefit, if anyone wants to volunteer a bit of French-to-English translation talent, all the comments have already been isolated in that database...
The Resource user-defined symbol files I mentioned above, and a bit more info are here
http://www.ultimateamiga.co.uk/index.php/topic,9604.msg44953.html#msg44953I'm off to try assembling +w.s to see if I'm fooling myself or not. But I thought I'd better put you in the picture first
.