From: Alan Cox Date: Mon, 1 Oct 2018 12:41:48 +0000 (+0100) Subject: trs80m1: update to new tty and irq handling X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b4bb4adc22f3766d35b387e08210ab32611bdad8;p=FUZIX.git trs80m1: update to new tty and irq handling --- diff --git a/Kernel/platform-trs80m1/devtty.c b/Kernel/platform-trs80m1/devtty.c index 75c4f383..2683dd51 100644 --- a/Kernel/platform-trs80m1/devtty.c +++ b/Kernel/platform-trs80m1/devtty.c @@ -204,7 +204,7 @@ static const uint8_t trssize[4] = { 0x00, 0x40, 0x20, 0x60 }; -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flags) { uint8_t baud; uint8_t ctrl = 3; /* DTR|RTS */ diff --git a/Kernel/platform-trs80m1/trs80-bank.s b/Kernel/platform-trs80m1/trs80-bank.s index b945956f..9b7db3d6 100644 --- a/Kernel/platform-trs80m1/trs80-bank.s +++ b/Kernel/platform-trs80m1/trs80-bank.s @@ -10,9 +10,12 @@ .globl map_process .globl map_process_a .globl map_process_always + .globl map_kernel_di + .globl map_process_di + .globl map_process_always_di .globl map_process_save .globl map_kernel_restore - .globl map_save + .globl map_save_kernel .globl map_restore .globl map_save_kmap .globl map_restore_kmap @@ -188,6 +191,7 @@ map_store: .db 0x1f ; before jumping out of common. Thus we don't need to do anything but ; restore the last saved kernel map! ; +map_kernel_di: map_kernel: map_kernel_restore: push bc @@ -207,6 +211,7 @@ fork_mapsave: ; Select the bank for the relevant process. Update the ksave_map so we ; can restore the correct kernel mapping when banked. ; +map_process_di: map_process: ld a, h or l @@ -231,6 +236,7 @@ map_process_a: ; used by bankfork map_process_save: map_process_always: +map_process_always_di: push af push bc ld bc, (map_reg) @@ -243,9 +249,13 @@ map_process_always: pop af ret -map_save: push bc +map_save_kernel: + push bc ld bc, (map_reg) ld (map_store), bc + ld bc, (ksave_map) + ld (map_reg), bc + out (c), b pop bc ret diff --git a/Kernel/platform-trs80m1/trs80.s b/Kernel/platform-trs80m1/trs80.s index 4dc95a2e..4d5ca7b0 100644 --- a/Kernel/platform-trs80m1/trs80.s +++ b/Kernel/platform-trs80m1/trs80.s @@ -13,7 +13,7 @@ .globl map_process .globl map_process_a .globl map_process_always - .globl map_save + .globl map_save_kernel .globl map_restore .globl map_kernel_restore @@ -24,6 +24,7 @@ .globl l__COMMONMEM .globl _trs80_model + .globl _int_disabled ; hard disk helpers .globl _hd_xfer_in @@ -74,11 +75,14 @@ platform_interrupt_all: ret _platform_reboot: - di - ld sp,#0xffff - xor a - out (0x43),a - rst 0 + di + ld sp,#0xffff + xor a + out (0x43),a + rst 0 + +_int_disabled: + .db 1 ; ----------------------------------------------------------------------------- ; BOOT MEMORY BANK (below 0x8000)