Changes between Version 26 and Version 27 of ClrxAsmSyntax


Ignore:
Timestamp:
Dec 29, 2017, 2:00:36 PM (12 months ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ClrxAsmSyntax

    v26 v27  
    5555s_add_u32 s1,s2,lit(4.0)    # encode 4.0 as literal (two 32-bit words)</code></p>
    5656<h3>Scopes</h3>
    57 <p>New feature is the visibility's scopes. Scopes concerns symbols, labels
    58 (except local labels), regvars. Macros, kernels and sections are still global.
     57<p>New feature is the visibility's scopes. The scopes concerns symbols, labels
     58(except local labels), regvars. The macros, kernels and sections are still global.
    5959 At start, the assembler create the global scope, that
    6060is root of next defined scopes. The scope can be opened by using <code>.scope</code> pseudo-op and
    6161they can be closed by using <code>.ends</code> or <code>.endscope</code>. We distinguish scope to two types:
    6262normal and temporary scopes.
    63 Temporary scopes doesn't have name and they exists until first close.</p>
     63The temporary scopes doesn't have name and they exists until first close.</p>
    6464<p>If scope will be opened, any object in this scope will directly available (by simple name).
    6565Next available object is in used scopes (declared by <code>.using</code> pseudo-op)
    6666begins from last 'using' to 'first'.</p>
    67 <p>Scopes are organized in tree where global scope is root of tree.
     67<p>The scopes are organized in tree where global scope is root of tree.
    6868This feature, allow to nest scopes (even named scopes inside temporary scopes).
    6969During searching object, an assembler begins from
     
    109109.ends
    110110::ala::sym2 = 7 # redefine sym2 in scope 'ala'</code></p>
    111 <p>Names of the object can have the scope path. Scope path is way to particular scope in
    112 tree. If searching scope should start from global scope, an scope path should be begins
    113 from <code>::</code>. <code>::</code> is separator (likes <code>/</code> in file system path) for path elements.</p>
     111<p>The names of the object can have the scope path. Scope path is way to particular scope in
     112tree. If searching scope should start from global scope, a scope path should be begins
     113from <code>::</code>. The <code>::</code> is separator (likes <code>/</code> in file system path) for path elements.</p>
    114114<p><code>sym1 = 9
    115115.scope ala  # open scope 'ala', parent is global scope
     
    124124    .byte ::sym1        # put 9, sym1 from global scope
    125125.ends</code></p>
    126 <p>Setting symbols, labels, if simple name is given (without scope path) always
     126<p>The setting symbols, labels, if simple name is given (without scope path) always
    127127create object in the current scope. Any call of object (even if not defined) always
    128128start searching through scope tree. It is possible to call to symbols
     
    151151program's instructions. Section <code>.rodata</code> holds read-only data (mainly constant data)
    152152that can be used by program. Section can be divided by type of the access.
    153 Most sections are writeable (any data can be put into them) and
     153The most sections are writeable (any data can be put into them) and
    154154addressable (we can define symbols inside these sections or move forward).</p>
    155155<p>Absolute section is only addressable section. It can be used for defining structures.
     
    178178</ul>
    179179<p>For character literals and string literals, escape can be used to put special characters
    180 likes newline, tab. List of escapes:</p>
     180likes newline, tab. List of the escapes:</p>
    181181<table>
    182182<thead>
     
    250250</tbody>
    251251</table>
    252 <p>Floating point literals in instruction operands can have the suffix ('l', 'h' or 's').
     252<p>The floating point literals in instruction operands can have the suffix ('l', 'h' or 's').
    253253Suffix 's' indicates that given value is single floating point value.
    254254Suffix 'h' indicates that given value is half floating point value.
    255255Suffix 'l' indicates that given value is double floating point value.</p>
    256256<h3>Expressions</h3>
    257 <p>CLRX assembler get this same the operator ordering as in GNU as.
     257<p>The CLRX assembler get this same the operator ordering as in GNU as.
    258258CLRX assembler treat any literal or symbol's value as 64-bit integer value.
    259 List of operators:</p>
     259List of the operators:</p>
    260260<table>
    261261<thead>
     
    463463final result of the expression can be represented as place of the code or absolute value
    464464(without refering to any place). An assembler performs this same operations
    465 on sections during evaluating an expression. Division, modulo,
     465on the sections during evaluating an expression. Division, modulo,
    466466binary operations (except negation), logical operations is not legal.</p>
    467467<h3>Instruction operands</h3>