Merge branch 'master' into gh-pages
This commit is contained in:
commit
04983b163f
29 changed files with 8300 additions and 0 deletions
278
versions/c1pjs/1.37.0/common.css
Normal file
278
versions/c1pjs/1.37.0/common.css
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
@CHARSET "UTF-8";
|
||||
/**
|
||||
@author Jeff Parsons (@jeffpar)
|
||||
@website http://www.pcjs.org/
|
||||
@created 2013-05-05
|
||||
@modified 2014-02-23
|
||||
@license http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
body {
|
||||
margin: 0;
|
||||
background: #202020;
|
||||
}
|
||||
h1, h2 {
|
||||
margin-top: 0;
|
||||
color: #cccccc;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h4 a {
|
||||
color: #cccccc !important;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
a img {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
pre, code {
|
||||
color: #000000;
|
||||
background-color: #cccccc;
|
||||
font-family: Monaco, Consolas, "Lucida Console", monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre {
|
||||
margin: 1em 2em;
|
||||
padding: 1em;
|
||||
border-radius: 5px;
|
||||
overflow: auto;
|
||||
}
|
||||
code {
|
||||
padding: 1px;
|
||||
}
|
||||
pre a, code a {
|
||||
color: #006400 !important;
|
||||
}
|
||||
.common {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
color: #cccccc;
|
||||
}
|
||||
.common a {
|
||||
|
||||
color: #7fc07f;
|
||||
text-decoration: none;
|
||||
}
|
||||
.common hr {
|
||||
border-color: #808080;
|
||||
}
|
||||
.common a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.common, .machine {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
|
||||
font-size: 15px;
|
||||
}
|
||||
.machine {
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
.c1pjs {
|
||||
overflow: visible;
|
||||
}
|
||||
.machine-placeholder {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.machine-floating {
|
||||
position: relative;
|
||||
z-index: auto;
|
||||
background-color: transparent;
|
||||
padding-right: 0;
|
||||
}
|
||||
.machine-sticky {
|
||||
position: fixed !important;
|
||||
z-index: 1 !important;
|
||||
background-color: #404040 !important;
|
||||
padding-right: 16px !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
.common-top {
|
||||
background: #202020;
|
||||
font-size: small;
|
||||
}
|
||||
.common-top-left {
|
||||
float: left;
|
||||
width: 60%;
|
||||
}
|
||||
.common-top-left ul {
|
||||
line-height: 1.5em;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 1em 1em 1em 9px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.common-top-left ul li {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
.common-top-left ul li a {
|
||||
border-right: 1px solid #6f6f6f;
|
||||
padding: 2px 6px 2px 6px;
|
||||
}
|
||||
.common-top-left ul li:last-child a {
|
||||
border-right: none;
|
||||
}
|
||||
.common-top-right {
|
||||
float: right;
|
||||
width: 40%;
|
||||
}
|
||||
.common-top-right p {
|
||||
float: right;
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
}
|
||||
.common-middle {
|
||||
clear: both;
|
||||
padding: 1px 1em 1px 1em;
|
||||
background: #404040;
|
||||
}
|
||||
.common-sidebar {
|
||||
float: left;
|
||||
font-size: small;
|
||||
width: 140px;
|
||||
padding-bottom: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.common-list {
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list li {
|
||||
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
.common-list-data {
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list-data li {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
.common-list-data-items, .common-list-data-subitems {
|
||||
font-size: x-small;
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 2em;
|
||||
}
|
||||
.common-list-data-items li, .common-list-data-subitems li {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.common-main {
|
||||
margin-left: 150px;
|
||||
|
||||
}
|
||||
.common-main blockquote {
|
||||
text-align: justify;
|
||||
}
|
||||
.common-image-gallery {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
.common-image-gallery:after {
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
||||
.common-image-frame {
|
||||
display: inline-block;
|
||||
margin: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.common-image-link {
|
||||
padding: 5px;
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
background-color: #FAEBD7;
|
||||
}
|
||||
.common-image-label {
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-bottom {
|
||||
clear: both;
|
||||
padding-top: 1em;
|
||||
}
|
||||
.common-bottom:after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.common-reference {
|
||||
float: left;
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-reference a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.common-copyright {
|
||||
float: right;
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-copyright a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.md-list {
|
||||
}
|
||||
.md-list li {
|
||||
line-height: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.md-list li p {
|
||||
padding-left: 2em;
|
||||
}
|
||||
.md-list-compact {
|
||||
}
|
||||
.md-list-compact li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.md-list-none {
|
||||
list-style-type: none;
|
||||
padding-left: 2em;
|
||||
}
|
||||
.md-list-none li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@media screen and (max-width: 900px) {
|
||||
|
||||
.common-sidebar {
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
}
|
||||
.common-list {
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list-data {
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li {
|
||||
width: 130px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
padding-right: 1em;
|
||||
margin-top: 0;
|
||||
}
|
||||
.common-list-data-subitems {
|
||||
display: none;
|
||||
}
|
||||
.common-main {
|
||||
clear: both;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.md-list-none {
|
||||
padding-left: 1em;
|
||||
}
|
||||
}
|
||||
58
versions/c1pjs/1.37.0/common.xsl
Normal file
58
versions/c1pjs/1.37.0/common.xsl
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY ne "≠"> <!ENTITY le "≤"> <!ENTITY ge "≥">
|
||||
<!ENTITY times "×"> <!ENTITY sdot "⋅"> <!ENTITY divide "÷">
|
||||
<!ENTITY copy "©"> <!ENTITY Sigma "Σ"> <!ENTITY sigma "σ"> <!ENTITY sum "∑"> <!ENTITY lbrace "{">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template name="commonStyles">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/versions/icons/current/pc-icon-57.png"/>
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/versions/icons/current/pc-icon-72.png"/>
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/versions/icons/current/pc-icon-76.png"/>
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/versions/icons/current/pc-icon-114.png"/>
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/versions/icons/current/pc-icon-120.png"/>
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/versions/icons/current/pc-icon-144.png"/>
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/versions/icons/current/pc-icon-152.png"/>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/versions/icons/current/pc-icon-180.png"/>
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="/versions/icons/current/pc-icon-192.png"/>
|
||||
<link rel="apple-touch-icon" href="/versions/icons/current/apple-touch-icon.png"/>
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/versions/icons/current/pc-icon-192.png"/>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/versions/icons/current/favicon.ico"/>
|
||||
<link rel="stylesheet" type="text/css" href="/versions/c1pjs/1.37.0/common.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="commonTop">
|
||||
<div class="common-top">
|
||||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
<li><a href="/apps/">Apps</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/docs/about/">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-top-right">
|
||||
<p>Powered by <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">JavaScript</a>, <a href="http://vanilla-js.com/" target="_blank">Vanilla JS</a>, and <a href="http://github.com/jeffpar/pcjs" target="_blank">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="commonBottom">
|
||||
<div class="common-bottom">
|
||||
<p class="common-reference"></p>
|
||||
<p class="common-copyright">
|
||||
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> © 2012-2017 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
|
||||
<span class="common-copyright"><a href="http://github.com/jeffpar/pcjs">PCjs Project</a> released under <a href="http://gnu.org/licenses/gpl.html">GPLv3</a></span>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
108
versions/c1pjs/1.37.0/components.css
Normal file
108
versions/c1pjs/1.37.0/components.css
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
|
||||
*:not(input,textarea) {
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.c1pjs-embed {
|
||||
}
|
||||
.c1pjs-embed:after {
|
||||
clear:both;
|
||||
}
|
||||
.c1pjs-machine {
|
||||
}
|
||||
.c1pjs-name {
|
||||
clear: both;
|
||||
font-weight: bold;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
.c1pjs-canvas {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.c1pjs-container {
|
||||
color: #000000;
|
||||
position: relative;
|
||||
}
|
||||
.c1pjs-label {
|
||||
font-size: small;
|
||||
line-height: 19px;
|
||||
vertical-align: middle;
|
||||
float: left;
|
||||
font-family: "Lucida Console", monospace;
|
||||
}
|
||||
.c1pjs-control textarea {
|
||||
font-family: Monaco, monospace;
|
||||
font-size: x-small;
|
||||
}
|
||||
.c1pjs-fieldset {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.c1pjs-flag {
|
||||
font-family: "Lucida Console", monospace;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
line-height: 19px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.c1pjs-register {
|
||||
font-family: "Lucida Console", monospace;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
line-height: 19px;
|
||||
vertical-align: middle;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.c1pjs-switches {
|
||||
float: left;
|
||||
}
|
||||
.c1pjs-bitBucket {
|
||||
float: left;
|
||||
width: 19px;
|
||||
height: 38px;
|
||||
}
|
||||
.c1pjs-bitCell {
|
||||
float: left;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
margin-right: -1px;
|
||||
margin-bottom: -1px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
line-height: 19px;
|
||||
}
|
||||
.c1pjs-bitCellLeft {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
.c1pjs-bitLabel {
|
||||
font-size: xx-small;
|
||||
text-align: center;
|
||||
}
|
||||
.c1pjs-description, .c1pjs-status {
|
||||
font-size: small;
|
||||
line-height: 2em;
|
||||
}
|
||||
.c1pjs-key {
|
||||
border: 1px solid black;
|
||||
font-size: x-small;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.c1pjs-reference {
|
||||
float: left;
|
||||
font-size: x-small;
|
||||
}
|
||||
.c1pjs-reference a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.c1pjs-copyright {
|
||||
float: right;
|
||||
font-size: x-small;
|
||||
}
|
||||
.c1pjs-copyright a {
|
||||
text-decoration: none;
|
||||
}
|
||||
592
versions/c1pjs/1.37.0/components.xsl
Normal file
592
versions/c1pjs/1.37.0/components.xsl
Normal file
|
|
@ -0,0 +1,592 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2013-01-29" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:param name="rootDir" select="''"/>
|
||||
<xsl:param name="generator" select="'client'"/>
|
||||
|
||||
<xsl:variable name="MACHINETYPE">c1p</xsl:variable>
|
||||
<xsl:variable name="APPCLASS">c1pjs</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.37.0</xsl:variable>
|
||||
<xsl:variable name="SITEHOST">www.pcjs.org</xsl:variable>
|
||||
<xsl:variable name="BGNDCOLOR">#FAEBD7</xsl:variable>
|
||||
|
||||
<xsl:template name="componentStyles">
|
||||
<link rel="stylesheet" type="text/css" href="/versions/{$APPCLASS}/{$APPVERSION}/components.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="componentScripts">
|
||||
<xsl:param name="component"/>
|
||||
<script type="text/javascript" src="/versions/{$APPCLASS}/{$APPVERSION}/{$component}.js"> </script>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="componentIncludes">
|
||||
<xsl:param name="component"/>
|
||||
<xsl:call-template name="componentScripts"><xsl:with-param name="component" select="$component"/></xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="machine[@ref]">
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/machine"><xsl:with-param name="machine" select="@id"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="machine[not(@ref)]">
|
||||
<xsl:param name="machine"><xsl:value-of select="@id"/></xsl:param>
|
||||
<div id="{$machine}" class="machine {@class}js">
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="component" select="'machine'"/>
|
||||
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
|
||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
||||
<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="component[@ref]">
|
||||
<xsl:param name="machine"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/component"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="component[not(@ref)]">
|
||||
<xsl:param name="machine"/>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class" select="@class"/>
|
||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="component">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:param name="component" select="name(.)"/>
|
||||
<xsl:param name="class" select="''"/>
|
||||
<xsl:param name="parms" select="''"/>
|
||||
<xsl:param name="url" select="''"/>
|
||||
<xsl:variable name="id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$component = 'machine'"><xsl:value-of select="$machine"/>.machine</xsl:when>
|
||||
<xsl:when test="$machine != ''"><xsl:value-of select="$machine"/><xsl:if test="@id">.<xsl:value-of select="@id"/></xsl:if></xsl:when>
|
||||
<xsl:when test="@id"><xsl:value-of select="@id"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name"><xsl:value-of select="name"/></xsl:when>
|
||||
<xsl:when test="@name"><xsl:value-of select="@name"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="border">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@border = '1'">border:1px solid black;border-radius:10px;</xsl:when>
|
||||
<xsl:when test="@border">border:<xsl:value-of select="@border"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="left">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@left">left:<xsl:value-of select="@left"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="top">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@top">top:<xsl:value-of select="@top"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="width">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@width">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$left != '' or $top != ''">width:<xsl:value-of select="@width"/>;</xsl:when>
|
||||
<xsl:otherwise>width:auto;max-width:<xsl:value-of select="@width"/>;</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="height">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@height">height:<xsl:value-of select="@height"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="padding">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@padding">padding:<xsl:value-of select="@padding"/>;</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="@padTop">padding-top:<xsl:value-of select="@padTop"/>;</xsl:if>
|
||||
<xsl:if test="@padRight">padding-right:<xsl:value-of select="@padRight"/>;</xsl:if>
|
||||
<xsl:if test="@padBottom">padding-bottom:<xsl:value-of select="@padBottom"/>;</xsl:if>
|
||||
<xsl:if test="@padLeft">padding-left:<xsl:value-of select="@padLeft"/>;</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="pos">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@pos = 'left'">float:left;</xsl:when>
|
||||
<xsl:when test="@pos = 'right'">float:right;</xsl:when>
|
||||
<xsl:when test="@pos = 'center'">margin:0 auto;</xsl:when>
|
||||
<xsl:when test="@pos">position:<xsl:value-of select="@pos"/>;</xsl:when>
|
||||
<xsl:when test="$left != '' or $top != ''">position:absolute;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="style">
|
||||
<xsl:if test="$component = 'machine'">overflow:auto;width:100%;</xsl:if>
|
||||
<xsl:if test="@background">
|
||||
<xsl:if test="@background = 'default'">background-color:<xsl:value-of select="$BGNDCOLOR"/>;</xsl:if>
|
||||
<xsl:if test="@background != 'default'">background-color:<xsl:value-of select="@background"/>;</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="@style"><xsl:value-of select="@style"/></xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="componentClass">
|
||||
<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
|
||||
</xsl:variable>
|
||||
<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}">
|
||||
<xsl:if test="$component = 'machine'">
|
||||
<xsl:apply-templates select="name" mode="machine"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$component != 'machine'">
|
||||
<xsl:apply-templates select="name" mode="component"/>
|
||||
</xsl:if>
|
||||
<div class="{$APPCLASS}-container" style="{$border}{$style}">
|
||||
<xsl:if test="$class != '' and $component != 'machine'">
|
||||
<div class="{$APPCLASS}-{$class}-object" data-value="{{id:'{$id}',name:'{$name}'{$parms}}}"> </div>
|
||||
</xsl:if>
|
||||
<xsl:if test="control">
|
||||
<div class="{$APPCLASS}-controls">
|
||||
<xsl:apply-templates select="control" mode="component"/>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</div>
|
||||
<xsl:if test="$component = 'machine'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$url != ''"><div class="{$APPCLASS}-reference">[<a href="{$url}">XML</a>]</div></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
<div class="{$APPCLASS}-copyright">
|
||||
<a href="http://{$SITEHOST}/{$APPCLASS}" target="_blank">C1Pjs</a> v<xsl:value-of select="$APPVERSION"/> © 2012-2017 by <a href="http://twitter.com/jeffpar" target="_blank">@jeffpar</a>
|
||||
</div>
|
||||
<div style="clear:both"> </div>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="name" mode="machine">
|
||||
<xsl:variable name="pos">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@pos = 'center'">text-align:center;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<h3 style="{$pos}"><xsl:apply-templates/></h3>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="name" mode="component">
|
||||
<div class="{$APPCLASS}-name"><xsl:apply-templates/></div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="control" mode="component">
|
||||
<xsl:variable name="type">
|
||||
type:'<xsl:value-of select="@type"/>'
|
||||
</xsl:variable>
|
||||
<xsl:variable name="binding">
|
||||
binding:'<xsl:value-of select="@binding"/>'
|
||||
</xsl:variable>
|
||||
<xsl:variable name="border">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@border = '1'">border:1px solid black;</xsl:when>
|
||||
<xsl:when test="@border">border:<xsl:value-of select="@border"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="width">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@width">width:<xsl:value-of select="@width"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="height">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@height">height:<xsl:value-of select="@height"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="left">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@left">left:<xsl:value-of select="@left"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="top">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@top">top:<xsl:value-of select="@top"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="pos">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$left != '' or $top != ''">position:absolute;</xsl:when>
|
||||
<xsl:when test="@pos = 'left'">float:left;</xsl:when>
|
||||
<xsl:when test="@pos = 'right'">float:right;</xsl:when>
|
||||
<xsl:when test="@pos = 'center'">margin:0 auto;</xsl:when>
|
||||
<xsl:when test="@pos"><xsl:value-of select="@pos"/>;</xsl:when>
|
||||
<xsl:otherwise><xsl:if test="$left = ''">float:left;</xsl:if></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="style">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@style"><xsl:value-of select="@style"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<div class="{$APPCLASS}-control" style="{$pos}{$left}{$top}">
|
||||
<xsl:variable name="fontsize">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@size = 'large'">font-size:<xsl:value-of select="@size"/>;</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="subclass">
|
||||
<xsl:if test="@label"><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-label</xsl:text></xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="labelwidth">
|
||||
<xsl:if test="@labelwidth">width:<xsl:value-of select="@labelwidth"/>;</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="labelstyle">
|
||||
<xsl:if test="@labelstyle"><xsl:value-of select="@labelstyle"/></xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:if test="@label">
|
||||
<xsl:if test="not(@labelpos) or @labelpos = 'left'">
|
||||
<div class="{$APPCLASS}-label" style="{$labelwidth}{$labelstyle}"><xsl:value-of select="@label"/></div>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'button'">
|
||||
<button class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></button>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'list'">
|
||||
<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}">
|
||||
<xsl:apply-templates select="item" mode="component"/>
|
||||
</select>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'text'">
|
||||
<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" value="" autocapitalize="off" autocorrect="off"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'submit'">
|
||||
<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{{{$type},{$binding}}}" value="{.}"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'textarea'">
|
||||
<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}" readonly="readonly"> </textarea>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'heading'">
|
||||
<div><xsl:value-of select="."/></div>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'file'">
|
||||
<form class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}">
|
||||
<fieldset class="{$APPCLASS}-fieldset">
|
||||
<input type="file"/>
|
||||
<input type="submit" value="Mount" disabled="true"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'separator'">
|
||||
<hr/>
|
||||
</xsl:when>
|
||||
<xsl:when test="not(@type)">
|
||||
<div style="clear:both"> </div><br/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="{$APPCLASS}-binding{$subclass}" style="{$border}{$width}{$height}{$style}" data-value="{{{$type},{$binding}}}"><xsl:apply-templates/></div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@label">
|
||||
<xsl:if test="@labelpos = 'right'">
|
||||
<div class="{$APPCLASS}-label" style="{$labelwidth}{$labelstyle}"><xsl:value-of select="@label"/></div>
|
||||
</xsl:if>
|
||||
<div style="clear:both"> </div>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="component">
|
||||
<option value="{@ref}"><xsl:value-of select="."/></option>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="name">
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="control">
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="cpu[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/cpu"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="cpu[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="autoStart">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@autostart"><xsl:value-of select="@autostart"/></xsl:when>
|
||||
<xsl:otherwise>null</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class" select="'cpu'"/>
|
||||
<xsl:with-param name="parms">,autoStart:<xsl:value-of select="$autoStart"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="keyboard[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/keyboard"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="keyboard[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="model">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
|
||||
<xsl:otherwise>600</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">keyboard</xsl:with-param>
|
||||
<xsl:with-param name="parms">,model:<xsl:value-of select="$model"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="serial[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/serial"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="serial[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="demo">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@demo"><xsl:value-of select="@demo"/></xsl:when>
|
||||
<xsl:otherwise>false</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">serial</xsl:with-param>
|
||||
<xsl:with-param name="parms">,demo:<xsl:value-of select="$demo"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="disk[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/disk"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="disk[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">disk</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rom[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/rom"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rom[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="size">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@size"><xsl:value-of select="@size"/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="image">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@image"><xsl:value-of select="@image"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">rom</xsl:with-param>
|
||||
<xsl:with-param name="parms">,size:<xsl:value-of select="$size"/>,image:'<xsl:value-of select="$image"/>'</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ram[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/ram"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ram[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="size">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@size"><xsl:value-of select="@size"/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">ram</xsl:with-param>
|
||||
<xsl:with-param name="parms">,size:<xsl:value-of select="$size"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="video[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/video"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="video[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="model">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
|
||||
<xsl:otherwise>600</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="screenWidth">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@screenwidth"><xsl:value-of select="@screenwidth"/></xsl:when>
|
||||
<xsl:when test="@screenWidth"><xsl:value-of select="@screenWidth"/></xsl:when>
|
||||
<xsl:otherwise>256</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="screenHeight">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@screenheight"><xsl:value-of select="@screenheight"/></xsl:when>
|
||||
<xsl:when test="@screenHeight"><xsl:value-of select="@screenHeight"/></xsl:when>
|
||||
<xsl:otherwise>224</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="screenColor">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@screencolor"><xsl:value-of select="@screencolor"/></xsl:when>
|
||||
<xsl:when test="@screenColor"><xsl:value-of select="@screenColor"/></xsl:when>
|
||||
<xsl:otherwise>black</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="charCols">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@cols"><xsl:value-of select="@cols"/></xsl:when>
|
||||
<xsl:otherwise>32</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="charRows">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@rows"><xsl:value-of select="@rows"/></xsl:when>
|
||||
<xsl:otherwise>32</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="charWidth">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@charwidth"><xsl:value-of select="@charwidth"/></xsl:when>
|
||||
<xsl:when test="@charWidth"><xsl:value-of select="@charWidth"/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="charHeight">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@charheight"><xsl:value-of select="@charheight"/></xsl:when>
|
||||
<xsl:when test="@charHeight"><xsl:value-of select="@charHeight"/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="charSet">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@charset"><xsl:value-of select="@charset"/></xsl:when>
|
||||
<xsl:when test="@charSet"><xsl:value-of select="@charSet"/></xsl:when>
|
||||
<xsl:when test="@fontROM"><xsl:value-of select="@fontROM"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="smoothing">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@smoothing"><xsl:value-of select="@smoothing"/></xsl:when>
|
||||
<xsl:otherwise>null</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">video</xsl:with-param>
|
||||
<xsl:with-param name="parms">,model:<xsl:value-of select="$model"/>,screenWidth:<xsl:value-of select="$screenWidth"/>,screenHeight:<xsl:value-of select="$screenHeight"/>,charCols:<xsl:value-of select="$charCols"/>,charRows:<xsl:value-of select="$charRows"/>,charWidth:<xsl:value-of select="$charWidth"/>,charHeight:<xsl:value-of select="$charHeight"/>,charSet:'<xsl:value-of select="$charSet"/>',screenColor:'<xsl:value-of select="$screenColor"/>',smoothing:<xsl:value-of select="$smoothing"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="debugger[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/debugger"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="debugger[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">debugger</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="panel[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/panel"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="panel[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">panel</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="computer[@ref]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($componentFile)/computer"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="computer[not(@ref)]">
|
||||
<xsl:param name="machine" select="''"/>
|
||||
<xsl:variable name="modules">
|
||||
[<xsl:for-each select="module">
|
||||
{<xsl:call-template name="module"/>}
|
||||
<xsl:if test="position() != last()">,</xsl:if>
|
||||
</xsl:for-each>]
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">computer</xsl:with-param>
|
||||
<xsl:with-param name="parms">,modules:<xsl:value-of select="$modules"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="module">
|
||||
type:'<xsl:value-of select="@type"/>',refID:'<xsl:value-of select="@refid"/>'<xsl:if test="@start">,start:<xsl:value-of select="@start"/>,end:<xsl:value-of select="@end"/></xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
162
versions/c1pjs/1.37.0/document.css
Normal file
162
versions/c1pjs/1.37.0/document.css
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
.page {
|
||||
margin: 2% 2%;
|
||||
padding: 2% 2%;
|
||||
min-width: 30em;
|
||||
overflow: auto;
|
||||
font-size: large;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
background: #303030;
|
||||
color: #ccc;
|
||||
|
||||
}
|
||||
.page-header {
|
||||
}
|
||||
.page-header-title {
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.page a {
|
||||
color: #7fc07f;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footlink, a.paralink {
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footlink:link, a.paralink:link {
|
||||
color: blue;
|
||||
}
|
||||
a.footlink:visited, a.paralink:visited {
|
||||
color: blue;
|
||||
}
|
||||
.galleryitem {
|
||||
float: left;
|
||||
width: 200px;
|
||||
}
|
||||
.item {
|
||||
float: left;
|
||||
width: 2em;
|
||||
text-indent: 1em;
|
||||
}
|
||||
.list {
|
||||
margin-left: 3em;
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
div.pnumber {
|
||||
float: left;
|
||||
width: 2em;
|
||||
text-indent: 1em;
|
||||
}
|
||||
div.pitem {
|
||||
margin-left: 10em;
|
||||
}
|
||||
p.indent, .justified p {
|
||||
text-indent: 2em;
|
||||
text-align: justify;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
p.noindent {
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
p.center, .center {
|
||||
text-align: center;
|
||||
}
|
||||
li.para {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
blockquote.tag {
|
||||
font-size: small;
|
||||
font-family: Monaco, Fixed, monospace;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.blockquote {
|
||||
padding-left: 1em;
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
.italics {
|
||||
font-style: italic;
|
||||
}
|
||||
.medium {
|
||||
font-size: medium;
|
||||
}
|
||||
.small {
|
||||
font-size: x-small;
|
||||
}
|
||||
.smallcaps {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
.strike {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.summation, .bracelist {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5ex;
|
||||
text-indent: 0;
|
||||
}
|
||||
.bracelist-symbol {
|
||||
font-size: 3em;
|
||||
vertical-align: -40%;
|
||||
}
|
||||
.summation .summation-lower, .summation .summation-upper, .bracelist-item {
|
||||
display: block;
|
||||
font-size: 75%;
|
||||
text-align: center;
|
||||
}
|
||||
.summation .summation-upper {
|
||||
margin-bottom: 0;
|
||||
margin-left: 0.8ex;
|
||||
font-style: italic;
|
||||
}
|
||||
.summation .summation-lower{
|
||||
margin-bottom: -0.6ex;
|
||||
font-style: italic;
|
||||
}
|
||||
.summation .summation-symbol {
|
||||
font-size: 2em;
|
||||
}
|
||||
p sup {
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
bottom: .5em;
|
||||
font-size: small;
|
||||
}
|
||||
p sub {
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
bottom: -.5em;
|
||||
font-size: small;
|
||||
}
|
||||
.footnote {
|
||||
font-size: medium;
|
||||
text-indent: 1em;
|
||||
text-align: justify;
|
||||
margin-top: .5em;
|
||||
}
|
||||
.image-right {
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.image-caption {
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
452
versions/c1pjs/1.37.0/document.xsl
Normal file
452
versions/c1pjs/1.37.0/document.xsl
Normal file
|
|
@ -0,0 +1,452 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY ne "≠"> <!ENTITY le "≤"> <!ENTITY ge "≥">
|
||||
<!ENTITY times "×"> <!ENTITY sdot "⋅"> <!ENTITY divide "÷">
|
||||
<!ENTITY copy "©"> <!ENTITY Sigma "Σ"> <!ENTITY sigma "σ"> <!ENTITY sum "∑"> <!ENTITY lbrace "{">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template name="documentStyles">
|
||||
<link rel="stylesheet" type="text/css" href="/versions/c1pjs/1.37.0/document.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="title">
|
||||
<h1><xsl:apply-templates/></h1>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="p">
|
||||
<xsl:if test="@id">
|
||||
<a name="{@id}"></a>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@class)">
|
||||
<p><xsl:apply-templates/></p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p class="{@class}"><xsl:apply-templates/></p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p">
|
||||
<xsl:call-template name="p"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="br">
|
||||
<br/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p[@number]">
|
||||
<div class="pnumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@number) or @number = ''"> </xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div class="pitem">
|
||||
<xsl:call-template name="p"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="span">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@class)">
|
||||
<span><xsl:apply-templates/></span>
|
||||
</xsl:when>
|
||||
<xsl:when test="@class = 'italics'">
|
||||
<em><xsl:apply-templates/></em>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span class="{@class}"><xsl:apply-templates/></span>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h2">
|
||||
<h2><xsl:apply-templates/></h2>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h3">
|
||||
<h3><xsl:apply-templates/></h3>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h4">
|
||||
<h4><xsl:apply-templates/></h4>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h5">
|
||||
<h5><xsl:apply-templates/></h5>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h6">
|
||||
<h6><xsl:apply-templates/></h6>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="em">
|
||||
<em><xsl:apply-templates/></em>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="strong">
|
||||
<strong><xsl:apply-templates/></strong>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="a">
|
||||
<a href="{@href}" target="{@target}"><xsl:apply-templates/></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol">
|
||||
<blockquote><ol><xsl:apply-templates/></ol></blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ul">
|
||||
<blockquote><ul><xsl:apply-templates/></ul></blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="li">
|
||||
<li><xsl:apply-templates/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="img">
|
||||
<div><img src="{@src}" alt="image"/></div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pre">
|
||||
<pre><xsl:apply-templates/></pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="figure">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@pos">
|
||||
<div class="{@pos}"><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sub">
|
||||
<sub><xsl:apply-templates/></sub>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sup">
|
||||
<sup><xsl:apply-templates/></sup>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lt"><</xsl:template>
|
||||
<xsl:template match="gt">></xsl:template>
|
||||
<xsl:template match="ne">≠</xsl:template>
|
||||
<xsl:template match="le">≤</xsl:template>
|
||||
<xsl:template match="ge">≥</xsl:template>
|
||||
<xsl:template match="times">×</xsl:template>
|
||||
<xsl:template match="dot">⋅</xsl:template>
|
||||
<xsl:template match="divide">÷</xsl:template>
|
||||
<xsl:template match="sigma">σ</xsl:template>
|
||||
|
||||
<xsl:template match="summation">
|
||||
<span class="summation">
|
||||
<span class="summation-upper"><xsl:value-of select="@upper"/></span>
|
||||
<span class="summation-symbol">∑</span>
|
||||
<span class="summation-lower"><xsl:value-of select="@lower"/></span>
|
||||
</span>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bracelist">
|
||||
<span class="bracelist-symbol">{</span>
|
||||
<span class="bracelist">
|
||||
<xsl:for-each select="item">
|
||||
<span class="bracelist-item"><xsl:apply-templates/></span>
|
||||
</xsl:for-each>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="footlink">
|
||||
<xsl:variable name="docID" select="/document/@id"/>
|
||||
<a class="footlink" id="fn{$docID}_ref{@n}" href="#fn{$docID}_{@n}"><sup><xsl:if test="@quoted"><xsl:text>[</xsl:text></xsl:if><xsl:value-of select="@n"/><xsl:if test="@quoted"><xsl:text>]</xsl:text></xsl:if></sup></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="footnote">
|
||||
<xsl:variable name="docID" select="/document/@id"/>
|
||||
<div class="footnote"><a id="fn{$docID}_{@n}" href="#fn{$docID}_ref{@n}"><sup><xsl:value-of select="@n"/></sup></a><xsl:text> </xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="authors">
|
||||
<xsl:for-each select="author"><xsl:if test="position() != 1"><xsl:text>, </xsl:text></xsl:if><xsl:if test="position() != 1 and position() = last()"><xsl:text>and </xsl:text></xsl:if><xsl:value-of select="."/></xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="formatDate">
|
||||
<xsl:param name="date"/>
|
||||
<xsl:param name="format">MDY</xsl:param>
|
||||
<xsl:variable name="year">
|
||||
<xsl:value-of select="substring-before($date,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="mon-day">
|
||||
<xsl:value-of select="substring-after($date,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="mon">
|
||||
<xsl:value-of select="substring-before($mon-day,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="full-day">
|
||||
<xsl:value-of select="substring-after($mon-day,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="day">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring($full-day,1,1) = '0'"><xsl:value-of select="substring($full-day,2)"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$full-day"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mon = '01'">January </xsl:when>
|
||||
<xsl:when test="$mon = '02'">February </xsl:when>
|
||||
<xsl:when test="$mon = '03'">March </xsl:when>
|
||||
<xsl:when test="$mon = '04'">April </xsl:when>
|
||||
<xsl:when test="$mon = '05'">May </xsl:when>
|
||||
<xsl:when test="$mon = '06'">June </xsl:when>
|
||||
<xsl:when test="$mon = '07'">July </xsl:when>
|
||||
<xsl:when test="$mon = '08'">August </xsl:when>
|
||||
<xsl:when test="$mon = '09'">September </xsl:when>
|
||||
<xsl:when test="$mon = '10'">October </xsl:when>
|
||||
<xsl:when test="$mon = '11'">November </xsl:when>
|
||||
<xsl:when test="$mon = '12'">December </xsl:when>
|
||||
<xsl:when test="$mon = '00'"/> </xsl:choose>
|
||||
<xsl:if test="$day != '0' and $format = 'MDY'">
|
||||
<xsl:value-of select="$day"/><xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="$year"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="gallery">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
<div class="gallery">
|
||||
<xsl:apply-templates select="item" mode="gallery"/>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="gallery">
|
||||
<div class="galleryitem">
|
||||
<a href="{@ref}"><img src="/versions/images/current/pdf-192.jpg" alt="{.}"/></a><br/>
|
||||
<div style="font-size:small; text-align:center;"><xsl:value-of select="."/></div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'timeline']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>Timeline</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="timeline"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="timeline">
|
||||
<xsl:if test="@ref">
|
||||
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($documentFile)/document" mode="withDate">
|
||||
<xsl:with-param name="itemRef" select="@ref"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@ref)">
|
||||
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="@date"/></xsl:call-template></h3>
|
||||
<blockquote>
|
||||
<xsl:value-of select="."/>
|
||||
</blockquote>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'people']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>People</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="people"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="people">
|
||||
<h3><xsl:value-of select="name"/></h3>
|
||||
<xsl:apply-templates select="list"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'documents']">
|
||||
<xsl:if test="description"><h2><xsl:value-of select="description"/></h2></xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="item" mode="document"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="document">
|
||||
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($documentFile)/document">
|
||||
<xsl:with-param name="itemRef" select="@ref"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="document">
|
||||
<xsl:param name="itemRef"/>
|
||||
<li>
|
||||
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/></xsl:call-template>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="document" mode="withDate">
|
||||
<xsl:param name="itemRef"/>
|
||||
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="date"/><xsl:with-param name="format" select="MY"/></xsl:call-template></h3>
|
||||
<blockquote>
|
||||
<p>
|
||||
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/><xsl:with-param name="multiLine" select="'true'"/></xsl:call-template>
|
||||
</p>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="documentSummary">
|
||||
<xsl:param name="itemRef"/>
|
||||
<xsl:param name="multiLine">false</xsl:param>
|
||||
<xsl:choose>
|
||||
<xsl:when test="content|include">
|
||||
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
|
||||
<xsl:if test="@ref">
|
||||
<span class="small">
|
||||
<xsl:text> [</xsl:text><a href="{@ref}">Original</a><xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="copy">
|
||||
<span class="small">
|
||||
<xsl:text> [</xsl:text><a href="{copy/@ref}"><xsl:value-of select="copy"/></a><xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
<xsl:if test="author"><xsl:if test="$multiLine = 'true'"><br/></xsl:if><span class="medium"><xsl:text> by </xsl:text><xsl:call-template name="authors"/></span></xsl:if>
|
||||
<xsl:if test="source">
|
||||
<span class="small">
|
||||
<br/>
|
||||
<xsl:text>[Source: </xsl:text>
|
||||
<xsl:if test="site">
|
||||
<a href="{site/@url}"><xsl:value-of select="site"/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(site)">
|
||||
<a href="{source/@url}"><xsl:value-of select="source"/></a>
|
||||
</xsl:if>
|
||||
<xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'resources']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>Resources</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="resources"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="resources">
|
||||
<h3><xsl:value-of select="description"/></h3>
|
||||
<xsl:apply-templates select="list"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'links']">
|
||||
<xsl:if test="description">
|
||||
<h4><xsl:value-of select="description"/></h4>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="item" mode="links"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="links">
|
||||
<li><a href="{@ref}"><xsl:value-of select="."/></a></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[not(@type)]">
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item|tag" mode="outer"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="outer">
|
||||
<xsl:if test="description">
|
||||
<h3><xsl:value-of select="description"/></h3>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="list|item|tag" mode="inner"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list" mode="inner">
|
||||
<xsl:if test="description">
|
||||
<h4><xsl:value-of select="description"/></h4>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="innerlist">
|
||||
<xsl:if test="description">
|
||||
<xsl:value-of select="description"/>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="inner">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@ref">
|
||||
<li><a href="{@ref}"><xsl:apply-templates/></a></li>
|
||||
</xsl:when>
|
||||
<xsl:when test="description">
|
||||
<li><xsl:call-template name="innerlist"/></li>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<li><xsl:apply-templates/></li>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="para" mode="inner">
|
||||
<li class="para"><xsl:apply-templates/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tag" mode="outer">
|
||||
<xsl:call-template name="tag"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tag" mode="inner">
|
||||
<xsl:call-template name="tag"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="tag">
|
||||
<blockquote class="tag">
|
||||
<xsl:text><</xsl:text><xsl:if test="@href"><a href="{@href}"><xsl:value-of select="@name"/></a></xsl:if><xsl:if test="not(@href)"><xsl:value-of select="@name"/></xsl:if><xsl:for-each select="attr"><xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text>="</xsl:text><xsl:value-of select="@value"/><xsl:text>"</xsl:text></xsl:for-each>
|
||||
<xsl:choose>
|
||||
<xsl:when test="tag"><xsl:text>></xsl:text><xsl:apply-templates mode="inner"/><xsl:text></</xsl:text><xsl:value-of select="@name"/><xsl:text>></xsl:text></xsl:when>
|
||||
<xsl:when test="normalize-space(.) != ''"><xsl:text>></xsl:text><xsl:value-of select="."/><xsl:text></</xsl:text><xsl:value-of select="@name"/><xsl:text>></xsl:text></xsl:when>
|
||||
<xsl:otherwise><xsl:text>/></xsl:text></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
61
versions/c1pjs/1.37.0/machine.xsl
Normal file
61
versions/c1pjs/1.37.0/machine.xsl
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/c1pjs/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/c1pjs/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/machine">
|
||||
<xsl:variable name="machineType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@class = 'pc' or @class = 'c1p'"><xsl:value-of select="@class"/>js</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<p></p>
|
||||
<div id="{@id}" class="machine {$machineType} {$machineClass}">
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="@id"/>
|
||||
<xsl:with-param name="component" select="'machine'"/>
|
||||
<xsl:with-param name="class" select="$machineClass"/>
|
||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="debugger"><xsl:value-of select="$machineType"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineType"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
247
versions/c1pjs/1.37.0/manifest.xsl
Normal file
247
versions/c1pjs/1.37.0/manifest.xsl
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2014-04-10" modified="2014-04-10" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/c1pjs/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/c1pjs/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/manifest[@type = 'document']">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<h4>Document Manifest</h4>
|
||||
<div class="common-sidebar">
|
||||
<ul class="common-list-data">
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Title'"/>
|
||||
<xsl:with-param name="node" select="title"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Version'"/>
|
||||
<xsl:with-param name="node" select="version"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Source'"/>
|
||||
<xsl:with-param name="node" select="source"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Documents'"/>
|
||||
<xsl:with-param name="node" select="document"/>
|
||||
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-main">
|
||||
<p><xsl:value-of select="desc"/></p>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/manifest[@type = 'software' or not(@type)]">
|
||||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$APPCLASS"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<h4>Software Manifest</h4>
|
||||
<div class="common-sidebar">
|
||||
<ul class="common-list-data">
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Title'"/>
|
||||
<xsl:with-param name="node" select="title"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Version'"/>
|
||||
<xsl:with-param name="node" select="version"/>
|
||||
<xsl:with-param name="default">Unknown</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Type'"/>
|
||||
<xsl:with-param name="node" select="type"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Category'"/>
|
||||
<xsl:with-param name="node" select="category"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Created'"/>
|
||||
<xsl:with-param name="node" select="creationDate"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Creators'"/>
|
||||
<xsl:with-param name="node" select="creator"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label"><xsl:if test="creationDate">Updated</xsl:if><xsl:if test="not(creationDate)">Released</xsl:if></xsl:with-param>
|
||||
<xsl:with-param name="node" select="releaseDate"/>
|
||||
<xsl:with-param name="default">Unknown</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Company'"/>
|
||||
<xsl:with-param name="node" select="company"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Authors'"/>
|
||||
<xsl:with-param name="node" select="author"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Contributors'"/>
|
||||
<xsl:with-param name="node" select="contributor"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Publisher'"/>
|
||||
<xsl:with-param name="node" select="publisher"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'License'"/>
|
||||
<xsl:with-param name="node" select="license"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Source'"/>
|
||||
<xsl:with-param name="node" select="source"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Disks'"/>
|
||||
<xsl:with-param name="node" select="disk"/>
|
||||
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-main">
|
||||
<xsl:for-each select="machine[not(@type) or @type = 'default']">
|
||||
<xsl:call-template name="machine">
|
||||
<xsl:with-param name="href" select="@href"/>
|
||||
<xsl:with-param name="state" select="@state"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not(machine[not(@type) or @type = 'default'])">
|
||||
<p>No default machine specified for '<xsl:value-of select="title"/>' in manifest.xml</p>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="listItem">
|
||||
<xsl:param name="label"/>
|
||||
<xsl:param name="node"/>
|
||||
<xsl:param name="default">Unknown</xsl:param>
|
||||
<xsl:if test="$node != '' or $default != ''">
|
||||
<li><xsl:value-of select="$label"/>
|
||||
<ul class="common-list-data-items">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:variable name="desc">
|
||||
<xsl:choose>
|
||||
<xsl:when test="desc"><xsl:value-of select="desc"/></xsl:when>
|
||||
<xsl:when test="org"><xsl:value-of select="org"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<li title="{$desc}">
|
||||
<xsl:variable name="value">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name">
|
||||
<xsl:value-of select="name"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="normalize-space(./text()) != ''">
|
||||
<xsl:value-of select="normalize-space(./text())"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$default"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="href">
|
||||
<xsl:if test="@href"><xsl:value-of select="@href"/></xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$href != ''">
|
||||
<a href="{$href}"><xsl:value-of select="$value"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$value"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="page">
|
||||
<ul class="common-list-data-subitems">
|
||||
<xsl:for-each select="page">
|
||||
<li>
|
||||
<xsl:if test="@href">
|
||||
<a href="{$href}{@href}"><xsl:value-of select="."/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@href)">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not($node)">
|
||||
<xsl:if test="@href">
|
||||
<a href="{@href}"><xsl:value-of select="$default"/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@href)">
|
||||
<xsl:value-of select="$default"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</ul>
|
||||
</li>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
47
versions/c1pjs/1.37.0/outline.xsl
Normal file
47
versions/c1pjs/1.37.0/outline.xsl
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/c1pjs/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/c1pjs/1.37.0/document.xsl"/>
|
||||
<xsl:include href="/versions/c1pjs/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/outline">
|
||||
<xsl:variable name="machineType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@type"><xsl:value-of select="machine/@type"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$MACHINETYPE"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="documentStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<div class="page justified">
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="debugger"><xsl:value-of select="$machineType"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineType"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
278
versions/pc8080/1.37.0/common.css
Normal file
278
versions/pc8080/1.37.0/common.css
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
@CHARSET "UTF-8";
|
||||
/**
|
||||
@author Jeff Parsons (@jeffpar)
|
||||
@website http://www.pcjs.org/
|
||||
@created 2013-05-05
|
||||
@modified 2014-02-23
|
||||
@license http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
body {
|
||||
margin: 0;
|
||||
background: #202020;
|
||||
}
|
||||
h1, h2 {
|
||||
margin-top: 0;
|
||||
color: #cccccc;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h4 a {
|
||||
color: #cccccc !important;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
a img {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
pre, code {
|
||||
color: #000000;
|
||||
background-color: #cccccc;
|
||||
font-family: Monaco, Consolas, "Lucida Console", monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre {
|
||||
margin: 1em 2em;
|
||||
padding: 1em;
|
||||
border-radius: 5px;
|
||||
overflow: auto;
|
||||
}
|
||||
code {
|
||||
padding: 1px;
|
||||
}
|
||||
pre a, code a {
|
||||
color: #006400 !important;
|
||||
}
|
||||
.common {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
color: #cccccc;
|
||||
}
|
||||
.common a {
|
||||
|
||||
color: #7fc07f;
|
||||
text-decoration: none;
|
||||
}
|
||||
.common hr {
|
||||
border-color: #808080;
|
||||
}
|
||||
.common a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.common, .machine {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
|
||||
font-size: 15px;
|
||||
}
|
||||
.machine {
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
.c1pjs {
|
||||
overflow: visible;
|
||||
}
|
||||
.machine-placeholder {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.machine-floating {
|
||||
position: relative;
|
||||
z-index: auto;
|
||||
background-color: transparent;
|
||||
padding-right: 0;
|
||||
}
|
||||
.machine-sticky {
|
||||
position: fixed !important;
|
||||
z-index: 1 !important;
|
||||
background-color: #404040 !important;
|
||||
padding-right: 16px !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
.common-top {
|
||||
background: #202020;
|
||||
font-size: small;
|
||||
}
|
||||
.common-top-left {
|
||||
float: left;
|
||||
width: 60%;
|
||||
}
|
||||
.common-top-left ul {
|
||||
line-height: 1.5em;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 1em 1em 1em 9px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.common-top-left ul li {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
.common-top-left ul li a {
|
||||
border-right: 1px solid #6f6f6f;
|
||||
padding: 2px 6px 2px 6px;
|
||||
}
|
||||
.common-top-left ul li:last-child a {
|
||||
border-right: none;
|
||||
}
|
||||
.common-top-right {
|
||||
float: right;
|
||||
width: 40%;
|
||||
}
|
||||
.common-top-right p {
|
||||
float: right;
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
}
|
||||
.common-middle {
|
||||
clear: both;
|
||||
padding: 1px 1em 1px 1em;
|
||||
background: #404040;
|
||||
}
|
||||
.common-sidebar {
|
||||
float: left;
|
||||
font-size: small;
|
||||
width: 140px;
|
||||
padding-bottom: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.common-list {
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list li {
|
||||
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
.common-list-data {
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list-data li {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
.common-list-data-items, .common-list-data-subitems {
|
||||
font-size: x-small;
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 2em;
|
||||
}
|
||||
.common-list-data-items li, .common-list-data-subitems li {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.common-main {
|
||||
margin-left: 150px;
|
||||
|
||||
}
|
||||
.common-main blockquote {
|
||||
text-align: justify;
|
||||
}
|
||||
.common-image-gallery {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
.common-image-gallery:after {
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
||||
.common-image-frame {
|
||||
display: inline-block;
|
||||
margin: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.common-image-link {
|
||||
padding: 5px;
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
background-color: #FAEBD7;
|
||||
}
|
||||
.common-image-label {
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-bottom {
|
||||
clear: both;
|
||||
padding-top: 1em;
|
||||
}
|
||||
.common-bottom:after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.common-reference {
|
||||
float: left;
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-reference a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.common-copyright {
|
||||
float: right;
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-copyright a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.md-list {
|
||||
}
|
||||
.md-list li {
|
||||
line-height: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.md-list li p {
|
||||
padding-left: 2em;
|
||||
}
|
||||
.md-list-compact {
|
||||
}
|
||||
.md-list-compact li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.md-list-none {
|
||||
list-style-type: none;
|
||||
padding-left: 2em;
|
||||
}
|
||||
.md-list-none li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@media screen and (max-width: 900px) {
|
||||
|
||||
.common-sidebar {
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
}
|
||||
.common-list {
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list-data {
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li {
|
||||
width: 130px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
padding-right: 1em;
|
||||
margin-top: 0;
|
||||
}
|
||||
.common-list-data-subitems {
|
||||
display: none;
|
||||
}
|
||||
.common-main {
|
||||
clear: both;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.md-list-none {
|
||||
padding-left: 1em;
|
||||
}
|
||||
}
|
||||
58
versions/pc8080/1.37.0/common.xsl
Normal file
58
versions/pc8080/1.37.0/common.xsl
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY ne "≠"> <!ENTITY le "≤"> <!ENTITY ge "≥">
|
||||
<!ENTITY times "×"> <!ENTITY sdot "⋅"> <!ENTITY divide "÷">
|
||||
<!ENTITY copy "©"> <!ENTITY Sigma "Σ"> <!ENTITY sigma "σ"> <!ENTITY sum "∑"> <!ENTITY lbrace "{">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template name="commonStyles">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/versions/icons/current/pc-icon-57.png"/>
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/versions/icons/current/pc-icon-72.png"/>
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/versions/icons/current/pc-icon-76.png"/>
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/versions/icons/current/pc-icon-114.png"/>
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/versions/icons/current/pc-icon-120.png"/>
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/versions/icons/current/pc-icon-144.png"/>
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/versions/icons/current/pc-icon-152.png"/>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/versions/icons/current/pc-icon-180.png"/>
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="/versions/icons/current/pc-icon-192.png"/>
|
||||
<link rel="apple-touch-icon" href="/versions/icons/current/apple-touch-icon.png"/>
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/versions/icons/current/pc-icon-192.png"/>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/versions/icons/current/favicon.ico"/>
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pc8080/1.37.0/common.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="commonTop">
|
||||
<div class="common-top">
|
||||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
<li><a href="/apps/">Apps</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/docs/about/">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-top-right">
|
||||
<p>Powered by <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">JavaScript</a>, <a href="http://vanilla-js.com/" target="_blank">Vanilla JS</a>, and <a href="http://github.com/jeffpar/pcjs" target="_blank">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="commonBottom">
|
||||
<div class="common-bottom">
|
||||
<p class="common-reference"></p>
|
||||
<p class="common-copyright">
|
||||
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> © 2012-2017 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
|
||||
<span class="common-copyright"><a href="http://github.com/jeffpar/pcjs">PCjs Project</a> released under <a href="http://gnu.org/licenses/gpl.html">GPLv3</a></span>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
262
versions/pc8080/1.37.0/components.css
Normal file
262
versions/pc8080/1.37.0/components.css
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
|
||||
*:not(input,textarea) {
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.pcjs-embed {
|
||||
}
|
||||
.pcjs-embed:after {
|
||||
clear:both;
|
||||
}
|
||||
.pcjs-machine {
|
||||
}
|
||||
.pcjs-name, .pcjs-menu {
|
||||
clear: both;
|
||||
font-weight: bold;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
.pcjs-menu {
|
||||
float: left;
|
||||
}
|
||||
.pcjs-canvas {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.pcjs-container {
|
||||
color: #000000;
|
||||
position: relative;
|
||||
}
|
||||
.pcjs-label {
|
||||
font-size: small;
|
||||
line-height: 20px;
|
||||
vertical-align: middle;
|
||||
float: left;
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
}
|
||||
.pcjs-controls textarea {
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: x-small;
|
||||
}
|
||||
.pcjs-fieldset {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.pcjs-flag {
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.pcjs-progress {
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
margin-top: 8px;
|
||||
border: 1px solid black;
|
||||
position: relative;
|
||||
}
|
||||
.pcjs-progress-bar {
|
||||
height: 20px;
|
||||
width: 0;
|
||||
background-color: gold;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
.pcjs-progress-text {
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
font-size: small;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.pcjs-register {
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
vertical-align: middle;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.pcjs-switches {
|
||||
float: left;
|
||||
}
|
||||
.pcjs-bitBucket {
|
||||
float: left;
|
||||
width: 19px;
|
||||
height: 38px;
|
||||
}
|
||||
.pcjs-bitCell {
|
||||
float: left;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
margin-right: -1px;
|
||||
margin-bottom: -1px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
line-height: 19px;
|
||||
}
|
||||
.pcjs-bitCellLeft {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
.pcjs-bitLabel {
|
||||
font-size: xx-small;
|
||||
text-align: center;
|
||||
}
|
||||
.pcjs-description, .pcjs-status {
|
||||
font-size: x-small;
|
||||
line-height: 2.0em;
|
||||
}
|
||||
.pcjs-key {
|
||||
border: 1px solid black;
|
||||
font-size: x-small;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.pcjs-panel-group {
|
||||
color: #ffffff;
|
||||
background-color: #404040;
|
||||
}
|
||||
.pcjs-triplet {
|
||||
padding: 1px;
|
||||
}
|
||||
.pcjs-ledlbl {
|
||||
text-align: center;
|
||||
font-size: 40%;
|
||||
background-color: #000000;
|
||||
}
|
||||
.pcjs-ledlbl0 {
|
||||
text-align: right;
|
||||
font-size: 50%;
|
||||
background-color: #8d4076;
|
||||
}
|
||||
.pcjs-ledlbl1 {
|
||||
text-align: right;
|
||||
font-size: 50%;
|
||||
background-color: #d83662;
|
||||
}
|
||||
.pcjs-ledpad {
|
||||
text-align: center;
|
||||
font-size: x-small;
|
||||
line-height: 32px;
|
||||
background-color: #000000;
|
||||
border-bottom-left-radius: 20%;
|
||||
border-bottom-right-radius: 20%;
|
||||
}
|
||||
.pcjs-led {
|
||||
float: left;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 4px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #000000;
|
||||
}
|
||||
.pcjs-rled {
|
||||
float: left;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 4px;
|
||||
border: 1px solid black;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #ff0000;
|
||||
max-width: 50%;
|
||||
max-height: 50%;
|
||||
}
|
||||
.pcjs-swlbl {
|
||||
text-align: center;
|
||||
font-size: 40%;
|
||||
line-height: 16px;
|
||||
background-color: #000000;
|
||||
border-top-left-radius: 20%;
|
||||
border-top-right-radius: 20%;
|
||||
}
|
||||
.pcjs-swpad {
|
||||
height: 32px;
|
||||
background-color: #000000;
|
||||
}
|
||||
.pcjs-switch {
|
||||
height: 10px;
|
||||
width: 28px;
|
||||
margin-top: 0;
|
||||
max-width: 90%;
|
||||
background-color: #00ff00;
|
||||
}
|
||||
.pcjs-screen {
|
||||
clear: both;
|
||||
height: auto;
|
||||
position: relative;
|
||||
line-height: 0;
|
||||
}
|
||||
.pcjs-screen textarea {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
resize: none;
|
||||
color: white;
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: medium;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
opacity: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
.pcjs-reference {
|
||||
float: left;
|
||||
font-size: x-small;
|
||||
}
|
||||
.pcjs-reference a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.pcjs-copyright {
|
||||
float: right;
|
||||
font-size: x-small;
|
||||
}
|
||||
.pcjs-copyright a {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.pcjs-textarea {
|
||||
width: 100% !important;
|
||||
}
|
||||
.pcjs-registers {
|
||||
width: 100% !important;
|
||||
max-width: none !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.pdp11-device {
|
||||
width: 98% !important;
|
||||
max-width: none !important;
|
||||
margin-left: 8px !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1200px) {
|
||||
.machine-left {
|
||||
max-width: 48%;
|
||||
float: left;
|
||||
}
|
||||
.machine-right {
|
||||
max-width: 48%;
|
||||
float: left;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.machine-right + * {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
1420
versions/pc8080/1.37.0/components.xsl
Normal file
1420
versions/pc8080/1.37.0/components.xsl
Normal file
File diff suppressed because it is too large
Load diff
162
versions/pc8080/1.37.0/document.css
Normal file
162
versions/pc8080/1.37.0/document.css
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
.page {
|
||||
margin: 2% 2%;
|
||||
padding: 2% 2%;
|
||||
min-width: 30em;
|
||||
overflow: auto;
|
||||
font-size: large;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
background: #303030;
|
||||
color: #ccc;
|
||||
|
||||
}
|
||||
.page-header {
|
||||
}
|
||||
.page-header-title {
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.page a {
|
||||
color: #7fc07f;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footlink, a.paralink {
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footlink:link, a.paralink:link {
|
||||
color: blue;
|
||||
}
|
||||
a.footlink:visited, a.paralink:visited {
|
||||
color: blue;
|
||||
}
|
||||
.galleryitem {
|
||||
float: left;
|
||||
width: 200px;
|
||||
}
|
||||
.item {
|
||||
float: left;
|
||||
width: 2em;
|
||||
text-indent: 1em;
|
||||
}
|
||||
.list {
|
||||
margin-left: 3em;
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
div.pnumber {
|
||||
float: left;
|
||||
width: 2em;
|
||||
text-indent: 1em;
|
||||
}
|
||||
div.pitem {
|
||||
margin-left: 10em;
|
||||
}
|
||||
p.indent, .justified p {
|
||||
text-indent: 2em;
|
||||
text-align: justify;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
p.noindent {
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
p.center, .center {
|
||||
text-align: center;
|
||||
}
|
||||
li.para {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
blockquote.tag {
|
||||
font-size: small;
|
||||
font-family: Monaco, Fixed, monospace;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.blockquote {
|
||||
padding-left: 1em;
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
.italics {
|
||||
font-style: italic;
|
||||
}
|
||||
.medium {
|
||||
font-size: medium;
|
||||
}
|
||||
.small {
|
||||
font-size: x-small;
|
||||
}
|
||||
.smallcaps {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
.strike {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.summation, .bracelist {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5ex;
|
||||
text-indent: 0;
|
||||
}
|
||||
.bracelist-symbol {
|
||||
font-size: 3em;
|
||||
vertical-align: -40%;
|
||||
}
|
||||
.summation .summation-lower, .summation .summation-upper, .bracelist-item {
|
||||
display: block;
|
||||
font-size: 75%;
|
||||
text-align: center;
|
||||
}
|
||||
.summation .summation-upper {
|
||||
margin-bottom: 0;
|
||||
margin-left: 0.8ex;
|
||||
font-style: italic;
|
||||
}
|
||||
.summation .summation-lower{
|
||||
margin-bottom: -0.6ex;
|
||||
font-style: italic;
|
||||
}
|
||||
.summation .summation-symbol {
|
||||
font-size: 2em;
|
||||
}
|
||||
p sup {
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
bottom: .5em;
|
||||
font-size: small;
|
||||
}
|
||||
p sub {
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
bottom: -.5em;
|
||||
font-size: small;
|
||||
}
|
||||
.footnote {
|
||||
font-size: medium;
|
||||
text-indent: 1em;
|
||||
text-align: justify;
|
||||
margin-top: .5em;
|
||||
}
|
||||
.image-right {
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.image-caption {
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
452
versions/pc8080/1.37.0/document.xsl
Normal file
452
versions/pc8080/1.37.0/document.xsl
Normal file
|
|
@ -0,0 +1,452 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY ne "≠"> <!ENTITY le "≤"> <!ENTITY ge "≥">
|
||||
<!ENTITY times "×"> <!ENTITY sdot "⋅"> <!ENTITY divide "÷">
|
||||
<!ENTITY copy "©"> <!ENTITY Sigma "Σ"> <!ENTITY sigma "σ"> <!ENTITY sum "∑"> <!ENTITY lbrace "{">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template name="documentStyles">
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pc8080/1.37.0/document.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="title">
|
||||
<h1><xsl:apply-templates/></h1>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="p">
|
||||
<xsl:if test="@id">
|
||||
<a name="{@id}"></a>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@class)">
|
||||
<p><xsl:apply-templates/></p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p class="{@class}"><xsl:apply-templates/></p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p">
|
||||
<xsl:call-template name="p"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="br">
|
||||
<br/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p[@number]">
|
||||
<div class="pnumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@number) or @number = ''"> </xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div class="pitem">
|
||||
<xsl:call-template name="p"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="span">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@class)">
|
||||
<span><xsl:apply-templates/></span>
|
||||
</xsl:when>
|
||||
<xsl:when test="@class = 'italics'">
|
||||
<em><xsl:apply-templates/></em>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span class="{@class}"><xsl:apply-templates/></span>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h2">
|
||||
<h2><xsl:apply-templates/></h2>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h3">
|
||||
<h3><xsl:apply-templates/></h3>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h4">
|
||||
<h4><xsl:apply-templates/></h4>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h5">
|
||||
<h5><xsl:apply-templates/></h5>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h6">
|
||||
<h6><xsl:apply-templates/></h6>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="em">
|
||||
<em><xsl:apply-templates/></em>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="strong">
|
||||
<strong><xsl:apply-templates/></strong>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="a">
|
||||
<a href="{@href}" target="{@target}"><xsl:apply-templates/></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol">
|
||||
<blockquote><ol><xsl:apply-templates/></ol></blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ul">
|
||||
<blockquote><ul><xsl:apply-templates/></ul></blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="li">
|
||||
<li><xsl:apply-templates/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="img">
|
||||
<div><img src="{@src}" alt="image"/></div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pre">
|
||||
<pre><xsl:apply-templates/></pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="figure">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@pos">
|
||||
<div class="{@pos}"><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sub">
|
||||
<sub><xsl:apply-templates/></sub>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sup">
|
||||
<sup><xsl:apply-templates/></sup>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lt"><</xsl:template>
|
||||
<xsl:template match="gt">></xsl:template>
|
||||
<xsl:template match="ne">≠</xsl:template>
|
||||
<xsl:template match="le">≤</xsl:template>
|
||||
<xsl:template match="ge">≥</xsl:template>
|
||||
<xsl:template match="times">×</xsl:template>
|
||||
<xsl:template match="dot">⋅</xsl:template>
|
||||
<xsl:template match="divide">÷</xsl:template>
|
||||
<xsl:template match="sigma">σ</xsl:template>
|
||||
|
||||
<xsl:template match="summation">
|
||||
<span class="summation">
|
||||
<span class="summation-upper"><xsl:value-of select="@upper"/></span>
|
||||
<span class="summation-symbol">∑</span>
|
||||
<span class="summation-lower"><xsl:value-of select="@lower"/></span>
|
||||
</span>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bracelist">
|
||||
<span class="bracelist-symbol">{</span>
|
||||
<span class="bracelist">
|
||||
<xsl:for-each select="item">
|
||||
<span class="bracelist-item"><xsl:apply-templates/></span>
|
||||
</xsl:for-each>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="footlink">
|
||||
<xsl:variable name="docID" select="/document/@id"/>
|
||||
<a class="footlink" id="fn{$docID}_ref{@n}" href="#fn{$docID}_{@n}"><sup><xsl:if test="@quoted"><xsl:text>[</xsl:text></xsl:if><xsl:value-of select="@n"/><xsl:if test="@quoted"><xsl:text>]</xsl:text></xsl:if></sup></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="footnote">
|
||||
<xsl:variable name="docID" select="/document/@id"/>
|
||||
<div class="footnote"><a id="fn{$docID}_{@n}" href="#fn{$docID}_ref{@n}"><sup><xsl:value-of select="@n"/></sup></a><xsl:text> </xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="authors">
|
||||
<xsl:for-each select="author"><xsl:if test="position() != 1"><xsl:text>, </xsl:text></xsl:if><xsl:if test="position() != 1 and position() = last()"><xsl:text>and </xsl:text></xsl:if><xsl:value-of select="."/></xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="formatDate">
|
||||
<xsl:param name="date"/>
|
||||
<xsl:param name="format">MDY</xsl:param>
|
||||
<xsl:variable name="year">
|
||||
<xsl:value-of select="substring-before($date,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="mon-day">
|
||||
<xsl:value-of select="substring-after($date,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="mon">
|
||||
<xsl:value-of select="substring-before($mon-day,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="full-day">
|
||||
<xsl:value-of select="substring-after($mon-day,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="day">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring($full-day,1,1) = '0'"><xsl:value-of select="substring($full-day,2)"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$full-day"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mon = '01'">January </xsl:when>
|
||||
<xsl:when test="$mon = '02'">February </xsl:when>
|
||||
<xsl:when test="$mon = '03'">March </xsl:when>
|
||||
<xsl:when test="$mon = '04'">April </xsl:when>
|
||||
<xsl:when test="$mon = '05'">May </xsl:when>
|
||||
<xsl:when test="$mon = '06'">June </xsl:when>
|
||||
<xsl:when test="$mon = '07'">July </xsl:when>
|
||||
<xsl:when test="$mon = '08'">August </xsl:when>
|
||||
<xsl:when test="$mon = '09'">September </xsl:when>
|
||||
<xsl:when test="$mon = '10'">October </xsl:when>
|
||||
<xsl:when test="$mon = '11'">November </xsl:when>
|
||||
<xsl:when test="$mon = '12'">December </xsl:when>
|
||||
<xsl:when test="$mon = '00'"/> </xsl:choose>
|
||||
<xsl:if test="$day != '0' and $format = 'MDY'">
|
||||
<xsl:value-of select="$day"/><xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="$year"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="gallery">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
<div class="gallery">
|
||||
<xsl:apply-templates select="item" mode="gallery"/>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="gallery">
|
||||
<div class="galleryitem">
|
||||
<a href="{@ref}"><img src="/versions/images/current/pdf-192.jpg" alt="{.}"/></a><br/>
|
||||
<div style="font-size:small; text-align:center;"><xsl:value-of select="."/></div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'timeline']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>Timeline</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="timeline"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="timeline">
|
||||
<xsl:if test="@ref">
|
||||
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($documentFile)/document" mode="withDate">
|
||||
<xsl:with-param name="itemRef" select="@ref"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@ref)">
|
||||
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="@date"/></xsl:call-template></h3>
|
||||
<blockquote>
|
||||
<xsl:value-of select="."/>
|
||||
</blockquote>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'people']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>People</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="people"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="people">
|
||||
<h3><xsl:value-of select="name"/></h3>
|
||||
<xsl:apply-templates select="list"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'documents']">
|
||||
<xsl:if test="description"><h2><xsl:value-of select="description"/></h2></xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="item" mode="document"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="document">
|
||||
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($documentFile)/document">
|
||||
<xsl:with-param name="itemRef" select="@ref"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="document">
|
||||
<xsl:param name="itemRef"/>
|
||||
<li>
|
||||
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/></xsl:call-template>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="document" mode="withDate">
|
||||
<xsl:param name="itemRef"/>
|
||||
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="date"/><xsl:with-param name="format" select="MY"/></xsl:call-template></h3>
|
||||
<blockquote>
|
||||
<p>
|
||||
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/><xsl:with-param name="multiLine" select="'true'"/></xsl:call-template>
|
||||
</p>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="documentSummary">
|
||||
<xsl:param name="itemRef"/>
|
||||
<xsl:param name="multiLine">false</xsl:param>
|
||||
<xsl:choose>
|
||||
<xsl:when test="content|include">
|
||||
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
|
||||
<xsl:if test="@ref">
|
||||
<span class="small">
|
||||
<xsl:text> [</xsl:text><a href="{@ref}">Original</a><xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="copy">
|
||||
<span class="small">
|
||||
<xsl:text> [</xsl:text><a href="{copy/@ref}"><xsl:value-of select="copy"/></a><xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
<xsl:if test="author"><xsl:if test="$multiLine = 'true'"><br/></xsl:if><span class="medium"><xsl:text> by </xsl:text><xsl:call-template name="authors"/></span></xsl:if>
|
||||
<xsl:if test="source">
|
||||
<span class="small">
|
||||
<br/>
|
||||
<xsl:text>[Source: </xsl:text>
|
||||
<xsl:if test="site">
|
||||
<a href="{site/@url}"><xsl:value-of select="site"/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(site)">
|
||||
<a href="{source/@url}"><xsl:value-of select="source"/></a>
|
||||
</xsl:if>
|
||||
<xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'resources']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>Resources</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="resources"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="resources">
|
||||
<h3><xsl:value-of select="description"/></h3>
|
||||
<xsl:apply-templates select="list"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'links']">
|
||||
<xsl:if test="description">
|
||||
<h4><xsl:value-of select="description"/></h4>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="item" mode="links"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="links">
|
||||
<li><a href="{@ref}"><xsl:value-of select="."/></a></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[not(@type)]">
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item|tag" mode="outer"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="outer">
|
||||
<xsl:if test="description">
|
||||
<h3><xsl:value-of select="description"/></h3>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="list|item|tag" mode="inner"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list" mode="inner">
|
||||
<xsl:if test="description">
|
||||
<h4><xsl:value-of select="description"/></h4>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="innerlist">
|
||||
<xsl:if test="description">
|
||||
<xsl:value-of select="description"/>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="inner">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@ref">
|
||||
<li><a href="{@ref}"><xsl:apply-templates/></a></li>
|
||||
</xsl:when>
|
||||
<xsl:when test="description">
|
||||
<li><xsl:call-template name="innerlist"/></li>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<li><xsl:apply-templates/></li>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="para" mode="inner">
|
||||
<li class="para"><xsl:apply-templates/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tag" mode="outer">
|
||||
<xsl:call-template name="tag"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tag" mode="inner">
|
||||
<xsl:call-template name="tag"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="tag">
|
||||
<blockquote class="tag">
|
||||
<xsl:text><</xsl:text><xsl:if test="@href"><a href="{@href}"><xsl:value-of select="@name"/></a></xsl:if><xsl:if test="not(@href)"><xsl:value-of select="@name"/></xsl:if><xsl:for-each select="attr"><xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text>="</xsl:text><xsl:value-of select="@value"/><xsl:text>"</xsl:text></xsl:for-each>
|
||||
<xsl:choose>
|
||||
<xsl:when test="tag"><xsl:text>></xsl:text><xsl:apply-templates mode="inner"/><xsl:text></</xsl:text><xsl:value-of select="@name"/><xsl:text>></xsl:text></xsl:when>
|
||||
<xsl:when test="normalize-space(.) != ''"><xsl:text>></xsl:text><xsl:value-of select="."/><xsl:text></</xsl:text><xsl:value-of select="@name"/><xsl:text>></xsl:text></xsl:when>
|
||||
<xsl:otherwise><xsl:text>/></xsl:text></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
61
versions/pc8080/1.37.0/machine.xsl
Normal file
61
versions/pc8080/1.37.0/machine.xsl
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/pc8080/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/pc8080/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/machine">
|
||||
<xsl:variable name="machineType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@class = 'pc' or @class = 'c1p'"><xsl:value-of select="@class"/>js</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<p></p>
|
||||
<div id="{@id}" class="machine {$machineType} {$machineClass}">
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="@id"/>
|
||||
<xsl:with-param name="component" select="'machine'"/>
|
||||
<xsl:with-param name="class" select="$machineClass"/>
|
||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="debugger"><xsl:value-of select="$machineType"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineType"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
247
versions/pc8080/1.37.0/manifest.xsl
Normal file
247
versions/pc8080/1.37.0/manifest.xsl
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2014-04-10" modified="2014-04-10" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/pc8080/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/pc8080/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/manifest[@type = 'document']">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<h4>Document Manifest</h4>
|
||||
<div class="common-sidebar">
|
||||
<ul class="common-list-data">
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Title'"/>
|
||||
<xsl:with-param name="node" select="title"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Version'"/>
|
||||
<xsl:with-param name="node" select="version"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Source'"/>
|
||||
<xsl:with-param name="node" select="source"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Documents'"/>
|
||||
<xsl:with-param name="node" select="document"/>
|
||||
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-main">
|
||||
<p><xsl:value-of select="desc"/></p>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/manifest[@type = 'software' or not(@type)]">
|
||||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$APPCLASS"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<h4>Software Manifest</h4>
|
||||
<div class="common-sidebar">
|
||||
<ul class="common-list-data">
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Title'"/>
|
||||
<xsl:with-param name="node" select="title"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Version'"/>
|
||||
<xsl:with-param name="node" select="version"/>
|
||||
<xsl:with-param name="default">Unknown</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Type'"/>
|
||||
<xsl:with-param name="node" select="type"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Category'"/>
|
||||
<xsl:with-param name="node" select="category"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Created'"/>
|
||||
<xsl:with-param name="node" select="creationDate"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Creators'"/>
|
||||
<xsl:with-param name="node" select="creator"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label"><xsl:if test="creationDate">Updated</xsl:if><xsl:if test="not(creationDate)">Released</xsl:if></xsl:with-param>
|
||||
<xsl:with-param name="node" select="releaseDate"/>
|
||||
<xsl:with-param name="default">Unknown</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Company'"/>
|
||||
<xsl:with-param name="node" select="company"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Authors'"/>
|
||||
<xsl:with-param name="node" select="author"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Contributors'"/>
|
||||
<xsl:with-param name="node" select="contributor"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Publisher'"/>
|
||||
<xsl:with-param name="node" select="publisher"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'License'"/>
|
||||
<xsl:with-param name="node" select="license"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Source'"/>
|
||||
<xsl:with-param name="node" select="source"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Disks'"/>
|
||||
<xsl:with-param name="node" select="disk"/>
|
||||
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-main">
|
||||
<xsl:for-each select="machine[not(@type) or @type = 'default']">
|
||||
<xsl:call-template name="machine">
|
||||
<xsl:with-param name="href" select="@href"/>
|
||||
<xsl:with-param name="state" select="@state"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not(machine[not(@type) or @type = 'default'])">
|
||||
<p>No default machine specified for '<xsl:value-of select="title"/>' in manifest.xml</p>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="listItem">
|
||||
<xsl:param name="label"/>
|
||||
<xsl:param name="node"/>
|
||||
<xsl:param name="default">Unknown</xsl:param>
|
||||
<xsl:if test="$node != '' or $default != ''">
|
||||
<li><xsl:value-of select="$label"/>
|
||||
<ul class="common-list-data-items">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:variable name="desc">
|
||||
<xsl:choose>
|
||||
<xsl:when test="desc"><xsl:value-of select="desc"/></xsl:when>
|
||||
<xsl:when test="org"><xsl:value-of select="org"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<li title="{$desc}">
|
||||
<xsl:variable name="value">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name">
|
||||
<xsl:value-of select="name"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="normalize-space(./text()) != ''">
|
||||
<xsl:value-of select="normalize-space(./text())"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$default"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="href">
|
||||
<xsl:if test="@href"><xsl:value-of select="@href"/></xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$href != ''">
|
||||
<a href="{$href}"><xsl:value-of select="$value"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$value"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="page">
|
||||
<ul class="common-list-data-subitems">
|
||||
<xsl:for-each select="page">
|
||||
<li>
|
||||
<xsl:if test="@href">
|
||||
<a href="{$href}{@href}"><xsl:value-of select="."/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@href)">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not($node)">
|
||||
<xsl:if test="@href">
|
||||
<a href="{@href}"><xsl:value-of select="$default"/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@href)">
|
||||
<xsl:value-of select="$default"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</ul>
|
||||
</li>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
47
versions/pc8080/1.37.0/outline.xsl
Normal file
47
versions/pc8080/1.37.0/outline.xsl
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/pc8080/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/pc8080/1.37.0/document.xsl"/>
|
||||
<xsl:include href="/versions/pc8080/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/outline">
|
||||
<xsl:variable name="machineType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@type"><xsl:value-of select="machine/@type"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$MACHINETYPE"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="documentStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<div class="page justified">
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="debugger"><xsl:value-of select="$machineType"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineType"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
313
versions/pc8080/1.37.0/pc8080-dbg.js
Normal file
313
versions/pc8080/1.37.0/pc8080-dbg.js
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
(function(){/*
|
||||
http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/cpudef.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/messages.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/defines.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/panel.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/bus.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/memory.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/cpu.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/cpustate.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/cpuops.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/chipset.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/rom.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/ram.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/keyboard.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/video.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/serial.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/debugger.js (C) Jeff Parsons 2012-2017
|
||||
http://pcjs.org/modules/pc8080/lib/computer.js (C) Jeff Parsons 2012-2017
|
||||
*/
|
||||
var l,aa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ca;if("function"==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={vb:!0},fa={};try{fa.__proto__=ea;da=fa.vb;break a}catch(a){}da=!1}ca=da?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ha=ca;
|
||||
function ia(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(ha)ha(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Pf=b.prototype}
|
||||
for(var ja="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ka="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,la=["Math","trunc"],ma=0;ma<la.length-1;ma++){var oa=la[ma];oa in ka||(ka[oa]={});ka=ka[oa]}
|
||||
var pa=la[la.length-1],qa=ka[pa],ra=qa?qa:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||0===a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b};ra!=qa&&null!=ra&&ja(ka,pa,{configurable:!0,writable:!0,value:ra});
|
||||
var m={Be:0,Ee:1,Fe:2,Ge:3,He:4,Ie:5,Je:6,Ke:7,Le:8,Me:9,Ne:10,Oe:11,Pe:12,Qe:13,Re:14,Se:15,Te:16,Ue:17,Ve:18,We:19,Xe:20,Ye:21,Ze:22,$e:23,af:24,bf:25,cf: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,Ya:65,Ub:66,Vb:67,Db:68,E:69,Yb:70,Zb:71,$b:72,ac:73,bc:74,cc:75,Fb:76,gc:77,hc:78,lc:79,mc:80,Q:81,nc:82,pc:83,qc:84,rc:85,tc:86,uc:87,
|
||||
wc:88,xc:89,tb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,vb:97,td:98,wd:99,d:100,e:101,Ad:102,Cd:103,Dd:104,Ed:105,Nd:106,k:107,Od:108,Qd:109,n:110,Rd:111,p:112,q:113,r:114,ne:115,t:116,pe:117,qe:118,re:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,df:127},sa={59:186,61:187,173:189,224:91};
|
||||
function ta(a,b){if(a){b||(b=10);var c,d=0<a.indexOf(",");d&&(a=a.replace(/,/g,""));var e=c=a.charAt(0);"#"==c?(b=8,c=""):"$"==c&&(b=16,c="");e!=c?a=a.substr(1):(e=c=a.substr(0,2),"0b"==c&&d||"^B"==c?(b=2,c=""):"0o"==c||"^O"==c?(b=8,c=""):"^D"==c?(b=10,c=""):"0x"==c&&(b=16,c=""),e!=c&&(a=a.substr(2)));e=c=a.slice(-1);"Y"==c||"y"==c?(b=2,c=""):"."==c?(b=10,c=""):"H"==c||"h"==c?(b=16,c=""):"K"==c?c="000":"M"==c?c="000000":"G"==c&&(c="000000000");e!=c&&(a=a.slice(0,-1)+c);var f;e=0;10>=b&&(c=a.match(/(-?[0-9]+)B([0-9]*)/))&&
|
||||
(a=c[1],e=35-((c[2]||35)&255));c=a;if(((d=b)&&10!=d?16==d?null!==c.match(/^-?[0-9a-f]+$/i):8==d?null!==c.match(/^-?[0-7]+$/):2==d&&null!==c.match(/^-?[01]+$/):null!==c.match(/^-?[0-9]+$/))&&!isNaN(f=parseInt(a,b))){e&&(0>f&&(f+=Math.pow(2,36)),f=0<e?f*Math.pow(2,e):Math.trunc(f/Math.pow(2,-e)));var g=f}}return g}
|
||||
function wa(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+=0<=h&&9>=h?48:55;f=String.fromCharCode(h)+f;a=Math.trunc(a/b)}g--}return(void 0===d?"":d)+f}function n(a,b,c){b?9<b&&(b=9):(b=Math.abs(a),b=65535>=b?4:4294967295>=b?8:9);return wa(a,16,b,c?"0x":"")}function xa(a){return n(a,2,!0)}
|
||||
function q(a){return n(a,4,!0)}function ya(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 za(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function Aa(){var a=Ca();return-1!==a.indexOf("pcjs.org",a.length-8)}function Da(a){return a.replace(/[&<>"']/g,function(a){return Ea[a]})}function Fa(a,b){return(a+" ").slice(0,b)}
|
||||
function Ga(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ea={"&":"&","<":"<",">":">",'"':""","'":"'"},Ha={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
|
||||
function Ia(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;var h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}
|
||||
function Ja(){var a,b="";a||(a=new Date);for(var c=a.getHours(),d=a.getDate(),e=a.getMonth()+1,f=0;11>f;f++){var g;switch(g="Y-m-d H:i:s".charAt(f)){case "a":b+=12>c?"am":"pm";break;case "d":b+=("0"+d).slice(-2);break;case "D":b+=Ka[a.getDay()].substr(0,3);break;case "F":b+=La[e-1];break;case "g":b+=c?12<c?c-12:c:12;break;case "h":b+=c;break;case "H":b+=("0"+c).slice(-2);break;case "i":b+=("0"+a.getMinutes()).slice(-2);break;case "j":b+=d;break;case "l":b+=Ka[a.getDay()];break;case "m":b+=("0"+e).slice(-2);
|
||||
break;case "M":b+=La[e-1].substr(0,3);break;case "n":b+=e;break;case "s":b+=("0"+a.getSeconds()).slice(-2);break;case "y":b+=(""+a.getFullYear()).slice(-2);break;case "Y":b+=a.getFullYear();break;default:b+=g}}return b}function Ma(a,b){if(Array.prototype.indexOf)return a.indexOf(b,c);var c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;c<d;c++)if(c in a&&a[c]===b)return c;return-1}var Ka="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),La="January February March April May June July August September October November December".split(" ");
|
||||
function Qa(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="",p;for(p in b)b.hasOwnProperty(p)&&(k&&(k+="&"),k+=p+"="+encodeURIComponent(b[p]));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 Ra(a,b){var c,d={la:null,qa:null,Oa:null,Ga:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f;if("<"==b.charAt(0))throw Error(b);var 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.Oa=g.load;d.Ga=g.exec;if(e=g.bytes)d.la=e;else if(e=g.words)for(d.la=Array(2*e.length),f=c=0;c<e.length;c++)d.la[f++]=e[c]&255,d.la[f++]=e[c]>>8&255;else if(e=g.longs)for(d.la=Array(4*e.length),f=c=0;c<e.length;c++)d.la[f++]=
|
||||
e[c]&255,d.la[f++]=e[c]>>8&255,d.la[f++]=e[c]>>16&255,d.la[f++]=e[c]>>24&255;else(e=g.data)?d.Mf=e:d.la=g;d.la&&(d.la.length?1==d.la.length&&(r(d.la[0]),d=null):(r("Empty resource: "+a),d=null));d.qa=g.symbols}catch(h){r("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)){r("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.la=e)}return d}
|
||||
function Ca(){return"http://"+(window?window.location.host:"www.pcjs.org")}function Sa(){return window?window.navigator.userAgent:""}function Ta(){if(null==Ua){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}Ua=a}return Ua}function Va(a){if(window)try{var b=window.localStorage.getItem(a)}catch(c){}return b}
|
||||
function Wa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Xa(a){if(window){var b=Sa();return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}function Ya(a,b,c){if(a)for(var d=0;d<Za.length;d++){var e=Za[d];if(c){if(e+=c,b+e in a)return e}else if(e=e?e+b[0].toUpperCase():b[0],e+=b.substr(1),e in a)return e}return null}
|
||||
function $a(a){if(!ab){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," "))}ab=c}return ab[a]||ab[a.toLowerCase()]}function bb(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
||||
function cb(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 gb(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function hb(a){ib.init.push(a)}
|
||||
function jb(a){if(kb)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){lb("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.",void 0,void 0)}}function mb(a){!kb&&a?(kb=!0,nb&&pb("init"),qb&&pb("show")):kb=a}function pb(a){ib[a]&&jb(ib[a])}var ab=null,ib={init:[],show:[],exit:[]},Za=["","moz","ms","webkit"],nb=!1,qb=!1,kb=!0,Ua=null;gb("onload",function(){nb=!0;jb(ib.init)});gb("onpageshow",function(){qb=!0;jb(ib.show)});
|
||||
gb(Xa("iOS")?"onpagehide":Xa("Opera")?"onunload":"onbeforeunload",function(){jb(ib.exit)});function t(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.vc=b.comment;this.zd=b;this.exports={};this.P=this.bindings={};a=this.id.indexOf(".");0>a?this.Gb=this.id:(this.$a=this.id.substr(0,a),this.Gb=this.id.substr(a+1));this.D={ready:!1,ib:!1,Hb:!1,Nf:!1,ia:!1,Qb:!1,error:!1};this.xb=null;this.D.error=!1;this.ga=c||0;this.K=this.w=this.I=this.R=null;sb.push(this)}
|
||||
function tb(a,b,c){ub[a]&&b&&(ub[a][b]=c)}function vb(){return Date.now()||+new Date}function lb(a,b,c){b||r((c?c+": ":"")+a)}function r(a){window&&window.alert(a)}function wb(a){var b=!1;window&&(b=window.confirm(a));return b}function xb(a,b){a.value+=b;b=a.value;8192<b.length&&(a.value=b.substr(b.length-4096));a.scrollTop=a.scrollHeight}
|
||||
function yb(a,b){b=zb(b.parentNode,"pc8080-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),k=0;k<h.length;k++)switch(g=h[k],g){case "pc8080-binding":(g=Ab(f))&&g.binding&&a.da(g.type,g.binding,f,g.value),k=h.length}}}}function Cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<sb.length;b++){var d=sb[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
||||
function Db(a){if(void 0!==a){var b;for(b=0;b<sb.length;b++)if(sb[b].id===a)return sb[b]}return null}function Eb(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<sb.length;d++)if(c)c==sb[d]&&(c=null);else if(!(a!=sb[d].type||b&&sb[d].id.indexOf(b)))return sb[d]}return null}function Ab(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){r(c.message+" ("+a+")")}return b}
|
||||
function zb(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 Fb(a){for(var b=!0,c=Gb[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],f=null;0<=Hb.indexOf(e)&&(f=function(){return function(){Fb(a)}}());var g=Ib[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{b=!1;var h=Eb(d[1],a);if(h)if(g=Jb[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){r("Script error: '"+e+(g?" failed":" unrecognized"));break}}c&&!c.length&&delete Gb[a];return b}l=t.prototype;
|
||||
l.toString=function(){return this.name?this.name:this.id||this.type};
|
||||
l.da=function(a,b,c){switch(b){case "clear":return this.P[b]||(this.P[b]=c,c.onclick=function(a){return function(){a.P.print&&(a.P.print.value="")}}(this)),!0;case "print":return this.P[b]||(this.P[b]=c,this.aa=function(a){this.i(a,this.type);return!0},c.value="",this.print=function(a){return function(b){xb(a,b)}}(c),this.i=function(a,b){return function(a,c){a||(a="");if(c!=Kb||"..."!=a.slice(-3))c&&(a=c+": "+a),xb(b,a+"\n");else{c=b.value;var d=c.lastIndexOf(a);0>d?c+=a+"\n":c=c.substr(0,d)+(a+".")+
|
||||
c.substr(d+a.length);8192<c.length&&(c=c.substr(c.length-4096));b.value=c;b.scrollTop=b.scrollHeight}}}(this,c)),!0;default:return!1}};l.log=function(){};l.print=function(){};l.i=function(){};l.status=function(a){this.i(this.type+": "+a)};l.aa=function(a,b,c){if(!b){var d=Eb("Computer",this.id);if(d&&d.D.Qb)return console.log("ignoring notice during unload: "+a),!1}lb(a,b,c||this.type);return!0};function Lb(a,b){a.D.error=!0;a.aa(b)}function Mb(a,b){b&&(a.D.ready?b():a.xb=b);return a.D.ready}
|
||||
function Nb(a){if(!a.D.error&&(a.D.ready=!0,a.D.ready)){var b=a.xb;a.xb=null;b&&b()}}function Ob(a,b){a.D.ib&&(b?a.D.Hb=!0:void 0===b&&a.i(a.toString()+" busy"));return a.D.ib}function Pb(a,b){if(a.D.Hb)return a.D.ib=!1,a.D.Hb=!1;if(a.D.error)return a.i(a.toString()+" error"),!1;a.D.ib=b;return a.D.ib}l.ua=function(){return this.D.ia=!0};l.ta=function(a,b){b&&(this.D.ia=!1);return!0};function Qb(a,b){if(a.K){a===a.K?b|=0:b=b||a.ga;var c=a.K.ga&b;return!!b&&c===b||!!(c&a.K.vd)}return!1}
|
||||
function Rb(a,b){a.K&&Qb(a,0)&&a.K.message(b,void 0)}function y(a,b,c,d,e,f,g){a.K&&(!0===g?g=0:null==g&&(g=a.ga),Sb(a.K,a,b,c,d,e,f,g))}var Kb="progress";window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
var ub=window?window.PCjs.Machines:{},sb=window?window.PCjs.Components:[],Gb=window?window.PCjs.Commands:{},Hb=["hold","sleep","wait"],Ib={alert:function(a){r(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},Jb={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 Tb="undefined"!==typeof ArrayBuffer,Ub=[1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,
|
||||
0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1],Xb={cpu:1,bus:64,mem:128,port:256,nvr:16384,chipset:32768,keyboard:65536,key:131072,video:262144,fdc:524288,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:536870912,warn:1073741824,halt:-2147483648};function Yb(a){t.call(this,"Panel",a)}ia(Yb,t);
|
||||
Yb.prototype.da=function(a,b,c,d){return this.R&&this.R.da(a,b,c,d)||this.w&&this.w.da(a,b,c,d)||this.B&&this.B.da(a,b,c,d)||this.K&&this.K.da(a,b,c,d)?!0:t.prototype.da.call(this,a,b,c,d)};Yb.prototype.Ea=function(a,b,c,d){this.R=a;this.I=b;this.w=c;this.K=d;this.B=Zb(a,"Keyboard")};Yb.prototype.ua=function(a,b){b||$b();return!0};Yb.prototype.ta=function(){return!0};
|
||||
function $b(){for(var a=!1,b=zb(document,"pc8080","panel"),c=0;c<b.length;c++){var d=b[c],e=Ab(d),f=Db(e.id);f||(a=!0,f=new Yb(e));yb(f,d);a&&Nb(f)}}hb($b);
|
||||
function ac(a,b,c){t.call(this,"Bus",a);this.w=b;this.K=c;this.M=a.busWidth||16;this.N=Math.pow(2,this.M);this.C=this.N-1|0;this.g=(this.M>>1)+2;10>this.g&&(this.g=10);15<this.g&&(this.g=15);this.u=1<<this.g;this.O=this.u>>2;this.j=this.u-1;this.L=this.N/this.u|0;this.H=this.L-1;this.A=[];this.B=[];this.F=this.G=!1;this.S=[];this.T=[];a=new A;bc(a,this.K);this.b=Array(this.L);for(b=0;b<this.L;b++)this.b[b]=a;Nb(this)}ia(ac,t);ac.prototype.reset=function(){};
|
||||
ac.prototype.ua=function(a,b){b||this.reset();return!0};function cc(a,b,c,d){for(var e=b,f=c,g=e>>>a.g;0<f&&g<a.b.length;){var h=a.b[g],k=g*a.u,p=a.u-(e-k);p>f&&(p=f);if(h&&h.size){if(h.type==d){if(e+f<=h.J)return h.mb+=h.J-e,h.J=e,!0;if(e>=h.J+h.mb){p=h.size-(e-k);p>f&&(p=f);h.mb=e-h.J+p;e=k+a.u;f-=p;g++;continue}}return dc(ec,e,f)}e=new A(e,p,a.u,d);bc(e,a.K,h);a.b[g++]=e;e=k+a.u;f-=p}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+fc[d]+" at "+q(b)),!0):dc(gc,b,c)}
|
||||
function hc(a,b){return a.b[(b&a.C)>>>a.g].lb(b&a.j,b)}function ic(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Gc(c,b):a.b[d++].Va(c,b)|a.b[d&a.H].Va(0,b+1)<<8}function jc(a,b){var c=b&a.j,d=(b&a.C)>>>a.g;return c!=a.j?a.b[d].Mb(c,b):a.b[d++].lb(c,b)|a.b[d&a.H].lb(0,b+1)<<8}function kc(a,b,c){a.b[(b&a.C)>>>a.g].nb(b&a.j,c&255,b)}function lc(a,b,c){var d=b&a.j,e=(b&a.C)>>>a.g;d!=a.j?a.b[e].Jc(d,c&65535,b):(a.b[e++].Xa(d,c&255,b),a.b[e&a.H].Xa(0,c>>8&255,b+1))}
|
||||
function mc(a){for(var b=0,c=[],d=0;d<a.L;d++){var e=a.b[d];if(e.Ca||e.Cc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,k=[];g<e.length;){for(var p=e[g],v=g+1;v<e.length&&e[v]===p;)v++;k[h++]=v-g;k[h++]=p;g=v}k.length<e.length&&(e=k)}c[f]=e}}return c}function nc(a,b){if(void 0===b)return a.F=!a.F,a.F;void 0===a.A[b]&&(a.A[b]=[null,!1]);a.A[b][1]=!a.A[b][1];return a.A[b][1]}
|
||||
function oc(a,b,c,d){void 0===d&&(d=0);if(c)for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.A[k]?r("Input port "+q(k)+" already registered"):f.A[k]=[h,!1]}}function pc(a,b,c){for(var d=1,e=0,f=0;0<d;){var g=a.A[b],h=a.S[b]||1,k=1==h?255:2==h?65535:-1,p=k;void 0!==g?(g[0]&&(p=g[0](b,c),void 0===p?p=k:p&=k),a.K&&a.F!=g[1]&&qc(a.K,b,p)):a.K&&(Sb(a.K,a,b,null,c),a.F&&qc(a.K,b,p));e|=p<<f;f+=h<<3;b+=h;d-=h}return e}
|
||||
function Ac(a,b){if(void 0===b)return a.G=!a.G,a.G;void 0===a.B[b]&&(a.B[b]=[null,!1]);a.B[b][1]=!a.B[b][1];return a.B[b][1]}function Bc(a,b,c,d){void 0===d&&(d=0);if(c)for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.B[k]?r("Output port "+q(k)+" already registered"):f.B[k]=[h,!1]}}
|
||||
function Cc(a,b,c,d){for(var e=1,f=0;0<e;){var g=a.B[b],h=a.T[b]||1,k=1==h?255:2==h?65535:-1;k&=c>>>=f;if(void 0!==g){if(g[0])g[0](b,k,d);a.K&&a.G!=g[1]&&Dc(a.K,b,k)}else a.K&&(Sb(a.K,a,b,k,d),a.G&&Dc(a.K,b,k));f+=h<<3;b+=h;e-=h}}function dc(a,b,c){r("Memory block error ("+a+": "+n(b)+","+n(c)+")");return!1}var ec=1,gc=2,Ec;if(Tb){var Fc=new ArrayBuffer(2);(new DataView(Fc)).setUint16(0,256,!0);Ec=256===(new Uint16Array(Fc))[0]}else Ec=!1;var Gc=Ec;
|
||||
function A(a,b,c,d){this.id=Hc+=2;this.b=null;this.J=a;this.mb=b;this.size=c||0;this.type=d||Ic;this.w=d==Jc;bc(this);this.Ca=this.Cc=!1;if(c)if(Tb)this.R=new ArrayBuffer(c),this.j=new DataView(this.R,0,c),this.g=new Uint8Array(this.R,0,c),this.u=new Uint16Array(this.R,0,c>>1),this.b=new Int32Array(this.R,0,c>>2),Kc(this,Gc?Lc:Mc);else{this.b=Array(c>>2);for(a=0;a<this.b.length;a++)this.b[a]=0;Kc(this,Nc)}else Kc(this)}l=A.prototype;
|
||||
l.save=function(){var a;if(Tb){var b=Array(this.size>>2);for(a=0;a<b.length;a++)b[a]=this.j.getInt32(a<<2,!0)}else b=this.b;return b};l.restore=function(a){if(a&&this.size==a.length<<2){var b;if(Tb)for(b=0;b<a.length;b++)this.j.setInt32(b<<2,a[b],!0);else this.b=a;return this.Ca=!0}return!1};function Kc(a,b){b||(b=Oc);Pc(a,b,void 0);Qc(a,b,void 0)}function Pc(a,b,c){c&&a.I||(a.Va=b[0]||a.Fc,a.Gc=b[2]||a.Hc);if(c||void 0===c)a.lb=b[0]||a.Fc,a.Mb=b[2]||a.Hc}
|
||||
function Qc(a,b,c){c&&a.P||(a.Xa=!a.w&&b[1]||a.ob,a.Jc=!a.w&&b[3]||a.Rb);if(c||void 0===c)a.nb=b[1]||a.ob,a.Sb=b[3]||a.Rb}l.Na=function(a,b){b?0===this.P++&&Qc(this,Rc,!1):0===this.I++&&Pc(this,Rc,!1)};function Sc(a,b){b?0===--a.P&&(a.Xa=a.w?a.ob:a.nb,a.Jc=a.w?a.Rb:a.Sb):0===--a.I&&(a.Va=a.lb,a.Gc=a.Mb)}function bc(a,b,c){a.K=b;a.I=a.P=0;c&&((a.I=c.I)&&Pc(a,Rc,!1),(a.P=c.P)&&Qc(a,Rc,!1))}l.Fc=function(){this.K&&Qb(this.K,129)&&this.K.message("attempt to read invalid block %"+n(this.J),!0);return 255};
|
||||
l.ob=function(a,b){this.K&&Qb(this.K,129)&&this.K.message("attempt to write "+q(b)+" to invalid block %"+n(this.J),!0)};l.Hc=function(a,b){return this.Va(a++,b++)|this.Va(a,b)<<8};l.Rb=function(a,b,c){this.Xa(a++,b&255,c++);this.Xa(a,b>>8,c)};l.he=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};l.le=function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8};l.ve=function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.Ca=!0};
|
||||
l.ze=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.Ca=!0};l.fe=function(a,b){if(this.K&&null!=this.J){var c=this.K;Tc(c,this.J+a,1,c.M)&&Uc(c,!0)}return this.lb(a,b)};l.je=function(a,b){if(this.K&&null!=this.J){var c=this.K;Tc(c,this.J+a,2,c.M)&&Uc(c,!0)}return this.Mb(a,b)};
|
||||
l.te=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Tc(d,this.J+a,1,d.B)&&Uc(d,!0)}this.w?this.ob(0,b):this.nb(a,b,c)};l.xe=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;Tc(d,this.J+a,2,d.B)&&Uc(d,!0)}this.w?this.ob(0,b):this.Sb(a,b,c)};l.ee=function(a){return this.g[a]};l.ge=function(a){return this.g[a]};l.ie=function(a){return this.j.getUint16(a,!0)};l.ke=function(a){return a&1?this.g[a]|this.g[a+1]<<8:this.u[a>>1]};l.se=function(a,b){this.g[a]=b;this.Ca=!0};
|
||||
l.ue=function(a,b){this.g[a]=b;this.Ca=!0};l.we=function(a,b){this.j.setUint16(a,b,!0);this.Ca=!0};l.ye=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.u[a>>1]=b;this.Ca=!0};var Ic=0,Jc=2,fc=["NONE","RAM","ROM","VID","H/W"],Hc=0,Oc=[],Nc=[A.prototype.he,A.prototype.ve,A.prototype.le,A.prototype.ze],Rc=[A.prototype.fe,A.prototype.te,A.prototype.je,A.prototype.xe];if(Tb)var Mc=[A.prototype.ee,A.prototype.se,A.prototype.ie,A.prototype.we],Lc=[A.prototype.ge,A.prototype.ue,A.prototype.ke,A.prototype.ye];
|
||||
function Vc(a,b){t.call(this,"CPU",a,1);var c=a.multiplier||1;this.ya=a.cycles||b;this.T=c;this.Ra=Math.round(this.ya/1E4)/100;this.Z=this.Ra*this.T;this.D.ja=!1;this.D.Pb=!1;this.D.hb=a.autoStart;this.D.Ac=!1;this.D.Ua=!1;this.va=this.na=0;this.xa=a.csStart;this.ma=a.csInterval;this.ra=a.csStop;this.U=[];this.Bb=this.qb.bind(this);Nb(this)}ia(Vc,t);l=Vc.prototype;
|
||||
l.Ea=function(a,b,c,d){this.R=a;this.I=b;this.K=d;for(b=0;b<Wc.length;b++)(c=this.P[Wc[b]])&&this.R.da(null,Wc[b],c);this.W=Zb(a,"ChipSet");a=Xc(a,"autoStart");null!=a&&(this.D.hb="true"==a?!0:"false"==a?!1:!!a);Nb(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
|
||||
l.ua=function(a,b){if(!b){if(a&&this.restore){Yc(this);if(!this.restore(a))return!1;Zc(this)}else this.reset();this.K?(a=this.K,a.i("Type ? for help with PC8080 Debugger commands"),$c(a),a.ma&&(b=a.ma,a.ma=null,ad(a,b))):this.i("No debugger detected")}bd(this);return!0};l.ta=function(a){return a?this.save():!0};l.hb=function(){return this.D.hb||!this.K&&void 0===this.P.run?(this.qb(),!0):!1};l.Dc=function(){return 0};
|
||||
function Zc(a){void 0===a.xa&&(a.xa=0);void 0===a.ma&&(a.ma=-1);void 0===a.ra&&(a.ra=-1);a.D.Ua=0<=a.xa&&0<a.ma;a.D.Ua&&(a.va=0,a.na=a.xa-a.ka)}function cd(a,b){if(a.D.Ua){var c=!1;a.va=a.va+a.Dc()|0;a.na-=b;0>=a.na&&(a.na+=a.ma,c=!0);0<=a.ra&&a.ra<=dd(a)&&(a.ma=a.ra=-1,Zc(a),ed(a),c=!0);c&&a.i(dd(a)+" cycles: checksum="+n(a.va))}}
|
||||
l.da=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.P[b]=c;a=!0;break;case "run":this.P[b]=c;c.onclick=function(){var a;if(a=d.R)if(a=d.R,a.D.ia)a=!0;else{var b=null,c,h=Cb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.D.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.D.ia);c++);c==h.length&&(b=a);r("The "+b.type+" component ("+b.id+") is not "+(b.D.ready?"powered yet":"ready yet"+(b.xb?" (waiting for notification)":""))+".");a=!1}a&&(d.D.ja?ed(d):d.qb())};a=
|
||||
!0;break;case "speed":this.P[b]=c;a=!0;break;case "setSpeed":this.P[b]=c,c.onclick=function(){fd(d,d.T<<1,!0)},c.textContent=this.Z.toFixed(2)+"Mhz",a=!0}return a};function gd(a,b,c){a.ka+=b;c&&(a.ea=a.b=0)}function rd(a,b){var c=1;b&&1<a.T&&a.Y&&(c=a.Y/a.Ra);a.fb=Math.round(1E3/sd);a.La=Math.floor(a.ya/sd*c);b||(a.sa=a.La);a.Ta=0}function dd(a){return a.ka+a.X+a.ea-a.b}function Yc(a){a.Y=0;a.gb=0;a.ka=a.X=a.ea=a.b=0;Zc(a);fd(a,1)}
|
||||
function fd(a,b,c){var d=!1;if(void 0!==b){.8>a.Y/a.Z?b=1:d=!0;a.T=b;b=a.Ra*a.T;if(a.Z!=b){a.Z=b;b=a.Z.toFixed(2)+"Mhz";var e=a.P.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.R&&a.R.Wa()}gd(a,a.X);a.X=0;a.V=vb();a.ba=0;rd(a);return d}function td(a,b,c){var d=void 0===d?-1:d;var e=a.U.length;a.U.push([b,-1,d,c]);0<=d&&ud(a,e,d);return e}function ud(a,b,c){0<=b&&b<a.U.length&&(b=a.U[b],0>b[1]&&(c=a.ya*a.T/1E3*c|0,a.D.ja&&(c+=vd(a)),b[1]=c))}
|
||||
function vd(a,b){var c=a.ea-=a.b;a.b=0;b&&(a.ea=0);return c}
|
||||
l.qb=function(a){if(Pb(this,!0)){if(!this.D.ja){fd(this);this.R&&this.R.start(this.V,dd(this));this.D.ja=!0;this.D.Pb=!0;this.W&&this.W.start();var b=this.P.run;b&&(b.textContent="Halt");this.R&&(wd(this.R,!0),a&&this.R.Wa(!0))}this.Ta>=this.ya&&rd(this,!0);this.Ba=0;this.Ka=vb();this.ba&&(a=this.Ka-this.ba,a>this.fb&&(this.V+=a,this.V>this.Ka&&(this.V=this.Ka)));try{do{for(var c,d=this.D.Ua?1:this.La,e=this.U.length-1;0<=e;e--){var f=this.U[e];0>f[1]||d>f[1]&&(d=f[1])}c=d;this.Cb(c);c=vd(this,!0);
|
||||
this.Ba+=c;this.X+=c;cd(this,c);a=c;for(var g=this.U.length-1;0<=g;g--){var h=this.U[g];0>h[1]||(h[1]-=a,0>=h[1]&&(h[1]=-1,h[3](),0<=h[2]&&ud(this,g,h[2])))}this.sa-=c;if(0>=this.sa){this.sa+=this.La;++this.gb>=xd&&(this.R&&wd(this.R),this.gb=0);break}}while(this.D.ja)}catch(k){ed(this);bd(this);this.R&&this.R.stop(vb(),dd(this));Pb(this,!1);Lb(this,k.stack||k.message);return}c=setTimeout;d=this.Bb;this.ba=vb();e=this.fb;this.Ba&&(e=Math.round(e*this.Ba/this.La));e-=this.ba-this.Ka;if(f=this.ba-this.V)this.Y=
|
||||
Math.round(this.X/(10*f))/100,864E5<=f&&(this.ka=0,fd(this));if(0>e||this.Y<this.Z)-1E3>e&&(this.V-=e),e=0;this.Ta+=this.Ba;this.ba+=e;c(d,e)}else bd(this),this.R&&this.R.stop(vb(),dd(this))};l.Cb=function(){return 0};function ed(a,b){Ob(a,!0);vd(a);gd(a,a.X);a.X=0;if(a.D.ja){a.D.ja=!1;a.W&&a.W.stop();var c=a.P.run;c&&(c.textContent="Run")}a.D.complete=b}function bd(a,b){if(a.R){for(var c=a.R,d=0;d<c.A.length;d++)yd(c.A[d],b);wd(a.R,b)}}var sd=30,xd=15,Wc=["power","reset"];
|
||||
function zd(a){var b=+a.model||8080;Vc.call(this,a,1E6);this.ub=b;this.bb=Ad;Yc(this);this.D.complete=this.D.yd=!1;this.eb=0;this.Ja=[];this.cb=0;Bd(this)}ia(zd,Vc);function Cd(a,b){a.Ja.push(b)}l=zd.prototype;l.reset=function(){this.D.ja&&ed(this);Bd(this);Yc(this);this.D.error=!1;Vc.prototype.reset.call(this)};function Bd(a){a.g=0;a.u=0;a.A=0;a.B=0;a.C=0;a.F=0;a.G=0;a.M=0;B(a,a.cb);Dd(a,0);a.S=0}function Ed(a,b){a.cb=b;B(a,b)}
|
||||
l.Dc=function(){var a=this.g+this.u+this.A+this.B+this.C+this.F+this.G|0;return a=a+this.M+this.j+Fd(this)|0};l.save=function(){var a=new Gd(this);a.set(0,[this.g,this.u,this.A,this.B,this.C,this.F,this.G,this.M,this.j,Fd(this)]);a.set(1,[this.S,this.ka,this.T]);a.set(2,mc(this.I));return a.data()};
|
||||
l.restore=function(a){var b=a[0];this.g=b[0];this.u=b[1];this.A=b[2];this.B=b[3];this.C=b[4];this.F=b[5];this.G=b[6];this.M=b[7]&65535;B(this,b[8]);Dd(this,b[9]);b=a[1];this.S=b[0];this.ka=b[1];fd(this,b[3]);a:{b=this.I;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.O){for(var f=0,g=Array(b.O),h=0;h<e.length-1;)for(var k=e[h++],p=e[h++];k--;)g[f++]=p;e=g}f=b.b[d];if(!f||!f.restore(e)){r("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};
|
||||
l.da=function(a,b,c){switch(b){case "A":case "B":case "C":case "BC":case "D":case "E":case "DE":case "H":case "L":case "HL":case "SP":case "PC":case "PS":case "IF":case "SF":case "ZF":case "AF":case "PF":case "CF":this.P[b]=c;this.eb++;a=!0;break;default:a=Vc.prototype.da.call(this,a,b,c)}return a};function Hd(a){return a.u<<8|a.A}function Id(a,b){a.u=b>>8&255;a.A=b&255}function Jd(a){return a.B<<8|a.C}function Kd(a,b){a.B=b>>8&255;a.C=b&255}function D(a){return a.F<<8|a.G}
|
||||
function Ld(a,b){a.F=b>>8&255;a.G=b&255}function B(a,b){a.j=b&65535}function Md(a){return a.H&256?1:0}function Nd(a,b){a.H=a.H&255|b}function Od(a){return Ub[a.L&255]?4:0}function Pd(a){return(a.L^a.O)&16?16:0}function Qd(a){return a.H&255?0:64}function Rd(a){return a.L&128?128:0}function Fd(a){return a.N&-214|Rd(a)|Qd(a)|Pd(a)|Od(a)|Md(a)}function Dd(a,b){a.H=a.L=a.O=0;b&1&&(a.H|=256);b&4||(a.L|=1);b&16&&(a.O|=16);b&64||(a.H|=255);b&128&&(a.L^=192);a.N=a.N&-726|b&512|2}
|
||||
function Sd(a,b){a.O=a.g^b;return a.L=(a.H=a.g+b)&255}function Td(a,b){a.O=a.g^b;return a.L=(a.H=a.g+b+(a.H&256?1:0))&255}function Ud(a,b){a.H=a.L=a.O=a.g&b;(a.g|b)&8&&(a.O^=16);return a.H}function Vd(a,b){a.O=b^255;b=a.L=b+255&255;a.H=a.H&-256|b;return b}function Wd(a,b){a.O=b;b=a.L=b+1&255;a.H=a.H&-256|b;return b}function Xd(a,b){return a.L=a.H=a.O=a.g|b}function Yd(a,b){b^=255;a.O=a.g^b;return a.L=(a.H=a.g+b+1^256)&255}
|
||||
function Zd(a,b){b^=255;a.O=a.g^b;return a.L=(a.H=a.g+b+(a.H&256?0:1)^256)&255}function $d(a,b){return a.L=a.H=a.O=a.g^b}function E(a,b){a=a.I;return a.b[(b&a.C)>>>a.g].Va(b&a.j,b)}function ae(a,b,c){a=a.I;a.b[(b&a.C)>>>a.g].Xa(b&a.j,c&255,b)}function F(a){var b=E(a,a.j);B(a,a.j+1);return b}function G(a){var b=ic(a.I,a.j);B(a,a.j+2);return b}function be(a){var b=ic(a.I,a.M);a.M=a.M+2&65535;return b}function H(a,b){a.M=a.M-2&65535;lc(a.I,a.M,b)}
|
||||
function ce(a){if(a.b&&a.S&255&&a.N&512){for(var b=0;8>b&&!(a.S&1<<b);b++);a.S&=~(0>b?255:1<<b);a.N&=-513;a.S&=-257;a.bb[199|b<<3].call(a)}return a.S&256?(vd(a),!1):!0}function de(a,b){a.S|=1<<b;a.N&512&&vd(a)}function I(a,b,c,d){d=d||2;a.P[b]&&(void 0===c&&(Lb(a,"Value for "+b+" is invalid"),ed(a)),c=!a.D.ja||a.D.Ac?n(c,d):"--------".substr(0,d),a.P[b].textContent!=c&&(a.P[b].textContent=c))}
|
||||
l.Cb=function(a){this.D.complete=!0;var b=this.D.yd=this.K&&ee(this.K),c=a?this.D.Pb?0:1:-1;this.D.Pb=!1;this.ea=this.b=a;if(ce(this)){do{if(b){if(fe(this.K,this.j,c)){ed(this);break}c=1}this.bb[F(this)].call(this)}while(0<this.b)}return this.D.complete?this.ea-this.b:void 0===this.D.complete?0:-1};hb(function(){for(var a=zb(document,"pc8080","cpu"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);d=new zd(d);yb(d,c)}});function ge(){this.b-=4}function he(){B(this,G(this));this.b-=10}
|
||||
function ie(){B(this,be(this));this.b-=10}function je(){var a=G(this);H(this,this.j);B(this,a);this.b-=17}
|
||||
var Ad=[ge,function(){Id(this,G(this));this.b-=10},function(){ae(this,Hd(this),this.g);this.b-=7},function(){Id(this,Hd(this)+1);this.b-=5},function(){this.u=Wd(this,this.u);this.b-=5},function(){this.u=Vd(this,this.u);this.b-=5},function(){this.u=F(this);this.b-=7},function(){var a=this.g<<1;this.g=a&255|a>>8;Nd(this,a&256);this.b-=4},ge,function(){var a;Ld(this,a=D(this)+Hd(this));Nd(this,a>>8&256);this.b-=10},function(){this.g=E(this,Hd(this));this.b-=7},function(){Id(this,Hd(this)-1);this.b-=
|
||||
5},function(){this.A=Wd(this,this.A);this.b-=5},function(){this.A=Vd(this,this.A);this.b-=5},function(){this.A=F(this);this.b-=7},function(){var a=this.g<<8&256;this.g=(a|this.g)>>1;Nd(this,a);this.b-=4},ge,function(){Kd(this,G(this));this.b-=10},function(){ae(this,Jd(this),this.g);this.b-=7},function(){Kd(this,Jd(this)+1);this.b-=5},function(){this.B=Wd(this,this.B);this.b-=5},function(){this.B=Vd(this,this.B);this.b-=5},function(){this.B=F(this);this.b-=7},function(){var a=this.g<<1;this.g=a&255|
|
||||
Md(this);Nd(this,a&256);this.b-=4},ge,function(){var a;Ld(this,a=D(this)+Jd(this));Nd(this,a>>8&256);this.b-=10},function(){this.g=E(this,Jd(this));this.b-=7},function(){Kd(this,Jd(this)-1);this.b-=5},function(){this.C=Wd(this,this.C);this.b-=5},function(){this.C=Vd(this,this.C);this.b-=5},function(){this.C=F(this);this.b-=7},function(){var a=this.g<<8;this.g=(Md(this)<<8|this.g)>>1;Nd(this,a&256);this.b-=4},ge,function(){Ld(this,G(this));this.b-=10},function(){var a=G(this);lc(this.I,a,D(this));
|
||||
this.b-=16},function(){Ld(this,D(this)+1);this.b-=5},function(){this.F=Wd(this,this.F);this.b-=5},function(){this.F=Vd(this,this.F);this.b-=5},function(){this.F=F(this);this.b-=7},function(){var a=0,b=Md(this);if(Pd(this)||9<(this.g&15))a|=6;if(b||154<=this.g)a|=96,b=1;this.g=Sd(this,a);Nd(this,b?256:0);this.b-=4},ge,function(){var a;Ld(this,a=D(this)+D(this));Nd(this,a>>8&256);this.b-=10},function(){var a=G(this);a=ic(this.I,a);Ld(this,a);this.b-=16},function(){Ld(this,D(this)-1);this.b-=5},function(){this.G=
|
||||
Wd(this,this.G);this.b-=5},function(){this.G=Vd(this,this.G);this.b-=5},function(){this.G=F(this);this.b-=7},function(){this.g=~this.g&255;this.b-=4},ge,function(){this.M=G(this)&65535;this.b-=10},function(){ae(this,G(this),this.g);this.b-=13},function(){this.M=this.M+1&65535;this.b-=5},function(){var a=D(this);ae(this,a,Wd(this,E(this,a)));this.b-=10},function(){var a=D(this);ae(this,a,Vd(this,E(this,a)));this.b-=10},function(){ae(this,D(this),F(this));this.b-=10},function(){this.H|=256;this.b-=
|
||||
4},ge,function(){var a;Ld(this,a=D(this)+this.M);Nd(this,a>>8&256);this.b-=10},function(){this.g=E(this,G(this));this.b-=13},function(){this.M=this.M-1&65535;this.b-=5},function(){this.g=Wd(this,this.g);this.b-=5},function(){this.g=Vd(this,this.g);this.b-=5},function(){this.g=F(this);this.b-=7},function(){Nd(this,Md(this)?0:256);this.b-=4},function(){this.b-=5},function(){this.u=this.A;this.b-=5},function(){this.u=this.B;this.b-=5},function(){this.u=this.C;this.b-=5},function(){this.u=this.F;this.b-=
|
||||
5},function(){this.u=this.G;this.b-=5},function(){this.u=E(this,D(this));this.b-=7},function(){this.u=this.g;this.b-=5},function(){this.A=this.u;this.b-=5},function(){this.b-=5},function(){this.A=this.B;this.b-=5},function(){this.A=this.C;this.b-=5},function(){this.A=this.F;this.b-=5},function(){this.A=this.G;this.b-=5},function(){this.A=E(this,D(this));this.b-=7},function(){this.A=this.g;this.b-=5},function(){this.B=this.u;this.b-=5},function(){this.B=this.A;this.b-=5},function(){this.b-=5},function(){this.B=
|
||||
this.C;this.b-=5},function(){this.B=this.F;this.b-=5},function(){this.B=this.G;this.b-=5},function(){this.B=E(this,D(this));this.b-=7},function(){this.B=this.g;this.b-=5},function(){this.C=this.u;this.b-=5},function(){this.C=this.A;this.b-=5},function(){this.C=this.B;this.b-=5},function(){this.b-=5},function(){this.C=this.F;this.b-=5},function(){this.C=this.G;this.b-=5},function(){this.C=E(this,D(this));this.b-=7},function(){this.C=this.g;this.b-=5},function(){this.F=this.u;this.b-=5},function(){this.F=
|
||||
this.A;this.b-=5},function(){this.F=this.B;this.b-=5},function(){this.F=this.C;this.b-=5},function(){this.b-=5},function(){this.F=this.G;this.b-=5},function(){this.F=E(this,D(this));this.b-=7},function(){this.F=this.g;this.b-=5},function(){this.G=this.u;this.b-=5},function(){this.G=this.A;this.b-=5},function(){this.G=this.B;this.b-=5},function(){this.G=this.C;this.b-=5},function(){this.G=this.F;this.b-=5},function(){this.b-=5},function(){this.G=E(this,D(this));this.b-=7},function(){this.G=this.g;
|
||||
this.b-=5},function(){ae(this,D(this),this.u);this.b-=7},function(){ae(this,D(this),this.A);this.b-=7},function(){ae(this,D(this),this.B);this.b-=7},function(){ae(this,D(this),this.C);this.b-=7},function(){ae(this,D(this),this.F);this.b-=7},function(){ae(this,D(this),this.G);this.b-=7},function(){var a=this.j-1;if(this.Ja.length)for(var b=0;b<this.Ja.length;b++)if(this.Ja[b](a))return;this.b-=7;this.S|=256;vd(this);this.K&&Qb(this,-2147483648)?(B(this,a),Uc(this.K)):this.N&512||(this.K&&B(this,a),
|
||||
ed(this))},function(){ae(this,D(this),this.g);this.b-=7},function(){this.g=this.u;this.b-=5},function(){this.g=this.A;this.b-=5},function(){this.g=this.B;this.b-=5},function(){this.g=this.C;this.b-=5},function(){this.g=this.F;this.b-=5},function(){this.g=this.G;this.b-=5},function(){this.g=E(this,D(this));this.b-=7},function(){this.b-=5},function(){this.g=Sd(this,this.u);this.b-=4},function(){this.g=Sd(this,this.A);this.b-=4},function(){this.g=Sd(this,this.B);this.b-=4},function(){this.g=Sd(this,
|
||||
this.C);this.b-=4},function(){this.g=Sd(this,this.F);this.b-=4},function(){this.g=Sd(this,this.G);this.b-=4},function(){this.g=Sd(this,E(this,D(this)));this.b-=7},function(){this.g=Sd(this,this.g);this.b-=4},function(){this.g=Td(this,this.u);this.b-=4},function(){this.g=Td(this,this.A);this.b-=4},function(){this.g=Td(this,this.B);this.b-=4},function(){this.g=Td(this,this.C);this.b-=4},function(){this.g=Td(this,this.F);this.b-=4},function(){this.g=Td(this,this.G);this.b-=4},function(){this.g=Td(this,
|
||||
E(this,D(this)));this.b-=7},function(){this.g=Td(this,this.g);this.b-=4},function(){this.g=Yd(this,this.u);this.b-=4},function(){this.g=Yd(this,this.A);this.b-=4},function(){this.g=Yd(this,this.B);this.b-=4},function(){this.g=Yd(this,this.C);this.b-=4},function(){this.g=Yd(this,this.F);this.b-=4},function(){this.g=Yd(this,this.G);this.b-=4},function(){this.g=Yd(this,E(this,D(this)));this.b-=7},function(){this.g=Yd(this,this.g);this.b-=4},function(){this.g=Zd(this,this.u);this.b-=4},function(){this.g=
|
||||
Zd(this,this.A);this.b-=4},function(){this.g=Zd(this,this.B);this.b-=4},function(){this.g=Zd(this,this.C);this.b-=4},function(){this.g=Zd(this,this.F);this.b-=4},function(){this.g=Zd(this,this.G);this.b-=4},function(){this.g=Zd(this,E(this,D(this)));this.b-=7},function(){this.g=Zd(this,this.g);this.b-=4},function(){this.g=Ud(this,this.u);this.b-=4},function(){this.g=Ud(this,this.A);this.b-=4},function(){this.g=Ud(this,this.B);this.b-=4},function(){this.g=Ud(this,this.C);this.b-=4},function(){this.g=
|
||||
Ud(this,this.F);this.b-=4},function(){this.g=Ud(this,this.G);this.b-=4},function(){this.g=Ud(this,E(this,D(this)));this.b-=7},function(){this.g=Ud(this,this.g);this.b-=4},function(){this.g=$d(this,this.u);this.b-=4},function(){this.g=$d(this,this.A);this.b-=4},function(){this.g=$d(this,this.B);this.b-=4},function(){this.g=$d(this,this.C);this.b-=4},function(){this.g=$d(this,this.F);this.b-=4},function(){this.g=$d(this,this.G);this.b-=4},function(){this.g=$d(this,E(this,D(this)));this.b-=7},function(){this.g=
|
||||
$d(this,this.g);this.b-=4},function(){this.g=Xd(this,this.u);this.b-=4},function(){this.g=Xd(this,this.A);this.b-=4},function(){this.g=Xd(this,this.B);this.b-=4},function(){this.g=Xd(this,this.C);this.b-=4},function(){this.g=Xd(this,this.F);this.b-=4},function(){this.g=Xd(this,this.G);this.b-=4},function(){this.g=Xd(this,E(this,D(this)));this.b-=7},function(){this.g=Xd(this,this.g);this.b-=4},function(){Yd(this,this.u);this.b-=4},function(){Yd(this,this.A);this.b-=4},function(){Yd(this,this.B);this.b-=
|
||||
4},function(){Yd(this,this.C);this.b-=4},function(){Yd(this,this.F);this.b-=4},function(){Yd(this,this.G);this.b-=4},function(){Yd(this,E(this,D(this)));this.b-=7},function(){Yd(this,this.g);this.b-=4},function(){Qd(this)||(B(this,be(this)),this.b-=6);this.b-=5},function(){Id(this,be(this));this.b-=10},function(){var a=G(this);Qd(this)||B(this,a);this.b-=10},he,function(){var a=G(this);Qd(this)||(H(this,this.j),B(this,a),this.b-=6);this.b-=11},function(){H(this,Hd(this));this.b-=11},function(){this.g=
|
||||
Sd(this,F(this));this.b-=7},function(){H(this,this.j);B(this,0);this.b-=11},function(){Qd(this)&&(B(this,be(this)),this.b-=6);this.b-=5},ie,function(){var a=G(this);Qd(this)&&B(this,a);this.b-=10},he,function(){var a=G(this);Qd(this)&&(H(this,this.j),B(this,a),this.b-=6);this.b-=11},je,function(){this.g=Td(this,F(this));this.b-=7},function(){H(this,this.j);B(this,8);this.b-=11},function(){Md(this)||(B(this,be(this)),this.b-=6);this.b-=5},function(){Kd(this,be(this));this.b-=10},function(){var a=G(this);
|
||||
Md(this)||B(this,a);this.b-=10},function(){var a=F(this);Cc(this.I,a,this.g,this.j+-2&65535);this.b-=10},function(){var a=G(this);Md(this)||(H(this,this.j),B(this,a),this.b-=6);this.b-=11},function(){H(this,Jd(this));this.b-=11},function(){this.g=Yd(this,F(this));this.b-=7},function(){H(this,this.j);B(this,16);this.b-=11},function(){Md(this)&&(B(this,be(this)),this.b-=6);this.b-=5},ie,function(){var a=G(this);Md(this)&&B(this,a);this.b-=10},function(){var a=F(this);this.g=pc(this.I,a,this.j+-2&65535)&
|
||||
255;this.b-=10},function(){var a=G(this);Md(this)&&(H(this,this.j),B(this,a),this.b-=6);this.b-=11},je,function(){this.g=Zd(this,F(this));this.b-=7},function(){H(this,this.j);B(this,24);this.b-=11},function(){Od(this)||(B(this,be(this)),this.b-=6);this.b-=5},function(){Ld(this,be(this));this.b-=10},function(){var a=G(this);Od(this)||B(this,a);this.b-=10},function(){var a=be(this);H(this,D(this));Ld(this,a);this.b-=18},function(){var a=G(this);Od(this)||(H(this,this.j),B(this,a),this.b-=6);this.b-=
|
||||
11},function(){H(this,D(this));this.b-=11},function(){this.g=Ud(this,F(this));this.b-=7},function(){H(this,this.j);B(this,32);this.b-=11},function(){Od(this)&&(B(this,be(this)),this.b-=6);this.b-=5},function(){B(this,D(this));this.b-=5},function(){var a=G(this);Od(this)&&B(this,a);this.b-=10},function(){var a=D(this);Ld(this,Jd(this));Kd(this,a);this.b-=5},function(){var a=G(this);Od(this)&&(H(this,this.j),B(this,a),this.b-=6);this.b-=11},je,function(){this.g=$d(this,F(this));this.b-=7},function(){H(this,
|
||||
this.j);B(this,40);this.b-=11},function(){Rd(this)||(B(this,be(this)),this.b-=6);this.b-=5},function(){var a=be(this);Dd(this,a&255|this.N&-256);this.g=a>>8;this.b-=10},function(){var a=G(this);Rd(this)||B(this,a);this.b-=10},function(){this.N&=-513;this.b-=4},function(){var a=G(this);Rd(this)||(H(this,this.j),B(this,a),this.b-=6);this.b-=11},function(){H(this,Fd(this)&255|this.g<<8);this.b-=11},function(){this.g=Xd(this,F(this));this.b-=7},function(){H(this,this.j);B(this,48);this.b-=11},function(){Rd(this)&&
|
||||
(B(this,be(this)),this.b-=6);this.b-=5},function(){this.M=D(this)&65535;this.b-=5},function(){var a=G(this);Rd(this)&&B(this,a);this.b-=10},function(){this.N|=512;this.b-=4;ce(this)},function(){var a=G(this);Rd(this)&&(H(this,this.j),B(this,a),this.b-=6);this.b-=11},je,function(){Yd(this,F(this));this.b-=7},function(){H(this,this.j);B(this,56);this.b-=11}];
|
||||
function ke(a){t.call(this,"ChipSet",a,32768);var b=a.model;b&&!le[b]&&lb("Unrecognized ChipSet model: "+b);this.g=le[b]||{};a.sound&&(this.U=null,window&&(this.U=window.AudioContext||window.webkitAudioContext),this.U&&new this.U);Nb(this)}ia(ke,t);l=ke.prototype;l.da=function(){return!1};
|
||||
l.Ea=function(a,b,c,d){this.I=b;this.w=c;this.K=d;this.R=a;this.B=Zb(a,"Keyboard");this.C=Zb(a,"SerialPort");this.video=Zb(a,"Video");oc(b,this,this.g.zb);Bc(b,this,this.g.Ab);if(d){var e=this;me(d,16384,function(){for(var a="",b=0;b<e.j.length;b++)a&&(a+=b&&b%10?", ":",\n"),a+=q(e.j[b]);e.K.i(a)})}};l.ua=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.ta=function(a){return a?this.save():!0};l.reset=function(){this.g.INIT&&!this.restore(this.g.INIT)&&this.aa("reset error")};
|
||||
l.save=function(){var a=new Gd(this);switch(this.g.oa){case ne.oa:a.set(0,[this.ba,this.A,this.ea,this.N,this.T,this.Y,this.Z]);break;case J.oa:a.set(0,[this.W,this.F]),a.set(1,[this.G,this.H]),a.set(2,[this.u,this.O,this.X,this.V]),a.set(3,[this.M,this.b,this.L,this.S,this.j])}return a.data()};
|
||||
l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.g.oa){case ne.oa:return this.ba=b[0],this.A=b[1],this.ea=b[2],this.N=b[3],this.T=b[4],this.Y=b[5],this.Z=b[6],!0;case J.oa:return this.W=b[0],this.F=b[1],b=a[1],this.G=b[0],this.H=b[1],b=a[2],this.u=b[0],this.O=b[1],this.X=b[2],this.V=b[3],b=a[3],this.M=b[0],this.b=b[1],this.L=b[2],this.S=b[3],this.j=b[4],!0}return!1};l.start=function(){};l.stop=function(){};l.Id=function(a,b){var c=this.ba;y(this,a,null,b,"STATUS0",c,!0);return c};
|
||||
l.Jd=function(a,b){var c=this.A;y(this,a,null,b,"STATUS1",c,!0);return c};l.Kd=function(a,b){var c=this.ea;y(this,a,null,b,"STATUS2",c,!0);return c};l.Hd=function(a,b){var c=this.N>>8-this.T&255;y(this,a,null,b,"SHIFT.RESULT",c,!0);return c};l.Vd=function(a,b,c){y(this,a,b,c,"SHIFT.COUNT",null,!0);this.T=b};l.Xd=function(a,b,c){y(this,a,b,c,"SOUND1",null,!0);this.Y=b};l.Wd=function(a,b,c){y(this,a,b,c,"SHIFT.DATA",null,!0);this.N=b<<8|this.N>>8};
|
||||
l.Yd=function(a,b,c){y(this,a,b,c,"SOUND2",null,!0);this.Z=b};l.Zd=function(a,b,c){y(this,a,b,c,"WATCHDOG",null,!0)};function oe(a){var b=0,c=0,d=~a.M;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c}
|
||||
l.Ld=function(a,b){var c=this.F;c&=~J.wa.jc;if((dd(this.w)&64)<<1&&(c|=J.wa.jc,c!=this.F)){var d=this.L&1;var e=this.L>>1&7;switch(e){case J.za.Ha.md:break;case J.za.Ha.Kc:this.M=this.M<<1|d;break;case J.za.Ha.Qc:d=oe(this);this.j[d]=J.za.sb;Rb(this,"doNVRCommand(): erase data at addr "+q(d));break;case J.za.Ha.Lc:this.b=this.b<<1|d;break;case J.za.Ha.qd:d=oe(this);e=this.b&J.za.sb;this.j[d]=e;Rb(this,"doNVRCommand(): write data "+q(e)+" to addr "+q(d));break;case J.za.Ha.kd:d=oe(this);e=this.j[d];
|
||||
null==e&&(e=J.za.sb);this.b=e;Rb(this,"doNVRCommand(): read data "+q(e)+" from addr "+q(d));break;case J.za.Ha.ld:this.b<<=1;this.S=this.b&J.za.sb+1;break;default:Rb(this,"doNVRCommand(): unrecognized command "+xa(e))}}c&=~J.wa.kc;this.S&&(c|=J.wa.kc);c&=~J.wa.dc;if(d=this.B){d=this.B;if(e=d.A)e=d.w,e=dd(d.w)>=d.G+(e.ya*e.T/1E3*1.2731488|0);e&&(d.A=!1);d=!d.A}d&&(c|=J.wa.dc);c&=~J.wa.sc;this.C&&this.C.ha&pe&&(c|=J.wa.sc);this.F=c;y(this,a,null,b,"FLAGS",c);return c};
|
||||
l.$d=function(a,b,c){y(this,a,b,c,"BRIGHTNESS");this.W=b};l.ce=function(a,b,c){y(this,a,b,c,"NVR.LATCH");this.L=b};l.be=function(a,b,c){y(this,a,b,c,"DC012");a=b&3;switch(b>>2&3){case 0:this.u=this.u&-4|a;break;case 1:this.u=this.u&-13|a<<2;this.video&&(b=this.video,a=this.u,Rb(b,"updateScrollOffset("+a+")"),b.ra!==a&&((b.ra=a)?yd(b,!0):b.va=!0));break;case 2:switch(a){case 0:this.O=~this.O;break;case 2:case 3:this.X=3-a}break;case 3:this.V=a}};
|
||||
l.ae=function(a,b,c){y(this,a,b,c,"DC011");b&J.Ia.jd?(b&=J.Ia.oc,this.H!=b&&(this.H=b,this.video&&(a=this.video,b=this.H==J.Ia.oc?50:60,Rb(a,"updateRate("+b+")"),a.fb=b))):(b&=J.Ia.Wb,this.G!=b&&(this.G=b,this.video&&(a=this.G==J.Ia.Wb?132:80,b=this.video,Rb(b,"updateDimensions("+a+","+(80<a&&this.F&J.wa.ic?14:24)+")"),b.O=a,b.fa=b.Ba,80<a&&b.fa--,qe(b)&&re(b))))};
|
||||
var ne={oa:1978.1,od:{pa:0,ff:1,kf:16,sf:32,Bf:64,Af:128,Za:14},Ma:{pa:1,Oc:1,hd:2,dd:4,ed:16,fd:32,gd:64,Za:8},pd:{pa:2,ef:3,Jf:4,gf:8,wf:16,xf:32,yf:64,hf:128,Za:0},Ff:{pa:3},Df:{pa:2,tf:7},Hf:{pa:3,Kf:1,Gf:2,zf:4,qf:8,jf:16,Ae:32},Ef:{pa:4},If:{pa:5,lf:1,mf:2,nf:4,pf:8,Lf:16}},J={oa:100,wa:{pa:66,sc:1,ic:2,cd:4,vf:8,uf:16,kc:32,jc:64,dc:128},Nc:{pa:66,INIT:0},Ia:{pa:194,De:0,Wb:16,jd:32,oc:48,Tc:0,Uc:32},rb:{pa:162,Cf:0,Wc:0,Sc:0,Vc:0,Rc:0},za:{rf:{pa:98},Ha:{Lc:0,Kc:1,ld:2,qd:4,Qc:5,kd:6,md:7},
|
||||
sb:16383}},le={SI1978:ne,VT100:J};ne.INIT=[[ne.od.Za,ne.Ma.Za,ne.pd.Za,0,0,0,0]];
|
||||
J.INIT=[[J.Nc.INIT,J.wa.ic|J.wa.cd],[J.Ia.Tc,J.Ia.Uc],[J.rb.Wc,J.rb.Sc,J.rb.Vc,J.rb.Rc],[0,0,0,0,[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11776,11984,11888,11776,11808,11776,12E3,12E3,11901,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11808,11984,11856,11776,11808,11776,12E3,12E3,11881,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]];ne.zb={0:ke.prototype.Id,1:ke.prototype.Jd,2:ke.prototype.Kd,3:ke.prototype.Hd};
|
||||
ne.Ab={2:ke.prototype.Vd,3:ke.prototype.Xd,4:ke.prototype.Wd,5:ke.prototype.Yd,6:ke.prototype.Zd};J.zb={66:ke.prototype.Ld};J.Ab={66:ke.prototype.$d,98:ke.prototype.ce,162:ke.prototype.be,194:ke.prototype.ae};hb(function(){for(var a=zb(document,"pc8080","chipset"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);d=new ke(d);yb(d,c)}});
|
||||
function se(a){t.call(this,"ROM",a);this.b=null;this.A=a.addr;this.g=a.size;this.u=a.alias;this.j=a.file;this.B=ya(this.j);if(this.j){a=this.j;var b=za(this.B);"json"!=b&&"hex"!=b&&(a=Ca()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;Qa(a,null,!0,function(a,b,f){te(c,a,b,f)})}}ia(se,t);se.prototype.Ea=function(a,b,c,d){this.I=b;this.w=c;this.K=d;ue(this)};
|
||||
se.prototype.ua=function(){if(this.qa){if(this.K){var a=this.K,b=this.id,c=this.A,d=this.g,e=this.qa,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var k=h.o,p=h.a;if(void 0!==k){var v=f;k=[k>>>0,g];var x=Ia(v,k,a.zc);0>x&&v.splice(-(x+1),0,k)}p&&(h.a=p.replace(/''/g,'"'))}a.C.push({Of:b,J:c,Pd:d,qa:e,yc:f})}delete this.qa}return!0};se.prototype.ta=function(){return!0};
|
||||
function te(a,b,c,d){if(d)a.aa("Unable to load system ROM (error "+d+": "+b+")");else{tb(a.$a,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.b=f;else if(g)for(a.b=Array(4*g.length),d=c=0;c<g.length;c++)a.b[d++]=g[c]&255,a.b[d++]=g[c]>>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.qa=e.symbols;if(!a.b.length){r("Empty ROM: "+b);return}if(1==a.b.length){r(a.b[0]);return}}catch(h){a.aa("ROM data error: "+h.message);return}else for(b=
|
||||
c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e<b.length;e++)a.b[e]=ta(b[e],16);ue(a)}}
|
||||
function ue(a){if(!Mb(a))if(!a.j)Nb(a);else if(a.b&&a.I){a.g||(a.g=a.b.length);if(a.b.length!=a.g)Lb(a,"ROM size ("+n(a.b.length,8,!0)+") does not match specified size ("+n(a.g,8,!0)+")");else{var b=a.A;if(cc(a.I,b,a.g,Jc)){var c;for(c=0;c<a.b.length;c++)kc(a.I,b+c,a.b[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.u?b.push(a.u):null!=a.u&&a.u.length&&(b=a.u);for(c=0;c<b.length;c++){for(var d=a,e=b[c],f=d.I,g=d.g,h=[],k=d.A>>>f.g;0<g&&k<f.b.length;)h.push(f.b[k++]),g-=f.u;f=d.I;d=d.g;g=0;for(e>>>=
|
||||
f.g;0<d&&e<f.b.length;){k=h[g++];if(!k)break;f.b[e++]=k;d-=f.u}}delete a.b}}Nb(a)}}hb(function(){for(var a=zb(document,"pc8080","rom"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);d=new se(d);yb(d,c)}});
|
||||
function Qe(a){t.call(this,"RAM",a);this.qa=this.g=null;this.u=a.addr;this.A=a.size;this.Oa=a.load;this.Ga=a.exec;this.j=!1;this.b=a.file;this.B=ya(this.b);if(this.b){a=this.b;var b=za(this.B);"json"!=b&&"hex"!=b&&(a=Ca()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;Qa(a,null,!0,function(a,b,f){f?c.aa("Unable to load RAM resource (error "+f+": "+a+")"):(tb(c.$a,a,b),(a=Ra(a,b))?(c.g=a.la,c.qa=a.qa,null==c.Oa&&(c.Oa=a.Oa),null==c.Ga&&(c.Ga=a.Ga)):c.b=null,Re(c))})}}ia(Qe,t);
|
||||
Qe.prototype.Ea=function(a,b,c,d){this.I=b;this.w=c;this.K=d;Re(this)};Qe.prototype.ua=function(){return!0};Qe.prototype.ta=function(){return!0};
|
||||
function Re(a){!a.j&&a.A&&cc(a.I,a.u,a.A,1)&&(a.j=!0);if(!Mb(a)){if(!a.j)r("No RAM allocated");else if(a.b){if(!a.g||!a.I)return;var b=a.u;null!==a.Oa&&(b=a.Oa);for(var c=0;c<a.g.length;c++)kc(a.I,b+c,a.g[c]);if(null!==a.Ga){if(a.Ga==Se){for(c=0;c<Te.length;c++)kc(a.I,Te[c],118);Cd(a.w,function(a){return function(b){if(0<=Te.indexOf(b)){var c=!1,d=a.w,e=a.K;if(b==Ue)switch(c=!0,d.A){case Ve:a.print(String.fromCharCode(d.C).replace(/\r/g,""));break;case We:for(var k=Jd(d),p="",v=255;v--;){var x=E(a.w,
|
||||
k++);if(36==x)break;p+=String.fromCharCode(x)}a.print(p.replace(/\r/g,""));break;default:c=!1}c?ie.call(d):e&&(a.i("\nCP/M vector "+q(b)),B(d,b),Uc(e));b=!0}else b=!1;return b}}(a))}Ed(a.w,a.Ga)}delete a.g}Nb(a)}}Qe.prototype.reset=function(){};var Ue=5,Ve=2,We=9,Se=256,Te=[0,Ue];hb(function(){for(var a=zb(document,"pc8080","ram"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);d=new Qe(d);yb(d,c)}});
|
||||
function Xe(a){t.call(this,"Keyboard",a,65536);(a=a.model)&&!Ye[a]&&lb("Unrecognized Keyboard8080 model: "+a);this.b=Ye[a]||{};this.reset();Nb(this)}ia(Xe,t);l=Xe.prototype;
|
||||
l.da=function(a,b,c){var d=this,e=a+"-"+b;if(void 0===this.P[e]){if("led"==a&&this.b.ab[b])return this.P[e]=c,!0;switch(b){case "kbd":case "screen":return Xa("iOS")?(c.onkeypress=function(a){var b=!1;if(a=d.b.pb[a.keyCode||a.charCode]){a&128&&(a&=127,b=!0);a:{for(c in d.b.Qa)if(d.b.Qa[c]==a){var c=+c;break a}c=0}c&&(b?Ze(d,16,!0,!0):Ze(d,16,!1),Ze(d,c,!0,!0))}return!0},c.onkeydown=function(a){return $e(d,a,!0)},c.onkeyup=function(a){return $e(d,a,!1)}):(c.onkeydown=function(a){return af(d,a,!0)},
|
||||
c.onkeyup=function(a){return af(d,a,!1)},c.onkeypress=function(a){a=a.keyCode||a.charCode;a>=m.Ya&&a<=m.tb?d.g&(bf|cf)||(d.g|=cf,Ze(d,20,!0),df(d)):a>=m.vb&&a<=m.z&&d.g&cf&&(d.g&=~cf,Ze(d,20,!1),df(d));return!0}),c.onpaste=function(a){a:{if(d.C&&d.C.Pa&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a=a.clipboardData||window.clipboardData)){ef(d.C,a.getData("Text"));a=!1;break a}a=!0}return a},!0;default:if(this.b.Sa&&void 0!==this.b.Sa[b])return this.P[e]=c,c.onclick=
|
||||
function(a,b){return function(d){d.preventDefault&&d.preventDefault();d=!0;var e=0;17==b?e=ff:20==b&&(e=cf);if(e){c.style.fontWeight="normal";if(d=!(a.g&e))c.style.fontWeight="bold";gf(a,b,d)}Ze(a,b,d,!e);a.R&&a.R.Wa()}}(this,this.b.Sa[b]),!0}}return!1};l.Ea=function(a,b,c,d){this.R=a;this.w=c;this.K=d;var e=this;this.L=td(this.w,this.id,function(){hf(e)});this.W=Zb(a,"ChipSet");this.C=Zb(a,"SerialPort");oc(b,this,this.b.zb);Bc(b,this,this.b.Ab)};
|
||||
l.ua=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.ta=function(a){return a?this.save():!0};l.reset=function(){this.j=[];this.g=0;this.b.INIT&&!this.restore(this.b.INIT)&&this.aa("reset error")};l.save=function(){var a=new Gd(this);switch(this.b.oa){case K.oa:a.set(0,[this.F,this.B,this.A,this.G,-1])}return a.data()};
|
||||
l.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.b.oa){case jf.oa:return!0;case K.oa:return this.F=b[0],df(this,this.F&K.Aa.ec),this.B=b[1],this.A=b[2],this.G=b[3],this.u=b[4],!0}return!1};function df(a,b){null!=b?a.H=b:b=a.H;for(var c in a.b.ab){var d="led-"+c;if(d=a.P[d]){var e=a.b.ab[c],f=!!(b&e);e&e-1&&(f=!(b&~e));d.style.backgroundColor=f?"#"+n(16711680,6):"#000000"}}if(d=a.P["led-caps-lock"])d.style.backgroundColor=a.g&cf?"#"+n(65280,6):"#000000"}
|
||||
function gf(a,b,c,d){var e=0;switch(b){case 16:e=d?kf:lf;break;case 17:e=d?mf:ff;break;case 18:e=d?nf:of;break;case 91:e=d?pf:qf;break;case 20:e=cf,c=!(a.g&e)}e&&(a.g=c?a.g|e:a.g&~e);return c}
|
||||
function af(a,b,c){var d=!0,e=b.keyCode;e=sa[e]||e;c=gf(a,e,c,2==b.location);a:if(e=a.b.Tb[e]||e,a.b.Qa[e])var f=e;else{for(f in a.b.Sa)if(a.b.Sa[f]===e)break a;f=null}f&&!b.metaKey&&(d=!1,a.g&(rf|sf)&&(13==f?(f=118,d=!0):8==f&&(f=46,d=!0),d&&(a.g=c?a.g|sf:a.g&~sf)),d=Ze(a,f,c),(!(f>=m.Ya&&f<=m.tb)||a.g|tf)&&b.preventDefault&&b.preventDefault());return d}
|
||||
function $e(a,b,c){var d=!0;if(c){var e=b.keyCode,f=a.b.Qa[e],g;if(g=f){a:{for(var h in a.b.pb)if(a.b.pb[h]==f){f=+h;break a}f=0}g=!f}g&&(d=Ze(a,e,c,!0),b.preventDefault&&b.preventDefault())}return d}
|
||||
function Ze(a,b,c,d){var e;a:{for(e=0;e<a.j.length;e++)if(a.j[e].Ob==b)break a;e=-1}if(c)0>e?a.j.push({Ob:b,Lb:Date.now(),wb:d||!1}):(a.j[e].Lb=Date.now(),a.j[e].wb=d||!1),d&&hf(a);else if(0<=e){if(!a.j[e].wb&&(d=a.j[e].Lb)&&Date.now()-d<uf)return a.j[e].wb=!0,hf(a),!0;a.j.splice(e,1)}if(a.W){d=0;switch(b){case "1p":d=ne.Ma.dd;break;case "2p":d=ne.Ma.hd;break;case "coin":d=ne.Ma.Oc;break;case "left":d=ne.Ma.fd;break;case "right":d=ne.Ma.gd;break;case "fire":d=ne.Ma.ed}d&&(a=a.W,b=d,a.A&=~b,c&&(a.A|=
|
||||
b))}return!0}function hf(a){for(var b=0,c=-1;b<a.j.length;){if(a.j[b].wb){var d=a.j[b].Ob,e=uf-(Date.now()-a.j[b].Lb);if(0<e){if(0>c||c>e)c=e}else{Ze(a,d,!1);b=0;continue}}b++}0<=c&&ud(a.w,a.L,c)}l.Md=function(a,b){var c=this.B;0<=this.u&&(this.u<this.j.length?(c=this.j[this.u],this.u++,c=K.Qa[c.Ob],c&128&&(c&=127)):(this.u=-1,c=K.Xc),this.B=c,de(this.w,1));y(this,a,null,b,"KBDUART.ADDRESS",c);return c};
|
||||
l.de=function(a,b,c){y(this,a,b,c,"KBDUART.STATUS");this.F=b;this.A=!0;this.G=dd(this.w);df(this,b&K.Aa.ec);b&K.Aa.nd&&(this.u=0,de(this.w,1))};var kf=1,lf=2,bf=3,mf=4,ff=8,tf=12,nf=16,of=32,rf=48,pf=64,qf=128,cf=512,sf=4096,uf=50,vf={};vf[m.Ya]=37;vf[m.Db]=39;vf[m.Fb]=32;
|
||||
var jf={oa:1978.1,Qa:{},pb:{},Tb:vf,ab:{},Sa:{"1p":49,"2p":50,coin:51,left:37,right:39,fire:32}},L={},M={},K={oa:100,Qa:(L[8]=3,L[m.mc]=5,L[m.lc]=6,L[m.xc]=7,L[m.qc]=8,L[m.uc]=9,L[m.Q]=10,L[39]=16,L[221]=20,L[219]=21,L[m.ac]=22,L[m.rc]=23,L[m.nc]=24,L[m.E]=25,L[49]=26,L[37]=32,L[40]=34,L[117]=35,L[19]=35,L[192]=36,L[189]=37,L[57]=38,L[55]=39,L[52]=40,L[51]=41,L[27]=42,L[38]=48,L[114]=49,L[112]=50,L[46]=51,L[187]=52,L[48]=53,L[56]=54,L[54]=55,L[53]=56,L[50]=57,L[9]=58,L[103]=64,L[115]=65,L[113]=66,
|
||||
L[96]=67,L[118]=68,L[220]=69,L[m.Fb]=70,L[m.cc]=71,L[m.Zb]=72,L[m.Yb]=73,L[m.Ya]=74,L[104]=80,L[2013]=81,L[98]=82,L[97]=83,L[222]=85,L[186]=86,L[m.bc]=87,L[m.$b]=88,L[m.Db]=89,L[m.pc]=90,L[110]=96,L[116]=97,L[101]=98,L[100]=99,L[13]=100,L[190]=101,L[188]=102,L[m.hc]=103,L[m.Ub]=104,L[m.wc]=105,L[119]=106,L[105]=112,L[99]=113,L[102]=114,L[109]=115,L[191]=117,L[m.gc]=118,L[m[" "]]=119,L[m.tc]=120,L[m.Vb]=121,L[m.tb]=122,L[120]=123,L[17]=124,L[16]=125,L[20]=126,L),pb:(M[m.p]=5,M[m.Rd]=6,M[m.y]=7,M[m.t]=
|
||||
8,M[m.re]=9,M[m.q]=10,M[m["]"]]=20,M[m["["]]=21,M[m.Ed]=22,M[m.pe]=23,M[m.r]=24,M[m.e]=25,M[m["1"]]=26,M[m["`"]]=36,M[m["-"]]=37,M[m["9"]]=38,M[m["7"]]=39,M[m["4"]]=40,M[m["3"]]=41,M[m["="]]=52,M[m["0"]]=53,M[m["8"]]=54,M[m["6"]]=55,M[m["5"]]=56,M[m["2"]]=57,M[m["\\"]]=69,M[m.Od]=70,M[m.k]=71,M[m.Cd]=72,M[m.Ad]=73,M[m.vb]=74,M[m["'"]]=85,M[m[";"]]=86,M[m.Nd]=87,M[m.Dd]=88,M[m.d]=89,M[m.ne]=90,M[13]=100,M[m["."]]=101,M[m[","]]=102,M[m.n]=103,M[m.td]=104,M[m.x]=105,M[m["/"]]=117,M[m.Qd]=118,M[m.qe]=
|
||||
120,M[m.wd]=121,M[m.z]=122,M[m.mc]=133,M[m.lc]=134,M[m.xc]=135,M[m.qc]=136,M[m.uc]=137,M[m.Q]=138,M[m["}"]]=148,M[m["{"]]=149,M[m.ac]=150,M[m.rc]=151,M[m.nc]=152,M[m.E]=153,M[m["!"]]=154,M[m["~"]]=164,M[m._]=165,M[m["("]]=166,M[m["&"]]=167,M[m.$]=168,M[m["#"]]=169,M[m["+"]]=180,M[m[")"]]=181,M[m["*"]]=182,M[m["^"]]=183,M[m["%"]]=184,M[m["@"]]=185,M[m["|"]]=197,M[m.Fb]=198,M[m.cc]=199,M[m.Zb]=200,M[m.Yb]=201,M[m.Ya]=202,M[m['"']]=213,M[m[":"]]=214,M[m.bc]=215,M[m.$b]=216,M[m.Db]=217,M[m.pc]=218,M[m[">"]]=
|
||||
229,M[m["<"]]=230,M[m.hc]=231,M[m.Ub]=232,M[m.wc]=233,M[m["?"]]=245,M[m.gc]=246,M[m.tc]=248,M[m.Vb]=249,M[m.tb]=250,M),Tb:{},ab:{},Sa:{"caps-lock":20,ctrl:17,esc:27,tab:9,"num-comma":116,"break":117,"line-feed":118,"no-scroll":119,setup:120},Mc:{pa:130,INIT:127},Aa:{pa:130,ad:1,$c:2,Zc:4,Yc:8,bd:16,fc:32,ec:63,nd:64,Ce:128,INIT:0},Xc:127};K.ab={l4:K.Aa.ad,l3:K.Aa.$c,l2:K.Aa.Zc,l1:K.Aa.Yc,locked:K.Aa.bd,local:K.Aa.fc,online:~K.Aa.fc,"caps-lock":cf};var Ye={SI1978:jf,VT100:K};
|
||||
K.INIT=[[K.Aa.INIT,K.Mc.INIT,!1,0,-1]];K.zb={130:Xe.prototype.Md};K.Ab={130:Xe.prototype.de};hb(function(){for(var a=zb(document,"pc8080","keyboard"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);d=new Xe(d);yb(d,c)}});
|
||||
function wf(a,b,c,d,e){t.call(this,"Video",a,262144);var f=this;this.Ra=Xa("Gecko/");this.M=a.screenWidth;this.H=a.screenHeight;this.ka=a.bufferAddr;this.ud=a.bufferRAM;var g=a.bufferFormat;this.Y=g&&xf[g.toUpperCase()]||yf;this.O=a.bufferCols;this.Z=a.bufferRows;this.Ba=this.fa=a.cellWidth||1;this.ca=a.cellHeight||1;this.ba=null;this.La=!1;this.ma=a.bufferBits||1;this.xd=a.bufferLeft||0;if(this.g=a.bufferRotate)this.g=this.g%360,0<this.g&&(this.g-=360),-90!=this.g&&(this.aa("unsupported buffer rotation: "+
|
||||
this.g),this.g=0);this.na=a.interruptRate;this.gb=a.refreshRate||60;this.G=b;this.j=c;this.V=(this.Bd=d)||b||null;this.Bb=this.M;this.sd=this.H;this.Ja=this.M/this.O|0;this.Ka=this.H/this.Z|0;1<this.ca&&(this.Z++,this.ra=0,this.va=!1);b=a.smoothing;(c=$a("smoothing"))&&(b="true"==c);null!=b&&(c=Ya(this.j,"imageSmoothingEnabled"))&&(this.j[c]=b);if(this.u=a.screenRotate)this.u=this.u%360,0<this.u&&(this.u-=360),-90!=this.u?(this.aa("unsupported screen rotation: "+this.u),this.u=0):(this.j.translate(0,
|
||||
this.H),this.j.rotate(this.u*Math.PI/180),this.j.scale(this.H/this.M,this.M/this.H));if(this.b=e)if(c=Ya(e,"requestFullscreen")||Ya(e,"requestFullScreen")){this.b.jb=e[c];if(e=Ya(document,"on","fullscreenchange")){var h=Ya(document,"fullscreenElement")||Ya(document,"fullScreenElement");document.addEventListener(e,function(){zf(f,!!h)},!1)}(e=Ya(document,"on","fullscreenerror"))&&document.addEventListener(e,function(){zf(f,null)},!1)}if(this.S=a.fontROM)"json"!=za(this.S)&&(this.S=Ca()+"/api/v1/dump?file="+
|
||||
this.S+"&format=bytes"),Qa(this.S,null,!0,function(a,b,c){Af(f,a,b,c)});this.ya={}}ia(wf,t);
|
||||
function qe(a){a.C=a.O*a.fa;a.N=a.Z*a.ca;var b=a.C,c=a.N;a.g&&(b=a.N,c=a.C);a.L=0;if(!a.ud&&(a.L=(a.C*a.ma>>3)*a.N,!cc(a.I,a.ka,a.L,3)))return!1;a.L?(a.Ta=a.j.createImageData(b,c),a.cb=16/a.ma|0,Bf(a,a.L>>1)):Bf(a,(a.O+1)*a.Z);a.F=document.createElement("canvas");a.F.width=b;a.F.height=c;a.sa=a.F.getContext("2d");a.T={};a.X=1<<a.ma;a.U=Array(a.X+Cf);a.U[0]=[0,0,0,255];a.U[1]=[255,255,255,255];a.Y==Df&&(a.U[a.X+Ef]=[255,255,0,255],a.U[a.X+Ff]=[0,255,0,255]);a.Y==Gf&&(a.fb=60,a.xa=!1,a.ea=Array(a.O));
|
||||
return!0}l=wf.prototype;l.da=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.ya[b]=c,!0;switch(b){case "fullScreen":return this.P[b]=c,this.b&&this.b.jb?c.onclick=function(){d.jb()}:c.parentNode.removeChild(c),!0}return!1};
|
||||
l.Ea=function(a,b,c,d){this.R=a;this.I=b;this.w=c;this.K=d;qe(this);if(this.B=Zb(a,"Keyboard")){for(var e in this.ya)this.B.da("led",e,this.ya[e]);this.G&&this.B.da(this.Bd?"textarea":"canvas","screen",this.V)}var f=this;this.ub=td(this.w,this.id,function(){yd(f)});ud(this.w,this.ub,1E3/Math.max(this.gb,this.na));this.eb=0;this.S||Nb(this)};
|
||||
function Af(a,b,c,d){if(d)a.aa("Unable to load font ROM (error "+d+": "+b+")");else{tb(a.$a,b,c);try{var e=eval("("+c+")"),f=e.bytes||e;if(!f||!f.length){r("Empty font ROM: "+b);return}if(1==f.length){r(f[0]);return}if(2048==f.length)a.ba=f,re(a);else{a.aa("Unrecognized font data length ("+f.length+")");return}}catch(g){a.aa("Font ROM data error: "+g.message);return}(a.j||a.K)&&Nb(a)}}
|
||||
function re(a){a.ba&&(a.La=a.Y==Gf,a.T[Hf]=[If(a,a.fa,a.ca),If(a,a.fa,a.ca,a.xa)],a.T[Jf]=[If(a,2*a.fa,a.ca),If(a,2*a.fa,a.ca,a.xa)],a.T[Kf]=a.T[Lf]=[If(a,2*a.fa,2*a.ca),If(a,2*a.fa,2*a.ca,a.xa)])}
|
||||
function If(a,b,c,d){var e=8>=a.Ba?8:16,f=8<e?15:0,g=a.ba.length/e,h=!1===d,k={fa:b,ca:c};k.canvas=document.createElement("canvas");k.canvas.width=16*b;k.canvas.height=g/16*c;k.context=k.canvas.getContext("2d");for(var p=k.context.createImageData(b,c),v=0;v<g;v++){for(var x=0,z=x;x<a.ca;x++){var u=v*e+(f+x&e-1);u=d&&8==x?255:a.ba[u];for(var w=0;w<c/a.ca;w++){for(var C=0,T=0,Na=T;T<a.fa;T++){var P=u&128>>(7<T?7:T);C=a.La&&!P&&C?C:P;for(var ob=0;ob<b/a.fa;ob++)h&&(C=!C),Mf(a,p,Na,z,C?1:0),Na++;C=P}z++}}k.context.putImageData(p,
|
||||
(v&15)*b,(v>>4)*c)}return k}l.ua=function(a,b){return b||!a||this.restore(a)?!0:!1};l.ta=function(a){return!a||this.save()};l.save=function(){var a=new Gd(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};
|
||||
l.jb=function(){var a=!1;if(this.b){if(this.b.jb){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.M/this.H;b>c&&(a=Math.round(c/b*100)+"%")}this.Ra?(this.G.style.width=a,this.G.style.width=a,this.G.style.display="block",this.G.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.jb();a=!0}this.V&&this.V.focus()}return a};
|
||||
function zf(a,b){!b&&a.b&&(a.Ra?a.G.style.width=a.G.style.height="":a.b.style.width=a.b.style.height="");Rb(a,"notifyFullScreen("+b+")")}function Bf(a,b){a.bb=b;a.W=!1;if(void 0===a.A||a.A.length!=a.bb)a.A=Array(a.bb)}function Mf(a,b,c,d,e){d=a.g?(b.height-c-1)*b.width+d:c+d*b.width;e&&a.Y==Df&&(208<=c&&236>c?e=a.X+Ef:28<=c&&72>c&&(e=a.X+Ff));a=a.U[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]}
|
||||
function yd(a,b){var c=!0;if(!b){a.na&&(120==a.na?a.eb&1?(de(a.w,2),c=!1):de(a.w,1):de(a.w,4));if(c&&a.W&&a.L){var d=a.I,e=a.ka,f=a.L,g=!0,h=e>>>d.g;for(e=d.u-(e&d.j);0<f&&h<d.b.length;)d.b[h].Ca&&(d.b[h].Ca=g=!1,d.b[h].Cc=!0),f-=e,e=d.u,h++;g&&(c=!1)}ud(a.w,a.ub,1E3/Math.max(a.gb,a.na));a.eb++}if(c)if(1<a.fa)switch(a.Y){case Gf:c=a.ka;d=-1;f=0;g=60==a.fb?2:5;e=h=0;for(var k=-1;f<a.Z;){var p=0,v=c,x=d,z=a.O;for(x!=Hf&&(z>>=1);;){var u=hc(a.I,v++);if((u&Nf)==Nf){var w=hc(a.I,v++);d=w&Of;c=(w&Pf)<<
|
||||
8|hc(a.I,v);c+=w&Qf?Rf:Sf;break}if(p<z)a.ea[p++]=u;else break}if(g)g--;else{for(;p<a.ea.length;)a.ea[p++]=0;if(0<=x)for(v=a.W&&a.A[h]==z,a.A[h++]=z,z=0;z<p;z++){u=a.ea[z];if(!v||u!==a.A[h]){a.A[k=h]=u;w=a;var C=a.sa;var T=u&127;if(u=w.T[x][u&128?1:0]){var Na=(T&15)*u.fa,P=(T>>4)*u.ca,ob=u.fa,Oa=u.ca;if(C){var ua=z*w.fa;var na=f*w.ca;var va=w.fa;T=w.ca}else ua=z*w.Ja,na=f*w.Ka,va=w.Ja,T=w.Ka;u.fa>w.fa&&(ua*=2,va*=2);u.ca>w.ca&&(x==Lf&&(P+=w.ca),Oa=w.ca);C?C.drawImage(u.canvas,Na,P,ob,Oa,ua,na,va,T):
|
||||
(ua+=0,na+=0,w.j.drawImage(u.canvas,Na,P,ob,Oa,ua,na,va,T))}e++}h++}f++}}a.W=!0;!b&&a.va&&1==e&&(a.A[k]=-1,e=0);a.va=!1;(e||b)&&a.sa&&a.j.drawImage(a.F,0,a.ra,a.C,a.N-a.ca,0,0,a.Bb,a.sd)}else{f=a.ka;g=f+a.L;k=e=h=0;b=a.C;p=0;c=a.N;x=d=0;v=a.ma;z=(1<<v)-1;a.xd&&(v=-v,x=16+v);for(;f<g;){w=jc(a.I,f);if(a.W&&w===a.A[h])e+=a.cb;else{a.A[h]=w;(C=x)&&(w=w>>8|(w&255)<<8);e<b&&(b=e);for(u=a.cb;u--;)Na=w>>C&z,Mf(a,a.Ta,e++,k,Na),C+=v;e>p&&(p=e);k<c&&(c=k);k>=d&&(d=k+1)}f+=2;h++;if(e>=a.C&&(e=0,k++,k>a.N))break}a.W=
|
||||
!0;b<a.C&&(f=p-b,d-=c,a.g&&(g=b,h=f,b=c,f=d,c=a.C-(g+h),d=h),a.sa.putImageData(a.Ta,0,0,b,c,f,d),a.j.drawImage(a.F,0,0,a.F.width,a.F.height,0,0,a.M,a.H))}}var Ef=0,Ff=1,Cf=2,yf=0,Df=1,Gf=2,xf={SI1978:Df,VT100:Gf},Hf=96,Jf=64,Kf=32,Lf=0,Nf=127,Pf=15,Qf=16,Of=96,Rf=8192,Sf=16384;
|
||||
hb(function(){for(var a=zb(document,"pc8080","video"),b=0;b<a.length;b++){var c=a[b],d=Ab(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Sa().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=
|
||||
(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||$a("aspect"));f&&.3<=f&&3.33>=f&&(gb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Xa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d");d=new wf(d,e,g,f,c);yb(d,c)}});
|
||||
function Tf(a){t.call(this,"SerialPort",a,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:r("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.V=a.tabSize;this.S=a.charBOL;this.u=0;this.N=!1;this.F=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=Uf;b&&(void 0===c&&(c="Panel"),(c=Eb(c,this.id))&&(b=c.P[b])&&this.da(null,a,b))}this.A="";this.b=this.Pa=this.H=null;this.exports={connect:this.Ec,receiveData:this.Nb,receiveStatus:this.me}}
|
||||
ia(Tf,t);l=Tf.prototype;l.da=function(a,b,c,d){var e=this;switch(b){case Uf:return this.P[b]=this.g=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),Vf(e,b);return!0},c.onkeypress=function(a){a=a||window.event;Vf(e,a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0;default:if(d)return this.P[b]=c,c.onclick=function(){e.Nb(d);return!0},!0}return!1};
|
||||
l.Ea=function(a,b,c,d){this.R=a;this.I=b;this.w=c;this.K=d;var e=this;this.Y=td(this.w,this.id+".receive",function(){e.Nb()});this.Z=td(this.w,this.id+".transmit",function(){ef(e)});this.W=Zb(a,"ChipSet");oc(b,this,Wf,this.U);Bc(b,this,Xf,this.U);Nb(this)};
|
||||
l.Ec=function(a){if(!this.b){var b=Xc(this.R,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ga(c[0]);if(d!=this.Gb)return;c=Ga(c[1]);if(this.b=Db(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.F);if(this.Pa=e.receiveData){this.F=a;this.H=e.receiveStatus;this.status("Connected "+this.$a+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
|
||||
l.ua=function(a,b){if(!b)if(this.Ec(this.F),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.ta=function(a){return a?this.save():!0};l.reset=function(){Yf(this)};l.save=function(){var a=new Gd(this),b=0,c=[];c[b++]=this.G;c[b++]=this.M;c[b++]=this.O;c[b++]=this.ha;c[b++]=this.B;c[b++]=this.C;c[b]=this.L;a.set(0,c);return a.data()};l.restore=function(a){return Yf(this,a[0])};
|
||||
function Yf(a,b){var c=0;void 0===b&&(b=Zf);a.G=b[c++];a.M=b[c++];a.O=b[c++];a.ha=b[c++];a.B=b[c++];a.C=b[c++];a.L=b[c];return!0}function $f(a,b){var c=a.L&b;b&15||(c>>=4);b=ag[c];c=((a.B&bg)>>2)+6;a.B&cg&&c++;c+=((a.B&dg)>>6)+1>>1;return 1E3/(b/c)|0}function Vf(a,b){Rb(a,"receiveByte("+xa(b)+"), status="+xa(a.ha));return a.N||a.ha&eg?!1:(a.M=b,a.ha|=eg,de(a.w,a.X),!0)}
|
||||
l.Nb=function(a){null!=a&&(this.A="number"!=typeof a?a:this.A+String.fromCharCode(a));this.A&&(Vf(this,this.A.charCodeAt(0))&&(this.A=this.A.substr(1)),this.A&&this.w&&ud(this.w,this.Y,$f(this,fg)));return!0};l.me=function(a){this.ha&=~gg;a&64&&(this.ha|=gg)};function ef(a,b){a.ha=a.ha|pe|hg;b&&a.Pa&&a.Pa.call(a.b,b)}l.Gd=function(a,b){var c=this.M;y(this,a,null,b,"DATA",c);this.ha&=~eg;return c};l.Fd=function(a,b){var c=this.ha;y(this,a,null,b,"STATUS",c);return c};
|
||||
l.Ud=function(a,b,c){y(this,a,b,c,"DATA");this.O=b;this.ha&=~(pe|hg);Rb(this,"transmitByte("+xa(b)+")");if(19==b)this.N=!0;else if(17==b)this.N=!1;else if(this.Pa&&this.Pa.call(this.b,b),this.g)if(8==b)this.g.value=this.g.value.slice(0,-1),0<this.u&&this.u--;else{var d;13!=b&&10!=b&&(d=Ha[b]);a=d=d?"<"+d+">":String.fromCharCode(b);c=a.length;9==b?(b=this.V||8,c=b-this.u%b,this.V&&(a=Fa("",c))):13==b&&(this.u=c=0,a="\n");this.S&&!this.u&&c&&(a=String.fromCharCode(this.S)+a);this.g.value+=a;this.g.scrollTop=
|
||||
this.g.scrollHeight;this.u+=c}else if(null!=this.j){if(10==b||1024<=this.j.length)this.i(this.j),this.j="";10!=b&&(this.j+=String.fromCharCode(b))}this.w&&ud(this.w,this.Z,$f(this,ig))};l.Td=function(a,b,c){y(this,a,b,c,"CONTROL");this.G?(this.H&&(b^this.C)&(jg|kg)&&(a=0,this.F?(a|=b&jg?32:0,a|=b&kg?320:0):(a|=b&jg?16:0,a|=b&kg?1048576:0),this.H.call(this.b,a)),this.C=b,this.C&lg&&(this.G=!1)):(this.B=b,this.G=!0)};l.Sd=function(a,b,c){y(this,a,b,c,"BAUDRATES");this.L=b};
|
||||
var bg=12,cg=16,dg=192,kg=2,jg=32,lg=64,pe=1,eg=2,hg=4,gg=128,fg=15,ig=240,ag=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Zf=[!1,0,0,133,142,39,238],Uf="buffer",Wf={0:Tf.prototype.Gd,1:Tf.prototype.Fd},Xf={0:Tf.prototype.Ud,1:Tf.prototype.Td,2:Tf.prototype.Sd};hb(function(){for(var a=zb(document,"pc8080","serial"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);d=new Tf(d);yb(d,c)}});
|
||||
function mg(a){t.call(this,"Debugger",a);this.u=+a.base||16;this.U=["{","}"];this.ea=["[","]"];this.S=this.ba=this.G=0;this.N=!1;this.b=-1;this.g=[];this.A={}}ia(mg,t);mg.prototype.Jb=function(){return-1};mg.prototype.Kb=function(){};
|
||||
mg.prototype.yb=function(a,b,c){if(b)if(a){0>this.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.N?a="end":a=this.g[this.b+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ga(a.substring(d,f))),d=f+1}}return b};
|
||||
function ng(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a<<32-b>>32-b:(b=Math.pow(2,b-1),a>=b?(d=a%b,(a/b|0)&1&&(d-=b)):a<-b&&(d=a%b,((-a-1)/b|0)&1?d&&(d+=b):d||(d-=b)));a!=d&&(a=d);return a}
|
||||
function og(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop();var f=a.pop();switch(d){case "*":f*=e;break;case "/":if(!e)return!1;f=Math.trunc(f/e);break;case "^/":if(!e)return!1;f%=e;break;case "+":f+=e;break;case "-":f-=e;break;case "<<":f<<=e;break;case ">>":f>>=e;break;case ">>>":f>>>=e;break;case "<":f=f<e?1:0;break;case "<=":f=f<=e?1:0;break;case ">":f=f>e?1:0;break;case ">=":f=f>=e?1:0;break;case "==":f=f==e?1:0;break;case "!=":f=f!=e?1:0;break;
|
||||
case "&":f&=e;break;case "!":case "|":f|=e;break;case "^!":f|=e;break;case "&&":f=f&&e?1:0;break;case "||":f=f||e?1:0;break;case ",,":f=ng(f,18,!0)*Math.pow(2,18)+ng(e,18,!0);break;case "_":case "^_":"^_"==d&&(e=35-(e&255));e&&(f=ng(f,0,!0),f=0<e?f*Math.pow(2,e):Math.trunc(f/Math.pow(2,-e)));break;default:return!1}a.push(ng(f))}return!0}
|
||||
function pg(a,b,c,d,e,f){var g,h=!1,k=0,p=[],v=[],x=a.u;for(a.u=e;c<d;){var z=b[c++].trim();var u=c<d?b[c++]:"";if(z)var w=qg(a,z,null,f,k);else if("{"==u){z=1;for(w=c;c<d;)if(c++,u=c<b.length?b[c++]:"","{"==u)z++;else if("}"==u&&!--z)break;w=pg(a,b,w,c-1,a.u,f);null!=w&&k&&(w=rg(w,k));z=c<d?b[c++].trim():"";u=c<d?b[c++]:""}else{if(" "==u)continue;if("^B"==u){a.u=2;continue}if("^O"==u){a.u=8;continue}if("^D"==u){a.u=10;continue}if(!(k&-1073741824)){if("+"==u)continue;if("-"==u){k=k<<2|1;continue}if("~"==
|
||||
u||"^-"==u){k=k<<2|2;continue}if("^L"==u){k=k<<2|3;continue}}h=!0;break}if(void 0===w)if(f)f.push(z),w=0;else{h=!0;f=[];break}p.push(ng(w));if(" "==u)if(c<b.length-1&&!b[c])c++,u=b[c++];else{h=!0;break}if(!u)break;k="<"==a.U[0]?sg:tg;if(!k[u]){h=!0;break}v.length&&k[u]<=k[v[v.length-1]]&&og(p,v,1);v.push(u);a.u="^_"==u?10:e;k=0}if(h||!og(p,v)||1!=p.length)h=!0;h?f||a.i("parse error ("+(z||u)+")"):g=p.pop();a.u=x;return g}
|
||||
function ug(a,b,c,d,e){for(var f;0<=(f=b.indexOf(c));){for(var g=0,h=f+1,k=e;h<b.length;){var p=b[h++];if(p==c){k=-1;break}if(!k)break;k--;p=p.charCodeAt(0);7==d?p&=127:p=p-32&63;g=ng(g*Math.pow(2,d)+p,d*e,!0)}if(0<=k){a.i("parse error ("+c+b+c+")");return}b=b.substr(0,f)+vg(a,g,-1)+b.substr(h)}return b}
|
||||
function wg(a,b,c){var d=void 0,e=!1===c;c=Array.isArray(c)?c:void 0;if(b){"{"!=a.U[0]&&(b=b.split(a.U[0]).join("{").split(a.U[1]).join("}"));b=ug(a,b,'"',7,5);if(!b)return d;b=ug(a,b,"'",6,6);if(!b)return d;16!=a.u&&(b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," "));b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=pg(a,b,0,b.length,a.u,c);void 0!==d&&e&&xg(a,null,d)}return d}
|
||||
function yg(a,b){var c=a.U[0],d=a.U[1];var e="("==c||"{"==c||"["==c?"\\":"";var f="["==c?"\\":"";for(f=new RegExp(e+c+"([^"+f+c+f+d+"]+)"+e+d);e=b.match(f);){var g=wg(a,e[1]);if(void 0===g)return;b=b.replace(c+e[1]+d,null!=g?vg(a,g):"undefined")}if(a.ea.length)for(c=a.ea[0],d=a.ea[1],e="("==c||"{"==c||"["==c?"\\":"",f="["==c?"\\":"",f=new RegExp(e+c+"([^"+f+c+f+d+"]+)"+e+d);e=b.match(f);)b=b.replace("["+e[1]+"]","unimplemented");for(;c=b.match(/\$([a-z]+)/i);){d=null;switch(c[1].toLowerCase()){case "ops":d=
|
||||
a.S-a.ba}if(null==d)break;b=b.replace(c[0],d.toString())}return b}function rg(a,b){for(;b;){switch(b&3){case 1:a=-ng(a);break;case 2:a|=-1;break;case 3:for(var c=35;0<=c&&!(a&Math.pow(2,c));)c--;a=35-c}b>>>=2}return a}
|
||||
function qg(a,b,c,d,e){e=void 0===e?0:e;var f=Array.isArray(d)?d:void 0;if(null!=b){var g=a.Jb(b);if(0<=g)g=a.Kb(g);else if(g=b,a.A[g]?g=a.A[g].value:(g=g.substr(0,6),g=a.A[g]&&a.A[g].value),null!=g){var h=a.A[b]&&a.A[b].oe;h&&(f?f.push(h):(f=wg(a,h,d),void 0!==f?g+=f:(d||a.i("undefined "+(c||"value")+": "+b+" ("+h+")"),g=void 0)))}else g=ta(b,1<b.length||10<a.u?a.u:10);null!=g?g=ng(rg(g,e)):d||a.i("invalid "+(c||"value")+": "+b)}else d||a.i("missing "+(c||"value"));return g}
|
||||
function xg(a,b,c){var d=!1;if(void 0!==c){d=!0;var e=8==a.u?vg(a,c,32,8,1)+" "+c+".":vg(a,c,32,16,1)+" "+vg(a,c,32,8,1)+" "+vg(a,c,32,2,8)+" "+c+".";32<=c&&127>c&&(e+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+e);return d}function zg(a,b){var c=0;if(a.A){if(b)return xg(a,b,a.A[b]&&a.A[b].value);b=Object.keys(a.A);b.sort();for(var d=0;d<b.length;d++)xg(a,b[d],a.A[b[d]].value),c++}return 0<c}
|
||||
function vg(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=wa(b,2,a,"",e);break;case 8:(a=0<c?(c+2)/3|0:0)?12<a&&(a=12):(a=Math.abs(b),a=262143>=a?6:16777215>=a?8:12);b=wa(b,8,a,e?"0o":"");break;case 10:(e=0<c?Math.ceil(.3*c):0)?11<e&&(e=11):e=99999>=Math.abs(b)?5:11;b=wa(b,10,e);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 tg={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},sg={",,":1,"||":5,"&&":6,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,"!":15,"|":15,"^!":15,"&":15,_:19,"^_":19,"{":20,"}":20};
|
||||
function Ag(a){mg.call(this,a);this.style=Bg;this.L=Cg();this.ra=Cg();this.T=Cg();this.C=[];this.j=this.M=this.B=[];Dg(this);this.X=0;Eg(this);this.ka={};Fg(this,a.messages);this.ma=a.commands;var b=this;window?void 0===window.pc8080&&(window.pc8080=function(a){return ad(b,a)}):void 0===global.pc8080&&(global.pc8080=function(a){return ad(b,a)})}ia(Ag,mg);l=Ag.prototype;
|
||||
l.Ea=function(a,b,c,d){this.I=b;this.w=c;this.R=a;(a=Xc(a,"messages"))&&Fg(this,a);this.na=Gg;me(this,64,function(a){a:{var b=d.I.b,c=a[0],e=a=0,k=b.length;if(c){a=Hg(hh(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.I.g;k=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");c=-1;for(var p=0;k--;){var v=b[e];v.type==c?p++||d.i("..."):(c=v.type,p=fc[c],v&&d.i(n(v.id)+" %"+n(e<<d.I.g)+" %%"+n(v.J)+" "+q(v.mb)+" "+
|
||||
q(v.size)+" "+p),c!=Ic&&(c=-1),p=0);a+=d.I.u;e++}}});Nb(this)};
|
||||
l.da=function(a,b,c){var d=this;switch(b){case "debugInput":return this.V=this.P[b]=c,c.onkeydown=function(a){if(13==a.keyCode){var b=c.value;c.value="";ad(d,b,!0)}else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.b<d.g.length-1&&(b=d.g[++d.b])):40==a.keyCode&&(0<d.b?b=d.g[--d.b]:(b="",d.b=-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.P[b]=c,cb(c,function(){if(d.V){var a=d.V.value;d.V.value=
|
||||
"";ad(d,a,!0);return!0}return!1}),!0;case "step":return this.P[b]=c,cb(c,function(a){var b=!1;Ob(d,!0)||(Pb(d,!0),b=jh(d,a?1:0),Pb(d,!1));return b}),!0}return!1};l.Wa=function(){this.V&&this.V.focus()};function Hg(a){a=a&&a.J;null==a&&(a=-1);return a}l.Fa=function(a,b){var c=255,d=Hg(a);-1!==d&&(c=hc(this.I,d),b&&kh(a,b));return c};l.Eb=function(a,b){var c=65535,d=Hg(a);-1!==d&&(c=jc(this.I,d),b&&kh(a,b));return c};l.Xb=function(a,b,c){var d=Hg(a);-1!==d&&(kc(this.I,d,b),c&&kh(a,c),bd(this.w,!0))};
|
||||
l.Pc=function(a,b,c){var d=Hg(a);if(-1!==d){var e=this.I,f=d&e.j,g=(d&e.C)>>>e.g;f!=e.j?e.b[g].Sb(f,b&65535,d):(e.b[g++].nb(f,b&255,d),e.b[g&e.H].nb(0,b>>8&255,d+1));c&&kh(a,c);bd(this.w,!0)}};function Cg(a){return{J:a,Da:!1}}function lh(a){return[a.J,a.Da]}function mh(a){return{J:a[0],Da:a[1]}}
|
||||
function hh(a,b,c){c=(c?a.L:a.ra).J;if(void 0!==b){var d=b=yg(a,b)||b;var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;c<a.C.length;c++){var f=a.C[c].qa[d];if(void 0!==f){d=f.o;void 0!==d&&(e=Cg(d));break}}if(d=e)return d;c=wg(a,b)}null!=c&&(d=Cg(c));return d}function nh(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.rd=a.yb(b.Ic=c[2]))}function kh(a,b){null!=a.J&&(a.J+=b||1)}function oh(a){return n(a,4)}
|
||||
function ph(a,b,c){var d="";for(c=c||256;d.length<c;){var e=a.Fa(b,1);if(!e||36==e||127<=e)break;d+=32<=e?String.fromCharCode(e):"."}return d}function Fg(a,b){a.K=a;a.ga=a.vd=1073741824;a.Y=null;a.Z=[];b=a.yb(b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Xb)0<=Ma(b,c)&&(a.ga|=Xb[c],a.i(c+" messages enabled"))}function me(a,b,c){for(var d in Xb)if(b==Xb[d]){a.ka[d]=c;break}}
|
||||
l.Jb=function(a,b){a=a.toUpperCase();if(null==b)var c=Ma(qh,a);else c=Ma(qh,a.substr(b,2)),0>c&&(c=Ma(qh,a.substr(b,1)));return c};function rh(a,b){var c=0;a=a.Kb(b);if(void 0!==a)switch(b){case sh:case th:case uh:case vh:case wh:case xh:case yh:case zh:c=2;break;case Ah:case Bh:case Ch:case Dh:case Eh:case Fh:case Gh:c=4}return c?n(a,c):"??"}
|
||||
l.Kb=function(a){if(0<=a){var b=this.w;switch(a){case sh:var c=b.g;break;case th:c=b.u;break;case uh:c=b.A;break;case Ah:c=Hd(b);break;case vh:c=b.B;break;case wh:c=b.C;break;case Bh:c=Jd(b);break;case xh:c=b.F;break;case yh:c=b.G;break;case Ch:c=D(b);break;case zh:c=E(b,D(b));break;case Dh:c=b.M;break;case Eh:c=b.j;break;case Fh:c=Fd(b);break;case Gh:c=Fd(b)&255|b.g<<8}}return c};
|
||||
function Hh(a,b){b=yg(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.Jb(b,c+1),0<=e&&(b=b.substr(0,c)+rh(a,e)+b.substr(c+1+qh[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ta(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=hh(a,e))?(d=e+' "'+ph(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=hh(a,e))?(kh(d),d=
|
||||
e+' "'+ph(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+oh(Cg(this.w.j).J));this.ga&536870912?this.Z.push(a):this.Y&&a==this.Y||(this.Y=a,this.ga&-2147483648&&(Uc(this),a+=" (cpu halted)"),this.i(a),this.w&&(a=this.w,vd(a),a.sa=0,bd(a)))};
|
||||
function Sb(a,b,c,d,e,f,g,h){h|=256;null!=f&&(a.ga&h)!=h||a.message(b.Gb+"."+(null!=d?"outPort":"inPort")+"("+q(c)+","+(f?f:"unknown")+(null!=d?","+xa(d):"")+")"+(null!=g?": "+xa(g):"")+(null!=e?" at "+oh(e):""))}
|
||||
function Eg(a){var b;if(ee(a)){if(!a.H||!a.H.length){a.H=Array(Ih);for(b=0;b<a.H.length;b++)a.H[b]=Cg();a.W=0;a.i("instruction history buffer allocated")}if(!a.F||!a.F.length)for(a.F=Array(256),b=0;b<a.F.length;b++)a.F[b]=[b,0]}else a.H&&a.H.length&&a.i("instruction history buffer freed"),a.W=0,a.H=[],a.F=[]}function Jh(a,b){if(!Kh(a))return!1;a.w.qb(b);return!0}
|
||||
function jh(a,b,c,d){if(!Kh(a))return!1;a.G=0;b||ee(a)&&fe(a,a.w.j,0);try{var e=a.w.Cb(b);0<e&&(a.G+=e,gd(a.w,e,!0),cd(a.w,e),a.S++)}catch(f){"number"!=typeof f&&(b=f,a.G=0,Lb(a.w,b.stack||b.message))}!1!==d&&bd(a.w);$c(a,c||!1);return 0<a.G}function Uc(a,b){a.w&&ed(a.w,b)}function $c(a,b){void 0===b&&(b=!0);a.L=Cg(a.w.j);b&&1!=a.O?Lh(a):Mh(a)}
|
||||
function Kh(a){var b;if(b=a.w&&Mb(a.w))b=a.w,b.D.ia?b=!0:(b.i(b.toString()+" not powered"),b=!1);b&&!Ob(a.w)?(a=a.w,a.D.error?(a.i(a.toString()+" error"),a=!0):a=!1,a=!a):a=!1;return a}l.ua=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};l.ta=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};l.reset=function(a){Eg(this);this.S=this.ba=0;this.Y=null;this.G=0;this.L=Cg(this.w.j);this.D.ja=!1;Nh(this);a||$c(this)};
|
||||
l.save=function(){var a=new Gd(this);a.set(0,lh(this.L));a.set(1,lh(this.T));a.set(2,[this.g,this.N,this.ga]);a.set(3,this.C);return a.data()};l.restore=function(a){var b=0;void 0!==a[2]&&(this.L=mh(a[b++]),this.T=mh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.N=a[b][1],this.ga|=a[b][2]);a[3]&&(this.C=a[3]);return!0};l.start=function(a,b){this.O||this.i("running");this.D.ja=!0;this.xa=a;this.ya=b};
|
||||
l.stop=function(a,b){if(this.D.ja){this.D.ja=!1;this.G=b-this.ya;if(!this.O){b="stopped";if(this.G){a-=this.xa;var c=0<a?Math.round(1E3*this.G/a):0;b+=" (";ee(this)&&(b+=this.S+" opcodes, ",this.ba-=this.S,this.S=0);b+=this.G+" cycles, "+a+" ms, "+c+" hz)"}else Qb(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.i(b)}$c(this,!0);this.Wa();Nh(this,this.w.j)}};function ee(a){return 1<a.j.length||!!a.X}
|
||||
function fe(a,b,c){var d=a.w;if(0<c&&(a.X&&!--a.X||Tc(a,b,1,a.j)))return!0;0<=c&&a.F.length&&(a.S++,b=hc(a.I,b),null!=b&&(a.F[b][1]++,b=a.H[a.W],b.J=d.j,b.Da=!1,++a.W==a.H.length&&(a.W=0)));return!1}function qc(a,b,c){a.i("break on input from port "+q(b)+": "+n(c));Uc(a,!0)}function Dc(a,b,c){a.i("break on output to port "+q(b)+": "+n(c));Uc(a,!0)}
|
||||
function Dg(a){var b;a.j=["bp"];if(a.M)for(b=1;b<a.M.length;b++){var c=a.M[b];var d=a.I;Sc(d.b[Hg(c)>>>d.g],!1)}a.M=["br"];if(a.B)for(b=1;b<a.B.length;b++)c=a.B[b],d=a.I,Sc(d.b[Hg(c)>>>d.g],!0);a.B=["bw"];a.sa=0}l.Na=function(a,b,c){var d=!0;c||Oh(this,a,b,!1,!0);if(a!=this.j){var e=Hg(b);if(-1===e)this.i("invalid address: "+oh(b.J)),d=!1;else{var f=this.I;f.b[e>>>f.g].Na(e&f.j,a==this.B)}}d&&(a.push(b),c?b.Da=!0:(Ph(this,a,a.length-1,"set"),Eg(this)));return d};
|
||||
function Oh(a,b,c,d,e){var f=!1;c=Hg(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==Hg(h)&&(!d||h.Da)){f=!0;h.Da||e||Ph(a,b,g,"cleared");b.splice(g,1);b!=a.j&&(d=a.I,Sc(d.b[c>>>d.g],b==a.B));h.Da||Eg(a);break}}return f}function Qh(a,b){for(var c=1;c<b.length;c++)Ph(a,b,c);return b.length-1}function Ph(a,b,c,d){c=b[c];a.i(b[0]+" "+oh(c.J)+(d?" "+d:c.Ic?' "'+c.Ic+'"':""))}
|
||||
function Nh(a,b){if(void 0!==b)Tc(a,b,1,a.j,!0),a.O=0;else for(b=1;b<a.j.length;b++){var c=a.j[b];if(c.Da){if(!Oh(a,a.j,c,!0))break;b=0}}}
|
||||
function Tc(a,b,c,d,e){var f=!1;if(!a.sa++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.Da)for(var k=Hg(h),p=0;p<c;p++)if(b+p==k){var v;f=!0;h.Da&&(Oh(a,d,h,!0),e=!0);if(v=h.rd){f=!1;for(var x=0;x<v.length;x++)if(!Rh(a,v[x],!0)){if(v[x].indexOf("if")){f=!0;break}for(var z=x+1;z<v.length&&v[z].indexOf("else");z++)x++;if(z==v.length){f=!0;break}}a.w.D.ja||(f=!0)}if(f){e||Ph(a,d,g,"hit");break}}}a.sa--;return f}
|
||||
function Sh(a,b,c,d){for(var e=Cg(b.J),f=a.Fa(b,1),g=a.na[f],h="",k=(a.style!=Th?Uh:Vh)[g[0]],p=g.length-1,v=Wh,x,z=1;z<=p;z++){var u="";x=g[z];if(void 0!==x&&!(x&N&&a.style==Bg)){var w=x&Xh;if(w){var C=x&Yh;C?v=C:x|=v;x&Zh||(x|=1==z?$h:ai);if(w&O)a:{u=a;w=x;C=b;switch(w&Yh){case Q:C=n(u.Fa(C,1),2);break;case bi:C=n(u.Fa(C,1)<<24>>24,4);break;case ci:C=n(u.Eb(C,2),4);break;default:u="imm("+q(w)+")";break a}u.style==Th&&w&di?C="["+C+"]":w&ei||(C=(u.style==Bg?"$":"0x")+C);u=C}else w&ei?(u=(x&fi)>>8,
|
||||
w=qh[u],a.style==Th&&x&di&&(u==zh&&(w="HL"),w="["+w+"]"),u=w):w&gi&&(u=(f>>3&7).toString());if(!u||!u.length){h="INVALID";break}0<h.length&&(h+=",");h+=u||"???"}}}f="";g=oh(e.J)+" ";if(-1!==e.J&&-1!==b.J){do if(f+=n(a.Fa(e,1),2),null==e.J)break;while(e.J!=b.J)}g+=Fa(f,10);g+=x&hi?"*":" ";g+=Fa(k,7);h&&(g+=" "+h);c&&(g=Fa(g,40)+";"+c,g=a.w.D.Ua?g+("cycles="+dd(a.w).toString()+" cs="+n(a.w.va)):g+(null!=d?"="+d.toString():""));return g}
|
||||
function ii(a,b){switch(b){case "IF":a=a.w.N&512;break;case "SF":a=Rd(a.w);break;case "ZF":a=Qd(a.w);break;case "AF":a=Pd(a.w);break;case "PF":a=Od(a.w);break;case "CF":a=Md(a.w);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}function ji(a,b){return qh[b]+"="+rh(a,b)+" "}function ki(a){return ji(a,sh)+ji(a,Ah)+ji(a,Bh)+ji(a,Ch)+ji(a,Dh)+ii(a,"IF")+ii(a,"SF")+ii(a,"ZF")+ii(a,"AF")+ii(a,"PF")+ii(a,"CF")}l.zc=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||
function li(a,b,c){var d=[],e=Hg(b)>>>0;for(b=0;b<a.C.length;b++){var f=a.C[b],g=f.J>>>0,h=f.Pd;if(e>=g&&e<g+h){e=Ia(f.yc,[e-g],a.zc);0<=e?mi(a,b,e,d):c&&(e=~e,mi(a,b,e-1,d),mi(a,b,e,d));break}}return d}function mi(a,b,c,d){var e={},f=a.C[b].yc,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.C[b].qa[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
|
||||
function ni(a,b){if("?"==b)a.i("frequency commands:"),a.i("\tclear\tclear all frequency counts");else{var c=0;if(a.F)if("clear"==b){for(b=0;b<a.F.length;b++)a.F[b]=[b,0];a.i("frequency data cleared");c++}else if(void 0!==b)a.i("unknown frequency command: "+b),c++;else{var d=a.F.slice();d.sort(function(a,b){return b[1]-a[1]});var e=a.style!=Th?Uh:Vh;for(b=0;b<d.length;b++){var f=d[b][0],g=d[b][1];g&&(a.i((e[a.na[f][0]]+" ").substr(0,5)+" ("+xa(f)+"): "+g+" times"),c++)}}c||a.i("no frequency data available")}}
|
||||
function oi(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return zg(a)||a.i("no variables"),!0;if(!c[2])return zg(a,c[1]);if(!c[3])return delete a.A[c[1]],!0;b=wg(a,c[3]);return void 0!==b?(a.A[c[1]]={value:b,oe:void 0},!0):!1}a.i("invalid assignment:"+b);return!1}
|
||||
function pi(a,b,c){var d=null;if(b=hh(a,b,!0)){var e=li(a,b,!0);if(e.length){var f;if(e[0]){var g="";(f=b.J-e[1])&&(g=" + "+q(f));f=e[0]+" ("+oh(e[1])+")"+g;c&&a.i(f);d=f}4<e.length&&e[4]&&(g="",(f=e[5]-b.J)&&(g=" - "+q(f)),f=e[4]+" ("+oh(e[5])+")"+g,c&&a.i(f),d||(d=f))}else c&&a.i("no symbols")}return d}
|
||||
function qi(a,b){switch(b[1]){case "8080":a.style=Bg;break;case "8086":a.style=Th;break;case "cs":var c;void 0!==b[3]&&(c=+b[3]);switch(b[2]){case "int":a.w.ma=c;break;case "start":a.w.xa=c;break;case "stop":a.w.ra=c;break;default:a.i("unknown cs option");return}void 0!==c&&Zc(a.w);a.i("checksums "+(a.w.D.Ua?"enabled":"disabled"));return;case "sp":void 0!==b[2]&&(fd(a.w,+b[2])||a.i("warning: using 1x multiplier, previous target not reached"));a.i("target speed: "+(a.w.Z.toFixed(2)+"Mhz")+" ("+a.w.T+
|
||||
"x)");return;case "?":a.i("debugger options:");a.i("\t8080\t\tselect 8080-style mnemonics");a.i("\t8086\t\tselect 8086-style mnemonics");a.i("\tcs int #\tset checksum cycle interval to #");a.i("\tcs start #\tset checksum cycle start count to #");a.i("\tcs stop #\tset checksum cycle stop count to #");a.i("\tsp #\t\tset speed multiplier to #");break;default:if(b[1]){a.i("unknown option: "+b[1]);return}}a.i(a.style+"-style mnemonics enabled")}
|
||||
function Lh(a,b){var c;if(b&&"?"==b[1])a.i("register commands:"),a.i("\tr\tdump registers"),a.i("\trx [#]\tset flag or register x to [#]");else{var d=a.w;null==c&&(c=!0);if(b&&1<b.length){var e=b[1],f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.i("missing value for "+b[1]);return}f=wg(a,b);if(void 0===f)return;switch(e.toUpperCase()){case "A":d.g=f&255;break;case "B":d.u=f&255;break;case "BC":d.u=f>>8&255;case "C":d.A=f&255;break;case "D":d.B=f&255;break;
|
||||
case "DE":d.B=f>>8&255;case "E":d.C=f&255;break;case "H":d.F=f&255;break;case "HL":d.F=f>>8&255;case "L":d.G=f&255;break;case "SP":d.M=f&65535;break;case "PC":B(d,f);a.L=Cg(d.j);break;case "PS":Dd(d,f);break;case "PSW":Dd(d,f&255|d.N&-256);d.g=f>>8;break;case "CF":d.H=f?d.H|256:d.H&255;break;case "PF":f?Od(d)||(d.L^=1):Od(d)&&(d.L^=1);break;case "AF":d.O=f?~d.L&16|d.O&-17:d.L&16|d.O&-17;break;case "ZF":d.H=f?d.H&-256:d.H|255;break;case "SF":f?Rd(d)||(d.L^=192):Rd(d)&&(d.L^=192);break;case "IF":d.N=
|
||||
f?d.N|512:d.N&-513;break;default:a.i("unknown register: "+e);return}bd(d);a.i("updated registers:")}a.i(ki(a));c&&(a.L=Cg(d.j),Mh(a,oh(a.L.J)))}}function ri(a,b){b=Ga(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.i(Hh(a,c[2])):wg(a,b,!1)}function si(a,b,c){var d="t"!=b;c=qg(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);bb(c,function(){return Pb(a,!0)&&jh(a,e,d,!1)},function(){bd(a.w);Pb(a,!1)})}
|
||||
function Mh(a,b,c,d){if(b=hh(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=hh(a,c,!0);if(!d||d.J<b.J)return;e=d.J-b.J;if(256<e){a.i("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=Ob(a,!1)||a.O?a.G:null;var g=null!=f?"cycles":null,h=li(a,b),k=b.J;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var p=h[0]+":";h[2]&&(p+=" "+h[2]);a.i(p)}h[3]&&(g=h[3],f=null);f=Sh(a,b,g,f);a.i(f);a.L=b;e-=b.J-k;c++}}}
|
||||
l.yb=function(a,b,c){if(b)if(a){0>this.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.N?a="end":a=this.g[this.b+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ga(a.substring(d,f))),d=f+1}}return b};
|
||||
function Rh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.N&&(a.i("ended assemble at "+oh(a.T.J)),a.L=a.T,a.N=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.Y=null;if(Mb(a)&&0<b.length){a.N&&(b="a "+oh(a.T.J)+" "+b);var f=b.replace(/ +/g," ").split(" ");if(f&&f.length)for(var g=f[0],h=g.charAt(0),k=1;k<g.length;k++){var p=g.charAt(k);if("?"==h||"r"==h||"a">p||"z"<p){f[0]=g.substr(k);f.unshift(g.substr(0,k));break}}switch(f[0].charAt(0)){case "a":var v=hh(a,f[1],!0);if(v)if(a.T=
|
||||
v,void 0===f[2])a.i("begin assemble at "+oh(v.J)),a.N=!0,bd(a.w);else{a.i("not supported yet");var x=[];if(x.length){for(var z=0;z<x.length;z++)a.Xb(v,x[z],1);a.i(Sh(a,a.T))}}break;case "b":a:{var u=f[0],w=f[1],C=b;if("?"==w)a.i("breakpoint commands:"),a.i("\tbi [p]\ttoggle break on input port [p]"),a.i("\tbo [p]\ttoggle break on output port [p]"),a.i("\tbp [a]\tset exec breakpoint at addr [a]"),a.i("\tbr [a]\tset read breakpoint at addr [a]"),a.i("\tbw [a]\tset write breakpoint at addr [a]"),a.i("\tbc [a]\tclear breakpoint at addr [a]"),
|
||||
a.i("\tbl\tlist all breakpoints"),a.i("\tbn [n]\tbreak after [n] instruction(s)");else{var T=u.charAt(1);if("l"==T){var Na=0+Qh(a,a.j);Na+=Qh(a,a.M);(Na+=Qh(a,a.B))||a.i("no breakpoints")}else if("n"==T)a.X=qg(a,w),a.i("break after "+a.X+" instruction(s)");else if(void 0===w)a.i("missing breakpoint address");else{var P=Cg();if("*"!=w&&(P=hh(a,w,!0),!P))break a;w=q(P.J);"c"==T?null==P.J?(Dg(a),a.i("all breakpoints cleared")):Oh(a,a.j,P)||Oh(a,a.M,P)||Oh(a,a.B,P)||a.i("breakpoint missing: "+oh(P.J)):
|
||||
"i"==T?a.i("breakpoint "+(nc(a.I,P.J)?"enabled":"cleared")+": port "+w+" (input)"):"o"==T?a.i("breakpoint "+(Ac(a.I,P.J)?"enabled":"cleared")+": port "+w+" (output)"):null!=P.J&&(nh(a,P,C),"p"==T?a.Na(a.j,P):"r"==T?a.Na(a.M,P):"w"==T?a.Na(a.B,P):a.i("unknown breakpoint command: "+T))}}}break;case "c":var ob=a.R;ob.B&&(ob.B.value="");break;case "d":a:{var Oa,ua=f[0],na=f[1],va=f[2],Xi=f[3];if("?"==na){var Vb="";for(Oa in Xb)a.ka[Oa]&&(Vb&&(Vb+=","),Vb+=Oa);Vb+=",state,symbols";a.i("dump memory commands:");
|
||||
a.i("\tdb [a] [#] dump # bytes at address a");a.i("\tdw [a] [#] dump # words at address a");a.i("\tdd [a] [#] dump # dwords at address a");a.i("\tdh [#] [#] dump # instructions from history");Vb.length&&a.i("dump extension commands:\n\t"+Vb)}else if("state"==na){var ve=ti(a.R,!0);if("console"==va)console.log(ve);else{var Ig=a.R;Ig.B&&(Ig.B.value="");ve&&a.i(ve)}}else if("symbols"==na)for(var we=0;we<a.C.length;we++){var xe=a.C[we],Wb;for(Wb in xe.qa)if("."!=Wb.charAt(0)){var Jg=xe.qa[Wb].o;
|
||||
if(void 0!==Jg){var Kg=xe.qa[Wb].l;Kg&&(Wb=Kg);a.i(oh(Jg)+" "+Wb)}}}else{if("d"==ua){for(Oa in Xb)if(f[1]==Oa){var Lg=a.ka[Oa];Lg?(f.shift(),f.shift(),Lg(f)):a.i("no dump registered for "+na);break a}na||(ua=a.Ba||"db")}else a.Ba=ua;if("dh"==ua){var Mg=na,Ng=va,Og="",Pg=0,Pa=a.W,db=a.H;if(db.length){var Ba=+Mg||a.va,rc=+Ng||10;isNaN(Ba)?Ba=rc:Og="more ";Ba>db.length&&(a.i("note: only "+db.length+" available"),Ba=db.length);Pa-=Ba;0>Pa&&(null==db[db.length-1].J?(Ba=Pa+Ba,Pa=0):Pa+=db.length);var ye=
|
||||
[];"call"==Ng&&(rc=1E5,ye=["CALL"]);for(void 0!==Mg&&a.i(Ba+" instructions earlier:");0<rc&&Pa!=a.W;){var Qg=db[Pa++];if(null==Qg.J)break;var sc=Cg(Qg.J),Yi=Ba--,Rg=Sh(a,sc,"history",Yi);(!ye.length||0<=Rg.indexOf(ye[0]))&&a.i(Rg);sc.Ib&&(Pa+=sc.Ib,rc-=sc.Ib,Ba-=sc.Ib);Pa>=db.length&&(Pa=0);a.va=Ba;Pg++;rc--}}Pg||(a.i("no "+Og+"history available"),a.va=void 0)}else{var hd=hh(a,na);if(hd){var id=0;va&&("l"==va.charAt(0)&&(va=va.substr(1)||Xi),id=qg(a,va)>>>0,65536<id&&(id=65536));for(var tc="",jd=
|
||||
"dd"==ua?4:"dw"==ua?2:1,kd=jd*id||128,Zi=kd+15>>4||1;Zi--&&0<kd;){var ze=0,Ae=0,uc,Be="",Sg="";na=oh(hd.J);for(uc=16;0<uc&&0<kd;uc--){var ld=a.Fa(hd,1);ze|=ld<<(Ae++<<3);Ae==jd&&(Be+=n(ze,2*jd),Be+=1==jd?9==uc?"-":" ":" ",ze=Ae=0);Sg+=32<=ld&&128>ld?String.fromCharCode(ld):".";kd--}tc&&(tc+="\n");tc+=na+" "+Be+(0==uc?" "+Sg:"")}tc&&a.i(tc);a.ra=hd}}}}break;case "e":if("else"==f[0])break;var md=1,Tg=255,Ug=a.Fa,Vg=a.Xb;"ew"==f[0]&&(md=2,Tg=65535,Ug=a.Eb,Vg=a.Pc);var Wg=md<<1,Xg=f[1];if(null==Xg)a.i("edit memory commands:"),
|
||||
a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var nd=hh(a,Xg);if(nd)for(var od=2;od<f.length;od++){var vc=wg(a,f[od]);if(void 0===vc){a.i("unrecognized value: "+f[od]);break}vc&~Tg&&a.i("warning: "+n(vc)+" exceeds "+md+"-byte value");var $i=Ug.call(a,nd);a.i("changing "+oh(nd.J)+" from "+n($i,Wg,!0)+" to "+n(vc,Wg,!0));Vg.call(a,nd,vc,md)}}break;case "f":ni(a,f[1]);break;case "g":a:{var Yg=f[1],aj=b;if(void 0!==Yg){var Ce=hh(a,Yg,!0);if(!Ce)break a;
|
||||
nh(a,Ce,aj);a.Na(a.j,Ce,!0)}Jh(a,!0)||c||a.i("cpu busy or unavailable, run command ignored")}break;case "h":a:{if(a.D.ja){var Zg="halting";Uc(a)}else{if(Ob(a,!0))break a;Zg="already halted"}c||a.i(Zg)}break;case "i":if("if"==f[0]){var wc=b.substr(2);wc=Ga(wc);if(wg(a,wc)){c||a.i("true: "+wc);var $g=!0}else c||a.i("false: "+wc),$g=!1;$g||(d=!1);break}if("int"==f[0]){var bj=f[1];if(a.w.N&512){var De=wg(a,bj);if(null==De)var Ee=!1;else a.i("requesting interrupt level "+De),de(a.w,De),Ee=!0}else a.i("interrupts disabled (use rif=1 to enable)"),
|
||||
Ee=!1;Ee||(d=!1);break}var Fe=f[1];if(Fe&&"?"!=Fe){var Ge=qg(a,Fe);if(void 0!==Ge){var cj=pc(a.I,Ge);a.i(q(Ge)+": "+xa(cj))}}else a.i("input commands:"),a.i("\ti [p]\tread port [p]"),a.i("warning: port accesses can affect hardware state");break;case "k":var dj=f[0];if("?"==f[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var He=0,ah=Cg(),xc=Cg(a.w.M);for(a.i("stack trace for "+oh(xc.J));10>He;){for(var Bb=null,ej=256;65536>xc.J>>>0;){ah.J=
|
||||
a.Eb(xc,2);if(null==xc.J||!ej--)break;for(var fj=a,pd=ah,bh=null,yc=pd.J,ch=yc,Ie=1;6>=Ie&&yc;Ie++){if(2<Ie){pd.J=yc;var qd=Sh(fj,pd);if(0<=qd.indexOf("CALL")){var dh=qd.indexOf(" ");if(yc+(qd.indexOf(" ",dh+1)-dh-1)/2==ch){bh=qd;break}}}yc--}pd.J=ch;if(Bb=bh)break}if(!Bb||null==Bb)break;var eh=null;if("ks"==dj){var fh=Bb.match(/[0-9A-F]+$/);fh&&(eh=pi(a,fh[0]))}Bb=Fa(Bb,50)+" ;"+(eh||"stack="+oh(xc.J));a.i(Bb);He++}He||a.i("no return addresses found")}break;case "l":"ln"==f[0]&&pi(a,f[1],!0);break;
|
||||
case "m":a:{var eb,fb=null,ba=f[1];"?"==ba&&(ba=void 0);if(void 0!==ba){var rb=0;if("all"==ba)rb=1610481663,ba=null;else if("on"==ba)fb=!0,ba=null;else if("off"==ba)fb=!1,ba=null;else{"keys"==ba&&(ba="key");"kbd"==ba&&(ba="keyboard");for(eb in Xb)if(ba==eb){rb=Xb[eb];fb=!!(a.ga&rb);break}if(!rb){a.i("unknown message category: "+ba);break a}}if(rb)if("on"==f[2])a.ga|=rb,fb=!0;else if("off"==f[2]&&(a.ga&=~rb,fb=!1,536870912==rb)){for(var Je=0;Je<a.Z.length;Je++)a.i(a.Z[Je]);a.Z=[]}}var gj=0,zc="";for(eb in Xb)if(!ba||
|
||||
ba==eb){var hj=!!(a.ga&Xb[eb]);if(null===fb||fb==hj)zc&&(zc+=","),++gj%10||(zc+="\n\t"),"key"==eb&&(eb="keys"),zc+=eb}void 0===ba&&a.i("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.i((null!==fb?fb?"messages on: ":"messages off: ":"message categories:\n\t")+(zc||"none"));Eg(a)}break;case "o":var Ke=f[1],ij=f[2];if(Ke&&"?"!=Ke){var Le=qg(a,Ke,"port #"),Me=qg(a,ij);void 0!==Le&&void 0!==Me&&(Cc(a.I,Le,Me),a.i(q(Le)+": "+xa(Me)))}else a.i("output commands:"),a.i("\to [p] [b]\twrite byte [b] to port [p]"),
|
||||
a.i("warning: port accesses can affect hardware state");break;case "p":if("print"==f[0]){ri(a,b.substr(5));break}var gh="pr"==f[0]?1:0,jj=1+gh;if(a.O)a.i("step in progress");else{var Ne=Cg(a.w.j);switch(a.Fa(Ne)){case 205:a.O=jj,kh(Ne,3)}a.O?(a.Na(a.j,Ne,!0),Jh(a)||(a.R&&a.R.Wa(),a.O=0)):si(a,gh?"tr":"t")}break;case "r":if("reset"==b){a.R&&a.R.reset();break}Lh(a,f);break;case "s":qi(a,f);break;case "t":si(a,f[0],f[1]);break;case "u":Mh(a,f[1],f[2],8);break;case "v":if("var"==f[0]){oi(a,b.substr(3))||
|
||||
(d=!1);break}a.i("PC8080 version 1.37.0 ("+a.w.ub+",RELEASE"+(Tb?",TYPEDARRAYS":",LONGARRAYS")+")");a.i(Sa());break;case "?":if(f[1]){ri(a,b.substr(1));break}var Oe="commands:",Pe;for(Pe in ui)Oe+="\n"+Fa(Pe,9)+ui[Pe];ee(a)||(Oe+="\nnote: frequency/history disabled if no exec breakpoints");a.i(Oe);break;default:a.i("unknown command: "+b),d=!1}}}catch(ih){a.i("debugger error: "+(ih.stack||ih.message)),d=!1}return d}function ad(a,b,c){b=a.yb(b,c);for(var d in b)if(!Rh(a,b[+d]))return!1;return!0}
|
||||
var ui={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]",h:"halt","i [#]":"input port #","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages","o [#]":"output port #",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble",v:"print version","var":"assign variable"},
|
||||
Bg=8080,Th=8086,Uh="NONE ACI ADC ADD ADI ANA ANI CALL CC CM CNC CNZ CP CPE CPO CZ CMA CMC CMP CPI DAA DAD DCR DCX DI EI HLT IN INR INX JMP JC JM JNC JNZ JP JPE JPO JZ LDA LDAX LHLD LXI MOV MVI NOP ORA ORI OUT PCHL POP PUSH RAL RAR RET RC RM RNC RNZ RP RPE RPO RZ RLC RRC RST SBB SBI SHLD SPHL STA STAX STC SUB SUI XCHG XRA XRI XTHL".split(" "),Vh="NONE ADC ADC ADD ADD AND AND CALL CALLC CALLS CALLNC CALLNZ CALLNS CALLP CALLNP CALLZ NOT CMC CMP CMP DAA ADD DEC DEC CLI STI HLT IN INC INC JMP JC JS JNC JNZ JNS JP JNP JZ MOV MOV MOV MOV MOV MOV NOP OR OR OUT JMP POP PUSH RCL RCR RET RETC RETS RETNC RETNZ RETNS RETP RETNP RETZ ROL ROR RST SBB SBB MOV MOV MOV MOV STC SUB SUB XCHG XOR XOR XCHG".split(" "),
|
||||
th=0,uh=1,vh=2,wh=3,xh=4,yh=5,zh=6,sh=7,Ah=8,Bh=9,Ch=10,Dh=11,Eh=12,Fh=13,Gh=14,qh="B C D E H L M A BC DE HL SP PC PS PSW".split(" "),Yh=15,Xh=240,fi=3840,Zh=61440,Wh=0,Q=1,bi=2,ci=3,ei=16,O=32,di=64,gi=128,R=sh<<8|ei|Q,S=th<<8|ei|Q,U=uh<<8|ei|Q,V=vh<<8|ei|Q,W=wh<<8|ei|Q,X=xh<<8|ei|Q,Y=yh<<8|ei|Q,Z=zh<<8|ei|Q|di,vi=Ah<<8|ei|ci,wi=Bh<<8|ei|ci,xi=Ch<<8|ei|ci,yi=Dh<<8|ei|ci,zi=Gh<<8|ei|ci,ai=4096,$h=8192,N=16384,hi=32768,Gg=[[45],[42,vi,O],[71,vi|di,R|N],[29,vi],[28,S],[22,S],[44,S,O],[63],[45,hi],[21,
|
||||
xi|N,vi],[40,R|N,vi|di],[23,vi],[28,U],[22,U],[44,U,O],[64],[45,hi],[42,wi,O],[71,wi|di,R|N],[29,wi],[28,V],[22,V],[44,V,O],[52],[45,hi],[21,xi|N,wi],[40,R|N,wi|di],[23,wi],[28,W],[22,W],[44,W,O],[53],[45,hi],[42,xi,O],[68,51|di,xi|N],[29,xi],[28,X],[22,X],[44,X,O],[20],[45,hi],[21,xi|N,xi],[41,xi|N,51|di],[23,xi],[28,Y],[22,Y],[44,Y,O],[16,R|N],[45,hi],[42,yi,O],[70,51|di,R|N],[29,yi],[28,Z],[22,Z],[44,Z,O],[72],[45,hi],[21,xi|N,yi],[39,R|N,51|di],[23,yi],[28,R],[22,R],[44,R,O],[17],[43,S,S],[43,
|
||||
S,U],[43,S,V],[43,S,W],[43,S,X],[43,S,Y],[43,S,Z],[43,S,R],[43,U,S],[43,U,U],[43,U,V],[43,U,W],[43,U,X],[43,U,Y],[43,U,Z],[43,U,R],[43,V,S],[43,V,U],[43,V,V],[43,V,W],[43,V,X],[43,V,Y],[43,V,Z],[43,V,R],[43,W,S],[43,W,U],[43,W,V],[43,W,W],[43,W,X],[43,W,Y],[43,W,Z],[43,W,R],[43,X,S],[43,X,U],[43,X,V],[43,X,W],[43,X,X],[43,X,Y],[43,X,Z],[43,X,R],[43,Y,S],[43,Y,U],[43,Y,V],[43,Y,W],[43,Y,X],[43,Y,Y],[43,Y,Z],[43,Y,R],[43,Z,S],[43,Z,U],[43,Z,V],[43,Z,W],[43,Z,X],[43,Z,Y],[26],[43,Z,R],[43,R,S],[43,R,
|
||||
U],[43,R,V],[43,R,W],[43,R,X],[43,R,Y],[43,R,Z],[43,R,R],[3,R|N,S],[3,R|N,U],[3,R|N,V],[3,R|N,W],[3,R|N,X],[3,R|N,Y],[3,R|N,Z],[3,R|N,R],[2,R|N,S],[2,R|N,U],[2,R|N,V],[2,R|N,W],[2,R|N,X],[2,R|N,Y],[2,R|N,Z],[2,R|N,R],[73,R|N,S],[73,R|N,U],[73,R|N,V],[73,R|N,W],[73,R|N,X],[73,R|N,Y],[73,R|N,Z],[73,R|N,R],[66,R|N,S],[66,R|N,U],[66,R|N,V],[66,R|N,W],[66,R|N,X],[66,R|N,Y],[66,R|N,Z],[66,R|N,R],[5,R|N,S],[5,R|N,U],[5,R|N,V],[5,R|N,W],[5,R|N,X],[5,R|N,Y],[5,R|N,Z],[5,R|N,R],[76,R|N,S],[76,R|N,U],[76,R|
|
||||
N,V],[76,R|N,W],[76,R|N,X],[76,R|N,Y],[76,R|N,Z],[76,R|N,R],[46,R|N,S],[46,R|N,U],[46,R|N,V],[46,R|N,W],[46,R|N,X],[46,R|N,Y],[46,R|N,Z],[46,R|N,R],[18,R|N,S],[18,R|N,U],[18,R|N,V],[18,R|N,W],[18,R|N,X],[18,R|N,Y],[18,R|N,Z],[18,R|N,R],[58],[50,vi],[34,51],[30,51],[11,51],[51,vi],[4,R|N,O|Q],[65,gi],[62],[54],[38,51],[30,51|hi],[15,51],[7,51],[1,R|N,O|Q],[65,gi],[57],[50,wi],[33,51],[48,O|Q,R|N],[10,51],[51,wi],[74,R|N,O|Q],[65,gi],[55],[54,hi],[31,51],[27,R|N,O|Q],[8,51],[7,51|hi],[67,R|N,O|Q],[65,
|
||||
gi],[61],[50,xi],[37,51],[78,yi|di|N,xi|N],[14,51],[51,xi],[6,R|N,O|Q],[65,gi],[60],[49,xi],[36,51],[75,xi|N,wi|N],[13,51],[7,51|hi],[77,R|N,O|Q],[65,gi],[59],[50,zi],[35,51],[24],[12,51],[51,zi],[47,R|N,O|Q],[65,gi],[56],[69,yi|N,xi|N],[32,51],[25],[9,51],[7,51|hi],[19,R|N,O|Q],[65,gi]],Ih=1E3;hb(function(){for(var a=zb(document,"pc8080","debugger"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);d=new Ag(d);yb(d,c)}});
|
||||
function Ai(a,b,c){t.call(this,"Computer",a,67108864);this.D.ia=!1;Bi(this,b);this.M=Xc(this,"autoPower",a);this.j=0;this.U=a.busWidth||a.buswidth;this.b=Ci;this.H=null;this.F=this.S=!1;this.W=Xc(this,"url")||"";(Math.random()+.1).toString(36);this.g=Di(this);if(this.w=Eb("CPU",this.id)){this.K=Eb("Debugger",this.id);this.A=[];for(b=null;b=Zb(this,"Video",b);)this.A.push(b);this.I=new ac({id:this.$a+".bus",busWidth:this.U},this.w,this.K);var d=Cb(this.id);if(this.B=(this.C=Eb("Panel",this.id))&&this.C.P.print)for(b=
|
||||
0;b<d.length;b++){var e=d[b];e.aa=this.C.aa;e.print=this.C.print;e.i=this.C.i}this.i("PC8080 v1.37.0\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<d.length;b++)e=d[b],e.Ea&&e.Ea(this,this.I,this.w,this.K);b=null;e=Xc(this,"resume",a);void 0!==e&&(1<e.length?b=this.G=e:this.b=parseInt(e,10));var f;if(a=Xc(this,"state")||(f=!0,a.state))b=this.N=a,f||(this.F=!0,this.b=Ci),this.b&&(this.L=new Gd(this,"1.37.0"),
|
||||
Ei(this.L)?b=null:delete this.L);!b&&this.b&&(b=Fi(this))&&(this.F=!0);if(b){var g=this;Qa(b,null,!0,function(a,b,c){c?(g.G=null,g.F=!1,g.aa("Unable to load machine state from server (error "+c+(b?": "+Ga(b):"")+")")):(g.H=b,g.S=!0);Nb(g)})}else Nb(this);this.P.power||(this.M=!0);!c&&this.M&&Gi(this,this.kb)}else r("Unable to find CPU component")}ia(Ai,t);
|
||||
function Bi(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){r(d.message+" ("+c+")")}}a.T=b}function Xc(a,b,c){var d=b.toLowerCase();d=$a(b)||$a(d);void 0===d&&a.T&&(d=a.T[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function Gi(a,b,c){for(var d=Cb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Mb(f)){Mb(f,function(){Gi(a,b,c)});return}}b.call(a,c)}
|
||||
function Hi(a,b){var c=new Gd(a,"1.37.0",Ii);if(Ei(c)&&Ji(c)){var d=c.get(Ki),e=b?b.get(Ki):"unknown";d!=e&&(a.aa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=Ai.prototype;
|
||||
l.kb=function(a){void 0===a&&(a=this.b||(this.H?Li:Ci));if(!this.j){this.j++;var b=!1,c=!1;this.O=!1;var d=this.L||new Gd(this,"1.37.0");if(a==Mi)b=!0;else if(a>Ci){if(Ei(d,this.H)){this.u=new Gd(this,"1.37.0",Ni);Ei(this.u)&&(Oi(this,d),a=Pi,Qi(this.u));this.u.set(Ki,Ja());Ri(this.u);var e=this.b&&!this.F;if(a==Li||wb("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=Ji(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Ei(d,g):("error"==f&&"no machine state"!=
|
||||
g?(this.aa("Error: "+g),"unable to verify user"==g&&(Wa(Si,""),this.g=null)):this.i(f+": "+g),Qi(d),Ei(d)?(c=Ji(d),e=!0):c=!1))}e&&Hi(this,c?d:null)}else a==Pi&&d.clear()}else Hi(this);delete this.H;delete this.L}e=Cb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.w&&(c=Ti(this,g,d,b,c));b=[d,a,c];a!=Mi?Gi(this,this.Bc,b):this.Bc(b)}};
|
||||
function Ti(a,b,c,d,e){if(!b.D.ia){b.D.ia=!0;if(b.ua){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.ua(f,d)&&f&&(r("Unable to restore state for "+b.type),a.N&&!a.S?(c.clear(),a.b=Ci,window&&window.location.reload()):a.O=!0,b.ua(null),e=!1)}if(!d&&b.vc)for(a=b.vc.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.Bc=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.D.ia=!0;var d=this.P.power;d&&(d.textContent="Shutdown");this.w&&(Ti(this,this.w,b,c,a),this.w.hb());this.O&&(Oi(this,b),b.clear());!c&&this.u&&(this.u.clear(),delete this.u);this.j=0};
|
||||
function Oi(a,b){if(wb("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PC8080",ver:"1.37.0"};d.url=a.W;d.user=c;d.type="bug";d.data=b;Qa("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function ti(a,b,c){var d="none";if(a.j)return null;a.j--;var e=new Gd(a,"1.37.0"),f=new Gd(a,"1.37.0",Ii),g=Ja();f.set(Ki,g);e.set(Ki,g);e.set(Ui,"1.37.0");e.set(Vi,window?window.location.href:null);e.set(Wi,Sa());if(a.w&&a.w.ta){c&&ed(a.w);var h=a.w.ta(b,c);"object"===typeof h&&e.set(a.w.id,h);c&&(a.w.D.ia=!1,!1===h&&(d=null))}g=Cb(a.id);for(var k=0;k<g.length;k++){var p=g[k];p.D.ia&&(p.ta&&(h=p.ta(b,c),"object"===typeof h&&e.set(p.id,h)),c&&(p.D.ia=!1,!1===h&&(d=null)))}d&&(c?(g=h=!1,b?(a.g&&kj(a,
|
||||
a.g,e.toString()),Ri(f)&&Ri(e)||(d=null,h=g=!0)):a.b&&(h=!0,g=a.b==lj),h&&e.clear(g)):d=e.toString());c&&(a.D.ia=!1,b=a.P.power)&&(b.textContent="Power");a.j=0;return d}l.reset=function(){this.I&&this.I.reset&&(Rb(this,"Resetting "+this.I.type),this.I.reset());for(var a=Cb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.I&&c.reset&&(Rb(this,"Resetting "+c.type),c.reset())}};
|
||||
l.start=function(a,b){for(var c=Cb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};l.stop=function(a,b){for(var c=Cb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
l.da=function(a,b,c){var d=this;switch(b){case "power":return this.P[b]=c,c.onclick=function(){d.j||(d.D.ia?ti(d,!1,!0):Gi(d,d.kb))},!0;case "reset":return this.P[b]=c,c.onclick=function(){if(d.D.ia&&!d.j)if(d.b&&!d.G){var a=wb("Click OK to save changes to this PC8080 machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");ti(d,a,!0);!a&&d.N?window&&window.location.reload():d.kb(Ci)}else d.reset(),d.w&&d.w.hb()},!0;case "save":if(Aa())c.parentNode.removeChild(c);else return this.P[b]=
|
||||
c,c.onclick=function(){var a=Di(d,!0);if(a){var b=!!(d.b&&!d.G||d.N),c=ti(d,b);b?kj(d,a,c):d.aa("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function Di(a,b){var c=a.g;c||((c=Va(Si),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=mj(a,c))||a.aa("The user ID is invalid.")):b&&a.aa("Browser local storage is not available"));return c}
|
||||
function mj(a,b){a.g=null;b=Qa(Ca()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Wa(Si,b.data),a.g=b.data)}catch(d){r(d.message+" ("+c+")")}return a.g}function Fi(a){var b=null;a.g&&(b=Ca()+"/api/v1/user?req=load&user="+a.g+"&state="+nj(a,"1.37.0"));return b}
|
||||
function kj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=nj(a,"1.37.0");d.data=c;b=Qa(Ca()+"/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.aa("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.aa(c),Wa(Si,""),a.g=null)}}
|
||||
function Zb(a,b,c){a=Cb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}l.Wa=function(a){if(this.A.length){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);var d=this.A[0];d.V&&d.V.focus();!a&&window&&window.scrollTo(b,c)}};
|
||||
function wd(a,b){a.w&&(a=a.w,a.eb&&(b||!a.D.ja||a.D.Ac)&&(I(a,"A",a.g),I(a,"B",a.u),I(a,"C",a.A),I(a,"BC",Hd(a),4),I(a,"D",a.B),I(a,"E",a.C),I(a,"DE",Jd(a),4),I(a,"H",a.F),I(a,"L",a.G),I(a,"HL",D(a),4),I(a,"SP",a.M,4),I(a,"PC",a.j,4),b=Fd(a),I(a,"PS",b,4),I(a,"IF",b&512?1:0,1),I(a,"SF",b&128?1:0,1),I(a,"ZF",b&64?1:0,1),I(a,"AF",b&16?1:0,1),I(a,"PF",b&4?1:0,1),I(a,"CF",b&1?1:0,1)),b=a.P.speed)&&(b.textContent=a.D.ja&&a.Y?a.Y.toFixed(2)+"Mhz":"Stopped")}
|
||||
var Ni="failsafe",Ii="validate",Ki="timestamp",Ui="version",Vi="url",Wi="browser",Si="user",Mi=-1,Ci=0,Li=1,Pi=2,lj=3;hb(function(){for(var a=zb(document,"pc8080-machine"),b=0;b<a.length;b++){var c=a[b],d=Ab(c);c=zb(c,"pc8080","computer");for(var e=0;e<c.length;e++){var f=c[e],g=Ab(f);g=new Ai(g,d,!0);yb(g,f);g.M&&Gi(g,g.kb)}}});ib.show.push(function(){for(var a=zb(document,"pc8080","computer"),b=0;b<a.length;b++){var c=Ab(a[b]);if(c=Eb("Computer",c.id))c.D.Qb=!1,c.V&&!c.D.ia&&c.kb(Mi)}});
|
||||
ib.exit.push(function(){for(var a=zb(document,"pc8080","computer"),b=0;b<a.length;b++){var c=Ab(a[b]);if(c=Eb("Computer",c.id))c.D.Qb=!0,c.D.ia&&ti(c,!(!c.b||c.G),!0)}});function Gd(a,b,c){this.id=a.id;this.K=a.K;this.g="";this.b={};this.w=this.I=!1;this.key=nj(a,b,c);Qi(this,a.zd)}l=Gd.prototype;l.set=function(a,b){try{this.b[a]=b}catch(c){}};l.get=function(a){return this.b[a]||null};l.data=function(){return this.b};
|
||||
function Ei(a,b){return b?(a.g=b,a.w=!0,a.I=!1,!0):a.w?!0:Ta()&&(b=Va(a.key))?(a.g=b,a.w=!0):!1}function Ji(a){var b=!0;if(!a.I)try{a.b=JSON.parse(a.g),a.I=!0}catch(c){r(c.message||c),b=!1}return b}function Ri(a){var b=!0;if(Ta()){var c=JSON.stringify(a.b);Wa(a.key,c)||(r("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.b?JSON.stringify(this.b):this.g};function Qi(a,b){a.g="";a.b={};a.w=a.I=!1;b&&a.set("parms",b)}
|
||||
l.clear=function(a){Qi(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 nj(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 oj=0;
|
||||
function pj(a,b,c,d,e,f){e("Loading "+a+"...");Qa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):qj(h,a,b,c,d,e,f)})}
|
||||
function qj(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(tb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
|
||||
"$1PC8080$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pc8080$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(v){f=null,a=v.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?rj(a,f,h):h(a,null):g("no data"+(b?" for file: "+
|
||||
b:""),null)}
|
||||
function rj(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Qa(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],p,v=/( [a-z]+=)(['"])(.*?)\2/gi;p=v.exec(f);)k=0>k.toLowerCase().indexOf(p[1].toLowerCase())?k.replace(">",p[0]+">"):k.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[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);rj(a,b,c)}})}else c(a,null)}
|
||||
function sj(a,b,c,d){function e(a){if(void 0===h){var b=g&&zb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=Da(a))}function f(a){e("Error: "+a);k&&(--oj||mb(!0));k=!1}var g,h,k=!0;oj++;ub[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var v=document.head||document.getElementsByTagName("head")[0],x=document.createElement("style");x.type="text/css";x.styleSheet?x.styleSheet.cssText=p:x.appendChild(document.createTextNode(p));v.appendChild(x)}c||
|
||||
(c="/versions/pc8080/1.37.0/components.xsl");p=function(d,h){h?pj(c,null,null,!1,e,function(d,k){k?(tb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--oj||mb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--oj||mb(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?pj(b,a,d,!0,e,p):qj(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(z){f(z.message)}return k}window.embedPC8080=function(a,b,c,d){mb(!1);return sj(a,b,c,d)};
|
||||
window.commandMachine=function(a,b,c,d,e,f){if("script"==e){d=!1;c+=".machine";if(!f)delete Gb[c],d=!0;else if("string"==typeof f&&!Gb[c]){d=!0;e=Gb;for(var g=c,h=f.length,k=[],p=[],v="",x=null,z=0;z<h;z++){var u=f[z];if('"'==u||"'"==u)x&&u!=x?v+=u:(x?x=null:x=u,v&&(p.push(v),v=""));else{if(!x){if("\r"==u||"\n"==u)u=";";if(" "==u||"\t"==u||";"==u){v&&(p.push(v),v="");";"==u&&p.length&&(k.push(p),p=[]);continue}}v+=u}}v&&p.push(v);p.length&&k.push(p);e[g]=k;Fb(c)||(d=!1)}return d?(b&&(a.disabled=!0),
|
||||
!0):!1}if(d&&(g=Eb(d,c+".machine"))&&(h=g.exports)&&(h=h[e]))return h.call(g,f)?(b&&(a.disabled=!0),!0):!1;console.log("unimplemented: commandMachine('"+c+"','"+d+"','"+e+"','"+f+"')");return!1};window.enableEvents=mb;window.sendEvent=pb;})();//# sourceMappingURL=/versions/pc8080/1.37.0/pc8080-dbg.map
|
||||
8
versions/pc8080/1.37.0/pc8080-dbg.map
Normal file
8
versions/pc8080/1.37.0/pc8080-dbg.map
Normal file
File diff suppressed because one or more lines are too long
278
versions/pcx86/1.37.0/common.css
Normal file
278
versions/pcx86/1.37.0/common.css
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
@CHARSET "UTF-8";
|
||||
/**
|
||||
@author Jeff Parsons (@jeffpar)
|
||||
@website http://www.pcjs.org/
|
||||
@created 2013-05-05
|
||||
@modified 2014-02-23
|
||||
@license http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
body {
|
||||
margin: 0;
|
||||
background: #202020;
|
||||
}
|
||||
h1, h2 {
|
||||
margin-top: 0;
|
||||
color: #cccccc;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h4 a {
|
||||
color: #cccccc !important;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
a img {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
pre, code {
|
||||
color: #000000;
|
||||
background-color: #cccccc;
|
||||
font-family: Monaco, Consolas, "Lucida Console", monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
pre {
|
||||
margin: 1em 2em;
|
||||
padding: 1em;
|
||||
border-radius: 5px;
|
||||
overflow: auto;
|
||||
}
|
||||
code {
|
||||
padding: 1px;
|
||||
}
|
||||
pre a, code a {
|
||||
color: #006400 !important;
|
||||
}
|
||||
.common {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
color: #cccccc;
|
||||
}
|
||||
.common a {
|
||||
|
||||
color: #7fc07f;
|
||||
text-decoration: none;
|
||||
}
|
||||
.common hr {
|
||||
border-color: #808080;
|
||||
}
|
||||
.common a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.common, .machine {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
|
||||
font-size: 15px;
|
||||
}
|
||||
.machine {
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
.c1pjs {
|
||||
overflow: visible;
|
||||
}
|
||||
.machine-placeholder {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.machine-floating {
|
||||
position: relative;
|
||||
z-index: auto;
|
||||
background-color: transparent;
|
||||
padding-right: 0;
|
||||
}
|
||||
.machine-sticky {
|
||||
position: fixed !important;
|
||||
z-index: 1 !important;
|
||||
background-color: #404040 !important;
|
||||
padding-right: 16px !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
.common-top {
|
||||
background: #202020;
|
||||
font-size: small;
|
||||
}
|
||||
.common-top-left {
|
||||
float: left;
|
||||
width: 60%;
|
||||
}
|
||||
.common-top-left ul {
|
||||
line-height: 1.5em;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 1em 1em 1em 9px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.common-top-left ul li {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
.common-top-left ul li a {
|
||||
border-right: 1px solid #6f6f6f;
|
||||
padding: 2px 6px 2px 6px;
|
||||
}
|
||||
.common-top-left ul li:last-child a {
|
||||
border-right: none;
|
||||
}
|
||||
.common-top-right {
|
||||
float: right;
|
||||
width: 40%;
|
||||
}
|
||||
.common-top-right p {
|
||||
float: right;
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
}
|
||||
.common-middle {
|
||||
clear: both;
|
||||
padding: 1px 1em 1px 1em;
|
||||
background: #404040;
|
||||
}
|
||||
.common-sidebar {
|
||||
float: left;
|
||||
font-size: small;
|
||||
width: 140px;
|
||||
padding-bottom: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.common-list {
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list li {
|
||||
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
.common-list-data {
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list-data li {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
.common-list-data-items, .common-list-data-subitems {
|
||||
font-size: x-small;
|
||||
list-style-type: none;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 2em;
|
||||
}
|
||||
.common-list-data-items li, .common-list-data-subitems li {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.common-main {
|
||||
margin-left: 150px;
|
||||
|
||||
}
|
||||
.common-main blockquote {
|
||||
text-align: justify;
|
||||
}
|
||||
.common-image-gallery {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
.common-image-gallery:after {
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
||||
.common-image-frame {
|
||||
display: inline-block;
|
||||
margin: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.common-image-link {
|
||||
padding: 5px;
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
background-color: #FAEBD7;
|
||||
}
|
||||
.common-image-label {
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-bottom {
|
||||
clear: both;
|
||||
padding-top: 1em;
|
||||
}
|
||||
.common-bottom:after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.common-reference {
|
||||
float: left;
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-reference a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.common-copyright {
|
||||
float: right;
|
||||
font-size: x-small;
|
||||
}
|
||||
.common-copyright a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.md-list {
|
||||
}
|
||||
.md-list li {
|
||||
line-height: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.md-list li p {
|
||||
padding-left: 2em;
|
||||
}
|
||||
.md-list-compact {
|
||||
}
|
||||
.md-list-compact li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.md-list-none {
|
||||
list-style-type: none;
|
||||
padding-left: 2em;
|
||||
}
|
||||
.md-list-none li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@media screen and (max-width: 900px) {
|
||||
|
||||
.common-sidebar {
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
}
|
||||
.common-list {
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-list-data {
|
||||
padding-left: 0;
|
||||
}
|
||||
.common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li {
|
||||
width: 130px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
padding-right: 1em;
|
||||
margin-top: 0;
|
||||
}
|
||||
.common-list-data-subitems {
|
||||
display: none;
|
||||
}
|
||||
.common-main {
|
||||
clear: both;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.md-list-none {
|
||||
padding-left: 1em;
|
||||
}
|
||||
}
|
||||
58
versions/pcx86/1.37.0/common.xsl
Normal file
58
versions/pcx86/1.37.0/common.xsl
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY ne "≠"> <!ENTITY le "≤"> <!ENTITY ge "≥">
|
||||
<!ENTITY times "×"> <!ENTITY sdot "⋅"> <!ENTITY divide "÷">
|
||||
<!ENTITY copy "©"> <!ENTITY Sigma "Σ"> <!ENTITY sigma "σ"> <!ENTITY sum "∑"> <!ENTITY lbrace "{">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template name="commonStyles">
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/versions/icons/current/pc-icon-57.png"/>
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/versions/icons/current/pc-icon-72.png"/>
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/versions/icons/current/pc-icon-76.png"/>
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/versions/icons/current/pc-icon-114.png"/>
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/versions/icons/current/pc-icon-120.png"/>
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/versions/icons/current/pc-icon-144.png"/>
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/versions/icons/current/pc-icon-152.png"/>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/versions/icons/current/pc-icon-180.png"/>
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="/versions/icons/current/pc-icon-192.png"/>
|
||||
<link rel="apple-touch-icon" href="/versions/icons/current/apple-touch-icon.png"/>
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/versions/icons/current/pc-icon-192.png"/>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/versions/icons/current/favicon.ico"/>
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pcx86/1.37.0/common.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="commonTop">
|
||||
<div class="common-top">
|
||||
<div class="common-top-left">
|
||||
<ul>
|
||||
<li><a href="/">PCjs</a></li>
|
||||
<li><a href="/blog/">Blog</a></li>
|
||||
<li><a href="/apps/">Apps</a></li>
|
||||
<li><a href="/devices/">Devices</a></li>
|
||||
<li><a href="/disks/">Disks</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
<li><a href="/docs/about/">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-top-right">
|
||||
<p>Powered by <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">JavaScript</a>, <a href="http://vanilla-js.com/" target="_blank">Vanilla JS</a>, and <a href="http://github.com/jeffpar/pcjs" target="_blank">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="commonBottom">
|
||||
<div class="common-bottom">
|
||||
<p class="common-reference"></p>
|
||||
<p class="common-copyright">
|
||||
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> © 2012-2017 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
|
||||
<span class="common-copyright"><a href="http://github.com/jeffpar/pcjs">PCjs Project</a> released under <a href="http://gnu.org/licenses/gpl.html">GPLv3</a></span>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
262
versions/pcx86/1.37.0/components.css
Normal file
262
versions/pcx86/1.37.0/components.css
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
|
||||
*:not(input,textarea) {
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.pcjs-embed {
|
||||
}
|
||||
.pcjs-embed:after {
|
||||
clear:both;
|
||||
}
|
||||
.pcjs-machine {
|
||||
}
|
||||
.pcjs-name, .pcjs-menu {
|
||||
clear: both;
|
||||
font-weight: bold;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
.pcjs-menu {
|
||||
float: left;
|
||||
}
|
||||
.pcjs-canvas {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.pcjs-container {
|
||||
color: #000000;
|
||||
position: relative;
|
||||
}
|
||||
.pcjs-label {
|
||||
font-size: small;
|
||||
line-height: 20px;
|
||||
vertical-align: middle;
|
||||
float: left;
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
}
|
||||
.pcjs-controls textarea {
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: x-small;
|
||||
}
|
||||
.pcjs-fieldset {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.pcjs-flag {
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.pcjs-progress {
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
margin-top: 8px;
|
||||
border: 1px solid black;
|
||||
position: relative;
|
||||
}
|
||||
.pcjs-progress-bar {
|
||||
height: 20px;
|
||||
width: 0;
|
||||
background-color: gold;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
.pcjs-progress-text {
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
font-size: small;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.pcjs-register {
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
vertical-align: middle;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.pcjs-switches {
|
||||
float: left;
|
||||
}
|
||||
.pcjs-bitBucket {
|
||||
float: left;
|
||||
width: 19px;
|
||||
height: 38px;
|
||||
}
|
||||
.pcjs-bitCell {
|
||||
float: left;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
margin-right: -1px;
|
||||
margin-bottom: -1px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
line-height: 19px;
|
||||
}
|
||||
.pcjs-bitCellLeft {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
.pcjs-bitLabel {
|
||||
font-size: xx-small;
|
||||
text-align: center;
|
||||
}
|
||||
.pcjs-description, .pcjs-status {
|
||||
font-size: x-small;
|
||||
line-height: 2.0em;
|
||||
}
|
||||
.pcjs-key {
|
||||
border: 1px solid black;
|
||||
font-size: x-small;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.pcjs-panel-group {
|
||||
color: #ffffff;
|
||||
background-color: #404040;
|
||||
}
|
||||
.pcjs-triplet {
|
||||
padding: 1px;
|
||||
}
|
||||
.pcjs-ledlbl {
|
||||
text-align: center;
|
||||
font-size: 40%;
|
||||
background-color: #000000;
|
||||
}
|
||||
.pcjs-ledlbl0 {
|
||||
text-align: right;
|
||||
font-size: 50%;
|
||||
background-color: #8d4076;
|
||||
}
|
||||
.pcjs-ledlbl1 {
|
||||
text-align: right;
|
||||
font-size: 50%;
|
||||
background-color: #d83662;
|
||||
}
|
||||
.pcjs-ledpad {
|
||||
text-align: center;
|
||||
font-size: x-small;
|
||||
line-height: 32px;
|
||||
background-color: #000000;
|
||||
border-bottom-left-radius: 20%;
|
||||
border-bottom-right-radius: 20%;
|
||||
}
|
||||
.pcjs-led {
|
||||
float: left;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 4px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #000000;
|
||||
}
|
||||
.pcjs-rled {
|
||||
float: left;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 4px;
|
||||
border: 1px solid black;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #ff0000;
|
||||
max-width: 50%;
|
||||
max-height: 50%;
|
||||
}
|
||||
.pcjs-swlbl {
|
||||
text-align: center;
|
||||
font-size: 40%;
|
||||
line-height: 16px;
|
||||
background-color: #000000;
|
||||
border-top-left-radius: 20%;
|
||||
border-top-right-radius: 20%;
|
||||
}
|
||||
.pcjs-swpad {
|
||||
height: 32px;
|
||||
background-color: #000000;
|
||||
}
|
||||
.pcjs-switch {
|
||||
height: 10px;
|
||||
width: 28px;
|
||||
margin-top: 0;
|
||||
max-width: 90%;
|
||||
background-color: #00ff00;
|
||||
}
|
||||
.pcjs-screen {
|
||||
clear: both;
|
||||
height: auto;
|
||||
position: relative;
|
||||
line-height: 0;
|
||||
}
|
||||
.pcjs-screen textarea {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
resize: none;
|
||||
color: white;
|
||||
font-family: Monaco, "Lucida Console", monospace;
|
||||
font-size: medium;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
opacity: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
.pcjs-reference {
|
||||
float: left;
|
||||
font-size: x-small;
|
||||
}
|
||||
.pcjs-reference a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.pcjs-copyright {
|
||||
float: right;
|
||||
font-size: x-small;
|
||||
}
|
||||
.pcjs-copyright a {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.pcjs-textarea {
|
||||
width: 100% !important;
|
||||
}
|
||||
.pcjs-registers {
|
||||
width: 100% !important;
|
||||
max-width: none !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.pdp11-device {
|
||||
width: 98% !important;
|
||||
max-width: none !important;
|
||||
margin-left: 8px !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1200px) {
|
||||
.machine-left {
|
||||
max-width: 48%;
|
||||
float: left;
|
||||
}
|
||||
.machine-right {
|
||||
max-width: 48%;
|
||||
float: left;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.machine-right + * {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
1420
versions/pcx86/1.37.0/components.xsl
Normal file
1420
versions/pcx86/1.37.0/components.xsl
Normal file
File diff suppressed because it is too large
Load diff
162
versions/pcx86/1.37.0/document.css
Normal file
162
versions/pcx86/1.37.0/document.css
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
.page {
|
||||
margin: 2% 2%;
|
||||
padding: 2% 2%;
|
||||
min-width: 30em;
|
||||
overflow: auto;
|
||||
font-size: large;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
background: #303030;
|
||||
color: #ccc;
|
||||
|
||||
}
|
||||
.page-header {
|
||||
}
|
||||
.page-header-title {
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.page a {
|
||||
color: #7fc07f;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footlink, a.paralink {
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footlink:link, a.paralink:link {
|
||||
color: blue;
|
||||
}
|
||||
a.footlink:visited, a.paralink:visited {
|
||||
color: blue;
|
||||
}
|
||||
.galleryitem {
|
||||
float: left;
|
||||
width: 200px;
|
||||
}
|
||||
.item {
|
||||
float: left;
|
||||
width: 2em;
|
||||
text-indent: 1em;
|
||||
}
|
||||
.list {
|
||||
margin-left: 3em;
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
div.pnumber {
|
||||
float: left;
|
||||
width: 2em;
|
||||
text-indent: 1em;
|
||||
}
|
||||
div.pitem {
|
||||
margin-left: 10em;
|
||||
}
|
||||
p.indent, .justified p {
|
||||
text-indent: 2em;
|
||||
text-align: justify;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
p.noindent {
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
p.center, .center {
|
||||
text-align: center;
|
||||
}
|
||||
li.para {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
blockquote.tag {
|
||||
font-size: small;
|
||||
font-family: Monaco, Fixed, monospace;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.blockquote {
|
||||
padding-left: 1em;
|
||||
text-indent: 0;
|
||||
text-align: justify;
|
||||
}
|
||||
.italics {
|
||||
font-style: italic;
|
||||
}
|
||||
.medium {
|
||||
font-size: medium;
|
||||
}
|
||||
.small {
|
||||
font-size: x-small;
|
||||
}
|
||||
.smallcaps {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
.strike {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.summation, .bracelist {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5ex;
|
||||
text-indent: 0;
|
||||
}
|
||||
.bracelist-symbol {
|
||||
font-size: 3em;
|
||||
vertical-align: -40%;
|
||||
}
|
||||
.summation .summation-lower, .summation .summation-upper, .bracelist-item {
|
||||
display: block;
|
||||
font-size: 75%;
|
||||
text-align: center;
|
||||
}
|
||||
.summation .summation-upper {
|
||||
margin-bottom: 0;
|
||||
margin-left: 0.8ex;
|
||||
font-style: italic;
|
||||
}
|
||||
.summation .summation-lower{
|
||||
margin-bottom: -0.6ex;
|
||||
font-style: italic;
|
||||
}
|
||||
.summation .summation-symbol {
|
||||
font-size: 2em;
|
||||
}
|
||||
p sup {
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
bottom: .5em;
|
||||
font-size: small;
|
||||
}
|
||||
p sub {
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
bottom: -.5em;
|
||||
font-size: small;
|
||||
}
|
||||
.footnote {
|
||||
font-size: medium;
|
||||
text-indent: 1em;
|
||||
text-align: justify;
|
||||
margin-top: .5em;
|
||||
}
|
||||
.image-right {
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.image-caption {
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
452
versions/pcx86/1.37.0/document.xsl
Normal file
452
versions/pcx86/1.37.0/document.xsl
Normal file
|
|
@ -0,0 +1,452 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY ne "≠"> <!ENTITY le "≤"> <!ENTITY ge "≥">
|
||||
<!ENTITY times "×"> <!ENTITY sdot "⋅"> <!ENTITY divide "÷">
|
||||
<!ENTITY copy "©"> <!ENTITY Sigma "Σ"> <!ENTITY sigma "σ"> <!ENTITY sum "∑"> <!ENTITY lbrace "{">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template name="documentStyles">
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pcx86/1.37.0/document.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="title">
|
||||
<h1><xsl:apply-templates/></h1>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="p">
|
||||
<xsl:if test="@id">
|
||||
<a name="{@id}"></a>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@class)">
|
||||
<p><xsl:apply-templates/></p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p class="{@class}"><xsl:apply-templates/></p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p">
|
||||
<xsl:call-template name="p"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="br">
|
||||
<br/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p[@number]">
|
||||
<div class="pnumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@number) or @number = ''"> </xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div class="pitem">
|
||||
<xsl:call-template name="p"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="span">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@class)">
|
||||
<span><xsl:apply-templates/></span>
|
||||
</xsl:when>
|
||||
<xsl:when test="@class = 'italics'">
|
||||
<em><xsl:apply-templates/></em>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span class="{@class}"><xsl:apply-templates/></span>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h2">
|
||||
<h2><xsl:apply-templates/></h2>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h3">
|
||||
<h3><xsl:apply-templates/></h3>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h4">
|
||||
<h4><xsl:apply-templates/></h4>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h5">
|
||||
<h5><xsl:apply-templates/></h5>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="h6">
|
||||
<h6><xsl:apply-templates/></h6>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="em">
|
||||
<em><xsl:apply-templates/></em>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="strong">
|
||||
<strong><xsl:apply-templates/></strong>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="a">
|
||||
<a href="{@href}" target="{@target}"><xsl:apply-templates/></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol">
|
||||
<blockquote><ol><xsl:apply-templates/></ol></blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ul">
|
||||
<blockquote><ul><xsl:apply-templates/></ul></blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="li">
|
||||
<li><xsl:apply-templates/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="img">
|
||||
<div><img src="{@src}" alt="image"/></div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pre">
|
||||
<pre><xsl:apply-templates/></pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="figure">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@pos">
|
||||
<div class="{@pos}"><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sub">
|
||||
<sub><xsl:apply-templates/></sub>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sup">
|
||||
<sup><xsl:apply-templates/></sup>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="lt"><</xsl:template>
|
||||
<xsl:template match="gt">></xsl:template>
|
||||
<xsl:template match="ne">≠</xsl:template>
|
||||
<xsl:template match="le">≤</xsl:template>
|
||||
<xsl:template match="ge">≥</xsl:template>
|
||||
<xsl:template match="times">×</xsl:template>
|
||||
<xsl:template match="dot">⋅</xsl:template>
|
||||
<xsl:template match="divide">÷</xsl:template>
|
||||
<xsl:template match="sigma">σ</xsl:template>
|
||||
|
||||
<xsl:template match="summation">
|
||||
<span class="summation">
|
||||
<span class="summation-upper"><xsl:value-of select="@upper"/></span>
|
||||
<span class="summation-symbol">∑</span>
|
||||
<span class="summation-lower"><xsl:value-of select="@lower"/></span>
|
||||
</span>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bracelist">
|
||||
<span class="bracelist-symbol">{</span>
|
||||
<span class="bracelist">
|
||||
<xsl:for-each select="item">
|
||||
<span class="bracelist-item"><xsl:apply-templates/></span>
|
||||
</xsl:for-each>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="footlink">
|
||||
<xsl:variable name="docID" select="/document/@id"/>
|
||||
<a class="footlink" id="fn{$docID}_ref{@n}" href="#fn{$docID}_{@n}"><sup><xsl:if test="@quoted"><xsl:text>[</xsl:text></xsl:if><xsl:value-of select="@n"/><xsl:if test="@quoted"><xsl:text>]</xsl:text></xsl:if></sup></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="footnote">
|
||||
<xsl:variable name="docID" select="/document/@id"/>
|
||||
<div class="footnote"><a id="fn{$docID}_{@n}" href="#fn{$docID}_ref{@n}"><sup><xsl:value-of select="@n"/></sup></a><xsl:text> </xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="authors">
|
||||
<xsl:for-each select="author"><xsl:if test="position() != 1"><xsl:text>, </xsl:text></xsl:if><xsl:if test="position() != 1 and position() = last()"><xsl:text>and </xsl:text></xsl:if><xsl:value-of select="."/></xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="formatDate">
|
||||
<xsl:param name="date"/>
|
||||
<xsl:param name="format">MDY</xsl:param>
|
||||
<xsl:variable name="year">
|
||||
<xsl:value-of select="substring-before($date,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="mon-day">
|
||||
<xsl:value-of select="substring-after($date,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="mon">
|
||||
<xsl:value-of select="substring-before($mon-day,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="full-day">
|
||||
<xsl:value-of select="substring-after($mon-day,'-')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="day">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring($full-day,1,1) = '0'"><xsl:value-of select="substring($full-day,2)"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$full-day"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mon = '01'">January </xsl:when>
|
||||
<xsl:when test="$mon = '02'">February </xsl:when>
|
||||
<xsl:when test="$mon = '03'">March </xsl:when>
|
||||
<xsl:when test="$mon = '04'">April </xsl:when>
|
||||
<xsl:when test="$mon = '05'">May </xsl:when>
|
||||
<xsl:when test="$mon = '06'">June </xsl:when>
|
||||
<xsl:when test="$mon = '07'">July </xsl:when>
|
||||
<xsl:when test="$mon = '08'">August </xsl:when>
|
||||
<xsl:when test="$mon = '09'">September </xsl:when>
|
||||
<xsl:when test="$mon = '10'">October </xsl:when>
|
||||
<xsl:when test="$mon = '11'">November </xsl:when>
|
||||
<xsl:when test="$mon = '12'">December </xsl:when>
|
||||
<xsl:when test="$mon = '00'"/> </xsl:choose>
|
||||
<xsl:if test="$day != '0' and $format = 'MDY'">
|
||||
<xsl:value-of select="$day"/><xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="$year"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="gallery">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
<div class="gallery">
|
||||
<xsl:apply-templates select="item" mode="gallery"/>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="gallery">
|
||||
<div class="galleryitem">
|
||||
<a href="{@ref}"><img src="/versions/images/current/pdf-192.jpg" alt="{.}"/></a><br/>
|
||||
<div style="font-size:small; text-align:center;"><xsl:value-of select="."/></div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'timeline']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>Timeline</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="timeline"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="timeline">
|
||||
<xsl:if test="@ref">
|
||||
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($documentFile)/document" mode="withDate">
|
||||
<xsl:with-param name="itemRef" select="@ref"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@ref)">
|
||||
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="@date"/></xsl:call-template></h3>
|
||||
<blockquote>
|
||||
<xsl:value-of select="."/>
|
||||
</blockquote>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'people']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>People</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="people"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="people">
|
||||
<h3><xsl:value-of select="name"/></h3>
|
||||
<xsl:apply-templates select="list"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'documents']">
|
||||
<xsl:if test="description"><h2><xsl:value-of select="description"/></h2></xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="item" mode="document"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="document">
|
||||
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
|
||||
<xsl:apply-templates select="document($documentFile)/document">
|
||||
<xsl:with-param name="itemRef" select="@ref"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="document">
|
||||
<xsl:param name="itemRef"/>
|
||||
<li>
|
||||
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/></xsl:call-template>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="document" mode="withDate">
|
||||
<xsl:param name="itemRef"/>
|
||||
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="date"/><xsl:with-param name="format" select="MY"/></xsl:call-template></h3>
|
||||
<blockquote>
|
||||
<p>
|
||||
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/><xsl:with-param name="multiLine" select="'true'"/></xsl:call-template>
|
||||
</p>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="documentSummary">
|
||||
<xsl:param name="itemRef"/>
|
||||
<xsl:param name="multiLine">false</xsl:param>
|
||||
<xsl:choose>
|
||||
<xsl:when test="content|include">
|
||||
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
|
||||
<xsl:if test="@ref">
|
||||
<span class="small">
|
||||
<xsl:text> [</xsl:text><a href="{@ref}">Original</a><xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="copy">
|
||||
<span class="small">
|
||||
<xsl:text> [</xsl:text><a href="{copy/@ref}"><xsl:value-of select="copy"/></a><xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
<xsl:if test="author"><xsl:if test="$multiLine = 'true'"><br/></xsl:if><span class="medium"><xsl:text> by </xsl:text><xsl:call-template name="authors"/></span></xsl:if>
|
||||
<xsl:if test="source">
|
||||
<span class="small">
|
||||
<br/>
|
||||
<xsl:text>[Source: </xsl:text>
|
||||
<xsl:if test="site">
|
||||
<a href="{site/@url}"><xsl:value-of select="site"/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(site)">
|
||||
<a href="{source/@url}"><xsl:value-of select="source"/></a>
|
||||
</xsl:if>
|
||||
<xsl:text>]</xsl:text>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'resources']">
|
||||
<xsl:if test="not(description)">
|
||||
<h2>Resources</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item" mode="resources"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="resources">
|
||||
<h3><xsl:value-of select="description"/></h3>
|
||||
<xsl:apply-templates select="list"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[@type = 'links']">
|
||||
<xsl:if test="description">
|
||||
<h4><xsl:value-of select="description"/></h4>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="item" mode="links"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="links">
|
||||
<li><a href="{@ref}"><xsl:value-of select="."/></a></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list[not(@type)]">
|
||||
<xsl:if test="description">
|
||||
<h2><xsl:value-of select="description"/></h2>
|
||||
</xsl:if>
|
||||
<blockquote>
|
||||
<xsl:apply-templates select="item|tag" mode="outer"/>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="outer">
|
||||
<xsl:if test="description">
|
||||
<h3><xsl:value-of select="description"/></h3>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="list|item|tag" mode="inner"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list" mode="inner">
|
||||
<xsl:if test="description">
|
||||
<h4><xsl:value-of select="description"/></h4>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="innerlist">
|
||||
<xsl:if test="description">
|
||||
<xsl:value-of select="description"/>
|
||||
</xsl:if>
|
||||
<ul>
|
||||
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item" mode="inner">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@ref">
|
||||
<li><a href="{@ref}"><xsl:apply-templates/></a></li>
|
||||
</xsl:when>
|
||||
<xsl:when test="description">
|
||||
<li><xsl:call-template name="innerlist"/></li>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<li><xsl:apply-templates/></li>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="para" mode="inner">
|
||||
<li class="para"><xsl:apply-templates/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tag" mode="outer">
|
||||
<xsl:call-template name="tag"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tag" mode="inner">
|
||||
<xsl:call-template name="tag"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="tag">
|
||||
<blockquote class="tag">
|
||||
<xsl:text><</xsl:text><xsl:if test="@href"><a href="{@href}"><xsl:value-of select="@name"/></a></xsl:if><xsl:if test="not(@href)"><xsl:value-of select="@name"/></xsl:if><xsl:for-each select="attr"><xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text>="</xsl:text><xsl:value-of select="@value"/><xsl:text>"</xsl:text></xsl:for-each>
|
||||
<xsl:choose>
|
||||
<xsl:when test="tag"><xsl:text>></xsl:text><xsl:apply-templates mode="inner"/><xsl:text></</xsl:text><xsl:value-of select="@name"/><xsl:text>></xsl:text></xsl:when>
|
||||
<xsl:when test="normalize-space(.) != ''"><xsl:text>></xsl:text><xsl:value-of select="."/><xsl:text></</xsl:text><xsl:value-of select="@name"/><xsl:text>></xsl:text></xsl:when>
|
||||
<xsl:otherwise><xsl:text>/></xsl:text></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</blockquote>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
61
versions/pcx86/1.37.0/machine.xsl
Normal file
61
versions/pcx86/1.37.0/machine.xsl
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/pcx86/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/pcx86/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/machine">
|
||||
<xsl:variable name="machineType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@class = 'pc' or @class = 'c1p'"><xsl:value-of select="@class"/>js</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<p></p>
|
||||
<div id="{@id}" class="machine {$machineType} {$machineClass}">
|
||||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="@id"/>
|
||||
<xsl:with-param name="component" select="'machine'"/>
|
||||
<xsl:with-param name="class" select="$machineClass"/>
|
||||
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="debugger"><xsl:value-of select="$machineType"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineType"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
247
versions/pcx86/1.37.0/manifest.xsl
Normal file
247
versions/pcx86/1.37.0/manifest.xsl
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2014-04-10" modified="2014-04-10" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/pcx86/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/pcx86/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/manifest[@type = 'document']">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<h4>Document Manifest</h4>
|
||||
<div class="common-sidebar">
|
||||
<ul class="common-list-data">
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Title'"/>
|
||||
<xsl:with-param name="node" select="title"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Version'"/>
|
||||
<xsl:with-param name="node" select="version"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Source'"/>
|
||||
<xsl:with-param name="node" select="source"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Documents'"/>
|
||||
<xsl:with-param name="node" select="document"/>
|
||||
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-main">
|
||||
<p><xsl:value-of select="desc"/></p>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/manifest[@type = 'software' or not(@type)]">
|
||||
<xsl:variable name="machineClass">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$APPCLASS"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<xsl:call-template name="commonTop"/>
|
||||
<div class="common-middle">
|
||||
<h4>Software Manifest</h4>
|
||||
<div class="common-sidebar">
|
||||
<ul class="common-list-data">
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Title'"/>
|
||||
<xsl:with-param name="node" select="title"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Version'"/>
|
||||
<xsl:with-param name="node" select="version"/>
|
||||
<xsl:with-param name="default">Unknown</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Type'"/>
|
||||
<xsl:with-param name="node" select="type"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Category'"/>
|
||||
<xsl:with-param name="node" select="category"/>
|
||||
<xsl:with-param name="default">None</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Created'"/>
|
||||
<xsl:with-param name="node" select="creationDate"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Creators'"/>
|
||||
<xsl:with-param name="node" select="creator"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label"><xsl:if test="creationDate">Updated</xsl:if><xsl:if test="not(creationDate)">Released</xsl:if></xsl:with-param>
|
||||
<xsl:with-param name="node" select="releaseDate"/>
|
||||
<xsl:with-param name="default">Unknown</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Company'"/>
|
||||
<xsl:with-param name="node" select="company"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Authors'"/>
|
||||
<xsl:with-param name="node" select="author"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Contributors'"/>
|
||||
<xsl:with-param name="node" select="contributor"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Publisher'"/>
|
||||
<xsl:with-param name="node" select="publisher"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'License'"/>
|
||||
<xsl:with-param name="node" select="license"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Source'"/>
|
||||
<xsl:with-param name="node" select="source"/>
|
||||
<xsl:with-param name="default" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="listItem">
|
||||
<xsl:with-param name="label" select="'Disks'"/>
|
||||
<xsl:with-param name="node" select="disk"/>
|
||||
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-main">
|
||||
<xsl:for-each select="machine[not(@type) or @type = 'default']">
|
||||
<xsl:call-template name="machine">
|
||||
<xsl:with-param name="href" select="@href"/>
|
||||
<xsl:with-param name="state" select="@state"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not(machine[not(@type) or @type = 'default'])">
|
||||
<p>No default machine specified for '<xsl:value-of select="title"/>' in manifest.xml</p>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="commonBottom"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="listItem">
|
||||
<xsl:param name="label"/>
|
||||
<xsl:param name="node"/>
|
||||
<xsl:param name="default">Unknown</xsl:param>
|
||||
<xsl:if test="$node != '' or $default != ''">
|
||||
<li><xsl:value-of select="$label"/>
|
||||
<ul class="common-list-data-items">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:variable name="desc">
|
||||
<xsl:choose>
|
||||
<xsl:when test="desc"><xsl:value-of select="desc"/></xsl:when>
|
||||
<xsl:when test="org"><xsl:value-of select="org"/></xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<li title="{$desc}">
|
||||
<xsl:variable name="value">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name">
|
||||
<xsl:value-of select="name"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="normalize-space(./text()) != ''">
|
||||
<xsl:value-of select="normalize-space(./text())"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$default"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="href">
|
||||
<xsl:if test="@href"><xsl:value-of select="@href"/></xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$href != ''">
|
||||
<a href="{$href}"><xsl:value-of select="$value"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$value"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="page">
|
||||
<ul class="common-list-data-subitems">
|
||||
<xsl:for-each select="page">
|
||||
<li>
|
||||
<xsl:if test="@href">
|
||||
<a href="{$href}{@href}"><xsl:value-of select="."/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@href)">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not($node)">
|
||||
<xsl:if test="@href">
|
||||
<a href="{@href}"><xsl:value-of select="$default"/></a>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@href)">
|
||||
<xsl:value-of select="$default"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</ul>
|
||||
</li>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
47
versions/pcx86/1.37.0/outline.xsl
Normal file
47
versions/pcx86/1.37.0/outline.xsl
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " "> <!ENTITY sect "§"> <!ENTITY copy "©"> <!ENTITY para "¶"> <!ENTITY ndash "–"> <!ENTITY mdash "—">
|
||||
<!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡">
|
||||
]>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output doctype-system="about:legacy-compat" method="html"/>
|
||||
|
||||
<xsl:include href="/versions/pcx86/1.37.0/common.xsl"/>
|
||||
<xsl:include href="/versions/pcx86/1.37.0/document.xsl"/>
|
||||
<xsl:include href="/versions/pcx86/1.37.0/components.xsl"/>
|
||||
|
||||
<xsl:template match="/outline">
|
||||
<xsl:variable name="machineType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="machine/@type"><xsl:value-of select="machine/@type"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$MACHINETYPE"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/></title>
|
||||
<xsl:call-template name="commonStyles"/>
|
||||
<xsl:call-template name="documentStyles"/>
|
||||
<xsl:call-template name="componentStyles"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="common">
|
||||
<div class="page justified">
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="componentScripts">
|
||||
<xsl:with-param name="component">
|
||||
<xsl:choose>
|
||||
<xsl:when test="debugger"><xsl:value-of select="$machineType"/>-dbg</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$machineType"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Loading…
Reference in a new issue