Implemente finish (not finished yet), fix ucontext for windows
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
struct Interrupt {
|
||||
pub struct Interrupt {
|
||||
level: InterruptStatus
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::{ops::{Add, Sub}, io::Write};
|
||||
|
||||
use super::{decode::{Instruction, decode}};
|
||||
use super::{decode::{Instruction, decode}, interrupt::Interrupt};
|
||||
use super::global::*;
|
||||
use std::fs::File;
|
||||
|
||||
@ -71,7 +71,8 @@ pub struct Machine {
|
||||
pub int_reg : Register<i64>,
|
||||
pub fp_reg : Register<f32>,
|
||||
pub main_memory : [u8 ; MEM_SIZE],
|
||||
pub shiftmask : [u64 ; 64]
|
||||
pub shiftmask : [u64 ; 64],
|
||||
pub interrupt: Interrupt,
|
||||
// futur taille à calculer int memSize = g_cfg->NumPhysPages * g_cfg->PageSize;
|
||||
//creer une struct cfg(configuration) qui s'initialise avec valeur dans un fichier cfg
|
||||
}
|
||||
@ -95,7 +96,8 @@ impl Machine {
|
||||
int_reg : Register::<i64>::init(),
|
||||
fp_reg : Register::<f32>::init(),
|
||||
main_memory : [0 ; MEM_SIZE],
|
||||
shiftmask
|
||||
shiftmask,
|
||||
interrupt: Interrupt::new()
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user