Results 1 to 7 of 7

Thread: backward and forward loops?

  1. #1

    Thread Starter
    Hyperactive Member g4hsean's Avatar
    Join Date
    May 2006
    Posts
    267

    Question backward and forward loops?

    Hello fellow assembly programmers, i am here seeking some help on clarifying a topic that I've read about in "Professional Assembly Language".

    The author explains the differences in forward and backward loop statements, but i cant picture the two different loops in my head....

    All i am looking for is an example of both kinds with some tips on how to distinguish between the two. i understand why the backward loops are beneficial to the processor but cant picture the two different kinds of loops in my head.


    P.S thanks in advance for clarifying this.
    Coding's a Breeze if you'r at ease! GOD THATS CORNY!!
    -

  2. #2

    Thread Starter
    Hyperactive Member g4hsean's Avatar
    Join Date
    May 2006
    Posts
    267

    Cool Re: backward and forward loops?

    well i guess not too many people out there understand assembly all that much any more.....

    Anyways, i ended up answering my own question while read several other books. All i can say is, too bad there's not enough people to help....

    Anyways, Thanks for viewing?
    Coding's a Breeze if you'r at ease! GOD THATS CORNY!!
    -

  3. #3
    New Member
    Join Date
    Nov 2008
    Posts
    4

    Re: backward and forward loops?

    Hi g4hsean,
    You are not only the person who wait for the answer of your question but i also waiting for your answer.So if you got your answer please post in your thread.

  4. #4

    Thread Starter
    Hyperactive Member g4hsean's Avatar
    Join Date
    May 2006
    Posts
    267

    Re: backward and forward loops?

    ok well the answer to my question was, if i remember correctly. backward loops are sort of like do while loops where the code between the loop tag and the conditional jump is the most likely to occur.

    Example:
    Code:
    loop:
    code
    code
    more code
    cmp
    jnz loop
    and as for the forward loop, its more like a time synchronizer, it checks if the time is correct and if it isnt it will correct it. example:
    Code:
    checked:
         cmp computertime, internet time
         jne fix
         jmp checked
    fix:
         set time routine
         jmp checked
    so basically the most likely code to be executed is the "jmp checked" which follows the cmp and the "jmp fix" code and the least likely is the fix time routine. And that is the difference between the two. if something is not clear dont hesitate to ask for help. im willing to help.

    P.S if you need help, i do Assembly on IA32 processors on either Intel or GNU assemblers for UNIX and or Microshaft (Microsoft). Please specify the operating system and assembler used so as not to confuse the syntax.
    Coding's a Breeze if you'r at ease! GOD THATS CORNY!!
    -

  5. #5
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: backward and forward loops?

    what was the original statement you didn't understand?
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  6. #6

    Thread Starter
    Hyperactive Member g4hsean's Avatar
    Join Date
    May 2006
    Posts
    267

    Re: backward and forward loops?

    the statement is found in the book i was reading.... they way the author put it was really misleading in my opinion, so i asked if someone could clarify what the true meaning of backward and forward loops were, for i haven't found any explanation concerning my question on Google. So after a couple of days programming in assembly the answer hit me and then it became clear to what the author meant by backward and forward loops.

    I know its nothing hard to understand, i was just not sure what the author meant by backward and forward loops. Anyways i recalled when i first started learning java about the while and do-while loops and now i know in what context the author was putting the backward and forward loop statement.

    In all i figured it would be good to have the question up on the net for future programmers looking to take up assembly such as i.
    Coding's a Breeze if you'r at ease! GOD THATS CORNY!!
    -

  7. #7
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: backward and forward loops?

    like i said it would be helpful to see what the author said, otherwise i have no comment.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width