Changes between Version 25 and Version 26 of ClrxAsmSyntax
- Timestamp:
- 12/29/17 09:00:33 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ClrxAsmSyntax
v25 v26 55 55 s_add_u32 s1,s2,lit(4.0) # encode 4.0 as literal (two 32-bit words)</code></p> 56 56 <h3>Scopes</h3> 57 <p>New feature is the visibility's scopes. The scopes concerns symbols, labels58 (except local labels), regvars. The macros, kernels and sections are still global.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. 59 59 At start, the assembler create the global scope, that 60 60 is root of next defined scopes. The scope can be opened by using <code>.scope</code> pseudo-op and 61 61 they can be closed by using <code>.ends</code> or <code>.endscope</code>. We distinguish scope to two types: 62 62 normal and temporary scopes. 63 T he temporary scopes doesn't have name and they exists until first close.</p>63 Temporary scopes doesn't have name and they exists until first close.</p> 64 64 <p>If scope will be opened, any object in this scope will directly available (by simple name). 65 65 Next available object is in used scopes (declared by <code>.using</code> pseudo-op) 66 66 begins from last 'using' to 'first'.</p> 67 <p> The scopes are organized in tree where global scope is root of tree.67 <p>Scopes are organized in tree where global scope is root of tree. 68 68 This feature, allow to nest scopes (even named scopes inside temporary scopes). 69 69 During searching object, an assembler begins from … … 109 109 .ends 110 110 ::ala::sym2 = 7 # redefine sym2 in scope 'ala'</code></p> 111 <p> The names of the object can have the scope path. Scope path is way to particular scope in111 <p>Names of the object can have the scope path. Scope path is way to particular scope in 112 112 tree. If searching scope should start from global scope, an scope path should be begins 113 from <code>::</code>. The<code>::</code> is separator (likes <code>/</code> in file system path) for path elements.</p>113 from <code>::</code>. <code>::</code> is separator (likes <code>/</code> in file system path) for path elements.</p> 114 114 <p><code>sym1 = 9 115 115 .scope ala # open scope 'ala', parent is global scope … … 124 124 .byte ::sym1 # put 9, sym1 from global scope 125 125 .ends</code></p> 126 <p> The setting symbols, labels, if simple name is given (without scope path) always126 <p>Setting symbols, labels, if simple name is given (without scope path) always 127 127 create object in the current scope. Any call of object (even if not defined) always 128 128 start searching through scope tree. It is possible to call to symbols … … 151 151 program's instructions. Section <code>.rodata</code> holds read-only data (mainly constant data) 152 152 that can be used by program. Section can be divided by type of the access. 153 The most sections are writeable (any data can be put into them) and153 Most sections are writeable (any data can be put into them) and 154 154 addressable (we can define symbols inside these sections or move forward).</p> 155 155 <p>Absolute section is only addressable section. It can be used for defining structures. … … 178 178 </ul> 179 179 <p>For character literals and string literals, escape can be used to put special characters 180 likes newline, tab. List of theescapes:</p>180 likes newline, tab. List of escapes:</p> 181 181 <table> 182 182 <thead> … … 250 250 </tbody> 251 251 </table> 252 <p> The floating point literals in instruction operands can have the suffix ('l', 'h' or 's').252 <p>Floating point literals in instruction operands can have the suffix ('l', 'h' or 's'). 253 253 Suffix 's' indicates that given value is single floating point value. 254 254 Suffix 'h' indicates that given value is half floating point value. 255 255 Suffix 'l' indicates that given value is double floating point value.</p> 256 256 <h3>Expressions</h3> 257 <p> TheCLRX assembler get this same the operator ordering as in GNU as.257 <p>CLRX assembler get this same the operator ordering as in GNU as. 258 258 CLRX assembler treat any literal or symbol's value as 64-bit integer value. 259 List of theoperators:</p>259 List of operators:</p> 260 260 <table> 261 261 <thead> … … 463 463 final result of the expression can be represented as place of the code or absolute value 464 464 (without refering to any place). An assembler performs this same operations 465 on thesections during evaluating an expression. Division, modulo,465 on sections during evaluating an expression. Division, modulo, 466 466 binary operations (except negation), logical operations is not legal.</p> 467 467 <h3>Instruction operands</h3>