dsection.java

来自「用Java实现的编译器。把源代码编译成SPARC汇编程序」· Java 代码 · 共 44 行

JAVA
44
字号
// $Id: dAlign.java,v 1.2 1999/11/04 16:53:41 deberg Exp $package java6035.tools.ASM;/** * dSection * *	The ".section" directive for SPARC. Usually in the form of 	.section <string> *  Indicates the beginning of one of these segments depending what *  <string> is.  *	"text" for program code *	"data" for global writeable initialised data *	"rodata" for read-only global initialised data *	".bss" for global uninitialised data 		 */public class dSection extends ASMDirective{    public String name;	    public dSection(String name)    {		super(ASMDirective.SECTION);		if (!name.equals(".text") &&			!name.equals(".data") &&			!name.equals(".rodata") &&			!name.equals(".bss"))		{			throw new ASMException("Improper section declared. Must be either \".text\" or \".data\" or	\".rodata\" or \".bss\"");		}		this.name = name;    }    /**     * Returns the string representation.     */    public String toString()    {		return ".section\t\""+name+"\"";    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?