diff options
Diffstat (limited to 'sw/z80/kernel')
-rw-r--r-- | sw/z80/kernel/drivers/ctc.c | 7 | ||||
-rw-r--r-- | sw/z80/kernel/include/drivers/ctc.h | 4 | ||||
-rw-r--r-- | sw/z80/kernel/memory.c | 6 | ||||
-rw-r--r-- | sw/z80/kernel/process.c | 8 |
4 files changed, 17 insertions, 8 deletions
diff --git a/sw/z80/kernel/drivers/ctc.c b/sw/z80/kernel/drivers/ctc.c index e23ed8e..841202a 100644 --- a/sw/z80/kernel/drivers/ctc.c +++ b/sw/z80/kernel/drivers/ctc.c @@ -1 +1,6 @@ -#include "drivers/ctc.h"
\ No newline at end of file +#include "drivers/ctc.h" + +void ctc_control() +{ + +} diff --git a/sw/z80/kernel/include/drivers/ctc.h b/sw/z80/kernel/include/drivers/ctc.h index 488e02b..80e8b4b 100644 --- a/sw/z80/kernel/include/drivers/ctc.h +++ b/sw/z80/kernel/include/drivers/ctc.h @@ -1,6 +1,6 @@ #ifndef __CTC_H__ #define __CTC_H__ -void ctc_control() +void ctc_control(); -#endif /* __CTC_H__ */
\ No newline at end of file +#endif /* __CTC_H__ */ diff --git a/sw/z80/kernel/memory.c b/sw/z80/kernel/memory.c index cda62ca..1b2cc76 100644 --- a/sw/z80/kernel/memory.c +++ b/sw/z80/kernel/memory.c @@ -17,12 +17,14 @@ int mmu_write_table(void) int page_new(void) { - int i, addr, used; + int i, used; + uint16_t addr; + for (addr = ADDR_PAGE_FIRST; addr < ADDR_PAGE_LAST; addr += PAGE_SIZE) { used = 0; for (i = 0; i < PAGES_MAX_COUNT; i++) { - if (page_map[i].addr == addr) { + if (pages_table[i].addr == addr) { used = 1; break; } diff --git a/sw/z80/kernel/process.c b/sw/z80/kernel/process.c index 049c88c..7d8db89 100644 --- a/sw/z80/kernel/process.c +++ b/sw/z80/kernel/process.c @@ -33,15 +33,17 @@ int fork(void) return -1; - for (i = 0; i < current_proc.pages; i++) { + for (i = 0; i < current_proc->pages; i++) { p = page_new(); if (p == -1) { - return -2; } - proc_table[child_pid].page[i] = p; + // TODO: use memcpy() + // SDCC does not allow assignemnts of structs + + // proc_table[child_pid].page[i] = p; } } |