fn call(&mut self, addr: u16)
	{
		let mut i = 0;
		let mut found = false;
		while i < self.stack.len()
		{
			if self.stack[i] == 0 {
				self.stack[i] = self.pc; // Store PC address to stack
				found = true;
				break;
			}
			i = i + 1;
		}
		if !found {
			panic!("Call stack exceeded!");
		}

		self.pc = addr; // Jump to address
	}
/// Call subroutine at addr.
/// The interpreter increments the stack pointer, then puts the current PC on the top of the stack. The PC is then set to addr.
Call subroutine at addr.
The interpreter increments the stack pointer, then puts the current PC on the top of the stack. The PC is then set to addr.
Call subroutine at addr . The interpreter increments the stack pointer then puts the current PC on the top of the stack . The PC is then set to addr .
fn call(&mut self, addr: u16)
	{
		let mut i = 0;
		let mut found = false;
		while i < self.stack.len()
		{
			if self.stack[i] == 0 {
				self.stack[i] = self.pc; // Store PC address to stack
				found = true;
				break;
			}
			i = i + 1;
		}
		if !found {
			panic!("Call stack exceeded!");
		}
		self.pc = addr; // Jump to address
	}
fn call ( & mut self , addr : u16 ) { let mut i = 0 ; let mut found = false ; while i < self . stack . len ( ) { if self . stack [ i ] == 0 { self . stack [ i ] = self . pc ; // Store PC address to stack found = true ; break ; } i = i + 1 ; } if ! found { panic ! ( " " ) ; } self . pc = addr ; // Jump to address }
Call subroutine at addr.
Call subroutine at addr .
&mut self
addr
u16