Re: aeBIOS pc speaker in 32 bit protected mode asm



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
.



Relevant Pages

  • Re: 8 bit microcontroller market
    ... You certainly don't need to do those state machines 100% synchronously, ... programming genius to do most of these (but it does take some ... For hardcore realtime apps the is no alternative to assembler yet. ... and a more advanced timer which would idle the CPU until a condition occurs. ...
    (comp.arch.embedded)
  • Re: Cant read CString after serialization
    ... programs for modern computers in modern languages etc, ... May you give an example of "sloppy" programming practices widely used ...
    (microsoft.public.vc.mfc)
  • Re: A modern C128 8-bit
    ... My personal views on a modern C128 like machine - - ... The DOS could be built as a relational database from the ground up. ... Right now there is no operating system that's based on relational ... can be for all types of programming. ...
    (comp.sys.cbm)
  • Re: LPT square wave
    ... timer or just plain delays? ... Plain delays (for example 'for' loops) will be depended on the system speed. ... In a Windows program that I've coded for programming AVR ...
    (sci.electronics.design)
  • Re: LPT square wave
    ... timer or just plain delays? ... Plain delays (for example 'for' loops) will be depended on the system speed. ... In a Windows program that I've coded for programming AVR ...
    (sci.electronics.design)