asmachina 0.1.0

Machine W emulator core - 16-bit architecture with full instruction set support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::error::MachineError;
use crate::machine::MachineW;

impl MachineW {
    /// PZS - Pop from stack: WS++, memory[WS] → AK
    pub(crate) fn execute_pzs(&mut self) -> Result<(), MachineError> {
        self.ak = self.pop_from_stack()?;
        Ok(())
    }

    /// SDP - Push to stack: (AK) → memory[WS], WS--
    pub(crate) fn execute_sdp(&mut self) -> Result<(), MachineError> {
        self.push_to_stack(self.ak)?;
        Ok(())
    }
}