Advertisement
tsnaik

MFP lab6

Aug 16th, 2015
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MFP lab 6
  2.  
  3. 1. BCD to binary
  4.  
  5.  
  6. code segment
  7.  
  8.     assume cs:code
  9.     MOV CX,00
  10.     mov BX, 1124h
  11.     mov AX, bx
  12.     and AX,0f000h
  13.     rcr AX,12
  14.     mov DX,1000
  15.     mul DX
  16.     add CX,AX
  17.     mov AX,BX
  18.     and AX, 0f00h
  19.     rcr AX,08
  20.     mov DX,100
  21.     mul DX
  22.     add CX,AX
  23.     mov AX,BX
  24.     and AX,00f0h
  25.     rcr AX,4
  26.     mov DX,10
  27.     mul DX
  28.     add CX,AX
  29.     mov AX,BX
  30.     and AX,000fh
  31.     add CX,AX
  32.     int 3
  33. code ends
  34. end
  35.  
  36.  
  37. 2. ASCII to binary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement