'*************************************************************************** ' ' Ermitteln des Dateidatums und -zeit und Setzen in einer Zieldatei ' ' entwickelt von / developed by : Thomas Gohel ' Fido : Thomas Gohel@2:2410/330.1 ' InterNet: author@pbsound.snafu.de ' Homepage: http://www.snafu.de/~pbsound/ ' '*************************************************************************** $COMPILE EXE SHARED DateiZeit??, DateiDatum?? CLS ReadDatum("input.exe") PRINT DateiZeit??, DateiDatum?? WriteDatum("output.exe") PRINT DateiZeit??, DateiDatum?? END FUNCTION ReadDatum(Datei$) public LOCAL DateiSeg??, DateiOff??, DateiHandle% Datei$ = Datei$ + CHR$(0) DateiSeg?? = STRSEG(Datei$) DateiOff?? = STRPTR(Datei$) ! push ds ! mov ax, &h3d90 ! mov dx, DateiOff?? ! mov ds, DateiSeg?? ! int &h21 ! pop ds ! mov DateiHandle%, ax ! jnc ReadFileOk EXIT FUNCTION ReadFileOk: ! mov ax, &h5700 ! mov bx, DateiHandle% ! int &h21 ! mov DateiZeit??, cx ! mov DateiDatum??, dx ! mov ax, &h3e00 ! mov bx, DateiHandle% ! int &h21 END FUNCTION FUNCTION WriteDatum(Datei$) public LOCAL DateiSeg??, DateiOff??, DateiHandle% PRINT Datei$ Datei$ = Datei$ + CHR$(0) DateiSeg?? = STRSEG(Datei$) DateiOff?? = STRPTR(Datei$) ! push ds ! mov ax, &h3d90 ! mov dx, DateiOff?? ! mov ds, DateiSeg?? ! int &h21 ! pop ds ! mov DateiHandle%, ax ! jnc WriteFileOk EXIT FUNCTION WriteFileOk: ! mov ax, &h5701 ! mov bx, DateiHandle% ! mov cx, DateiZeit?? ! mov dx, DateiDatum?? ! int &h21 ! mov ax, &h3e00 ! mov bx, DateiHandle% ! int &h21 END FUNCTION