From: Alan Cox Date: Tue, 3 Feb 2015 10:59:39 +0000 (+0000) Subject: socz80: fix timer, improve irq code a shade X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d12f3b4e58583f2d97d61474d68f008959c6654c;p=FUZIX.git socz80: fix timer, improve irq code a shade --- diff --git a/Kernel/platform-socz80/main.c b/Kernel/platform-socz80/main.c index b2408d98..74397883 100644 --- a/Kernel/platform-socz80/main.c +++ b/Kernel/platform-socz80/main.c @@ -18,7 +18,7 @@ __sfr __at 0x01 uart0_data; __sfr __at 0x28 uart1_status; __sfr __at 0x29 uart1_data; -extern uint16_t irqwork; +extern uint8_t irqwork; void platform_interrupt(void) { diff --git a/Kernel/platform-socz80/socz80.s b/Kernel/platform-socz80/socz80.s index 08b15196..c76045ce 100644 --- a/Kernel/platform-socz80/socz80.s +++ b/Kernel/platform-socz80/socz80.s @@ -98,14 +98,13 @@ _trap_monitor: ; it's never a dull day with ROM around! platform_interrupt_all: + ld hl,#_irqwork in a,(TIMER_STATUS) bit 7, a jr z, not_timer - ld a,(_irqwork) - set 0, a - ld (_irqwork),a + set 0, (hl) xor a - out (TIMER_STATUS),a + out (TIMER_COMMAND),a not_timer: in a,(UART0_STATUS) ld b, a @@ -115,7 +114,6 @@ not_timer: and b out (UART0_STATUS),a and #0xC0 - ld hl,#_irqwork or (hl) ld (hl),a ret