Home arrow 8086 Assembly Programs arrow Convert BCD to ASCII Friday, 05 December 2008
Home
- - - - - - -
Contact me!
My Blog!
- - - - - - -
- - - - - - -
8086 Assembly Programs
Graphics
Java Servlets
Prolog
VHDL
- - - - - - -
Ubuntu Linux
- - - - - - -
Links
Statistics
Visitors: 43313

   
Convert BCD to ASCII
Written by Rohit   
Monday, 10 April 2006
  1. ;Program to covert a packed BCD number to an ASCII number
  2.  
  3. .model small
  4. .data
  5. datasege segment
  6.     ans db 99h
  7. datasege ends
  8. .stack
  9. .code
  10. assume ds:datasege
  11. main proc
  12. mov ax, datasege
  13. mov ds, ax
  14. mov al, ans
  15. and al, 0f0h
  16. mov cl, 04h
  17. rol al, cl
  18. add al, 30h
  19. mov dl, al
  20. mov ah, 02h
  21. int 21h
  22. mov
  23.  al, ans
  24. and al, 0fh
  25. add al, 30h
  26. mov dl, al
  27. mov ah, 02h
  28. int 21h
  29. mov ah, 4ch
  30. int 21h
  31. main endp
  32. end main
 
< Prev   Next >

 

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.