Wildman wrote:
> On Fri, 26 May 2006 16:11:29 -0700, JoAnne <mwsoft@[EMAIL PROTECTED]
> wrote:
> either in-line assembly or assembly librarys, you can do it
> using INT 21h AX=5701.
> There is a down side. If the basic program or dos utility
> is running on a windows platform, the drive must be
> locked first and then unlocked.
Why do you think the drive has to be locked? The following
batch sets the date of all files in the current directory
to Dec 1999 and works in Win9x and W2k. But because it uses
INT 21h AX=5701 it only sets the "last modified" but not the
creation date.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@[EMAIL PROTECTED]
off
if not [%1]==[] goto sub
echo Bj@[EMAIL PROTECTED]
(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>_sd.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@[EMAIL PROTECTED]
WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>_sd.com
echo ?@[EMAIL PROTECTED]
>>_sd.com
echo ?wEd@[EMAIL PROTECTED]
>>_sd.com
echo R@[EMAIL PROTECTED]
>>_sd.com
echo ??????0x>>_sd.com
for %%i in (*.*) do call %0 %%i
del _sd.com
goto ende
:sub
:: yyyy mm dd hh mm ss
_sd.com 1999 12 24 18 33 17 >>%1
:ende
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
The source code:
; 12.9.01 setzt datei datum von stdout
; setdat yyyy mm dd hh mm ss >>infile
@[EMAIL PROTECTED]
move.w #$81,r5
movu.bw -1.b(r5.w),r2
bsr.w get_number ; jahr
move.w r3,r1
sub.w #1980,r1
lsl.w #4,r1
bsr.w get_number ; monat
and.w #$000f,r3
or.w r3,r1
lsl.w #5,r1
bsr.w get_number ; tag
and.w #$001f,r3
or.w r3,r1
bsr.w get_number ; stunde
move.w r3,r4
lsl.w #6,r4
bsr.w get_number ; minute
and.w #$003f,r3
or.w r3,r4
lsl.w #5,r4
bsr.w get_number ; sekunde
lsr.w #1,r3
and.w #$003f,r3
or.w r3,r4
move.w r4,r2
move.w #$5701,r0
move.w #1,r3
trap #$21
rts.w
get_number:
eor.l r3,r3
move.w #_10,_200
_10: dec.w r2
bmi.b _100
movu.bl (r5.w),r0
inc.w r5
cmp.b #'0',r0
blo.b _20
cmp.b #'9',r0
bhi.b _20
sub.b #'0',r0
mulsq.l #10,r3,r3
add.l r0,r3
move.w #_100,_200
br.b _10
_20: jmp.w (_200)
_100: rts.w
_200: dc.w 0
k10: dc.l 10


|