home *** CD-ROM | disk | FTP | other *** search
- ===========================================================================
- BBS: The Abacus * HST/DS * Potterville MI
- Date: 05-25-93 (07:00) Number: 134
- From: LUIS ESPINOZA Refer#: 255
- To: LES FENISON Recvd: NO
- Subj: Borland C++ For OS/2 Conf: (36) C Language
- ---------------------------------------------------------------------------
- On (21 May 93) Les Fenison wrote to All...
-
- LF> Hello All!
- LF>
- LF> I recently purchased BC/2 and have many questions. I called Borland
- LF> tech support only to find out that their tech support people arn't the
- LF> least bit technical. I would be suprised if they knew the difference
- LF> between C and Basic! So... hopefully someone here can answer these
- LF> questions...
- LF>
- LF> 1. Borland says it is impossible to make the pc speaker beep when you
- LF> are
- LF> programming in OS/2 C. I don't buy this!! Can anyone tell me how
- LF> to
- LF> do it?? I know there is no longer a sound() and nosound() but
- LF> there
- LF> has to be a way since I have seen several programs in OS/2 that do.
- LF> The application is a non-PM application.
-
- Ya, no I got bored one day and thought I would Disassemble the
- sound/nosound routines.
- Here is what they look like:
- Hope It Helps,
- Luis Espinoza
-
-
-
- ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
- ; SUBROUTINE
- ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-
- Sound proc near
- push bp
- mov bp,sp
- mov bx,[bp+4]
- mov ax,34DDh
- mov dx,12h
- cmp dx,bx
- jae l_37C2_1688 ; Jump if above or =
- div bx ; ax,dx rem=dx:ax/reg
- mov bx,ax
- in al,61h ; port 61h, 8255 port B, read
- test al,3
- jnz l_37C2_1680 ; Jump if not zero
- or al,3
- out 61h,al ; port 61h, 8255 B - spkr, etc
- mov al,0B6h
- out 43h,al ; port 43h, 8253 wrt timr mode
- l_37C2_1680: ; xref 37C2:1676
- mov al,bl
- out 42h,al ; port 42h, 8253 timer 2 spkr
- mov al,bh
- out 42h,al ; port 42h, 8253 timer 2 spkr
- l_37C2_1688: ; xref 37C2:166C
- pop bp
- retn
- Sound endp
-
-
- ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
- ; SUBROUTINE
- ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-
- NoSound proc near
- in al,61h ; port 61h, 8255 port B, read
- and al,0FCh
- out 61h,al ; port 61h, 8255 B - spkr, etc
- ; al = 0, disable parity
- retn
- NoSound endp
-
-
- --- PPoint 1.37
- * Origin: Ward-B (SoCal) - (909) 793-xxxx - Pvt (1:207/213.5)
- SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1
- SEEN-BY: 153/752 154/40 77 157/2 159/100 125 575 950 203/23 209/209 261/1023
- SEEN-BY: 280/1 390/1 396/1 5 15 2270/1 2440/5 3603/20
-