home *** CD-ROM | disk | FTP | other *** search
- ; HARDVID.LIB - Rob Friefeld
-
- ; Hard-coded CRT protocol to replace some VLIB routines.
-
- ;STANDARD EQUATES REQUIRED
- ;wrconf equ 2 ; bdos function
- ;cr equ 0dh
- ;lf equ 0ah
- ;esc equ 1bh
- ;dim equ 1 ; vprint functions
- ;bright equ 2
-
- rcpuse equ -1 ; if used for assembling an RCP, true = -1
-
- clr_scr macro
- db 1ah+80h
- endm
-
- clr_eol macro
- db esc,'T'+80h
- endm
-
- dim_on macro
- db esc,')'+80h
- endm
-
- dim_off macro
- db esc,'('+80h
- endm
-
- ; Clear screen. Return NZ.
-
- if rcpuse
- if [not clson]
- cls: call vprint
- clr_scr
- or -1
- ret
- endif ; not clson
- endif ; rcpuse
-
- ; Erase to end of line. Return NZ.
- ereol: call vprint
- clr_eol
- or -1
- ret
-
- ; Dim video
- stndout:
- call vprint
- dim_on
- or -1
- ret
-
- ; Normal video
- stndend:
- call vprint
- dim_off
- or -1
- ret
-
- ; Position cursor to row, column of next two data bytes. Home = 1,1!!!
- ; Use sequence esc,'=',row+20h,col+20h
- ; Affect no regs
-
- at: ex (sp),hl
- call at1 ; HL -> position bytes
- ex (sp),hl
- ret
- at1:
- push af
- ld a,(hl) ; Row
- add 31 ; Offset
- ld (atrow),a ; Save it
- inc hl ; Col byte
- ld a,(hl)
- add 31
- ld (atcol),a
- inc hl ; Return address from AT
- call vprint ; Print leadin sequence
- db esc,'='
- atrow: ds 1 ; Output computed row,col
- atcol: ds 1
- db 0
- pop af
- ret
-
- ; Position cursor to H = row, L = column
- ; Return NZ
- gotoxy:
- ld a,h ; Save row, col bytes and use AT routine
- ld (gtxyr),a
- ld a,l
- ld (gtxyc),a
- call at
- gtxyr: ds 1
- gtxyc: ds 1
- or -1
- ret
-
-
- tinit:
- ret
-
- dinit:
- ret
-
- ; END
- gtxyr),a
- ld a,l
- ld (gtxyc),a
- call at
- gtxyr: ds 1
- gtxyc: ds 1
- or -1
- ret
-
-
- tinit:
- ret