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
/
CPM
/
ZCPR33
/
S-Z
/
VTCAP11.LBR
/
DATA.1Z0
/
DATA.18°
Wrap
Text File
|
2000-06-30
|
4KB
|
277 lines
; DATA
;
; This is the subroutine to read the information from TBUF and display it
; on the CRT properly formatted and in the correct positions. The routine
; is flagged to display the information in either HEX, DECIMAL or DIRECT
; readout.
;
; EXAMPLE: ASCII DECIMAL HEX
; A 65 41
; ^A 1 01
;
; SYSLIB routines used: PA2HC, AT, EREOL
data: push hl ; save HL
call cdata ; clear previous data
call stndend
ld hl,(rec) ; get record number
ld de,18 ; bytes per name
call mulhd ; calculate position of index name
ld de,buf1 ; get start address of buffer
add hl,de ; add position to start address
push hl ; save index address
ld de,iname ; point to index name buffer
ld bc,16 ; bytes to move
ldir
pop hl
ld bc,17
add hl,bc
ld a,(hl)
cp '*'
jr z,ddel
call gxymsg
db 3,34
db ' '
db 0
jr dcon
ddel: call gxymsg
db 3,34
db 2,'DELETED',1
db 0
dcon: call at ; position cursor to index field
db 14,62
ld hl,iname ; point to index name
call epstr
call at ; position cursor to name field
db 3,17
ld hl,ttname ; point to terminal name
ld b,16
dname: ld a,(hl)
call cout
inc hl
djnz dname
call at
db 3,65
ld hl,(rec)
call phlfdc
call at ; cursor up field
db 6,7
ld hl,tcurup
ld a,(hl)
call pa2hc ; output cursor up code
call at ; cursor down field
db 7,7
ld hl,tcurdn
ld a,(hl)
call pa2hc ; output cursor down code
call at ; cursor right field
db 6,18
ld hl,tcurrt
ld a,(hl)
call pa2hc ; output cursor right code
call at ; cursor left field
db 7,18
ld hl,tcurlt
ld a,(hl)
call pa2hc ; output cursor left code
call at ; delay after clear screen
db 10,18
ld hl,tdelcls
ld a,(hl)
call pa2hc ; output delay after clear screen code
call at ; delay after direct cursor address
db 11,18
ld hl,tdeldca
ld a,(hl)
call pa2hc ; output delay after direct cursor address code
call at ; delay after erase to end of line
db 12,18
ld hl,tdeleol
ld a,(hl)
call pa2hc ; output delay after erase to end of line code
call at ; clear screen string
db 6,40
ld hl,string
ps1: ld a,(hl)
cp 0
jr z,str2
call pa2hc
inc hl
jr ps1
str2: call at ; direct cursor positioning string
db 7,40
inc hl
ps2: ld a,(hl)
cp 0
jr z,str3
call pa2hc
inc hl
jr ps2
str3: call at ; erase to end of line string
db 8,40
inc hl
ps3: ld a,(hl)
cp 0
jr z,str4
call pa2hc
inc hl
jr ps3
str4: call at ; start standout string
db 9,40
inc hl
ps4: ld a,(hl)
cp 0
jr z,str5
call pa2hc
inc hl
jr ps4
str5: call at ; end standout string
db 10,40
inc hl
ps5: ld a,(hl)
cp 0
jr z,str6
call pa2hc
inc hl
jr ps5
str6: call at ; terminal initialization string
db 11,40
inc hl
ps6: ld a,(hl)
cp 0
jr z,str7
call pa2hc
inc hl
jr ps6
str7: call at ; terminal de-initialization string
db 12,40
inc hl
ps7: ld a,(hl)
cp 0
jr z,prex
call pa2hc
inc hl
jr ps7
byte: ld bc,tbuf
sbc hl,bc
ld a,l
ld hl,172fh
call gotoxy
call padc
prex: pop hl ; restore HL
call stndout
ret
; Internal Subroutines
cdata: call at
db 3,17
ld hl,bstr16
call epstr
call at
db 3,65
call ereol
call at
db 6,7
ld hl,bstr2
call epstr
call at
db 7,7
ld hl,bstr2
call epstr
call at
db 6,18
ld hl,bstr2
call epstr
call at
db 7,18
ld hl,bstr2
call epstr
call at
db 10,18
ld hl,bstr2
call epstr
call at
db 11,18
ld hl,bstr2
call epstr
call at
db 12,18
ld hl,bstr2
call epstr
call at
db 6,40
call ereol
call at
db 7,40
call ereol
call at
db 8,40
call ereol
call at
db 9,40
call ereol
call at
db 10,40
call ereol
call at
db 11,40
call ereol
call at
db 12,40
call ereol
ret
; blank strings
bstr2: db ' ',0
bstr16: db ' ',0