home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
system
/
oneassign
/
oneassign.s
< prev
Wrap
Text File
|
1995-02-27
|
6KB
|
144 lines
******************************************************************************
*
* One assign 1.1
*
* (c) 1994 Jan Skypala
*
* $VER: OneAssign.s 37.2 (1 Mar 1994)
*
******************************************************************************
incdir 'Include:'
include 'exec/exec_lib.i'
include 'dos/dos_lib.i'
include 'dos/dos.i'
_SysBase equ 4
NORMALASSIGNS set 1
ADDASSIGNS set 1
DEFERASSIGNS set 1
PATHASSIGNS set 1
Start move.l (_SysBase).w,a6
lea DosName(pc),a1
moveq #37,d0
jsr _LVOOpenLibrary(a6) ;open dos.library
beq.b End
move.l d0,a6
lea Assigns(pc),a4 ;beginning of assign list
Normal IFD NORMALASSIGNS
; lea NormalAssigns(pc),a4
move.l #_LVOAssignLock,d4
bsr.b LockOnes
ENDIF
Adds IFD ADDASSIGNS
; lea AddAssigns(pc),a4 ;beginning of addassign list
move.l #_LVOAssignAdd,d4
bsr.b LockOnes
ENDIF
Defers IFD DEFERASSIGNS
; lea DeferAssigns(pc),a4 ;beginning of deferassigns list
move.l #_LVOAssignLate,d4
bsr.b Paths
ENDIF
Path IFD PATHASSIGNS
; lea PathAssigns(pc),a4 ;beginning of pathassigns list
move.l #_LVOAssignPath,d4
bsr.b Paths
ENDIF
move.l a6,a1 ;no => close dos.library
move.l (_SysBase).w,a6
jsr _LVOCloseLibrary(a6)
rts ;and return
IFD NORMALASSIGNS
LOCKS set 1
ENDIF
IFND LOCKS
IFD ADDASSIGNS
LOCKS set 1
ENDIF
ENDIF
IFD LOCKS
LockOnes move.l a4,d1 ;dir to d1
moveq.l #ACCESS_READ,d2
jsr _LVOLock(a6) ;lock it
move.l d0,d2
.loop2 tst.b (a4)+ ;move to next string
bne.b .loop2
move.l a4,d1 ;that's the assign
jsr (a6,d4) ;assign it
.loop3 tst.b (a4)+ ;move behind this string
bne.b .loop3
tst.b (a4) ;is there another string?
bne.b LockOnes ;yes => process it
addq #1,a4
rts
ENDIF
IFD DEFERASSIGNS
PATHS set 1
ENDIF
IFND PATHS
IFD PATHASSIGNS
PATHS set 1
ENDIF
ENDIF
IFD PATHS
Paths move.l a4,d2 ;dir to d2
.loop2 tst.b (a4)+ ;move to next string
bne.b .loop2
move.l a4,d1 ;that's the assign
jsr (a6,d4) ;assign it
.loop3 tst.b (a4)+ ;move behind this string
bne.b .loop3
tst.b (a4) ;is there another string?
bne.b Paths ;yes => process it
addq #1,a4
rts
ENDIF
End
Version dc.b '$VER:OneAssign 37.2',0
DosName dc.b 'dos.library',0
Assigns IFD NORMALASSIGNS
NormalAssigns dc.b 'Work:ENV',0,'ENV',0
dc.b 'Work:T',0,'T',0
dc.b 'Work:Clipboards',0,'CLIPS',0
dc.b 'S:',0,'REXX',0
dc.b 'DEVS:Printers',0,'PRINTERS',0
dc.b 'DEVS:Keymaps',0,'KEYMAPS',0
dc.b 'Work:BitmapFonts',0,'FONTS',0
dc.b 'Work:Locale',0,'LOCALE',0
dc.b 0
ENDIF
IFD ADDASSIGNS
AddAssigns dc.b 'Work:Intellifont',0,'FONTS',0
dc.b 'SYS:Classes',0,'LIBS',0
dc.b 0
ENDIF
IFD DEFERASSIGNS
DeferAssigns dc.b 'LOCALE:Help',0,'HELP',0
dc.b 'SYS:',0,'HD',0
dc.b 'Work:GoldED',0,'GOLDED',0
dc.b 'Work:GUIMake',0,'GUIMAKE',0
dc.b 'Work:Include',0,'INCLUDE',0
dc.b 'Work:Include',0,'INCLUDES',0
dc.b 'Work:Text_Include',0,'TEXT_INCLUDE',0
dc.b 'Work:DPaint',0,'Deluxe Paint',0
dc.b 'Work:DPaint',0,'DPaintIV',0
dc.b 'Work:',0,'JPEGTMP',0
dc.b 'Work:Pascal',0,'PASCAL',0
dc.b 'SYS:Tools/Commodities',0,'PowerCache',0
dc.b 'Work:Source/Articles/HowToCode',0,'HowToCode',0
dc.b 'Work:E/Sources',0,'E',0
dc.b 'Work:E/Bin',0,'EC',0
dc.b 'Work:E/Modules',0,'EMODULES',0
dc.b 'Work:E/ModulesText',0,'ETEXTS',0
dc.b 0
ENDIF
IFD PATHASSIGNS
PathAssigns dc.b 'DF0:',0,'Floppy disk',0
dc.b 0
ENDIF