ableos/kernel/src/holeybytes/kernel_services/mod.rs

16 lines
356 B
Rust
Raw Normal View History

2024-03-22 03:58:59 -05:00
use alloc::{vec, vec::Vec};
2024-03-11 09:48:56 -05:00
pub mod mem_serve;
2024-03-22 03:58:59 -05:00
pub mod service_definition_service;
pub fn block_read(mem_addr: u64, length: usize) -> Vec<u8> {
let mut msg_vec = vec![];
for x in 0..(length as isize) {
let xyz = mem_addr as *const u8;
let value = unsafe { xyz.offset(x).read() };
msg_vec.push(value);
}
msg_vec
}