Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 May 2007 10:55:05 +0200
From:      rmgls@wanadoo.fr
To:        Mike Meyer <mwm@mired.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: direct I/O access
Message-ID:  <20070530085506.163217000088@mwinf2816.orange.fr>

next in thread | raw e-mail | index | archive | help
>> i am trying to port my old assembler soft for Dos to FreeBSD.
>
>You have my sympathy.
>
Thanks, i need it, because its a big deal for me!

>> i need to write and read directly to the midi and scsi device.
>> when i try something like this i receive a sigbus error
>> 
>> SORRY, i am NOT nor a C nor a FreeBSD expert!!!
>> all i know is Assembly language!
>
>You may have to learn some. Or at least be able to read it.
>

I read C, and begin to write some short examples.
but of course my lack is great on this topic.

>And I have to ask. The hardware has changed a lot since the days of
>DoS, and things that worked then may cause strange results on modern
>hardware. Do you know modern hardware, or are you still using dos-era
>hardware?
>

yes i am aware of this, and have a few understanding of protected mode too, 
also about music softs.

---cut---
>> 
>> 	.data
>> 	.align 4
>> params:	.word 0x330,2,1 # midi port => enabling IO ???
>> 
>> 	.text
>> 	.align 4
>> 	.global _start
>> _start:
>> 	nop
>> 	pushl	params
>> 	pushl	$0x4
>
>I believe this should be $0x4, as you want to *set* the values, not
>get them.
>
is it necessary to restore the permissions on exit?

>You also need to open the file "/dev/io".  I believe that leaving this
>file open for anything more than a handful of instructions would be a
>bad thing, but I'm not going to verify it.
>

i tried this, but without set_ioperm, it was not clear on the doc 
that one have to use these two funcions:
in io man: i find SEE ALSO: i386_get(set)_ioperm...

is my understanding correct?

	thanks a lot
	raoul




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070530085506.163217000088>