home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 6
/
Sonderheft_6-96.iso
/
pd
/
libraries
/
fileid
/
fileid_library
/
src
/
fileident
/
fileidentasm.asm
< prev
next >
Wrap
Assembly Source File
|
1996-11-03
|
1KB
|
84 lines
;
; $VER: FileIdent ASM-Source 1.14
;
; (C) Copyright 1993,1994,1995
;
; BLOODROCK/SDC
;
; All Rights Reserved
;
; Desc.:
; Example of using the FileID.library
;
; Do what U want with the source.
;
; ----------------------------------------
; Name : FileIdentAsm
; Filename: FileIdentAsm.asm
; Version : 1.14
; Part : FileIdentAsm (2)
; Parts : 2
; Begin : 25-Jul-95 16:13:43
; Date : 25-Jul-95 16:34:24
;--------------------------------------------------------------------------
include "exec/types.i"
include "exec/tasks.i"
include "exec/execbase.i"
SECTION "TestCode",Code
;--------------------------------------------------------------------------
xdef _StrMid
;--------------------------------------------------------------------------
_StrMid:
; a0=src, a1=dest,d0=len,d1=pos
tst.l d0
beq.s _StrMd_StringEnde
subq.l #1,d1
movem.l d0/a0,-(sp)
moveq #-1,d0
StrLenLoop
addq.l #1,d0
tst.b (a0)+
bne.s StrLenLoop
cmp.l d0,d1
blo.s StrMid_PosOK
movem.l (sp)+,d0/a0
clr.b (a1)
moveq #-1,d0 ; Pos. bad
rts
StrMid_PosOK
movem.l (sp)+,d0/a0
lea 0(a0,d1.l),a0
subq.l #1,d0
_StrMidLoop
move.b (a0)+,(a1)+
beq.s _StrMd_StringEnde
dbra d0,_StrMidLoop
_StrMd_StringEnde
clr.b (a1)
moveq #0,d0
rts
;--------------------------------------------------------------------------
; csect __MERGED
xref _DOSBase
xref _SysBase
end