home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ZSYS
/
SIMTEL20
/
SYSLIB
/
SLIB3.LBR
/
SMFN3.Z80
< prev
next >
Wrap
Text File
|
2000-06-30
|
1KB
|
55 lines
;
; SYSLIB Module Name: SMFN3
; Author: Richard Conn
; SYSLIB Version Number: 3.6
; Module Version Number: 1.1
public mfn3
;
; Print FCB file name and type pted to by DE to memory pted to by HL
; Format of Output: xxxxxxxx.yyy <spaces> (0-8 x's, 0-3 y's, req'd spaces)
;
mfn3:
push hl ; save regs
push de
push bc
push af
ld c,11 ; 11 chars total
ld b,8 ; 8 chars first
call prfnx
ld (hl),'.'
inc hl
ld b,3 ; 3 more chars
call prfnx
ld a,c ; get count of spaces
or a ; 0=none
call nz,spacer
pop af ; restore regs
pop bc
pop de
pop hl
ret
prfnx:
ld a,(de) ; get char
and 7fh ; mask out msb
cp ' ' ; skip space
call nz,prout ; print it
inc de ; pt to next
dec b ; count down
jp nz,prfnx
ret
prout:
ld (hl),a ; store char
inc hl ; pt to next
dec c ; count chars
ret
spacer:
ld (hl),' ' ; space over
inc hl
dec c ; count down
jp nz,spacer
ret
end