An open and platfom-independent instruction-set simulator for teaching computer architecture