⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dfile.java

📁 用Java实现的编译器。把源代码编译成SPARC汇编程序
💻 JAVA
字号:
// $Id: dAsciiz.java,v 1.5 2000/10/21 23:18:10 mdeeds Exp $package java6035.tools.ASM;/** * dAsciiz * * represents an ..file directive in ASM file. ".file str" indicates * that this assembly code is generated from the source code found in file str */public class dFile extends ASMDirective{    public String fn;    /**     * Create a new file directive.      * @param str is the filename      **/    public dFile(String filename)    {		super(ASMDirective.FILE);		fn = filename;    }    /**     * Quotes the string in a way that can be understood by other tools.     * Turns quotes into \", backslashes into \\, and newlines into \n.     */    public static String quotify(String str)    {        String out = "";        int i;                for (i = 0; i < str.length(); i++)        {            if (str.charAt(i) == '\\')                out += "\\\\";            else if (str.charAt(i) == '\"')                out += "\\\"";            else if (str.charAt(i) == '\n')                out += "\\n";            else                out += str.charAt(i);        }        return out;    }    /**     * Returns the string representation.  Special characters in the string     * are replaced with their backslash-quoted representation.     */    public String toString()    {		return ".file \t\""+quotify(fn)+"\"";    }}

⌨️ 快捷键说明

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