@@ -57,6 +57,7 @@ uint8_t get_fujinet_version();
5757uint8_t get_set_time (uint8_t set_flag );
5858void check_uart ();
5959uint16_t parse_config (const uint8_t far * config_sys );
60+ void find_drive_letter (uint8_t num_units );
6061
6162uint16_t Init_cmd (SYSREQ far * req )
6263{
@@ -120,6 +121,8 @@ uint16_t Init_cmd(SYSREQ far *req)
120121 req -> bpb .table = MK_FP (getCS (), fn_bpb_pointers );
121122 }
122123
124+ find_drive_letter (req -> init .num_units );
125+
123126 setf5 ();
124127 consolef ("INT F5 Functions installed.\n" );
125128
@@ -139,7 +142,7 @@ uint8_t get_fujinet_version()
139142 reply = fujicom_command_read (& cmd , (uint8_t * ) & config , sizeof (config ));
140143
141144 if (reply != 'C' ) {
142- consolef ("Unable to get FujiNet version %i. \nAborted.\n" , reply );
145+ consolef ("Unable to get FujiNet version. ERR=%d \nAborted.\n" , reply );
143146 return 1 ;
144147 }
145148
@@ -319,3 +322,21 @@ uint16_t parse_config(const uint8_t far *config_sys)
319322 done :
320323 return buf - (char * ) & config_env ;
321324}
325+
326+ void find_drive_letter (uint8_t num_units )
327+ {
328+ uint8_t far * lol ;
329+ char first ;
330+
331+ _asm {
332+ mov ah , 52 h
333+ int 21 h
334+ mov word ptr lol , bx
335+ mov word ptr lol +2 , es
336+ }
337+
338+ // Undocumented but reliable field:
339+ // The number of current block devices in the List of Lists at 0x20
340+ first = lol [0x20 ] + 'A' ;
341+ consolef ("FujiNet attached to drives %c:-%c:\n" , first , first + num_units - 1 );
342+ }
0 commit comments