当前位置:网站首页>汇编语言(3)16位汇编基础框架与加减循环
汇编语言(3)16位汇编基础框架与加减循环
2022-06-24 20:24:00 【Day-3】
汇编代码->汇编->obj文件->exe 16位exe
运行第一个汇编程序
字母开头的数字前面要加零,否则报错。
出发中断后会触发一个函数,不同的中断出发不同的函数。(int 1, int 2,int 3(软件中断))
MOV数据传送指令
单步步过P
单步步入T
assume cs:code
code segment
MOV AX,1234H
MOV BX,5678H
MOV AX,4C00H
INT 21H
code ends
end
汇编语言的函数
ret返回指令
call 转移指令
call
IP寄存器
转移 函数名pop ip
转移ip
ret
assume cs:code
code segment
hanshuming proc
MOV AX,1
ret
hanshuming endp
main proc
call hanshuming
MOV BX,AX
MOV AX,4C00H
INT 21H
main endp
start:call main
code ends
end start
运行过程如下:
加减循环
加法:
add 寄存器,寄存器或者数
inc 自增1
减法:
sub 寄存器,寄存器或者数
dec 自增1
loop 循环指令
assume cs:code
code segment
main proc
MOV AX,0
MOV CS,10
XH:
INC AX
LOOP XH
MOV AX,4C00H
INT 21H
main endp
start:call main
code ends
end start
边栏推荐
- 【微服务|Sentinel】簇点链路|微服务集群环境搭建
- 【微服务|Sentinel】Sentinel快速入门|构建镜像|启动控制台
- Scala IO read by character
- 新手看过来,带你一次性了解“软考”
- Activity startup process
- Source code analysis the problem that fragments cannot be displayed in the custom ViewGroup
- Several ways for wechat applet to jump to the page are worth collecting
- 2022 simulated 100 questions of safety officer-c certificate examination and online simulated examination
- A website for programmers with a monthly salary of 30K
- C#和C 的CAN通信实验
猜你喜欢
51 single chip microcomputer multi computer communication
Cobalt Strike安装教程
2022年危险化学品经营单位安全管理人员考试试题及模拟考试
【Redis实现秒杀业务②】超卖问题的解决方案
Practical operation notes - notebook plus memory and ash cleaning
Text editor for QT project practice -- Episode 9
重磅:国产IDE发布,由阿里研发,完全开源!(高性能+高定制性)
Xcode preview displays a bug in the content of the list view and its solution
Use of file class filenamefilter & filefilter in io
I 刷题 I — 复制带随机指针的链表
随机推荐
Preliminary understanding of qtoolbutton
热力图展示相关矩阵
QT (35) - operate excel qxlsx qaxobject
VB 学习笔记
大厂高频软件测试面试题和答案都帮你准备好啦,备战金九银十
Text editor for QT project practice -- Episode 9
Scala responsibility chain pattern
Punch smart spirit 1. The brand is attractive. What is the strength of the product?
[microservices sentinel] cluster link | microservices cluster environment construction
Mobile security tool apktool
Scala trait exercise
QT(36)-rapidjson解析嵌套的json
Xcode preview displays a bug in the content of the list view and its solution
2021-11-07
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
Several ways for wechat applet to jump to the page are worth collecting
Scala sample object
【微服务|Sentinel】实时监控|RT|吞吐量|并发数|QPS
Examination questions and mock examination for safety management personnel of hazardous chemical business units in 2022
Mobile security tool jar