Estex-DSS/DOS/CURSOR.ASM
2023-08-11 04:54:30 +10:00

64 lines
1.0 KiB
NASM
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

delay_curs equ 11 ; ç áâ®â  ¬¨£ ­¨ï ªãàá®à 
cursor: db 3Eh ; ld a,..
crFlag: db 0 ; ä« £ ªãàá®à  00-­¥â/01-¥áâì
cpl
ld (crFlag),a
; ‚ª«îç¨âì ªãàá®à
cursor_on:
ld c,8Eh ; ã§­ âì ¯®«®¦. ªãàá®à 
rst 08h
ld (curs_posit+1),de
xor a
ld c,0B4h ; ¯®«ãç¨âì ᨬ¢®«
rst 08h
ld bc,1BB5h ; b=§­ ª®£¥­., á=ᨬ¢®« ­  íªà ­
ld a,(crFlag)
or a
jr z,curs__
ld b,1Ah ; ç¥àâ 
ld a,(D0642) ; ä« £¨ ª« ¢ë
bit 1,a ; ¡¨â Ins
jr nz,$+4
ld b,19h ; ¡«®ª
curs__: xor a ; ­®¬¥à ®ª­ 
rst 08h
ld a,1
ld (curs_inv_flag),a
ld a,delay_curs
ret
; ‚몫îç¨âì ªãàá®à
cursor_off:
db 3Eh ; ld a,..
curs_inv_flag:
db 0 ; ä« £ ªãàá®à : 00-¢ëª«/01-¢ª«
or a
ret z
ld a,-1
ld (crFlag),a
inc a
ld (curs_inv_flag),a
ld a,delay_curs
ld (curs_timer),a
curs_posit:
ld de,0 ; Y/X ¯®«®¦.
bit 7,e
ret nz
ld c,0B4h ; ¯®«ãç¨âì ᨬ¢®«
xor a
rst 08h
xor a
ld bc,1BB5h ; ᨬ¢®« ­  íªà ­
rst 08h
ret
; “áâ ­®¢¨âì 䮪ãá ­  "Input Line"
focus_to_inpline:
call cursor_on ; ¢ª«. ªãàá®à
ei
ret