🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2737

Re: Int 10H Function 13H - How Do I access BP from C ?

#2737
From: Stephen C. Trier
Date: Sat, 20 Oct 1990 05:28
17 lines
1519 bytes
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
Technical Details
Message-ID: <1990Oct20.052836.19479@usenet.ins.cwru.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!ukma!usenet.ins.cwru.edu!klah!trier
References: <1990Oct19.202013.28397@nada.kth.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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