.globl _video_40
.globl _video_80
- .globl ___hard_di
+ .globl _int_disabled
.globl _vtwidth
.globl _vtaddr
_cursor_off:
ret
_cursor_disable:
- call ___hard_di
+ ld a,(_int_disabled)
push af
+ di
ld bc,#0x0e0c ; Address register
out (c),b
ld bc,#0x000d ; Set to 0 will hide cursor nicely
out (c),b
jr popout
_do_cursor_on:
- ; ld a,i handling is buggy on NMOS Z80
- call ___hard_di
+ ld a, (_int_disabled)
push af
+ di
ld de, (_vtaddr)
ld c,#0x0d
ld a,#0x0e
out (c),e
popout:
pop af
- ret c
+ or a
+ ret nz
ei
ret
;
; FIXME: remove hardcoding of 80x25 display size
;
_scroll_up:
- call ___hard_di
- push hl
+ ld a,(_int_disabled)
+ push af
+ di
ld a, (mapreg)
push af
and #0xF7 ; enable video memory
; right
;
_scroll_down:
- call ___hard_di
- push hl
+ ld a,(_int_disabled)
+ push af
+ di
ld a, (mapreg)
push af
and #0xF7 ; enable video memory
; of the banking paths on interrupt
;
_vwrite:
- call ___hard_di
- push hl
+ ld a,(_int_disabled)
+ push af
+ di
ld a, (mapreg)
push af
and #0xF7 ; enable video memory