curzon@kaoa01.dec.com (Richard Curzon KAO4-3/7A DTN 621-2196) (08/14/87)
A while ago I asked how you test which DOS is loaded into memory. I got no answers, but a couple of requests to post an answer if I found one. Here's what seems to work so far. DOSVEC ($0A) memory location points to what SpartaDOS refers to as COMTAB. ICD has documented its use of COMTAB memory, here are the relevant bytes to test: 1. COMTAB + 0 - jump instruction ($4C) 2. COMTAB + 3 - jump instruction ($4C) 3. COMTAB + 6 - vector (NOT a jump instruction) Atari DOS's, as well as SuperDOS, SmartDOS, will fail test 1 and 2. Test 3 is necessary because MachDOS passes test 1 and 2; but MachDOS DOES have a jump instruction at COMTAB + 6. SpartaDOS and DOS XL will pass all three tests. PS: One of the Sparta COMTAB vectors is to a file crunch routine which returns the next word on the file line in a small buffer in COMTAB. However, this is the usual Atari machine language format, incompatible with Action strings. I did a filename cruncher which returns the filenames in Action strings, if anyone thinks it will save them time send me mail (I don't receive the newsgroup distribution at present). The routine works with SpartaDOS and DOS XL. Dick Curzon Digital Equipment of Canada PO Box 13000 Kanata Ontario K2K 2A6 Canada. (DEC E-NET) KAOA01::CURZON (UUCP) {decvax, ucbvax, allegra}!decwrl!kaoa01.dec.com!curzon (ARPA) curzon%kaoa01.DEC@decwrl.ARPA