当前位置:网站首页>汇编语言基础知识
汇编语言基础知识
2022-07-06 09:29:00 【My71】
编辑程序步骤
- 编辑源程序,扩展名为 .asm
- 汇编:将源程序文件转为目标文件,目标文件扩展名 .obj
- 连接:将目标文件转为可执行文件,可执行文件扩展名 .exe
指令
挂载
mount 目标盘符 本地盘符清屏:cls
删除文件:del 文件名
查看文件:type 文件名
汇编指令:masm 文件名
连接指令:link 文件名
编写程序
创建源程序
指令 edit
语法
edit 文件名.asm若文件已存在则打开该文件继续编写,若不存在则会创建一个新文件。
段定义
指令:segment(开始) ends(结束)
段名:不得超过八个字符
语法
段名 segment 段名 ends
段关联
指令:assume
类型:CS(代码段)、DS(数据段)、SS(堆栈段)、ES(附加段)
语法:
assume 类型:段名例:定义一个代码段,段名为 code
code segment assume cs:code code ends
存值
指令:mov
通用寄存器:AX、BX、CX、DX
语法mo
mov 通用寄存器,值- 通用寄存器:目的操作数
- 值:源操作数
结束程序
mov ah,4ch
int 21h
指令分类
- 双操作数指令:用逗号分隔两个参数,逗号前面的称为目的操作数,逗号后面的叫原操作数。
- 单操作数指令
- 无操作数指令
- 所有双操作数指令中,目的操作数和源操作数类型必须匹配。
- 8086 指令中必须要有寄存器参与,除立即数寻址之外。
debug 指令
- 退出:q
- 查看 CPU 寄存器:r
- 反汇编指令:u
- 执行程序指令:g(g偏移地址)
- 查看内存单:d
边栏推荐
- Tencent interview algorithm question
- LeetCode 1562. Find the latest group of size M
- Which is more important for programming, practice or theory [there are some things recently, I don't have time to write an article, so I'll post an article on hydrology, and I'll fill in later]
- ByteDance open source Gan model compression framework, saving up to 97.8% of computing power - iccv 2021
- Redis standalone startup
- [unsolved]7-14 calculation diagram
- Use JQ to realize the reverse selection of all and no selection at all - Feng Hao's blog
- Fdog series (III): use Tencent cloud SMS interface to send SMS, write database, deploy to server, web finale.
- LeetCode 1558. Get the minimum number of function calls of the target array
- Two weeks' experience of intermediate software designer in the crash soft exam
猜你喜欢

~76 sprite map

Shell_ 06_ Judgment and circulation

Train 100 pictures for 1 hour, and the style of the photos changes at will. There is a demo at the end of the article | siggraph 2021

Thank you for your invitation. I'm in the work area. I just handed in the code. I'm an intern in the next ByteDance

Erlang installation

Solve the single thread scheduling problem of intel12 generation core CPU (II)

Full record of ByteDance technology newcomer training: a guide to the new growth of school recruitment

Simply try the new amp model of deepfacelab (deepfake)

TCP的三次握手和四次挥手

Usage of insert() in vector
随机推荐
I'm "fixing movies" in ByteDance
Educational Codeforces Round 122 (Rated for Div. 2)
Spark's RDD (elastic distributed data set) returns a large result set
~73 other text styles
Some instructions on whether to call destructor when QT window closes and application stops
koa中间件
(multiple methods, need to continue to see) 7-11 go deep into the tiger's Den
Hbuilder x format shortcut key settings
字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题
字节跳动春招攻略:学长学姐笔经面经,还有出题人「锦囊」
Full record of ByteDance technology newcomer training: a guide to the new growth of school recruitment
7-5 blessing arrived
Tencent interview algorithm question
Cartesian tree (modified)
腾讯面试算法题
Shell_ 06_ Judgment and circulation
When it comes to Google i/o, this is how ByteDance is applied to flutter
LeetCode1556. Thousand separated number
Simple records of business system migration from Oracle to opengauss database
~85 transition