home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Z3LIB Module Name: Z3GPATH
- ; Author: Richard Conn
- ; Z3LIB Version Number: 1.3
- ; Module Version Number: 1.1
- ;
- public getpath
-
- ext envptr
-
- ;
- ; GETPATH returns the address of the external path in HL and the
- ; maximum number of elements in said path in A. If there is no external path,
- ; A=0 and Zero Flag Set. No other registers are affected.
- ;
- getpath:
- push de ;save DE
- ld hl,(envptr) ;pt to environment
- ld de,9 ;pt to path entry
- add hl,de
- ld e,(hl) ;get path address in DE
- inc hl
- ld d,(hl)
- inc hl
- ld a,(hl) ;get path size in A
- ex de,hl ;HL pts to path
- pop de ;restore DE
- or a ;set flag
- ret
-
- end