Jan 172018
 
Hear your interupts.
File NOISE.ZIP from The Programmer’s Corner in
Category System Diagnostics
Hear your interupts.
File Name File Size Zip Size Zip Type
NOISE.ASM 1665 638 deflated
NOISE.COM 80 80 stored
NOISE.DOC 4674 2024 deflated
NOISEMAK.BAT 1349 690 deflated

Download File NOISE.ZIP Here

Contents of the NOISE.DOC file


Description
-----------

NOISE is a very short program that clicks the speaker whenever an
interrupt of a given type occurs. To invoke it, type "NOISE xx"
at the DOS prompt, where xx is the (hex) interrupt number. e.g.
to "hear" the clock, try "NOISE 08". Assembler source included.
Illustrates TSR, Speaker control, and intercepting an interrupt.
You can assemble it even if you don't have an assembler!
Graeme McRae [73307,2453]


Keywords
--------

NOISE SOUND DEBUG ASSEMBLER SPEAKER TSR INTERRUPT CLICK CLOCK TIMER


Descriptions of files in this ARC
---------------------------------

NOISE.DOC Documents the use of NOISE, and the techniques that
were used to create these files.

NOISE.ASM The original assembler source, that was assembled and
linked to create NOISE.COM.

NOISE.COM The executable NOISE program.

NOISEMAK.BAT A batch file that will re-assemble NOISE, even if
you don't have an assembler!

Usage
-----

NOISE, and its documentation, have the following uses:

o Illustrates assembler coding techniques for TSR and speaker
o Can help you debug programs that fiddle with interrupts
o Shows you a technique for transmitting .COM files in .TXT format

Coding techniques. Since NOISE is so short (36 assembler
statements) the techniques are not obscured by mountains of code.
Just read the program logic section, below, while following along
in the source code.

Debug programs. If you are writing a program that outputs
commands to the programmable timer to change the clock speed, for
example, invoking NOISE 08 prior to running your program will
allow you to hear when the change has been made. In fact, this
was the original purpose of NOISE. If you are wondering whether
a program uses DOS calls during a certain function, invoke NOISE
21. You'll here all DOS calls. You can hear two or more
interrupts at the same time by invoking NOISE two or more times.


Using NOISEMAK.BAT
------------------

First, set your path to include the directory containing DEBUG
and the directory containing NOISEMAK.BAT. Change directory
(and/or set your default drive) to the place where you want to
save NOISE.COM. Press Ctrl-PrtSc if you want to have a listing
of the program. Then, at the DOS prompt, type "NOISEMAK".
When it is finished, press Ctrl-PrtSc to turn off echo mode.


Technique for transmitting .COM files in .TXT format
----------------------------------------------------

As a side-effect of developing NOISE, I discovered a cute way to
transmit a short .COM file in .TXT format. That is, the .COM
file is converted into a form consisting of only ASCII characters
so that it can be printed out, typed in, or transmitted using
Start-Stop protocol.

This technique works my using DEBUG to unassemble the file, which
can then be transmitted. The recipient uses DEBUG to re-assemble
the file. The beauty of this technique is that no special
software is required -- it all comes with DOS.

I started by assembling and linking NOISE.ASM to make NOISE.COM.
I checked the size of NOISE.COM, and found it was 80 bytes, or
hex 50. Then, I called DEBUG, as follows:

DEBUG noise.com>noisemak.bat
u 100 l 50
q

The u command unassembles the .COM file, starting at location
100, for a length of 50. (COM files always start at 100). As you
may know, DEBUG uses *only* hexadecimal numbers. Since I
re-directed the output to NOISEMAK.BAT, I received no DEBUG
prompts for the u or q commands.

Then, I used a text editor to delete the first 24 characters of
each line, leaving only the assembly language statements. I put a
goto at the top so noisemak.bat can serve as both a .BAT file and
as input to DEBUG. At the end, I put DEBUG commands that set the
name of the file, and set BX:CX to the size of the file. The "w"
command writes the file out on the default drive and directory.
The "q" command quits DEBUG. Everything that follows is ignored
by DEBUG, but as you remember, the GOTO comes here to execute the
DOS command that starts everything off at the receiving end.


Program Logic
-------------

NOISE consists of two parts: the resident part, and the
initialization code. The first statement branches around the
resident part to the initialization code, which de-codes its
argument, saves the old interrupt vector, and sets the new
interrupt vector. Last, NOISE terminates and stays resident.

The resident part changes the position of the speaker cone, then
does an indirect far jump to the old interrupt vector that was
saved by the initialization code.


 January 17, 2018  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)