grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FILE] Play command


From: Marco Gerards
Subject: Re: [FILE] Play command
Date: Wed, 13 Jul 2005 18:28:41 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

Vincent Pelletier <address@hidden> writes:

Hi Vincent,

> Here is the play command source code and some tunes.
> I don't submit a patch since I'm not sure where it will (and where the
> tunes will) go.

Cool!  Won't it be nice to use a user readable fileformat?  It is not
a requirement from my side, just a suggestion. :)

> With Marco we thought about contrib/i386/pc/play.c
>
> "Ancestors" of this code are:
> GNU/Hurd
> Grub 2 cat command
> Grub 2 vga for inb & outb
>
> Contributors for the tunes:
> FSF_Song I_Feel_Pretty Indiana_Jones_Theme Summertime : GNU/Hurd

Marcus made those.

> Beverly Hills Cop. Star Trek: The next Generation : Marco Gerards

It is not the official theme from Star Trek: TNG, but a tune from an
episode I liked a lot (Innerlight).

> Tetris_Theme : me
>
> Vincent Pelletier
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFC1BuHFEQoKRQyjtURAtfnAJ0Z6EyHKmArEvcGMa7ioMu66zbFZgCglHXy
> actaxo6QqQaFx/UfMrvtC+Q=
> =C1S1
> -----END PGP SIGNATURE-----
>
> /* play.c - command to play a tune  */
> /*
>  *  GRUB  --  GRand Unified Bootloader
>  *  Copyright (C) 2003  Free Software Foundation, Inc.

This should be 2002, 2004, 2005 if I am not mistaken.  The years 2002,
2004 for the Hurd code and 2005 for your changes.  I do not know where
2003 comes from.

> /* Read a byte from a port.  */
> static inline unsigned char
> inb (unsigned short port)
> {
>   unsigned char value;
>
>   asm volatile ("inb    %w1, %0" : "=a" (value) : "Nd" (port));
>   asm volatile ("outb   %%al, $0x80" : : );
>   
>   return value;
> }
>
> /* Write a byte to a port.  */
> static inline void
> outb (unsigned short port, unsigned char value)
> {
>   asm volatile ("outb   %b0, %w1" : : "a" (value), "Nd" (port));
>   asm volatile ("outb   %%al, $0x80" : : );
> }

Is it possible to share this code?  We need it for VGA and now for
play, we will need it more often for other code which we will write in
the future.

Thanks,
Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]