Confused, assembly code hw

Discussion in 'OT Technology' started by schafbo, Dec 6, 2008.

  1. schafbo

    schafbo New Member

    Joined:
    Dec 27, 2004
    Messages:
    5
    Likes Received:
    0
    Problem states:
    Write a program that inputs any sentence from the user in the console (ending with a '.') Then reverse the words in the sentence, but not the characters in each word.

    E.G.
    The quick brown fox jumped over the lazy dog's back.

    back. dog's lazy the over jumped fox brown quick The

    Any tips on how to get started? Reversing the characters a string was fairly easy as you could just push each byte into a stack (as we did on a previous homework). I really have no idea where to go as far as word order.
     
  2. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    You could do it the same way. Instead of individual characters, you'd put pointers to strings on the stack.
     

Share This Page