(function(){/* Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. Jeff Parsons 2012-2016 This file is part of PCjs, a computer emulation software project at . PCjs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PCjs. If not, see . You are required to include the above copyright notice in every source code file of every copy or modified version of this work, and to display that copyright notice on every screen that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). Some PCjs files also attempt to load external resource files, such as character-image files, ROM files, and disk image files. Those external resource files are not considered part of PCjs for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. */ var k; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; function ka(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function p(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} function r(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var t={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){t.init.push(a)} function va(a){if(ta)try{for(var b=0;bb?this.hb=this.id:(this.Cb=this.id.substr(0,b),this.hb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Vc:!1,Wc:!1,P:!1,error:!1};this.pb=null;this.i.error=!1;this.A={};this.K=null;x.push(this)}var ya=void 0,za={}; if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function y(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},x=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.sa=[];this.m=null;this.$a=this.G;a=new G;Ma(a,this.K);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.$a(b|4186112,-1,1)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.sa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.sa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.$a(c|4186112,b,1)} function Pa(a,b){var c=-1,d=this.controller;(a=d.sa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.$a(b|4186112,-1,0)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.sa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.$a(c|4186112,b,0)}La.prototype.reset=function(){this.m&&this.m()};La.prototype.G=function(){return 0};La.prototype.na=function(a,b){b||this.reset();return!0}; function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Wa)return l.vb+=l.Wa-f,l.Wa=f,!0;if(f>=l.Wa+l.vb){q=l.size-(f-m);q>g&&(q=g);l.vb=f-l.Wa+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.u)>>>a.c].Gb(b&a.h,b)} function Wa(a){for(var b=0,c=[],d=0;d>5&3;c.jb=a>>1&15;c.Fb=a&257?a&1?6:4:0;cb(c);a=c.G;a&1|256&&(b=this.a.Ba&16?1:2);this.c.Ma=this.c.Ma&-8|b};k.tc=function(){return db(this.a)};k.Nc=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; function fb(a){var b=a.g,c,d,e,f=b.W>>13&7;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.zc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.cb=2496;b.R=0;b.D=128;b.W=0;break;case 1:if((b.W>>4&511)>=b.Ia[f]){b.R|=32832;b.D|=49152;break}if((b.W&15)>=b.J[f]){b.R|=32800;b.D|=49152;break}c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;gb(a,b.S[f],c,d,e);return;case 2:if((b.W>>4&511)>=b.Ia[f])b.R|=32832, b.D|=49152;else if((b.W&15)>=b.J[f])b.R|=32800,b.D|=49152;else{c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;a.sb(b.S[f],c,d,e);return}}b.cb=f<<13|b.cb&8176|b.W%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.zc=function(a,b,c,d,e){var f=this.g;f.bb=d&65535;f.D=f.D&-49|d>>12&48;f.eb=65536-e&65535;switch(a){case 1:f.R|=33024;f.D|=49152;break;case 2:f.R|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.Ac,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.za&8&&(b.v&=63);b.za=b.gc[f]|b.Ea&64;break;case 3:1==(b.L&3)&&(b.Ea=b.L&4?b.Ea+(b.L&65408)&65408|b.L<<2&64:b.Ea-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ea);break;case 4:b.za=b.Ea;break;case 5:if(b.L>>6>=b.Ia[f]){b.v|=37888;break}if((b.L&63)>=b.J[f]){b.v|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;gb(a,b.S[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.v|=37888;else if((b.L&63)>=b.J[f])b.v|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;a.sb(b.S[f],c,d,e);return}}I(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} k.Ac=function(a,b,c,d,e){var f=this.h;f.Za=d&65535;f.v=f.v&-49|d>>12&48;f.ta=d>>16&63;f.L=~~(c/f.J[b.la])<<6|c%f.J[b.la];f.Ea=f.L;f.za=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}I(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.aa=0;a.U=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.La=a.Qa=a.Oa=a.Da=a.Jb=0} function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.aa&=-2049;c.U[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.S[b]&&(c.S[b]={cache:[],postProcess:a.Bc,drive:b,blocksize:256,mapped:0,maxblock:c.xb[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.ub[b]=c.oa[b];c.F|=32896;c.U[b]|=32896;c.La|=1<=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ (c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;gb(a,c.S[b],d,e,f);return;case 57:if(c.oa[b]>=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;a.sb(c.S[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.U[b]|=128;return!!(c.F&64)})} k.Bc=function(a,b,c,d,e){var f=this.l;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Da=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.la]=e%f.Ha[0]<<8|c%f.J[0];f.ub[b.la]=f.oa[b.la]=d;f.La|=1<=b.nc-1&&(f.U[b.la]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.U[b.la]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; function kb(a,b,c,d,e,f){var g=~~((f+c.ua-1)/c.ua),h=new XMLHttpRequest;2048>g&&d+2048this.a.Sa(a.mc?lb(this.a,c):c,a.cache[b][e])){a.rb(2,a,b,c,d);return}c+=2;--d}b++}a.rb(0,a,b,c,d)}; function gb(a,b,c,d,e){for(var f,g;0g){b.rb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.rb(0,b,c,d,e)}k.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ya=0;this.g.D=128;this.h.v=128;ib(this)}; k.hc=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Ca&65280:(a&1&&(b<<=8),f.Ca=b|255,d=0);break;case 4194298:if(0>b)d=f.Ib;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Ib=d;f.j|=2}break;case 4194294:if(70!==f.Ja)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return K(f,4);d=1;break;case 4194290:if(70!==f.Ja)return K(f,4);d=0;break;case 4194288:if(70!==f.Ja)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= 255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return K(f,4);e=a-4194272>>1;0>b?d=f.Ab[e]:(d=J(this,f.Ab[e],a,b,c),0<=d&&(f.Ab[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ka[e]=b),d=f.Ka[e]),d;case 4194246:return a& 1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ka[e]=b),d=f.Ka[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.Z[3][e],a,b,c);0<=d&&(f.Z[3][e]=d,f.Z[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.tb,a,b,c);0<=d&&(f.tb=d);break;case 4194172:d=f.Aa;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> b?d=this.c.Kc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.cb,a,b,c);0<=d&&(e.cb=d);break;case 4194050:d=J(this,e.R,a,b,c);0<=d&&(e.R=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.eb,a,b,c);0<=d&&(e.eb=d);break;case 4194056:d=J(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194058:d=J(this,e.W,a,b,c);0<=d&&(e.W= d);break;case 4194060:break;case 4194062:d=J(this,e.Zb,a,b,c);0<=d&&(e.Zb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Da=g.Da&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=J(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&ib(this));break;case 4193738:d=g.U[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=J(this,g.La,a,b,c);0<=d&&(g.La=d&255);break;case 4193744:d=g.Gc[e];break;case 4193746:d=J(this,g.$b,a,b,c);0<=d&&(g.$b=d);break;case 4193748:d=J(this,g.ac[e],a,b,c);0<=d&&(g.ac[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Hc[e];break;case 4193754:d=J(this,g.bc[e],a,b,c);0<=d&&(g.bc[e]=d);break;case 4193756:d=J(this,g.oa[e],a,b,c);0<=d&&(g.oa[e]= d&511);break;case 4193758:g.ub[e]=g.oa[e];d=g.ub[e];break;case 4193760:d=g.Ec[e];break;case 4193762:d=g.Fc[e];break;case 4193764:d=g.Cc[e];break;case 4193766:d=g.Dc[e];break;case 4193768:d=J(this,g.Da,a,b,c);0<=d&&(g.Da=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Jb,a,b,c);0<=d&&(g.Jb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.ta=e.ta&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= J(this,e.Za,a,b,c);0<=d&&(e.Za=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.za,a,b,c);0<=d&&(e.za=d);break;case 4192520:d=J(this,e.ta,a,b,c);0<=d&&(e.ta=d&63,e.v=e.v&-49|(e.ta&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ba:(d=J(this,f.Ba,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ba=d,f.qb[0]=d&4?15:7,f.qb[1]=d&2?15:7,f.qb[3]=d&1?15:7,f.Fb&&(e=2,f.Ba&16&&(e=1),this.c.Ma=this.c.Ma&-8|e)));break;default:return f.s|= 16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.Z[0][e],a,b,c);0<=d&&(f.Z[0][e]=d,f.Z[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.Z[1][e],a,b,c);0<=d&&(f.Z[1][e]=d,f.Z[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return K(f,4);e=a>>2&31;d=f.fb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.fb[e]=a&2?d<<16|f.fb[e]&65535:f.fb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> b)d=Za[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var mb={},bb=(mb[65382]=[null,null,H.prototype.rc,H.prototype.Lc,"LKS"],mb[65402]=[null,null,H.prototype.sc,H.prototype.Mc,"MMR0"],mb[65534]=[null,null,H.prototype.tc,H.prototype.Nc,"PSW"],mb);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),tb(this,pb?ub:vb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},fa:function(a){var b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ja:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.va=!0},H:function(a,b){return this.I(a,b)},Y:function(a,b){return this.ca(a, b)},ha:function(a,b,c){this.A||this.fc(a,b,c)},qa:function(a,b,c){this.A||this.ra(a,b,c)},G:function(a){return this.c[a]},M:function(a){return this.c[a]},V:function(a){return this.g.getUint16(a,!0)},ea:function(a){return this.l[a>>1]},ga:function(a,b){this.c[a]=b;this.va=!0},ia:function(a,b){this.c[a]=b;this.va=!0},pa:function(a,b){this.g.setUint16(a,b,!0);this.va=!0},Fa:function(a,b){this.l[a>>1]=b;this.va=!0}}; function Ma(a,b,c){a.K=b;a.h=a.u=0;c&&((a.h=c.h)&&xb(a,yb,!1),(a.u=c.u)&&zb(a,yb,!1))}function zb(a,b,c){c&&a.u||(a.wb=!a.A&&b[1]||a.B,a.Qc=!a.A&&b[3]||a.w);if(c||void 0===c)a.fc=b[1]||a.B,a.ra=b[3]||a.w}function xb(a,b,c){c&&a.h||(a.Gb=b[0]||a.m,a.wc=b[2]||a.o);if(c||void 0===c)a.I=b[0]||a.m,a.ca=b[2]||a.o}function tb(a,b){b||(b=Ab);xb(a,b,void 0);zb(a,b,void 0)}var Ab=[],wb=[G.prototype.N,G.prototype.ja,G.prototype.fa,G.prototype.Ga],yb=[G.prototype.H,G.prototype.ha,G.prototype.Y,G.prototype.qa]; if(Ia)var vb=[G.prototype.G,G.prototype.ga,G.prototype.V,G.prototype.pa],ub=[G.prototype.M,G.prototype.ia,G.prototype.ea,G.prototype.Fa];function Bb(a,b){v.call(this,"CPU",a,Bb);var c=a.multiplier||1;this.mb=a.cycles||b;this.ia=c;this.Db=Math.round(this.mb/1E4)/100;this.pa=this.Db*this.ia;this.i.$=!1;this.i.cc=!1;this.i.Ya=a.autoStart;this.i.Lb=!1;this.i.ob=!1;this.gb=this.qa=0;this.lb=a.csStart;this.Ga=a.csInterval;this.Ta=a.csStop;this.M=[];this.Vb=this.Ic.bind(this);F(this)}y(Bb); var Cb=["power","reset"];k=Bb.prototype;k.xa=function(a,b,c,d){this.B=a;this.u=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} k.X=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.fa/a.pa&&(b=1),a.ia=b,b=a.Db*a.ia,a.pa!=b)){a.pa=b;b=a.pa.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.T("target speed: "+b)}Kb(a,a.ca);a.ca=0;a.Y=ja();a.ga=0;Lb(a)}function $a(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function ab(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.mb*a.ia/1E3,a.M[b][0]=c)} k.Ic=function(){if(this.i.$){this.Eb>=this.mb&&Lb(this,!0);this.Va=0;this.kb=ja();if(this.ga){var a=this.kb-this.ga;a>this.Tb&&(this.Y+=a,this.Y>this.kb&&(this.Y=this.kb))}try{do{for(var b,c=this.i.ob?1:this.nb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.dc(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.ha-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Va+=f;this.ca+=f;Kb(this,0,!0);a=f;if(this.i.ob){var l= !1;this.gb=this.gb+this.Nb()|0;this.qa-=a;0>=this.qa&&(this.qa+=this.Ga,l=!0);0<=this.Ta&&this.Ta<=Mb(this)&&(this.Ga=this.Ta=-1,Fb(this),L(this),l=!0);l&&this.T(Mb(this)+" cycles: checksum="+n(this.gb))}this.Ua-=f;if(0>=this.Ua){this.Ua+=this.nb;15<=++this.Ub&&(this.B&&this.B.Ra(),this.Ub=0);break}}while(this.i.$)}catch(m){L(this);Gb(this);this.B&&this.B.stop(ja(),Mb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Vb;this.ga=ja();d=this.Tb;this.Va&&(d= Math.round(d*this.Va/this.nb));d-=this.ga-this.kb;if(e=this.ga-this.Y)this.fa=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ja=0,Jb(this));if(0>d||this.fad&&(this.Y-=d),d=0;this.Eb+=this.Va;this.ga+=d;b(c,d)}}};function Hb(a){var b;a.i.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.T(a.toString()+" busy");else{Jb(a);a.i.$=!0;a.i.cc=!0;a.Fa&&a.Fa.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.Y,Mb(a));Gb(a,!0);setTimeout(a.Vb,0)}}k.dc=function(){return 0}; function L(a){if(a.i.$){a.ha-=a.a;a.a=0;Kb(a,a.ca);a.ca=0;a.i.$=!1;a.Fa&&a.Fa.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Mb(a));Gb(a)}a.i.complete=void 0}function Gb(a,b){a.B&&a.B.Ra(b)} function Nb(a){this.Jc=a.resetAddr||0;Bb.call(this,a,6666667);this.Ob=0;this.decode=Ob.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.Jc];this.Ka=[0,0,0,0,0,0];this.da=[0,0,0,0];this.jb=this.w=0;this.Z=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.Bb=this.H=this.I=this.j=0;this.Ja=70;this.ra=-1;Pb(this);this.i.complete=this.i.ic=!1}y(Nb,Bb);k=Nb.prototype;k.reset=function(){this.i.$&&L(this);Pb(this);Eb(this);this.i.error=!1;this.parent.reset.call(this)}; function Pb(a){a.Ca=255;a.s=0;a.Ib=0;a.G=0;a.Aa=0;a.tb=0;a.Ba=0;a.Fb=0;a.ib=0;a.oc=[4,2,0,1];a.qb=262143;a.Rb=253952;a.Sb=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pc=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.o=[];a.j|=2;cb(a)} function cb(a){a.Fb?(a.ea=65536,a.N=a.lc,a.V=a.Yb,a.Wb=a.Rc):(a.ea=0,a.N=a.kc,a.V=a.Na,a.Wb=a.Sa)}k.Nb=function(){return 0};k.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ja,this.ia]);a.set(2,Wa(this.u));return a.data()}; k.restore=function(a){var b=a[1];this.ja=b[1];Jb(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ka-=b;break}b-=a.o[f].ka}a.o.splice(f+1,0,{ka:b,Xb:c<<5&224,ec:d,yb:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.wa()|(a.h&65535?0:4)|(a.g&32768?2:0)|N(a)} function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ka.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ka[c];a.Ka[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.w]);a.j|=2;a.C=b}function O(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Sb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} function K(a,b){var c=!1;0>a.ra?a.ra=db(a):a.w||(b=4,c=!0);a.G&57344||(a.Aa=63222,a.tb=b);a.w=0;var d=a.V(b|a.ea),e=a.V(b+2&65535|a.ea);eb(a,e&-12289|a.ra>>2&12288);c&&(a.s|=4,a.f[6]=4);Tb(a,a.ra);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ra=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} function lb(a,b){var c=b>>13&31;31>c?a.Ba&32&&(b=a.fb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} function Wb(a,b,c){var d,e,f,g=0;d=b>>13;a.Ba&a.oc[a.w]||(d&=7);e=a.Sb[a.w][d];f=(a.pc[a.w][d]<<6)+(b&8191)&a.qb;ff&&(3932160<=f&&(f=lb(a,f&262143)),f>=a.Rb&&4186112>f&&(a.s|=32,K(a,4))));switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384)); a.Sb[a.w][d]=e;if(4194170!==f||a.w)a.ib=a.w,a.jb=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.G&57344||(a.G=a.G|g|a.ib<<5|a.jb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-=8;break; case 6:return e=Qb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.V(e|a.ea)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.Ca||65534<=a.f[6])&&(a.f[6]<=a.Ca-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}k.kc=function(a,b,c){return Xb(this,a,b,c)};k.lc=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};k.Na=function(a){a&1&&(this.s|=64,K(this,4));var b=this.u;return b.b[(a&b.u)>>>b.c].wc(a&b.h,a)}; k.Yb=function(a){return this.Na(Wb(this,a,2))};k.Sa=function(a,b){a&1&&(this.s|=64,K(this,4));var c=this.u;c.b[(a&c.u)>>>c.c].Qc(a&c.h,b&65535,a)};k.Rc=function(a,b){this.Sa(Wb(this,a|65536,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=a.V(d|c&a.ea),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c} function Zb(a,b,c,d){a.G&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Wb(a,e|c&65536,4),a.w=a.C>>14&3,a.Sa(e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d}function $b(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Bb=a.N(b,e,7),c=d.call(a,c,Va(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].wb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),a.Sa(e,d.call(a,c,a.Na(e)))):a.f[e]=d.call(a,c,a.f[e])} function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].wb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?a.Sa(a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} k.dc=function(a){this.i.complete=!0;this.i.ic=!1;this.i.cc=!1;this.ha=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Ib&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Xb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= this.f[7]+2&65535,this.j&=-5),a?K(this,a.ec):K(this,160))}else this.j&1&&this.j++;this.G&57344||(this.Aa=0,this.tb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Qb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function kc(a,b){a=b&~a;O(this,a);return a}function lc(a,b){a=b&~a;O(this,a<<8);return a}function mc(a,b){a|=b;O(this,a);return a}function nc(a,b){a|=b;O(this,a<<8);return a}function oc(a,b){a=~b|65536;P(this,a);return a&65535} function pc(a,b){a=~b|256;P(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} function vc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.l>>16&1;Q(this,a);return a&65535}function xc(a,b){a=b<<1|this.l>>16&1;Q(this,a<<8);return a&255}function yc(a,b){a=(this.l&65536|b)>>1|b<<16;Q(this,a);return a&65535}function zc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} function Cc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;O(this,a);return a&65535}function Ec(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} function Fc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} function Gc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,R(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Ob(a){Sc[a>>12].call(this,a)} var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,dc(this,a,b));this.a=c-Lc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),kc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? 2:0)},function(a){U(this,a,R(this,a),mc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),ec);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);O(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ (this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),lc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Ac);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> 4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.wa()==!(this.g&32768))},function(a){V(this,a,!this.wa()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.wa()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.wa()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> 6&3].call(this,a)},Y,Y],Xc=[function(a){P(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,N(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,N(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);O(this,a);this.a-= 11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);O(this,b);this.a=c-Mc[this.c]},function(a){O(this,dc(this,a,this.wa?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)K(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc, Qc,Qc],ad=[function(){this.C&49152?(this.s|=128,K(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Pb(this),this.u.reset());this.a-=667},function(){Ub(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m=0;this.a-= 5},W,W,W,W,W,W,W],cd=[Oc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.wa())},function(a){V(this,a,this.wa())},function(a){V(this,a,!N(this)&&!!(this.h&65535))},function(a){V(this,a,N(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, a,!N(this))},function(a){V(this,a,N(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){P(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? 9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,N(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,N(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b? 2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Yb(this,a,65536);Tb(this,a);O(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);O(this,b);this.a=c-Mc[this.c]},Y]; function hd(a){v.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){id(c,a,b,f)})}}y(hd);hd.prototype.xa=function(a,b,c,d){this.u=b;this.a=c;this.K=d;jd(this)};hd.prototype.na=function(){this.l&&(this.K&&this.K.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; hd.prototype.ma=function(){return!0}; function id(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.Cb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.l=h.symbols;if(!a.b.length){r("Empty ROM: "+b); return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].fc(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.hb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.Cb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.na=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.ma=function(a){return a?this.save():!0};k.reset=function(){od(this)};k.save=function(){var a=new M(this);a.set(0,[]);return a.data()};k.restore=function(){return od(this)};function od(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Hb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.T(this.l), this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.vc,Z.prototype.Pc,"RCSR"],pd[65394]=[null,null,Z.prototype.uc,Z.prototype.Oc,"RBUF"],pd[65396]=[null,null,Z.prototype.yc,Z.prototype.Tc,"XCSR"],pd[65398]=[null,null,Z.prototype.xc,Z.prototype.Sc,"XBUF"],pd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.B)){this.l=new M(this,"1.30.1","failsafe");ud(this.l)&&(zd(this,d),a=2,Ad(this.l));this.l.set("timestamp",ka());Bd(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.T(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.B;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.Y=!0;this.i.P=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.Ya());this.I&&(zd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; function zd(a,b){if(la("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),g=new M(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ma&&(c&&L(a.a),d=a.a.ma(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Kd(a,b,c)}})}else c(a,null)} function Ld(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--Hd||wa(!0));l=!1}var g,h,l=!0;Hd++;Ea[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m));q.appendChild(w)}c|| (c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Id(c,null,null,!1,e,function(d,l){l?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Hd||wa(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,m):Jd(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(E){f(E.message)}return l}window.embedPDP11=function(a,b,c,d){wa(!1);return Ld(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})();