From 3f83de82190d8c8e4207acf11e7ce1ce8933fea1 Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Sat, 20 Aug 2022 09:06:55 -0400 Subject: [PATCH] Testing getting and printing a ZXE struct member variable of loaded kernel module. --- zealbooter/zealbooter.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/zealbooter/zealbooter.c b/zealbooter/zealbooter.c index dc8e52fa..a239d50c 100644 --- a/zealbooter/zealbooter.c +++ b/zealbooter/zealbooter.c @@ -49,8 +49,18 @@ void _start(void) { struct limine_terminal *terminal = terminal_request.response->terminals[0]; terminal_request.response->write(terminal, "Hello World", 11); - struct limine_file *kernel = module_request.response->modules[0]; - struct CKernel *CKernel = kernel->address; + struct limine_file *kernel_module = module_request.response->modules[0]; + struct CKernel *kernel = kernel_module->address; + + char str[128]; + str[0] = ' '; + str[1] = kernel->zxe.signature; + str[2] = kernel->zxe.signature >> 8; + str[3] = kernel->zxe.signature >> 16; + str[4] = kernel->zxe.signature >> 24; + str[5] = 0; + + terminal_request.response->write(terminal, str, 5); // We're done, just hang... done();