Topic 11 : Assembler language operators 11-mavzu: Assembler tili operatorlari


Download 131.86 Kb.
bet3/5
Sana04.02.2023
Hajmi131.86 Kb.
#1157964
1   2   3   4   5
Bog'liq
11-Mavzu

Arithmetic commands
Add and multiplication commands
ADD op1, op2; op1: = op1 + op2
ADC op1, op2; op1: = op1 + op2 + CF
SUB op1, op2; op1: = op1 - op2
SBB op1, op2; op1: = op1 - op2 - CF
NEG op1; op1: = 0 - op1
CF, OF, SF, ZF arithmetic flags is set .
INC op ; op : = op + 1
DEC op ; op : = op - 1
Commands flags OF, SF, ZF established .
Reproduction and to be commands
MUL op ; XS: = S1 * op , without sign numbers
IMUL op ; XS: = S1 * op , sign numbers
DIV op ; S1: = XS div op2, S2: = XS mod op , without a hint numbers
IDIV op ; S1: = XS div op2, S2: = XS mod op , sign numbers
Yusupov R.A., 2021
Arifmetik buyruqlar
Qo'shish va ayirish buyruqlari
ADD op1, op2 ;op1: = op1 + op2
ADC op1, op2 ;op1: = op1 + op2 + CF
SUB op1, op2 ;op1: = op1 - op2
SBB op1, op2 ;op1: = op1 - op2 – CF
NEG op1 ; op1: = 0 - op1
CF, OF, SF, ZF arifmetik bayroqlari o’rnatiladi.
INC op ;op: = op + 1
DEC op ;op: = op – 1
Buyruqlar OF, SF, ZF bayroqlarini o’rnatdilar.
Ko’paytirish va bo’lish buyruqlari
MUL op ;XS: = S1 * op, ishorasiz sonlar
IMUL op ;XS: = S1 * op, ishorali sonlar
DIV op ;S1: = XS div op2, S2: = XS mod op, ishorasiz sonlar
IDIV op ;S1: = XS div op2, S2: = XS mod op, ishorali sonlar
Yusupov RA, 2021
Enter and remove commands . Program structure
The following o perator used name
offset variable name
This unchanging expression ; value information segment variable to the address teng .
Commands
INCHAR op ; character input , op - r8 or m8
ININT op ; son input , op - r32 or m32
OUTCHAR op ; character chop reach , op - r8, m8 or i8
OUTI op ; sign sonni chop reach , op-r32, m32 or i32
OUTU op ; without a hint sonni chop reach , op-r32, m32 or i32
OUTSTR op ; op addressed bytes = 0h bytes satrni chop reach
op - r32 or of f set line name
NEWLINE; Writeln
EXIT ; of the program finish
Command names big or small letters with spelling possible .
ESP registries in operands use possible not .
Yusupov R.A., 2021

Download 131.86 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling