Results 1 to 5 of 5

Thread: Assembly Beginner Help

  1. #1
    Join Date
    Jan 2010
    Beans
    419
    Distro
    Ubuntu Development Release

    Question Assembly Beginner Help

    where are my errors ( line 7,20,11,16,19) with masm ?
    Code:
    .model small
    .stack 100h
    .data
    main proc
        mov ax,@data
        mov ds,ax
        top:
            push ax
            and ax,0000000000011000b
            cmp ax,0000000000011000b
            je  true
            pop ax
            push ax
            and ax,0000000001100000b
            cmp ax,0000000001100000b
            je true
            pop ax
            inc ax
            jmp top
        true:
            pop ax
    main endp
    end main

  2. #2
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: Assembly Beginner Help

    If you want others to help you, consider also adding the errors you are getting (copy&paste) to your post. Also add line numbers to your source code. Finally, state *how* you are assembling your source code (which platform?, which options?), because that actually makes a difference.

  3. #3
    Join Date
    Jan 2010
    Beans
    419
    Distro
    Ubuntu Development Release

    Re: Assembly Beginner Help

    screenshot
    Attached Images Attached Images
    Last edited by cap10Ibraim; June 13th, 2010 at 04:25 PM.

  4. #4
    Join Date
    May 2007
    Beans
    245
    Distro
    Ubuntu 10.04 Lucid Lynx

    Lightbulb Re: Assembly Beginner Help

    Insert a line ".code" between the ".data" and "main proc" lines and your errors will go away.

    Nathan.

  5. #5
    Join Date
    Jan 2010
    Beans
    419
    Distro
    Ubuntu Development Release

    Re: Assembly Beginner Help

    Quote Originally Posted by NathanB View Post
    Insert a line ".code" between the ".data" and "main proc" lines and your errors will go away.

    Nathan.
    thanks what a silly mistake

Bookmarks

Posting Permissions

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