Results 1 to 2 of 2

Thread: Hello, looking for some help with an assembly code loop, thanks

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2008
    Posts
    44

    Hello, looking for some help with an assembly code loop, thanks

    the loop is, in a high level language:

    While True
    If Temp <10
    Then close Windows
    Else open Windows
    End If
    End While


    the problem is, if I want to close the windows I have to set the first bit of the memory location 'House' to 0, without disturbing any other bits.

    if i use the assembly code:

    LDA 0
    ST House

    that will ruin the rest of the byte of data. how can I refer to one bit of memory?

    any help is great, thanks

    Will

  2. #2
    Member
    Join Date
    Oct 2006
    Posts
    53

    Re: Hello, looking for some help with an assembly code loop, thanks

    jmp @F
    again:
    cmp dword ptr [Temp],0Ah
    jae no
    ;close windows
    jmp @F
    no:
    ;open windows
    @@:
    or eax,eax
    jne again

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