Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 778713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:48:35+00:00 2026-05-14T19:48:35+00:00

Please look at the following program, the error is invalid effective address calculation and

  • 0

Please look at the following program, the error is invalid effective address calculation and i have mentioned that line please tell me why its invalid effective address calculation
here is the program

[org 0x100]
jmp start


array1: dw 10,15,20,25,30,35,40,45,50,55
array2: dw 15,10,20,35,40,30,55,50,25,45

start:  mov bx,0
    mov cx,0
loop:   mov ax,[array2+bx]
        cmp ax,[array1+cx]//here is the error invalid effective address calculation 
        jne NextElementOfArray1


NextElementOfArray2:    add bx,2
                        cmp bx,20       
            je end
                        mov cx,0
            jmp loop


NextElementOfArray1:    add cx,2        
                        cmp cx,20       
            je NextElementOfArray2   
            jmp loop
end:    mov ax,0x4c00
    int 0x21
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:48:35+00:00Added an answer on May 14, 2026 at 7:48 pm
    start:  mov bx,0
            mov dx,0 ; <-- did you mean "mov cx, 0" ?
    loop:   mov ax,[array2+bx]
            cmp ax,[array1+cx]
    

    Edit: If I recall correctly, cx register can not be used as an index.

    Table 2-1. 16-Bit Addressing Forms with the ModR/M Byte

    Effective Address Mod R/M Value of ModR/M Byte (in Hexadecimal)
    
    [BX+SI]
    [BX+DI]
    [BP+SI]
    [BP+DI]
    [SI]
    [DI]
    [BX]
    [BX+SI]+disp8
    [BX+DI]+disp8
    [BP+SI]+disp8
    [BP+DI]+disp8
    [SI]+disp8
    [DI]+disp8
    [BP]+disp8
    [BX]+disp8
    [BX+SI]+disp16
    [BX+DI]+disp16
    [BP+SI]+disp16
    [BP+DI]+disp16
    [SI]+disp16
    [DI]+disp16
    [BP]+disp16
    [BX]+disp16
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have HttpClient 4.1. Please have a look at following program: import org.apache.http.client.methods.*; import
am new here. i have a slight problem; PLease look at the following code
Getting the above error in following code. How to rectify it. Thanks. Please look
please have a look at the following code import java.util.ArrayList; import java.util.List; public class
Please have a look at the following code namespace Funny { class QuesionsAndAnswers {
Please have a look at the following code: $(#saveButton).click(function(){ $this = $(#tableData).find(input:checked).parent().parent(); tea =
Please have a look at the following machine code ‎0111001101110100011100100110010101110011011100110110010101100100 This means something. I
Please have a look at the following code, which I have run in VB6
Question: I look for a program that can do the job for the following
Please have look on the following code: $_SESSION[process_y] = new Process(); $process_y = $_SESSION[process_y];

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.