mirror of
https://github.com/guilhermewerner/machine
synced 2025-06-16 13:14:18 +00:00
Update heap, stack and opcodes
This commit is contained in:
@ -6,6 +6,7 @@ pub type AddressRegister = (Word, Byte);
|
||||
pub type Register = Byte;
|
||||
pub type TwoRegisters = (Byte, Byte);
|
||||
pub type ThreeRegisters = (Byte, Byte, Byte);
|
||||
pub type FourRegisters = (Byte, Byte, Byte, Byte);
|
||||
|
||||
#[inline]
|
||||
pub fn GetRegisterAddress(vm: &mut Machine) -> RegisterAddress {
|
||||
@ -31,3 +32,13 @@ pub fn GetTwoRegisters(vm: &mut Machine) -> TwoRegisters {
|
||||
pub fn GetThreeRegisters(vm: &mut Machine) -> ThreeRegisters {
|
||||
(vm.ReadByte(None), vm.ReadByte(None), vm.ReadByte(None))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn GetFourRegisters(vm: &mut Machine) -> FourRegisters {
|
||||
(
|
||||
vm.ReadByte(None),
|
||||
vm.ReadByte(None),
|
||||
vm.ReadByte(None),
|
||||
vm.ReadByte(None),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user