Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmd/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ static void printLFNname(char *shortName, char *ext)
dprintf(("[LFN: path %s\n",pathbuffer));

/* LFN get canonical LFN */
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x7160;
r.r_cx = 0x8002;
r.r_si = FP_OFF( pathbuffer );
Expand Down Expand Up @@ -760,6 +761,7 @@ static int dir_print_free(unsigned long dirs)
displayString(TEXT_DIR_FTR_DIRS, buffer);

rootname[0] = toupper(*path);
r.r_flags = 1; /* CY before 21.73 calls! */
r.r_ax = 0x7303;
r.r_ds = FP_SEG(rootname);
r.r_dx = FP_OFF(rootname);
Expand All @@ -770,8 +772,10 @@ static int dir_print_free(unsigned long dirs)

/* Note: RBIL carry clear and al==0 also means unimplemented
alternately carry set and ax==undefined (usually unchanged) for unimplemented
*/
if(!( r.r_flags & 1 ) && ( r.r_ax & 0xFF) ) {
ecm: RBIL is wrong, CF unchanged al=0 is the typical error return.
EDR-DOS returns NC ax=0 so checking for al!=0 here was wrong.
*/
if(!( r.r_flags & 1 ) && ( r.r_ax != 0x7300 ) ) {
dprintf(("[DIR: Using FAT32 info]\n"));
clustersize = FAT32_Free_Space.sectors_per_cluster
* FAT32_Free_Space.bytes_per_sector;
Expand Down
6 changes: 6 additions & 0 deletions lib/lfnfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const char * getshortfilename( const char *longfilename )
r.r_di = FP_OFF( shortfilename );
shortfilename[0] = '\0';
r.r_cx = 0x8001; /* Get short filename */
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x7160;/* LFN truename function */

intrpt( 0x21, &r );
Expand Down Expand Up @@ -82,6 +83,7 @@ static int __creat_or_truncate( const char * filename, int mode, int code )
r.r_bx = O_WRONLY;
r.r_cx = mode;
r.r_dx = code;
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x716C;

intrpt( 0x21, &r );
Expand Down Expand Up @@ -129,6 +131,7 @@ int lfnrename( const char *oldfilename, const char *newfilename )
r.r_dx = FP_OFF( oldfilename );
r.r_es = FP_SEG( newfilename );
r.r_di = FP_OFF( newfilename );
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x7156;

intrpt( 0x21, &r );
Expand Down Expand Up @@ -181,6 +184,7 @@ int lfnfindfirst( const char *path, struct lfnffblk *buf, unsigned attr )
r.r_di = FP_OFF( &lfnblock ); /* LFN find block goes in ES:DI */
r.r_si = 1; /* Use DOS date/time format */
r.r_cx = attr;
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x714E; /* LFN Findfirst */

intrpt( 0x21, &r );
Expand Down Expand Up @@ -226,6 +230,7 @@ int lfnfindnext( struct lfnffblk *buf )
r.r_di = FP_OFF( &lfnblock ); /* The LFN find block */
r.r_bx = buf->lfnax; /* The lfn handle set by findfirst */
r.r_si = 1; /* Use DOS times */
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x714F;

intrpt( 0x21, &r );
Expand All @@ -247,6 +252,7 @@ int lfnfindclose( struct lfnffblk *buf )
if( !buf->lfnsup || !__supportlfns ) return( 0 );

r.r_bx = buf->lfnax; /* Findfirst handle */
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x71A1; /* LFN findclose */

intrpt( 0x21, &r );
Expand Down
1 change: 1 addition & 0 deletions lib/prprompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ void displayPrompt(const char *pr)

d = getdisk();

r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x7147;
r.r_dx = 0;
r.r_si = FP_OFF(pathname);
Expand Down
1 change: 1 addition & 0 deletions suppl/src/_getdcwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ char *_getdcwd(int drive, char Xbuf[], unsigned length)
r.r_dx = drive;
r.r_ds = FP_SEG(buf);
#ifdef FEATURE_LONG_FILENAMES
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x7147;
#else
r.r_ax = 0x4700;
Expand Down
1 change: 1 addition & 0 deletions suppl/src/dfntruen.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ char *dfntruename(const char * const fnam)
chkHeap
if((h = eno_malloc(DFN_FILENAME_BUFFER_LENGTH)) != 0) {
#ifdef FEATURE_LONG_FILENAMES
r.r_flags = 1; /* CY before 21.71 calls! */
r.r_ax = 0x7160;
r.r_cx = 0x8002;
#else
Expand Down