Remote DIRectory program rdir.com v1.2 by simon ewins NOTE: ----> V1.2 contains some improvements to the summary after printing the directory. some systems with files that are over 999k in total ended up with a sloppy last line. this has been remedied. - the drive/user is now shown with the 'no files' message. - two bytes for max user and max drive have been added to the table at the start of the program (122h=user, 123h=drive). if the user or drive requested is higher than the value in the table then the spec is ignored and the current value is used instead. this provides a high degree of security as the only way to read a directory higher than the values in the table is to be logged to the directory in question! - the source code is released in v1.2..... syslib v2.1 or higher is required to assemble rdir. routines in this program are based on those found in xmodem and emx. rdir is a remote directory routine that in addition to the usual directory functions will indicate the transfer times for the file at each of the 6 most popular baudrates. the 'switches' at 106h and 107h serve as the default info as well as flags for allowing either option. the values of the two locations are stuck into place and then if options are allowed they can be changed by the /switch. a secure system, obviously would have 106h, 107h and 10Ah set to 0 as default or 10Ah set to 1 with 117h set to 1 to enable options but only if the password is correct. Patch information: () = setting as distributed """"""""""""""""" 103h (0) lsb of BSPEED in BYE 104h (0) msb of BSPEED in BYE 105h (5) baudrate code (see below) if 104h=0000h then this used for speed 106h (0) 1=show system files, 0=don't show system files 107h (0) 1=show all user areas, 0=show only current user area 108h (3) number of columns (2 or 3) 109h (21) number of lines on screen -1 10Ah (1) 1=allow options, 0=no options 10Bh = default filespec 0??????????? 117h (0) 1=passworded option protection, 0=no password 118h = 10 character password (right-padded with 0) PASSWORD 122h (15) maximum user area allowed 123h (2) maximum drive allowed --->> NOTE: maxusr and maxdrv can ONLY be overcome by being logged to a drive/user that is greater than the values at 122h/123h. NOTE: (for those wishing to use this program on a 'local' system) The baud-rate is gained from reading an address pointed to by the 2 bytes at 104H. Set these to the address of BSPEED in BYE. If you aren't running BYE and want this to work as a non-remote directory program then set 103H & 104H to 0000H and set 105H to one of the following: 0 = 110 baud 1 = 300 baud 2 = 450 baud 3 = 600 baud 4 = 710 baud 5 = 1200 baud (by using the /b# option the above rates can be set at runtime) the listing is 3 columns wide and looks like this: TEST .AQM 3k 3:34 | BYE .COM 3k 3:45 | FILEFIND.COM 6k 6:22 >> A5: Files: 3 Used: 12k Free: 178k Time: 0:13:30 @ 110bps if 10Ah is set to one then the following options are allowed: RDIR = show all files as determined by bytes 105h -> 109h RDIR /b# = show times using bps code #, where # = 0 to 5 above RDIR /s = show system files RDIR /a = show all user areas by changing the ambiguous filespec at 10Bh the above will display only whatever fits with no filespec entered unless a filespec is entered. full drive and user and filespecs are supported. (up to and including maxusr and maxdrv) RDIR b4:rcpm-*.l?t /b2 = show files matching on b4: using 600 baud times RDIR 5: = show files using defaults on current drive/user 5 RDIR B2: /S = show files using defaults, incl. system files on drive b:/user 2 if a filespec is provided then /s is not allowed, /a is still allowed. the initial password, as distributed, is PASSWORD (all in upper case). a non-secure system being used locally would probably have 105h set permanently to the user's most frequently used baudrate and 103h/104h set to 0000h to disable the search for the bye baudrate code. further, the following would allow all options, without a password and show files only on the current user area: 106h = 1 107h = 0 10Ah = 1 117h = 0 108h = columns (2 or 3) 109h = lines (23 as distributed) forward any comments or suggestions to Simon Ewins at: Willowdale CBBS (416) 226-9260 Toronto EMX RCP/M (416) 484-9663 CP/M-NET East (201) 249-0691 ---- END ----