NormanDunbar wrote:I have finished (unless you have more correction) the commenting of MON1_ASM now, I think. I've raised a pull request for you to fetch the latest code back into your repository. Github says that it will merge quite happily.
Thanks, I've merged them.
I've also raised three issues (sorry!) as follows:
Enhancement: the V command lists jobs as suspended when they have a non-zero JB_STAT. A -2 is a waiting job (could print a W), -1 is suspended (S) while zero is active. There is also a >0 value which might need to be ignored or handled as well. (I've forgotten what it indicates at the moment!)
A JB_STAT value >0 means it has been suspended that number of frame interrupts - it gets decremented every 20 ms.
Bug?: The F command, to search for hex text never starts searching from the current memory pointer, it always starts at the next address due to the code at the top of the loop incrementing A3 - I think a decrement of A3 is required just before FH_LOOP and just after FH_MEM to fix this.
IIRC this was intended - when searching repeatedly for a string you can just re-issue the S command (not F - that's for filling memory
) and it will start searching from the next memory location. If it would start from the current location you would end up there every time. (maybe a 'find next' command would solve that).
Bug/Enhancement: The V command shows the total retrieved by MT_FREE but if this is over 60M then it goes negative. I think a test of the top bit of D1.W is required after the divide by 1024, and if set, another divide by 1024 is desired to show MB rather than KB. That should prevent the negatives.
Who on earth needs 60MB of RAM on a QL?
- Edit - When I set QPC2 to use 96MB RAM, it says I have about 29M free. Looks like you should do a CMP.L #32768,D1 instead of just testing bit 15
I'd quite happily create a patch, but at the moment, I cannot find my QMAC assembly/link manual (will be checking with Dilwyn's site later) so that I can assemble and link the two files to test, I've been using GWAS[L] for far too long and never had to use linking. I'm getting too old to remember stuff these days!
I have QMAC and LINK ready on my QPC setup, I'll give it a try when I have time. We could start numbering this version from 2.2 onwards. I have an unpublished version of MON1_ASM with many modifications added since 1988(!) which I never completed to an assembled version; I'll try to merge your commented version manually with my mods so I could possibly produce a version 3.x branch...