Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
royaltm committed Jan 3, 2024
1 parent 8d61da5 commit 6d9ee54
Show file tree
Hide file tree
Showing 29 changed files with 728 additions and 624 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG_md.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ <h2 id="label-ZXLib-3A">ZXLib:<span><a href="#label-ZXLib-3A">&para;</a> <a href
<p>Internal labels <code>preshift_p</code>, <code>pmask_in_e</code>, <code>px_bsh_in_ae</code> added to <a href="ZXLib/Gfx/Draw/Macros.html"><code>ZXLib::Gfx::Draw::Macros</code></a> for convenience and alternative entry points.</p>
</li><li>
<p>New routines in <a href="ZXLib/Gfx/Draw/Macros.html"><code>ZXLib::Gfx::Draw::Macros</code></a> for updating draw line functions in place.</p>
</li><li>
<p>New macro <a href="Z80/MathInt/Macros.html#method-i-mul8_signed"><code>Z80::MathInt::Macros#mul8_signed</code></a>.</p>
</li><li>
<p>Saved 1 cycle on macro <a href="Z80/MathInt/Macros.html#method-i-mul"><code>Z80::MathInt::Macros#mul</code></a>.</p>
</li></ul>

<h1 id="label-v1.1.0">v1.1.0<span><a href="#label-v1.1.0">&para;</a> <a href="#top">&uarr;</a></span></h1>
Expand Down
6 changes: 3 additions & 3 deletions Z80.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ <h3>Public Instance Methods</h3>

