From 2353f4fd4f702de04b89d2c33d6c8cdaf39d8d6d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 10 Dec 2018 21:19:09 +0000 Subject: [PATCH] cromemco: program_vectors code, and also fix a silly fdc bug --- Kernel/platform-cromemco/cromemco.s | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Kernel/platform-cromemco/cromemco.s b/Kernel/platform-cromemco/cromemco.s index ece53f5a..65ef63e7 100644 --- a/Kernel/platform-cromemco/cromemco.s +++ b/Kernel/platform-cromemco/cromemco.s @@ -240,18 +240,12 @@ init_hardware: ld hl, #(448-64) ; 64K for kernel ld (_procmem), hl - ld a,#0x81 ; Every memory writeable, read kernel - out (0x40),a ; MMU set - - ; Write the stubs everywhere + ; Write the stubs for our bank ld hl,#stubs_low ld de,#0x0000 ld bc,#0x67 ldir - ld a,#0x01 ; bank to the kernel bank - out (0x40),a - ld a,#0x40 ; enable interrupt mode out (2),a ld a,#0x70 @@ -283,6 +277,20 @@ map_page_low: ret _program_vectors: + pop de + pop hl + push hl + push de + push ix + ; From kernel to user bank + ld d,#1 + ld e,(hl) + ; Write the stubs for our bank + ld hl,#stubs_low + ld ix,#0x0000 + ld bc,#0x67 + call ldir_far + pop ix ret ; @@ -407,6 +415,7 @@ _fd_operation: ld hl,#_fd_cmd ld b,(hl) ; command inc hl + inc hl bit 0,(hl) ; read or write ? ; patch patch1/2 according to the transfer direction ld a,#0xA2 ; ini @@ -437,6 +446,7 @@ nomod: ; ; Get the set up values ; + dec hl ld a,(hl) ; 0x34 bits ld d,a ; save bits for later ; -- 2.34.1