Assembly Commands

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/173

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

174 Terms

1
New cards

DATA TRANSFER SYNTAX

Mov Destination, Source

2
New cards

LDS

Load Data Segment Register

3
New cards

LEA

Load Effective Address

4
New cards

LES

Load Extra Segment Register

5
New cards

LODS

Load String

6
New cards

LSS

Load stack Segment Register

7
New cards

MOV

Move data

8
New cards

MOVS

Move String

9
New cards

MOVSX

Move with sign-extend

10
New cards

MOVZX

Move with Zero-extend

11
New cards

STOS

Store string

12
New cards

XCHG

Exchange

13
New cards

XLAT

Translate

14
New cards

Arithmetic Syntax

Adc destination, source

15
New cards

ADD

add binary number

16
New cards

DEC

Decrement by 1      

17
New cards

DIV

Unsigned Divide  

18
New cards

MUL

Unsigned multiply 

19
New cards

SUB

Subtract binary values

20
New cards

XADD

exchange and add

21
New cards

 ADC:

Add with carry

22
New cards

INC: 

Increment by 1

23
New cards

IDIV

Signed (integer) divide

24
New cards

IMUL

Signed multiply

25
New cards

SBB:

Subtract with borrow

26
New cards

Comparison Syntax

CMP destination, source

27
New cards

CMP:

compare

28
New cards

CMPSn:

Compare string

29
New cards

CMPXCHG:

Compare and exchange

30
New cards

Logical Operator Syntax

AND destination,source

31
New cards

AND:

Logical AND

32
New cards

NOT:

Logical NOT

33
New cards

OR:

Logical OR

34
New cards

XOR:

Exclusive XOR

35
New cards

Input/Output Syntax

OUT destination,source

36
New cards

IN:

Input byte or word

37
New cards

INSn:

Input string

38
New cards

OUT: 

Output byte or word

39
New cards

OUTSn:

Output string

40
New cards


JUMP Syntax

ja label

41
New cards

JA: 

Jump if Above

42
New cards

JAE

Jump if above/equal

43
New cards

JB:

Jump if below

44
New cards

JBE:

Jump if below/equal

45
New cards

JE: 

Jump if Equal

46
New cards

JG:

Jump if Greater

47
New cards

JGE:

Jump if Greater/Equal

48
New cards

JL:

Jump if Less

49
New cards

JNE:

Jump if Not Equal

50
New cards

JNG:

Jump if Not Greater

51
New cards

JNGE:

Jump if Not Greater/Equal

52
New cards

JNL:

Jump if Not Less

53
New cards

JNLE:

JNLE:

54
New cards

JNZ:

Jump if Not Zero

55
New cards

JLE:

Jump if Less/Equal

56
New cards

JNA:

Jump if Not Above

57
New cards

JNB: 

Jump if Not Below

58
New cards

JNBE:

Jump if Not Below/Equal

59
New cards

JZ: 

Jump if Zero

60
New cards

JC:

Jump if Carry

61
New cards

JCXZ:

Jump if CX is Zero

62
New cards

JNO:

Jump if No Overflow

63
New cards

JO:

Jump if Overflow

64
New cards

JNP:

Jump if No Parity

65
New cards

JP/JPO: 

Jump if Parity Odd

66
New cards

JPE:

Jump if Parity Even

67
New cards

JS:

Jump if Sign

68
New cards

JNS:

Jump if No Sign

69
New cards

CALL:

Call a procedure

70
New cards

INT:

Interrupt

71
New cards

IRET: 

Interrupt Return

72
New cards

JMP:

Unconditional Jump

73
New cards

LOOPING Syntax

loop label

74
New cards

LOOP:

Loop until complete

75
New cards

LOOPE:

Loop While Equal

76
New cards

LOOPZ: 

Loop While Zero

77
New cards

LOOPNE: 

Loop While Not Equal

78
New cards

LOOPNZ:

Loop While Not Zero

79
New cards

STACK INSTRUCTIONS Syntax

pop destiny

80
New cards

POP: 

Retrieve the content of the Stack

81
New cards

PUSH:

Store the content of the Stack

82
New cards

POPF:

Pop Flags off the Stack

83
New cards

PUSHF:

Push Flags onto Stack

84
New cards

What is assembly language?

A low-level programming language specific to a processor architecture that uses symbolic codes to represent machine instruction

85
New cards

What converts assembly language into machine code?

An assembler (e.g., NASM, MASM, TASM).

86
New cards

What does the microprocessor handle?

Arithmetic, logical, and control operations.

87
New cards

What are machine language instructions?

Binary instructions (1’s and 0’s) understood directly by the processor.

88
New cards

Why is assembly language used instead of machine language?

It’s easier to read, write, and debug.

89
New cards

What are the three sections of an assembly program?

.data, .bss, and .text

90
New cards

What is the .data section used for?

Declaring initialized data or constants (unchanging data

91
New cards

What is the .bss section used for?

Declaring variables and buffers (zero-filled at runtime).

92
New cards

What is the .text section used for?

Keeping the actual code (instructions).

93
New cards

What must the .text section begin with?

global _start

94
New cards

What symbol begins a comment in assembly?

A semicolon ;

95
New cards

What are the three types of statements in assembly?

  • Executable instructions

  • Assembler directives (pseudo-ops)

  • Macros

96
New cards

What is the syntax format of an assembly statement?

[label] mnemonic [operands] [;comment]

97
New cards

What does the data segment store?

Data elements for the program.

98
New cards

What does the code segment store?

instruction codes.

99
New cards

What does the stack segment store?

Data passed to functions and procedures.

100
New cards

What does a comment do?

It is ignored by the assembler but improves readability.