The following examples must be used for educational purposes only.
Don't just download the codes, learn how they work.
#1) Produce a Short Beep Sound
You can use a loop to create a succession of beep sounds. The complete code to produce a single beep sound is right below.
org 100h
mov ah, 02
mov dl, 07h ;07h is the value to produce the beep tone
int 21h ;produce the sound
mov dl, 07h ;07h is the value to produce the beep tone
int 21h ;produce the sound
int 20h
ret
#2) Letters Only
The code is able to delete the character if it’s not a letter (a-z, A-Z). Its limitation: INPUT IS NOT BEING SAVED IN A BUFFER SO INPUT STRING IS NOT REUSABLE. I’m still figuring out how to do it.
#3) If num1>num2 show product else show sum
if first number is greater than second number display product
and if second number is greater than first number display sum
and if second number is greater than first number display sum
example:
Enter a first number: 4
Enter a second number:2
product : 8
Enter a first number: 4
Enter a second number:2
product : 8
***********************
SCREENSHOTS