当前位置:网站首页>汇编语言基础知识
汇编语言基础知识
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
边栏推荐
- ~69 other ways to use icon fonts
- Shell_ 03_ environment variable
- LeetCode 1552. Magnetic force between two balls
- Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]
- Many papers on ByteDance have been selected into CVPR 2021, and the selected dry goods are here
- Tencent interview algorithm question
- 100张图训练1小时,照片风格随意变,文末有Demo试玩|SIGGRAPH 2021
- Record the error reason
- Gridhome, a static site generator that novices must know
- How to generate six digit verification code
猜你喜欢

SQL快速入门

Simple records of business system migration from Oracle to opengauss database

Shell_ 02_ Text three swordsman

Shell_ 03_ environment variable

字节跳动技术面试官现身说法:我最想pick什么样的候选人

The "advertising maniacs" in this group of programmers turned Tiktok advertisements into ar games

Shell_ 04_ Shell script

~74 JD top navigation bar exercise

redux使用说明

7-10 punch in strategy
随机推荐
LeetCode 1551. Minimum operand to make all elements in the array equal
LeetCode 1641. Count the number of Lexicographic vowel strings
Data config problem: the reference to entity 'useunicode' must end with ';' delimiter.
Fdog series (III): use Tencent cloud SMS interface to send SMS, write database, deploy to server, web finale.
"One year after graduation, I won ACL best paper"
LeetCode 1447. Simplest fraction
Usage of insert() in vector
Record the error reason: terminate called after throwing an instance
Monomer application concept
~78 radial gradient
Shell_ 06_ Judgment and circulation
Fdog series (V): use QT to imitate QQ to realize login interface to main interface, function chapter.
视频压缩编码和音频压缩编码基本原理
Introduction to microservices
Tencent interview algorithm question
登陆验证koa-passport中间件的简单使用
Simply try the new amp model of deepfacelab (deepfake)
One hundred questions of image processing (11-20)
~72 horizontal and vertical alignment of text
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