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

📄 uiter

📁 坦尼保姆
💻
📖 第 1 页 / 共 2 页
字号:
< 		fb_ptr[FB_FORW+i] = 0;
---> 	off = SZ_HEAD;
> 	off += (long)outhead.oh_nsect * SZ_SECT;
> 	for (sp = sect; sp < &sect[outhead.oh_nsect]; sp++) {
> 		sp->s_foff = off;
> 		pos->os_base = SETBASE(sp);
> 		pos->os_size = sp->s_size + sp->s_comm;
> 		pos->os_foff = sp->s_foff;
> 		pos->os_flen = sp->s_size - sp->s_zero;
> 		pos->os_lign = sp->s_lign;
> 		off += pos->os_flen;
> 		wr_sect(pos, 1);
448a316,322> #ifdef RELOCATION
> 	off += (long)outhead.oh_nrelo * SZ_RELO;
> #endif
> 	if (sflag == 0)
> 		return;
> 	off += (long)outhead.oh_nname * SZ_NAME;
> 	outhead.oh_nchar = off;	/* see newsymb() */
451c325< pass_23(n)
---> commfinish()
453,455c327,328< 	register i;
< #ifdef ASLD
< 	register ADDR_T base = 0;
---> #ifndef ASLD
> 	register int i;
456a330,331> 	register struct common_t *cp;
> 	register item_t *ip;
457a333> 	register valu_t addr;
459,466c335,342< 	if (nerrors)
< 		stop(0);
< 	pass = n;
< #ifdef LISTING
< 	listmode >>= 3;
< 	if (listmode & 4)
< 		ffreopen(listpath, listfile);
< 	listeoln = 1;
---> 	switchsect(S_UND);
> 	/*
> 	 * assign .comm labels and produce .comm symbol table entries
> 	 */
> 	for (cp = commons; cp; cp = cp->c_next) {
> 		ip = cp->c_it;
> #ifndef ASLD
> 		if (!( ip->i_type & S_EXT)) {
468,470c344,350< #ifdef THREE_PASS
< 	bitindex = -1;
< 	nbits = BITCHUNK;
---> 			sp = &sect[(ip->i_type & S_TYP) - S_MIN];
> 			if (pass == PASS_1) {
> 				addr = sp->s_size + sp->s_comm;
> 				sp->s_comm += ip->i_valu;
> 				ip->i_valu = addr;
> #ifndef ASLD
> 				ip->i_type &= ~S_COM;
472,475c352< 	for (i = 0; i < FB_SIZE; i++)
< 		fb_ptr[FB_FORW+i] = fb_ptr[FB_HEAD+i];
< 	outhead.oh_nemit = 0;
< 	for (sp = sect; sp < &sect[outhead.oh_nsect]; sp++) {
---> 			}
477,495d353< 		if (sp->s_flag & BASED) {
< 			base = sp->s_base;
< 			if (base % sp->s_lign)
< 				fatal("base not aligned");
< 		} else {
< 			base += (sp->s_lign - 1);
< 			base -= (base % sp->s_lign);
< 			sp->s_base = base;
< 		}
< 		base += sp->s_size;
< 		base += sp->s_comm;
< #endif
< 		outhead.oh_nemit += sp->s_size - sp->s_zero;
< 	}
< 	if (pass == PASS_3) 
< 		setupoutput();
< 	for (sp = sect; sp < &sect[outhead.oh_nsect]; sp++) {
< 		sp->s_size = 0;
< 		sp->s_zero = 0;
497c355,357< 		sp->s_gain = 0;
---> 			if (pass == PASS_2) {
> 				ip->i_valu -= sp->s_gain;
> 			}
498a359,385> 			if ((sflag & SYM_EXT) && PASS_SYMB)
> 				newsymb(
> 					ip->i_name,
> 					ip->i_type & (S_EXT|S_TYP),
> 					0,
> 					load(ip)
> 				);
> #else /* not ASLD */
> #ifdef THREE_PASS
> 			if (pass == PASS_2) {
> 				cp->c_size -= sp->s_gain;
> 			}
> #endif /* THREE_PASS */
> 		}
> 		if (pass == PASS_1) cp->c_size = ip->i_valu;
> 		if (PASS_SYMB) {
> 			if (pass != PASS_3 && (ip->i_type & S_EXT)) {
> 				ip->i_valu = outhead.oh_nname;
> 			}
> 			newsymb(
> 				ip->i_name,
> 				ip->i_type,
> 				0,
> 				cp->c_size
> 			);
> 		}
> #endif /* not ASLD */
500c387,388< 	machstart(n);
---> 	if (PASS_SYMB == 0)
> 		return;
502,507c390,423< 	newmodule(modulename);
< #endif /* ASLD */
< 	ffreopen(temppath, tempfile);
< 	yyparse();
< 	commfinish();
< 	machfinish(n);
---> 	/*
> 	 * produce symbol table entries for undefined's
> 	 */
> 	for (i = 0; i<H_SIZE; i++)
> 		for (ip = hashtab[H_LOCAL+i]; ip; ip = ip->i_next) {
> 			if (ip->i_type != (S_EXT|S_UND))
> 				continue;
> 			if (pass != PASS_3)
> 				/*
> 				 * save symbol table index
> 				 * for possible relocation
> 				 */
> 				ip->i_valu = outhead.oh_nname;
> 			newsymb(
> 				ip->i_name,
> 				S_EXT|S_UND,
> 				0,
> 				(valu_t)0
> 			);
> 		}
> #endif /* not ASLD */
> 	/*
> 	 * produce symbol table entries for sections
> 	 */
> 	if (sflag & SYM_SCT)
> 		for (sp = sect; sp < &sect[outhead.oh_nsect]; sp++) {
> 			ip = sp->s_item;
> 			newsymb(
> 				ip->i_name,
> 				(ip->i_type | S_SCT),
> 				0,
> 				load(ip)
> 			);
> 		}
509,510c425,518< 
< newmodule(s)
---> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */
> /* $Header: comm4.c,v 2.17 91/12/17 14:55:13 ceriel Exp $ */

⌨️ 快捷键说明

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