(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,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={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"}; function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"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 ua(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 ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} function t(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){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}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(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}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Qb=this.id:(this.dc=this.id.substr(0,b),this.Qb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Eb:!1,ec:!1,ia:!1,error:!1};this.Sb=null;this.v.error=!1;this.L={};this.j=null;this.la=d||0;x.push(this)}var Ua=void 0,Va={}; if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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=w);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},x=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ba&&(this.ba=10);15>2;this.f=this.Ba-1;this.w=this.F/this.Ba|0;this.Sa=[];this.D=null;this.Fb=this.xd;a=new I;Ab(a,this.j);this.$=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} function Cb(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?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} function Db(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));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} function Eb(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?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=zb.prototype;k.reset=function(){this.D&&this.D()}; k.xd=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized I/O access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ia=function(a,b){b||this.reset();return!0}; function Fb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ba;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Pb+=l.A-f,l.A=f,!0;if(f>=l.A+l.Pb){n=l.size-(f-m);n>g&&(n=g);l.Pb=f-l.A+n;f=m+a.Ba;g-=n;h++;continue}}return Hb(1,f,g)}f=new I(f,n,a.Ba,d,e);Ab(f,a.j,l);a.$[h++]=f;f=m+a.Ba;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ib[d]+" at "+p(b,8,!0)),!0):Hb(2,b,c)} k.kb=function(a){return this.$[(a&this.g)>>>this.ba].Xb(a&this.f,a)};k.Ga=function(a){return this.$[(a&this.g)>>>this.ba].Gc(a&this.f,a)};function Jb(a,b){return a.$[(b&a.g)>>>a.ba].kc(b&a.f,b)}k.Mb=function(a,b){this.$[(a&this.g)>>>this.ba].ac(a&this.f,b&255,a)};k.oc=function(a,b){this.$[(a&this.g)>>>this.ba].Oc(a&this.f,b&65535,a)}; function Kb(a){for(var b=0,c=[],d=0;d>5&3;c.Aa=a>>1&15;c.ic=a&257?a&1?6:4:0;Sb(c);a=c.G;a&1|256&&(b=this.b.$a&16?1:2);this.g.rb=this.g.rb&-8|b};k.gd=function(){return Tb(this.b)};k.Ad=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.C|=128}; function Vb(a){var b=a.D,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.md,drive:f,blocksize:256,mapped:0,maxblock:b.gb[f]*b.ca[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Kb=2496;b.na=0;b.P=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.gb[f]){b.na|=32832;b.P|=49152;break}if((b.va&15)>=b.ca[f]){b.na|=32800;b.P|=49152;break}c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;ec(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.gb[f])b.na|= 32832,b.P|=49152;else if((b.va&15)>=b.ca[f])b.na|=32800,b.P|=49152;else{c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;a.Yb(b.ra[f],c,d,e);return}}b.Kb=f<<13|b.Kb&8176|b.va%9&15;K(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}k.md=function(a,b,c,d,e){var f=this.D;f.Jb=d&65535;f.P=f.P&-49|d>>12&48;f.Lb=65536-e&65535;switch(a){case 1:f.na|=33024;f.P|=49152;break;case 2:f.na|=33792,f.P|=49152}K(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; function fc(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.nd,drive:f,blocksize:128,mapped:1,maxblock:b.gb[f]*b.ca[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Xa&8&&(b.M&=63);b.Xa=b.Pc[f]|b.eb&64;break;case 3:1==(b.ea&3)&&(b.eb=b.ea&4?b.eb+(b.ea&65408)&65408|b.ea<<2&64:b.eb-(b.ea&65408)&65408|b.ea<<2&64,b.ea=b.eb);break;case 4:b.Xa=b.eb;break;case 5:if(b.ea>>6>=b.gb[f]){b.M|=37888;break}if((b.ea&63)>=b.ca[f]){b.M|=37888;break}c=(b.ea>>6)* b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;ec(a,b.ra[f],c,d,e);return;case 6:if(b.ea>>6>=b.gb[f])b.M|=37888;else if((b.ea&63)>=b.ca[f])b.M|=37888;else{c=(b.ea>>6)*b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;a.Yb(b.ra[f],c,d,e);return}}K(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} k.nd=function(a,b,c,d,e){var f=this.w;f.Db=d&65535;f.M=f.M&-49|d>>12&48;f.Ta=d>>16&63;f.ea=~~(c/f.ca[b.La])<<6|c%f.ca[b.La];f.eb=f.ea;f.Xa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}K(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function gc(a){a=a.B;a.T=2176;a.Ca=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.bb=a.nc=0} function hc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Ca&=-2049;c.ta[b]&=-1153;K(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.od,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.fb[0]*c.ca[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.$b[b]=c.Pa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))* c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;ec(a,c.ra[b],d,e,f);return;case 57:if(c.Pa[b]>=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))*c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;a.Yb(c.ra[b],d,e,f);return}}K(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} k.od=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.bb=d>>16&63;e=~~(c/f.ca[0]);d=~~(e/f.fb[0]);f.Da[b.La]=e%f.fb[0]<<8|c%f.ca[0];f.$b[b.La]=f.Pa[b.La]=d;f.mb|=1<=b.$c-1&&(f.ta[b.La]|=1024);switch(a){case 1:f.Ca|=512;f.T|=49152;break;case 2:f.Ca|=2048,f.T|=49152}K(this.b,20,5,172,function(){f.ta[b.La]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; function ic(a,b,c,d,e,f){var g=~~((f+c.Ua-1)/c.Ua),h=new XMLHttpRequest;2048>g&&d+2048this.b.Ab(a.Zc?jc(this.b,c):c,a.cache[b][e])){a.Wb(2,a,b,c,d);return}c+=2;--d}b++}a.Wb(0,a,b,c,d)}; function ec(a,b,c,d,e){for(var f,g;0g){b.Wb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Wb(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Wa=0;this.D.P=128;this.w.M=128;gc(this)}; k.Rc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.ab&65280:(a&1&&(b<<=8),f.ab=b|255,d=0);break;case 4194298:if(0>b)d=f.mc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.mc=d;f.C|=2}break;case 4194294:if(70!==f.jb)return f.K(4,222);0>b?d=f.I:d=f.I=0;break;case 4194292:if(70!==f.jb)return f.K(4,224);d=1;break;case 4194290:if(70!==f.jb)return f.K(4,226);d=0;break;case 4194288:if(70!==f.jb)return f.K(4,228);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.jb)return f.K(4,232);e=a-4194272>>1;0>b?d=f.hc[e]:(d=L(this,f.hc[e],a,b,c),0<=d&&(f.hc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Oa[e]= b),d=f.Oa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Oa[e]=b),d=f.Oa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.I|=16,f.K(4,124)}break;case 4194176:e=a>>1&31;d=L(this,f.xa[3][e],a,b,c);0<=d&&(f.xa[3][e]=d,f.xa[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=L(this,f.Zb,a,b,c);0<=d&&(f.Zb=d);break;case 4194172:d=f.Za;d&65280&& (d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.wd&65535:(d=L(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.I|=16,f.K(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=L(this,e.Kb,a,b,c);0<=d&&(e.Kb=d);break;case 4194050:d=L(this,e.na,a,b,c);0<=d&&(e.na=d);break;case 4194052:d=L(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Vb(this));break;case 4194054:d=L(this,e.Lb,a,b,c);0<=d&&(e.Lb=d);break;case 4194056:d=L(this,e.Jb,a,b,c);0<=d&&(e.Jb=d); break;case 4194058:d=L(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=L(this,e.Ic,a,b,c);0<=d&&(e.Ic=d);break;default:return f.I|=16,f.K(4,128)}break;case 4193728:var g=this.B;e=g.Ca&7;switch(a&-2){case 4193728:d=L(this,g.T,a,b,c);0<=b&&0<=d&&(g.bb=g.bb&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?hc(this,e):192==(d&192)&&K(f,0,5,172));break;case 4193730:d=L(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=L(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= L(this,g.Da[e],a,b,c);0<=d&&(g.Da[e]=d&7967);break;case 4193736:d=L(this,g.Ca,a,b,c);0<=d&&(g.Ca=d&63|g.Ca&65472,d&128&&gc(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=L(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.td[e];break;case 4193746:d=L(this,g.Jc,a,b,c);0<=d&&(g.Jc=d);break;case 4193748:d=L(this,g.Kc[e],a,b,c);0<=d&&(g.Kc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.ud[e];break;case 4193754:d=L(this,g.Lc[e],a,b,c);0<=d&& (g.Lc[e]=d);break;case 4193756:d=L(this,g.Pa[e],a,b,c);0<=d&&(g.Pa[e]=d&511);break;case 4193758:g.$b[e]=g.Pa[e];d=g.$b[e];break;case 4193760:d=g.rd[e];break;case 4193762:d=g.sd[e];break;case 4193764:d=g.pd[e];break;case 4193766:d=g.qd[e];break;case 4193768:d=L(this,g.bb,a,b,c);0<=d&&(g.bb=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=L(this,g.nc,a,b,c);0<=d&&(g.nc=d);break;default:return f.I|=16,f.K(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=L(this,e.M,a,b,c);0<=b&&0<=d&&(e.Ta= e.Ta&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||fc(this));break;case 4192514:d=L(this,e.Db,a,b,c);0<=d&&(e.Db=d&65534);break;case 4192516:d=L(this,e.ea,a,b,c);0<=d&&(e.ea=d);break;case 4192518:d=L(this,e.Xa,a,b,c);0<=d&&(e.Xa=d);break;case 4192520:d=L(this,e.Ta,a,b,c);0<=d&&(e.Ta=d&63,e.M=e.M&-49|(e.Ta&3)<<4);break;default:return f.I|=16,f.K(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.$a:(d=L(this,f.$a,a,b,c),0<=d&&(70!==f.jb&&(d&=-49),f.$a=d,f.Vb[0]=d&4?15:7,f.Vb[1]=d&2?15:7,f.Vb[3]= d&1?15:7,f.ic&&(e=2,f.$a&16&&(e=1),this.g.rb=this.g.rb&-8|e)));break;default:return f.I|=16,f.K(4,136)}break;case 4191424:e=a>>1&31;d=L(this,f.xa[0][e],a,b,c);0<=d&&(f.xa[0][e]=d,f.xa[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=L(this,f.xa[1][e],a,b,c);0<=d&&(f.xa[1][e]=d,f.xa[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.jb)return f.K(4,234);e=a>>2&31;d=f.Nb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=L(this,d,a,b,c),0<=d&&(f.Nb[e]=a&2?d<<16|f.Nb[e]&65535:f.Nb[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=Ob[a>>1&255];else return f.I|=16,f.K(4,138);break;default:return f.I|=16,f.K(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var kc={},Rb=(kc[65382]=[null,null,Nb.prototype.ed,Nb.prototype.yd,"LKS"],kc[65402]=[null,null,Nb.prototype.fd,Nb.prototype.zd,"MMR0"],kc[65534]=[null,null,Nb.prototype.gd,Nb.prototype.Ad,"PSW"],kc); La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),rc(this,nc?sc:tc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Y:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Va=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.S)&&c.ha(!0)}return this.jc(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.S)&&c.ha(!0)}return this.kc(a,b)},ma:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,1,d.G)&&d.ha(!0)}this.f?this.L(a, b,c):this.bc(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.G)&&d.ha(!0)}this.f?this.L(a,b,c):this.rc(a,b,c)},R:function(a){return this.w[a]},W:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},Z:function(a){return this.B.getUint16(a,!0)},ga:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.w[a]=b; this.Va=!0},pa:function(a,b,c){this.w[a]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},ua:function(a,b){this.B.setUint16(a,b,!0);this.Va=!0},za:function(a,b,c){this.H[a>>1]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Ab(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&xc(a,wc,!1),(a.F=c.F)&&vc(a,wc,!1))} function zc(a,b){b?--a.F||(a.ac=a.f?a.L:a.bc,a.Oc=a.f?a.G:a.rc):--a.g||(a.Xb=a.jc,a.Gc=a.kc)}function vc(a,b,c){c&&a.F||(a.ac=!a.f&&b[1]||a.L,a.Oc=!a.f&&b[3]||a.G);if(c||void 0===c)a.bc=b[1]||a.L,a.rc=b[3]||a.G}function xc(a,b,c){c&&a.g||(a.Xb=b[0]||a.J,a.Gc=b[2]||a.N);if(c||void 0===c)a.jc=b[0]||a.J,a.kc=b[2]||a.N}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}var Ac=[],uc=[I.prototype.Y,I.prototype.qa,I.prototype.ja,I.prototype.Aa],wc=[I.prototype.S,I.prototype.ma,I.prototype.da,I.prototype.wa]; if(wb)var tc=[I.prototype.R,I.prototype.ka,I.prototype.Z,I.prototype.ua],sc=[I.prototype.W,I.prototype.pa,I.prototype.ga,I.prototype.za];function Bc(a,b){w.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Ra=a.cycles||b;this.Ya=c;this.ob=Math.round(this.Ra/1E4)/100;this.lb=this.ob*this.Ya;this.v.fa=!1;this.v.pc=!1;this.v.Cb=a.autoStart;this.v.uc=!1;this.v.pb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Dc=this.vd.bind(this);G(this)}y(Bc); var Cc=["power","reset"];k=Bc.prototype;k.Na=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.ma&&(a.ma+=a.sb,c=!0);0<=a.tb&&a.tb<=Ic(a)&&(a.sb=a.tb=-1,Fc(a),a.ha(),c=!0);c&&a.i(Ic(a)+" cycles: checksum="+p(a.Gb))}} function Jc(a,b,c,d){if(a.L[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ha());var e=a.j&&a.j.ma||8;c=!a.v.fa||a.v.uc?8==e?ba(c,d):p(c,d):"--------".substr(0,d||4);a.L[b].textContent!=c&&(a.L[b].textContent=c)}} k.oa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.L[b]=c;a=!0;break;case "run":this.L[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ia)a=!0;else{var b=null,c,h=bb(a.id);for(c=0;ca.ga/a.lb?b=1:d=!0;a.Ya=b;b=a.ob*a.Ya;if(a.lb!=b){a.lb=b;b=a.lb.toFixed(2)+"Mhz";var e=a.L.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Ob()}dd(a,a.Z);a.Z=0;a.Y=ra();a.ja=0;ed(a);return d}function Pb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Ra*a.Ya/1E3,a.N[b][0]=c)}function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} k.vd=function(){if(this.v.fa){this.qb>=this.Ra&&ed(this,!0);this.wa=0;this.Qa=ra();if(this.ja){var a=this.Qa-this.ja;a>this.Ac&&(this.Y+=a,this.Y>this.Qa&&(this.Y=this.Qa))}try{do{var b=fd(this,this.v.pb?1:this.cb);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.S-this.b;gd(this,c);this.wa+=c;this.Z+=c;dd(this,0,!0);Hc(this,c);this.pa-=c;if(0>=this.pa){this.pa+=this.cb;15<=++this.Cc&&(this.D&&this.D.Ea(),this.Cc=0);break}}while(this.v.fa)}catch(e){this.ha();M(this);this.D&&this.D.stop(ra(), Ic(this));vb(this,e.stack||e.message);return}if(this.v.fa){a=setTimeout;b=this.Dc;this.ja=ra();c=this.Ac;this.wa&&(c=Math.round(c*this.wa/this.cb));var c=c-(this.ja-this.Qa),d=this.ja-this.Y;d&&(this.ga=Math.round(this.Z/(10*d))/100,864E5<=d&&(this.ka=0,Kc(this)));if(0>c||this.gac&&(this.Y-=c),c=0;this.qb+=this.wa;this.ja+=c;a(b,c)}}}; k.yb=function(a){if(ib(this))return!1;if(this.v.fa)return this.i(this.toString()+" busy"),!1;Kc(this);this.v.fa=!0;this.v.pc=!0;this.ua&&this.ua.start();var b=this.L.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Ob(!0),this.D.start(this.Y,Ic(this)));M(this,!0);setTimeout(this.Dc,0);return!0};k.zb=function(){return 0}; k.ha=function(a){if(this.v.fa){this.S-=this.b;this.b=0;dd(this,this.Z);this.Z=0;this.v.fa=!1;this.ua&&this.ua.stop();var b=this.L.run;b&&(b.textContent="Run");this.D&&this.D.stop(ra(),Ic(this));M(this)}this.v.complete=a};function M(a,b){a.D&&a.D.Ea(b)} function hd(a){this.ad=+a.model||1170;this.dd=a.resetAddr||0;Bc.call(this,a,6666667);this.Rb=0;this.decode=id.bind(this);this.U=65536;this.V=32768;this.aa=65535;this.X=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.dd];this.Oa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.Aa=this.B=0;this.xa=[[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.Nb=[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.hc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.nb=this.H=this.J=this.C=0;this.jb=70;this.qa=-1;jd(this);this.v.complete=this.v.Tc=!1}y(hd,Bc);k=hd.prototype;k.reset=function(){this.v.fa&&this.ha();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; function jd(a){a.ab=255;a.I=0;a.mc=0;a.G=0;a.Za=0;a.Zb=0;a.$a=0;a.ic=0;a.za=0;a.Yc=[4,2,0,1];a.Vb=262143;a.Tb=253952;a.Ub=[[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.bd=[[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.w=[];a.C|=2;Sb(a)} function Sb(a){a.ic?(a.da=65536,a.R=a.Wc,a.W=a.Hc,a.Ec=a.Dd):(a.da=0,a.R=a.Vc,a.W=a.ub,a.Ec=a.Ab)}k.xc=function(){return 0};k.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ka,this.Ya]);a.set(2,Kb(this.F));return a.data()}; k.restore=function(a){var b=a[1];this.ka=b[1];Kc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].Ka-=b;break}b-=a.w[f].Ka}a.w.splice(f+1,0,{Ka:b,Fc:c<<5&224,Nc:d,gc:e})}a.C|=2}function Tb(a){return a.O=a.O&63728|a.Ma()|md(a)|ld(a)|kd(a)} function Ub(a,b){a.X=b<<12;a.aa=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Oa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Oa[c];a.Oa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.C|=2;a.O=b}function O(a,b){a.C&128||(a.X=a.aa=b,a.V=0)}function pd(a,b,c){a.C&128||(a.X=a.aa=a.U=b,a.V=c||0)}function qd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^b)&(d^b))}function rd(a,b){a.C&128||(a.X=a.aa=a.U=b,a.V=a.X^a.U>>1)} function sd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^d)&(d^b))}k.K=function(a){var b=!1;0>this.qa?this.qa=Tb(this):this.B||(a=4,b=!0);this.G&57344||(this.Za=63222,this.Zb=a);this.B=0;var c=this.W(a|this.da),d=this.W(a+2&65535|this.da);Ub(this,d&-12289|this.qa>>2&12288);b&&(this.I|=4,this.u[6]=4);td(this,this.qa);td(this,this.u[7]);od(this,c);this.C&=-113;this.qa=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);od(a,b);Ub(a,c);a.C&=-17} function jc(a,b){var c=b>>13&31;31>c?a.$a&32&&(b=a.Nb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.$a&a.Yc[a.B]||(d&=7);e=a.Ub[a.B][d];f=(a.bd[a.B][d]<<6)+(b&8191)&a.Vb;ff&&(3932160<=f&&(f=jc(a,f&262143)),f>=a.Tb&&4186112>f&&(a.I|=32,a.K(4,12))));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.Ub[a.B][d]=e;if(4194170!==f||a.B)a.za=a.B,a.Aa=d;g&&(g&57344&&(0<=a.qa&&(g|=128),a.G&57344||(a.G=a.G|g|a.za<<5|a.Aa<<1),a.K(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.b-= 8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.W(e|a.da)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Za=a.Za<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.ab||65534<=a.u[6])&&(a.u[6]<=a.ab-32?(a.I|=4,a.u[6]=4,a.K(4,24)):(a.I|=8,a.C|=64));return e}k.Vc=function(a,b,c){return xd(this,a,b,c)};k.Wc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};k.ub=function(a){a&1&&(this.I|=64,this.K(4,10));return this.F.Ga(a)}; k.Hc=function(a){return this.ub(wd(this,a,2))};k.Ab=function(a,b){a&1&&(this.I|=64,this.K(4,10));this.F.oc(a,b&65535)};k.Dd=function(a,b){this.Ab(wd(this,a|65536,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.W(d|c&a.da),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.ya[a.O>>12&3];return c} function zd(a,b,c,d){a.G&57344||(a.Za=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=wd(a,e|c&65536,4),a.B=a.O>>14&3,a.Ab(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.ya[a.O>>12&3]=d}function Ad(a,b){b>>=6;var c=a.J=b&7;(b=a.H=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Bd(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.H=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function Cd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xd(a,b,c,8)} function Dd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Ed(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.nb=a.R(b,e,7),c=d.call(a,c,a.F.kb(e)),e&1&&a.b--,a.F.Mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.R(b,e,6),a.Ab(e,d.call(a,c,a.ub(e)))):a.u[e]=d.call(a,c,a.u[e])} function Fd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.R(b,e,5),d&1&&a.b--,a.F.Mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.Ab(a.R(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} k.zb=function(a){this.v.complete=!0;var b=this.v.Tc=this.j&&Hd(this.j),c=a?this.v.pc?0:1:-1;this.v.pc=!1;this.S=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ha();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.K(168,28):this.C&64?this.K(4,30):this.C&16&&this.K(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.mc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Fc,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.K(a.Nc,26):this.K(160,26))}else this.C&1&&this.C++;this.G&57344||(this.Za=0,this.Zb=this.u[7]);this.C=this.C&7|this.O&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.C&128||(this.X=this.aa=a,this.V=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.X=this.aa=c,this.V=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.C&128||(this.X=this.aa=a,this.V=a&(b^a));return a&65535} function Yd(a,b){a=b+a;var c=a<<8;this.C&128||(this.X=this.aa=c,this.V=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.U>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.U>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.U&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.C&128||(this.X=this.aa=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=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.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.V=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.V=32768,this.U=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.g]} var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.g]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.C&128||(this.X=b>>16,this.aa=this.X|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ne(a){Q(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)}function Oe(a){Q(this,a,Bd(this,a),he);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.K(8,6)}function id(a){Pe[a>>12].call(this,a)} var Pe=[function(a){Qe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? 2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.g? 4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],Qe= [function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ma()==!ld(this))},function(a){R(this,a,!this.Ma()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ma()==!ld(this))},function(a){R(this,a,md(this)||!this.Ma()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, Gd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.g?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.g?4:3+(7==this.f? 2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Hc(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, 0,b);O(this,b);this.b=c-qe[this.g]},function(a){O(this,Gd(this,a,this.Ma?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.K(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.K(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},Ne,Ne,Ne,Ne],Ye=[function(){this.O&49152?(this.I|=128,this.K(4, 3)):this.ha();this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.C|=this.O&16;this.b-=13},function(){this.K(12,1);this.b-=5},function(){this.K(16,4);this.b-=25},function(){this.O&49152||(jd(this),this.F.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},S,function(){this.aa=1;this.b-=5},S,S,S,function(){this.X=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.U= 65536;this.b-=5},function(){this.V=32768;this.b-=5},U,function(){this.aa=0;this.b-=5},U,U,U,function(){this.X=32768;this.b-=5},U,U,U,U,U,U,U],Re=[re,re,ke,ke,ie,ie,je,je,Oe,Oe,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ma())},function(a){R(this,a,this.Ma())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.K(24,2); this.b-=25},function(){this.K(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= this.g?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.g?9:3+(7== this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.g]},V];function ef(a){w.call(this,"ROM",a,ef);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); ef.prototype.Na=function(a,b,c,d){this.F=b;this.b=c;this.j=d;gf(this)};ef.prototype.Ia=function(){if(this.Ja){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ja,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({Hd:b,A:c,Xc:d,Ja:e,sc:f})}delete this.Ja}return!0};ef.prototype.Ha=function(){return!0}; function ff(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ja=h.symbols;if(!a.f.length){t("Empty ROM: "+ b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ba].bc(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>> e.ba;0>>=e.ba;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Qb)return;b=oa(b[1]);if(this.J=cb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ia=function(a,b){if(!b)if(this.Bc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ha=function(a){return a?this.save():!0};k.reset=function(){mf(this)};k.save=function(){var a=new N(this);a.set(0,[]);return a.data()};k.restore=function(){return mf(this)};function mf(a){a.W=0;a.f=0;a.g=128;a.B=[];return!0}k.lc=function(a){if("number"==typeof a)this.B.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.Y||8,c=a-this.H%a,this.Y&&(b=na("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;K(this.b,100,4,52,this.S)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.jd,W.prototype.Cd,"RCSR"],nf[65394]=[null,null,W.prototype.hd,W.prototype.Bd,"RBUF"],nf[65396]=[null,null,W.prototype.ld,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.kd,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.yc=function(){return-1};of.prototype.zc=function(){}; function qf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.Z?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} function rf(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} function sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ga[b]);var c=0;for(b in a.ga)vf(a,b,a.ga[b]),c++;return 0>>d.F.ba;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ib[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ba].jc(d&c.f,d),this.g--,b&&Gf(a,b));return c};k.Ga=function(a,b){var c=65535,d=Z(a);-1!==d&&(this.g++,c=Jb(this.F,d),this.g--,b&&Gf(a,b));return c}; k.Mb=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].bc(d&e.f,b&255,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};k.oc=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].rc(d&e.f,b&65535,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,Fa:!1}}function Hf(a){return[a.A,a.Fa]}function If(a){return{A:a[0],Fa:a[1]}} function Ff(a,b,c){var d;c=(c?a.R:a.cb).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.zc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Oa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Tb(this.b)));return b}; k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,X(this.b.u[7]).A)),this.la&1073741824?this.wa.push(a):this.ua&&a==this.ua||(this.ua=a,this.la&-2147483648&&(this.ha(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.S-=a.b,a.b=0,a.pa=0,M(a))))}; function zf(a){var b;if(Hd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ba],!1)}a.S=["br"];if(a.G)for(b=1;b>>d.ba],!0);a.G=["bw"];a.nb=0} k.hb=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.F;f.$[e>>>f.ba].hb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Fa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.ba],b==a.G));h.Fa||zf(a);break}}return f} function Rf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Kf(z);break;case 8:v="@"+Kf(z);break;case 16:7>z?v="("+Kf(z)+ ")+":(A=u.Ga(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Kf(z)+")+":(A=u.Ga(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Kf(z)+")";break;case 40:v="@-("+Kf(z)+")";break;case 48:A=u.Ga(q,2);v=J(u,A,0,!0)+"("+Kf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ga(q,2),v="@"+J(u,A)+"("+Kf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Oa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Tb(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Xc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Wf(a));c&&(a.R=X(d.u[7]),Nf(a,J(a,a.R.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Tf(a,b,g,f);a.i(f);a.R=b;e-=b.A-l;c++}}} function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.Z&&(a.i("ended assemble at "+J(a,a.Y.A)),a.R=a.Y,a.Z=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ua=null;if(hb(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Y=ja.length);ca-=Y;0>ca&&(null==ja[ja.length-1].A?(Y=ca+Y,ca=0):ca+=ja.length);var Oc=[];"call"==ze&&(jb=1E5,Oc=["CALL"]);for(void 0!==ye&&a.i(Y+" instructions earlier:");0=ja.length&&(ca=0);a.ob=Y;Be++;jb--}}Be||(a.i("no "+Ae+"history available"),a.ob=void 0)}else{var Wb=Ff(a,ia);if(Wb){var Xb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Xb=uf(a,za)>>>0,65536>4||1;wg--&&0$b?String.fromCharCode($b):".";Yb--}lb&&(lb+="\n");lb+=ia+" "+Qc+(0==nb?" "+Ee:"")}lb&&a.i(lb);a.cb=Wb}}}}break;case "e":if("else"==g[0])break;var Ra,Rc,Sc,Tc,Uc=g[0],Vc=g[1];"eb"==Uc?(Ra=1,Rc=255,Sc=a.kb,Tc=a.Mb):"e"==Uc||"ew"==Uc?(Ra=2,Rc=65535,Sc=a.Ga,Tc=a.oc):Vc=null;if(null==Vc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var ac=Ff(a,Vc);if(ac)for(var bc=2;bcYc;){for(var Aa=null,Ag=256;65536>qb.A>>>0;){Zc.A=a.Ga(qb,2);if(null==qb.A||!Ag--)break;if(!(Zc.A&1)){for(var Bg=a,cc=Zc,Ge=null,rb=cc.A,He=rb,$c=1;6>=$c&& rb;$c++){if(2<$c){cc.A=rb;var dc=Tf(Bg,cc);if(0<=dc.indexOf("JSR")){var Ie=dc.indexOf(" ");if(rb+(dc.indexOf(" ",Ie+1)-Ie-1)/2==He){Ge=dc;break}}}rb-=2}cc.A=He;if(Aa=Ge)break}}if(!Aa||null==Aa)break;var Je=null;if("ks"==zg){var Ke=Aa.match(/[0-9A-F]+$/);Ke&&(Je=$f(a,Ke[0]))}Aa=na(Aa,50)+" ;"+(Je||"stack="+J(a,qb.A));a.i(Aa);Yc++}Yc||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){$f(a,g[1],!0);break}f=!0;break;case "m":a:{var ka,la=null,C=g[1];"?"==C&&(C=void 0);if(void 0!==C){var ta= 0;if("all"==C)ta=1878917119,C=null;else if("on"==C)la=!0,C=null;else if("off"==C)la=!1,C=null;else{"keys"==C&&(C="key");"kbd"==C&&(C="keyboard");for(ka in H)if(C==ka){ta=H[ka];la=!!(a.la&ta);break}if(!ta){a.i("unknown message category: "+C);break a}}if(ta)if("on"==g[2])a.la|=ta,la=!0;else if("off"==g[2]&&(a.la&=~ta,la=!1,1073741824==ta)){for(var ad=0;ad\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.J)){this.B=new N(this,"1.30.1","failsafe");hg(this.B)&&(mg(this,d),a=2,ng(this.B));this.B.set("timestamp",sa());og(this.B);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.J;delete this.N}e=bb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.v.ia=!0;var d=this.L.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.Cb());this.W&&(mg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; function mg(a,b){if(va("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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} function cg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),h=sa();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.b&&a.b.Ha&&(c&&a.b.ha(),d=a.b.Ha(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=bb(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(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Hg(a,b,c)}})}else c(a,null)} function Ig(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=ma(a))}function f(a){e("Error: "+a);l&&(--tg||Sa(!0));l=!1}var g,h,l=!0;tg++;$a[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| (c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Fg(c,null,null,!1,e,function(d,l){l?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--tg||Sa(!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),--tg||Sa(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,m):Gg(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Sa(!1);return Ig(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})();