Path: utzoo!attcan!uunet!seismo!ukma!usenet.ins.cwru.edu!klah!trier From: trier@klah.INS.CWRU.Edu (Stephen C. Trier) Newsgroups: comp.os.msdos.programmer Subject: Re: Int 10H Function 13H - How Do I access BP from C ? Message-ID: <1990Oct20.052836.19479@usenet.ins.cwru.edu> Date: 20 Oct 90 05:28:36 GMT References: <1990Oct19.202013.28397@nada.kth.se> Sender: news@usenet.ins.cwru.edu Reply-To: trier@cwlim.INS.CWRU.Edu Followup-To: comp.os.msdos.programmer Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) Lines: 18 Nntp-Posting-Host: klah.ins.cwru.edu In article <1990Oct19.202013.28397@nada.kth.se> d87-vik@dront.nada.kth.se (Ville K{rkk{inen) writes: >Now I wonder, is there a way to set the BP from C, or do I have to write a >.asm-hack that first saves the BP before the actual call, and then restores >it.(Which if I'm not wrong requires an update to MSC 6.0) Use the functions int86 or int86x. With these, you load your registers into a structure, then pass the registers to the function. The function takes care of the rest. All registers can be set this way. A C compiler that can't link to assembly is pretty poor. MS-C can certainly do it from version 4.0 on; I imagine it's been supported since version 1.0. -- Stephen Trier Case Western Reserve University Work: trier@cwlim.ins.cwru.edu Information Network Services Home: sct@seldon.clv.oh.us "If we can't fix it, it ain't broke." - Ernie Ellenberger