home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
asm_programming
/
ASCIIORG.LST
< prev
next >
Wrap
File List
|
1990-10-03
|
3KB
|
104 lines
Microsoft (R) Macro Assembler Version 5.10 10/3/90 21:13:43
Page 1-1
;ASCII Organ
0000 code segment
0100 org 100h
assume cs:code
= 0042 timer equ 42h
= 0061 speaker equ 61h
0100 E8 010E R start: call getkey ; store key pre
ssed in AL
0103 3C 1B cmp al,1bh ; escape?
0105 75 02 jne skip
0107 CD 20 int 20h
0109 E8 0113 R skip: call beep ; if not escape
, beep according to
010C EB F2 jmp start ; value in AL,
and return
010E B4 07 getkey: mov ah,7 ; prepare for i
nterrupt
0110 CD 21 int 21h ; execute DOS f
unction 7
0112 C3 ret ; return with k
ey in AL
0113 8A D8 beep: mov bl,al ; store key in
BL
0115 B0 B6 mov al,0b6h ; prepare timer
for
0117 E6 43 out timer+1,al ; accepting new
division
0119 B0 00 mov al,0 ; send 0 as LSB
011B E6 42 out timer,al ; of the new di
visor
011D 8A C3 mov al,bl ; and key value
011F E6 42 out timer,al ; like MSB
0121 B0 4F mov al,4fh ; start sound b
y linking the
0123 E6 61 out speaker,al ; speaker and t
imer
0125 B9 FFFF mov cx,0ffffh ; pause
0128 F3/ AD rep lodsw ; while the not
e is played
012A B0 4D mov al,4dh ; stop by cutti
ng the connection
012C E6 61 out speaker,al ; between speak
er and timer
012E B4 02 mov ah,2 ; prepare for D
OS output function
0130 B2 0E mov dl,0eh ; (out) charact
er to send
0132 CD 21 int 21h ; symbol of the
note to the screen
Microsoft (R) Macro Assembler Version 5.10 10/3/90 21:13:43
Page 1-2
0134 C3 ret
0135 code ends
end start
Microsoft (R) Macro Assembler Version 5.10 10/3/90 21:13:43
Symbols-1
Segments and Groups:
N a m e Length Align Combine Class
CODE . . . . . . . . . . . . . . 0135 PARA NONE
Symbols:
N a m e Type Value Attr
BEEP . . . . . . . . . . . . . . L NEAR 0113 CODE
GETKEY . . . . . . . . . . . . . L NEAR 010E CODE
SKIP . . . . . . . . . . . . . . L NEAR 0109 CODE
SPEAKER . . . . . . . . . . . . NUMBER 0061
START . . . . . . . . . . . . . L NEAR 0100 CODE
TIMER . . . . . . . . . . . . . NUMBER 0042
@CPU . . . . . . . . . . . . . . TEXT 0101h
@FILENAME . . . . . . . . . . . TEXT asciiorg
@VERSION . . . . . . . . . . . . TEXT 510
40 Source Lines
40 Total Lines
12 Symbols
47908 + 289671 Bytes symbol space free
0 Warning Errors
0 Severe Errors