From 35f403b70210096c46ee13266c55d99a0693692d Mon Sep 17 00:00:00 2001 From: izydorst Date: Mon, 10 Sep 2001 22:11:19 +0000 Subject: [PATCH] interrupt flag is cleared/restored rather than cleared/set git-svn-id: svn://svn.cc65.org/cc65/trunk@890 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos/mousesprite/mouse.s | 10 ++++++---- libsrc/geos/system/get_ostype.s | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libsrc/geos/mousesprite/mouse.s b/libsrc/geos/mousesprite/mouse.s index 8e49af16c..a5f59fa2e 100644 --- a/libsrc/geos/mousesprite/mouse.s +++ b/libsrc/geos/mousesprite/mouse.s @@ -110,7 +110,8 @@ _mouse_pos: ldy #0 ; Structure offset - sei ; Disable interrupts + php + sei ; Disable interrupts lda mouseXPos ; Transfer the position sta (ptr1),y @@ -124,7 +125,7 @@ _mouse_pos: iny sta (ptr1),y - cli ; Reenable interrupts + plp ; Reenable interrupts rts ; Done ; -------------------------------------------------------------------------- @@ -157,13 +158,14 @@ _mouse_info: _mouse_move: jsr popsreg ; Get X - sei ; Disable interrupts + php + sei ; Disable interrupts sta mouseYPos lda sreg ldx sreg+1 sta mouseXPos stx mouseXPos+1 - cli ; Enable interrupts + plp ; Enable interrupts rts ; -------------------------------------------------------------------------- diff --git a/libsrc/geos/system/get_ostype.s b/libsrc/geos/system/get_ostype.s index bd40b5bf6..f92f634a9 100644 --- a/libsrc/geos/system/get_ostype.s +++ b/libsrc/geos/system/get_ostype.s @@ -35,7 +35,9 @@ get_tv: bne tvmode only40: ldx #0 ; COLUMNS40 tvmode: ; PAL/NTSC check here, result in A - bit rasreg + php + sei ; disable interrupts + bit rasreg bpl tvmode ; wait for rasterline 127=256!) modelp: cmp rasreg ; wait for rasterline = 24 (or 280 on PAL) @@ -48,4 +50,5 @@ ntsc: lda #$80 ; NTSC modeend: stx tmp1 ora tmp1 + plp ; restore interrupt state rts -- 2.39.5