Question

Write an 8086 assembly Language Program to find the length of a string that is available in the memory. The program output this value on the monitor. Assume that the end of a string is the character ‘#’. For example, if a string IGNOU# is available in program memory, then program will output string length 5 as the output. Make suitable assumptions, if any.

30 Nov 2017
Answer :
Word Count : 412

Here's an example of an 8086 assembly language program that calculates the length of a string stored in memory and outputs the result:

```assembly
.model small
.data
    msg db 'IGNOU#'
    len db 0

.code
    org 100h

main:
    mov ax, @data       ; Load data segment address into AX
    mov ds, ax          ; Set DS to point to the data segment

    mov si, 0           ; Initialize source index to 0
    mov al, msg[si]     ; Load the first

____ _____ _______ __________ ____ _____ ____ ___.
________ _____ ________ _______ ____ _________.
_________ ________ _______ _____ ___ ________ _______ _____ ____ __________ _______.
____ ____ _____ _________ _________ _____ ________ __________.
____ ___ ___ ____ __________ ______ ___ ________.
____ ________ _____ ____ ________ ________ ______ __________ __________ __________ ____.
__________ _________ __________ _____ _____ ________ ___ ______ _______.
_______ ____ ________ ______ ____ ____ __________.
________ _______ __________ _____ _________ ________ _________ ______ ________.
___ _____ __________ ______ _________ _________ ________ ________.
________ _______ ____ _______ __________ ____.
__________ ______ _____ _____ ____ _____ ______ _________ _______ ___ _______.
________ _____ ___ _______ ___ __________.
_______ ________ __________ _________ ____ ___ ________ _________ _________ _____.
_________ ___ _________ ______ ______ _____ __________ _______ ___.
_____ _______ _____ __________ _______ _________ _______ _____ _______ _______ _____ __________.
_____ _______ _________ __________ _______ ______ ___ _________ ________ ______.
_______ ________ __________ ________ _________ ____ _________ _____.
_________ __________ _______ _____ _______ _____ ______ ____ _______ _________.
___ ______ ___ ___ ___ _______ _________ ____ ______ _____ ___.
_______ ___ ___ _________ ______ __________ ____.
________ _________ ___ ________ __________ ______.
____ __________ __________ ________ ____ __________ __________ _______ __________.
___ _____ ___ ____ __________ ___ ___ _______ _______ _________ ______ ____.
___ ________ ___ ________ _________ __________ _______ ________ ____ ____ _____.
__________ _________ ______ __________ _____ _______ _______ __________ __________ _____ ________.
_______ ______ ___ ___ _____ _____ _________ __________ ________ _______ ___.
_______ __________ _______ _______ ________ ______ _______ ________ _______.
____ ________ ______ ____ ____ ______ ______ ______.
__________ _______ ____ __________ ____ _______ ____ __________.
____ _________ __________ ____ __________ _____.
____ ___ _______ _________ __________ ___ ___.
__________ _________ ______ ______ ____ _______.
_____ __________ __________ __________ ______ ________ ____ ______ ___.
_______ ____ ________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MCS 12 2010 - Write an 8086 assembly Language Program to find the length of a string | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→