Re: aeBIOS pc speaker in 32 bit protected mode asm
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Fri, 08 Feb 2008 23:55:10 GMT
Rod Pemberton wrote:
"Frank Kotler" <fbkotler@xxxxxxxxxxx> wrote in message
news:RRNqj.6876$Qj3.1746@xxxxxxxxxxx
Actually, it's supposed to "sub ebx, 1" which is more efficient than
"dec"
on a modern PC.
... and we all know how important efficiency is in a delay loop! :)
No, but consistent timing is, and yet no one questioned Terence's use of
LOOP which supposedly varies (?)... by cpu (?). Or, was that NOP?
Right. We really want a "timer"... or could calibrate a loop to compensate for CPU speed. Programming the Programmable Interrupt Timer should work with either Terrence's code or Mike's 32-bit version, I would think. The code I posted (not entirely my own) used "timer 2" for frequency, and int 15h for duration... the "example" I went by may have used bios timer ticks for duration, I really don't remember where that "came from".
Yes, I did notice your use of frequency tables (surprised).
Not "my" frequency tables, cribbed from some earlier example, I'm quite sure...
....
http://www.mathpages.com/home/kmath239/kmath239.htm
Yeah... I guess... My work is "accidental" in a somewhat different sense. :)
Am I missing something?
I can't answer that for you. What have you checked lately? Perhaps,
haven't checked lately... ;-)
Only thing I've checked lately is that the Linux version still works... here...
Anyone listened to this code?
Not I. Is it a piano?
No. The one I posted plays a "tune" (supposed to be "Sailor's Hornpipe"). Terrence's code, and Mikes 32-bit version, just beeps a single tone, as I read it. Guessing at the age of the original code, I'd bet that 300 is a little short for "duration" on a modern machine.
I *do* have a "piano.asm", an "organ.asm", and a "hymn.asm" in my collection of examples - not (yet?) converted to Nasm... maybe Bushido would like to see 'em as-is - should assemble with Tasm, I think. The first two hook int 9, the latter hooks int 1Ch.
Best,
Frank
.
- References:
- pc speaker in asm
- From: bushido
- Re: pc speaker in asm
- From: Terence
- Re: pc speaker in asm
- From: Mike Gonta
- Re: pc speaker in asm
- From: Wolfgang Kern
- Re: aeBIOS pc speaker in 32 bit protected mode asm
- From: Mike Gonta
- Re: aeBIOS pc speaker in 32 bit protected mode asm
- From: Frank Kotler
- Re: aeBIOS pc speaker in 32 bit protected mode asm
- From: Rod Pemberton
- pc speaker in asm
- Prev by Date: Re: aeBIOS pc speaker in 32 bit protected mode asm
- Next by Date: Write fault error writing device AUX
- Previous by thread: Re: aeBIOS pc speaker in 32 bit protected mode asm
- Next by thread: Re: aeBIOS pc speaker in 32 bit protected mode asm
- Index(es):
Relevant Pages
|