image image image

C2L is a one stop destination for all campus and life related queries. It is the only platform cum forum that allows users to discuss, post, interact among each other and utilize all the resources that the website hosts.

We treat our articles as recipes.Spice, Sweet, Sour, Savory mixed together to have a balancing act. Our forum is not just about jobs or notes, we discuss about various life related situations and problems that help people in all walks of life.

" The Best of the Best". Learn, Analyze and Crack all the secrets of an interview. A composition of the best complied and penned interview strategies.

  • Introduction
  • Articles
  • Expert Training
Forum
Welcome, Guest
Username Password: Remember me

To write an assembly language program to perform packed bcd into unpacked bcd conversion.
(1 viewing) (1) Guest
Lab Programs
  • Page:
  • 1

TOPIC: To write an assembly language program to perform packed bcd into unpacked bcd conversion.

To write an assembly language program to perform packed bcd into unpacked bcd conversion. 2 years, 9 months ago #452

  • anilsrimanth
  • ( Moderator )
  • OFFLINE
  • Moderator
  • Posts: 97
  • Karma: 0
To write an assembly language program to perform packed bcd into unpacked bcd conversion.

REGISTERS USED: AX,DS,BL,CL

FLAGS AFFECTED: PF

PROGRAM:
ASSUME CS:CODE,DS:DATA
CODE SEGMENT
MOV AX,DATA
MOV DS,AX
MOV AL,BCD
MOV BL,AL
AND AL,0FH
MOV UPBCD1,AL
MOV AL,BL
AND AL,0F0H
MOV CL,COUNT
ROR AL,CL
MOV UPBCD2,AL
HLT
CODE ENDS

DATA SEGMENT
BCD DB 49H
COUNT DB 04H
UPBCD1 DB ?
UPBCD2 DB ?
DATA ENDS
END

RESULT:
INPUT:
BCD = 49
OUTPUT: UPBCD1 = 09
UPBCD2 = 04
  • Page:
  • 1
Time to create page: 0.37 seconds

Member Login






Forgot login?
Register

Member Mailbox

You are not logged in.

Members Online

None

Site Search

Site Testimonials

Close