home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Z3LIB Module Name: Z3CLRCL
- ; Author: Richard Conn
- ; Z3LIB Version Number: 1.3
- ; Module Version Number: 1.1
- ;
- public clrcl
-
- ext envptr
-
- ;
- ; CLRCL clears the ZCPR3 command line, setting it to empty.
- ; On exit, A=0 and Zero Flag Set if no CL
- ;
- clrcl:
- push hl ;save regs
- push de
- ld hl,(envptr) ;pt to environment
- ld de,18h ;pt to entry
- add hl,de
- ld e,(hl) ;get address in DE
- inc hl
- ld d,(hl)
- ld a,d ;check for no buffer
- or e
- jp z,clrcl1
- ld a,(de) ;get low address of next char
- ld l,a
- inc de
- ld a,(de) ;get high address of next char
- ld h,a
- ld (hl),0 ;store 0 for no line
- or 0ffh ;set NZ for OK
- clrcl1:
- pop de ;get regs
- pop hl
- ret
-
- end