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

📄 asm.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
/*#@(#)asm.c	4.1	Ultrix	7/17/90*//* Copyright (c) 1982 Regents of the University of California */static char sccsid[] = "@(#)asm.c 1.2 12/15/82";static char rcsid[] = "$Header: asm.c,v 1.3 84/03/27 10:19:36 linton Exp $";/* * Assembly language dependent symbol routines. */#include "defs.h"#include "symbols.h"#include "asm.h"#include "languages.h"#include "tree.h"#include "eval.h"#include "operators.h"#include "mappings.h"#include "process.h"#include "runtime.h"#include "machine.h"#define isdouble(range) ( \    range->symvalue.rangev.upper == 0 and range->symvalue.rangev.lower > 0 \)/* * Initialize assembly language information. */public asm_init(){    Language lang;    lang = language_define("assembler", ".s");    language_setop(lang, L_PRINTDECL, asm_printdecl);    language_setop(lang, L_PRINTVAL, asm_printval);    language_setop(lang, L_TYPEMATCH, asm_typematch);    language_setop(lang, L_HASMODULES, asm_hasmodules);    language_setop(lang, L_PASSADDR, asm_passaddr);}/* * Test if two types are compatible. */public Boolean asm_typematch(type1, type2)Symbol type1, type2;{    Boolean b;    b = false;    return b;}public asm_printdecl(s)Symbol s;{    switch (s->class) {	case VAR:	case REF:	    printf("&%s = 0x%x", symname(s), s->symvalue.offset);	    break;	case PROC:	case FUNC:	    printf("%s (0x%x):", symname(s), codeloc(s));	    break;	default:	    error("class %s in c_printdecl", classname(s));    }    putchar('\n');}/* * Print out the value on the top of the expression stack * in the format for the type of the given symbol. */public asm_printval(s)register Symbol s;{    register Symbol t;    register Integer len;    switch (s->class) {	case ARRAY:	    t = rtype(s->type);	    if (t->class == RANGE and istypename(t->type, "$char")) {		len = size(s);		sp -= len;		printf("\"%.*s\"", len, sp);	    } else {		printarray(s);	    }	    break;	default:	    printf("0x%x", pop(Integer));	    break;    }}public boolean asm_hasmodules (){    return false;}public boolean asm_passaddr (param, exprtype)Symbol param, exprtype;{    return false;}

⌨️ 快捷键说明

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