From: randyhyde on
On May 11, 2:47 pm, Frank Kotler <fbkot...(a)verizon.net> wrote:
> Herbert Kleebauer wrote:
> > Evenbit wrote:
>
> >>>(a) Write an assembly language program to accept a decimal number and
> >>>display it's two's complement representation in binary and hexadeimal
> >>>formats.
>
> >>>(b) Write an 8086 assembly language program that will compute:
> >>>2.0* log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other
> >>>values using a loop. All values are in the single-precision (short
> >>>real) format.
> >>>(c ) Write a program that will input a positive integer and print
> >>>out the list of its prime factors. Comment on the run time of your
> >>>algorithm and state any limitations that you have imposed on the input
> >>>integers.
> >>>(d) Write an assembly language program to implement the queue
> >>>management.
>
> >>If you provide your teacher's email address, we can save you the
> >>trouble of handing it in. ;)
>
> > No, please post the answer, I really want to see it. If this are
> > really the questions he got, the teacher should go back to school
> > and learn how to formulate well specified questions. In the given
> > form they can't be answered. Or maybe he is using HLA where the
> > students only have to learn the "call" instruction to call the
> > proper function in the HLA standard library.
>
> No, with HLA you *don't* need to learn the "call" instruction! (it is
> alleged that one will eventually learn "real assembly" with HLA, but it
> occurs to me that I've never seen a question from an HLA user involving
> "call"...)

Uh...
Even with the HLL-like procedure call, you still have to learn the
call instruction to use HLA properly. There are things like
"call( eax );" for which there are no HLL-like equivalents.

hLater,
Randy Hyde

From: wolfgang kern on

"Umesh" asked:
> Q1:
>
> (a) Write an assembly language program to accept a decimal number and
> display it's two's complement representation in binary and hexadeimal
> formats.
>
> (b) Write an 8086 assembly language program that will compute:
> 2.0* log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other
> values using a loop. All values are in the single-precision (short
> real) format.
> (c ) Write a program that will input a positive integer and print
> out the list of its prime factors. Comment on the run time of your
> algorithm and state any limitations that you have imposed on the input
> integers.
> (d) Write an assembly language program to implement the queue
> management.


As you may have recognised by all the answers got so far,
we wont do your homework (and I've seen this your question already).


But if you really want help from this group, tell us what you not
understood and/or where you got stuck.

__
wolfgang



From: randyhyde on
On May 11, 2:47 pm, Frank Kotler <fbkot...(a)verizon.net> wrote:
>
> My question for the OP: is "100.5" a typo, or what??? Does the
> instructor know there's no FPU on an 8086???

The question did claim it was single precision real. And they *did*
have 8087s back then. But even if you didn't have an 8087, there's
nothing stopping you from writing your own floating-point routines in
software. Maybe the instructor doesn't know the difference between
8086 and 80x86. Maybe the student didn't copy the assignment across
properly.

In any case, computing the log of 100.5 is no more difficult than
computing the log of 0.1. Other than cheating, you're still going to
need some function (or instruction) to compute the value for you
(unless the class is full of brilliant numerical analysts and the
students are expected to write this code on their own -- probably not
given the level of the other assignments). I'd guess that this student
didn't exactly tell us everything about this assignment.
hLater,
Randy Hyde


From: Frank Kotler on
randyhyde(a)earthlink.net wrote:

....
>>No, with HLA you *don't* need to learn the "call" instruction! (it is
>>alleged that one will eventually learn "real assembly" with HLA, but it
>>occurs to me that I've never seen a question from an HLA user involving
>>"call"...)
>
>
> Uh...
> Even with the HLL-like procedure call, you still have to learn the
> call instruction to use HLA properly. There are things like
> "call( eax );" for which there are no HLL-like equivalents.

Okay... so you're saying there *have* been questions like this, and I;ve
missed 'em (or my memory's bad). Quite possible.

I see a few instances - damn few - of "call" in the "examples" directory...

If I were to ask on the !Yahoo! group, "how many of you know the call
instruction?", how many answers do you predict I'd get? (careful, it's
an easy experiment to conduct! :)

(yeah, I know I just asked "how many of you are using Linux?"...
apparently zero, which I don't think is the correct answer)

Best,
Frank
From: Jim Carlock on
"Frank Kotler" wrote...
: (yeah, I know I just asked "how many of you are using Linux?"...
: apparently zero, which I don't think is the correct answer)

I read about it and download it every so often. Downloading
counts as using it, right?

Happy Mother's Day, whether it's Mother's Day or not!

--
Jim Carlock
Post replies to the group.


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
Prev: RIP relative adresses
Next: ANSWERS