Code covered by the BSD License  

Highlights from
Extended Brookshear Machine emulator and assembler

image thumbnail
from Extended Brookshear Machine emulator and assembler by David Young
Emulator and assembler for a simple computer, a teaching aid for computer science courses.

resetReg(machine)
function machine = resetReg(machine)
%RESETREG resets registers
%   MACHINE = RESETREG(MACHINE) takes the BM MACHINE, sets its registers to
%   0 (but not the PC), and returns it.

%   Copyright 2008 University of Sussex and David Young

machine.register(:) = 0;

end

Contact us at files@mathworks.com