Skip to content

Commit

Permalink
Copied over improved highlight.js implementation from vwf_dialogues +…
Browse files Browse the repository at this point in the history
… some small improvements to manual and syntax-highlighting
  • Loading branch information
RPGHacker committed Jul 14, 2023
1 parent 4d04c89 commit b9a1fe5
Show file tree
Hide file tree
Showing 652 changed files with 18,053 additions and 1,958 deletions.
9 changes: 6 additions & 3 deletions docs/changelog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
<head>
<title>Asar Changelog</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../shared/highlight_js/styles/default.css">
<script src="../shared/highlight_js/highlight.pack.js"></script>
<link rel="stylesheet" href="../shared/highlight_js_asar/styles/default.css"/>
<script src="../shared/highlight_js/highlight.min.js"></script>
<script src="../shared/highlight_js_asar/highlight_js_asar.js"></script>
<script>
hljs.configure(
{
tabReplace: ' ',
}
);
hljs.initHighlightingOnLoad();
hljs.highlightAll();

hljsAsar.init();

function toggle_visibility(id)
{
Expand Down
21 changes: 13 additions & 8 deletions docs/manual/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
<head>
<title>Asar User Manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../shared/highlight_js/styles/default.css">
<script src="../shared/highlight_js/highlight.pack.js"></script>
<link rel="stylesheet" href="../shared/highlight_js_asar/styles/default.css"/>
<script src="../shared/highlight_js/highlight.min.js"></script>
<script src="../shared/highlight_js_asar/highlight_js_asar.js"></script>
<script>
hljs.configure(
{
tabReplace: ' ',
}
);
hljs.initHighlightingOnLoad();
hljs.highlightAll();

hljsAsar.init();

function toggle_visibility(id)
{
Expand Down Expand Up @@ -508,7 +511,9 @@ <h4 id="standard-defines">Standard Defines</h4>
LSR $0000,x
LSR A
MVN $00,$00
(Note: destination, source)
MVP $00,$00
(Note: destination, source))
NOP
ORA #$00
ORA #$0000
Expand Down Expand Up @@ -1894,7 +1899,7 @@ <h4 id="arch-spc700-inline">The spc700-inline architecture</h4>
lda #(5+6)*2 ; the same as &quot;lda #22&quot;</code></pre>
Math statements in Asar support the following operators:<br/><br/>

<code>+ : Addition (Also valid as prefix, but a no-op)
<pre><code class="no-highlight">+ : Addition (Also valid as prefix, but a no-op)
- : Subtraction (Or negation prefix)
* : Multiplication
/ : Division
Expand All @@ -1905,8 +1910,8 @@ <h4 id="arch-spc700-inline">The spc700-inline architecture</h4>
| : Bitwise OR
^ : Bitwise XOR (Note: not exponentials)
~ : Bitwise NOT (Prefix)
&lt;: : Bitshift right 16, shorthand for isolating address bank (Prefix)
** : Exponentials (2**4 = 2*2*2*2 = pow(2, 4) in C)</code><br/><br/>
&lt;: : Bitshift right 16, shorthand for isolating address bank (Prefix)
** : Exponentials (2**4 = 2*2*2*2 = pow(2, 4) in C)</code></pre><br/>

Note that whitespace is not supported inside math statements, but the <a href="#multiline">multi-line operator \</a> can be used to split them into multiple lines. Using math in labels can be useful when you want to apply an offset to the label:
<pre><code class="65c816_asar">lda .Data+3 ; Will load $03 into A
Expand Down Expand Up @@ -2299,7 +2304,7 @@ <h4 id="global-labels">Global labels</h4>
!y = $12
!x = !y$34

lda !x ; Treated as &quot;lda $1234&quot;
lda !x ; Treated as &quot;lda $12$34&quot; (will throw error)

!phr = &quot;pha : phx : phy&quot;

Expand Down Expand Up @@ -2876,7 +2881,7 @@ <h4 id="for">for</h4>

For example:
<pre><code class="65c816_asar">for i = 1..5
db !i
db !i
db 2*!i
endfor</code></pre>
This will write the bytes 01 02 02 04 03 06 04 08.
Expand Down
Loading

0 comments on commit b9a1fe5

Please sign in to comment.