ImageVerifierCode 换一换
格式:DOCX , 页数:37 ,大小:33.92KB ,
资源ID:8807005      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/8807005.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(C51的OBJ文件格式.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

C51的OBJ文件格式.docx

1、C51的OBJ文件格式EXTERNAL PRODUCT SPECIFICATIONFOR THEMCS-51 OBJECT MODULE FORMATV5.0 APPROVED Sept. 05, 1982 TABLE OF CONTENTSTABLE OF CONTENTS 2DISCLAIMER 31 PREFACE 42 OVERVIEW OF 8051 ARCHITECTURE 42.1 Code Space 42.2 External Data Space 52.3 Internal Data Space 52.3.1 Register Banks 62.3.2 Bit Space

2、62.3.3 Hardware Registers 62.3.4 Stack 62.3.5 Additional RAM (RUPI) 62.3.6 Addressing Modes 73 REQUIREMENTS 73.1 Relocatable and External References 73.2 Segment Relocation 73.3 Intermodule Linkage 83.4 Symbolic Debugging 93.5 Compatibility 93.6 RUPI (And other MCS-51 members) Support 94 OBJECT FILE

3、 STRUCTURE 105 RECORD FORMATS 115.1 Notation 115.2 Module Header Record 125.3 Module End Record 135.4 Definition Records 135.4.1 Segment Definitions Record 135.4.2 External Definitions Record 175.5 Debug Records 185.5.1 Scope Definition Record 185.5.2 Debug Items Record 205.6 Data Section 215.6.1 Co

4、ntent Record 225.6.2 Fixup Record 225.7 Library Records 245.7.1 Library Header Record 255.7.2 Library Module Names Record 255.7.3 Library Module Locations Record 255.7.4 Library Dictionary Record 26APPENDIX A: RECORD FORMAT SUMMARY 27APPENDIX B: GLOSSARY 28APPENDIX C: ABSOLUTE OBJECT MODULE FORMAT 3

5、0C.1 Structure Of Absolute Object File 30C.2 Module Header Record 30C.3 Module End Record 31C.4 Scope Definition Record 31C.5 Debug Items Record 32C.6 Content Record 34APPENDIX D: DOCUMENT HISTORY 35APPENDIX E: REFERENCES 36DISCLAIMERIntel makes no representation or warranties with respect to the co

6、ntents hereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Further, Intel reserves the right to revise this publication and to make changes from time to time in the content hereof without obligation of Intel to notify any person of such

7、revision or changes. The publication of this specification should not be construed as a commitment on Intels part to implement any product. 1982 Intel Corporation. All rights reserved.Document Control Center Number for this MCS-51 OMF EPS is 481984.1 PREFACEThe document defines the internal format o

8、f the relocatable object files (Object Module Formats, OMF) for the 8051 family, produced by Intels language translators and processed by other Intel software products. Appendix C defines the Absolute Object Module Format (AOMF) which is produced by the RL51 program (and the RASM, if the source prog

9、ram is absolute). The information in this document is normally not needed in order to use Intel software, but is provided for the person who needs to write programs to process these object files or to create files in the same formats. The design is heavily based on the previous OMFs for the 8080 and

10、 the 8086 1 2.Chapter 2 covers some background material for those interested in the relevant 8051 architecture issues and the R&L requirements which led to the definition of the object file formats.Terms which may have special meaning in the document are described in the glossary (Appendix B).2 OVER

11、VIEW OF 8051 ARCHITECTUREThe following discussion outlines those aspects of the 8051 architecture relevant to linking and locating - the memory model and the addressing modes.The memory model of the 8051 family consists of three non-overlapping address spaces - the code space, the external data spac

12、e and the on-chip RAM. Some sections of the on-chip RAM space serve functions in addition to being the usual random access byte storage. These include bit-addressable memory, and stack.2.1 Code Space The code space size is 64K bytes. The lower 4K are on-chip ROM and the top 60K resides in external m

13、emory components. The lower portion of the on-chip ROM contains a reset vector (at location 0) and 5 interrupt vectors (at locations 3, 0BH, 13H, 1BH and 23H).The code space usually consists of all the procedure and constants of a program. It is assumed that all the code space (off-chip as well) con

14、sists of ROM. Consequently only read operations are available on data in the code space.Four code addressing modes are provided:a. Direct Addressing - The second and third byte of the instruction form the full 16 bit address (used in jump and call instructions). Setup instruction (MOV DPTR, code_add

15、ress).b. Block addressing - The instruction provides the 11 least-significant bits of the address. The block address is defined by the 5 most-significant bits of the incremented PC. Used in jump and call instructions.c. Relative Addressing - The instruction provide 8 bit relative offset. Used in con

16、ditional jumps in a range of +127/-128 of the incremented PC.d. Indirect Addressing - The address is composed of the DPTR or PC content, indexed by the 8 bit accumulator.2.2 External Data Space The External Data space size is 64K bytes. This space is completely external to the chip. Access is provid

17、ed via move instructions which move bytes between the external data space and the accumulator.Two external data addressing modes are provided:a. Indirect DPTR - the 16 bit DPTR is used to address any location in the external data space.b. Indirect Register - R0 or R1 are used to address a location w

18、ithin a 256 byte page defined by the content of the Port 2 register.The pointing registers DPTR, R0 and R1 should be set up before the actual access is being made. The machine provide instructions for loading the DPTR with a constant (e.g. external data address) and incrementing it. It provides many

19、 instructions which load/manipulate the 8 bit pointers R0 and R1.2.3 Internal Data SpaceThe on-chip RAM space consists of 128 bytes (up to 256 bytes for a few members of the family , e.g. 192 for the RUPI) of data memory and 128 bytes of memory mapped hardware registers. The on-chip RAM space is org

20、anized as follows: DIRECT ADDRESSINGINDIRECT ADDRESSING256Hardware RegistersFuture Additional RAM192RUPI Additional RAM128Free RAM48Bit Space32Register Bank 324Register Bank 216Register Bank 1Default TOS8Register Bank 00The function of the various components of the on-chip RAM space and the addressi

21、ng modes by which they may be accessed are discussed below.2.3.1 Register Banks The lower 32 bytes of the on-chip RAM space are divided into four register banks, usually associated with different interrupt nesting levels. The eight registers of the current bank, selected by two bits within the PSW,

22、are usually used for scratchpad purposes.2.3.2 Bit Space The bit space contain 256 individually addressable bits. Bits 0 to 127 are mapped onto bytes 32 to 47 of the on-chip RAM space. Bits 128 to 255, some of which are nonexistent, are mapped onto some specific registers in the hardware space. Oper

23、ations on the bit space include SET, CLEAR, COMPLEMENT, AND, OR and TEST.2.3.3 Hardware Registers When direct addressing is used, a few (20 for the 8051, 34 for the RUPI) of the top 128 bytes of the on-chip RAM space are mapped 1-1 onto a set of hardware registers (A, B, DPTR, etc.). Thus I/O and ot

24、her accesses to the machine itself are accomplished by direct memory operations. The result of an access to an unoccupied location within that section is undefined.2.3.4 Stack The top of the stack is initially set by H/W to 07H (the start of register bank 1) but may be relocated to anywhere else wit

25、hin the on-chip RAM space by setting the Stack Pointer (SP).The stack grows upward, i.e. the SP is incremented before a write operation (PUSH/CALL/ACALL instructions) and is decremented after a read operation (POP/RET/RETI instructions).The stack is byte oriented. However when used in call/return-ty

26、pe operations, two bytes (a full 16 bit address) are pushed/popped. 2.3.5 Additional RAM (RUPI) There are 64 bytes of additional on-chip RAM available on the RUPI chip (locations 128 to 191). Other members of the family can have up to 128 additional on-chip Ram bytes. These additional bytes can only

27、 be accessed in the indirect addressing mode. They may be used as memory for the stack.2.3.6 Addressing Modes The on-chip RAM space can be accessed using the following addressing modes:a. Direct Addressing - the full 8 bit address is given in the second byte of the instruction. Addresses greater the

28、n 127 access the memory mapped hardware space. b. Indirect Register Addressing - the address is specified by the content of R0 or R1. Addresses greater then 127 address nothing on the 8051 and addresses greater then 191 address nothing on the RUPI. c. Register Addressing - a three bit field in the f

29、irst (opcode) byte addresses a register within the current register bank.d. Bit Addressing - this is a direct addressing mode where the full (8-bit) bit address is given by the second byte of the instruction.e. Stack addressing - See 2.3.4.3 REQUIREMENTS 3.1 Relocatable and External References The O

30、MF should support relocatable and external references of the following types:a. Low Byte - reference to the low-order byte of an address. Generated by the LOW operator or, for the DATA and BIT spaces, by a direct (full) address reference. b. High Byte - reference to the high-order byte of an address

31、. Generated by the HIGH operator. Applicable to XDATA and CODE segments.c. Full CODE/XDATA Address - a full 16-bit reference.d. Inblock CODE Address - an 11-bit inblock reference.e. Relative CODE address - a reference +127/-128 relative to the PC (after it was incremented to the next instruction).f.

32、 Full Bit Address - an 8-bit bit address g. Mixed Byte/Bit Address - an 8-bit bit address of which only the (5-bit) byte address part is relocatable.3.2 Segment Relocation The object code will be organized in segments. The segments, defined by the user at translation time, will have the following attributes: a. Name - obeys the usual rule

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1