ableos/kernel/src/holeybytes/kernel_services/mod.rs
2024-03-22 03:58:59 -05:00

16 lines
356 B
Rust

use alloc::{vec, vec::Vec};
pub mod mem_serve;
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
}