Jump to content





DIRPRINT.ACC - Print Disk directories from desktop

Posted by k-Pack, 23 July 2014 · 1,043 views

Diamond
This is the last accessory from the ones written pre-2000.  I was hoping that by this time I would have remembered how they had been created. Looks like the learning curve will start from the beginning again. It should take me about 10 min. to go over vast amount of literature about programming Diamond accessories.        
 
The zip file contains DIRPRINT.ACC and DIRPINT.M65
Attached File  DIRPRN.zip (904bytes)
downloads: 91
 
 
Diamond DIRECTORY ACCESSORY 
 
Ever want to print a disk directory while your at the Diamond desktop. It's at those time you miss the "A" command in DOS 2.x - "D1:*.*,P:".  This ACC will print out the Directory of D1: or D2: without leaving the Desktop.
 
Diamond reserves about 300 bytes for accessories.  At boot up it scans the disk for files with the ACC extension.  When it finds one, it loads the program into an area of memory.  When called, the accessory is moved to a predefined location, executed and then moved back.  This process and file header information is explained in much greater detail in the DIAMOND Developers Kit.
 
Directory Printer is one such accessory.  The short program dumps the disk directory of a disk formatted in DOS 2.x to the printer. Nothing to complicated,  but it's sometimes handy to have the capability at the click of the button. Copy the file to your Diamond set-up disk.  
 
This accessory requires 213 bytes and may not leave enough room for others.  If there are conflicts some .ACC files will have to be deactivated.  This can be done by changing the extension (DIRPRN will load in with the REBOOT accessory that comes with the operating system without problems).      
 
Now reboot the system.  If you check the drop down menu section,   DIR PRINT should be one of the options.  Be sure that the printer is on and there is a disk in drive 1.  Click on the menu option and a disk directory should be printed. If you want a print out of drive 2, hold down the START key before you click.
 
Try loading an application program, such as DIAMOND Paint.  You will find that DIR PRINT is still there. Now, any time from any program you can print out a directory.
 
There is one thing worth mentioning.  Memory for accessories is limited and it remains the domain of short programs.  The shorter the better.  One way to keep accessories short is to reduce the amount of error checking.  DIR PRINT has absolutely no error checking. If you try to run the accessory while the printer is off or there is a problem with the disk or drive, more then likely,  the computer will lock up.




November 2018

S M T W T F S
    123
45678910
11121314151617
181920 21 222324
252627282930 

My Picture

Latest Visitors