当前位置:网站首页>汇编语言基础知识
汇编语言基础知识
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
边栏推荐
- I'm "fixing movies" in ByteDance
- 字节跳动多篇论文入选 CVPR 2021,精选干货都在这里了
- README. txt
- Basic principles of video compression coding and audio compression coding
- Shell_ 07_ Functions and regular expressions
- 字节跳动开源GAN模型压缩框架,算力最高节省97.8%丨ICCV 2021
- Redis standalone startup
- 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]
- 7-6 sum of combinatorial numbers
- The concept of spark independent cluster worker and executor
猜你喜欢

One hundred questions of image processing (1-10)

~Introduction to form 80

姚班智班齐上阵,竞赛高手聚一堂,这是什么神仙编程大赛?

LeetCode 1584. Minimum cost of connecting all points

字节跳动海外技术团队再夺冠:高清视频编码已获17项第一

Fdog series (III): use Tencent cloud SMS interface to send SMS, write database, deploy to server, web finale.

~84 form supplement

Shell_ 05_ operator

Shell_ 00_ First meeting shell

MP4格式详解
随机推荐
LeetCode 1641. Count the number of Lexicographic vowel strings
LeetCode 1551. Minimum operand to make all elements in the array equal
字节跳动海外技术团队再夺冠:高清视频编码已获17项第一
7-12 inventory code base
姚班智班齐上阵,竞赛高手聚一堂,这是什么神仙编程大赛?
100张图训练1小时,照片风格随意变,文末有Demo试玩|SIGGRAPH 2021
字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题
TCP的三次握手和四次挥手
Shell_ 05_ operator
@RestController、@Controller
Error: case label `15 'not within a switch statement
Go language uses the thrift protocol to realize the client and service end reports not enough arguments in call to oprot Writemessagebegin error resolution
Some instructions on whether to call destructor when QT window closes and application stops
7-6 sum of combinatorial numbers
ByteDance open source Gan model compression framework, saving up to 97.8% of computing power - iccv 2021
Full record of ByteDance technology newcomer training: a guide to the new growth of school recruitment
Ffmpeg command line use
Codeforces Round #771 (Div. 2)
Record the error reason: terminate called after throwing an instance
我走过最迷的路,是字节跳动程序员的脑回路