-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
首页摘要 代码过长会溢出 #82
Labels
Comments
@akkuman 方便贴下,md源文件吗? |
title: Windows环境下32位汇编语言程序设计笔记-基础篇
date: 2017-09-14 22:09:28
update: ""
author: me
tags:
- 读书笔记
- 二进制
categories:
- 读书笔记
topic: ""
cover: ""
draft: false
preview: ""
top: false
type: ""
hide: false
config: null
---
## 内存模式
\```asm
.386
.model flat,stdcall ;子程序调用模式,win32中只能用stdcall,因为win32api调用使用的这个
option casemap:none ;定义了程序中变量和子程序名是否对大小写敏感,win32api名称区分大小写,所以只需要记住这个定式
\```
<!--more-->
1. 指定使用的指令集
2. .model语句
\```
.model 内存模式[,语言模式][,其他模式]
\```
**内存模式**
模式 | 内存使用方式
-----|-------
tiny | 用来建立.com文件,所有的代码、数据和堆栈都在同一个64KB段内
small | 建立代码和数据分别用一个64KB段的.exe文件
medium | 代码段可以有多个64KB段,数据段只有一个64KB段
compact | 代码段只有一个64KB段,数据段可以有多个64KB段
large | 代码段和数据段都可以有多个64KB段
huge | 同large,并且数据段中的一个数组也可以超过64KB
flat | Win32程序使用的模式,代码和数据使用同一个4GB段
***对于Win32程序来说,只有一种内存模式,flat模式*** 节选,在首页摘要会溢出,文章页不会 |
好的,感谢反馈 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
示意图
The text was updated successfully, but these errors were encountered: