Elements of Assembly Language
Assembly language is basically like any other language, which means that it has its words, rules and syntax. The basic elements of assembly language are:
Labels;
Orders;
Directives; and
Comments.
mathematical and logical operations:
NAME OPERATION EXAMPLE RESULT
+ Addition 10+5 15
- Subtraction 25-17 8
* Multiplication 7*4 28
/ Division (with no remainder) 7/4 1
MOD Remainder of division 7 MOD 4 3
SHR Shift register bits to the right 1000B SHR 2 0010B
SHL Shift register bits to the left 1010B SHL 2 101000B
NOT Negation (first complement of number) NOT 1 1111111111111110B
AND Logical AND 1101B AND 0101B 0101B
OR Logical OR 1101B OR 0101B 1101B
XOR Exclusive OR 1101B XOR 0101B 1000B
LOW 8 low significant bits LOW(0AADDH) 0DDH
HIGH 8 high significant bits HIGH(0AADDH) 0AAH
EQ, = Equal 7 EQ 4 or 7=4 0 (false)
NE,<> Not equal 7 NE 4 or 7<>4 0FFFFH (true)
GT, > Greater than 7 GT 4 or 7>4 0FFFFH (true)
GE, >= Greater or equal 7 GE 4 or 7>=4 0FFFFH (true)
LT, < Less than 7 LT 4 or 7<4 0 (false)
Assembly language is basically like any other language, which means that it has its words, rules and syntax. The basic elements of assembly language are:
Labels;
Orders;
Directives; and
Comments.
mathematical and logical operations:
NAME OPERATION EXAMPLE RESULT
+ Addition 10+5 15
- Subtraction 25-17 8
* Multiplication 7*4 28
/ Division (with no remainder) 7/4 1
MOD Remainder of division 7 MOD 4 3
SHR Shift register bits to the right 1000B SHR 2 0010B
SHL Shift register bits to the left 1010B SHL 2 101000B
NOT Negation (first complement of number) NOT 1 1111111111111110B
AND Logical AND 1101B AND 0101B 0101B
OR Logical OR 1101B OR 0101B 1101B
XOR Exclusive OR 1101B XOR 0101B 1000B
LOW 8 low significant bits LOW(0AADDH) 0DDH
HIGH 8 high significant bits HIGH(0AADDH) 0AAH
EQ, = Equal 7 EQ 4 or 7=4 0 (false)
NE,<> Not equal 7 NE 4 or 7<>4 0FFFFH (true)
GT, > Greater than 7 GT 4 or 7>4 0FFFFH (true)
GE, >= Greater or equal 7 GE 4 or 7>=4 0FFFFH (true)
LT, < Less than 7 LT 4 or 7<4 0 (false)
No comments:
Post a Comment