Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!ncar!noao!arizona!shack From: shack@cs.arizona.edu (David Shackelford) Newsgroups: comp.os.msdos.programmer Subject: Re: Int 10H Function 13H - How Do I access BP from C ? Message-ID: <488@caslon.cs.arizona.edu> Date: 29 Oct 90 19:23:29 GMT References: <1990Oct19.202013.28397@nada.kth.se> <1990Oct21.204236.22011@nada.kth.se> <685@digigw.digital.co.jp> Organization: U of Arizona CS Dept, Tucson Lines: 23 In article <685@digigw.digital.co.jp> gday@digigw.digital.co.jp (Gordon Day) writes: >In article <1990Oct21.204236.22011@nada.kth.se>, d87-vik@dront.nada.kth.se (Ville K{rkk{inen) writes: >> >> My problem is that Int10h-Func13h requires the offset of my data to be stored >> in BP,that is, the BasePointer. Note this,BP is a pointer, not a register >> defined in the REGS union. > [stuff on MSC & VAX deleted], but no compilers (to my knowledge) on the PC do, > >Gordon W. Day TurboC has aliases to the actual registers defined, and you can directly write to the hardware with a couple of restrictions. You cannot change the segment registers, SP, or BP. Unfortunately, this means that the original poster would not be able to use this anyway. I don't understand why the int86?() functions don't work, as the regs structure does contain a BP field, which is properly modified and sent to the BIOS func. (At least it is in TURBOC, can't say for other compilers). I use this all of the time in my mouse handler functions. Perhaps a code example from the non-working program might help to find a fix. Dave | shack@cs.arizona.edu