<span class="ruby-keyword">unless</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">zero?</span>
<span class="ruby-identifier">relocs</span> = <span class="ruby-identifier">reloc</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-constant">Integer</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">size</span> <span class="ruby-keyword">and</span> (<span class="ruby-identifier">d</span>.<span class="ruby-identifier">addr</span><span class="ruby-operator">...</span><span class="ruby-identifier">d</span>.<span class="ruby-identifier">addr</span><span class="ruby-operator">+</span><span class="ruby-identifier">d</span>.<span class="ruby-identifier">size</span>).<span class="ruby-identifier">member?</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">addr</span> }
.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">alloc</span>.<span class="ruby-identifier">to_s</span>}
.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;, &#39;</span>)
.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">alloc</span>.<span class="ruby-identifier">to_s</span>}
.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;, &#39;</span>)
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">relocs</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-identifier">label</span> = <span class="ruby-identifier">label</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot; -&gt; #{relocs}&quot;</span>
<span class="ruby-keyword">end</span>
Expand All @@ -449,7 +449,7 @@ <h3>Public Instance Methods</h3>
[<span class="ruby-value">?-</span>, <span class="ruby-operator">-</span><span class="ruby-identifier">v</span>]
<span class="ruby-keyword">else</span>
[<span class="ruby-value">?+</span>, <span class="ruby-identifier">v</span>]
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">when</span> <span class="ruby-value">:byte</span>
<span class="ruby-identifier">data</span>[<span class="ruby-identifier">o</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">unpack</span>(<span class="ruby-string">&#39;C&#39;</span>)[<span class="ruby-value">0</span>]
<span class="ruby-keyword">when</span> <span class="ruby-value">:pcrel</span>
Expand Down
62 changes: 31 additions & 31 deletions Z80/Alloc.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ <h3>Public Class Methods</h3>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;lhs nor rhs must not be a pointer&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">lhs</span>.<span class="ruby-identifier">pointer?</span> <span class="ruby-keyword">or</span> (<span class="ruby-identifier">rhs</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:pointer?</span>) <span class="ruby-keyword">and</span> <span class="ruby-identifier">rhs</span>.<span class="ruby-identifier">pointer?</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;invalid operator&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">oper</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> [<span class="ruby-value">:+</span>,<span class="ruby-value">:-</span>,<span class="ruby-value">:+@</span>,<span class="ruby-value">:-@</span>,<span class="ruby-value">:&gt;&gt;</span>,<span class="ruby-value">:&lt;&lt;</span>,<span class="ruby-value">:/</span>,<span class="ruby-value">:%</span>,<span class="ruby-value">:*</span>,<span class="ruby-value">:^</span>,<span class="ruby-value">:&amp;</span>,<span class="ruby-value">:|</span>,<span class="ruby-value">:~</span>,<span class="ruby-value">:alias</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">oper</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;invalid operator&#39;s rhs&quot;</span> <span class="ruby-keyword">unless</span> (<span class="ruby-identifier">rhs</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">and</span> (<span class="ruby-identifier">oper</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> [<span class="ruby-value">:+@</span>,<span class="ruby-value">:-@</span>,<span class="ruby-value">:~</span>,<span class="ruby-value">:alias</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">oper</span>))) <span class="ruby-keyword">or</span>
(<span class="ruby-operator">!</span><span class="ruby-identifier">oper</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">and</span> <span class="ruby-operator">!</span><span class="ruby-identifier">rhs</span>.<span class="ruby-identifier">nil?</span>)
(<span class="ruby-operator">!</span><span class="ruby-identifier">oper</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">and</span> <span class="ruby-operator">!</span><span class="ruby-identifier">rhs</span>.<span class="ruby-identifier">nil?</span>)
<span class="ruby-identifier">xalias</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">oper</span> <span class="ruby-operator">==</span> <span class="ruby-value">:alias</span>
<span class="ruby-identifier">oper</span> = <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">true</span>
Expand Down Expand Up @@ -726,39 +726,39 @@ <h3>Public Instance Methods</h3>

<div class="method-source-code" id="5B-5D-source">
<pre><span class="ruby-comment"># File lib/z80/labels.rb, line 1484</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]</span>(<span class="ruby-identifier">index</span> = <span class="ruby-keyword">nil</span>)
<span class="ruby-keyword">if</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">nil?</span>
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@pointer</span>
<span class="ruby-identifier">dup</span>
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;pointer not allowed from a sizeof&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@oper</span> <span class="ruby-operator">==</span> <span class="ruby-value">:+@</span>
<span class="ruby-constant">Alloc</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>).<span class="ruby-identifier">tap</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-string">&#39;@pointer&#39;</span>, <span class="ruby-keyword">true</span>) }
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]</span>(<span class="ruby-identifier">index</span> = <span class="ruby-keyword">nil</span>)
<span class="ruby-keyword">if</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">nil?</span>
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@pointer</span>
<span class="ruby-identifier">dup</span>
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;indexing is only allowed on a label&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">indexable?</span>
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@index</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-constant">Alloc</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>)
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">dup</span>
<span class="ruby-keyword">end</span>.<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">lix</span> = <span class="ruby-identifier">l</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-string">&#39;@index&#39;</span>)
<span class="ruby-keyword">case</span> <span class="ruby-identifier">index</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>, <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">lix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">to_s</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">Label</span>, <span class="ruby-constant">Alloc</span>
<span class="ruby-identifier">lix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">to_alloc</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">Integer</span>
<span class="ruby-keyword">if</span> <span class="ruby-constant">Integer</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">lix</span>.<span class="ruby-identifier">last</span>
<span class="ruby-identifier">lix</span>[<span class="ruby-value">-1</span>]<span class="ruby-operator">+=</span> <span class="ruby-identifier">index</span>
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">lix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">index</span>
<span class="ruby-keyword">end</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;pointer not allowed from a sizeof&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@oper</span> <span class="ruby-operator">==</span> <span class="ruby-value">:+@</span>
<span class="ruby-constant">Alloc</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>).<span class="ruby-identifier">tap</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-string">&#39;@pointer&#39;</span>, <span class="ruby-keyword">true</span>) }
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;indexing is only allowed on a label&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">indexable?</span>
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@index</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-constant">Alloc</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>)
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">dup</span>
<span class="ruby-keyword">end</span>.<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">lix</span> = <span class="ruby-identifier">l</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-string">&#39;@index&#39;</span>)
<span class="ruby-keyword">case</span> <span class="ruby-identifier">index</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>, <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">lix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">to_s</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">Label</span>, <span class="ruby-constant">Alloc</span>
<span class="ruby-identifier">lix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">to_alloc</span>
<span class="ruby-keyword">when</span> <span class="ruby-constant">Integer</span>
<span class="ruby-keyword">if</span> <span class="ruby-constant">Integer</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">lix</span>.<span class="ruby-identifier">last</span>
<span class="ruby-identifier">lix</span>[<span class="ruby-value">-1</span>]<span class="ruby-operator">+=</span> <span class="ruby-identifier">index</span>
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;invalid index&quot;</span>
<span class="ruby-identifier">lix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">index</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Syntax</span>, <span class="ruby-string">&quot;invalid index&quot;</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div>

</div>
Expand Down Expand Up @@ -1523,8 +1523,8 @@ <h3>Public Instance Methods</h3>
<div class="method-source-code" id="to_name-source">
<pre><span class="ruby-comment"># File lib/z80/labels.rb, line 1471</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_name</span>(<span class="ruby-identifier">info</span>=<span class="ruby-keyword">false</span>)
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@name</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@name</span>
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@lhs</span>.<span class="ruby-identifier">to_name</span>(<span class="ruby-identifier">info</span>) <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">expression?</span>
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@name</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@name</span>
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@lhs</span>.<span class="ruby-identifier">to_name</span>(<span class="ruby-identifier">info</span>) <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">expression?</span>
<span class="ruby-keyword">end</span></pre>
</div>

Expand Down
Loading

0 comments on commit 6d9ee54

Please sign in to comment.