Jump to content

Assembly Language Help Needed

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
dsptl

dsptl

    Newbie

  • Members
  • PipPip
  • 10 posts
I am new to this lang.

Write an assembly language program expr.m to compute:

y = 3x^4 + 5x^3 – 17x^2 +33x - 15

where x=3. Eliminate all nop instructions and run the program using gdb.

I tried but i can't get it done....someone please help
I ti

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,822 posts
Which version of assembly are you using? What do you have so far?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
dsptl

dsptl

    Newbie

  • Members
  • PipPip
  • 10 posts
this is my 1st ever assembly prgm

we use SSH

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,822 posts
You don't understand. Assembly for ARM is very different from assembly for Pentiums. Assembly is not a single language, it is a family of languages. SSH is how you are connecting to to computer you are programming on, not the code you have.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
dsptl

dsptl

    Newbie

  • Members
  • PipPip
  • 10 posts
here is what i did:

define(x_r, l0)
define(y_r, l1)

.global main
main:

mov 3, %x_r




then i dont know wht to do......and i am using pico text editor

#6
Sysop_fb

Sysop_fb

    Programmer

  • Members
  • PipPipPipPip
  • 160 posts
SPARC assembly?

This is homework. You can't figure out where to start? You could try writing it out in another language first or just writing out how the program will flow in your own words. That way you can get your head straight.

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,822 posts
y = 3x^4 + 5x^3 – 17x^2 +33x - 15 means
y=3*x*x*x*x + 5*x*x*x - 17*x*x + 33*x - 15
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
dsptl

dsptl

    Newbie

  • Members
  • PipPip
  • 10 posts

WingedPanther said:

y = 3x^4 + 5x^3 – 17x^2 +33x - 15 means
y=3*x*x*x*x + 5*x*x*x - 17*x*x + 33*x - 15

thanks i have got it.....