Closed Thread
Results 1 to 4 of 4

Thread: 8086 Assembler HELP

  1. #1
    BamaBUB1983 is offline Newbie
    Join Date
    Dec 2007
    Posts
    2
    Rep Power
    0

    8086 Assembler HELP

    I am currently attempting to learn the 8086 Assembler. This is a Lab that I am having problems with. Could someone please help?

    Write complete programs for the following problems.

    1. Place any binary number is register DX and count the number of binary ones in the number in DX in register AL.

    For example, the binary number 3F62h contains nine binary ones. Include a flowchart
    describing the program.

    2. Write a program that takes the smaller of two words stored in memory locations DS:1234h and DS:5678h and store in register AX.

    4. Add together all of the 2-word numbers that are stored from address 6000h to 60FFFh in memory. Store the sum starting at location
    61020h. Each 2-word number may range in size from 00000000h to FFFFFFFFh. State your assumptions as to how the words for each number are stored in memory and how large the final sum can be.
    Include a flowchart clearly describing your solution.

    5. Count the number of bytes located in memory from DS:1000h to DS:1200h that are greater than 77h. Place the count on register CX.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    Care to show us what you have attempted?

  4. #3
    Join Date
    Oct 2007
    Posts
    538
    Rep Power
    21
    I'd do this backwards. Write down your flowchart or pseudo code and then hand compile it, line by line. Far easier than trying to handle assembly by hand with no clear picture of how your code will work.

  5. #4
    BamaBUB1983 is offline Newbie
    Join Date
    Dec 2007
    Posts
    2
    Rep Power
    0

    Just Learning

    THis is what I came up with but having major problems with it. Any inputs??

    1.)
    code segment
    starthere:
    mov dx, al
    mov al, 000fh
    rcl al, 1
    rcl al, 1
    rcl al, 1
    rcl al, 1
    mov al, dx
    code ends

    2.)
    code segment
    starthere:
    mov ds, [1234h]
    mov w[s], ax
    mov ds, [5678h]
    mov w[s], ax
    code ends

    3.)
    code segment ;
    starthere:
    mov ax, 6000h
    mov ds, ax
    mov al, [03h]
    mov al, [0ch]
    mov [20h], al
    mov al, [04h]
    adc al, [0dh]
    mov [21h], al
    mov al, [05h]
    adc al, [0eh]
    mov [22h], al
    mov al, 00h
    adc al, 00h
    mov [23h], al
    jmp starthere
    code ends




    4.)
    code segment
    starthere:
    mov ax, [6000h]
    adc w[2], ax
    mov 61020h, ax
    code ends

    5.)
    code segment
    mov ax, [1000h]
    starthere:
    rcr ax, 01h
    jg great, 77h
    mov cx, ax
    great:
    nop
    code ends

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TASM i need help with code in assembly 8086
    By petno in forum Assembly
    Replies: 8
    Last Post: 04-18-2010, 01:08 PM
  2. Intel Some questions(8086 instruction set)
    By fondi in forum Assembly
    Replies: 3
    Last Post: 09-26-2009, 01:15 PM
  3. help on 8086 simulator
    By zeatwork in forum C# Programming
    Replies: 10
    Last Post: 04-24-2008, 08:49 AM
  4. Help with 8086 Assembly
    By SCR in forum General Programming
    Replies: 1
    Last Post: 03-12-2008, 08:09 AM
  5. Clear Window in 8086 Assembler, no Ints
    By omniscian in forum General Programming
    Replies: 1
    Last Post: 02-25-2008, 07:58 PM

Tags for this Thread

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