当前位置:网站首页>汇编语言之栈
汇编语言之栈
2022-08-04 03:06:00 【每天一道题】
基本概念
基本操作
1.入栈:将一个新的元素放到栈顶。
2.出栈:从栈顶取出一个元素。
操作规则:LIFO(后进先出)。
CPU提供的栈机制
PUSH入栈与POP出栈。
push ax:将寄存器ax中的数据送入栈中。
pop ax:从栈顶取出数据送入ax。
注:8086CPU的入栈和出栈操作都是以字为单位进行的。
在8086CPU中,有两个寄存器:
段寄存器SS:存放栈顶的段地址。
寄存器SP:存放栈顶的偏移地址。
且任意时刻SS:SP都指向栈顶元素。
PUSH和POP
push ax
1.SP = SP - 2;
2.将ax中的内容送入SS:SP指向的内存单元处,此时SS:SP指向新栈顶。
pop ax
1.将SS:SP指向的内存单元处的数据送入ax中;
2.SP = SP + 2,SS:SP指向当前栈顶下面的单元,以当前栈顶下的单元为新的栈顶。

边栏推荐
- [Medical Insurance Science] To maintain the safety of medical insurance funds, we can do this
- 6口全千兆二层网管型工业以太网交换机千兆2光4电光纤自愈ERPS环网交换机
- Brush esp8266-01 s firmware steps
- unsafe.Pointer, pointer, reference in golang
- There are too many systems, how to realize multi-account interworking?
- 怎样提高网络数据安全性
- 【翻译】Terraform和Kubernetes的交集
- 函数,递归以及dom简单操作
- Pine Script | How to display and typeset a plot switch?
- The general SQL injection flow (sample attached)
猜你喜欢

activiti流程执行过程中,数据库表的使用关系

一文看懂推荐系统:召回04:离散特征处理,one-hot编码和embedding特征嵌入

Utilities of Ruineng Micrometer Chip RN2026

2千兆光+6千兆电导轨式网管型工业级以太网交换机支持X-Ring冗余环网一键环网交换机

出海季,互联网出海锦囊之本地化

Mini program + new retail, play the new way of playing in the industry!

高效IO模型

docker+网桥+redis主从+哨兵模式

Functions, recursion and simple dom operations

仿牛客论坛项目梳理
随机推荐
y86.第四章 Prometheus大厂监控体系及实战 -- prometheus存储(十七)
pnpm 是凭什么对 npm 和 yarn 降维打击的
kingbaseES V8R2/R3 表在指定表空间,为何显示为默认表空间?
逻辑漏洞----其他类型
Homemade bluetooth mobile app to control stm8/stm32/C51 onboard LED
What is the source of flinkcdc consuming mysql binlog data without sqltype=delete
Zabbix set up email alert + enterprise WeChat alert
[Study Notes Dish Dog Learning C] Dynamic Memory Management
QNX Hypervisor] 10.2 vdev 8259 2.2 user manual
数据安全峰会2022 | 美创DSM获颁“数据安全产品能力验证计划”评测证书
多线程间的通信方式你知道几种?
基本表单验证流程
uni-app 从零开始-基础模版(一)
Power button (LeetCode) 215. The first K largest elements in the array (2022.08.03)
全网没有之一的JMeter 接口测试流程详解
架构实战营模块三作业
一文详解DHCP原理及配置
数据湖(二十):Flink兼容Iceberg目前不足和Iceberg与Hudi对比
db2中kettle报错 Field [XXX] is required and couldn‘t be found 解决方法
C语言--环形缓存区