Changing Drive Numbers within Applications I was involved in the beta testing of Superbase V3. 0. This was the first version with support for the 1581 3. 5 inch disk drive and my test version came on 3. 5 inch media. As has been reported, testing of Superbase went well ; in fact the only problems we found were with the 128 version of the utility program, which I managed to crash with monotonous regularity. A copy of my 8250 database was given to Tom Cranstoun for checking and the problems were fixed, leaving a good product. This left me with a little problem though. I have Superscript and Superbase V2 on 5. 25 disk and Superbase V3. 0 on 3. 5 disk. Version 2 of Superbase does not support the 1581, and because of the bug in the 1571 ROM, I can ' t run Superbase on the 1571. ( Don ' t tell me to get a ' Fix - it ' ROM, I ' m not talking about the old bug, I ' m talking about the NEW one. - See my article elsewhere in this newsletter.) For my major applications I want to run Superscript and Superbase in the machine at the same time ( just like Super - Office on the 8096 ). To do this you need to load Superscript first. I ' ve got a 128D, so having booted Superscript, I can ' t switch the drive off and turn the 1581 on. Neither will Superscript allow you to load Superbase from device 9 ( the usual setting of my 1581 ). A short time ago two American Magazines arrived and while reading them I saw how to overcome the problem. I gratefully acknowledge the inspiration given by them. Firstly ' Twin Cities 128 ' Issue 22 carries an article by Miklos Garamszeghy on changing the vectors inside the 1581 ( to prevent auto initialisation by programs such as PaperClip ). He states that most commercial wordprocessing packages allow DOS wedge commands to be passed to the drive, to allow things like disk validation. A utility loader ( ampersand ) file can be activated in this way. Miklos used this to alter the 1581 reset vector. The second magazine was the ' CBUG Escape ' Issue 10. In that issue, an article by Anthony Goceliak described a method of setting IEEE bus device numbers, using ampersand files. For those who do not know about them, ampersand files are machine code programs which load into and execute within the disk drive ram. They will not operated on some of the early IEEE drives such as the 3040 and 4040, but will work with the 8x50 and serial drives. The rules for ampersand files are fairly simple : 1 ) On earlier drives ( 8050,8250,2031,1541 ) the file name must start with an ampersand (&). On the 1571 and 1581, this is not required. 2 ) The file must be a USR type file. 3 ) The first two bytes of the file specify the address in DISK RAM to which the code will be loaded. 4 ) The third byte of the file is the number of bytes of CODE to come. 5 ) After the code, and not included in the count at 4 ) above, there must be a single byte checksum. This is the sum of all the bytes before it, including buffer address and number of bytes. If the value of the sum is greater than 255, 255 is subtracted and the check repeated. After a few moments thought, I realised that by putting the two ideas together, I could solve my problem. It would be possible to create auto - execute files which set the device number of the 1571, as for the IEEE drives. By using the DOS wedge technique, these could be activated AFTER Superscript had been loaded. Now, to run both Superscript and Superbase at once, I first set the 1581 as device 8, but do not power it up. Superscript is then booted on the 1571 in the ' D '. Once defaults have been loaded, I place a disk containing the ampersand file called ' set device 09 ' in the 1571 and execute the command < F1 > < D > ocument < U > tility < O > ther ; then on the command line I type in '& set device 09 ' and press return. The ampersand file is loaded into disk ram and resets the 1571 as device 9. At this point the screen fills with garbage and needs to be restored by pressing < RUN / STOP >< RESTORE >. I can then turn the 1581 on and with < F1 > < D > ocument < U > tility < S > uperbase, boot Superbase V3. 0 from the 3. 5 inch drive. If I want to use the 8250, which is set as device 9, then by using a different file I can set the 1571 as device 10 - unreachable from Superscript, but accessible from Superbase. Some people collect programs ; I collect disk drives ! On my system at home, my 128 - D ( with built - in 1571 ) has a 1581 on the serial bus and provision ( via a BrainBox IEEE interface ) to connect to 4040, 2031 and 8250 parallel IEEE drives. In order to have as much flexibility as possible, I wrote a BASIC program to create ampersand files for all these disks. That program reads the drive ROM, to determine the drive type, then sets parameters accordingly. Here I present a cut down version of the program, which requires you to specify the drive type and modify the code accordingly. If anyone would like a copy of the full version, then please send me a formatted disk and return postage. 100 rem dsave "@ make & devices ":? ds $ 110 rem 120 rem autoboot file maker 130 rem by joe griffin ( icpug ) 140 rem 150 print " Make Automatic Device Setter Files " 160 print 170 un = 8 : rem device wanted 180 sd = 8 : rem starting device number 190 ed = 12 : rem ending device number 200 for dv = sd to ed 210 fi $=" set device "+ right $(" 00 "+ mid $( str $( dv ), 2 ), 2 ) 220 rem note if device is not a 1571 or a 1581 then fi $="&"+ fi $ 230 print " Filename = "; chr $( 34 ); fi $; chr $( 34 ); 240 open 1,un,3 ,("@ 0 :"+ fi $+", u,w ") 250 restore : cs = 0 260 read bb,mm : rem drive specific items 270 read mc : cs = cs + mc : print # 1,chr $( mc ); 280 cs = cs + bb : print # 1,chr $( bb ); 290 for i = 1 to 2 : read mc : cs = cs + mc : print # 1,chr $( mc );: next i 300 cs = cs + dv : print # 1,chr $( dv ); 310 for i = 1 to 4 : read mc : cs = cs + mc : print # 1,chr $( mc );: next i 320 cs = cs + mm : print # 1,chr $( mm ); 330 for i = 1 to 3 : read mc : cs = cs + mc : print # 1,chr $( mc );: next i 340 cs = cs + mm + 1 : print # 1,chr $( mm + 1 ); 350 read mc : cs = cs + mc : print # 1,chr $( mc ); 360 if cs > 255 then cs = cs - 255 : goto 360 370 print " Checksum ="; cs 380 print # 1,chr $( cs );: close 1 390 next dv 400 end 410 data 4,119 : rem disk drive buffer and location of device bytes 415 rem change these as required 420 : 430 data 0,12,169,24,105,32,133,105,32,133,96 431 : 432 rem 0, ( bb ) buffer address lo,hi 433 rem 12 no of bytes of code to follow 434 rem 169 ,( dv ) lda # dv 435 rem 24 clc 436 rem 105,32 adc # 32 437 rem 133 ,( mm ) sta mm ; read device number 438 rem 105,32 adc # 32 439 rem 133 ,( mm + 1 ) sta mm + 1 ; write device number 440 rem 96 rts 445 : 450 rem 2031,1541,1571,1581 bb = 4 mm = 119 460 rem 8050,8250 bb = 18 mm = 12 470 rem 1551 bb = 4 mm = 12 480 rem 4040 dos 2. 7 only bb = 18 mm = 12