Server for Information Technologies

(095) 932-9212, 932-9213, 939-0783
E-mail: info@citforum.ru
(!) CIT Forum CD-ROM

EXECSEG(3)
XENIX System V (21 1987)


execseg - eae yaco ax oeo popao

	#include 
	
	excode_t execseg (oldaddr, size)
	exdata_t oldaddr;
	unsigned size;
	
	int unexecseg (addr)
	excode_t addr;


execseg oyae eye apec paep yaca a, oop oe oe, opaae capo apec yaca, oopo, o pae epe, size ao oopoy oo epea ypaee. B cyae poeccopo Intel 8086 80286 cee pecp CS accopyec c ceeo ax, oopo pacooe yaco oldaddr. o oaae, o cee o peyex ao oeo ceee ceee ax coaa, o ceeop y x pae.

B cyae 8086 80286 "excode_t" "exdata_t" c (far) yaae. B cyae apxeyp, e cpa pax ceeo aac o e/ac/oe, opaae apec ee apyey, epeaaeoy execseg.

Peoeyec, o p cooa o y popa 8086 80286 e oy oe a; ae popac oe xopoo opepoac ceax oex x yaaex.

p oapye o execseg opaae ((excode_t)-1) aoc errno o o ENONEM. Oo caec eoppe apec ax size, a ae eoooc paec o ceeop ax.

unexecseg apeae cooa addr, opae coe pe execseg, a apec oeo popa. B cyae 8086 80286 o o po ocooe ceeopa, cooaoo oeoo yaca. y opaae 0 cyae yceoo aepe -1 p oe. Hapep, ec addr e ec apeco, opae paee ye execseg, opaaec -1 o apec e oe pe cy apeco oeo popa.


	excode_t funcp; char far *datap;
	 ...
	datap=brkctl(BR_NEWSEG,1000L,0L);
	load_with_code(datap,1000);
	     /* apyae popay 
	        yaco datap */
	funcp=execseg(datap,1000); (*funcp)();
	     /* o popa */
	if(unexecseg(funcp)==-1) {
	     printf("unexecseg failed0);
	     exit(1);
	}


B cyae Intel 8086 80286 execseg oa oya apec yaca. o cpeco peoeyec oo oe o popaca.

ocoy opaaeoe aee execseg epeaae e apec o yaae, a popaa, aa ce a xdata.h, oa oooac c ao -Me.

Ceye opae oocc oo cceoy oy, ooey o yac ax. Xo execseg oyae apec paep yaca, ec cee, coepa yaco, ypyec. epe ypoae poepec oppeoc apeca paepa yaca. oa cee ypoa, ey e pe y ocooe a (coye sbrk(3) brkctl(3)). opae pacpocpac a ec cee. oce pee ceey y unexecseg a e oe ocooea. ae ec cee ye ypoa, a o o execseg, pee oy ceey, coae o y.

Bcpe execseg, oop o oe oe a cooee "at least one void operand", oopoe yo pooppoa.
Comments: info@citmgu.ru
Designed by Andrey Novikov
Copyright © CIT