Question: Writing port 388 
Author Message
 Question: Writing port 388

I have a problem. I can't find the answer in any documentation, or a few
people I know. I need to be able to read/write data to port 388h. (you know,
the MIDI port, MPU-401) It dosn't matter if it's for Windows or DOS, all I
need to be able to do is to write directly to the port. If anyone out there
knows, PLEASE E-MAIL ME or respond to this post!

Eric Falsken



Mon, 21 Dec 1998 03:00:00 GMT  
 Question: Writing port 388

You have a problem.  You asked the wrong groups about this.  You asked way
too many groups.

comp.lang.c             is about the C language, besides it's 0x388 not 388h.
comp.lang.c++           is about the C++ language, besides it's 0x388 not 388h.
comp.lang.java          is about the Java(tm) programming language and I
                        doubt it even lets you have access to ports.
comp.lang.misc          is about programming languages in general.

Maybe comp.lang.asm.x86 can help you and I have no idea about the group
comp.lang.Pascal.borland.  But you probably could have asked a better
group like one of:

comp.os.ms-windows.programmer.drivers
comp.os.ms-windows.programmer.multimedia
comp.sys.ibm.pc.soundcard.tech

You have another problem.  You haven't even decided what language you
want to code in, if you even know what the differences are.  Either that
or you are very ignorant about the Internet and need to go back and do
some more reading first.


| I have a problem. I can't find the answer in any documentation, or a few
| people I know. I need to be able to read/write data to port 388h. (you know,
| the MIDI port, MPU-401) It dosn't matter if it's for Windows or DOS, all I
| need to be able to do is to write directly to the port. If anyone out there
| knows, PLEASE E-MAIL ME or respond to this post!
|
| Eric Falsken

--
Phil Howard KA9WGN   +-------------------------------------------------------+
Linux Consultant     |  "Adolf Hitler was OK at the beginning, but then he   |
Milepost Services    |  went too far".   --Marge Schott    --World History   |



Mon, 21 Dec 1998 03:00:00 GMT  
 Question: Writing port 388

Quote:

>I have a problem. I can't find the answer in any documentation, or a few
>people I know. I need to be able to read/write data to port 388h. (you know,
>the MIDI port, MPU-401) It dosn't matter if it's for Windows or DOS, all I
>need to be able to do is to write directly to the port. If anyone out there
>knows, PLEASE E-MAIL ME or respond to this post!

Borland provides the functions inportb() and outportb() to read and write a
byte from an I/O port.  I believe Microsoft calls their equivalent functions
inp() and outp() - have a look through your library reference or online help
for these (or similarly named fucntions)

Peter Bennett VE7CEI                | Vessels shall be deemed to be in sight


TRIUMF, Vancouver, B.C., Canada     |                          ColRegs 3(k)
GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
or: ftp://ftp-i2.informatik.rwth-aachen.de/pub/arnd/GPS/peter/index.html
or: http://vancouver-webpages.com/peter/index.html



Mon, 21 Dec 1998 03:00:00 GMT  
 Question: Writing port 388

Quote:

> I have a problem. I can't find the answer in any documentation, or a few
> people I know. I need to be able to read/write data to port 388h. (you know,
> the MIDI port, MPU-401) It dosn't matter if it's for Windows or DOS, all I
> need to be able to do is to write directly to the port. If anyone out there
> knows, PLEASE E-MAIL ME or respond to this post!

> Eric Falsken


Isn't port 388h the Adlib port?  On my SB16 at least it is.  My MIDI
port is at 330h, and I also have the option of setting it to 300h.  If
you have a real SoundBlaster, then the 'Pxxx' setting in your BLASTER
environment string will contain the hex address of your MIDI port.




Mon, 21 Dec 1998 03:00:00 GMT  
 Question: Writing port 388

Quote:

> I have a problem. I can't find the answer in any documentation, or a few
> people I know. I need to be able to read/write data to port 388h. (you know,
> the MIDI port, MPU-401) It dosn't matter if it's for Windows or DOS, all I
> need to be able to do is to write directly to the port. If anyone out there
> knows, PLEASE E-MAIL ME or respond to this post!

> Eric Falsken


Hi Eric

In assembly language, it's fairly simple to write to port 388h.
Simply write

   mov   dx,388h            ;don't use any other register than dx
   mov   al,<byte of data you wish to write to the port>  ;ax if it's a
                                                          ;word port
   out   dx,al     ;for writing to the port
OR
   in    al,dx     ;for reading from the port, again ax if it's a word
                   ;port

Maybe you can blend this assembly language code in whatever code you will
be working.

Hope this helps.
--
Regards,
---------------------------------------------------
Danny Hendrickx   |                               |
Alcatel Telecom   |                               |

-----------------------------------------------------------------
"Man is the best computer we can put aboard a spacecraft...
and the only one that can be mass produced with unskilled labor."
-----------------------------------------------------------------



Tue, 22 Dec 1998 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Question: Writing port 388

2. Clipper 5.3b (rev.388) Debug mistery

3. writing in binary to a serial port

4. Writing to LPT ports

5. Read/Write data from/to I/O-Ports

6. writing directly to LPT port

7. Serial Port Writing with CDD 3 DOS

8. Writing to the COM port

9. How do I read/write serial port?

10. Writing bytes out of Serial Port

11. Parallel writing to several ports

12. read and write to the printer port

 

 
Powered by phpBB® Forum Software