Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:multiasm:papc:chapter_6_12 [2026/02/19 15:00] – [Constants] ktokarzen:multiasm:papc:chapter_6_12 [2026/02/27 02:10] (current) – [Statements] jtokarz
Line 198: Line 198:
 <code asm> <code asm>
 int_const1 EQU 5                ; no suffix by default decimal value int_const1 EQU 5                ; no suffix by default decimal value
-int_const_dec = 7               ; finished with "d", "D", "t", "T", or by default without suffix+int_const_dec = 7               ; finished with "d", "D", "t", "T", or  
 +                                ; by default without suffix
 int_const_binary = 100100101b   ; finished with "b", "B", "y", or "Y" int_const_binary = 100100101b   ; finished with "b", "B", "y", or "Y"
 int_const_octal = 372o          ; finished with "o", "O", "q", or "Q" int_const_octal = 372o          ; finished with "o", "O", "q", or "Q"
Line 242: Line 243:
 All fields in a statement are optional. A statement can be composed of a label only (ended with a colon), an operation only (if it doesn't require operands), or a comment only. A few examples of proper statements are presented in the following code. All fields in a statement are optional. A statement can be composed of a label only (ended with a colon), an operation only (if it doesn't require operands), or a comment only. A few examples of proper statements are presented in the following code.
 <code asm> <code asm>
-; name    ; operation ; operands ; comment+; name ; operation ; operands ; comment
  
-cns_y      EQU         134       ; definition of a constant named cns_y with the value 134+cns_y   EQU         134       ; definition of a constant named cns_y with the  
 +                              ;   value 134
  
-           .DATA                 ; operation only - directive to start data section +        .DATA                 ; operation only - directive to start data section 
-var_x      DB          123       ; definition of a variable named var_x with init value 123+var_x   DB          123       ; definition of a variable named var_x with init  
 +                              ;   value 123
  
-           .CODE                 ; operation only - directive to start code section +        .CODE                 ; operation only - directive to start code section 
-begin:                           ; name only - label that represents an address +begin:                        ; name only - label that represents an address 
-           mov         rax, rbx  ; operation and corresponding operands +        mov         rax, rbx  ; operation and corresponding operands 
-                                 ; comment only statement +                              ; comment only statement 
-           END                   ; operation only - end of the source file+        END                   ; operation only - end of the source file
 </code> </code>
en/multiasm/papc/chapter_6_12.1771506011.txt.gz · Last modified: by ktokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0