home *** CD-ROM | disk | FTP | other *** search
- { Copyright 1988 Carter Scholz }
-
- Uses
- Crt, Mpu;
-
- var
- done:boolean;
- MidiData: byte;
-
- function Hex(b:byte):string;
- const
- hx : array [0..15] of char = '0123456789ABCDEF';
- begin
- Hex := hx [b shr 4] + hx [b and 15];
- end;
-
- { **** MAIN PROGRAM **** }
-
- begin
- done:=false;
- resetMPU;
- PutCmd ($3F); { Put MPU into UART mode. }
- gotoxy(1,25);
- write ('Now peeking ... Press any key to quit');
- window(1,1,80,24);
- clrscr;
- repeat { Begin loop. }
- GetData (MidiData); { Get MIDI data from MPU.}
- if (MidiData <> $FE) { If it's not an active-sensing byte...}
- then begin
- if mididata>=$80 then HighVideo else LowVideo;
- write ( Hex (MidiData),' '); { ... write it to the screen. }
- end;
- until keypressed; { Repeat till keypressed. }
- resetMPU;
- window(1,1,80,25);
- clrscr;
- writeln ('MPU reset. So long!');
- end.