Added another PDP-10 KA10 diagnostic (DAKAL)
This commit is contained in:
parent
1786b3bf31
commit
26de8bbb1a
10 changed files with 23874 additions and 174 deletions
|
|
@ -42,17 +42,17 @@ OPDEF ER11 [11B8]
|
|||
OPDEF ER12 [12B8]
|
||||
OPDEF ER13 [13B8]
|
||||
|
||||
;LUUO1=ERRMES
|
||||
;LUUO2=ERRMES
|
||||
;LUUO3=ERRMES
|
||||
;LUUO4=ERRMES
|
||||
;LUUO5=ERRMES
|
||||
;LUUO6=ERRMES
|
||||
;LUUO7=ERRMES
|
||||
;LUUO10=ERRMES
|
||||
;LUUO11=ERRMES
|
||||
;LUUO12=ERRMES
|
||||
;LUUO13=ERRMES
|
||||
LUUO1=ERRMES
|
||||
LUUO2=ERRMES
|
||||
LUUO3=ERRMES
|
||||
LUUO4=ERRMES
|
||||
LUUO5=ERRMES
|
||||
LUUO6=ERRMES
|
||||
LUUO7=ERRMES
|
||||
LUUO10=ERRMES
|
||||
LUUO11=ERRMES
|
||||
LUUO12=ERRMES
|
||||
LUUO13=ERRMES
|
||||
;SUBROUTINE ASSEMBLY DEFINITIONS
|
||||
|
||||
DEBUG=40
|
||||
|
|
@ -66,17 +66,17 @@ ERDIAG=1
|
|||
|
||||
;SPECIAL FEATURE PARAMETERS
|
||||
|
||||
;SADR1=START
|
||||
;SADR2=START
|
||||
;SADR3=START
|
||||
;SADR4=START
|
||||
;SADR5=JRST START
|
||||
;SADR6=JRST START
|
||||
;SADR7=JRST START
|
||||
;SADR8=JRST START
|
||||
;SADR9=JRST START
|
||||
;SADR10=JRST START
|
||||
;SADR11=JRST START
|
||||
SADR1=START
|
||||
SADR2=START
|
||||
SADR3=START
|
||||
SADR4=START
|
||||
SADR5=JRST START
|
||||
SADR6=JRST START
|
||||
SADR7=JRST START
|
||||
SADR8=JRST START
|
||||
SADR9=JRST START
|
||||
SADR10=JRST START
|
||||
SADR11=JRST START
|
||||
|
||||
PAREA0=0
|
||||
PAREA1=0
|
||||
|
|
|
|||
|
|
@ -42,17 +42,17 @@ OPDEF ER11 [11B8]
|
|||
OPDEF ER12 [12B8]
|
||||
OPDEF ER13 [13B8]
|
||||
|
||||
;LUUO1=ERRMES
|
||||
;LUUO2=ERRMES
|
||||
;LUUO3=ERRMES
|
||||
;LUUO4=ERRMES
|
||||
;LUUO5=ERRMES
|
||||
;LUUO6=ERRMES
|
||||
;LUUO7=ERRMES
|
||||
;LUUO10=ERRMES
|
||||
;LUUO11=ERRMES
|
||||
;LUUO12=ERRMES
|
||||
;LUUO13=ERRMES
|
||||
LUUO1=ERRMES
|
||||
LUUO2=ERRMES
|
||||
LUUO3=ERRMES
|
||||
LUUO4=ERRMES
|
||||
LUUO5=ERRMES
|
||||
LUUO6=ERRMES
|
||||
LUUO7=ERRMES
|
||||
LUUO10=ERRMES
|
||||
LUUO11=ERRMES
|
||||
LUUO12=ERRMES
|
||||
LUUO13=ERRMES
|
||||
;SUBROUTINE ASSEMBLY DEFINITIONS
|
||||
|
||||
DEBUG=40
|
||||
|
|
@ -66,17 +66,17 @@ ERDIAG=1
|
|||
|
||||
;SPECIAL FEATURE DEFINITIONS
|
||||
|
||||
;SADR1=BEGIN
|
||||
;SADR2=BEGIN
|
||||
;SADR3=BEGIN
|
||||
;SADR4=BEGIN
|
||||
;SADR5=JRST BEGIN
|
||||
;SADR6=JRST BEGIN
|
||||
;SADR7=JRST BEGIN
|
||||
;SADR8=JRST BEGIN
|
||||
;SADR9=JRST BEGIN
|
||||
;SADR10=JRST BEGIN
|
||||
;SADR11=JRST BEGIN
|
||||
SADR1=BEGIN
|
||||
SADR2=BEGIN
|
||||
SADR3=BEGIN
|
||||
SADR4=BEGIN
|
||||
SADR5=JRST BEGIN
|
||||
SADR6=JRST BEGIN
|
||||
SADR7=JRST BEGIN
|
||||
SADR8=JRST BEGIN
|
||||
SADR9=JRST BEGIN
|
||||
SADR10=JRST BEGIN
|
||||
SADR11=JRST BEGIN
|
||||
|
||||
;SPECIAL FEATURE PARAMETERS
|
||||
|
||||
|
|
|
|||
18052
apps/pdp10/diags/ka10/dakal/DAKAL.LST.txt
Normal file
18052
apps/pdp10/diags/ka10/dakal/DAKAL.LST.txt
Normal file
File diff suppressed because it is too large
Load diff
2614
apps/pdp10/diags/ka10/dakal/DAKAL.MAC.txt
Normal file
2614
apps/pdp10/diags/ka10/dakal/DAKAL.MAC.txt
Normal file
File diff suppressed because it is too large
Load diff
2472
apps/pdp10/diags/ka10/dakal/DAKALM.MAC.txt
Normal file
2472
apps/pdp10/diags/ka10/dakal/DAKALM.MAC.txt
Normal file
File diff suppressed because it is too large
Load diff
123
apps/pdp10/diags/ka10/dakal/DAKALT.MAC.txt
Normal file
123
apps/pdp10/diags/ka10/dakal/DAKALT.MAC.txt
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
;DAKAL
|
||||
|
||||
|
||||
MCNVER==0
|
||||
DECVER==2
|
||||
|
||||
|
||||
XLIST
|
||||
DEFINE NAME (MCNVER,DECVER)<
|
||||
|
||||
TITLE DAKAL PDP-10 KI10 BASIC INSTRUCTION DIAGNOSTIC (12) MCNVER,DECVER
|
||||
>
|
||||
LIST
|
||||
LALL
|
||||
|
||||
NAME \MCNVER,\DECVER
|
||||
|
||||
;(MULTIPY, INTERGER MULTIPLY, DIVIDE, INTERGER DIVIDE)
|
||||
|
||||
;COPYRIGHT 1975,1977
|
||||
;DIGITAL EQUIPMENT CORPORATION
|
||||
;MARLBORO, MASS. 01752
|
||||
|
||||
;JOHN R. KIRCHOFF
|
||||
|
||||
LOC 137
|
||||
MCNVER,,DECVER
|
||||
|
||||
.DIRECTIVE .OKOVL
|
||||
NOSYM
|
||||
SUBTTL DIAGNOSTIC PARAMETERS
|
||||
|
||||
;OPERATOR DEFINITIONS
|
||||
|
||||
OPDEF ER1 [1B8]
|
||||
OPDEF ER2 [2B8]
|
||||
OPDEF ER3 [3B8]
|
||||
OPDEF ER4 [4B8]
|
||||
OPDEF ER5 [5B8]
|
||||
OPDEF ER6 [6B8]
|
||||
OPDEF ER7 [7B8]
|
||||
OPDEF ER10 [10B8]
|
||||
OPDEF ER11 [11B8]
|
||||
OPDEF ER12 [12B8]
|
||||
OPDEF ER13 [13B8]
|
||||
|
||||
LUUO1=ERRMES
|
||||
LUUO2=ERRMES
|
||||
LUUO3=ERRMES
|
||||
LUUO4=ERRMES
|
||||
LUUO5=ERRMES
|
||||
LUUO6=ERRMES
|
||||
LUUO7=ERRMES
|
||||
LUUO10=ERRMES
|
||||
LUUO11=ERRMES
|
||||
LUUO12=ERRMES
|
||||
LUUO13=ERRMES
|
||||
;SUBROUTINE ASSEMBLY DEFINITIONS
|
||||
|
||||
DEBUG=40
|
||||
EXCASB=1
|
||||
USRASB=1
|
||||
KA10=1
|
||||
KLOLD==1
|
||||
PGMEND=1
|
||||
ERDIAG=1
|
||||
|
||||
;SPECIAL FEATURE DEFINITIONS
|
||||
|
||||
SADR1=BEGIN
|
||||
SADR2=BEGIN
|
||||
SADR3=BEGIN
|
||||
SADR4=BEGIN
|
||||
SADR5=JRST BEGIN
|
||||
SADR6=JRST BEGIN
|
||||
SADR7=JRST BEGIN
|
||||
SADR8=JRST BEGIN
|
||||
SADR9=JRST BEGIN
|
||||
SADR10=JRST BEGIN
|
||||
SADR11=JRST BEGIN
|
||||
|
||||
;SPECIAL FEATURE PARAMETERS
|
||||
|
||||
PAREA0=0
|
||||
PAREA1=0
|
||||
PAREA2=0
|
||||
PAREA3=SIXBIT/DAKAL/
|
||||
PAREA4=SIXBIT/TMP/
|
||||
PAREA5=0
|
||||
PAREA6=0
|
||||
ITERAT==1000
|
||||
|
||||
;MACROS
|
||||
|
||||
DEFINE SAVEAC (A,B)<
|
||||
MOVEI AC+2,. ;SAVE TEST PC
|
||||
MOVEM AC+2,TESTPC
|
||||
MOVEI AC+2,<AC+2>&17 ;INFORM ERROR ROUTINE WHICH
|
||||
MOVEM AC+2,ERRLOP# ;AC IS USED FOR ITERATION>
|
||||
DEFINE MOP1 (T,A1,A2,EE,R1,R2)<
|
||||
;THIS MACRO INITIALIZES AC,AC+1 AND E WITH [A1],[A2] AND
|
||||
;[EE] RESPECTIVELY, PERFORMS 'MUL AC,E' AND COMPARES AC,AC+1
|
||||
;AND E AGAINST [R1], [R2] AND [EE] RESPECTIVELY.
|
||||
;IF ANY OF THE ABOVE COMPARISONS FAIL, AN ERROR IS REPORTED
|
||||
|
||||
F'T'0: AA1=A1 ;INITIAL C(AC)
|
||||
MOVE AC,[A1] ;PRELOAD AC (MULTIPLIER)
|
||||
AA2=A2 ;INITIAL C(AC+1)
|
||||
MOVE AC+1,[A2] ;PRELOAD AC+1
|
||||
AEE=EE ;INITIAL C(E)
|
||||
MOVE E,[EE] ;PRELOAD E (MULTIPLICAND)
|
||||
MUL AC,E ;*MULTIPLY C(E) BY C(AC)
|
||||
AR1=R1 ;EXPECTED RESULT IN AC
|
||||
CAME AC,[R1] ;IS HIGH PRODUCT CORRECT?
|
||||
ER3 AC,T'1 ;HIGH PRODUCT FAILED
|
||||
AR2=R2 ;EXPECTED RESULT IN AC+1
|
||||
CAME AC+1,[R2] ;IS LOW PRODUCT CORRECT?
|
||||
ER4 AC+1,T'2 ;LOW PRODUCT FAILED
|
||||
AEE=EE ;INITIAL C(E)
|
||||
CAME E,[EE] ;WAS C(E) CLOBBERED?
|
||||
ER5 E,T'3 ;C(E) WAS CLOBBERED
|
||||
JUMPL AC+2,F'T'0 ;LOOP ON ERROR SWITCH>
|
||||
|
||||
427
apps/pdp10/diags/ka10/dakal/README.md
Normal file
427
apps/pdp10/diags/ka10/dakal/README.md
Normal file
|
|
@ -0,0 +1,427 @@
|
|||
---
|
||||
layout: page
|
||||
title: PDP-10 KA10 Basic Instruction Diagnostic #12
|
||||
permalink: /apps/pdp10/diags/ka10/dakal/
|
||||
machines:
|
||||
- id: testka10
|
||||
type: pdp10
|
||||
config: /devices/pdp10/machine/ka10/test/debugger/machine.xml
|
||||
debugger: true
|
||||
commands: a dakal.mac
|
||||
---
|
||||
|
||||
PDP-10 KA10 Basic Instruction Diagnostic #12
|
||||
--------------------------------------------
|
||||
|
||||
The *PDP-10 KA10 Basic Instruction Diagnostic #12* (MAINDEC-10-DAKAL) test code has been extracted from
|
||||
[DAKALM.MAC](DAKALM.MAC.txt) [[original](http://pdp-10.trailing-edge.com/klad_sources/01/klad.sources/dakalm.mac.html)] and
|
||||
[DAKALT.MAC](DAKALT.MAC.txt) [[original](http://pdp-10.trailing-edge.com/klad_sources/01/klad.sources/dakalt.mac.html)]
|
||||
for use with the [PDP-10 Test Machine with Debugger](/devices/pdp10/machine/ka10/test/debugger/) below.
|
||||
|
||||
This diagnostic "TESTS THE MULTIPY [sic], INTERGER [sic] MULIPLY [sic], DIVIDE AND INTERGER [sic] DIVIDE INSTRUCTIONS."
|
||||
|
||||
Resources for this diagnostic include:
|
||||
|
||||
- [Instructions](#dakaltxt)
|
||||
- [History](#dakalhst)
|
||||
- [Source Code](#dakalmac)
|
||||
- [MACRO-10 Listing](DAKAL.LST.txt)
|
||||
- [Additional Information](http://archive.pcjs.org/apps/pdp10/diags/ka10/dakal/DAKAL.SEQ.txt)
|
||||
|
||||
{% include machine.html id="testka10" %}
|
||||
|
||||
The Debugger's assemble ("a") command can be used to test the new built-in
|
||||
[MACRO-10 Mini-Assembler](/modules/pdp10/lib/macro10.js), which supports a subset
|
||||
of the [MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf) assembly language.
|
||||
This command:
|
||||
|
||||
a DAKAL.MAC
|
||||
|
||||
will automatically read the [DAKAL.MAC](DAKAL.MAC.txt) source file (a slightly modified copy of [DAKALM.MAC](DAKALM.MAC.txt)),
|
||||
assemble it, and then load the binary image at the location specified in the file.
|
||||
|
||||
---
|
||||
|
||||
DAKAL.TXT
|
||||
---------
|
||||
|
||||
```
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IDENTIFICATION
|
||||
--------------
|
||||
|
||||
PRODUCT CODE: MAINDEC-10-DAKAL-B-D
|
||||
|
||||
PRODUCT NAME: DECSYSTEM10 PDP-10 KA10 BASIC
|
||||
INSTRUCTION DIAGNOSTIC (12)
|
||||
|
||||
FUNCTION: MULTIPY & DIVIDE
|
||||
|
||||
VERSION: 0.2
|
||||
|
||||
DATE RELEASED: JANUARY 1977
|
||||
|
||||
MAINTAINED BY: DIAGNOSTIC ENGINEERING GROUP
|
||||
|
||||
AUTHOR: JOHN R. KIRCHOFF
|
||||
|
||||
COPYRIGHT(C) 1976,1977
|
||||
DIGITAL EQUIPMENT CORPORATION
|
||||
MARLBORO, MASS. 01752
|
||||
|
||||
THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY
|
||||
ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH
|
||||
THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE,
|
||||
OR ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE
|
||||
MADE AVAILABLE TO ANY OTHER PERSON EXECPT FOR USE ON SUCH SYSTEM
|
||||
AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND
|
||||
OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.
|
||||
|
||||
THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
|
||||
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
|
||||
EQUIPMENT CORPORATION.
|
||||
|
||||
DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
|
||||
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 2
|
||||
|
||||
TABLE OF CONTENTS
|
||||
-----------------
|
||||
|
||||
1.0 ABSTRACT
|
||||
|
||||
2.0 REQUIREMENTS
|
||||
|
||||
2.1 EQUIPMENT
|
||||
|
||||
2.2 STORAGE
|
||||
|
||||
2.3 PRELIMINARY PROGRAMS
|
||||
|
||||
3.0 PROGRAM PROCEDURES
|
||||
|
||||
3.1 LOADING PROCEDURE
|
||||
|
||||
3.2 STARTING PROCEDURE
|
||||
|
||||
3.3 OPERATING PROCEDURE
|
||||
|
||||
4.0 DATA SWITCH FUNCTIONS
|
||||
|
||||
5.0 ERRORS
|
||||
|
||||
6.0 ITERATION COUNTER
|
||||
|
||||
7.0 CYCLE TIME
|
||||
|
||||
8.0 OPERATIONAL VARIATIONS
|
||||
|
||||
9.0 MISCELLANEOUS
|
||||
|
||||
10.0 LISTING
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 3
|
||||
|
||||
1.0 ABSTRACT
|
||||
|
||||
THIS PDP-10 KA10 BASIC INSTRUCTION DIAGNOSTIC IS THE
|
||||
TWELVTH IN A SERIES OF PDP-10 KA10 PROCESSOR DIAGNOSTICS.
|
||||
THE DIAGNOSTIC TESTS THE MULTIPY, INTERGER MULIPLY,
|
||||
DIVIDE AND INTERGER DIVIDE INSTRUCTIONS.
|
||||
|
||||
2.0 REQUIREMENTS
|
||||
|
||||
2.1 EQUIPMENT
|
||||
|
||||
A PDP-10 KA10 EQUIPPED WITH A MINIMUM OF 32K OF MEMORY
|
||||
|
||||
PAPER TAPE READER
|
||||
CONSOLE TELETYPE
|
||||
DECTAPE
|
||||
LINE PRINTER (OPTIONAL)
|
||||
|
||||
2.2 STORAGE
|
||||
|
||||
THE PROGRAM RUNS WITHIN 32K OF MEMORY.
|
||||
|
||||
2.3 PRELIMINARY PROGRAMS
|
||||
|
||||
PREVIOUS PROCESSOR DIAGNOSTICS
|
||||
|
||||
3.0 PROGRAM PROCEDURES
|
||||
|
||||
3.1 LOADING PROCEDURE
|
||||
|
||||
THIS DIAGNOSTIC REQUIRES THAT THE DECSYSTEM10 SUBROUTINE
|
||||
PROGRAM BE RESIDENT IN THE PDP-10.
|
||||
|
||||
PAPER TAPE - HARDWARE READ-IN (READER DEVICE CODE 104)
|
||||
DECTAPE - LOAD WITH DIAMON (DECTAPE DEVICE CODE 320)
|
||||
TIME SHARING - RUN UNDER DIAMON.
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 4
|
||||
|
||||
3.2 STARTING PROCEDURE
|
||||
|
||||
A. SELECT OPERATIONAL CONSOLE DATA SWITCH SETTINGS (REFER TO
|
||||
4.0 DATA SWITCH FUNCTIONS).
|
||||
|
||||
B. EXEC MODE
|
||||
|
||||
STAND-ALONE STARTING ADDRESS IS 30000.
|
||||
|
||||
C. USER MODE
|
||||
|
||||
RUN UNDER "DIAMON".
|
||||
IN USER MODE THE FOLLOWING QUESTIONS WILL BE ASKED TO
|
||||
SELECT THE OPERATIONAL SWITCHES:
|
||||
|
||||
TELETYPE SWITCH CONTROL ? 0,S,Y OR N (CR) -
|
||||
|
||||
IF THE OPERATOR TYPES "N", THE ACTUAL CONSOLE
|
||||
SWITCHES ARE USED.
|
||||
|
||||
IF THE OPERATOR TYPES "Y", THE FOLLOWING QUESTIONS
|
||||
ARE ASKED AND THE OPERATOR RESPONDS BY TYPING
|
||||
THE ANSWER AS SIX OCTAL DIGITS REPRESENTING
|
||||
THE DESIRED SWITCH SETTINGS.
|
||||
|
||||
SPECIFY LH SWITCHES IN OCTAL-
|
||||
|
||||
SPECIFY RH SWITCHES IN OCTAL-
|
||||
|
||||
IF THE OPERATOR TYPES "0", ZERO'S ARE USED FOR
|
||||
THE SWITCH SETTINGS.
|
||||
|
||||
IF THE OPERATOR TYPES "S", PREVIOUSLY SET SWITCHES
|
||||
ARE USED. THIS IS ONLY VALID UPON RESTARTING
|
||||
OF AN INTERRUPTED PROGRAM.
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 5
|
||||
|
||||
3.3 OPERATING PROCEDURE
|
||||
|
||||
A. TO THROUGHLY TEST ALL HARDWARE, ALL TEST CONTROL DATA
|
||||
SWITCHES SHOULD BE SET TO 0.
|
||||
|
||||
B. WHEN DEBUGGING HARDWARE, SET SWITCHES TO 0. ALLOW THE
|
||||
TELETYPE TO PRINT THE ERROR MESSAGES. THIS ALLOWS THE
|
||||
PROGRAM TO RUN A COMPLETE PASS AND THEN THE ERROR MESSAGES
|
||||
MAY BE CORRELATED TO QUICKLY DIAGNOSE THE FAILURE. IF A
|
||||
HARDWARE PROBLEM IS SUCH THAT THE ERROR MESSAGES, AFTER THE
|
||||
FIRST ONE, HAVE NO MEANING (FIRST ERROR CAUSES ALL FOLLOWING
|
||||
TESTS TO FAIL) SET THE LOOP ON ERROR SWITCH AND RESTART THE
|
||||
TEST FROM THE BEGINNING. THE FIRST FAILURE WILL THEN CAUSE
|
||||
THE PROGRAM TO ENTER A LOOP SUITABLE FOR SCOPING.
|
||||
|
||||
THE ERROR MESSAGE USED IN CONJUNCTION WITH THE LISTING AND
|
||||
SCOPING IF NECESSARY SHOULD ALLOW THE FAILING CONPONENT
|
||||
TO BE ISOLATED AND REPLACED AND/OR REPAIRED.
|
||||
|
||||
C. WHEN TAKING MARGINS, SET DATA SWITCHES 'NOPNT' AND 'DING'.
|
||||
THIS WILL INHIBIT PRINTOUT BUT WILL ALLOW THE TELETYPE
|
||||
BELL TO BE RUNG WHEN A ERROR OCCURS. IF THE MARGIN OBTAINED
|
||||
IS UNACCEPTABLE, THE OPERATOR MAY REVERT TO STANDARD SWITCH
|
||||
SETTINGS FOR DEBUGGING PURPOSES.
|
||||
|
||||
D. ERROR INFORMATION MAY BE OBTAINED QUICKLY BY PRINTING
|
||||
ERRORS ON THE LINE PRINTER.
|
||||
|
||||
E. IN THE EVENT OF A PRINT ROUTINE FAILURE THE 'NOPNT' SWITCH
|
||||
AND THE 'ERSTOP' SWITCH MAY BE SET TO INHIBIT PRINTOUT
|
||||
BUT HALT THE PROGRAM POINTING TO THE ERROR.
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 6
|
||||
|
||||
4.0 DATA SWITCH FUNCTIONS
|
||||
|
||||
SWITCH STATE FUNCTION
|
||||
------ ----- --------
|
||||
|
||||
0 ABORT 0 NORMAL OPERATION
|
||||
1 ABORT AT END OF PASS
|
||||
|
||||
1 RSTART NOT USED
|
||||
|
||||
2 TOTALS NOT USED
|
||||
|
||||
3 NOPNT 0 NORMAL TYPEOUT
|
||||
1 INHIBIT ALL PRINT/TYPEOUT
|
||||
(EXCEPT FORCED)
|
||||
|
||||
4 PNTLPT 0 NORMAL OUTPUT TO TTY
|
||||
1 PRINT ALL DATA ON LPT
|
||||
(LOGICAL DEVICE, USER MODE)
|
||||
|
||||
5 DING 0 NO FUNCTION
|
||||
1 RING TTY BELL ON ERROR
|
||||
|
||||
6 LOOPER 0 PROCEED TO NEXT TEST
|
||||
1 ENTER SCOPE LOOP ON TEST ERROR
|
||||
|
||||
7 ERSTOP 0 NO FUNCTION
|
||||
1 HALT ON TEST ERROR
|
||||
|
||||
8 PALERS 0 PRINT ONLY FIRST ERROR WHEN LOOPING
|
||||
1 PRINT ALL ERRORS, EVEN IF SAME ERROR
|
||||
|
||||
9 RELIAB NOT USED
|
||||
|
||||
10 TXTINH 0 PRINT FULL ERROR MESSAGES.
|
||||
1 INHIBIT COMMENT PORTION OF
|
||||
ERROR MESSAGES.
|
||||
|
||||
11 INHPAG 0 ALLOW PAGING AND TRAP ENABLE
|
||||
1 INHIBIT PAGING AND TRAPPING
|
||||
|
||||
12 MODDVC NOT USED
|
||||
|
||||
13 INHCSH NOT USED
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 7
|
||||
|
||||
5.0 ERRORS
|
||||
|
||||
ERRORS ARE PRINTED ON THE TTY OR LINE PRINTER. THE ERROR
|
||||
PRINTOUT CONTAINS THE TEST TITLE, THE PC OF THE FAILURE, ERROR
|
||||
NUMBER AND THE CONTENTS OF AN APPLICABLE AC.
|
||||
|
||||
THE PC VALUE IS USEFUL IN RELATING THE FAILURE TO THE LISTING.
|
||||
THE ERROR NUMBER IS PROVIDED SUCH THAT AN ERROR DICTIONARY MAY
|
||||
BE MADE AT SOME FUTURE DATE.
|
||||
|
||||
WHEN THE SCOPE LOOP MODE IS USED THE MI REGISTER WILL COUNT
|
||||
FOR EACH OCCURANCE OF AN ERROR. IF AN AUDIO INDICATION OF
|
||||
A CONTINUING ERROR IS DESIRED THE 'DING' SWITCH MAY BE SET.
|
||||
|
||||
6.0 ITERATION COUNTER
|
||||
|
||||
THE ITERATION COUNT OF THE PROGRAM IS DISPLAYED IN THE MEMORY
|
||||
INDICATORS (MI). THIS COUNT IS A DECREMENTING COUNT AND
|
||||
INITIALLY STARTS AT -1 IN STAND-ALONE OPERATION.
|
||||
|
||||
7.0 CYCLE TIME
|
||||
|
||||
THE CYCLE TIME OF THE PROGRAM IS IN THE MILLISECOND RANGE AND
|
||||
IS THEREFORE SUITABLE FOR TAKING MARGINS, VIBRATION TESTS,
|
||||
ETC.
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 8
|
||||
|
||||
8.0 OPERATIONAL VARIATIONS
|
||||
|
||||
A. DIAGNOSTIC MONITOR
|
||||
|
||||
THE PROGRAM IS USABLE WITH THE DIAGNOSTIC MONITOR TO PROVIDE
|
||||
RELIABILITY TESTS, ACCEPTANCE TESTS, AND/OR TO PROVIDE A
|
||||
QUICK METHOD OF ISOLATION OF A FAULT TO A PARTICULAR AREA
|
||||
OF THE PROCESSOR. CERTAIN PROCEDURES ARE USED WHEN THE
|
||||
PROGRAM IS USED IN THIS MANNER. THEY ARE:
|
||||
|
||||
1. THE DIAGNOSTIC MONITOR TRANSFERS CONTROL TO THE PROGRAM
|
||||
AND STARTS IT AT LOCATION 30002.
|
||||
|
||||
2. MONCTL - LOCATION 30043 IS USED AS THE DIAGNOSTIC MONITOR
|
||||
CONTROL WORD.
|
||||
LH = 0, STAND-ALONE OPERATION
|
||||
-1, RUNNING UNDER DIAGNOSTIC MONITOR
|
||||
|
||||
RH = RIGHT HALF OF CONSOLE SWITCHES IF UNDER
|
||||
DIAGNOSTIC MONITOR CONTROL.
|
||||
|
||||
B. USER MODE
|
||||
|
||||
TO OUTPUT THE PRINTED ERROR MESSAGES TO A USER SPECIFIED
|
||||
DEVICE IN USER MODE, ASSIGN THE DESIRED OUTPUT DEVICE TO
|
||||
DEVICE NAME 'DEV' AND SET SWITCH 'PNTLPT'. THE PHYSICAL
|
||||
DEVICE USED CAN BE ANY DEVICE THAT CAN ACCEPT ASCII OUTPUT
|
||||
FORMAT SUCH AS LPT, DSK, DTA, ETC. THE CORRESPONDING
|
||||
OUTPUT FILE IS 'DAKAL.TMP'
|
||||
|
||||
EXAMPLE DEVICE ASSIGNMENT:
|
||||
|
||||
.ASSIGN DSK DEV
|
||||
|
||||
IN USER MODE THE PROGRAM WILL MAKE 1000(8) PASSES AND THEN
|
||||
RETURN TO DIAMON COMMAND MODE.
|
||||
|
||||
MAINDEC-10-DAKAL.TXT
|
||||
PAGE 9
|
||||
|
||||
8.0 OPERATIONAL VARIATIONS (CON'T)
|
||||
|
||||
THE OUTPUT FILE (IF USED) MAY THEN BE LISTED BY USING THE
|
||||
NORMAL MONITOR COMMANDS (PRINT, LIST, TYPE, PIP, ETC.).
|
||||
|
||||
IF THE PROGRAM IS ABORTED BEFORE COMPLETION (BY ^C, ETC.) THE
|
||||
OUTPUT FILE MAY BE CLOSED BY USING THE MONITOR 'REENTER'
|
||||
COMMAND.
|
||||
|
||||
C. SYSTEM EXERCISER
|
||||
|
||||
START ADDRESS IS 30003. DATA SWITCHES ARE PRESTORED IN
|
||||
'SWTEXR' LOC 30023.
|
||||
|
||||
9.0 MISCELLANEOUS
|
||||
|
||||
THE NON-EX-MEMORY AND PARITY STOP SWITCHES SHOULD BE RESET
|
||||
(0). THESE ERRORS, ILLEGAL UUO'S AND OTHER ERRORS OF THIS
|
||||
TYPE ARE HANDLED BY PRINTOUT ON THE TELETYPE.
|
||||
|
||||
10.0 LISTING
|
||||
```
|
||||
|
||||
DAKAL.HST
|
||||
---------
|
||||
|
||||
THIS IS A HISTORY OF THE DEVELOPMENT OF MAINDEC-10-DAKAL
|
||||
|
||||
************************************************************************
|
||||
|
||||
PRODUCT CODE: MAINDEC-10-DAKAL
|
||||
|
||||
PRODUCT NAME: BASIC INSTRUCTION DIAGNOSTIC #12
|
||||
|
||||
DATE RELEASED: JANUARY 1977
|
||||
|
||||
VERSION: 0.2
|
||||
|
||||
UPDATE AUTHOR: JOHN R. KIRCHOFF
|
||||
|
||||
CHANGES MADE:
|
||||
|
||||
1. UPGRADE TO ALLOW COMPATABILITY WITH THE SUBROUTINE PACKAGE.
|
||||
|
||||
************************************************************************
|
||||
|
||||
ORIGINAL VERSION: 0.1
|
||||
|
||||
ORIGINAL AUTHOR: RICHARD MALISKA
|
||||
|
||||
ORIGINAL RELEASE: 16-MAR-72
|
||||
|
||||
************************************************************************
|
||||
|
||||
DAKAL.MAC
|
||||
---------
|
||||
|
||||
[[Download](DAKAL.MAC.txt)]
|
||||
|
||||
{% highlight text %}
|
||||
{% include_relative DAKAL.MAC.txt %}
|
||||
{% endhighlight %}
|
||||
|
|
@ -1621,16 +1621,17 @@ class DebuggerPDP10 extends Debugger {
|
|||
}
|
||||
|
||||
/**
|
||||
* parseInstruction(sOpcode, sOperands, addr, fQuiet)
|
||||
* parseInstruction(sOpcode, sOperands, addr, fQuiet, fPrelim)
|
||||
*
|
||||
* @this {DebuggerPDP10}
|
||||
* @param {string} sOpcode
|
||||
* @param {string} [sOperands]
|
||||
* @param {number} [addr] of memory where this instruction is being assembled
|
||||
* @param {boolean} [fQuiet]
|
||||
* @param {boolean} [fPrelim] (true if this is a preliminary call and error messages should be suppressed)
|
||||
* @return {number} (opcode, or -1 if unrecognized instruction)
|
||||
*/
|
||||
parseInstruction(sOpcode, sOperands, addr, fQuiet)
|
||||
parseInstruction(sOpcode, sOperands, addr, fQuiet, fPrelim)
|
||||
{
|
||||
var opCode = -1;
|
||||
var opMask, opNum;
|
||||
|
|
@ -1828,7 +1829,7 @@ class DebuggerPDP10 extends Debugger {
|
|||
// }
|
||||
}
|
||||
|
||||
if (opCode < 0 && !fQuiet) {
|
||||
if (opCode < 0 && !fPrelim) {
|
||||
this.println("unknown instruction: " + sOpcode + ' ' + sOperands);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ class Macro10 {
|
|||
* And last but not least, perform all fixups.
|
||||
*/
|
||||
this.aFixups.forEach(function processFixup(sValue, nLocation) {
|
||||
let value = macro10.parseExpression(sValue, undefined, nLocation);
|
||||
let value = macro10.parseExpression(sValue, false, nLocation);
|
||||
if (value === undefined) {
|
||||
macro10.error("unable to parse expression '" + sValue + "'");
|
||||
return;
|
||||
|
|
@ -1021,6 +1021,7 @@ class Macro10 {
|
|||
if (nLocation === undefined) {
|
||||
nLocation = (this.nLocationScope >= 0? this.nLocationScope : this.nLocation);
|
||||
}
|
||||
|
||||
/*
|
||||
* The SIXBIT (and presumably ASCII; not sure about ASCIZ) pseudo-ops can also be used in expressions
|
||||
* (or at least assignments), so we check for those in the given expression and convert them to quoted
|
||||
|
|
@ -1028,13 +1029,22 @@ class Macro10 {
|
|||
*/
|
||||
sExp = sExp.replace(/SIXBIT\s*(\S)(.*?)\1/g, "'$2'").replace(/ASCII\s*(\S)(.*?)\1/g, '"$2"');
|
||||
|
||||
var sOperator = "";
|
||||
var sOperands = sExp;
|
||||
if (match = sExp.match(/^([^\s]+)\s*(.*?)\s*$/)) {
|
||||
sOperator = match[1];
|
||||
sOperands = match[2];
|
||||
/*
|
||||
* If this is NOT a first-pass call, then let's not waste time calling parseInstruction(); not only
|
||||
* may it generate redundant error messages, but it shouldn't be necessary, because we should be down
|
||||
* to fixup expressions.
|
||||
*/
|
||||
result = -1;
|
||||
if (fPass1 !== false) {
|
||||
var sOperator = "";
|
||||
var sOperands = sExp;
|
||||
if (match = sExp.match(/^([^\s]+)\s*(.*?)\s*$/)) {
|
||||
sOperator = match[1];
|
||||
sOperands = match[2];
|
||||
}
|
||||
result = this.dbg.parseInstruction(sOperator, sOperands, nLocation, fPass1, true);
|
||||
}
|
||||
result = this.dbg.parseInstruction(sOperator, sOperands, nLocation, true);
|
||||
|
||||
if (result < 0) {
|
||||
/*
|
||||
* Check for the "period" syntax that MACRO-10 uses to represent the value of the current location.
|
||||
|
|
@ -1047,6 +1057,7 @@ class Macro10 {
|
|||
* is (I think) as the decimal point within a floating-point number, so here we only replace
|
||||
* periods that are not FOLLOWED by a decimal digit.
|
||||
*/
|
||||
if (fPass1 === false) fPass1 = undefined;
|
||||
result = this.dbg.parseExpression(sExp.replace(/\.([^0-9]|$)/g, this.dbg.toStrBase(nLocation, -1) + "$1"), fPass1);
|
||||
if (result === undefined) {
|
||||
this.error("unable to parse expression '" + sExp + "'");
|
||||
|
|
|
|||
|
|
@ -29,28 +29,28 @@
|
|||
*/
|
||||
var m,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var fa=0;function da(a){return"jscomp_symbol_"+(a||"")+fa++}
|
||||
function ga(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(this)}});ga=function(){}}function ha(a){var b=0;return ia(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ia(a){ga();a={next:a};a[ba.Symbol.iterator]=function(){return this};return a}
|
||||
function ja(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}function la(a,b){if(b){var c=ba;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&aa(c,a,{configurable:!0,writable:!0,value:b})}}
|
||||
la("Math.trunc",function(a){return a?a:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||!a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b}});la("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}});
|
||||
var ma={tc:0,Mb:1,vc:2,wc:3,xc:4,yc:5,zc:6,Ac:7,yb:8,Bc:9,Nb:10,Cc:11,Dc:12,Ob:13,Ec:14,Fc:15,Gc:16,Hc:17,Ic:18,Jc:19,Kc:20,Lc:21,Mc:22,Nc:23,Oc:24,Pc:25,Qc:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,xb:65,sc:66,uc:67,Rc:68,E:69,Sc:70,Tc:71,Uc:72,Vc:73,Wc:74,Xc:75,Yc:76,Zc:77,$c:78,ad:79,bd:80,Q:81,cd:82,dd:83,ed:84,fd:85,gd:86,hd:87,
|
||||
function ja(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}function ma(a,b){if(b){var c=ba;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&aa(c,a,{configurable:!0,writable:!0,value:b})}}
|
||||
ma("Math.trunc",function(a){return a?a:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||!a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b}});ma("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}});
|
||||
var na={tc:0,Mb:1,vc:2,wc:3,xc:4,yc:5,zc:6,Ac:7,yb:8,Bc:9,Nb:10,Cc:11,Dc:12,Ob:13,Ec:14,Fc:15,Gc:16,Hc:17,Ic:18,Jc:19,Kc:20,Lc:21,Mc:22,Nc:23,Oc:24,Pc:25,Qc:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,xb:65,sc:66,uc:67,Rc:68,E:69,Sc:70,Tc:71,Uc:72,Vc:73,Wc:74,Xc:75,Yc:76,Zc:77,$c:78,ad:79,bd:80,Q:81,cd:82,dd:83,ed:84,fd:85,gd:86,hd:87,
|
||||
jd:88,kd:89,Qb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ld:97,md:98,nd:99,d:100,e:101,od:102,pd:103,qd:104,rd:105,sd:106,k:107,td:108,ud:109,n:110,vd:111,p:112,q:113,r:114,wd:115,t:116,yd:117,zd:118,Ad:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Pb:127};
|
||||
function na(a,b){var c;if(a){b||(b=10);var d,e,f=0<a.indexOf(",");f&&(a=a.replace(/,/g,""));d=e=a.charAt(0);"#"==e?(b=8,e=""):"$"==e&&(b=16,e="");d!=e?a=a.substr(1):(d=e=a.substr(0,2),"0b"==e&&f||"^B"==e?(b=2,e=""):"0o"==e||"^O"==e?(b=8,e=""):"^D"==e?(b=10,e=""):"0x"==e&&(b=16,e=""),d!=e&&(a=a.substr(2)));d=e=a.slice(-1);"Y"==e||"y"==e?(b=2,e=""):"."==e?(b=10,e=""):"H"==e||"h"==e?(b=16,e=""):"K"==e?e="000":"M"==e?e="000000":"G"==e&&(e="000000000");d!=e&&(a=a.slice(0,-1)+e);var g;d=0;if(e=a.match(/(-?[0-9]+)B([0-9]*)/))a=
|
||||
function oa(a,b){var c;if(a){b||(b=10);var d,e,f=0<a.indexOf(",");f&&(a=a.replace(/,/g,""));d=e=a.charAt(0);"#"==e?(b=8,e=""):"$"==e&&(b=16,e="");d!=e?a=a.substr(1):(d=e=a.substr(0,2),"0b"==e&&f||"^B"==e?(b=2,e=""):"0o"==e||"^O"==e?(b=8,e=""):"^D"==e?(b=10,e=""):"0x"==e&&(b=16,e=""),d!=e&&(a=a.substr(2)));d=e=a.slice(-1);"Y"==e||"y"==e?(b=2,e=""):"."==e?(b=10,e=""):"H"==e||"h"==e?(b=16,e=""):"K"==e?e="000":"M"==e?e="000000":"G"==e&&(e="000000000");d!=e&&(a=a.slice(0,-1)+e);var g;d=0;if(e=a.match(/(-?[0-9]+)B([0-9]*)/))a=
|
||||
e[1],d=35-((e[2]||35)&255);e=a;((f=b)&&10!=f?16==f?e.match(/^-?[0-9a-f]+$/i):8==f?e.match(/^-?[0-7]+$/):2==f&&e.match(/^-?[01]+$/):e.match(/^-?[0-9]+$/))&&!isNaN(g=parseInt(a,b))&&(d&&(0>g&&(g+=Math.pow(2,36)),g=0<d?g*Math.pow(2,d):Math.trunc(g/Math.pow(2,-d))),c=g)}return c}
|
||||
function ta(a,b,c,d,e){e=void 0===e?0:e;var f="";isNaN(a)?a=null:null!=a&&(0>a&&-1<a&&(a=-1),0>a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));for(var g=e||-1;0<c--;){g||(f=","+f,g=e);if(null==a)f="?"+f;else{var h=a%b,h=h+(0<=h&&9>=h?48:55),f=String.fromCharCode(h)+f;a=Math.trunc(a/b)}g--}return(void 0===d?"":d)+f}function ua(a,b,c){b?12<b&&(b=12):(b=Math.abs(a),b=262143>=b?6:16777215>=b?8:12);return ta(a,8,b,c?"0o":"")}
|
||||
function va(a,b){b?11<b&&(b=11):b=99999>=Math.abs(a)?5:11;return ta(a,10,b)}function n(a,b,c){b?9<b&&(b=9):(b=Math.abs(a),b=65535>=b?4:4294967295>=b?8:9);return ta(a,16,b,c?"0x":"")}function wa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0<c&&(b=b.substr(0,c));return b}function xa(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function ya(a,b){return-1!==a.indexOf(b,a.length-b.length)}
|
||||
function za(a){return a.replace(/[&<>"']/g,function(a){return Aa[a]})}function Ba(a,b){return(a+" ").slice(0,b)}function Ca(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"};function Fa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,h;h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}
|
||||
function Ga(){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 Ha(a,b,c,d){c=void 0===c?!1:c;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,
|
||||
function ua(a,b,c,d,e){e=void 0===e?0:e;var f="";isNaN(a)?a=null:null!=a&&(0>a&&-1<a&&(a=-1),0>a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));for(var g=e||-1;0<c--;){g||(f=","+f,g=e);if(null==a)f="?"+f;else{var h=a%b,h=h+(0<=h&&9>=h?48:55),f=String.fromCharCode(h)+f;a=Math.trunc(a/b)}g--}return(void 0===d?"":d)+f}function va(a,b,c){b?12<b&&(b=12):(b=Math.abs(a),b=262143>=b?6:16777215>=b?8:12);return ua(a,8,b,c?"0o":"")}
|
||||
function wa(a,b){b?11<b&&(b=11):b=99999>=Math.abs(a)?5:11;return ua(a,10,b)}function n(a,b,c){b?9<b&&(b=9):(b=Math.abs(a),b=65535>=b?4:4294967295>=b?8:9);return ua(a,16,b,c?"0x":"")}function xa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0<c&&(b=b.substr(0,c));return b}function ya(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function za(a,b){return-1!==a.indexOf(b,a.length-b.length)}
|
||||
function Aa(a){return a.replace(/[&<>"']/g,function(a){return Ba[a]})}function Ca(a,b){return(a+" ").slice(0,b)}function Da(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ga(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,h;h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}
|
||||
function Ha(){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 Ia(a,b,c,d){c=void 0===c?!1:c;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 k="",l;for(l in b)b.hasOwnProperty(l)&&(k&&(k+="&"),k+=l+"="+encodeURIComponent(b[l]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}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 Ia(a,b){var c,d={da:null,Z:null,la:null,ya:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.la=g.load;d.ya=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c<e.length;c++)d.da[f++]=e[c]&255,d.da[f++]=e[c]>>8&255;else if(e=g.longs)for(d.da=Array(4*e.length),f=c=0;c<e.length;c++)d.da[f++]=
|
||||
function Ja(a,b){var c,d={da:null,Z:null,la:null,ya:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.la=g.load;d.ya=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c<e.length;c++)d.da[f++]=e[c]&255,d.da[f++]=e[c]>>8&255;else if(e=g.longs)for(d.da=Array(4*e.length),f=c=0;c<e.length;c++)d.da[f++]=
|
||||
e[c]&255,d.da[f++]=e[c]>>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else(e=g.data)?d.Pa=e:d.da=g;d.da&&(d.da.length?1==d.da.length&&(q(d.da[0]),d=null):(q("Empty resource: "+a),d=null));d.Z=g.symbols}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){q("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.da=e)}return d}
|
||||
function Ja(){return"http://"+(window?window.location.host:"www.pcjs.org")}function Ka(){if(null==La){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}La=a}return La}function Pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}
|
||||
function Qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ra(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)}return!1}
|
||||
function Sa(a){if(!Ta){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}Ta=c}return Ta[a]}function Ua(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
||||
function Va(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}function Wa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Xa(a){Ya.init.push(a)}
|
||||
function Za(a){if($a)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){q(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function ab(a){!$a&&a?($a=!0,bb&&cb("init"),db&&cb("show")):$a=a}function cb(a){Ya[a]&&Za(Ya[a])}var Ta=null,Ya={init:[],show:[],exit:[]},bb=!1,db=!1,$a=!0,La=null;Wa("onload",function(){bb=!0;Za(Ya.init)});Wa("onpageshow",function(){db=!0;Za(Ya.show)});Wa(Ra("Opera")||Ra("iOS")?"onunload":"onbeforeunload",function(){Za(Ya.exit)});
|
||||
function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Eb=b.comment;this.Tb=b;this.exports={};this.J=this.bindings={};a=this.id.indexOf(".");0>a?this.bb=this.id:(this.cb=this.id.substr(0,a),this.bb=this.id.substr(a+1));this.A={ready:!1,Wa:!1,rb:!1,aa:!1,error:!1};this.gb=null;this.A.error=!1;this.ca=c||0;this.D=this.v=this.G=this.H=this.za=null;eb.push(this)}function lb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function nb(){return Date.now()||+new Date}
|
||||
function q(a){window&&window.alert(a)}function ob(a){var b=!1;window&&(b=window.confirm(a));return b}function pb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<eb.length;b++){var d=eb[b];a&&d.id.indexOf(a)||c.push(d)}return c}function qb(a){if(void 0!==a){var b;for(b=0;b<eb.length;b++)if(eb[b].id===a)return eb[b]}return null}
|
||||
function rb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<eb.length;d++)if(c)c==eb[d]&&(c=null);else if(!(a!=eb[d].type||b&&eb[d].id.indexOf(b)))return eb[d]}return null}function t(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){q(c.message+" ("+a+")")}return b}
|
||||
function Ka(){return"http://"+(window?window.location.host:"www.pcjs.org")}function La(){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 Qa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}
|
||||
function Ra(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Sa(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)}return!1}
|
||||
function Ta(a){if(!Ua){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}Ua=c}return Ua[a]}function Va(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
||||
function Wa(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}function Xa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ya(a){Za.init.push(a)}
|
||||
function $a(a){if(ab)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){q(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function bb(a){!ab&&a?(ab=!0,cb&&db("init"),eb&&db("show")):ab=a}function db(a){Za[a]&&$a(Za[a])}var Ua=null,Za={init:[],show:[],exit:[]},cb=!1,eb=!1,ab=!0,Ma=null;Xa("onload",function(){cb=!0;$a(Za.init)});Xa("onpageshow",function(){eb=!0;$a(Za.show)});Xa(Sa("Opera")||Sa("iOS")?"onunload":"onbeforeunload",function(){$a(Za.exit)});
|
||||
function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Eb=b.comment;this.Tb=b;this.exports={};this.J=this.bindings={};a=this.id.indexOf(".");0>a?this.bb=this.id:(this.cb=this.id.substr(0,a),this.bb=this.id.substr(a+1));this.A={ready:!1,Wa:!1,rb:!1,aa:!1,error:!1};this.gb=null;this.A.error=!1;this.ca=c||0;this.D=this.v=this.G=this.H=this.za=null;fb.push(this)}function lb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function nb(){return Date.now()||+new Date}
|
||||
function q(a){window&&window.alert(a)}function ob(a){var b=!1;window&&(b=window.confirm(a));return b}function pb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<fb.length;b++){var d=fb[b];a&&d.id.indexOf(a)||c.push(d)}return c}function qb(a){if(void 0!==a){var b;for(b=0;b<fb.length;b++)if(fb[b].id===a)return fb[b]}return null}
|
||||
function rb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<fb.length;d++)if(c)c==fb[d]&&(c=null);else if(!(a!=fb[d].type||b&&fb[d].id.indexOf(b)))return fb[d]}return null}function t(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){q(c.message+" ("+a+")")}return b}
|
||||
function sb(a,b){var c=v;b=w(b.parentNode,c+"-control");for(var d=0;d<b.length;d++)for(var e=b[d].childNodes,f=0;f<e.length;f++){var g=e[f];if(1===g.nodeType){var h=g.getAttribute("class");if(h)for(var k=h.split(" "),l=0;l<k.length;l++)switch(h=k[l],h){case c+"-binding":(h=t(g))&&h.binding&&a.ta(h.type,h.binding,g,h.value),l=k.length}}}}
|
||||
function w(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||
function tb(a){for(var b=!0,c=ub[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],f=null;0<=vb.indexOf(e)&&(f=function(){return function(){tb(a)}}());var g=wb[e];if(g)if(!f)b=g(d[1],d[2],d[3]);else{if(!g(f,d[1],d[2],d[3]))break}else{var b=!1,h=rb(d[1],a);if(h)if(g=xb[e])b=g(h,d[2],d[3]);else{var k=h.exports;if(k&&(g=k[e]))if(b=!0,!f)b=g.call(h,d[2],d[3]);else if(!g.call(h,f,d[2],d[3]))break}}if(!b){q("Script error: "+e+(g?" failed":" unrecognized"));break}}c&&!c.length&&delete ub[a];return b}m=r.prototype;
|
||||
|
|
@ -59,27 +59,27 @@ m.ta=function(a,b,c){switch(b){case "clear":return this.J[b]||(this.J[b]=c,c.onc
|
|||
m.status=function(a){this.u(this.bb+": "+a)};m.ha=function(a,b,c){c=c||this.type;b||q((c?c+": ":"")+a)};function yb(a,b){a.A.error=!0;a.ha(b)}function zb(a){return a.A.error?(a.u(a.toString()+" error"),!0):!1}function Bb(a,b){b&&(a.A.ready?b():a.gb=b);return a.A.ready}function Mb(a){if(!a.A.error&&(a.A.ready=!0,a.A.ready)){var b=a.gb;a.gb=null;b&&b()}}function Nb(a,b){a.A.Wa&&(b?a.A.rb=!0:void 0===b&&a.u(a.toString()+" busy"));return a.A.Wa}
|
||||
function Ob(a,b){if(a.A.rb)return a.A.Wa=!1,a.A.rb=!1;if(a.A.error)return a.u(a.toString()+" error"),!1;a.A.Wa=b;return a.A.Wa}m.Ba=function(){return this.A.aa=!0};m.sa=function(a,b){b&&(this.A.aa=!1);return!0};function Pb(a,b){if(a.D){a===a.D?b|=0:b=b||a.ca;var c=a.D.ca&b;return!!b&&c===b||!!(c&a.D.Fb)}return!1}function Qb(a,b,c,d){a.D&&(!0===c||Pb(a,c|0))&&a.D.message(b,d)}
|
||||
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
var mb=window?window.PCjs.Machines:{},eb=window?window.PCjs.Components:[],ub=window?window.PCjs.Commands:{},vb=["hold","sleep","wait"],wb={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},xb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
|
||||
var mb=window?window.PCjs.Machines:{},fb=window?window.PCjs.Components:[],ub=window?window.PCjs.Commands:{},vb=["hold","sleep","wait"],wb={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},xb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
|
||||
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
||||
var v="pdp10",Rb="PDPjs",Sb=Math.pow(2,18)-1,Tb=Math.pow(2,18),Ub=Math.pow(2,17)-1,Vb=Math.pow(2,17),x=Math.pow(2,18)-1,y=Math.pow(2,18),z=Math.pow(2,35)-1,A=Math.pow(2,35),B=Math.pow(2,36)-1,C=Math.pow(2,36),E=Math.pow(2,32),Wb=Math.pow(2,34),Xb=Math.pow(2,36),Yb=Math.pow(2,21),Zb=Math.pow(2,26),$b=Math.pow(2,23),ac=Math.pow(2,30),v="pdp10",Rb="PDPjs",bc={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,paper:4096,read:16384,write:32768,serial:1048576,
|
||||
var v="pdp10",Rb="PDPjs",Sb=Math.pow(2,18)-1,Tb=Math.pow(2,18),Ub=Math.pow(2,17)-1,Vb=Math.pow(2,17),x=Math.pow(2,18)-1,y=Math.pow(2,18),z=Math.pow(2,35)-1,B=Math.pow(2,35),C=Math.pow(2,36)-1,D=Math.pow(2,36),E=Math.pow(2,32),Wb=Math.pow(2,34),Xb=Math.pow(2,36),Yb=Math.pow(2,21),Zb=Math.pow(2,26),$b=Math.pow(2,23),ac=Math.pow(2,30),v="pdp10",Rb="PDPjs",bc={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,paper:4096,read:16384,write:32768,serial:1048576,
|
||||
timer:2097152,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};
|
||||
function cc(a,b){r.call(this,"Panel",a,512);this.K=this.L=0;this.V=b;this.i=this.I=this.j=this.w=0;this.M=this.N=-1;this.O=this.R=this.F=!1;this.T=dc;this.C={};this.b={START:[1,1,!0,!1,this.dc],STEP:[1,1,!1,!1,this.ec],ENABLE:[1,1,!1,!1,this.Zb],CONT:[1,1,!0,!1,this.Xb],DEP:[0,0,!0,!1,this.Yb],EXAM:[1,1,!0,!1,this.$b],LOAD:[1,1,!0,!1,this.bc],TEST:[0,0,!0,!1,this.ac]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.cc,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ub,toggle:this.nc,reset:this.jc,
|
||||
set:this.mc};Mb(this)}ja(cc,r);m=cc.prototype;m.reset=function(a){this.stop();a&&ec(this,this.w=0)};
|
||||
m.ta=function(a,b,c,d){if(this.H&&this.H.ta(a,b,c,d)||this.v&&this.v.ta(a,b,c,d)||this.D&&this.D.ta(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){fc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){gc(a,b)}}(this,b),a.ontouchstart=
|
||||
function(a,b){return function(c){fc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){gc(a,b)}}(this,b),!0):r.prototype.ta.call(this,a,b,c,d)}};m.Ma=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;hc(this);ic(this)};m.Ba=function(a,b){if(!b)if(this.V&&jc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};m.sa=function(a){return a?this.save():!0};m.save=function(){var a=new F(this);a.set(0,[this.i,this.w,this.j]);return a.data()};
|
||||
m.restore=function(a){if(a=a[0])kc(this,this.i=a[0]),ec(this,this.w=a[1]),lc(this,a[2]);return!0};m.jc=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}ic(this);return!0};function mc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function hc(a,b){for(var c in a.C)mc(a,c,null!=b?b:a.C[c])}function nc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ic(a){for(var b in a.b)nc(a,b,a.b[b][1])}
|
||||
m.Ub=function(a,b,c){if(fc(this,b)){if(c){var d=this;setTimeout(function(){gc(d,b);a&&a()},+c);return!1}gc(this,b)}return!0};m.mc=function(a,b){if("SR"==a)return lc(this,na(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,nc(this,a,c[1]),!0):!1};m.nc=function(a){return fc(this,a)?(gc(this,a),!0):!1};function fc(a,b){var c=a.b[b];return c?(nc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=oc&&(a.O=b==pc,a.R=b==qc),!0):!1}
|
||||
m.Ub=function(a,b,c){if(fc(this,b)){if(c){var d=this;setTimeout(function(){gc(d,b);a&&a()},+c);return!1}gc(this,b)}return!0};m.mc=function(a,b){if("SR"==a)return lc(this,oa(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,nc(this,a,c[1]),!0):!1};m.nc=function(a){return fc(this,a)?(gc(this,a),!0):!1};function fc(a,b){var c=a.b[b];return c?(nc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=oc&&(a.O=b==pc,a.R=b==qc),!0):!1}
|
||||
function gc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(nc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}m.dc=function(a){a||this.v.A.P||(H(this.v,this.i),this.b[rc]&&this.b[rc][1]&&sc(this.v))};m.ec=function(){};m.Zb=function(a){a||this.v.Y()};
|
||||
m.Xb=function(a){if(!a&&!this.v.A.P)if(this.b[rc]&&this.b[rc][1])sc(this.v);else{if((a=this.D)&&!Nb(a,!0))Ob(a,!0),tc(a,0,null),Ob(a,!1);else try{var b=this.v.$a(1);0<b&&(uc(this.v,b),vc(this.v,b,!0),wc(this.v,b))}catch(c){"number"!=typeof c&&yb(this.v,c.stack||c.message)}this.stop();this.H&&J(this.H)}};m.Yb=function(a){a&&!this.v.A.P&&(this.O&&xc(this),a=ec(this,this.w=this.j),this.T==dc?yc(this.G,this.i,a):this.v.g(this.i,a))};
|
||||
m.$b=function(a){if(!a&&!this.v.A.P){var b;this.R&&xc(this);this.T==dc?b=zc(this.G,this.i):b=this.v.f(this.i);ec(this,this.w=b)}};m.bc=function(a){a||this.v.A.P||kc(this,this.j)};m.ac=function(a){a?(this.F=!0,hc(this,!0)):(this.F=!1,hc(this),lc(this,0))};m.cc=function(a,b){this.j=a?this.j|1<<b:this.j&~(1<<b)};function xc(a){var b=1,c=a.G.j;a.b[oc]&&a.b[oc][1]||(b=-b);kc(a,a.i&~c|a.i+b&c)}
|
||||
function kc(a,b){a.i=b&a.G.j;if(a.M!==a.i){a.M=a.i;b=a.M;for(var c=0;22>c;c++){var d=a,e="A"+c,f=b&1<<c;d.C[e]=f;d.F||mc(d,e,f)}}}function ec(a,b){a.I=b%C;if(a.N!==a.I){a.N=a.I;b=a.N;for(var c=0;16>c;c++){var d=a,e="D"+c,f=b&1<<c;d.C[e]=f;d.F||mc(d,e,f)}}return a.I}function lc(a,b){a.j=b|0;for(b=0;22>b;b++)a.b["S"+b][1]=a.j&1<<b?1:0;ic(a);return!0}m.stop=function(){kc(this,this.v.i)};
|
||||
function jc(){for(var a=w(document,v,"panel"),b=0;b<a.length;b++){var c=a[b],d=t(c),e=qb(d.id);e||(e=new cc(d,!0));sb(e,c)}}var dc=7,pc="DEP",rc="ENABLE",qc="EXAM",oc="STEP";Xa(jc);function Ac(a,b,c){r.call(this,"Bus",a,16);this.v=b;this.D=c;this.F=+a.busWidth||18;this.I=1<<this.F;this.j=this.I-1;this.i=Math.log2(16384);this.C=this.I/16384|0;this.w=0;this.b=[];a=new Bc(this);Cc(a,this.D);this.b=Array(this.C);for(b=0;b<this.C;b++)this.b[b]=a;Mb(this)}ja(Ac,r);m=Ac.prototype;m.reset=function(){};
|
||||
function kc(a,b){a.i=b&a.G.j;if(a.M!==a.i){a.M=a.i;b=a.M;for(var c=0;22>c;c++){var d=a,e="A"+c,f=b&1<<c;d.C[e]=f;d.F||mc(d,e,f)}}}function ec(a,b){a.I=b%D;if(a.N!==a.I){a.N=a.I;b=a.N;for(var c=0;16>c;c++){var d=a,e="D"+c,f=b&1<<c;d.C[e]=f;d.F||mc(d,e,f)}}return a.I}function lc(a,b){a.j=b|0;for(b=0;22>b;b++)a.b["S"+b][1]=a.j&1<<b?1:0;ic(a);return!0}m.stop=function(){kc(this,this.v.i)};
|
||||
function jc(){for(var a=w(document,v,"panel"),b=0;b<a.length;b++){var c=a[b],d=t(c),e=qb(d.id);e||(e=new cc(d,!0));sb(e,c)}}var dc=7,pc="DEP",rc="ENABLE",qc="EXAM",oc="STEP";Ya(jc);function Ac(a,b,c){r.call(this,"Bus",a,16);this.v=b;this.D=c;this.F=+a.busWidth||18;this.I=1<<this.F;this.j=this.I-1;this.i=Math.log2(16384);this.C=this.I/16384|0;this.w=0;this.b=[];a=new Bc(this);Cc(a,this.D);this.b=Array(this.C);for(b=0;b<this.C;b++)this.b[b]=a;Mb(this)}ja(Ac,r);m=Ac.prototype;m.reset=function(){};
|
||||
m.Ba=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};m.sa=function(a){return a?this.save():!0};m.save=function(){var a=new F(this);a.set(0,Dc(this));return a.data()};m.restore=function(a){a:{a=a[0];var b;for(b=0;b<a.length-1;b+=2){var c=a[b],d=a[b+1];if(d&&4096>d.length){for(var e=0,f=Array(4096),g=0;g<d.length-1;)for(var h=d[g++],k=d[g++];h--;)f[e++]=k;d=f}e=this.b[c];if(!e||!e.restore(d)){q("Unable to restore memory block "+c);a=!1;break a}}a=!0}return a};
|
||||
function Ec(a,b,c,d){for(var e=b,f=c,g=e>>>a.i;0<f&&g<a.b.length;){var h=a.b[g],k=16384*g,l=16384-(e-k);l>f&&(l=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Ya+=h.B-e,h.B=e,!0;if(e>=h.B+h.Ya){l=h.size-(e-k);l>f&&(l=f);h.Ya=e-h.B+l;e=k+16384;f-=l;g++;continue}}return Fc(Gc,e,f)}e=new Bc(a,e,l,16384,d);Cc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=l}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Hc[d]+" at "+ua(b)),!0):Fc(Lc,b,c)}
|
||||
function Ec(a,b,c,d){for(var e=b,f=c,g=e>>>a.i;0<f&&g<a.b.length;){var h=a.b[g],k=16384*g,l=16384-(e-k);l>f&&(l=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Ya+=h.B-e,h.B=e,!0;if(e>=h.B+h.Ya){l=h.size-(e-k);l>f&&(l=f);h.Ya=e-h.B+l;e=k+16384;f-=l;g++;continue}}return Fc(Gc,e,f)}e=new Bc(a,e,l,16384,d);Cc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=l}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Hc[d]+" at "+va(b)),!0):Fc(Lc,b,c)}
|
||||
function zc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.w(b&16383,b);a.w--;return b}function yc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.D(c,b&16383,b);a.w--}function Dc(a){for(var b=0,c=[],d=0;d<a.C;d++){var e=a.b[d];if(e.tb||e.Sb){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,k=[];g<e.length;){for(var l=e[g],p=g+1;p<e.length&&e[p]===l;)p++;k[h++]=p-g;k[h++]=l;g=p}k.length<e.length&&(e=k)}c[f]=e}}return c}
|
||||
m.Jb=function(a){if(!this.w)throw this.D&&Pb(this.D,4)&&Qb(this.D,"memory fault on "+K(this.D,a),!0,!0),this.v.Y(),-1;};function Fc(a,b,c){q("Memory block error ("+a+": "+n(b)+","+n(c)+")");return!1}var Gc=1,Lc=2;function Mc(a){r.call(this,"Device",a,256)}ja(Mc,r);m=Mc.prototype;m.Ma=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.D=d;Mb(this)};m.Ba=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};m.sa=function(a){return a?this.save():!0};m.reset=function(){};
|
||||
m.save=function(){return(new F(this)).data()};m.restore=function(){return!0};Xa(function(){for(var a=w(document,v,"device"),b=0;b<a.length;b++){var c,d=a[b];c=t(d);switch(c.type){case "default":c=new Mc(c),sb(c,d)}}});
|
||||
m.save=function(){return(new F(this)).data()};m.restore=function(){return!0};Ya(function(){for(var a=w(document,v,"device"),b=0;b<a.length;b++){var c,d=a[b];c=t(d);switch(c.type){case "default":c=new Mc(c),sb(c,d)}}});
|
||||
function Bc(a,b,c,d,e){this.H=a;this.id=Nc+=2;this.B=b;this.Ya=c;this.size=d||0;this.type=e||Oc;this.G=e==Pc;this.b=null;this.f=this.w=this.wb;this.g=this.D=this.Za;this.i=this.v=0;Cc(this);this.tb=this.Sb=!1;if(this.size){a=this.j=Array(this.size);for(b=0;b<a.length;b++)a[b]=0;Qc(this,Rc)}else Qc(this)}m=Bc.prototype;m.save=function(){return this.j};m.restore=function(a){return a&&this.size==a.length?(this.j=a,this.tb=!0):!1};function Qc(a,b){b||(b=Sc);Tc(a,b,void 0);Uc(a,b,void 0)}
|
||||
function Tc(a,b,c){c&&a.i||(a.f=b[0]||a.wb);if(c||void 0===c)a.w=b[0]||a.wb}function Uc(a,b,c){c&&a.v||(a.g=!a.G&&b[1]||a.Za);if(c||void 0===c)a.D=b[1]||a.Za}m.Ra=function(a,b){b?this.v++||Uc(this,Vc,!1):this.i++||Tc(this,Vc,!1)};function Wc(a,b){b?--a.v||(a.g=a.G?a.Za:a.D):--a.i||(a.f=a.w)}function Cc(a,b,c){a.b=b;a.i=a.v=0;c&&((a.i=c.i)&&Tc(a,Vc,!1),(a.v=c.v)&&Uc(a,Vc,!1))}m.wb=function(a,b){this.b&&Pb(this.b,32)&&Qb(this.b,"attempt to read invalid address "+K(this.b,b),!0);this.H.Jb(b);return-1};
|
||||
m.Za=function(a,b,c){this.b&&Pb(this.b,32)&&Qb(this.b,"attempt to write "+K(this.b,a)+" to invalid addresses "+K(this.b,c),!0);this.H.Jb(c)};m.hc=function(a){return this.j[a]};m.qc=function(a,b){this.j[b]!=a&&(this.j[b]=a,this.tb=!0)};m.fc=function(a,b){if(this.b&&null!=this.B){var c=this.b;Xc(c,this.B+a,2,c.N)&&c.Y(!1)}return this.w(a,b)};m.pc=function(a,b,c){if(this.b&&null!=this.B){var d=this.b;Xc(d,this.B+b,2,d.K)&&d.Y(!1)}this.G?this.Za(a,0,c):this.D(a,b,c)};
|
||||
|
|
@ -102,32 +102,32 @@ m.restore=function(a){var b;b=a[0];ga();ca();ga();var c=b[Symbol.iterator];b=c?c
|
|||
if(e.oc===b[c]){d=e;break a}}d=null}d&&(d.next=this.Da,this.Da=d)}a=a[4];for(b=0;b<this.R.length&&b<a.length;b++)this.R[b][0]=a[b];return!0};function rd(a,b){a.j=a.j&-254049|b&254048;a.j|=b&4096;b&2048?a.j&4096||(a.j|=2048):a.j&=-2049}function sd(a,b){var c=a.i;a.i=(c+b)%Tb;return c}function H(a,b){a.i=b%Tb;a.O=-1}function qd(a){var b=[];for(a=a.Da;a;)b.push(a.oc),a=a.next;return b}m.gc=function(a){var b=this.G;a=this.Ca=a;return b.b[(a&b.j)>>>b.i].f(a&16383,a)};
|
||||
m.rc=function(a,b){var c=this.G;a=this.Ca=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b};
|
||||
m.$a=function(a){this.A.complete=!0;var b=this.D?td(this.D)?1:this.A.jb?-1:0:0,c=a?this.A.jb?0:1:-1;this.A.jb=!1;this.V=this.N=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(ud(this.D,this.i,c)){this.Y();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.Da||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&ud(this.D,this.i,c)){this.Y();break}if(0>c)break}}this.C&=15;this.I&4194304?this.I=this.Ka=this.f(this.b):0<=this.O?(this.I=this.La=this.f(this.O),this.O=-1):(this.I=this.La=
|
||||
this.f(this.Ea=this.i),this.i=(this.i+1)%Tb);this.I&=8388607;this.b=this.I&262143;if(a=this.I>>18&15)this.b=this.b+(this.Ka=this.f(a))&Sb;a=this.I&4194304?-1:this.La/$b|0;0<=a&&this.Rb(a);this.N--}while(0<this.N);return this.A.complete?this.V-this.N:!1===this.A.complete?-1:0};Xa(function(){for(var a=w(document,v,"cpu"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new od(d);sb(d,c)}});function pd(a){vd[a>>4].call(this,a,a&15)}function N(a){this.w(a)}
|
||||
function wd(){var a=0,b=this.f(this.b),c=b/ac&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*ac+(d<<24)+(b&16777215);a&&(b=(b+a)%C);this.g(this.b,b)}function xd(a,b){a=this.f(this.b);if(0>this.K)this.K=a,this.I=this.b|4194304;else{var c=this.K/ac&63,d=this.K>>24&63;a=32>=c+d?(a>>c&(1<<d)-1)>>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.j&=-8193;this.K=-1}}
|
||||
function yd(a,b){a=this.f(this.b);if(0>this.K)this.K=a,this.I=this.b|4194304;else{var c=this.K/ac&63,d=this.K>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%C;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.j&=-8193;this.K=-1}}function zd(a,b){this.g(b,this.f(this.b))}function Ad(a,b){this.g(b,this.b)}function Bd(a,b){this.g(this.b,this.f(b))}function Cd(a,b){this.g(b,0)}function Dd(a,b){this.g(b,B-this.f(b))}function Ed(a,b){this.g(b,B)}
|
||||
this.f(this.Ea=this.i),this.i=(this.i+1)%Tb);this.I&=8388607;this.b=this.I&262143;if(a=this.I>>18&15)this.b=this.b+(this.Ka=this.f(a))&Sb;a=this.I&4194304?-1:this.La/$b|0;0<=a&&this.Rb(a);this.N--}while(0<this.N);return this.A.complete?this.V-this.N:!1===this.A.complete?-1:0};Ya(function(){for(var a=w(document,v,"cpu"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new od(d);sb(d,c)}});function pd(a){vd[a>>4].call(this,a,a&15)}function O(a){this.w(a)}
|
||||
function wd(){var a=0,b=this.f(this.b),c=b/ac&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*ac+(d<<24)+(b&16777215);a&&(b=(b+a)%D);this.g(this.b,b)}function xd(a,b){a=this.f(this.b);if(0>this.K)this.K=a,this.I=this.b|4194304;else{var c=this.K/ac&63,d=this.K>>24&63;a=32>=c+d?(a>>c&(1<<d)-1)>>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.j&=-8193;this.K=-1}}
|
||||
function yd(a,b){a=this.f(this.b);if(0>this.K)this.K=a,this.I=this.b|4194304;else{var c=this.K/ac&63,d=this.K>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%D;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.j&=-8193;this.K=-1}}function zd(a,b){this.g(b,this.f(this.b))}function Ad(a,b){this.g(b,this.b)}function Bd(a,b){this.g(this.b,this.f(b))}function Cd(a,b){this.g(b,0)}function Dd(a,b){this.g(b,C-this.f(b))}function Ed(a,b){this.g(b,C)}
|
||||
function Fd(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Gd(a,d,c)+(c-(c&x)))}function Hd(a,b){var c=this.f(b);this.g(b,Gd(a,c,0))}function Id(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Gd(a,c,b)+(b-(b&x)))}function Jd(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&x,a){case 256:d+=x;break;case 384:d+=c>z?x:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function Kd(a,b){var c=(this.f(this.b)&x)*y,d=this.f(b);this.g(b,Gd(a,d,c)+c)}
|
||||
function be(a,b){var c=this.b*y,d=this.f(b);this.g(b,Gd(a,d,c)+c)}function ce(a,b){b=(this.f(b)&x)*y;var c=this.f(this.b);this.g(this.b,Gd(a,c,b)+b)}function de(a,b){var c=this.f(this.b),d=(c&x)*y,c=Gd(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function ee(a,b){var c=this.f(this.b)&x,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ge(a,b){var c=this.f(b);this.g(b,fe(a,c,this.b)+this.b)}function he(a,b){b=this.f(b)&x;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)}
|
||||
function ie(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=x,a){case 256:d+=x*y;break;case 384:d+=c>Ub?x*y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function je(a,b){var c=this.f(this.b)/y|0,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ke(a,b){var c=this.f(b);this.g(b,fe(a,c,0))}function le(a,b){b=this.f(b)/y|0;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)}function me(a,b){var c=this.f(this.b),d=c/y|0,c=fe(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function O(a){ne[a&7].call(this,a,a>>3&127)}
|
||||
function oe(){}function pe(){}function L(a){this.u("undefined opcode: "+ua(a));sd(this,-1);this.Y()}function qe(a){a>z&&(a!=A?a=Xb-a:this.j|=163840);return a}function Q(a,b){var c=(a+b)%C;re.call(this,a,b,c);return c}
|
||||
function se(a,b,c){var d=!1,e=!1,f=b-b%A;a=a%A+b*A%C;b=this.F=f+Math.trunc(b/2);c>z&&(c=C-c,d=!d);b>z&&(a?(b=B-b,a=C-a):b&&(b=C-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.kb;f[0]=0;f[1]=0;f=this.wa;f[0]=1;f[1]=0;f=this.oa;f[0]=c;f[1]=0;c=this.xa;c[0]=a;for(c[1]=b;0<te(this.xa,this.oa);)ue(this.oa,this.oa),ue(this.wa,this.wa);do{if(0<=te(this.xa,this.oa)&&(b=this.xa,a=this.oa,b[0]-=a[0],b[1]-=a[1],0>b[0]&&(b[0]+=C,b[1]--),ue(this.kb,this.wa),ve(this.xa)))break;we(this.oa);we(this.wa)}while(!ve(this.wa));
|
||||
a=this.kb[0];this.F=this.xa[0];d&&a&&(a=C-a);e&&this.F&&(this.F=C-this.F);return a}
|
||||
function xe(a,b,c){var d=a,e=b;b=!1;var f;d>z&&(1001!=this.nb||d!=A)&&(d=C-d,b=!b);e>z&&(e=C-e,b=!b);if(d<y&&e<y)a=d*e,f=0;else{a=d&x;d=Math.trunc(d/y);f=e&x;var e=Math.trunc(e/y),g=a*f,h=d*f+Math.trunc(g/y);f=Math.trunc(h/y);h=(h&x)+a*e;a=(h*y+(g&x))%C;f+=Math.trunc(h/y)+d*e}b&&(a?(f=B-f,a=C-a):f&&(f=C-f));if(c)return(f||a>z)&&(f!=B||a<=z)&&(this.j|=131072),a;c=a;b=f;a=b-b%A;b=2*b%C+Math.trunc(c/A);c=a+c%A;d=b-b%A;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b}
|
||||
function ye(a){a?a==A?this.j|=163840:a=Xb-a:this.j|=98304;return a}function ze(a,b){var c=a-b;0>c&&(c+=C);re.call(this,c,b,a);return c}function re(a,b,c){a=Math.trunc(a/Wb);b=Math.trunc(b/Wb);c=Math.trunc(c/Wb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function R(a,b){return((a/E|0)&(b/E|0))*E+((a&b)>>>0)}function S(a,b){return R(a,(~(b/E|0)&15)*E+(~b>>>0))}function T(a,b){return(a<A?a:a-C)-(b<A?b:b-C)}
|
||||
function Ae(a,b){return(~((a/E|0)^(b/E|0))&15)*E+(~(a^b)>>>0)}function U(a,b){return(a/E|0|b/E|0)*E+((a|b)>>>0)}function V(a){return a<A?a:a-C}function W(a,b){return((a/E|0)^(b/E|0))*E+((a^b)>>>0)}function X(a){return(a/y|0)+(a&x)*y}function fe(a,b,c){switch(a&384){case 0:b-=b&x;break;case 128:b=0;break;case 256:b=x*y;break;case 384:b=c>Ub?x*y:0}return b}function Gd(a,b,c){switch(a&384){case 0:b&=x;break;case 128:b=0;break;case 256:b=x;break;case 384:b=c>z?x:0}return b}
|
||||
function ue(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=C&&(a[0]%=C,a[1]++)}function te(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function we(a){a[1]%2&&(a[0]+=C);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ve(a){return!a[0]&&!a[1]}
|
||||
var vd=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},wd,function(a,b){this.j&8192||(wd.call(this),this.j|=8192);xd.call(this,0,b)},xd,function(a,b){this.j&8192||(wd.call(this),this.j|=8192);yd.call(this,0,b)},yd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},
|
||||
function ie(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=x,a){case 256:d+=x*y;break;case 384:d+=c>Ub?x*y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function je(a,b){var c=this.f(this.b)/y|0,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ke(a,b){var c=this.f(b);this.g(b,fe(a,c,0))}function le(a,b){b=this.f(b)/y|0;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)}function me(a,b){var c=this.f(this.b),d=c/y|0,c=fe(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function P(a){ne[a&7].call(this,a,a>>3&127)}
|
||||
function oe(){}function pe(){}function L(a){this.u("undefined opcode: "+va(a));sd(this,-1);this.Y()}function qe(a){a>z&&(a!=B?a=Xb-a:this.j|=163840);return a}function Q(a,b){var c=(a+b)%D;re.call(this,a,b,c);return c}
|
||||
function se(a,b,c){var d=!1,e=!1,f=b-b%B;a=a%B+b*B%D;b=this.F=f+Math.trunc(b/2);c>z&&(c=D-c,d=!d);b>z&&(a?(b=C-b,a=D-a):b&&(b=D-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.kb;f[0]=0;f[1]=0;f=this.wa;f[0]=1;f[1]=0;f=this.oa;f[0]=c;f[1]=0;c=this.xa;c[0]=a;for(c[1]=b;0<te(this.xa,this.oa);)ue(this.oa,this.oa),ue(this.wa,this.wa);do{if(0<=te(this.xa,this.oa)&&(b=this.xa,a=this.oa,b[0]-=a[0],b[1]-=a[1],0>b[0]&&(b[0]+=D,b[1]--),ue(this.kb,this.wa),ve(this.xa)))break;we(this.oa);we(this.wa)}while(!ve(this.wa));
|
||||
a=this.kb[0];this.F=this.xa[0];d&&a&&(a=D-a);e&&this.F&&(this.F=D-this.F);return a}
|
||||
function xe(a,b,c){var d=a,e=b;b=!1;var f;d>z&&(1001!=this.nb||d!=B)&&(d=D-d,b=!b);e>z&&(e=D-e,b=!b);if(d<y&&e<y)a=d*e,f=0;else{a=d&x;d=Math.trunc(d/y);f=e&x;var e=Math.trunc(e/y),g=a*f,h=d*f+Math.trunc(g/y);f=Math.trunc(h/y);h=(h&x)+a*e;a=(h*y+(g&x))%D;f+=Math.trunc(h/y)+d*e}b&&(a?(f=C-f,a=D-a):f&&(f=D-f));if(c)return(f||a>z)&&(f!=C||a<=z)&&(this.j|=131072),a;c=a;b=f;a=b-b%B;b=2*b%D+Math.trunc(c/B);c=a+c%B;d=b-b%B;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b}
|
||||
function ye(a){a?a==B?this.j|=163840:a=Xb-a:this.j|=98304;return a}function ze(a,b){var c=a-b;0>c&&(c+=D);re.call(this,c,b,a);return c}function re(a,b,c){a=Math.trunc(a/Wb);b=Math.trunc(b/Wb);c=Math.trunc(c/Wb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function R(a,b){return((a/E|0)&(b/E|0))*E+((a&b)>>>0)}function S(a,b){return R(a,(~(b/E|0)&15)*E+(~b>>>0))}function T(a,b){return(a<B?a:a-D)-(b<B?b:b-D)}
|
||||
function Ae(a,b){return(~((a/E|0)^(b/E|0))&15)*E+(~(a^b)>>>0)}function U(a,b){return(a/E|0|b/E|0)*E+((a|b)>>>0)}function V(a){return a<B?a:a-D}function W(a,b){return((a/E|0)^(b/E|0))*E+((a^b)>>>0)}function X(a){return(a/y|0)+(a&x)*y}function fe(a,b,c){switch(a&384){case 0:b-=b&x;break;case 128:b=0;break;case 256:b=x*y;break;case 384:b=c>Ub?x*y:0}return b}function Gd(a,b,c){switch(a&384){case 0:b&=x;break;case 128:b=0;break;case 256:b=x;break;case 384:b=c>z?x:0}return b}
|
||||
function ue(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=D&&(a[0]%=D,a[1]++)}function te(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function we(a){a[1]%2&&(a[0]+=D);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ve(a){return!a[0]&&!a[1]}
|
||||
var vd=[O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},wd,function(a,b){this.j&8192||(wd.call(this),this.j|=8192);xd.call(this,0,b)},xd,function(a,b){this.j&8192||(wd.call(this),this.j|=8192);yd.call(this,0,b)},yd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},
|
||||
function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},
|
||||
function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},zd,Ad,Bd,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/y|0)+(a&x)*y;this.g(b,a)},function(a,b){this.g(b,this.b*y)},function(a,b){a=this.f(b);a=(a/y|0)+(a&x)*y;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/y|0)+(a&x)*y;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,ye.call(this,this.f(this.b)))},function(a,b){this.g(b,
|
||||
ye.call(this,this.b))},function(a,b){this.g(this.b,ye.call(this,this.f(b)))},function(a,b){a=ye.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,qe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,qe.call(this,this.f(b)))},function(a,b){a=qe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,xe.call(this,this.f(b),this.b,!0))},function(a,
|
||||
b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,xe.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=se.call(this,
|
||||
this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,
|
||||
c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);b=this.f(b+1&15);b=se.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){if(a=(this.b&Vb)<<14>>23|this.b&255){var c,d,e=this.f(b);0<a?(d=z,c=e<A?0:A,35>a&&(c+=e*Math.pow(2,a)%A,d=A-Math.pow(2,35-a)),e<A?e+d>z&&(this.j|=131072):e-d<A&&(this.j|=131072)):-35>=a?c=e<A?0:
|
||||
z:(c=Math.trunc(e/Math.pow(2,-a)),e>z&&(d=C-Math.pow(2,36+a),c+=d));this.g(b,c)}},function(a,b){if(a=((this.b&Vb)<<14>>23|this.b&255)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%C+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b&Vb)<<14>>23|this.b&255){var c=this.f(b),c=0<a?36<=a?0:c*Math.pow(2,a)%C:-36>=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c<A;)a++,c*=2;H(this,this.b)}this.g(b+1&15,a)},function(a,b){if(a=(this.b&
|
||||
Vb)<<14>>23|this.b&255){var c,d=this.f(b),e=this.f(b+1&15);if(0<a){var f=d;if(36<=a){if(0<d&&d<A||d>z&&d<B)this.j|=131072;if(71<=a){if(0<e&&e<A||e>z&&e<B)this.j|=131072;d=0}else d=e*Math.pow(2,a-35)%A,c=A-Math.pow(2,70-a),f<=z?e+c>z&&(this.j|=131072):e-c<=z&&(this.j|=131072);e=0;f>z&&(d+=A,e+=A)}else d=d*Math.pow(2,a)%A+Math.trunc(e%A/Math.pow(2,35-a)),e=e*Math.pow(2,a)%A,c=A-Math.pow(2,35-a),f<=z?f+c>z&&(this.j|=131072):(f-c<=z&&(this.j|=131072),d+=A,e+=A)}else-36>=a?(e=-72>=a?d>z?B:0:Math.trunc(d%
|
||||
A/Math.pow(2,-a-35)),d<=z?d=0:(d=B,e+=A)):(c=d>z?C-Math.pow(2,36+a):0,e=Math.trunc(e%A/Math.pow(2,-a))+d%A*Math.pow(2,35+a)%A,d=Math.trunc(d/Math.pow(2,-a))+c,d>z&&(e+=A));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=((this.b&Vb)<<14>>23|this.b&255)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%C+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%C+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%C+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%C+Math.trunc(d/
|
||||
Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b&Vb)<<14>>23|this.b&255){var c=this.f(b),d=this.f(b+1&15);0<a?36<=a?(c=72<=a?0:d*Math.pow(2,a-36)%C,d=0):(c=c*Math.pow(2,a)%C+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%C):-36>=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%C,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},L,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,
|
||||
b){a=!1;for(var c=this.f(b),d=c/y|0,c=c&x;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&x,c=c+1&x,this.A.P||(this.g(b,d*y+c),a||sd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%C;this.g(b,a);a<A&&H(this,this.b)},function(a,b){a=(this.f(b)+262145)%C;this.g(b,a);a>=A&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);b&2&&rd(this,this.Ka/y|0);b&4&&this.Y();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.O=this.b},L,function(a,b){a=(this.f(b)+
|
||||
262145)%C;this.g(b,a);a/y|0||(this.j|=262144);this.g(a&Sb,(this.j&x)*y+this.i);this.j&=-8193;H(this,this.b)},function(a,b){a=this.f(b);a+=262145;this.g(a&Sb,this.f(this.b));a>=C&&(a-=C);a/y|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&Sb);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=C);(a/y|0)==x&&(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&Sb);a-=262145;0>a&&(a+=C);(a/y|0)==x&&(this.j|=262144);this.g(b,a);H(this,c&Sb)},function(){this.g(this.b,
|
||||
c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);b=this.f(b+1&15);b=se.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){if(a=(this.b&Vb)<<14>>23|this.b&255){var c,d,e=this.f(b);0<a?(d=z,c=e<B?0:B,35>a&&(c+=e*Math.pow(2,a)%B,d=B-Math.pow(2,35-a)),e<B?e+d>z&&(this.j|=131072):e-d<B&&(this.j|=131072)):-35>=a?c=e<B?0:
|
||||
z:(c=Math.trunc(e/Math.pow(2,-a)),e>z&&(d=D-Math.pow(2,36+a),c+=d));this.g(b,c)}},function(a,b){if(a=((this.b&Vb)<<14>>23|this.b&255)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%D+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b&Vb)<<14>>23|this.b&255){var c=this.f(b),c=0<a?36<=a?0:c*Math.pow(2,a)%D:-36>=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c<B;)a++,c*=2;H(this,this.b)}this.g(b+1&15,a)},function(a,b){if(a=(this.b&
|
||||
Vb)<<14>>23|this.b&255){var c,d=this.f(b),e=this.f(b+1&15);if(0<a){var f=d;if(36<=a){if(0<d&&d<B||d>z&&d<C)this.j|=131072;if(71<=a){if(0<e&&e<B||e>z&&e<C)this.j|=131072;d=0}else d=e*Math.pow(2,a-35)%B,c=B-Math.pow(2,70-a),f<=z?e+c>z&&(this.j|=131072):e-c<=z&&(this.j|=131072);e=0;f>z&&(d+=B,e+=B)}else d=d*Math.pow(2,a)%B+Math.trunc(e%B/Math.pow(2,35-a)),e=e*Math.pow(2,a)%B,c=B-Math.pow(2,35-a),f<=z?f+c>z&&(this.j|=131072):(f-c<=z&&(this.j|=131072),d+=B,e+=B)}else-36>=a?(e=-72>=a?d>z?C:0:Math.trunc(d%
|
||||
B/Math.pow(2,-a-35)),d<=z?d=0:(d=C,e+=B)):(c=d>z?D-Math.pow(2,36+a):0,e=Math.trunc(e%B/Math.pow(2,-a))+d%B*Math.pow(2,35+a)%B,d=Math.trunc(d/Math.pow(2,-a))+c,d>z&&(e+=B));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=((this.b&Vb)<<14>>23|this.b&255)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%D+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%D+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%D+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%D+Math.trunc(d/
|
||||
Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b&Vb)<<14>>23|this.b&255){var c=this.f(b),d=this.f(b+1&15);0<a?36<=a?(c=72<=a?0:d*Math.pow(2,a-36)%D,d=0):(c=c*Math.pow(2,a)%D+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%D):-36>=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%D,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},L,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,
|
||||
b){a=!1;for(var c=this.f(b),d=c/y|0,c=c&x;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&x,c=c+1&x,this.A.P||(this.g(b,d*y+c),a||sd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%D;this.g(b,a);a<B&&H(this,this.b)},function(a,b){a=(this.f(b)+262145)%D;this.g(b,a);a>=B&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);b&2&&rd(this,this.Ka/y|0);b&4&&this.Y();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.O=this.b},L,function(a,b){a=(this.f(b)+
|
||||
262145)%D;this.g(b,a);a/y|0||(this.j|=262144);this.g(a&Sb,(this.j&x)*y+this.i);this.j&=-8193;H(this,this.b)},function(a,b){a=this.f(b);a+=262145;this.g(a&Sb,this.f(this.b));a>=D&&(a-=D);a/y|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&Sb);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=D);(a/y|0)==x&&(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&Sb);a-=262145;0>a&&(a+=D);(a/y|0)==x&&(this.j|=262144);this.g(b,a);H(this,c&Sb)},function(){this.g(this.b,
|
||||
(this.j&x)*y+this.i);this.j&=-8193;H(this,this.b+1)},function(a,b){this.g(b,(this.j&x)*y+this.i);this.j&=-8193;H(this,this.b)},function(a,b){this.g(this.b,this.f(b));this.g(b,this.b*y+this.i);H(this,this.b+1)},function(a,b){a=this.f(b);this.g(b,this.f(a/y|0));H(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,Q.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Q.call(this,
|
||||
this.f(b),this.f(this.b))))},function(a,b){this.g(b,ze.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,ze.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,ze.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,ze.call(this,this.f(b),this.f(this.b))))},oe,function(a,b){0>T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){T(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,
|
||||
b){0<=T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0<T(this.f(b),this.b)&&H(this,this.i+1)},pe,function(a,b){0>T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,
|
||||
|
|
@ -135,15 +135,15 @@ b){0<T(this.f(b),this.f(this.b))&&H(this,this.i+1)},oe,function(a,b){0>V(this.f(
|
|||
V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0<V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){this.g(b,Q.call(this,this.f(b),1))},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>V(a)&&H(this,
|
||||
this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<V(a)&&H(this,this.b)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),
|
||||
1));b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+
|
||||
1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){this.g(b,Q.call(this,this.f(b),B))},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0>V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));V(a)||H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0>=V(a)&&H(this,this.b)},function(a,
|
||||
b){this.g(b,Q.call(this,this.f(b),B));H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),B));0<V(a)&&H(this,this.b)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0>V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),
|
||||
B));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),B));
|
||||
0<V(a)&&H(this,this.i+1);b&&this.g(b,a)},Cd,Cd,function(){this.g(this.b,0)},function(a,b){this.g(this.b,this.g(b,0))},function(a,b){this.g(b,R(this.f(b),this.f(this.b)))},function(a,b){this.g(b,R(this.f(b),this.b))},function(a,b){this.g(this.b,R(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,R(this.f(b),this.f(this.b))))},function(a,b){this.g(b,R(B-this.f(b),this.f(this.b)))},function(a,b){this.g(b,R(B-this.f(b),this.b))},function(a,b){this.g(this.b,R(B-this.f(b),this.f(this.b)))},
|
||||
function(a,b){this.g(this.b,this.g(b,R(B-this.f(b),this.f(this.b))))},zd,Ad,pe,zd,function(a,b){this.g(b,R(this.f(b),B-this.f(this.b)))},function(a,b){this.g(b,R(this.f(b),B-this.b))},function(a,b){this.g(this.b,R(this.f(b),B-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,R(this.f(b),B-this.f(this.b))))},oe,oe,Bd,Bd,function(a,b){this.g(b,W(this.f(b),this.f(this.b)))},function(a,b){this.g(b,W(this.f(b),this.b))},function(a,b){this.g(this.b,W(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,
|
||||
this.g(b,W(this.f(b),this.f(this.b))))},function(a,b){this.g(b,U(this.f(b),this.f(this.b)))},function(a,b){this.g(b,U(this.f(b),this.b))},function(a,b){this.g(this.b,U(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,U(this.f(b),this.f(this.b))))},function(a,b){this.g(b,R(B-this.f(b),B-this.f(this.b)))},function(a,b){this.g(b,R(B-this.f(b),B-this.b))},function(a,b){this.g(this.b,R(B-this.f(b),B-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,R(B-this.f(b),B-this.f(this.b))))},
|
||||
function(a,b){this.g(b,Ae(this.f(b),this.f(this.b)))},function(a,b){this.g(b,Ae(this.f(b),this.b))},function(a,b){this.g(this.b,Ae(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Ae(this.f(b),this.f(this.b))))},Dd,Dd,function(a,b){this.g(this.b,B-this.f(b))},function(a,b){this.g(this.b,this.g(b,B-this.f(b)))},function(a,b){this.g(b,U(B-this.f(b),this.f(this.b)))},function(a,b){this.g(b,U(B-this.f(b),this.b))},function(a,b){this.g(this.b,U(B-this.f(b),this.f(this.b)))},function(a,
|
||||
b){this.g(this.b,this.g(b,U(B-this.f(b),this.f(this.b))))},function(a,b){this.g(b,B-this.f(this.b))},function(a,b){this.g(b,B-this.b)},function(){this.g(this.b,B-this.f(this.b))},function(a,b){this.g(this.b,this.g(b,B-this.f(this.b)))},function(a,b){this.g(b,U(this.f(b),B-this.f(this.b)))},function(a,b){this.g(b,U(this.f(b),B-this.b))},function(a,b){this.g(this.b,U(this.f(b),B-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,U(this.f(b),B-this.f(this.b))))},function(a,b){this.g(b,U(B-this.f(b),
|
||||
B-this.f(this.b)))},function(a,b){this.g(b,U(B-this.f(b),B-this.b))},function(a,b){this.g(this.b,U(B-this.f(b),B-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,U(B-this.f(b),B-this.f(this.b))))},Ed,Ed,function(){this.g(this.b,B)},function(a,b){this.g(this.b,this.g(b,B))},Fd,Hd,Id,Jd,Kd,be,ce,de,Fd,Hd,Id,Jd,Kd,be,ce,de,Fd,Hd,Id,Jd,Kd,be,ce,de,Fd,Hd,Id,Jd,Kd,be,ce,de,ee,ge,he,ie,je,ke,le,me,ee,ge,he,ie,je,ke,le,me,ee,ge,he,ie,je,ke,le,me,ee,ge,he,ie,je,ke,le,me,oe,oe,function(a,b){R(this.f(b),
|
||||
1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){this.g(b,Q.call(this,this.f(b),C))},function(a,b){a=this.g(b,Q.call(this,this.f(b),C));0>V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),C));V(a)||H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),C));0>=V(a)&&H(this,this.b)},function(a,
|
||||
b){this.g(b,Q.call(this,this.f(b),C));H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),C));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),C));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),C));0<V(a)&&H(this,this.b)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),C));b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),C));0>V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),
|
||||
C));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),C));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),C));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),C));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),C));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),C));
|
||||
0<V(a)&&H(this,this.i+1);b&&this.g(b,a)},Cd,Cd,function(){this.g(this.b,0)},function(a,b){this.g(this.b,this.g(b,0))},function(a,b){this.g(b,R(this.f(b),this.f(this.b)))},function(a,b){this.g(b,R(this.f(b),this.b))},function(a,b){this.g(this.b,R(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,R(this.f(b),this.f(this.b))))},function(a,b){this.g(b,R(C-this.f(b),this.f(this.b)))},function(a,b){this.g(b,R(C-this.f(b),this.b))},function(a,b){this.g(this.b,R(C-this.f(b),this.f(this.b)))},
|
||||
function(a,b){this.g(this.b,this.g(b,R(C-this.f(b),this.f(this.b))))},zd,Ad,pe,zd,function(a,b){this.g(b,R(this.f(b),C-this.f(this.b)))},function(a,b){this.g(b,R(this.f(b),C-this.b))},function(a,b){this.g(this.b,R(this.f(b),C-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,R(this.f(b),C-this.f(this.b))))},oe,oe,Bd,Bd,function(a,b){this.g(b,W(this.f(b),this.f(this.b)))},function(a,b){this.g(b,W(this.f(b),this.b))},function(a,b){this.g(this.b,W(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,
|
||||
this.g(b,W(this.f(b),this.f(this.b))))},function(a,b){this.g(b,U(this.f(b),this.f(this.b)))},function(a,b){this.g(b,U(this.f(b),this.b))},function(a,b){this.g(this.b,U(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,U(this.f(b),this.f(this.b))))},function(a,b){this.g(b,R(C-this.f(b),C-this.f(this.b)))},function(a,b){this.g(b,R(C-this.f(b),C-this.b))},function(a,b){this.g(this.b,R(C-this.f(b),C-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,R(C-this.f(b),C-this.f(this.b))))},
|
||||
function(a,b){this.g(b,Ae(this.f(b),this.f(this.b)))},function(a,b){this.g(b,Ae(this.f(b),this.b))},function(a,b){this.g(this.b,Ae(this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Ae(this.f(b),this.f(this.b))))},Dd,Dd,function(a,b){this.g(this.b,C-this.f(b))},function(a,b){this.g(this.b,this.g(b,C-this.f(b)))},function(a,b){this.g(b,U(C-this.f(b),this.f(this.b)))},function(a,b){this.g(b,U(C-this.f(b),this.b))},function(a,b){this.g(this.b,U(C-this.f(b),this.f(this.b)))},function(a,
|
||||
b){this.g(this.b,this.g(b,U(C-this.f(b),this.f(this.b))))},function(a,b){this.g(b,C-this.f(this.b))},function(a,b){this.g(b,C-this.b)},function(){this.g(this.b,C-this.f(this.b))},function(a,b){this.g(this.b,this.g(b,C-this.f(this.b)))},function(a,b){this.g(b,U(this.f(b),C-this.f(this.b)))},function(a,b){this.g(b,U(this.f(b),C-this.b))},function(a,b){this.g(this.b,U(this.f(b),C-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,U(this.f(b),C-this.f(this.b))))},function(a,b){this.g(b,U(C-this.f(b),
|
||||
C-this.f(this.b)))},function(a,b){this.g(b,U(C-this.f(b),C-this.b))},function(a,b){this.g(this.b,U(C-this.f(b),C-this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,U(C-this.f(b),C-this.f(this.b))))},Ed,Ed,function(){this.g(this.b,C)},function(a,b){this.g(this.b,this.g(b,C))},Fd,Hd,Id,Jd,Kd,be,ce,de,Fd,Hd,Id,Jd,Kd,be,ce,de,Fd,Hd,Id,Jd,Kd,be,ce,de,Fd,Hd,Id,Jd,Kd,be,ce,de,ee,ge,he,ie,je,ke,le,me,ee,ge,he,ie,je,ke,le,me,ee,ge,he,ie,je,ke,le,me,ee,ge,he,ie,je,ke,le,me,oe,oe,function(a,b){R(this.f(b),
|
||||
this.b)||H(this,this.i+1)},function(a,b){R(this.f(b),this.b*y)||H(this,this.i+1)},function(){H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){R(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){R(this.f(b),this.b*y)&&H(this,this.i+1)},pe,pe,function(a,b){R(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){R(this.f(b),X(this.f(this.b)))||H(this,this.i+1)},function(){H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){R(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,
|
||||
b){R(this.f(b),X(this.f(this.b)))&&H(this,this.i+1)},function(a,b){this.g(b,S(this.f(b),this.b))},function(a,b){this.g(b,S(this.f(b),this.b*y))},function(a,b){a=this.f(b);R(a,this.b)||H(this,this.i+1);this.g(b,S(a,this.b))},function(a,b){a=this.f(b);var c=this.b*y;R(a,c)||H(this,this.i+1);this.g(b,S(a,c))},function(a,b){H(this,this.i+1);this.g(b,S(this.f(b),this.b))},function(a,b){H(this,this.i+1);this.g(b,S(this.f(b),this.b*y))},function(a,b){a=this.f(b);R(a,this.b)&&H(this,this.i+1);this.g(b,S(a,
|
||||
this.b))},function(a,b){a=this.f(b);var c=this.b*y;R(a,c)&&H(this,this.i+1);this.g(b,S(a,c))},function(a,b){this.g(b,S(this.f(b),this.f(this.b)))},function(a,b){this.g(b,S(this.f(b),X(this.f(this.b))))},function(a,b){a=this.f(b);var c=this.f(this.b);R(a,c)||H(this,this.i+1);this.g(b,S(a,c))},function(a,b){a=this.f(b);var c=X(this.f(this.b));R(a,c)||H(this,this.i+1);this.g(b,S(a,c))},function(a,b){H(this,this.i+1);this.g(b,S(this.f(b),this.f(this.b)))},function(a,b){H(this,this.i+1);this.g(b,S(this.f(b),
|
||||
|
|
@ -152,44 +152,44 @@ this.b))},function(a,b){H(this,this.i+1);this.g(b,W(this.f(b),this.b*y))},functi
|
|||
this.i+1);this.g(b,W(a,c))},function(a,b){H(this,this.i+1);this.g(b,W(this.f(b),this.f(this.b)))},function(a,b){H(this,this.i+1);this.g(b,W(this.f(b),X(this.f(this.b))))},function(a,b){a=this.f(b);var c=this.f(this.b);R(a,c)&&H(this,this.i+1);this.g(b,W(a,c))},function(a,b){a=this.f(b);var c=X(this.f(this.b));R(a,c)&&H(this,this.i+1);this.g(b,W(a,c))},function(a,b){this.g(b,U(this.f(b),this.b))},function(a,b){this.g(b,U(this.f(b),this.b*y))},function(a,b){a=this.f(b);R(a,this.b)||H(this,this.i+1);
|
||||
this.g(b,U(a,this.b))},function(a,b){a=this.f(b);R(a,this.b*y)||H(this,this.i+1);this.g(b,U(a,this.b*y))},function(a,b){H(this,this.i+1);this.g(b,U(this.f(b),this.b))},function(a,b){H(this,this.i+1);this.g(b,U(this.f(b),this.b*y))},function(a,b){a=this.f(b);R(a,this.b)&&H(this,this.i+1);this.g(b,U(a,this.b))},function(a,b){a=this.f(b);var c=this.b*y;R(a,c)&&H(this,this.i+1);this.g(b,U(a,c))},function(a,b){this.g(b,U(this.f(b),this.f(this.b)))},function(a,b){this.g(b,U(this.f(b),X(this.f(this.b))))},
|
||||
function(a,b){a=this.f(b);var c=this.f(this.b);R(a,c)||H(this,this.i+1);this.g(b,U(a,c))},function(a,b){a=this.f(b);var c=X(this.f(this.b));R(a,c)||H(this,this.i+1);this.g(b,U(a,c))},function(a,b){H(this,this.i+1);this.g(b,U(this.f(b),this.f(this.b)))},function(a,b){H(this,this.i+1);this.g(b,U(this.f(b),X(this.f(this.b))))},function(a,b){a=this.f(b);var c=this.f(this.b);R(a,c)&&H(this,this.i+1);this.g(b,U(a,c))},function(a,b){a=this.f(b);var c=X(this.f(this.b));R(a,c)&&H(this,this.i+1);this.g(b,U(a,
|
||||
c))},O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O],ne=[function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){switch(b){case 0:a=this.f(this.b);a&8&&(this.j&=-131073);a&131072&&(this.j&=-262145);break;default:this.w(a)}},function(a,b){switch(b){case 0:a=0;this.j&131072&&(a|=8);this.j&262144&&(a|=65536);this.g(this.b,a);break;default:this.w(a)}},function(a){this.w(a)},
|
||||
c))},P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P],ne=[function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){switch(b){case 0:a=this.f(this.b);a&8&&(this.j&=-131073);a&131072&&(this.j&=-262145);break;default:this.w(a)}},function(a,b){switch(b){case 0:a=0;this.j&131072&&(a|=8);this.j&262144&&(a|=65536);this.g(this.b,a);break;default:this.w(a)}},function(a){this.w(a)},
|
||||
function(a){this.w(a)}];
|
||||
function Be(a){r.call(this,"ROM",a,128);this.Z=this.b=null;this.C=+a.addr;this.j=+a.size;this.i=a.alias;"string"==typeof this.i&&(this.i=eval(this.i));this.w=a.file;this.F=wa(this.w);if(this.w){a=this.w;var b=xa(this.F);"json"!=b&&"hex"!=b&&(a=Ja()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;Ha(a,null,!0,function(a,b,f){f?(c.ha("Unable to load ROM resource (error "+f+": "+a+")"),c.w=null):(lb(c.cb,a,b),(a=Ia(a,b))?(c.b=a.da,c.Z=a.Z):c.w=null);Ce(c)})}}ja(Be,r);
|
||||
function Be(a){r.call(this,"ROM",a,128);this.Z=this.b=null;this.C=+a.addr;this.j=+a.size;this.i=a.alias;"string"==typeof this.i&&(this.i=eval(this.i));this.w=a.file;this.F=xa(this.w);if(this.w){a=this.w;var b=ya(this.F);"json"!=b&&"hex"!=b&&(a=Ka()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;Ia(a,null,!0,function(a,b,f){f?(c.ha("Unable to load ROM resource (error "+f+": "+a+")"),c.w=null):(lb(c.cb,a,b),(a=Ja(a,b))?(c.b=a.da,c.Z=a.Z):c.w=null);Ce(c)})}}ja(Be,r);
|
||||
Be.prototype.Ma=function(a,b,c,d){this.G=b;this.v=c;this.D=d;Ce(this)};Be.prototype.Ba=function(){this.Z&&(this.D&&De(this.D,this.id,this.C,this.j,this.Z),delete this.Z);return!0};Be.prototype.sa=function(){return!0};
|
||||
function Ce(a){if(!Bb(a)){if(a.w){if(!a.b||!a.G)return;a.j||(a.j=a.b.length);if(a.b.length!=a.j)yb(a,"ROM size ("+n(a.b.length,8,!0)+") does not match specified size ("+n(a.j,8,!0)+")");else{var b;b=a.C;if(Ec(a.G,b,a.j,Pc)){var c;for(c=0;c<a.b.length;c++)yc(a.G,b+c,a.b[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.i?b.push(a.i):null!=a.i&&a.i.length&&(b=a.i);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.G,g=d.j,h=[],k=d.C>>>f.i;0<g&&k<f.b.length;)h.push(f.b[k++]),g-=16384;f=d.G;d=d.j;g=0;for(e>>>=
|
||||
f.i;0<d&&e<f.b.length;){k=h[g++];if(!k)break;f.b[e++]=k;d-=16384}}delete a.b}}}Mb(a)}}Xa(function(){for(var a=w(document,v,"rom"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new Be(d);sb(d,c)}});
|
||||
function Ee(a){r.call(this,"RAM",a);this.Z=this.Pa=null;this.i=+a.addr;this.j=+a.size;this.la=a.load;this.ya=a.exec;null!=this.la&&(this.la=+this.la);null!=this.ya&&(this.ya=+this.ya);this.w=this.F=!1;this.b=a.file;this.C=wa(this.b);if(this.b){a=this.b;var b=xa(this.C);"json"!=b&&"hex"!=b&&(a=Ja()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;Ha(a,null,!0,function(a,b,f){f?(c.ha("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(lb(c.cb,a,b),(a=Ia(a,b))?(c.Pa=a.Pa,
|
||||
f.i;0<d&&e<f.b.length;){k=h[g++];if(!k)break;f.b[e++]=k;d-=16384}}delete a.b}}}Mb(a)}}Ya(function(){for(var a=w(document,v,"rom"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new Be(d);sb(d,c)}});
|
||||
function Ee(a){r.call(this,"RAM",a);this.Z=this.Pa=null;this.i=+a.addr;this.j=+a.size;this.la=a.load;this.ya=a.exec;null!=this.la&&(this.la=+this.la);null!=this.ya&&(this.ya=+this.ya);this.w=this.F=!1;this.b=a.file;this.C=xa(this.b);if(this.b){a=this.b;var b=ya(this.C);"json"!=b&&"hex"!=b&&(a=Ka()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;Ia(a,null,!0,function(a,b,f){f?(c.ha("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(lb(c.cb,a,b),(a=Ja(a,b))?(c.Pa=a.Pa,
|
||||
c.Z=a.Z,null==c.la&&(c.la=a.la),null==c.ya&&(c.ya=a.ya)):c.b=null);Fe(c)})}}ja(Ee,r);Ee.prototype.Ma=function(a,b,c,d){this.G=b;this.v=c;this.D=d;Fe(this)};Ee.prototype.Ba=function(a,b){this.Z&&(this.D&&De(this.D,this.id,this.i,this.j,this.Z),delete this.Z);b||this.reset();return!0};Ee.prototype.sa=function(){return!0};
|
||||
function Fe(a){if(a.G&&(!a.w&&a.j&&(Ec(a.G,a.i,a.j,1)?a.w=!0:a.j=0),!Bb(a))){if(!a.w)q("No RAM allocated");else if(a.b){if(!a.Pa)return;Ge(a,a.Pa,a.la,a.ya,a.i)?a.status('Loaded image "'+a.C+'"'):a.ha('Error loading image "'+a.C+'"')}a.F=!0;Mb(a)}}
|
||||
Ee.prototype.reset=function(){if(this.w&&!this.F){for(var a=this.G,b=this.i,c=this.j,d=b&16383,b=b>>>a.i;0<c&&b<a.b.length;){var e=a.b[b],f=c,g=0,g=void 0===g?0:g,d=d||0;void 0===f&&(f=e.size);0>g&&g>=-A&&(g+=C);for(var g=Math.trunc(Math.abs(g))%C,h=d;f--&&h<e.size;h++)e.D(g,d,e.B+d);c-=16384;b++;d=0}this.Pa&&Ge(this,this.Pa,this.la,this.ya,this.i,!this.D)}this.F=!1};
|
||||
function Ge(a,b,c,d,e,f){var g=!1;null==c&&(c=e);if(null!=c){for(g=0;g<b.length;g++)yc(a.G,c+g,b[g]);g=!0}g&&(null==d&&(a.v.Y(),f=!1),null!=d&&(a=a.v,a.ab=d,H(a,d),f?a.A.aa?a.A.P||sc(a):a.A.fa=!0:a.D&&a.A.aa?a.Y()||a.H.A.reset||(cd(a.D),J(a.H,-1)):!1===f&&a.Y(),!a.A.P&&a.Oa&&a.Oa.stop()));return g}Xa(function(){for(var a=w(document,v,"ram"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new Ee(d);sb(d,c)}});
|
||||
Ee.prototype.reset=function(){if(this.w&&!this.F){for(var a=this.G,b=this.i,c=this.j,d=b&16383,b=b>>>a.i;0<c&&b<a.b.length;){var e=a.b[b],f=c,g=0,g=void 0===g?0:g,d=d||0;void 0===f&&(f=e.size);0>g&&g>=-B&&(g+=D);for(var g=Math.trunc(Math.abs(g))%D,h=d;f--&&h<e.size;h++)e.D(g,d,e.B+d);c-=16384;b++;d=0}this.Pa&&Ge(this,this.Pa,this.la,this.ya,this.i,!this.D)}this.F=!1};
|
||||
function Ge(a,b,c,d,e,f){var g=!1;null==c&&(c=e);if(null!=c){for(g=0;g<b.length;g++)yc(a.G,c+g,b[g]);g=!0}g&&(null==d&&(a.v.Y(),f=!1),null!=d&&(a=a.v,a.ab=d,H(a,d),f?a.A.aa?a.A.P||sc(a):a.A.fa=!0:a.D&&a.A.aa?a.Y()||a.H.A.reset||(cd(a.D),J(a.H,-1)):!1===f&&a.Y(),!a.A.P&&a.Oa&&a.Oa.stop()));return g}Ya(function(){for(var a=w(document,v,"ram"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new Ee(d);sb(d,c)}});
|
||||
function He(a){r.call(this,"SerialPort",a,1048576);this.w=a.upperCase;"string"==typeof this.w&&(this.w="true"==this.w);this.j=!0;this.i=[];var b=a.binding;if("console"!=b){var c;a=Ie;b&&(void 0===c&&(c="Panel"),(c=rb(c,this.id))&&(b=c.J[b])&&this.ta(null,a,b))}this.b=this.C=null;this.exports={connect:this.Lb,receiveData:this.hb,receiveStatus:this.ic,setConnection:this.lc}}ja(He,r);m=He.prototype;
|
||||
m.ta=function(a,b,c){var d=this;switch(b){case Ie:return this.J[b]=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?ma.yb:ma.Pb:46==c?b=ma.yb:a.ctrlKey&&c>=ma.xb&&c<=ma.Qb&&(b=c-(ma.xb-ma.Mb));b&&(a.preventDefault&&a.preventDefault(),d.hb(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ma.Ob&&(b=ma.Nb);d.hb(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
|
||||
m.ta=function(a,b,c){var d=this;switch(b){case Ie:return this.J[b]=c,c.onkeydown=function(a){a=a||window.event;var b=0,c=a.keyCode;8==c?b=a.altKey?na.yb:na.Pb:46==c?b=na.yb:a.ctrlKey&&c>=na.xb&&c<=na.Qb&&(b=c-(na.xb-na.Mb));b&&(a.preventDefault&&a.preventDefault(),d.hb(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==na.Ob&&(b=na.Nb);d.hb(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();
|
||||
a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.hb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};m.Ma=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)};
|
||||
m.Lb=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ca(c[0]);if(d!=this.bb)return;c=Ca(c[1]);if(this.b=qb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.cb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};m.Ba=function(a,b){if(!b)if(this.Lb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||
m.Lb=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Da(c[0]);if(d!=this.bb)return;c=Da(c[1]);if(this.b=qb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.cb+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};m.Ba=function(a,b){if(!b)if(this.Lb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||
m.sa=function(a){return a?this.save():!0};m.reset=function(){};m.save=function(){var a=new F(this);a.set(0,[]);return a.data()};m.restore=function(){return!0};m.hb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.i.push(b)}else this.i=this.i.concat(a);return!0};m.ic=function(){};m.lc=function(a,b){return this.b?!1:(this.b=a,this.C=b,!0)};var Ie="buffer";
|
||||
Xa(function(){for(var a=w(document,v,"serial"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new He(d);sb(d,c)}});function Je(a){r.call(this,"Debugger",a);this.U=+a.base||16;this.L=32;this.ja=null;this.T=["{","}"];this.ua=["[","]"];this.F=0;this.V=!1;this.C=-1;this.w=[];this.i={}}ja(Je,r);Je.prototype.ub=function(){return-1};Je.prototype.vb=function(){};
|
||||
function Ke(a,b,c,d){if(c)if(b){0>a.C&&a.w.length&&(a.C=0);if(0>a.C||b!=a.w[a.C])a.w.splice(0,0,b),a.C=0;a.C--}else a.V?b="end":b=a.w[a.C+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(Ca(b.substring(c,f))),c=f+1}}return a}function Le(a,b,c){if(32>=a.L)return b&c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Me|0)&(c/Me|0))*Me+((b&c)>>>0)}
|
||||
Ya(function(){for(var a=w(document,v,"serial"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new He(d);sb(d,c)}});function Je(a){r.call(this,"Debugger",a);this.U=+a.base||16;this.L=32;this.ja=null;this.T=["{","}"];this.ua=["[","]"];this.F=0;this.V=!1;this.C=-1;this.w=[];this.i={}}ja(Je,r);Je.prototype.ub=function(){return-1};Je.prototype.vb=function(){};
|
||||
function Ke(a,b,c,d){if(c)if(b){0>a.C&&a.w.length&&(a.C=0);if(0>a.C||b!=a.w[a.C])a.w.splice(0,0,b),a.C=0;a.C--}else a.V?b="end":b=a.w[a.C+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(Da(b.substring(c,f))),c=f+1}}return a}function Le(a,b,c){if(32>=a.L)return b&c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Me|0)&(c/Me|0))*Me+((b&c)>>>0)}
|
||||
function Ne(a,b,c){if(32>=a.L)return b|c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Me|0)^(c/Me|0))*Me+((b^c)>>>0)}function Y(a,b,c,d){var e=b;c=c||a.L;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<<c)-1;else{if(a=Math.pow(2,c),0>b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?(b<2*-a&&(e=b%(2*a)),e+=2*a):e>=a&&(b>=2*a&&(e=b%(2*a)),e-=2*a));b!=e&&(b=e);return b}
|
||||
function Oe(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "^/":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f<g?1:0;break;case "<=":f=f<=g?1:0;break;case ">":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break;
|
||||
case "&":f=Le(a,f,g);break;case "!":case "|":e=a;32>=e.L?f|=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=(f/Me|0|g/Me|0)*Me+((f|g)>>>0));break;case "^!":f=Ne(a,f,g);break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "_":case "^_":"^_"==e&&(g=35-(g&255));g&&(f=Y(a,f,0,!0),f=0<g?f*Math.pow(2,g):Math.trunc(f/Math.pow(2,-g)));break;default:return!1}b.push(Y(a,f))}return!0}
|
||||
function Pe(a,b,c,d,e,f){var g,h,k,l=!1,p=0,u=[],D=[],I=a.U;for(a.U=e;c<d;){h=b[c++].trim();k=c<d?b[c++]:"";if(h)p=Qe(a,h,null,f,p);else if("{"==k){h=1;for(p=c;c<d;)if(c++,k=c<b.length?b[c++]:"","{"==k)h++;else if("}"==k&&!--h)break;p=Pe(a,b,p,c-1,a.U,f);h=c<d?b[c++].trim():"";k=c<d?b[c++]:""}else{if(" "==k)continue;if("^B"==k){a.U=2;continue}if("^O"==k){a.U=8;continue}if("^D"==k){a.U=10;continue}if(!(p&-1073741824)){if("+"==k)continue;if("-"==k){p=p<<2|1;continue}if("~"==k||"^-"==k){p=p<<2|2;continue}if("^L"==
|
||||
k){p=p<<2|3;continue}}l=!0;break}if(void 0===p)if(null==a.ja&&f)a.ja=h,p=0;else{l=!0;f=!f;break}u.push(Y(a,p));if(" "==k)if(c<b.length-1&&!b[c])c++,k=b[c++];else{l=!0;break}if(!k)break;p="<"==a.T[0]?Re:Se;if(!p[k]){l=!0;break}D.length&&p[k]<=p[D[D.length-1]]&&Oe(a,u,D,1);D.push(k);a.U="^_"==k?10:e;p=0}if(l||!Oe(a,u,D)||1!=u.length)l=!0;l?!1===f&&a.u("parse error ("+(h||k)+")"):g=u.pop();a.U=I;return g}
|
||||
function Pe(a,b,c,d,e,f){var g,h,k,l=!1,p=0,u=[],A=[],I=a.U;for(a.U=e;c<d;){h=b[c++].trim();k=c<d?b[c++]:"";if(h)p=Qe(a,h,null,f,p);else if("{"==k){h=1;for(p=c;c<d;)if(c++,k=c<b.length?b[c++]:"","{"==k)h++;else if("}"==k&&!--h)break;p=Pe(a,b,p,c-1,a.U,f);h=c<d?b[c++].trim():"";k=c<d?b[c++]:""}else{if(" "==k)continue;if("^B"==k){a.U=2;continue}if("^O"==k){a.U=8;continue}if("^D"==k){a.U=10;continue}if(!(p&-1073741824)){if("+"==k)continue;if("-"==k){p=p<<2|1;continue}if("~"==k||"^-"==k){p=p<<2|2;continue}if("^L"==
|
||||
k){p=p<<2|3;continue}}l=!0;break}if(void 0===p)if(null==a.ja&&f)a.ja=h,p=0;else{l=!0;f=!f;break}u.push(Y(a,p));if(" "==k)if(c<b.length-1&&!b[c])c++,k=b[c++];else{l=!0;break}if(!k)break;p="<"==a.T[0]?Re:Se;if(!p[k]){l=!0;break}A.length&&p[k]<=p[A[A.length-1]]&&Oe(a,u,A,1);A.push(k);a.U="^_"==k?10:e;p=0}if(l||!Oe(a,u,A)||1!=u.length)l=!0;l?!1===f&&a.u("parse error ("+(h||k)+")"):g=u.pop();a.U=I;return g}
|
||||
function Te(a,b,c,d,e,f){for(var g;0<=(g=b.indexOf(c));){for(var h=0,k=g+1,l=e;k<b.length;){var p=b[k++];if(p==c){l=-1;break}if(!l)break;l--;p=p.charCodeAt(0);7==d?p&=127:p=p-32&63;h=Y(a,h*Math.pow(2,d)+p,d*e,!0)}if(0<=l){!1===f&&a.u("parse error ("+b+")");break}else b=b.substr(0,g)+K(a,h,-1)+b.substr(k)}return b}
|
||||
function Ue(a,b,c){var d=void 0;a.ja=null;if(b){"{"!=a.T[0]&&(b=b.split(a.T[0]).join("{").split(a.T[1]).join("}"));b=Te(a,b,'"',7,5,c);if(!b)return d;b=Te(a,b,"'",6,6,c);if(!b)return d;b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," ");b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*| )/);d=Pe(a,b,0,b.length,a.U,c);void 0!==d&&!1===c&&Ve(a,null,d)}return d}
|
||||
function Qe(a,b,c,d,e){e=void 0===e?0:e;var f;if(null!=b){f=a.ub(b);if(0<=f)f=a.vb(f);else if(f=a.i[b]&&a.i[b].value,null!=f){var g=a.i[b]&&a.i[b].ja;g&&(a.ja?(d||(a.u(b+" has too many undefined values ("+g+","+a.ja+")"),d=!0),f=void 0):a.ja=g)}else f=na(b,1<b.length?a.U:10);if(null!=f){for(;e;){switch(e&3){case 1:f=-Y(a,f);break;case 2:f=Ne(a,f,-1);break;case 3:for(b=35;0<=b&&!Le(a,f,Math.pow(2,b));)b--;f=35-b}e>>>=2}f=Y(a,f)}else d||a.u("invalid "+(c?c:"value")+": "+b)}else d||a.u("missing "+(c||
|
||||
function Qe(a,b,c,d,e){e=void 0===e?0:e;var f;if(null!=b){f=a.ub(b);if(0<=f)f=a.vb(f);else if(f=a.i[b]&&a.i[b].value,null!=f){var g=a.i[b]&&a.i[b].ja;g&&(a.ja?(d||(a.u(b+" has too many undefined values ("+g+","+a.ja+")"),d=!0),f=void 0):a.ja=g)}else f=oa(b,1<b.length?a.U:10);if(null!=f){for(;e;){switch(e&3){case 1:f=-Y(a,f);break;case 2:f=Ne(a,f,-1);break;case 3:for(b=35;0<=b&&!Le(a,f,Math.pow(2,b));)b--;f=35-b}e>>>=2}f=Y(a,f)}else d||a.u("invalid "+(c?c:"value")+": "+b)}else d||a.u("missing "+(c||
|
||||
"value"));return f}function Ve(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.U?K(a,c,a.L,8,1)+" "+c+".":K(a,c,a.L,16,1)+" "+K(a,c,a.L,8,1)+" "+K(a,c,a.L,2,32>=a.L?8:6)+" "+c+".",32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.u((null!=b?b+": ":"")+d);return e}function We(a){var b=a.i;a.i={};return b}function Xe(a,b){if(b)return Ve(a,b,a.i[b].value);var c=0;for(b in a.i)Ve(a,b,a.i[b].value),c++;return 0<c}
|
||||
function K(a,b,c,d,e){c=void 0===c?0:c;e=void 0===e?0:e;switch((void 0===d?0:d)||a.U){case 2:(a=0<c?c:0)?36<a&&(a=36):(a=Math.abs(b),a=255>=a?8:262143>=a?18:36);b=ta(b,2,a,"",e);break;case 8:b=ua(b,0<c?(c+2)/3|0:0,!!e);break;case 10:b=va(b,0<c?Math.ceil(.3*c):0);break;default:b=n(b,0<c?c+3>>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}
|
||||
function K(a,b,c,d,e){c=void 0===c?0:c;e=void 0===e?0:e;switch((void 0===d?0:d)||a.U){case 2:(a=0<c?c:0)?36<a&&(a=36):(a=Math.abs(b),a=255>=a?8:262143>=a?18:36);b=ua(b,2,a,"",e);break;case 8:b=va(b,0<c?(c+2)/3|0:0,!!e);break;case 10:b=wa(b,0<c?Math.ceil(.3*c):0);break;default:b=n(b,0<c?c+3>>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}
|
||||
var Se={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},Re={"||":5,"&&":6,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,"!":15,"|":15,"^!":15,"&":15,_:19,"^_":19,"{":20,"}":20},Me=Math.pow(2,32);
|
||||
function Ye(a){Je.call(this,a);this.Ja=!1;this.Ga=18;this.L=36;this.T=["<",">"];this.ua=[];this.Ia=Z();this.M=Z(0);this.pa=Z(0);this.ka=Z(0);this.I=[];this.b=this.N=this.K=[];Ze(this);this.W=this.qa=0;this.j=[];this.Da=void 0;$e(this);this.D=this;this.wa={};this.ca=this.Fb=0;this.ba=null;this.R=[];af(this,a.messages);this.va=a.commands;this.Ha=[];this.O=0;this.Oa=this.Ea=null;this.F=this.La=this.Ka=this.oa=this.Ca=0;this.xa=this.na=this.ga=null;var b=this;window?void 0===window[v]&&(window[v]=function(a){return ed(b,
|
||||
a)}):void 0===global[v]&&(global[v]=function(a){return ed(b,a)})}ja(Ye,Je);function bf(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,fb:void 0===b?!1:b,ra:!1,U:c}}function cf(a,b,c,d){a.B=b;a.fb=c||!1;a.ra=!1;a.U=d}function df(a){return[a.B,a.fb,a.ra,a.U,a.ib]}function ef(a,b){var c=Z(b[0],b[1],b[2]);c.ra=b[3];b[4]&&(c.Ab=Ke(a,c.ib=b[4]));return c}m=Ye.prototype;
|
||||
m.Ma=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.na=a.j;this.Ga=b.F;(b=$c(a,"messages"))&&af(this,b);if(a=$c(a,"commands"))this.va=a;ff(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=bf(gf(d,c,d.pa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,l=0;k--;){var p=b[e];p.type==c?l++||d.u("..."):(c=p.type,l=Hc[c],p&&d.u(n(p.id,8)+" %"+
|
||||
n(e<<d.G.i,8)+" %"+n(p.B,8)+" "+n(p.Ya,4,!0)+" "+n(p.size,4,!0)+" "+l),c!=Oc&&(c=-1),l=0);a+=16384;e++}}});Mb(this)};
|
||||
m.ta=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ga=this.J[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",ed(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.C<d.w.length-1&&(b=d.w[++d.C])):40==a.keyCode&&(0<d.C?b=d.w[--d.C]:(b="",d.C=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.J[b]=c,Va(c,function(){if(d.ga){var a=d.ga.value;
|
||||
d.ga.value="";ed(d,a,!0);return!0}return!1}),!0;case "step":return this.J[b]=c,Va(c,function(a){var b=!1;Nb(d,!0)||(Ob(d,!0),b=tc(d,a?1:0,null),Ob(d,!1));return b}),!0}return!1};function dd(a){if(a.ga){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.ga.focus();window&&window.scrollTo(b,c)}}m.Na=function(a,b){var c=-1,d=bf(a);-1!==d&&(c=zc(this.G,d),b&&null!=a.B&&(a.B+=b||1));return c};m.zb=function(a,b,c){var d=bf(a);-1!==d&&(yc(this.G,d,b),c&&null!=a.B&&(a.B+=c||1),J(this.H,-1))};
|
||||
m.ta=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ga=this.J[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",ed(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.C<d.w.length-1&&(b=d.w[++d.C])):40==a.keyCode&&(0<d.C?b=d.w[--d.C]:(b="",d.C=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.J[b]=c,Wa(c,function(){if(d.ga){var a=d.ga.value;
|
||||
d.ga.value="";ed(d,a,!0);return!0}return!1}),!0;case "step":return this.J[b]=c,Wa(c,function(a){var b=!1;Nb(d,!0)||(Ob(d,!0),b=tc(d,a?1:0,null),Ob(d,!1));return b}),!0}return!1};function dd(a){if(a.ga){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.ga.focus();window&&window.scrollTo(b,c)}}m.Na=function(a,b){var c=-1,d=bf(a);-1!==d&&(c=zc(this.G,d),b&&null!=a.B&&(a.B+=b||1));return c};m.zb=function(a,b,c){var d=bf(a);-1!==d&&(yc(this.G,d,b),c&&null!=a.B&&(a.B+=c||1),J(this.H,-1))};
|
||||
function gf(a,b,c){var d,e;c||(c=Z());var f=c.B;if(void 0!==b){a:{var g,f=a.T[0],h=a.T[1];g="("==f||"{"==f||"["==f?"\\":"";for(var k="["==f?"\\":"",k=new RegExp(g+f+"([^"+k+f+k+h+"]+)"+g+h);g=b.match(k);){var l=Ue(a,g[1]);if(void 0===l){b=void 0;break a}b=b.replace(f+g[1]+h,null!=l?K(a,l):"undefined")}if(a.ua.length)for(f=a.ua[0],h=a.ua[1],g="("==f||"{"==f||"["==f?"\\":"",k="["==f?"\\":"",k=new RegExp(g+f+"([^"+k+f+k+h+"]+)"+g+h);g=b.match(k);)b=b.replace("["+g[1]+"]","unimplemented");for(;f=b.match(/\$([a-z]+)/i);){h=
|
||||
null;switch(f[1].toLowerCase()){case "ops":h=0}if(null==h)break;b=b.replace(f[0],h.toString())}}"%"==b.charAt(0)&&(d=!0,b=b.substr(1));var p,f=b,u;if(f.match(/^[a-z_][a-z0-9_]*$/i))for(f=f.toUpperCase(),h=0;h<a.I.length;h++)if(g=a.I[h].Z[f],null!=g){u=g.o;break}null!=u&&(p=Z(u));if(p)return p;0<=b.indexOf("0x")?e=16:0<=b.indexOf("0o")?e=8:0<=b.indexOf(".")&&(e=10);f=Ue(a,b)}null!=f&&(f=hf(f,a.Ga),cf(c,f,d,e));return c}function jf(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.Ab=Ke(a,b.ib=c[2]))}
|
||||
function hf(a,b){0>a&&a>=-A&&(a+=C);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function kf(a,b){return K(a,b/Tb,18)+" "+K(a,b%Tb,18)}
|
||||
function hf(a,b){0>a&&a>=-B&&(a+=D);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function kf(a,b){return K(a,b/Tb,18)+" "+K(a,b%Tb,18)}
|
||||
function af(a,b){a.D=a;a.ca=a.Fb=536870916;a.ba=null;a.R=[];b=Ke(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in bc){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.ca|=bc[c],a.u(c+" messages enabled"))}}function ff(a,b){for(var c in bc)if(16==bc[c]){a.wa[c]=b;break}}m.ub=function(a){return lf.indexOf(a.toUpperCase())};
|
||||
m.vb=function(a){var b,c=this.v;switch(a){case mf:b=c.i;break;case nf:b=c.I;break;case of:b=c.b;break;case pf:b=c.j&x;break;case qf:b=c.j&131072?1:0;break;case rf:b=c.j&65536?1:0;break;case sf:b=c.j&32768?1:0;break;case tf:b=c.j&32?1:0;break;case uf:b=c.j&262144?1:0}return b};
|
||||
m.message=function(a,b){b&&(a+=" @"+K(this,Z(this.v.Ea).B,18));if(!this.ba||a!=this.ba)if(this.ba=a,this.ca&1073741824)this.R.push(a);else{var c;if(this.ca&-2147483648&&this.v&&(c=this.v.A.P)||Nb(this,!0))this.Y(),c&&(a+=" (cpu halted)");this.u(a);this.v&&(a=this.v,md(a),a.na=0,a.H&&J(a.H,void 0))}};
|
||||
|
|
@ -199,100 +199,100 @@ function xf(a,b){var c;(c=!a.v||!Bb(a.v))||(c=a.v,c.A.aa?c=!0:(c.u(c.toString()+
|
|||
m.save=function(){var a=new F(this);a.set(0,df(this.M));a.set(1,df(this.pa));a.set(2,df(this.ka));a.set(3,[this.w,this.V,this.ca]);a.set(4,this.I);return a.data()};m.restore=function(a){var b=0;void 0!==a[3]&&(this.M=ef(this,a[b++]),this.pa=ef(this,a[b++]),this.ka=ef(this,a[b++]),this.w=a[b][0],"string"==typeof this.w&&(this.w=[this.w]),this.V=a[b][1],this.ca|=a[b][2]);a[4]&&(this.I=a[4]);return!0};m.start=function(a,b){this.O||this.u("running");this.A.P=!0;this.Ka=a;this.La=b};
|
||||
m.stop=function(a,b){if(this.A.P){this.A.P=!1;this.F=b-this.La;if(!this.O){b="stopped";if(this.F){a-=this.Ka;var c=0<a?Math.round(1E3*this.F/a):0;b+=" (";td(this)&&(b+=this.oa+" instructions, ",this.oa=0);b+=this.F+" cycles, "+a+" ms, "+c+" hz)"}else Pb(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.u(b)}cd(this,!0);dd(this);Bf(this,this.v.i);this.ba=null}};function td(a){return 1<a.b.length||!!a.qa}
|
||||
function ud(a,b,c){var d=-1;c||(d=a.v.f(b),2756==d>>23&&a.v.Ea==b&&(b=sd(a.v,1)));if(0<c&&(a.qa&&!--a.qa||Xc(a,b,1,a.b)))return!0;0<=c&&a.j.length&&(a.oa++,0>d&&(d=a.v.f(b)),0<=d&&(cf(a.j[a.W],b),++a.W==a.j.length&&(a.W=0)));return!1}
|
||||
function Cf(a,b,c,d){var e=Z(b.B),f=a.Na(b,1),g,h,k,l=0,p=f/Yb|0,u;for(u in Df)if(g=Df[u][p&u]){h=+u;p>>=6;switch(h){case 32512:k=Ef;l=p&3;break;case 32256:k=Ff;l=p&7;break;case 29248:k=Gf,l=(p&48)>>2|(p&6)>>1}break}k=k&&k[l]||"";"S"==k&&g>Hf&&(k="B");k=If[g||0]+k;if(g){if(28700==h)h=f/Zb&127,l=K(a,h,-1);else for(h=f>>23&15,l=K(a,h,-1),p=0;l&&p<Jf.length;p++)if(g==Jf[p][0]&&(u=Jf[p][h])){k=If[u];l="";break}k=Ba(k,8)+(l?l+",":"");f&4194304&&(k+="@");k+=K(a,f&262143,-1);(f=f>>18&15)&&(k+="("+K(a,f,
|
||||
-1)+")")}else k=Ba(k,8)+kf(a,f);f=k;g="";h=K(a,e.B,18)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Na(e,1),g+=" "+kf(a,k),null==e.B)break;while(e.B!=b.B)}h+=Ba(g,16)+f;c&&(h=Ba(h,48)+";"+(c||""),h=a.v.A.Va?h+("cycles="+fd(a.v).toString()+" cs="+n(a.v.Ha)):h+(null!=d?"="+d.toString():""));return h}
|
||||
function Kf(a,b,c,d,e){var f=-1,g,h;a.ja=null;if(b){for(var k=b.toUpperCase(),l=0;l<Jf.length;l++)for(var p in Jf[l])if(+p&&(h=Jf[l][p],k==If[h])){k=If[Jf[l][0]];c&&(c=K(a,+p)+","+c);break}for(var u in Df){g=+u;p=Df[u];switch(g){case 32512:l=Ef;break;case 32256:l=Ff;break;case 29248:l=Gf;break;default:l=[""]}for(var D in p){h=p[D];for(var I=0;I<l.length;I++){var P=l[I];"S"==P&&h>Hf&&(P="B");if(k==If[h]+P){f=29248!=g?I:(I&3)<<1|(I&12)<<2;f=(D|f<<6)*Yb;break}}if(0<=f)break}if(0<=f)break}!(0>f)||c&&
|
||||
c.match(/^[0-9A-Z$%.?]/i)||(c=b+c,b="",f=0)}else c&&(f=g=0);if(0<=f&&c)for(k=c.split(","),u=0;u<k.length;u++)if(h=k[u].trim()){if(1<u){a.u("too many operands: "+c);f=-1;break}D=h.match(/(@?)([^(]*)\(?([^)]*)\)?/);if(!D){a.u("unknown operand: "+h);f=-1;break}D[1]&&(f+=4194304);if(h=D[3]){h=Ue(a,h,e);if(void 0==h){f=-1;break}if(0>h||15<h)h&=15;f+=h<<18}h=D[2];if(u||1==k.length)h=h?h.replace(/(^|[^0-9])\./g,"$1"+K(a,d,18)):"0";h=Ue(a,h,e);if(void 0==h){f=-1;break}if(!u&&1<k.length)if(28700==g){if(0>
|
||||
h||127<h)h&=127;f+=h*Zb}else{if(0>h||15<h)h&=15;f+=h<<23}else{if(b||u)if(0>h||262143<h)h&=Sb;f+=h}}0>f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ze(a){var b,c;a.b=["bp"];if(a.N)for(b=1;b<a.N.length;b++){c=a.N[b];c=bf(c);var d=a.G;Wc(d.b[c>>>d.i],!1)}a.N=["br"];if(a.K)for(b=1;b<a.K.length;b++)c=a.K[b],c=bf(c),d=a.G,Wc(d.b[c>>>d.i],!0);a.K=["bw"];a.Ca=0;a.qa=0}
|
||||
function Cf(a,b,c,d){var e=Z(b.B),f=a.Na(b,1),g,h,k,l=0,p=f/Yb|0,u;for(u in Df)if(g=Df[u][p&u]){h=+u;p>>=6;switch(h){case 32512:k=Ef;l=p&3;break;case 32256:k=Ff;l=p&7;break;case 29248:k=Gf,l=(p&48)>>2|(p&6)>>1}break}k=k&&k[l]||"";"S"==k&&g>Hf&&(k="B");k=If[g||0]+k;if(g){if(28700==h)h=f/Zb&127,l=K(a,h,-1);else for(h=f>>23&15,l=K(a,h,-1),p=0;l&&p<Jf.length;p++)if(g==Jf[p][0]&&(u=Jf[p][h])){k=If[u];l="";break}k=Ca(k,8)+(l?l+",":"");f&4194304&&(k+="@");k+=K(a,f&262143,-1);(f=f>>18&15)&&(k+="("+K(a,f,
|
||||
-1)+")")}else k=Ca(k,8)+kf(a,f);f=k;g="";h=K(a,e.B,18)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Na(e,1),g+=" "+kf(a,k),null==e.B)break;while(e.B!=b.B)}h+=Ca(g,16)+f;c&&(h=Ca(h,48)+";"+(c||""),h=a.v.A.Va?h+("cycles="+fd(a.v).toString()+" cs="+n(a.v.Ha)):h+(null!=d?"="+d.toString():""));return h}
|
||||
function Kf(a,b,c,d,e,f){var g=-1,h,k;a.ja=null;if(b){for(var l=b.toUpperCase(),p=0;p<Jf.length;p++)for(var u in Jf[p])if(+u&&(k=Jf[p][u],l==If[k])){l=If[Jf[p][0]];c&&(c=K(a,+u)+","+c);break}for(var A in Df){h=+A;u=Df[A];switch(h){case 32512:p=Ef;break;case 32256:p=Ff;break;case 29248:p=Gf;break;default:p=[""]}for(var I in u){k=u[I];for(var M=0;M<p.length;M++){var ka=p[M];"S"==ka&&k>Hf&&(ka="B");if(l==If[k]+ka){g=29248!=h?M:(M&3)<<1|(M&12)<<2;g=(I|g<<6)*Yb;break}}if(0<=g)break}if(0<=g)break}!(0>g)||
|
||||
c&&c.match(/^[0-9A-Z$%.?]/i)||(c=b+c,b="",g=0)}else c&&(g=h=0);if(0<=g&&c)for(l=c.split(","),A=0;A<l.length;A++)if(k=l[A].trim()){if(1<A){a.u("too many operands: "+c);g=-1;break}I=k.match(/(@?)([^(]*)\(?([^)]*)\)?/);if(!I){a.u("unknown operand: "+k);g=-1;break}I[1]&&(g+=4194304);if(k=I[3]){k=Ue(a,k,e);if(void 0==k){g=-1;break}if(0>k||15<k)k&=15;g+=k<<18}k=I[2];if(A||1==l.length)k=k?k.replace(/(^|[^0-9])\./g,"$1"+K(a,d,18)):"0";k=Ue(a,k,e);if(void 0==k){g=-1;break}if(!A&&1<l.length)if(28700==h){if(0>
|
||||
k||127<k)k&=127;g+=k*Zb}else{if(0>k||15<k)k&=15;g+=k<<23}else{if(b||A)if(0>k||262143<k)k&=Sb;g+=k}}0>g&&!f&&a.u("unknown instruction: "+b+" "+c);return g}function Ze(a){var b,c;a.b=["bp"];if(a.N)for(b=1;b<a.N.length;b++){c=a.N[b];c=bf(c);var d=a.G;Wc(d.b[c>>>d.i],!1)}a.N=["br"];if(a.K)for(b=1;b<a.K.length;b++)c=a.K[b],c=bf(c),d=a.G,Wc(d.b[c>>>d.i],!0);a.K=["bw"];a.Ca=0;a.qa=0}
|
||||
m.Ra=function(a,b,c){var d=!0;c||Lf(this,a,b,!1,!0);if(a!=this.b){var e=bf(b);if(-1===e)this.u("invalid address: "+K(this,b.B,18)),d=!1;else{var f=this.G;f.b[e>>>f.i].Ra(e&16383,a==this.K)}}d&&(a.push(b),c?b.ra=!0:(Mf(this,a,a.length-1,"set"),$e(this)));return d};function Lf(a,b,c,d,e){var f=!1;c=bf(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==bf(h)&&(!d||h.ra)){f=!0;h.ra||e||Mf(a,b,g,"cleared");b.splice(g,1);b!=a.b&&(d=a.G,Wc(d.b[c>>>d.i],b==a.K));h.ra||$e(a);break}}return f}
|
||||
function Nf(a,b){for(var c=1;c<b.length;c++)Mf(a,b,c);return b.length-1}function Mf(a,b,c,d){c=b[c];a.u(b[0]+" "+K(a,c.B,18)+(d?" "+d:c.ib?' "'+c.ib+'"':""))}function Bf(a,b){if(void 0!==b)Xc(a,b,1,a.b,!0),a.O=0;else for(b=1;b<a.b.length;b++){var c=a.b[b];if(c.ra){if(!Lf(a,a.b,c,!0))break;b=0}}}
|
||||
function Xc(a,b,c,d,e){var f=!1;if(!a.Ca++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.ra)for(var k=bf(h)&(d==a.b?65535:-1),l=0;l<c;l++)if(b+l==k){var p,f=!0;h.ra&&(Lf(a,d,h,!0),e=!0);if(p=h.Ab){for(var f=!1,u=0;u<p.length;u++)if(!Of(a,p[u],!0)){if(p[u].indexOf("if")){f=!0;break}for(var D=u+1;D<p.length&&p[D].indexOf("else");D++)u++;if(D==p.length){f=!0;break}}a.v.A.P||(f=!0)}if(f){e||Mf(a,d,g,"hit");break}}}a.Ca--;return f}
|
||||
function Pf(a,b){b=void 0===b?!0:b;for(var c="",d=0;16>d;d++){!d||d&3||(c+="\n");var e=a,f=ua(d,2);cf(e.Ia,d);f+="="+K(e,e.Na(e.Ia),36)+" ";c+=f}if(b){b="";for(d=0;d<lf.length;d++)(e=lf[d]||"")&&(e+="="+K(a,a.vb(d),d>=qf?1:d==nf?23:18)+" "),b+=e;c+="\n"+b}return c}m.Hb=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||
function De(a,b,c,d,e){var f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var k=h.o,l=h.a;if(void 0!==k){var p=f,k=[k>>>0,g],u=Fa(p,k,a.Hb);0>u&&p.splice(-(u+1),0,k)}l&&(h.a=l.replace(/''/g,'"'))}a.I.push({xd:b,B:c,Vb:d,Z:e,Cb:f})}function Qf(a,b,c){var d=[],e=bf(b)>>>0;for(b=0;b<a.I.length;b++){var f=a.I[b],g=f.B>>>0,h=f.Vb;if(e>=g&&e<g+h){e=Fa(f.Cb,[e-g],a.Hb);0<=e?qg(a,b,e,d):c&&(e=~e,qg(a,b,e-1,d),qg(a,b,e,d));break}}return d}
|
||||
function Xc(a,b,c,d,e){var f=!1;if(!a.Ca++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.ra)for(var k=bf(h)&(d==a.b?65535:-1),l=0;l<c;l++)if(b+l==k){var p,f=!0;h.ra&&(Lf(a,d,h,!0),e=!0);if(p=h.Ab){for(var f=!1,u=0;u<p.length;u++)if(!Of(a,p[u],!0)){if(p[u].indexOf("if")){f=!0;break}for(var A=u+1;A<p.length&&p[A].indexOf("else");A++)u++;if(A==p.length){f=!0;break}}a.v.A.P||(f=!0)}if(f){e||Mf(a,d,g,"hit");break}}}a.Ca--;return f}
|
||||
function Pf(a,b){b=void 0===b?!0:b;for(var c="",d=0;16>d;d++){!d||d&3||(c+="\n");var e=a,f=va(d,2);cf(e.Ia,d);f+="="+K(e,e.Na(e.Ia),36)+" ";c+=f}if(b){b="";for(d=0;d<lf.length;d++)(e=lf[d]||"")&&(e+="="+K(a,a.vb(d),d>=qf?1:d==nf?23:18)+" "),b+=e;c+="\n"+b}return c}m.Hb=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||
function De(a,b,c,d,e){var f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var k=h.o,l=h.a;if(void 0!==k){var p=f,k=[k>>>0,g],u=Ga(p,k,a.Hb);0>u&&p.splice(-(u+1),0,k)}l&&(h.a=l.replace(/''/g,'"'))}a.I.push({xd:b,B:c,Vb:d,Z:e,Cb:f})}function Qf(a,b,c){var d=[],e=bf(b)>>>0;for(b=0;b<a.I.length;b++){var f=a.I[b],g=f.B>>>0,h=f.Vb;if(e>=g&&e<g+h){e=Ga(f.Cb,[e-g],a.Hb);0<=e?qg(a,b,e,d):c&&(e=~e,qg(a,b,e-1,d),qg(a,b,e,d));break}}return d}
|
||||
function sg(a,b,c){var d=a.G,e=0,f=null,g=0;b.forEach(function(a,b){d.b[(b&d.j)>>>d.i].g(a,b&16383,b);null==f&&(f=b);b>g&&(g=b);e++});e?(b="start address ",null!=c?(H(a.v,c),b+=K(a,c)):b+="unspecified",a.u(e+" words loaded at "+K(a,f)+"-"+K(a,g)+", "+b),cd(a)):a.u("no data")}function qg(a,b,c,d){var e={},f=a.I[b].Cb,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.I[b].Z[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
|
||||
function tg(a,b){var c=b[0].substr(1),d=b[1]&&"0"<=b[1][0]&&"9">=b[1][0]?b[1]:void 0,e=d?b[2]:b[1],f=gf(a,d,a.ka);if(!e)return a.u("begin assemble at "+K(a,f.B,18)),a.V=!0,J(a.H),!0;var g=e.match(/^(['"]?)(.*\.klm|.*\.mac|.*\.html|.*\.txt)\1$/i);if(g){f=gf(a,d);if(a.xa)a.u("assembly already in progress");else var h=g[2],k=f.B,l=a.xa=new ug(h,k,c,a,function(b,c){if(!b)try{var d=l.H;null==d&&(d=k);sg(a,l.S,d)}catch(I){"number"==typeof I?b=I||-1:(a.u(I.message),b=-1)}b&&a.u("error ("+b+") processing "+
|
||||
(c||h));a.xa=null;b||ed(a)});return!1}b.shift();b.shift();b.shift();b=Kf(a,e,b.join(""),f.B||0);0<=b&&(a.zb(f,b),a.u(Cf(a,f)));return!0}function vg(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Xe(a)||a.u("no variables"),!0;if(!c[2])return Xe(a,c[1]);if(!c[3])return delete a.i[c[1]],!0;b=Ue(a,c[3]);return void 0!==b?(a.i[c[1]]={value:b,ja:void 0},!0):!1}a.u("invalid assignment:"+b);return!1}
|
||||
function wg(a,b,c){var d=null;b=gf(a,b);var e=Qf(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.B-e[1])&&(g=" + "+n(f,4,!0)),f=e[0]+" ("+K(a,e[1],18)+")"+g,c&&a.u(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.B)&&(g=" - "+n(f,4,!0)),f=e[4]+" ("+K(a,e[5],18)+")"+g,c&&a.u(f),d||(d=f))}else c&&a.u("no symbols");return d}
|
||||
function zf(a,b){var c;if(b&&"?"==b[1])a.u("register commands:"),a.u("\tr\tdump registers"),a.u("\trm\tdump misc registers"),a.u("\trx [#]\tset flag or register x to [#]");else{var d=a.v,e=void 0;null==c&&(c=!0);if(b&&1<b.length){var f=b[1];if("m"==f)e=!0;else{var g=f.indexOf("=");if(0<g)b=f.substr(g+1),f=f.substr(0,g);else if(2<b.length)b=b[2];else{a.u("missing value for "+b[1]);return}g=Ue(a,b);if(void 0===g)return;b=a.ub(f);if(0>b){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case mf:H(h,
|
||||
g);cf(a.M,h.i);break;case pf:rd(h,g);break;case qf:f=131072;break;case rf:f=65536;break;case sf:f=32768;break;case tf:f=32;break;case uf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);J(a.H);a.u("updated registers:")}}a.u(Pf(a,e));c&&(cf(a.M,0<=d.O?d.O:d.i),Af(a,K(a,a.M.B,18)))}}function xg(a,b){b=Ca(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.u(c[2]):Ve(a,null,c[2].charCodeAt(0)):Ue(a,b,!1)}
|
||||
function yg(a,b,c){if("?"==c)a.u("trace commands:"),a.u("\tt [#]\ttrace # instructions"),a.u("\ttr [#]\ttrace # instructions with register updates"),a.u("\ttc [#]\ttrace # cycles"),a.u("note: bn [#] breaks after # instructions without updates");else{var d="t"!=b;c=Qe(a,c,null,!0)||1;var e=0;"tc"==b&&(e=c,c=1);a.Ea=b;Ua(c,function(){return Ob(a,!0)&&tc(a,e,d,!1)},function(){a.na&&a.na.stop();J(a.H,-1);Ob(a,!1)})}}
|
||||
g);cf(a.M,h.i);break;case pf:rd(h,g);break;case qf:f=131072;break;case rf:f=65536;break;case sf:f=32768;break;case tf:f=32;break;case uf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);J(a.H);a.u("updated registers:")}}a.u(Pf(a,e));c&&(cf(a.M,0<=d.O?d.O:d.i),Af(a,K(a,a.M.B,18)))}}function xg(a,b){b=Da(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.u(c[2]):Ve(a,null,c[2].charCodeAt(0)):Ue(a,b,!1)}
|
||||
function yg(a,b,c){if("?"==c)a.u("trace commands:"),a.u("\tt [#]\ttrace # instructions"),a.u("\ttr [#]\ttrace # instructions with register updates"),a.u("\ttc [#]\ttrace # cycles"),a.u("note: bn [#] breaks after # instructions without updates");else{var d="t"!=b;c=Qe(a,c,null,!0)||1;var e=0;"tc"==b&&(e=c,c=1);a.Ea=b;Va(c,function(){return Ob(a,!0)&&tc(a,e,d,!1)},function(){a.na&&a.na.stop();J(a.H,-1);Ob(a,!1)})}}
|
||||
function Af(a,b,c,d){b=gf(a,b,a.M);void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=Qe(a,c.substr(1)),null!=c&&(d=c);else{d=gf(a,c);if(d.B<b.B)return;e=d.B-b.B;if(256<e){a.u("range too large");return}d=-1}for(c=0;0<e&&d--;){var f=Nb(a,!1)||a.O?a.F:null,g=null!=f?"cycles":null,h=Qf(a,b),k=b.B;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var l=h[0]+":";h[2]&&(l+=" "+h[2]);a.u(l)}h[3]&&(g=h[3],f=null);h=a.ka;l=b;h.B=l.B;h.fb=l.fb;h.ra=l.ra;h.U=l.U;a.u(Cf(a,b,g,f));e-=b.B-k;c++}}
|
||||
function Of(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(yf+b):(a.V&&(a.u("ended assemble at "+K(a,a.ka.B,18)),a.V=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ba=null;if(Bb(a)&&0<b.length){a.V&&(b="a "+K(a,a.ka.B,18)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");g[0]=g[0].toLowerCase();if(g&&g.length)for(var h=g[0],k=h.charAt(0),l=1;l<h.length;l++){var p=h.charAt(l);if("?"==k||"r"==k||"a">p||"z"<p){g[0]=h.substr(l);g.unshift(h.substr(0,l));break}}switch(g[0].charAt(0)){case "a":d=
|
||||
tg(a,g);break;case "b":var u=g[0],D=g[1],I=b;if("?"==D)a.u("breakpoint commands:"),a.u("\tbp #\tset exec breakpoint"),a.u("\tbr #\tset read breakpoint"),a.u("\tbw #\tset write breakpoint"),a.u("\tbc #\tclear breakpoint (* to clear all)"),a.u("\tbl\tlist all breakpoints"),a.u("\tbn [#]\tbreak after # instruction(s)");else{var P=u.charAt(1);if("l"==P){var fb;fb=0+Nf(a,a.b);fb+=Nf(a,a.N);(fb+=Nf(a,a.K))||a.u("no breakpoints")}else if("n"==P){var Ab=+D||0;D&&(a.qa=Ab);a.u("break after "+Ab+" instruction(s)")}else if(void 0===
|
||||
D)a.u("missing breakpoint address");else{var G="*"==D?Z():gf(a,D,a.M);"c"==P?null==G.B?(Ze(a),a.u("all breakpoints cleared")):Lf(a,a.b,G)||Lf(a,a.N,G)||Lf(a,a.K,G)||a.u("breakpoint missing: "+K(a,G.B,18)):null!=G.B&&(jf(a,G,I),"p"==P?a.Ra(a.b,G):"r"==P?a.Ra(a.N,G):"w"==P?a.Ra(a.K,G):a.u("unknown breakpoint command: "+P))}}break;case "c":a.za&&(a.za.value="");break;case "d":a:{var gb,hb=g[0],oa=g[1],Da=g[2],Ih=g[3];if("?"==oa){var ib="";for(gb in bc)a.wa[gb]&&(ib&&(ib+=","),ib+=gb);ib+=",state,symbols";
|
||||
a.u("dump memory commands:");a.u("\tdw [a] [n] dump n words at address a");a.u("\tds [a] [n] dump n words at address a as JSON");a.u("\tdh [p] [n] dump n instructions from history position p");ib.length&&a.u("dump extension commands:\n\t"+ib)}else if("state"==oa){var Ld=zg(a.H,!0);"console"==Da?console.log(Ld):(a.za&&(a.za.value=""),Ld&&a.u(Ld))}else if("symbols"==oa)for(var Md=0;Md<a.I.length;Md++){var Nd=a.I[Md],jb;for(jb in Nd.Z)if("."!=jb.charAt(0)){var Rf=Nd.Z[jb].o;if(void 0!==Rf){var Sf=
|
||||
Nd.Z[jb].l;Sf&&(jb=Sf);a.u(K(a,Rf,18)+" "+jb)}}}else{if("d"==hb){for(gb in bc)if(g[1]==gb){var Tf=a.wa[gb];Tf?(g.shift(),g.shift(),Tf(g)):a.u("no dump registered for "+oa);break a}oa||(hb=a.Oa||"dw")}else a.Oa=hb;if("dh"==hb){var Uf=oa,Vf=Da,Wf="",Xf=0,ka=a.W,pa=a.j;if(pa.length){var ea=+Uf||a.Da,Cb=+Vf||10;isNaN(ea)?ea=Cb:Wf="more ";ea>pa.length&&(a.u("note: only "+pa.length+" available"),ea=pa.length);ka-=ea;0>ka&&(null==pa[pa.length-1].B?(ea=ka+ea,ka=0):ka+=pa.length);var Od=[];"call"==Vf&&(Cb=
|
||||
1E5,Od=["CALL"]);for(void 0!==Uf&&a.u(ea+" instructions earlier:");0<Cb&&ka!=a.W;){var Yf=pa[ka++];if(null==Yf.B)break;var Db=Z(Yf.B),Jh=ea--,Zf=Cf(a,Db,"history",Jh);(!Od.length||0<=Zf.indexOf(Od[0]))&&a.u(Zf);Db.sb&&(ka+=Db.sb,Cb-=Db.sb,ea-=Db.sb);ka>=pa.length&&(ka=0);a.Da=ea;Xf++;Cb--}}Xf||(a.u("no "+Wf+"history available"),a.Da=void 0)}else{var Ma=0,$f="ds"==hb,Eb=gf(a,oa,a.pa);Da&&("l"==Da.charAt(0)?(Da=Da.substr(1)||Ih,Ma=Qe(a,Da)):Ma=gf(a,Da).B-Eb.B,0>Ma&&(Ma=0),65536<Ma&&(Ma=65536));var Kh=
|
||||
a.U;Eb.U&&(a.U=Eb.U);for(var ag="db"==hb?1:2,Pd=Ma||32,Qd=1==ag?1:4,Lh=(Pd+Qd-1)/Qd|0||1,Na="";Lh--&&0<Pd;){for(var qa="",Rd="",oa=K(a,Eb.B,18),bg=Qd;0<bg--&&0<Pd--;){var Sd=a.Na(Eb,1);$f?(qa&&(qa+=","),qa+=Sd):(qa+=kf(a,Sd),qa+=" ");for(var Ic=29,Mh=0;1==ag&&0<=Ic;Mh++)var Fb=Sd/Math.pow(2,Ic)%Math.pow(2,7),qa=qa+(K(a,Fb,7)+" "),Fb=Fb+0,Rd=Rd+(32>Fb?".":String.fromCharCode(Fb)),Ic=Ic-7}Na&&(Na+="\n");Na=$f?Na+(qa+","):Na+(oa+": "+qa+(0>bg?" "+Rd:""))}Na&&a.u(Na);a.U=Kh}}}break;case "e":if("else"==
|
||||
tg(a,g);break;case "b":var u=g[0],A=g[1],I=b;if("?"==A)a.u("breakpoint commands:"),a.u("\tbp #\tset exec breakpoint"),a.u("\tbr #\tset read breakpoint"),a.u("\tbw #\tset write breakpoint"),a.u("\tbc #\tclear breakpoint (* to clear all)"),a.u("\tbl\tlist all breakpoints"),a.u("\tbn [#]\tbreak after # instruction(s)");else{var M=u.charAt(1);if("l"==M){var ka;ka=0+Nf(a,a.b);ka+=Nf(a,a.N);(ka+=Nf(a,a.K))||a.u("no breakpoints")}else if("n"==M){var Ab=+A||0;A&&(a.qa=Ab);a.u("break after "+Ab+" instruction(s)")}else if(void 0===
|
||||
A)a.u("missing breakpoint address");else{var G="*"==A?Z():gf(a,A,a.M);"c"==M?null==G.B?(Ze(a),a.u("all breakpoints cleared")):Lf(a,a.b,G)||Lf(a,a.N,G)||Lf(a,a.K,G)||a.u("breakpoint missing: "+K(a,G.B,18)):null!=G.B&&(jf(a,G,I),"p"==M?a.Ra(a.b,G):"r"==M?a.Ra(a.N,G):"w"==M?a.Ra(a.K,G):a.u("unknown breakpoint command: "+M))}}break;case "c":a.za&&(a.za.value="");break;case "d":a:{var gb,hb=g[0],pa=g[1],Ea=g[2],Ih=g[3];if("?"==pa){var ib="";for(gb in bc)a.wa[gb]&&(ib&&(ib+=","),ib+=gb);ib+=",state,symbols";
|
||||
a.u("dump memory commands:");a.u("\tdw [a] [n] dump n words at address a");a.u("\tds [a] [n] dump n words at address a as JSON");a.u("\tdh [p] [n] dump n instructions from history position p");ib.length&&a.u("dump extension commands:\n\t"+ib)}else if("state"==pa){var Ld=zg(a.H,!0);"console"==Ea?console.log(Ld):(a.za&&(a.za.value=""),Ld&&a.u(Ld))}else if("symbols"==pa)for(var Md=0;Md<a.I.length;Md++){var Nd=a.I[Md],jb;for(jb in Nd.Z)if("."!=jb.charAt(0)){var Rf=Nd.Z[jb].o;if(void 0!==Rf){var Sf=
|
||||
Nd.Z[jb].l;Sf&&(jb=Sf);a.u(K(a,Rf,18)+" "+jb)}}}else{if("d"==hb){for(gb in bc)if(g[1]==gb){var Tf=a.wa[gb];Tf?(g.shift(),g.shift(),Tf(g)):a.u("no dump registered for "+pa);break a}pa||(hb=a.Oa||"dw")}else a.Oa=hb;if("dh"==hb){var Uf=pa,Vf=Ea,Wf="",Xf=0,la=a.W,qa=a.j;if(qa.length){var ea=+Uf||a.Da,Cb=+Vf||10;isNaN(ea)?ea=Cb:Wf="more ";ea>qa.length&&(a.u("note: only "+qa.length+" available"),ea=qa.length);la-=ea;0>la&&(null==qa[qa.length-1].B?(ea=la+ea,la=0):la+=qa.length);var Od=[];"call"==Vf&&(Cb=
|
||||
1E5,Od=["CALL"]);for(void 0!==Uf&&a.u(ea+" instructions earlier:");0<Cb&&la!=a.W;){var Yf=qa[la++];if(null==Yf.B)break;var Db=Z(Yf.B),Jh=ea--,Zf=Cf(a,Db,"history",Jh);(!Od.length||0<=Zf.indexOf(Od[0]))&&a.u(Zf);Db.sb&&(la+=Db.sb,Cb-=Db.sb,ea-=Db.sb);la>=qa.length&&(la=0);a.Da=ea;Xf++;Cb--}}Xf||(a.u("no "+Wf+"history available"),a.Da=void 0)}else{var Na=0,$f="ds"==hb,Eb=gf(a,pa,a.pa);Ea&&("l"==Ea.charAt(0)?(Ea=Ea.substr(1)||Ih,Na=Qe(a,Ea)):Na=gf(a,Ea).B-Eb.B,0>Na&&(Na=0),65536<Na&&(Na=65536));var Kh=
|
||||
a.U;Eb.U&&(a.U=Eb.U);for(var ag="db"==hb?1:2,Pd=Na||32,Qd=1==ag?1:4,Lh=(Pd+Qd-1)/Qd|0||1,Oa="";Lh--&&0<Pd;){for(var ra="",Rd="",pa=K(a,Eb.B,18),bg=Qd;0<bg--&&0<Pd--;){var Sd=a.Na(Eb,1);$f?(ra&&(ra+=","),ra+=Sd):(ra+=kf(a,Sd),ra+=" ");for(var Ic=29,Mh=0;1==ag&&0<=Ic;Mh++)var Fb=Sd/Math.pow(2,Ic)%Math.pow(2,7),ra=ra+(K(a,Fb,7)+" "),Fb=Fb+0,Rd=Rd+(32>Fb?".":String.fromCharCode(Fb)),Ic=Ic-7}Oa&&(Oa+="\n");Oa=$f?Oa+(ra+","):Oa+(pa+": "+ra+(0>bg?" "+Rd:""))}Oa&&a.u(Oa);a.U=Kh}}}break;case "e":if("else"==
|
||||
g[0])break;var cg,dg,eg=g[0],Td=g[1];"e"==eg||"ew"==eg?(cg=a.Na,dg=a.zb):Td=null;if(null==Td)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else for(var Ud=gf(a,Td,a.pa),Vd=2;Vd<g.length;Vd++){var Gb=Ue(a,g[Vd]);if(void 0===Gb)break;Gb=hf(Gb);a.u("changing "+K(a,Ud.B,18)+" from "+kf(a,cg.call(a,Ud))+" to "+kf(a,Gb));dg.call(a,Ud,Gb,1)}break;case "g":var fg=g[1],Nh=b;if(void 0!==fg){var gg=gf(a,fg);jf(a,gg,Nh);a.Ra(a.b,gg,!0)}wf(a,!0,c);break;case "h":a.A.P?(c||a.u("halting"),
|
||||
a.Y()):Nb(a,!0)||c||a.u("already halted");break;case "i":if("if"==g[0]){var Wd;var Hb=b.substr(2),Hb=Ca(Hb);Ue(a,Hb)?(c||a.u("true: "+Hb),Wd=!0):(c||a.u("false: "+Hb),Wd=!1);Wd||(d=!1);break}f=!0;break;case "k":var Oh=g[0];if("?"==g[1])a.u("stack trace commands:"),a.u("\tk\tshow frame addresses"),a.u("\tks\tshow symbol information");else{var Xd=0,Yd=Z(),Ib=Z();for(a.u("stack trace for "+K(a,Ib.B,18));10>Xd;){for(var Oa=null,Ph=256;65536>Ib.B>>>0;){Yd.B=a.Na(Ib,2);if(null==Ib.B||!Ph--)break;if(!(Yd.B&
|
||||
1)){for(var Qh=a,Jc=Yd,hg=null,Jb=Jc.B,ig=Jb,Zd=1;6>=Zd&&Jb;Zd++){if(2<Zd){Jc.B=Jb;var Kc=Cf(Qh,Jc);if(0<=Kc.indexOf("JSR")){var jg=Kc.indexOf(" ");if(Jb+(Kc.indexOf(" ",jg+1)-jg-1)/2==ig){hg=Kc;break}}}Jb-=2}Jc.B=ig;if(Oa=hg)break}}if(!Oa||null==Oa)break;var kg=null;if("ks"==Oh){var lg=Oa.match(/[0-9A-F]+$/);lg&&(kg=wg(a,lg[0]))}Oa=Ba(Oa,50)+" ;"+(kg||"stack="+K(a,Ib.B,18));a.u(Oa);Xd++}Xd||a.u("no return addresses found")}break;case "l":if("ln"==g[0]){wg(a,g[1],!0);break}f=!0;break;case "m":a:{var ra,
|
||||
sa=null,M=g[1];"?"==M&&(M=void 0);if(void 0!==M){var Ea=0;if("all"==M)Ea=1879046143,M=null;else if("on"==M)sa=!0,M=null;else if("off"==M)sa=!1,M=null;else{"keys"==M&&(M="key");"kbd"==M&&(M="keyboard");for(ra in bc)if(M==ra){Ea=bc[ra];sa=!!(a.ca&Ea);break}if(!Ea){a.u("unknown message category: "+M);break a}}if(Ea)if("on"==g[2])a.ca|=Ea,sa=!0;else if("off"==g[2]&&(a.ca&=~Ea,sa=!1,1073741824==Ea)){for(var mg=1E3<=a.R.length?a.R.length-1E3:0;mg<a.R.length;)a.u(a.R[mg++]);a.R=[]}}var Rh=0,Kb="";for(ra in bc)if(!M||
|
||||
M==ra){var Sh=!!(a.ca&bc[ra]);if(null===sa||sa==Sh)Kb&&(Kb+=","),++Rh%10||(Kb+="\n\t"),"key"==ra&&(ra="keys"),Kb+=ra}void 0===M&&a.u("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.u((null!==sa?sa?"messages on: ":"messages off: ":"message categories:\n\t")+(Kb||"none"));$e(a)}break;case "p":if("print"==g[0]){xg(a,b.substr(5));break}var ng=g[0],og="p"==ng?0:"pr"==ng?1:-1;if("?"==g[1]||0>og)a.u("step commands:"),a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");
|
||||
a.Y()):Nb(a,!0)||c||a.u("already halted");break;case "i":if("if"==g[0]){var Wd;var Hb=b.substr(2),Hb=Da(Hb);Ue(a,Hb)?(c||a.u("true: "+Hb),Wd=!0):(c||a.u("false: "+Hb),Wd=!1);Wd||(d=!1);break}f=!0;break;case "k":var Oh=g[0];if("?"==g[1])a.u("stack trace commands:"),a.u("\tk\tshow frame addresses"),a.u("\tks\tshow symbol information");else{var Xd=0,Yd=Z(),Ib=Z();for(a.u("stack trace for "+K(a,Ib.B,18));10>Xd;){for(var Pa=null,Ph=256;65536>Ib.B>>>0;){Yd.B=a.Na(Ib,2);if(null==Ib.B||!Ph--)break;if(!(Yd.B&
|
||||
1)){for(var Qh=a,Jc=Yd,hg=null,Jb=Jc.B,ig=Jb,Zd=1;6>=Zd&&Jb;Zd++){if(2<Zd){Jc.B=Jb;var Kc=Cf(Qh,Jc);if(0<=Kc.indexOf("JSR")){var jg=Kc.indexOf(" ");if(Jb+(Kc.indexOf(" ",jg+1)-jg-1)/2==ig){hg=Kc;break}}}Jb-=2}Jc.B=ig;if(Pa=hg)break}}if(!Pa||null==Pa)break;var kg=null;if("ks"==Oh){var lg=Pa.match(/[0-9A-F]+$/);lg&&(kg=wg(a,lg[0]))}Pa=Ca(Pa,50)+" ;"+(kg||"stack="+K(a,Ib.B,18));a.u(Pa);Xd++}Xd||a.u("no return addresses found")}break;case "l":if("ln"==g[0]){wg(a,g[1],!0);break}f=!0;break;case "m":a:{var sa,
|
||||
ta=null,N=g[1];"?"==N&&(N=void 0);if(void 0!==N){var Fa=0;if("all"==N)Fa=1879046143,N=null;else if("on"==N)ta=!0,N=null;else if("off"==N)ta=!1,N=null;else{"keys"==N&&(N="key");"kbd"==N&&(N="keyboard");for(sa in bc)if(N==sa){Fa=bc[sa];ta=!!(a.ca&Fa);break}if(!Fa){a.u("unknown message category: "+N);break a}}if(Fa)if("on"==g[2])a.ca|=Fa,ta=!0;else if("off"==g[2]&&(a.ca&=~Fa,ta=!1,1073741824==Fa)){for(var mg=1E3<=a.R.length?a.R.length-1E3:0;mg<a.R.length;)a.u(a.R[mg++]);a.R=[]}}var Rh=0,Kb="";for(sa in bc)if(!N||
|
||||
N==sa){var Sh=!!(a.ca&bc[sa]);if(null===ta||ta==Sh)Kb&&(Kb+=","),++Rh%10||(Kb+="\n\t"),"key"==sa&&(sa="keys"),Kb+=sa}void 0===N&&a.u("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.u((null!==ta?ta?"messages on: ":"messages off: ":"message categories:\n\t")+(Kb||"none"));$e(a)}break;case "p":if("print"==g[0]){xg(a,b.substr(5));break}var ng=g[0],og="p"==ng?0:"pr"==ng?1:-1;if("?"==g[1]||0>og)a.u("step commands:"),a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");
|
||||
else if(a.O)a.u("step in progress");else{var pg=Z(a.v.i);a.Na(pg);a.O?(a.Ra(a.b,pg,!0),wf(a)||(a.H&&jd(a.H),a.O=0)):yg(a,og?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}zf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var kb=+g[2];if(2==kb||8==kb||10==kb||16==kb)a.U=kb;else{a.u("invalid base: "+kb);break}}a.u("default base: "+a.U);break;case "cs":var Lb;void 0!==g[3]&&(Lb=+g[3]);switch(g[2]){case "int":a.v.pa=Lb;break;case "start":a.v.Ia=Lb;break;case "stop":a.v.ua=Lb;
|
||||
break;default:a.u("unknown cs option");break a}void 0!==Lb&&bd(a.v);a.u("checksums "+(a.v.A.Va?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(gd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ga.toFixed(2)+"Mhz")+" ("+a.v.ka+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"),a.u("\tcs start #\tset checksum cycle start count to #"),
|
||||
a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":yg(a,g[0],g[1]);break;case "u":Af(a,g[1],g[2],8);break;case "v":if("var"==g[0]){vg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.3 ("+a.v.nb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){xg(a,b.substr(1));break}var $d="commands:",ae;for(ae in Ag)$d+="\n"+Ba(ae,9)+Ag[ae];td(a)||($d+="\nnote: history disabled if no exec breakpoints");
|
||||
a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":yg(a,g[0],g[1]);break;case "u":Af(a,g[1],g[2],8);break;case "v":if("var"==g[0]){vg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.3 ("+a.v.nb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){xg(a,b.substr(1));break}var $d="commands:",ae;for(ae in Ag)$d+="\n"+Ca(ae,9)+Ag[ae];td(a)||($d+="\nnote: history disabled if no exec breakpoints");
|
||||
a.u($d);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(rg){a.u("Debugger "+(rg.stack||rg.message)),d=!1}return d}function ed(a,b,c){null!=b&&(a.Ha=Ke(a,b,c));for(;b=a.Ha.shift();)if(!Of(a,b))return!1;return!0}
|
||||
var Ag={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Hf=20,If=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "),
|
||||
mf=0,nf=1,of=2,pf=3,qf=4,rf=5,sf=6,tf=7,uf=8,lf="PC RA EA PS OV C0 C1 ND PD".split(" "),Bg={},Df=(Bg[28672]={0:101},Bg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},Bg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Hf,9216:53,
|
||||
9472:52,9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},Bg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},Bg[29248]={24576:79,24640:80,25088:81,25152:82},Bg[28700]={28672:93,28676:94,28680:95,28684:96,
|
||||
28688:97,28692:98,28696:99,28700:100},Bg),Ef=["","I","M","S"],Ff=" L E LE A GE N G".split(" "),Gf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Jf=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],vf=1E3,yf=">> ";Xa(function(){for(var a=w(document,v,"debugger"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new Ye(d);sb(d,c)}});
|
||||
28688:97,28692:98,28696:99,28700:100},Bg),Ef=["","I","M","S"],Ff=" L E LE A GE N G".split(" "),Gf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Jf=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],vf=1E3,yf=">> ";Ya(function(){for(var a=w(document,v,"debugger"),b=0;b<a.length;b++){var c=a[b],d=t(c),d=new Ye(d);sb(d,c)}});
|
||||
function ug(a,b,c,d,e){this.la=b;this.W=c||"";this.b=d;this.done=e;this.H=null;this.v={};this.N={};this.R=[];this.O=[];this.S=[];this.ea=[];this.ba=this.V=this.ia=0;this.X=this.la||0;this.Fa=-1;this.w=[];this.M=null;this.i=0;this.L=null;this.J=this.I="";this.ga=/^[ \t]*([A-Z$%.?][0-9A-Z$%.]*:|)[ \t]*([A-Z$%.][0-9A-Z$%.]*|)([ \t]*)([^;]+|)(;?[\s\S]*)/i;this.D=this.j=null;this.C="";this.G=[];this.K=0;this.F=a.split(";");this.T=[];Cg(this)}
|
||||
function Cg(a){if(a.K==a.F.length)a.done(Dg(a));else{var b=a.F[a.K];a.u("loading "+wa(b));0>b.indexOf(":")&&0<=".MAC.KLM".indexOf(b.slice(-4).toUpperCase())&&(b+=".txt");Ha(b,null,!0,function(b,d,e){if(e)a.done(e,b);else{e=d;if(ya(b,".html")){e="";var c;for(b=/<pre>([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&Eg(a,"unrecognized HTML entity '"+c[0]+"'")}d=e.split(/(\r?\n)/);if(d.length&
|
||||
function Cg(a){if(a.K==a.F.length)a.done(Dg(a));else{var b=a.F[a.K];a.u("loading "+xa(b));0>b.indexOf(":")&&0<=".MAC.KLM".indexOf(b.slice(-4).toUpperCase())&&(b+=".txt");Ia(b,null,!0,function(b,d,e){if(e)a.done(e,b);else{e=d;if(za(b,".html")){e="";var c;for(b=/<pre>([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&Eg(a,"unrecognized HTML entity '"+c[0]+"'")}d=e.split(/(\r?\n)/);if(d.length&
|
||||
1){if(c=d.pop())Eg(a,"unexpected line '"+c+"'"),d.push(c),d.push("")}else Eg(a,"unexpected number of lines ("+d.length+")");a.G=a.G.concat(d);a.T[a.K]=d.length>>1;a.K++;setTimeout(function(){Cg(a)},0)}})}}
|
||||
function Dg(a){if(0<=a.W.indexOf("p"))return a.u(a.G.join("")),0;var b=We(a.b);try{for(var c=0;c<a.G.length;c+=2){a.ia++;0<=a.W.indexOf("l")&&a.u(Fg(a)+": "+a.G[c]);if(!Gg(a,a.G[c]+"\r\n"))break;if(null!==a.H)break}a.i&&a.error("open block",a.v[a.L].ia);a.w.length&&a.error("open scope",a.w[0].ia);for(var d=a.X,c={},e=0;e<a.R.length;c={S:c.S,Ta:c.Ta,Aa:c.Aa},e++){c.Aa=a.R[e];c.S=[];c.Ta=0;c.Aa.S.forEach(function(a){return function(b,c){c===a.S.length&&a.S.push(b);a.Ta++}}(c));if(c.Ta==c.S.length)for(var f=
|
||||
d;f+c.Ta<=a.X;f++){for(var g=void 0,g=0;g<c.Ta&&c.S[g]===a.S[f+g]&&c.Aa.ea[g]==a.ea[f];g++);if(g==c.Ta){Hg(a,c.Aa.name,f,Ig);c.Aa=null;break}}c.Aa&&(Hg(a,c.Aa.name,a.X,Ig),c.Aa.S.forEach(function(b){return function(c,d){Jg(a,c,b.Aa.ea[d])}}(c)))}for(d=0;d<a.O.length;d++){var h=a.O[d],k=a.v[h];k?Kg(a,k.ma):a.error("missing definition for variable '"+h+"'")}a.ea.forEach(function(b,c){var d=Lg(a,b,void 0,c);void 0===d?a.error("unable to parse expression '"+b+"'"):(d+=a.S[c],a.S[c]=Mg(a,d,c))})}catch(l){a.u(l.message),
|
||||
d;f+c.Ta<=a.X;f++){for(var g=void 0,g=0;g<c.Ta&&c.S[g]===a.S[f+g]&&c.Aa.ea[g]==a.ea[f];g++);if(g==c.Ta){Hg(a,c.Aa.name,f,Ig);c.Aa=null;break}}c.Aa&&(Hg(a,c.Aa.name,a.X,Ig),c.Aa.S.forEach(function(b){return function(c,d){Jg(a,c,b.Aa.ea[d])}}(c)))}for(d=0;d<a.O.length;d++){var h=a.O[d],k=a.v[h];k?Kg(a,k.ma):a.error("missing definition for variable '"+h+"'")}a.ea.forEach(function(b,c){var d=Lg(a,b,!1,c);void 0===d?a.error("unable to parse expression '"+b+"'"):(d+=a.S[c],a.S[c]=Mg(a,d,c))})}catch(l){a.u(l.message),
|
||||
a.V=-1}a.b.i=b;return a.V}
|
||||
function Gg(a,b,c,d,e){var f;if(a.i&&(1==a.i&&(f=b.indexOf(a.J),0<=f?(a.i++,b=b.substr(f+1)):a.error("expected "+a.M+" definition in '"+b+"'")),1<a.i&&(b=Ng(a,b)),a.i))return!0;null!=a.D&&(b=Og(a,b));var g=!0;f="";for(var h;g;){h=b.match(a.ga);if(!h||h[5]&&";"!=h[5].slice(0,1))return a.error("failed to parse line '"+b+"'"),!1;g=!1;f=h[2].toUpperCase();if(f==Pg||f==Qg)c=null;if(c){for(var k=0;k<c.length;k++)for(var l=c[k],p=d[k]||e[k]||"",u=0,D=b.length-h[5].length;u<D;){var I=b.indexOf(l,u);if(0>
|
||||
I)break;var u=I+1,P=I+l.length,fb="",Ab="";I&&(fb=b[I-1]).match(/[0-9A-Z$%.]/i)||!(P>=b.length)&&(Ab=b[P]).match(/[0-9A-Z$%.]/i)||("'"==fb&&I--,"'"==Ab&&P++,b=b.substr(0,I)+p+b.substr(P),u=I+p.length,g=!0)}c=null}}d=h[1];b=h[3];c=h[4].trim();h=h[4]+h[5];d&&(d=d.slice(0,-1),Hg(a,d,a.X,Ig));var G;f&&(G=c.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=G[1],c=G[2],"=="==f?e|=Rg:"=:"==f&&(e|=Sg),Hg(a,d,c,e),f=c="");if(!f&&!c)return!0;a.M=f;if(G=Tg(a,c))c=c.replace(G,Ug(a,Vg,Tg(a,h))),b||(b="\t");for(;G=Wg(a,c);)c=
|
||||
function Gg(a,b,c,d,e){var f;if(a.i&&(1==a.i&&(f=b.indexOf(a.J),0<=f?(a.i++,b=b.substr(f+1)):a.error("expected "+a.M+" definition in '"+b+"'")),1<a.i&&(b=Ng(a,b)),a.i))return!0;null!=a.D&&(b=Og(a,b));var g=!0;f="";for(var h;g;){h=b.match(a.ga);if(!h||h[5]&&";"!=h[5].slice(0,1))return a.error("failed to parse line '"+b+"'"),!1;g=!1;f=h[2].toUpperCase();if(f==Pg||f==Qg)c=null;if(c){for(var k=0;k<c.length;k++)for(var l=c[k],p=d[k]||e[k]||"",u=0,A=b.length-h[5].length;u<A;){var I=b.indexOf(l,u);if(0>
|
||||
I)break;var u=I+1,M=I+l.length,ka="",Ab="";I&&(ka=b[I-1]).match(/[0-9A-Z$%.]/i)||!(M>=b.length)&&(Ab=b[M]).match(/[0-9A-Z$%.]/i)||("'"==ka&&I--,"'"==Ab&&M++,b=b.substr(0,I)+p+b.substr(M),u=I+p.length,g=!0)}c=null}}d=h[1];b=h[3];c=h[4].trim();h=h[4]+h[5];d&&(d=d.slice(0,-1),Hg(a,d,a.X,Ig));var G;f&&(G=c.match(/^([=:]+)(.*)/))&&(e=0,d=f,f=G[1],c=G[2],"=="==f?e|=Rg:"=:"==f&&(e|=Sg),Hg(a,d,c,e),f=c="");if(!f&&!c)return!0;a.M=f;if(G=Tg(a,c))c=c.replace(G,Ug(a,Vg,Tg(a,h))),b||(b="\t");for(;G=Wg(a,c);)c=
|
||||
c.replace(G,G.slice(0,-1));if(!Xg(a,f,c))switch(f){case Yg:case Zg:case $g:Og(a,h);break;case ah:f=c;G=Lg(a,f);void 0!==G&&null==a.b.ja&&0<=G&&262143>=G?a.X+=G:a.error("unrecognized BLOCK expression '"+f+"'");break;case bh:(f=c)?(a.H=Lg(a,f,!0),void 0===a.H&&a.error("unrecognized END expression '"+f+"'")):a.H=a.la;break;case ch:dh(a,c);break;case eh:a.X=Lg(a,c)||0;break;case fh:dh(a,c.replace(",",",,"));break;case gh:case hh:case ih:case jh:case kh:case lh:case mh:case Pg:case Qg:case nh:case oh:Ug(a,
|
||||
f,h);break;case ph:case qh:case rh:case sh:case th:case uh:case vh:break;default:f=(f+b+c).trim(),G=Lg(a,f,!0),void 0!==G?Jg(a,G,a.b.ja):a.error("unrecognized word expression '"+f+"'")}return!0}
|
||||
function Xg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c){if(d.Sa==wh){var e=a.X;Kg(a,d.ma);if(e<a.X){if(!c)return!0;xh(a);Kg(a,c);var d=a.S[0],f=a.ea[0];yh(a);if(void 0!==d)return a.S[e]+=d&130023423,a.S[e]|=d&4194304,f&&(a.ea[e]=a.ea[e]?a.ea[e]+("+"+f):f),!0}a.error("OPDEF '"+b+"' ("+c+") failed");return!1}b=a.j;a.j=d;d.Qa=zh(a,c,!0);Kg(a,d.ma,d.Ua,d.Qa,d.Bb);a.j=b;return!0}if("?"!=b[0])return!1;switch(b.substr(1)){case ih:case mh:d.Sa||Kg(a,d.ma);break;case jh:0<d.Sa&&Kg(a,d.ma);break;case kh:0>
|
||||
d.Sa&&Kg(a,d.ma);break;case lh:case hh:d.Sa&&Kg(a,d.ma);break;case Pg:case Qg:for(b=0;b<d.Qa.length;b++)Kg(a,d.ma,d.Ua,[d.Qa[b]],[]);break;case oh:for(;0<d.Sa--;)Kg(a,d.ma);break;default:c=d.ma,xh(a,b),Kg(a,c),yh(a)}return!0}function Kg(a,b,c,d,e){b=b.split(/\r?\n/);for(var f=0;f<b.length&&Gg(a,b[f]+"\r\n",c,d,e);f++);}function xh(a,b){a.w.push({name:b,S:a.S,ea:a.ea,X:a.X,Fa:a.Fa,ia:a.ia});a.S=[];a.ea=[];0>a.Fa&&(a.Fa=a.X);a.X=0}
|
||||
function yh(a){if(a.w.length){var b=a.w[a.w.length-1].name;b&&a.R.push({name:b,S:a.S,ea:a.ea});b=a.w.pop();a.S=b.S;a.ea=b.ea;a.X=b.X;a.Fa=b.Fa;a.w.length||-1==a.Fa||a.error("scope restore error")}else a.error("scope nesting error")}
|
||||
function Ah(a,b){var c;c=void 0===c?",":c;for(var d=0,e=!1,f=null,g=0;d<b.length;){var h=b[d++];if('"'==h)e=!e;else if(!e){if(!g&&0<=c.indexOf(h)){d--;break}if("<"==h)g++;else if(">"==h&&0>--g){a.error("missing bracket(s) in '"+b+"'");break}}}g?0<g&&a.error("extra bracket(s) in '"+b+"'"):f=b.substr(0,d);return f}
|
||||
function Lg(a,b,c,d){var e,f=b.match(/^([^,]*),,([^,]*)$/);if(f)b=f[1]?Lg(a,f[1],c,d):0,void 0!==b&&(c=f[2]?Lg(a,f[2],c,d):0,void 0!==c&&(e=Y(a.b,b,18,!0)*Math.pow(2,18)+Y(a.b,c,18,!0)));else{void 0===d&&(d=0<=a.Fa?a.Fa:a.X);b=b.replace(/SIXBIT\s*(\S)(.*?)\1/g,"'$2'").replace(/ASCII\s*(\S)(.*?)\1/g,'"$2"');e="";var g=b;if(f=b.match(/^([^\s]+)\s*(.*?)\s*$/))e=f[1],g=f[2];e=Kf(a.b,e,g,d,!0);0>e&&(e=Ue(a.b,b.replace(/\.([^0-9]|$)/g,K(a.b,d,-1)+"$1"),c),void 0===e&&a.error("unable to parse expression '"+
|
||||
b+"'"))}return e}function Tg(a,b){for(var c=0,d="",e=0,f=-1,g=b.length;e<b.length;){var h=b[e];if(";"==h)break;"["==h&&(c++||(f=e));e++;if("]"==h&&0>=--c){g=e;break}}0>c&&a.error("missing bracket(s) in '"+b+"'");0<=f&&(d=b.substr(f,g-f));return d}function Fg(a,b){b=void 0===b?a.ia:b;for(var c=0;b>a.T[c];)if(b-=a.T[c],c<a.F.length-1)c++;else break;return wa(a.F[c]+" line "+b)}
|
||||
function Lg(a,b,c,d){var e,f=b.match(/^([^,]*),,([^,]*)$/);if(f)b=f[1]?Lg(a,f[1],c,d):0,void 0!==b&&(c=f[2]?Lg(a,f[2],c,d):0,void 0!==c&&(e=Y(a.b,b,18,!0)*Math.pow(2,18)+Y(a.b,c,18,!0)));else{void 0===d&&(d=0<=a.Fa?a.Fa:a.X);b=b.replace(/SIXBIT\s*(\S)(.*?)\1/g,"'$2'").replace(/ASCII\s*(\S)(.*?)\1/g,'"$2"');e=-1;if(!1!==c){e="";var g=b;if(f=b.match(/^([^\s]+)\s*(.*?)\s*$/))e=f[1],g=f[2];e=Kf(a.b,e,g,d,c,!0)}0>e&&(!1===c&&(c=void 0),e=Ue(a.b,b.replace(/\.([^0-9]|$)/g,K(a.b,d,-1)+"$1"),c),void 0===e&&
|
||||
a.error("unable to parse expression '"+b+"'"))}return e}function Tg(a,b){for(var c=0,d="",e=0,f=-1,g=b.length;e<b.length;){var h=b[e];if(";"==h)break;"["==h&&(c++||(f=e));e++;if("]"==h&&0>=--c){g=e;break}}0>c&&a.error("missing bracket(s) in '"+b+"'");0<=f&&(d=b.substr(f,g-f));return d}function Fg(a,b){b=void 0===b?a.ia:b;for(var c=0;b>a.T[c];)if(b-=a.T[c],c<a.F.length-1)c++;else break;return xa(a.F[c]+" line "+b)}
|
||||
function Wg(a,b){var c=null;if(b=b.match(/([A-Z$%.][0-9A-Z$%.]*)#/i)){c=b[0];b=b[1];var d="?"+b;if(!a.v[d]){var e,f,g;e=f=g=[];a.v[d]={name:d,Sa:Bh,Ua:e,Bb:f,Qa:g,ma:b+": 0",ia:a.ia};a.O.push(d)}}return c}
|
||||
function zh(a,b,c){var d=[];for(c&&(b=b.replace(/^\(?(.*?)\)?$/,"$1"));b;){b=b.trim();c=Ah(a,b);if(!c)break;var e=c;if("\\"==c[0]){var f=1,g=0;"'"==c[1]?(f++,g=6):'"'==c[1]&&(f++,g=7);var e=a,f=c.substr(f),g=void 0===g?0:g,h=Lg(e,f);if(void 0!==h){var k=5;switch(g){case 0:f=K(e.b,h,-1);break;case 6:k++;case 7:for(;h&&k--;)h=Math.trunc(h/Math.pow(2,g))}}e=f}d.push(e);b=b.substr(c.length+1)}return d}
|
||||
function Og(a,b){var c=b;null==a.D&&(a.D=a.C="",b&&(a.D=b[0],c=b=b.substr(1)));if(a.D){var d=b.indexOf(a.D);0>d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.D=null);a.C+=b}if(null==a.D){var d=b=0,e,f,g=a.C.length;a.M==Zg&&g++;for(var h=0;h<g;h++){b||(d=0,f=29,e=7,a.M==$g&&(e--,f++));var k=a.C.charCodeAt(h)&127;6==e&&(97<=k&&122>=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Jg(a,d),b=0)}b&&Jg(a,d)}return c}
|
||||
function Ug(a,b,c){var d,e,f,g,h,k;a.J="<";a.I=">";g=h=k=[];if(b==gh){e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*,?\s*(<|)([\s\S]*)/i);if(!e)return a.error("unrecognized "+b+" in '"+c+"'"),c;f=e[1];if(e[2]&&","!=e[2]){h=g=zh(a,e[2],!0);b=[];for(c=0;c<h.length;c++)if(d=h[c].indexOf("<"),0<=d){var l=h[c].lastIndexOf(">");0>l&&(l=h[c].length);b[c]=h[c].substr(d,l-d);h[c]=h[c].substr(0,d)}h=b}b=Ch;c=3}else if(b==nh){a.J="[";a.I="]";e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\[)([\s\S]*)/i);if(!e)return a.error("unrecognized "+
|
||||
b+" in '"+c+"'"),c;f=e[1];b=wh;c=2}else if(b==Vg)a.J="[",a.I="]",f="?"+va(++a.ba,5),a.v[f]&&a.error("literal symbol '"+f+"' redefined"),e=[c[0],c.substr(1)],b=Dh,c=0;else if(b==Pg||b==Qg){a.j||a.error(b+" outside of macro");e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*,\s*(<|)([\s\S]*)/i);if(!e)return a.error("unrecognized "+b+" operands '"+c+"'"),c;for(d=0;d<a.j.Ua.length&&e[1]!=a.j.Ua[d];d++);if(d==a.j.Ua.length)return a.error("invalid "+b+" parameter '"+e[1]+"'"),c;f="?"+b;g=[e[1]];b==Qg?k=a.j.Qa[d].split(""):
|
||||
b+" in '"+c+"'"),c;f=e[1];b=wh;c=2}else if(b==Vg)a.J="[",a.I="]",f="?"+wa(++a.ba,5),a.v[f]&&a.error("literal symbol '"+f+"' redefined"),e=[c[0],c.substr(1)],b=Dh,c=0;else if(b==Pg||b==Qg){a.j||a.error(b+" outside of macro");e=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*,\s*(<|)([\s\S]*)/i);if(!e)return a.error("unrecognized "+b+" operands '"+c+"'"),c;for(d=0;d<a.j.Ua.length&&e[1]!=a.j.Ua[d];d++);if(d==a.j.Ua.length)return a.error("invalid "+b+" parameter '"+e[1]+"'"),c;f="?"+b;g=[e[1]];b==Qg?k=a.j.Qa[d].split(""):
|
||||
k=zh(a,a.j.Qa[d]);b=k.length;c=2}else{d=Ah(a,c);if(!d)return a.error("missing "+b+" expression '"+c+"'"),c;c=c.substr(d.length+1);d=d.trim();e=c.match(/\s*(<|)([\s\S]*)/i);f="?"+b;b=b==hh||b==mh?a.v[d]||a.N[d]||void 0!==a.b.i[d]?1:0:Lg(a,d)||0;c=1}f=f.toUpperCase();a.i=1;a.L=f;a.v[f]={name:f,Sa:b,Ua:g,Bb:h,Qa:k,ma:"",ia:a.ia};e[c]&&(a.i=2,Ng(a,e[c+1]));return f}
|
||||
function Ng(a,b){for(var c="",d=0;d<b.length;d++)if(b[d]==a.J)a.i++;else if(b[d]==a.I&&(a.i--,1==a.i)){a.i=0;c=b.substr(d+1);b=b.substr(0,d);break}d=a.L||"";a.v[d].ma+=b;a.i||(a.L=null,Xg(a,d));return c}
|
||||
function Hg(a,b,c,d){d=void 0===d?0:d;b=b.toUpperCase().substr(0,6);if(d&Ig&&a.N[b])a.error("label '"+b+"' redefined");else{var e=null;if("string"==typeof c){e=Lg(a,c,!0);if(void 0===e){a.error("parseExpression("+c+") failed");return}c=e;e=a.b.ja}var f=a.N[b];f?(f.value=c,f.Wb=d,f.ia=a.ia):a.N[b]={name:b,value:c,Wb:d,ia:a.ia};a.b.i[b]={value:c,ja:e}}}function dh(a,b){var c=Lg(a,b,!0);void 0!==c?Jg(a,c,a.b.ja):a.error("unrecognized EXP expression '"+b+"'")}
|
||||
function Jg(a,b,c){a.S[a.X]=Mg(a,b);null!=c&&(a.ea[a.X]=c);a.X++}function Mg(a,b,c){c=void 0===c?a.X:c;var d=Y(a.b,b||0,36,!0);(b<-A||b>=C)&&Eg(a,"truncated value "+ua(b)+" at location "+ua(c)+" to "+ua(d));return d}ug.prototype.error=function(a,b){throw Error("error in "+Fg(this,b)+": "+a);};function Eg(a,b){a.u("warning in "+Fg(a,void 0)+": "+b)}ug.prototype.u=function(a){this.b?this.b.u(a):console.log(a)};
|
||||
function Jg(a,b,c){a.S[a.X]=Mg(a,b);null!=c&&(a.ea[a.X]=c);a.X++}function Mg(a,b,c){c=void 0===c?a.X:c;var d=Y(a.b,b||0,36,!0);(b<-B||b>=D)&&Eg(a,"truncated value "+va(b)+" at location "+va(c)+" to "+va(d));return d}ug.prototype.error=function(a,b){throw Error("error in "+Fg(this,b)+": "+a);};function Eg(a,b){a.u("warning in "+Fg(a,void 0)+": "+b)}ug.prototype.u=function(a){this.b?this.b.u(a):console.log(a)};
|
||||
var Ig=1,Rg=2,Sg=4,Yg="ASCII",Zg="ASCIZ",ah="BLOCK",gh="DEFINE",bh="END",ch="EXP",hh="IFDEF",ih="IFE",jh="IFG",kh="IFL",lh="IFN",mh="IFNDEF",Pg="IRP",Qg="IRPC",ph="LALL",Vg="LITERAL",qh="LIST",eh="LOC",rh="NOSYM",nh="OPDEF",sh="PAGE",oh="REPEAT",$g="SIXBIT",th="SUBTTL",uh="TITLE",fh="XWD",vh="XLIST",Ch=-1,wh=-2,Dh=-3,Bh=-4;
|
||||
function Eh(a,b,c){r.call(this,"Computer",a,33554432);this.A.aa=!1;this.R=null;Fh(this,b);this.N=$c(this,"autoPower",a,6);this.w=0;this.W=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.V=!1;this.I=this.C=null;this.T=this.O=!1;this.ba=$c(this,"url")||"";(Math.random()+.1).toString(36);this.i=Gh(this);if(this.v=rb("CPU",this.id)){this.D=rb("Debugger",this.id);this.G=new Ac({id:this.cb+".bus",busWidth:this.W},this.v,this.D);var d,e=pb(this.id);if((this.j=rb("Panel",this.id))&&this.j.za)for(b=
|
||||
0;b<e.length;b++)d=e[b],d.ha=this.j.ha,d.u=this.j.u,d.za=this.j.za;this.u(Rb+" v1.34.3\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.Ma&&d.Ma(this,this.G,this.v,this.D);b=null;d=$c(this,"resume",a);void 0!==d&&(1<d.length?b=this.F=d:this.b=parseInt(d,10));var f;if(a=$c(this,"state")||(f=!0,a.state))this.M=b=a,f||(this.K=!0,this.b=Hh),this.b&&(this.I=new F(this,"1.34.3"),Th(this.I)?b=null:
|
||||
delete this.I);!b&&this.b&&(b=Uh(this))&&(this.K=!0);if(b){var g=this;Ha(b,null,!0,function(a,b,c){c?(g.F=null,g.K=!1,g.ha("Unable to load machine state from server (error "+c+(b?": "+Ca(b):"")+")")):(g.L=b,g.V=!0);Mb(g)})}else Mb(this);this.J.power||(this.N=!0);!c&&this.N&&Vh(this,this.Xa)}else q("Unable to find CPU component")}ja(Eh,r);function Fh(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.R=b}
|
||||
function $c(a,b,c,d){var e=b.toLowerCase(),e=Sa(b)||Sa(e);void 0===e&&a.R&&(e=a.R[b]);void 0===e&&c&&(e=c[b]);void 0===e&&"object"==typeof resources&&resources[b]&&(e=b);void 0===e&&(e=void 0);if("string"==typeof e&&d)switch(d){case 4:e=+e;isNaN(e)&&(e=0);break;case 6:e="true"==e}return e}function Vh(a,b,c){for(var d=pb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Bb(f)){Bb(f,function(){Vh(a,b,c)});return}}b.call(a,c)}
|
||||
delete this.I);!b&&this.b&&(b=Uh(this))&&(this.K=!0);if(b){var g=this;Ia(b,null,!0,function(a,b,c){c?(g.F=null,g.K=!1,g.ha("Unable to load machine state from server (error "+c+(b?": "+Da(b):"")+")")):(g.L=b,g.V=!0);Mb(g)})}else Mb(this);this.J.power||(this.N=!0);!c&&this.N&&Vh(this,this.Xa)}else q("Unable to find CPU component")}ja(Eh,r);function Fh(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.R=b}
|
||||
function $c(a,b,c,d){var e=b.toLowerCase(),e=Ta(b)||Ta(e);void 0===e&&a.R&&(e=a.R[b]);void 0===e&&c&&(e=c[b]);void 0===e&&"object"==typeof resources&&resources[b]&&(e=b);void 0===e&&(e=void 0);if("string"==typeof e&&d)switch(d){case 4:e=+e;isNaN(e)&&(e=0);break;case 6:e="true"==e}return e}function Vh(a,b,c){for(var d=pb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Bb(f)){Bb(f,function(){Vh(a,b,c)});return}}b.call(a,c)}
|
||||
function Wh(a,b){var c=new F(a,"1.34.3",Xh);if(Th(c)&&Yh(c)){var d=c.get(Zh),e=b?b.get(Zh):"unknown";d!=e&&(a.ha("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}m=Eh.prototype;
|
||||
m.Xa=function(a){void 0===a&&(a=this.b||(this.L?$h:Hh));if(!this.w){this.w++;var b=!1,c=!1;this.O=!1;var d=this.I||new F(this,"1.34.3");if(a==ai)b=!0;else if(a>Hh){if(Th(d,this.L)){this.C=new F(this,"1.34.3",bi);Th(this.C)&&(ci(this,d),a=di,ei(this.C));this.C.set(Zh,Ga());fi(this.C);var e=this.b&&!this.K;if(a==$h||ob("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=Yh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Th(d,g):("error"==f&&"no machine state"!=
|
||||
g?(this.ha("Error: "+g),"unable to verify user"==g&&(Qa(gi,""),this.i=null)):this.u(f+": "+g),ei(d),Th(d)?(c=Yh(d),e=!0):c=!1))}e&&Wh(this,c?d:null)}else a==di&&d.clear()}else Wh(this);delete this.L;delete this.I}e=pb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.v&&(c=hi(this,g,d,b,c));b=[d,a,c];a!=ai?Vh(this,this.Ib,b):this.Ib(b)}};
|
||||
m.Xa=function(a){void 0===a&&(a=this.b||(this.L?$h:Hh));if(!this.w){this.w++;var b=!1,c=!1;this.O=!1;var d=this.I||new F(this,"1.34.3");if(a==ai)b=!0;else if(a>Hh){if(Th(d,this.L)){this.C=new F(this,"1.34.3",bi);Th(this.C)&&(ci(this,d),a=di,ei(this.C));this.C.set(Zh,Ha());fi(this.C);var e=this.b&&!this.K;if(a==$h||ob("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=Yh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Th(d,g):("error"==f&&"no machine state"!=
|
||||
g?(this.ha("Error: "+g),"unable to verify user"==g&&(Ra(gi,""),this.i=null)):this.u(f+": "+g),ei(d),Th(d)?(c=Yh(d),e=!0):c=!1))}e&&Wh(this,c?d:null)}else a==di&&d.clear()}else Wh(this);delete this.L;delete this.I}e=pb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.v&&(c=hi(this,g,d,b,c));b=[d,a,c];a!=ai?Vh(this,this.Ib,b):this.Ib(b)}};
|
||||
function hi(a,b,c,d,e){if(!b.A.aa){b.A.aa=!0;var f=null;try{if(e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,".")))),"string"===typeof f&&(f=null),!b.Ba(f,d)&&f&&(q("Unable to restore state for "+b.type),a.M&&!a.V?(c.clear(),a.b=Hh,window&&window.location.reload()):a.O=!0,b.Ba(null),e=!1),!d&&b.Eb){var g=b.Eb.split("|");for(a=0;a<g.length;a++)b.status(g[a])}}catch(h){q("Error restoring state for "+b.type+" ("+h.message+")")}}return e}
|
||||
m.Ib=function(a){var b=a[0],c=0>a[1];a=a[2];this.T=!0;this.A.aa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(hi(this,this.v,b,c,a),J(this,-2),this.v.fa());this.O&&(ci(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0};
|
||||
function ci(a,b){if(ob("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.ba;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.3";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function zg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new F(a,"1.34.3"),g=new F(a,"1.34.3",Xh),h=Ga();g.set(Zh,h);f.set(Zh,h);f.set(ii,"1.34.3");f.set(ji,window?window.location.href:null);f.set(ki,window?window.navigator.userAgent:"");a.v&&a.v.sa&&(c&&(b&&(a.v.A.fa=a.v.A.P),a.v.Y()),d=a.v.sa(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.aa=!1,!1===d&&(e=null)));for(var h=pb(a.id),k=0;k<h.length;k++){var l=h[k];l.A.aa&&(l.sa&&(d=l.sa(b,c),"object"===typeof d&&f.set(l.id,d)),c&&(l.A.aa=
|
||||
function ci(a,b){if(ob("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.ba;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.3";d.url=c;d.user=a;d.type="bug";d.data=b;Ia("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function zg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new F(a,"1.34.3"),g=new F(a,"1.34.3",Xh),h=Ha();g.set(Zh,h);f.set(Zh,h);f.set(ii,"1.34.3");f.set(ji,window?window.location.href:null);f.set(ki,window?window.navigator.userAgent:"");a.v&&a.v.sa&&(c&&(b&&(a.v.A.fa=a.v.A.P),a.v.Y()),d=a.v.sa(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.aa=!1,!1===d&&(e=null)));for(var h=pb(a.id),k=0;k<h.length;k++){var l=h[k];l.A.aa&&(l.sa&&(d=l.sa(b,c),"object"===typeof d&&f.set(l.id,d)),c&&(l.A.aa=
|
||||
!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.i&&li(a,a.i,f.toString()),fi(g)&&fi(f)||(e=null,d=h=!0)):a.b&&(d=!0,h=a.b==mi),d&&f.clear(h)):e=f.toString());c&&(a.A.aa=!1,b=a.J.power)&&(b.textContent="Power");a.w=0;return e}
|
||||
m.reset=function(){this.A.reset=!0;this.G&&this.G.reset&&(Qb(this,"Resetting "+this.G.type),this.G.reset());this.v&&this.v.reset&&(Qb(this,"Resetting "+this.v.type),this.v.reset());for(var a=pb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.G&&c!==this.v&&c.reset&&(Qb(this,"Resetting "+c.type),c.reset())}this.A.reset=!1;J(this,-1)};m.start=function(a,b){for(var c=pb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}J(this,-1)};
|
||||
m.stop=function(a,b){for(var c=pb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}J(this,-1)};
|
||||
function J(a,b){if(a.v){var c=a.v,d=b||0,e=c.J.speed;e&&(0>=d||30<=(c.lb+=d))&&(e.textContent=c.A.P?c.ba.toFixed(2)+"Mhz":"Stopped",c.lb=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.P;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.U||8,e=e||0,e=8==f?ua(e,void 0):n(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i:0<b&&c&&!d&&(a.i=a.v.Ca);kc(a,a.i);ec(a,a.w)}}
|
||||
m.ta=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.w||(d.A.aa?zg(d,!1,!0):Vh(d,d.Xa))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.A.aa&&!d.w)if(d.b&&!d.F){var a=ob("Click OK to save changes to this "+Rb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");zg(d,a,!0);!a&&d.M?window&&window.location.reload():d.Xa(Hh)}else d.reset(),d.v&&!d.D&&d.v.fa()},!0;case "save":if(ya(Ja(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
function J(a,b){if(a.v){var c=a.v,d=b||0,e=c.J.speed;e&&(0>=d||30<=(c.lb+=d))&&(e.textContent=c.A.P?c.ba.toFixed(2)+"Mhz":"Stopped",c.lb=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.P;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.U||8,e=e||0,e=8==f?va(e,void 0):n(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i:0<b&&c&&!d&&(a.i=a.v.Ca);kc(a,a.i);ec(a,a.w)}}
|
||||
m.ta=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.w||(d.A.aa?zg(d,!1,!0):Vh(d,d.Xa))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.A.aa&&!d.w)if(d.b&&!d.F){var a=ob("Click OK to save changes to this "+Rb+" machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");zg(d,a,!0);!a&&d.M?window&&window.location.reload():d.Xa(Hh)}else d.reset(),d.v&&!d.D&&d.v.fa()},!0;case "save":if(za(Ka(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.J[b]=c,c.onclick=function(){var a=Gh(d,!0);if(a){var b=!!(d.b&&!d.F||d.M),c=zg(d,b);b?li(d,a,c):d.ha("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function Gh(a,b){var c=a.i;c||((c=Pa(gi),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=ni(a,c))||a.ha("The user ID is invalid.")):b&&a.ha("Browser local storage is not available"));return c}
|
||||
function ni(a,b){a.i=null;b=Ha(Ja()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Qa(gi,b.data),a.i=b.data)}catch(d){q(d.message+" ("+c+")")}return a.i}function Uh(a){var b=null;a.i&&(b=Ja()+"/api/v1/user?req=load&user="+a.i+"&state="+oi(a,"1.34.3"));return b}
|
||||
function li(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=oi(a,"1.34.3");d.data=c;b=Ha(Ja()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.ha("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.ha(c),Qa(gi,""),a.i=null)}}
|
||||
function jd(a,b){if(a.za){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a.za.focus();!b&&window&&window.scrollTo(c,d)}}var bi="failsafe",Xh="validate",Zh="timestamp",ii="version",ji="url",ki="browser",gi="user",ai=-1,Hh=0,$h=1,di=2,mi=3;Xa(function(){for(var a=w(document,v+"-machine"),b=0;b<a.length;b++)for(var c=a[b],d=t(c),c=w(c,v,"computer"),e=0;e<c.length;e++){var f=c[e],g=t(f),g=new Eh(g,d,!0);sb(g,f);g.N&&Vh(g,g.Xa)}});
|
||||
Ya.show.push(function(){for(var a=w(document,v,"computer"),b=0;b<a.length;b++){var c=t(a[b]);(c=rb("Computer",c.id))&&c.T&&!c.A.aa&&c.Xa(ai)}});Ya.exit.push(function(){for(var a=w(document,v,"computer"),b=0;b<a.length;b++){var c=t(a[b]);(c=rb("Computer",c.id))&&c.A.aa&&zg(c,!(!c.b||c.F),!0)}});function F(a,b,c){this.id=a.id;this.i="";this.b={};this.v=this.j=!1;this.key=oi(a,b,c);ei(this,a.Tb)}m=F.prototype;m.set=function(a,b){try{this.b[a]=b}catch(c){}};m.get=function(a){return this.b[a]||null};
|
||||
m.data=function(){return this.b};function Th(a,b){return b?(a.i=b,a.v=!0,a.j=!1,!0):a.v?!0:Ka()&&(b=Pa(a.key))?(a.i=b,a.v=!0):!1}function Yh(a){var b=!0;if(!a.j)try{a.b=JSON.parse(a.i),a.j=!0}catch(c){q(c.message||c),b=!1}return b}function fi(a){var b=!0;if(Ka()){var c=JSON.stringify(a.b);Qa(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}m.toString=function(){return this.b?JSON.stringify(this.b):this.i};
|
||||
function Gh(a,b){var c=a.i;c||((c=Qa(gi),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=ni(a,c))||a.ha("The user ID is invalid.")):b&&a.ha("Browser local storage is not available"));return c}
|
||||
function ni(a,b){a.i=null;b=Ia(Ka()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ra(gi,b.data),a.i=b.data)}catch(d){q(d.message+" ("+c+")")}return a.i}function Uh(a){var b=null;a.i&&(b=Ka()+"/api/v1/user?req=load&user="+a.i+"&state="+oi(a,"1.34.3"));return b}
|
||||
function li(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=oi(a,"1.34.3");d.data=c;b=Ia(Ka()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.ha("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.ha(c),Ra(gi,""),a.i=null)}}
|
||||
function jd(a,b){if(a.za){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a.za.focus();!b&&window&&window.scrollTo(c,d)}}var bi="failsafe",Xh="validate",Zh="timestamp",ii="version",ji="url",ki="browser",gi="user",ai=-1,Hh=0,$h=1,di=2,mi=3;Ya(function(){for(var a=w(document,v+"-machine"),b=0;b<a.length;b++)for(var c=a[b],d=t(c),c=w(c,v,"computer"),e=0;e<c.length;e++){var f=c[e],g=t(f),g=new Eh(g,d,!0);sb(g,f);g.N&&Vh(g,g.Xa)}});
|
||||
Za.show.push(function(){for(var a=w(document,v,"computer"),b=0;b<a.length;b++){var c=t(a[b]);(c=rb("Computer",c.id))&&c.T&&!c.A.aa&&c.Xa(ai)}});Za.exit.push(function(){for(var a=w(document,v,"computer"),b=0;b<a.length;b++){var c=t(a[b]);(c=rb("Computer",c.id))&&c.A.aa&&zg(c,!(!c.b||c.F),!0)}});function F(a,b,c){this.id=a.id;this.i="";this.b={};this.v=this.j=!1;this.key=oi(a,b,c);ei(this,a.Tb)}m=F.prototype;m.set=function(a,b){try{this.b[a]=b}catch(c){}};m.get=function(a){return this.b[a]||null};
|
||||
m.data=function(){return this.b};function Th(a,b){return b?(a.i=b,a.v=!0,a.j=!1,!0):a.v?!0:La()&&(b=Qa(a.key))?(a.i=b,a.v=!0):!1}function Yh(a){var b=!0;if(!a.j)try{a.b=JSON.parse(a.i),a.j=!0}catch(c){q(c.message||c),b=!1}return b}function fi(a){var b=!0;if(La()){var c=JSON.stringify(a.b);Ra(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}m.toString=function(){return this.b?JSON.stringify(this.b):this.i};
|
||||
function ei(a,b){a.i="";a.b={};a.v=a.j=!1;b&&a.set("parms",b)}m.clear=function(a){ei(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function oi(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var pi=0;
|
||||
function qi(a,b,c,d,e,f,g){f("Loading "+a+"...");Ha(a,null,!0,function(h,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),g(k,null)):ri(k,a,b,c,d,e,f,g)})}
|
||||
function qi(a,b,c,d,e,f,g){f("Loading "+a+"...");Ia(a,null,!0,function(h,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),g(k,null)):ri(k,a,b,c,d,e,f,g)})}
|
||||
function ri(a,b,c,d,e,f,g,h){function k(a,g){if(g)h(g,null);else{c&&(lb(c,b,a),(g=b)&&0>g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1<e.length&&(e+=",")):e='{state:"'+e+'",':e="{",e+='url:"'+g+'"}',"object"==typeof resources&&(g=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
|
||||
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(u){g=null,a=u.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);h(a,g)}}a?f?si(a,g,k):k(a,null):h("no data"+(b?" for file: "+b:""),null)}
|
||||
function si(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(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 k=h[0],l,p=/( [a-z]+=)(['"])(.*?)\2/g;l=p.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||
function si(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ia(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 k=h[0],l,p=/( [a-z]+=)(['"])(.*?)\2/g;l=p.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||
"");a=a.replace(d[0],g);si(a,b,c)}})}else c(a,null)}
|
||||
function ti(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&w(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=za(a))}function g(a){f("Error: "+a);l&&(--pi||ab(!0));l=!1}var h,k,l=!0;pi++;mb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=p:D.appendChild(document.createTextNode(p));u.appendChild(D)}d||
|
||||
(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.3/components.xsl");p=function(e,k){k?qi(d,null,a,null,!1,f,function(a,e){e?(lb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--pi||ab(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--pi||
|
||||
ab(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?qi(c,b,a,e,!0,f,p):ri(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(I){g(I.message)}return l}window.embedPDP10=function(a,b,c,d){ab(!1);return ti("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ab(!1);return ti("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return rb(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!ub[a]){for(var c=!0,d=ub,e=a,f=b.length,g=[],h=[],k="",l=null,p=0;p<f;p++){var u=b[p];if('"'==u||"'"==u)l&&u!=l?k+=u:(l?l=null:l=u,k&&(h.push(k),k=""));else{if(!l){if("\r"==u||"\n"==u)u=";";if(" "==u||"\t"==u||";"==u){k&&(h.push(k),k="");";"==u&&h.length&&(g.push(h),h=[]);continue}}k+=u}}k&&h.push(k);h.length&&g.push(h);d[e]=g;tb(a)||(c=!1)}return c};window.enableEvents=ab;window.sendEvent=cb;})();//# sourceMappingURL=/tmp/pdpjs/1.34.3/pdp10-dbg.map
|
||||
function ti(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&w(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Aa(a))}function g(a){f("Error: "+a);l&&(--pi||bb(!0));l=!1}var h,k,l=!0;pi++;mb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],A=document.createElement("style");A.type="text/css";A.styleSheet?A.styleSheet.cssText=p:A.appendChild(document.createTextNode(p));u.appendChild(A)}d||
|
||||
(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.3/components.xsl");p=function(e,k){k?qi(d,null,a,null,!1,f,function(a,e){e?(lb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--pi||bb(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--pi||
|
||||
bb(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?qi(c,b,a,e,!0,f,p):ri(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(I){g(I.message)}return l}window.embedPDP10=function(a,b,c,d){bb(!1);return ti("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){bb(!1);return ti("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return rb(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!ub[a]){for(var c=!0,d=ub,e=a,f=b.length,g=[],h=[],k="",l=null,p=0;p<f;p++){var u=b[p];if('"'==u||"'"==u)l&&u!=l?k+=u:(l?l=null:l=u,k&&(h.push(k),k=""));else{if(!l){if("\r"==u||"\n"==u)u=";";if(" "==u||"\t"==u||";"==u){k&&(h.push(k),k="");";"==u&&h.length&&(g.push(h),h=[]);continue}}k+=u}}k&&h.push(k);h.length&&g.push(h);d[e]=g;tb(a)||(c=!1)}return c};window.enableEvents=bb;window.sendEvent=db;})();//# sourceMappingURL=/tmp/pdpjs/1.34.3/pdp10-dbg.map
|
||||
|
|
|
|||
Loading…
Reference in a new issue