Advertisement

05.06.2008 at 09:53AM PDT, ID: 23380113
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Convert from dec to hex and binary by assembly language

Hi experts,
I dont know whats the error in this code,please help me to convert the numbers

data segment
count DW  8
BIN   DW  8  dup(0)
HEX   DB  '0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F$'
msg0  DB  'Enter number $'
msg1  DB  'Decima1 is $'
msg2  DB  'Hexadecimal is $'
msg3  DB  'Sorry,Wrong number!$'
     
data ends

working_storage  segment    stack
                 dw         100h    dup(?)
             working_storage  ends
             


code           segment
               assume cs:code,ds:data,ss:working_storage
               extrn putdec:proc,putcrlf:proc,getdec:proc,getchar:proc,putchar:proc

start:
      mov ax,data
      mov ds,ax
     

go:   mov Dx,offset msg0
      mov ah,9h
      int 21h
      call putcrlf
      call getdec  
      cmp  ax,255
      jae  finish
      mov bx,ax

      mov cx,2
      mov dx,offset msg1
      mov ah,9h
      int 21h

      mov count,8
      mov si,0
     
repeat:
      mov ax,bx
      mov dx,0
      div cx
      cmp ax,0
      jz done
      mov BIN[si],dx
      inc si
      inc si
      dec count
      jnz repeat
 done: mov si,14
       mov BIN[si],dx
   do: mov ax,BIN[si]
       call putdec
       dec si
       dec si
       jnz do  
           


next: mov ax,bx
      mov cx,16
      mov si,16
again:div cx
      mov HEX[si],dx
      cmp ax,0
      jnz again
      dec si
      jnz again

  yes:call putcrlf
      mov dx,offset msg2
      mov ah,9h
      INT 21h
      mov ax,HEX[si]
      call putdec
      call putcrlf
     jmp  go


 






finish:mov dx,offset msg3
      mov ah,9h
      INT 21h
     
      mov ax,4c00h
      int 21h


     
code ends
end start
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: albusaidi
Solution Provided By: Infinity08
Participating Experts: 1
Solution Grade: A
Views: 8
Translate:
Loading Advertisement...
05.07.2008 at 01:27AM PDT, ID: 21514177

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 06:06AM PDT, ID: 21515937

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 06:31AM PDT, ID: 21516166

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 06:56AM PDT, ID: 21516387

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.08.2008 at 01:12AM PDT, ID: 21951813

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.08.2008 at 06:39PM PDT, ID: 21959972

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.09.2008 at 12:26AM PDT, ID: 21961259

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.12.2008 at 08:13AM PDT, ID: 21989407

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628