M1 Flashcards
is made up of an optional leading sign, one or more digits, and an optional suffix character indicating the number base
Integer Constants (or Integer Literal)
an optional suffix character inficating the number base
radix
is a command embedded in the source code that is recognized and acted upon by the assembler.
Directives
do not execute at runtime
directives
can define variables, macros, and procedures
directives
can assign names to memory segments
directives
one important function of assembler directives is to define program
selections or segments
identifies the area of the program containing variables
.data directive
identifies the area of the program containing executable instructions
.code directive
identifies the area of the program holding the runtime stack, setting its size
.stack 100
stack directive
is the statement that becomes executable when a program is assembled
instructions
labels are
optional
instruction mnemonic is
required
operand(s) is/are
usually required
comments are
optional
what is the basic syntax
[label:] mnemonic [operand][;comment]
is an identifier that acts as a place marker for instructions and data
label
a label placed just before an instruction implies the
instrcution’s address
a label placed just before a variable implies the
variable’s address
identifies the location of variable, providing a convenient way to reference the variable encoded
data labels
assignes a numeric address to each label
assembler
area of a program where intructions are located and must end with a colon (:) characher
code labels
these are used as target of junming and looping instructions
code labels
is a short word that identifies ans intruction
instruction mnemonic
instruction mnemonic that moves(assigns) one value to another
mov
instruction mnemonic that adds two values
add
instruction mnemonic that subracts one value from another
sub
instruction mnemonic that multiplies two values
mul
instruction mnemonic that jumps to new location
jmp
instruction mnemonic that calls a procedure
call
assembly language instruction can have between X operands
0-3
operands in the assembly language can be a
register, memory operand, constant expression, or input-output port
is an important way of writers of a program to communicate information about the program’s design to person reading the source code
comments
comments can be specified in two ways
single-line
mov eux, 5; move the value of 5 to eax
block comments COMMENT ! this is a comment this is also a comment !