Advertisement
arfin97

4. a>b>c.asm

Oct 24th, 2017
601
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4. .CODE
  5. INCLUDE 'EMU8086.INC'
  6.  
  7. START:
  8. MOV AH, 1
  9. INT 21H
  10.  
  11. MOV BH, AL
  12. INT 21H
  13.  
  14. MOV BL, AL
  15. INT 21H
  16.  
  17. MOV CL, AL
  18. ;
  19.  
  20. CMP BL, BH
  21. JG CHECK1
  22. JL SEC1
  23.  
  24. CHECK1:
  25. MOV CH, BH
  26. MOV BH, BL
  27. MOV BL, CH
  28.  
  29. SEC1:
  30. CMP CL, AH
  31. JG CHECK2
  32. JL SEC2
  33.  
  34. CHECK2:
  35. MOV CH, AH
  36. MOV AH, CL
  37. MOV CL, CH
  38. ;
  39.  
  40. SEC2:
  41. CMP BL, CL
  42. JG CHECK3
  43. JL PRINT
  44. CHECK3:
  45. MOV CH, BL
  46. MOV BL, CL
  47. MOV CL, BL
  48.  
  49. PRINT:      
  50. MOV AH, 2
  51. MOV DL, BH
  52. INT 21H
  53.  
  54. MOV DL, BL
  55. INT 21H
  56.  
  57. MOV DL, CL
  58. INT 21H
  59.  
  60. END_IF:
  61. MOV AH, 4CH
  62. INT 21H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement