On 1/15/2014 9:27 PM, Charles Steinkuehler wrote:
> On 1/14/2014 8:38 PM, Charles Steinkuehler wrote:
>> On 1/14/2014 5:34 AM, andy pugh wrote:
>>> Someone on the forum is trying to write a driver for some onboard GPIO
>>> that needs to be enabled via an INT 15. The sample assembler is:
>>>
>>> MOV AX, 6F08H        Sets the digital port as input
>>> INT 15H                     Initiates the INT 15H
>>>
>>> Is it reasonable/legitimate to do this with inline assembler in a .comp 
>>> file?
>>>
>>> Having never tried to use inline assembler, what would it look like? I
>>> guess we need to put ax back to where it was afterwards?
>>>
>>> Is there  a linux system call to achieve the same result?
>> Not to derail this thread from the "I used to have to enter hex machine
>> instructions by hand with toggle switches, and it was up-hill both
>> ways!" reminiscing, but it should be OK to do an INT instruction or make
>> kernel calls in the setup portion of a HAL component.  Of course the
>> execution mode and the interrupt need to agree on things like the
>> current operating context of the CPU (no calling 16-bit BIOS routines
>> from 32-bit PAE code!).
> I was reading a bit more about this today, and apparently how the
> graphics applications do this is to include a virtual x86 machines for
> the sole purpose of being able to execute INT calls to the on-board
> video BIOS for GPUs (which is the only way they can be properly setup on
> some systems, particularly non-x86 machines with undocumented hardware
> and closed-source GPU drivers).
>
> https://lists.sourceforge.net/lists/listinfo/emc-developers 

That makes sense.   But in this GPIO application, unless the INT 15 
vector pointer has an interrupt service routine already attached to it 
via a driver, to service the I/O, I doubt that running the code below is 
going to have the desired effect.

MOV AX, 6F08H        Sets the digital port as input
INT 15H                     Initiates the INT 15H

Dave

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to