BBS: Inland Empire Archive Date: 02-11-93 (18:40) Number: 348 From: JOHN GALLAS Refer#: NONE To: JAMES ZMIJEWSKI Recvd: NO Subj: SOUND BLASTER 2/2 Conf: (2) Quik_Bas
>>> Continued from previous message SUB WriteReg (Reg%, Value%) ' Purpose: Writes to any of the SB/AdLib's registers ' Variables: Reg%: Register number, ' Value%: Value to insert in register ' (Note: The registers are from 00-F5 (hex)) OUT &H388, Reg '388h = address/status port, 389h = data port FOR x = 0 TO 5 ' This tells the SB what register we want to write to A = INP(&H388) ' After we write to the address port we must wait 3.3ms NEXT x OUT &H389, Value ' Send the value for the register to 389h FOR x = 0 TO 34 ' Here we must also wait, this time 23ms A = INP(&H388) NEXT x END SUB ---------------------------<clip here>------------------------- That program will produce a motorcycle engine effect. I do have code that will play a frequency (from 0 to 800 I believe) on any of 11 octaves, and I'm waiting for the authors permission to post it. By the way, we've had quite a few people with names that have been tough to pronounce in the past few weeks, but yours tops them all! Can ya give me a hint? It looks like Zem-ij-ew-sky - am I close? * OLX 2.1 TD * Connection Attempt #172 ..<ring>...CONNECT 300...<CLICK> --- TMail v1.30.4 * Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET