当前位置:网站首页>Assembly language (7) operation instruction
Assembly language (7) operation instruction
2022-06-26 12:00:00 【Day-3】
1 mul ride
assume cs:code
code segment
main proc
mov ax,5
mov bx,2
mul bx
MOV AX,4C00H
INT 21H
main endp
start:call main
code ends
end start
mul Write a register after , Another automatic call ax, The results are stored in ax in , If it is greater than 16 Bits exist DX:AX in .
2 div except
assume cs:code
code segment
main proc
mov ax,5
mov bx,2
div bx
MOV AX,4C00H
INT 21H
main endp
start:call main
code ends
end start
ax Storage providers ,dx Store the remainder .
3 An operation
xor Exclusive or Two operands , Put it in the first operand
and And Two operands , Put it in the first operand
or or Two operands , Put it in the first operand
not Take the opposite An operand
4 Shift instructions
There are many shift commands in assembly , Shift left and shift right have different types .
Move left
Left shift yes SHL( Logic shift left )、SAL( Arithmetic shift left ) , Both are shifted to the left , All use 0 To fill the empty bits generated by the shift . There is no difference between the two .
Move left and ROL( Cyclic shift to the left )、RCL( Shift left with carry cycle ), Cyclic shift to the left , As the name suggests, it circulates to the left ; Loop with carry shifts left , That is, the result of the shift “ overflow ” Bit shift in CF in , primary CF The value in moves into the number .
Move right
Shift right yes SHR( Logical shift right )、SAR( Arithmetic shift right ), The positions resulting from arithmetic shift right are filled with sign bits ; Logical shift right use 0 fill .
Move right and ROR( Cycle moves to the right )、RCR( Shift right with carry cycle ), Similar to left shift loop and carry loop .
边栏推荐
- Quantitative elementary -- akshare obtains stock code, the simplest strategy
- Re recognized! Know that Chuangyu has been selected as one of the first member units of the "business security promotion plan"
- 动态规划解决股票问题(下)
- 深度理解STM32的串口實驗(寄存器)【保姆級教程】
- Prospering customs through science and technology, Ronglian and Tianjin Customs jointly build a genomic database and analysis platform
- Change calico network mode to host GW
- word中涂黑的方块
- Omnichannel membership - tmall membership 2: frequently asked questions
- UDP协议详解[通俗易懂]
- UDP protocol details [easy to understand]
猜你喜欢

. Net, the usage of log components NLog, seriallog, log4net

Redis的最佳实践?看完不心动,算我输!!

Quantitative elementary -- akshare obtains stock code, the simplest strategy

10 years' experience in programmer career - for you who are confused

4. N queen problem

哈希表的前置知识---二叉搜索树

统计遗传学:第一章,基因组基础概念

Flannel's host GW and calico

TCP interview

FastRCNN
随机推荐
Ctfshow web getting started command execution web75-77
How can we reach members more effectively?
HUST網絡攻防實踐|6_物聯網設備固件安全實驗|實驗二 基於 MPU 的物聯網設備攻擊緩解技術
中国十大证券app排名 开户安全吗
Jmeter响应时间和tps监听器使用教程
Omni channel member link - tmall member link 3: preparation of member operation content
Five trends of member management in 2022
这两天搭建环境遇到的几个问题
I'd like to know what preferential activities are available for stock account opening? Is it safe to open an account online?
leetcode 715. Range 模块 (hard)
VMware virtual machine bridging mode can not access the campus network "suggestions collection"
In depth understanding of STM32 serial port experiment (register) [nanny level tutorial]
Hello! Forward proxy!
24 database interview questions that must be mastered!
Laravel admin login add graphic verification code
杜比全景音效简介
18: Chapter 3: development of pass service: 1: SMS login & registration process, introduction; (SMS verification code is used here)
Statistical genetics: Chapter 1, basic concepts of genome
FastRCNN
Excel operation of manual moving average method and exponential smoothing method for time series prediction