Merry Christmas.
Robert
------------------
jnc exitsuccess
'************************************************************************ ' ' NAME95.BAS Konvertierung von Dateinamen von/nach DOS8.3 <-> LFN ' Konvention mit PowerBASIC 3.2 ' ' entwickelt von Thomas Gohel FidoNet : Thomas [email protected]:2410/330.1 ' Version: 1.00 InterNet: [url="mailto:[email protected]"]mailto:[email protected][/url][email protected]</A> ' Stand : 16.11.1996 Homepage: [url="http://www.pbhq.de/"]http://www.pbhq.de/[/url] ' '************************************************************************* DECLARE FUNCTION GetStrLoc (BYVAL INTEGER) AS INTEGER CLS PRINT "Erzeuge LFN-Files : "; Win95Open$("C:\Testfile1.Test") PRINT "Erzeuge LFN-Files : "; Win95Open$("C:\Testfile2.Test") PRINT "Erzeuge LFN-Files : "; Win95Open$("C:\Testfile3.Test") PRINT "---------------------------------------------" PRINT "Ermittele LFN alias: "; Win95Pfad$("C:\TESTFI~1.TES") PRINT "Ermittele LFN alias: "; Win95Pfad$("C:\TESTFI~2.TES") PRINT "Ermittele LFN alias: "; Win95Pfad$("C:\TESTFI~3.TES") PRINT "---------------------------------------------" PRINT "Ermittele DOS alias: "; Dos83Pfad$("C:\Testfile1.Test") PRINT "Ermittele DOS alias: "; Dos83Pfad$("C:\Testfile2.Test") PRINT "Ermittele DOS alias: "; Dos83Pfad$("C:\Testfile3.Test") FUNCTION Dos83Pfad$(BYVAL DirLFN$) public DIM LFNBuffer AS STRING * 128 DirLFN$ = DirLFN$ + CHR$(0) ! push ds ! lea di, LFNBuffer$ ! push ds ; ES [img]http://www.powerbasic.com/support/forums/biggrin.gif[/img]I auf Stack, erspart außer- ! push di ; das leidige Umkopieren ! les di, DirLFN$ ; Handle von DirLFN$ holen ! push di ; auf Stack ! call GetStrLoc ; Adresse holen ! mov ds, dx ; Quelle auf DS:SI umkopieren ! mov si, ax ; ! pop di ; ES [img]http://www.powerbasic.com/support/forums/biggrin.gif[/img]I umkopiert vom Stack holen ! pop es ; ! mov ax, &h7160 ; Make DOS 8.3 Names ! mov ch, 0 ! mov cl, 1 ! int &h21 ! pop ds i% = INSTR(1, LFNBuffer$, CHR$(0)) Dos83Pfad$ = LEFT$(LFNBuffer$, i%-1) END FUNCTION FUNCTION Win95Pfad$(BYVAL DirLFN$) public DIM LFNBuffer AS STRING * 128 DirLFN$ = DirLFN$ + CHR$(0) ! push ds ! lea di, LFNBuffer$ ! push ds ; ES [img]http://www.powerbasic.com/support/forums/biggrin.gif[/img]I auf Stack, erspart außer- ! push di ; das leidige Umkopieren ! les di, DirLFN$ ; Handle von DirLFN$ holen ! push di ; auf Stack ! call GetStrLoc ; Adresse holen ! mov ds, dx ; Quelle auf DS:SI umkopieren ! mov si, ax ; ! pop di ; ES [img]http://www.powerbasic.com/support/forums/biggrin.gif[/img]I umkopiert vom Stack holen ! pop es ; ! mov ax, &h7160 ; Make Win95 Names ! mov ch, 0 ! mov cl, 2 ! int &h21 ! pop ds i% = INSTR(1, LFNBuffer$, CHR$(0)) Win95Pfad$ = LEFT$(LFNBuffer$, i%-1) END FUNCTION FUNCTION Win95Open$(BYVAL Filename$) Filename$ = Filename$ + CHR$(0) ! push ds ! les di, Filename$ ; Handle von Filename$ holen ! push di ; auf Stack ! call GetStrLoc ; Adresse holen ! mov ds, dx ; Quelle auf DS:SI umkopieren ! mov si, ax ; ! mov ax, &h716C ! mov bx, &h0002 ! mov cx, &h0000 ! mov dx, &h0012 ! mov di, 1 ! int &h21 ! pop ds ! mov bx, ax ; und File wieder schliessen ! mov ah, &h3E ! int &h21 Win95Open$ = Dos83Pfad$(Filename$) END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: