home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d941
/
flipprefs.lha
/
FlipPrefs
/
fprefs.asm
< prev
next >
Wrap
Assembly Source File
|
1993-12-20
|
2KB
|
141 lines
Print Macro
move.l d6,d1
lea \1(PC),a0
move.l a0,d2
move.l #\1E-\1,d3
move.l a5,a6
jsr -48(a6)
endm
bra ReturnCode
SomeInfos
dc.b " $VER: FPrefs1 (09.07.93) written by T. Stocksmeier ",0
even
ReturnCode
clr.l d7
SaveArgs
move.b #0,-1(a0,d0)
move.l a0,a3
move.l d0,d5
OpenDos
lea Dos(PC),a1
clr.l d0
move.l 4.w,a6
jsr -552(a6)
tst.l d0
beq Leave
move.l d0,a5
GetOutput
move.l a5,a6
jsr -60(a6)
tst.l d0
beq CloseDos
Test
move.l d0,d6
subq #1,d5
tst.l d5
beq NoLine
GoOn
cmp.b #"?",(a3)
beq TellInfo
OpenInt
lea Int(PC),a1
clr.l d0
move.l 4.w,a6
jsr -552(a6)
tst.l d0
beq Leave
move.l d0,a4
AllocBuf
move.l #250,d0
move.l #1,d1
jsr -198(a6)
tst.l d0
beq NoMem
move.l d0,d5
OpenFile
move.l a3,d1
move.l #1005,d2
move.l a5,a6
jsr -30(a6)
tst.l d0
beq NotFound
move.l d0,d4
ReadIn
move.l d0,d1
move.l d5,d2
move.l #234,d3
jsr -42(a6)
cmp.b #232,d0
bne NoPFile
SetPrefs
move.l a4,a6
move.l d5,a0
move.l #232,d0
clr.l d1
jsr -324(a6)
CloseFile
move.l d4,d1
move.l a5,a6
jsr -36(a6)
KillBuf
move.l d5,a1
move.l #250,d0
move.l 4,a6
jsr -210(a6)
CloseInt
move.l 4,a6
move.l a4,a1
jsr -414(a6)
CloseDos
move.l 4,a6
move.l a5,a1
jsr -414(a6)
Leave
move.l d7,d0
rts
NoPFile
Print NoP
move.l #6,d7
bra CloseFile
NotFound
Print Not
move.l #11,d7
bra KillBuf
NoMem
Print NoM
move.l #21,d7
bra CloseInt
NoLine
Print NoL
move.l #11,d7
bra CloseDos
TellInfo
Print Inf
bra CloseDos
Dos dc.b "dos.library",0
Int dc.b "intuition.library",0
NoP dc.b "WARN: This file is not a preferences-file!",10
NoPE
Not dc.b "ERROR: Cannot find that file!!",10
NotE
NoM dc.b "FAIL: Cannot allocate file buffer!!!",10
NoME
NoL dc.b "ERROR: No command line given!! Type '?' as arg for more info",10
NoLE
Inf
dc.b 10," >>> FPrefs1 - FlipPrefs <<<",10
dc.b 10,"WRITTEN BY T. STOCKSMEIER IN JULY 1993 !!",10
dc.b 10,"USAGE: FPrefs1 <File>",10
dc.b 10,"(File must be a configuration-file!)",10
dc.b 10
InfE
end