Thursday, September 17, 2015

Assembly Sample Programs (emu8086)

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
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
example:
Enter a first number: 4
Enter a second number:2
product : 8
***********************
 SCREENSHOTS



  
  





#4) Lowercase to Uppercase Converter 

      (Single Character only)











#5) Asterisk Loop
















#6) Zeroes aligned right















#7) Addition, Subtraction , Multiplication and Division (more than one digit , no decimals)









#8) Addition, Subtraction , Multiplication and Division (single digit input only)













#9) Diagonal Letters
























#10) Loop Sample 1



















#11) Loop Sample 2


















#12) Loop Sample 3


















#13) Loop Sample 4
















No comments:

Post a Comment