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
/
OSBORNE
/
OSBWS4.LBR
/
BLINK.AZM
/
BLINK.ASM
Wrap
Assembly Source File
|
2000-06-30
|
2KB
|
58 lines
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;
; BLINK.ASM
;
; from WSCUST13.ASM by Gerry Werth
;
; This routine worked with WS v3.30.
; -- I have no idea if it can be used on WS4
;
; The following is adapted from WSPATCH by Lee Swordy as modified by
; Jim Woolley. Self Patch for BIOS location, and correction for use
; with eighth-bit HILITE hardware reverse video, added by Gerry Werth.
; This routine blinks the cursor.
org BLDIV ; Diversion from WS Console Input Routine
; Call should be preceeded by 01h,00h
; Look with EDFILE, DU, or DDT.
call BLPATCH ; address of blink patch
;
org MORPAT ; Start of Patch Space
;
BLRATE equ (BLINKR+1)*100h
BLPATCH cpi 06h ; is this an Input from Console Call ?
jnz BLRETN1 ; No: Return to WS
push h
lda 0002h ; load accumulator with HI byte of BIOS
sta CLBL+2 ; store it below
lhld CURSOR ; get BIOS +0E5Ah cursor pointer
mov a,m ; get the character
sta BLCHAR+1 ; save it for exit (set bit 8 correctly)
TIMSET lxi d,BLRATE ; Blink Rate Timer
LOOP3 push d
CLBL call 0006h ; BIOS+6 call to get console status
pop d
ora a
jnz BLRETN2 ; return to WS if Character ready
dcr e
jnz LOOP3
dcr d
jnz LOOP3 ; Decrement timer and loop until ready
CPTR lhld CURSOR ; get BIOS +0E5Ah cursor pointer
mov a,m
xri 80h ; Toggle Cursor (Underline On/Off)
mov m,a
jmp TIMSET ; Restart Timer
;
BLRETN2 lhld CURSOR ; Cursor pointer
BLCHAR mvi m,00h ; restore original value of char
pop h
mvi a,06 ; Restore 'A' contents
BLRETN1 jmp BLCIP ; WS instruction call that Diversion replaced
; use JMP instead of CALL to save space for RET.
;
;
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -