Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!ai-lab!pogo.gnu.ai.mit.edu!kingdon From: kingdon@pogo.gnu.ai.mit.edu (Jim Kingdon) Newsgroups: comp.sys.atari.st.tech Subject: Re: programming and MIDI Message-ID: <15423@life.ai.mit.edu> Date: 30 Apr 91 02:40:14 GMT References: <1885@qusunb.queensu.CA> Sender: news@ai.mit.edu Lines: 40 In article <1885@qusunb.queensu.CA> driesse@qucis.queensu.CA (Anthonie Driesse) writes: >Since there are GEMDOS functions to handle IO from the console, I assume >there are also some to deal with the MIDI port. > >Could someone tell me which functions they are, what parameters they have, >and possibly give me a hint how to use them in personal Pascal? > Try the Bcon*() functions. (Bconin,Bconout,Bconstat,Bcostat). function Bconin(handle:integer):char; (*read a character*) procedure Bconout(handle:integer;ch:char); (*write a character*) function Bconstat(handle:integer):boolean; (*checks input status*) function Bcostat(handle:integer):boolean; (*checks output status*) ... those should be defined in whatever BIOS bindings Personal Pascal uses. To output a character, "Bconout(4,ch);" where 4 (i THINK) is the handle to the MIDI port. If not that, it's three. (bad memory with numbers and whatnot =:^) ) Or to read one coming in, "ch:=Bconin(4);" should do ya. ... unfortunately, there isn't really any GEMDOS support for MIDI, although i remember once reading about a standard handle "MID:". Not very good, since you can't check for the existence of input data without sitting and hanging the system until there is a byte received. There's also a function in the XBIOS called Midiws(count:integer;s:string); i believe it is, where count is the number of characters of string to send, minus one. ====================================================================== || Jon Pickard || INet: jpickar@caticsuf.csufresno.edu || | | | || ||=============||======================================|| | | | || ||A god? Nahh.|| Jeanluc Picard@Isca BBS ||smile! Your|| / | \ || ||=============|| Jeanluc@MARS Hotel ||jaw's wired|| / | \ || ||My opinions do not necessarily represent||shut! ||ST all the || ||those of the sites from which i post. || :^# ||way, bradda|| ======================================================================