"Don't tell me how hard you work. Tell me how you get done."
- James J. Ling

Beep Beep Beep

October 13, 2006

This program beeps every 15 seconds unless you exit command prompt. I enjoyed running this, even adjusting the time and made it beep faster. People at home were worried and at the same time amazed of what i have done. Though i just read about this and revised a little. Try running this and enjoy!

;——————–initialize tsr———————- 
 init: 
     cli                     ; prevent further interrupts         
     mov ah, 35h           ; get the current CS:IP 
     mov al, 08h           ; of int 08 
     int 21h                      ; result to ES:BX 

     mov word ptr oldint8, bx               ; save BX 
     mov word ptr oldint8+2, es           ; save ES 

     mov ah, 25h                    ; set CS:IP 
     mov al, 08h                       ; for the new INT 08 

     mov dx, offset routine              ; DX=offset IP,  
     int 21h                            ; DS=CS set by COM 

     mov ah, 31h                        ; request stay resident 
     mov dx, offset init           ; set size of resident portion 

     sti                                      ; restore interrupts 
     int 21h 

 oldint8 dd ? 
 count dw 275                        ; 275 X 54.94 ms = 15 seconds 

 ;———————–resident program————————— 
 routine: 
     dec cs: count                        ; is the time up? 
     jnz exit 
     mov cs: count, 275                 ; if yes initialize the count 
     mov ah, 0eh                          ; and 
     mov al, 7                               ; beep the speaker 
     int 10h 
 exit: 
     jmp cs: oldint8                 ; take care of INT 08
Posted by phengpheng at 4:46 pm | permalink

All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.

Add a comment








     

October 2006
M T W T F S S
« Sep   Nov »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

About Me

A Computer Science graduate who is a fanatic in assembly, java, and j2me programming. Developed BlueVoice system (Direct Voice Communication in Mobile Phones), this system allows mobile users to experience FREE VOICE CALLS

Subscribe

Technorati
Bloglines

Tagboard

phengpheng:

Haven’t managed my blog for a long time already because I’m so busy now… Sorry to cause you guyz trouble…

Jun Mark:

hoW tO creaTE a PrOGram thAT woULD oUTpuT ascii table???

Jun Mark:

pLZ anSwer mY qUEstions

cutieGurl:

how to convert binary to hexadecimal, decimal and octal?????????please. answer me??????????

mary ann:

kuya, ung binary to decimal converter nyo. mali man? ung sa mga compare mo. ung may 0,9,A,F etc… bad character lumalabaspls rep asap po. tnx

carol:

how to convert decimal to binary to octal and hexadecimal

Galwin:

been here!

galwin:

nice site. hope you could visit mine, too.

pathy:

FRIENDS FOREVER!! Miss you na!!!

ridvan:

aus, i seldom see lady programmers. hehe. keep it up. and oh yeah, i guess i saw you during the MICT Quiz Show held in cdo. :)
keep up the codes!

phengpheng:

I miss updating this blog… Sana may time and pc ako to learn new stuffs aside from my work…

support:

Congratulations, you’ve just completed the installation of this shoutbox.

pheng:

uy! you’re here again!

Jay:

Woooohhhh orange…sweat… nakakasilaw! hehe :)

jay:

tagboard flood hehe sensya… had nothing fun to do. :)

pheng:

jaaaaayyyyy….:) ketal man?:)

niel:

no spamming please :p hehehe joke lang jay.

Jay:

Uyyyyyy!!!! Grraaaaaaaiiiinnnneeee
:)
Sssshhhh, el sikret! :)
Niiiiiiiiiiiiieeeeeel
Sup dude!!!!
Paaaaaaaaaaaaaathy
Ketal!?

niel:

ei pheng! :D slick-elegant layout! love it!

yue:

phengpheng!

Leave a message ▼