home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Xplorer 1
/
Scene_Xplorer_1.iso
/
Tools
/
Playerek
/
FastAssign
/
FastAssignIII_1.s
< prev
Wrap
Text File
|
1978-01-11
|
4KB
|
160 lines
;TOSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPPPPPPBO
;
;Fast Assign Rafik/RDST/SCT
;last change 96-Dec-29
;TO add your own assign find label AssignTable:
;and write almost as in dos
;in dos in source
;assign JFIF: dh0:jfif assign jfif,dh0:jfif
;Written in Trashmone 2.0
;NOTE dont add : in first argument!
*******************************************************************************
*Program ten tworzy katalog ram:T i assignuje tam t:
*Tworzy równieû assigny: ENV:, PRINTERS:, CLIPBOARDS:, i pare innych
*Potrzebny system 2.0+
*Eliminuje komendy :
*Assign >NIL: ENV: DH0:ENV
*Assign >NIL: T: RAM:T
*Assign >NIL: CLIPS: DH0:T/Clipboards
*Assign >NIL: REXX: S: ;<nie
*Assign >NIL: PRINTERS: DEVS:Printers
*Assign >NIL: KEYMAPS: DEVS:Keymaps
*Assign >NIL: LOCALE: SYS:Locale
*Assign >NIL: LIBS: SYS:Classes ADD ;<nie
*Assign >NIL: HELP: dh0:Help DEFER
*******************************************************************************
CALL: MACRO
jsr _\1(a6)
ENDM
EXEC: MACRO
move.l 4.w,a6
ENDM
Start:
moveq #36,d0
lea DosName(pc),a1
EXEC
CALL OpenLibrary
move.l d0,DosBase
beq.w WrongSys
move.l d0,a6
;make directory!
move.l #T_Name,d1
CALL CreateDir
move.l d0,d1
beq.s .skip ;CloseLib
;najprawdopodobniej objekt juû istnieje!
CALL UnLock
.skip
lea AssignTable(pc),a0
AssignLoop:
tst.b (a0)
beq.s EndTable
move.l a0,d1
.1 tst.b (a0)+
bne.s .1
move.l a0,TableAdr
moveq #-2,d2 ;mode read
CALL Lock
move.l d0,d2
move.l d0,Lock
move.l TableAdr,d1
CALL AssignLock ;d2lock d1name
tst.l d0
bne.s .ok
;bîâd przy assignie!
move.l Lock,d1
CALL UnLock
.ok
move.l DosName,a0
.loop tst.b (a0)+
bne.s .loop
bra.s AssignLoop
EndTable:
CALL Output
move.l d0,d1
beq.s CloseLib
move.l #AboutTXT,d2
move.l #AboutTXTEnd-AboutTXT-1,d3
CALL Write
CloseLib:
move.l a6,a1
EXEC
CALL CloseLibrary
moveq #0,d0
rts
WrongSys:
moveq #-1,d0
rts
DosBase: dc.l 0
even
TableAdr: ;uûywa adresu DosName poniewaû po otwarciu biblioteki
;text dos.library nie jest juû nam potrzebny!
Lock: equ *+4 ;adres DosName+4 tak jak wyûej
DosName: dc.b 'dos.library',0 ;tu wrzucam baze tabeli assig
assign: MACRO
dc.b '\2',0,'\1',0
ENDM
*******************************************************************************
AssignTable: ;podajesz gdzie zaasignowaê i nazwe assigna!
*******************************************************************************
assign ENV,sys:env
T_Name: assign T,ram:T
assign CLIPS,ram:t
assign PRINTERS,devs:printers
assign KEYMAPS,devs:keymaps
assign LOCALE,sys:locale
assign HELP,ram:
;place for your assign!
;That must stay here!
dc.b 0,0 ;this is end leave two 0
dc.b '$VER:'
AboutTXT: dc.b ' FastAssign V3.0 (29.Dec.1996)',$A
dc.b ' by Rafik/rdst',$a,0
AboutTXTEnd:
*Assign >NIL: ENV: DH0:ENV
*Assign >NIL: T: RAM:T
*Assign >NIL: CLIPS: DH0:T/Clipboards
*Assign >NIL: PRINTERS: DEVS:Printers
*Assign >NIL: KEYMAPS: DEVS:Keymaps
*Assign >NIL: LOCALE: SYS:Locale
*Assign >NIL: HELP: dh0:Help DEFER ;na ram:t/ help!
*Assign >NIL: LIBS: SYS:Classes ADD ;<-nie
*Assign >NIL: REXX: S: ;<-nie
; includy
_CloseLibrary EQU -414
_OpenLibrary EQU -552
*************************************************************************
_Write EQU -48
_Output EQU -60
_Lock EQU -84
_UnLock EQU -90
_DupLock EQU -96
_CreateDir EQU -120
_AssignLock EQU -612
*************************************************************************
*unfold