🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #35422

Re: Modula2 Midi Programming Help!

#35422
From: Jelske Kloppenburg
Date: Mon, 19 Dec 1988 07:41
47 lines
1656 bytes
From article <3818@alvin.mcnc.org>, by houser@mcnc.org (Kevin D. Houser ):
> 
>  In an effort to dump data to the midi ports on my Atari ST the following
> code was tried:
> 
>      VAR
>        i:BYTE;
>      BEGIN
>        i:=$90
>           ^
>            
>  The compiler returned with a type not compatible error. So, how do I
> assign an 8bit value to the variable <i>? I am new to Modula2, so it may
> be trivial; but it is very important. Any help would be greatly appreciated.
> (I'm using TDI-Modula2/ST by the way)
> 
> Thanx,
> Kevin Houser
> houser@mcnc.org
> (919) 859-5467 H
> (919) 248-1996 W
>  
First of all hexadecimal constants in Modula-2 are designed by an appended H.
E.g. 90H or 0FFH.
Then you write your data whith BConOut and that takes a character.
If you import the appropriate items from BIOS, the following should work:

   VAR ch: CHAR;
   BEGIN
      ch:=CHAR(90H);
      BConOut(HSS,ch);

You can also give character constants in octal, that is ch:=220C, but for Midi
this is not so fine.

---

kloppenburg@kmx.gmd.dbp.de
kloppen@gmdzi.uucp
A
A
A
A
A
A
      BconOut
Then you write your data to the Midi whith Bconout.
Technical Details
Message-ID: <887@gmdzi.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!unido!gmdzi!kloppen
References: <3818@alvin.mcnc.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!unido!gmdzi!kloppen
From: kloppen@gmdzi.UUCP (Jelske Kloppenburg)
Newsgroups: comp.sys.atari.st,comp.lang.modula2
Subject: Re: Modula2 Midi Programming Help!
Message-ID: <887@gmdzi.UUCP>
Date: 19 Dec 88 07:41:46 GMT
References: <3818@alvin.mcnc.org>
Organization: GMD, Sankt Augustin, F. R. Germany
Lines: 47