Two 8086 Assembly Language Questions..

  • Follow


Hi Friends, 

can anyone help me with this : I am unable to do my assignments ..

1>Write a 8086 assembly language subroutine that can be used for
passward matching.

    Interface/call this subroutine from a C program.

2>Write a program in 8086 assembly language that accept two floating
point numbers from the screen in format:

ddddEsee

             where, 

             dddd are four decimal digits    

             E  is exponent symbol

             s   is sign

             ee contains exponent value.

A decimal is assumed prior to four decimal digits.For example a number
45 in the above   format will be:4500E+02.The program adds the two
numbers if the exponent value is same,otherwise issues an error
message"Exponent does not match".


Thanks,

Madhumita

0
Reply madhumita0609 10/30/2003 7:18:24 AM

"Madhumita" <madhumita0609@yahoo.co.in> wrote in message news:e128276e.0310292318.72580d39@posting.google.com...
> Hi Friends,
>
> can anyone help me with this : I am unable to do my assignments ..
>
> 1>Write a 8086 assembly language subroutine that can be used for
> passward matching.
>
>     Interface/call this subroutine from a C program.

In HLA:

procedure matchPassword( inStr:string; passwd:string ); @cdecl;
begin matchPassword;

    str.eq( inStr, passwd );
    // Just return boolean value in EAX...

end matchPassword;

// That was easy :-)

>
> 2>Write a program in 8086 assembly language that accept two floating
> point numbers from the screen in format:
>
> ddddEsee
>
>              where,
>
>              dddd are four decimal digits
>
>              E  is exponent symbol
>
>              s   is sign
>
>              ee contains exponent value.
>
> A decimal is assumed prior to four decimal digits.For example a number
> 45 in the above   format will be:4500E+02.The program adds the two
> numbers if the exponent value is same,otherwise issues an error
> message"Exponent does not match".

Hint: use HLA's stdin.get stdlib routine to read the two values as floating
point numbers, use the math.log stdlib routine to extract their exponents,
and compare the exponents. If equal, do your thing; else print that they
don't match. If you really need to do it as string processing, try using HLA's
pattern matching facilities.
Cheers,
Randy Hyde


0
Reply Randall 10/31/2003 6:36:41 AM


1 Replies
486 Views

(page loaded in 0.032 seconds)

Similiar Articles:













7/25/2012 9:31:19 AM


Reply: