summaryrefslogtreecommitdiffstats
path: root/sw/z80/kernel/include/progman.h
diff options
context:
space:
mode:
authorleleraffa97@hotmail.it <leleraffa97@hotmail.it>2017-06-19 13:46:16 +0200
committerleleraffa97@hotmail.it <leleraffa97@hotmail.it>2017-06-19 13:46:16 +0200
commitf85e54f7982d5fefecddccbb11f5aabd478b91d6 (patch)
treeb94a1b06b32119e73c5722fdf97144ae3411321e /sw/z80/kernel/include/progman.h
parentBoot loader structures (WORK IN PROGRESS) (diff)
downloadz80uPC-f85e54f7982d5fefecddccbb11f5aabd478b91d6.tar.gz
z80uPC-f85e54f7982d5fefecddccbb11f5aabd478b91d6.zip
Authentication section
Programs management
Diffstat (limited to 'sw/z80/kernel/include/progman.h')
-rw-r--r--sw/z80/kernel/include/progman.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sw/z80/kernel/include/progman.h b/sw/z80/kernel/include/progman.h
index b37e9e9..0f56bb3 100644
--- a/sw/z80/kernel/include/progman.h
+++ b/sw/z80/kernel/include/progman.h
@@ -40,6 +40,29 @@ void progman_init();
int8_t prog_req(struct program_info *info);
/*
+* It allocates a program in the RAM
+* To obtain the right id call prog_req() first
+* Basic informations must be allocated and referenced by a program_base struct
+*/
+
+struct program_base {
+
+ void * inst_set; // pointer to the instructions set
+ size_t inst_size; // size of the instructions set
+ void * bss_data; // pointer to the bss/data space
+ size_t data_size; // size of the bss/data space
+ size_t stack_size; // size of the stack to determine the stack limit
+};
+
+void prog_alloc(int8_t id, struct program_info *info, const struct program_base *base);
+
+/*
+* It jumps the program counter to the given one
+*/
+
+void prog_exec(int8_t id, struct program_info *info);
+
+/*
* It sets a quit callback
*/