home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d954
/
mft.lha
/
MFT
/
mft.asm
< prev
next >
Wrap
Assembly Source File
|
1993-10-03
|
3KB
|
206 lines
Num_Functions equ 7 ; Sieben Funktionen
include "args.i"
move.l a0,d6
move.l d0,d7
OpenDos
move.l 4,a6
move.l #37,d0
lea Dos(PC),a1
jsr -552(a6)
tst.l d0
beq Fine
lea DosB(PC),a0
move.l d0,(a0)
Parse
OpenArgs Donknow
lea ArgList(PC),a0
WhatFunct
move.l (a0),a0
move.l (a0),d0
cmp.b #Num_Functions,d0
bhi BadFunction
subq #1,d0
beq Rename
subq #1,d0
beq Delete
subq #1,d0
beq MakeDir
subq #1,d0
beq Fault
subq #1,d0
beq Comment
subq #1,d0
beq Delay
bra BadFunction
Args_Away
CloseArgs
CloseDos
move.l DosB(PC),a1
move.l 4,a6
jsr -414(a6)
Fine
moveq #0,d0
rts
Rename
lea ArgList(PC),a0
tst.l 4(a0)
beq NoArgs
tst.l 8(a0)
beq NoArgs
move.l 4(a0),d1
move.l 8(a0),d2
move.l DosB(PC),a6
jsr -78(a6)
tst.l d0
beq Error
bra Args_Away
Delete
lea ArgList(PC),a0
tst.l 4(a0)
beq NoArgs
move.l 4(a0),d1
move.l DosB(PC),a6
jsr -72(a6)
tst.l d0
beq Error
bra Args_Away
MakeDir
lea ArgList(PC),a0
move.l 4(a0),d1
tst.l d1
beq NoArgs
move.l DosB(PC),a6
jsr -120(a6)
move.l d0,d1
tst.l d0
beq Error
jsr -90(a6)
bra Args_Away
NoArgs
jsr -60(a6)
tst.l d0
beq Sorry2
move.l d0,d1
lea Args_Err(PC),a0
move.l a0,d2
moveq #Args_ErrE-Args_Err,d3
jsr -48(a6)
Sorry2
bra Args_Away
Error
jsr -132(a6)
tst.l d0
beq Args_Away
Jump_In
move.l d0,d1
lea Sorry(PC),a0
move.l a0,d2
lea Buf(PC),a0
move.l a0,d3
move.l #60,d4
jsr -468(a6)
lea Buf(PC),a0
cmp.b #"A",2(a0)
bcc NixDa
sub.b #$20,2(a0)
NixDa
jsr -60(a6)
tst.l d0
beq Args_Away
move.l d0,d1
move.l d1,d5
lea Buf(PC),a0
move.l a0,d2
clr.l d3
.loop
addq #1,d3
tst.b (a0)+
bne .loop
lea Buf(PC),a0
move.b #".",-1(a0,d3)
addq #2,d2
jsr -48(a6)
move.l d5,d1
lea CR(PC),a0
move.l a0,d2
moveq #2,d3
jsr -48(a6)
bra Args_Away
Fault
lea ArgList(PC),a0
move.l 12(a0),a0
move.l (a0),d0
tst.l d0
beq NoArgs
bra Jump_In
Comment
lea ArgList(PC),a0
move.l 4(a0),d1
tst.l d1
beq NoArgs
move.l 8(a0),d2
tst.l d2
beq NoArgs
jsr -180(a6)
tst.l d0
beq Error
bra Args_Away
BadFunction
lea ArgList(PC),a0
move.l 12(a0),a0
move.l #236,(a0)
bra Fault
Delay
lea ArgList(PC),a0
move.l 12(a0),a0
move.l (a0),d1
tst.l d1
beq NoArgs
mulu #50,d1
jsr -198(a6)
bra Args_Away
Donknow
jsr -60(a6)
tst.l d0
beq Args_Away
move.l d0,d1
lea Info(PC),a0
move.l a0,d2
move.l #InfoE-Info,d3
jsr -48(a6)
bra Args_Away
Dos dc.b "dos.library",0
DosB ds.l 1
ArgP ds.l 1
Template dc.b "FUNCTION/N/A,ARG1/A,ARG2,NUMBER/N",0
ArgList dc.l 0,0,0,0
Args_Err dc.b "Bad args",13,10
Args_ErrE
Sorry dc.b 0
CR dc.b 13,10
Buf ds.l 25
Info dc.b 12,10
dc.b " MFT - Multi Functions Tool --- V1.03",10,10
dc.b "MFT FUNCTION (number) ARGUMENT1 (String) ARGUMENT2 (String) NUMBER",10,10
dc.b 10,10,"1) Rename : Call file ARGUMENT1 like ARGUMENT2",10
dc.b "2) Delete : Kill file ARGUMENT1",10
dc.b "3) MakeDir : Create Dir called ARGUMENT1",10,"4) Fault : Give out error n",10
dc.b "5) Comment : Give file ARGUMENT1 the comment ARGUMENT2",10
dc.b "6) Delay : Wait n Seconds",10,10
dc.b 'n is: MFT "" "" n',10,10
dc.b "This tool's >>> F R E E W A R E <<< !!!",10,10
InfoE
end