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

  • Home
  • SEARCH
  • 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 387189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:38:57+00:00 2026-05-12T15:38:57+00:00

INCLUDE Irvine16.inc .data byteArray BYTE 6 DUP(?) listSize = ($ – byteArray) aSum WORD

  • 0
INCLUDE Irvine16.inc

.data
    byteArray   BYTE 6 DUP(?)
    listSize = ($ - byteArray)
    aSum        WORD 0
    soffset = 0
.code
main PROC
    mov     ax, @data
    mov     ds, ax
    mov     cx, listSize
Loop1:
    mov     ax, 0
    movzx   ax, [byteArray + soffset]
    add     aSum, ax
    soffset = soffset + 1
    loop Loop1
    exit
main ENDP
END main

The error I’m getting is error “A2074:cannot access label through segment registers”

I’m trying to use the soffset to loop through the byteArray.

  • 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-12T15:38:57+00:00Added an answer on May 12, 2026 at 3:38 pm

    I’m not sure what’s in Irvine16.inc, but I bet it is saying .model small,... at some point.

    If you add

    ASSUME DS:_DATA
    

    then your error messages will go away, although I doubt if that’s enough to make the program run.


    Ok, I’ve got an idea. I think you should switch to the 32-bit examples. That’s a flat model where the segment registers are set up by the OS and not used by programs. I just downloaded the irvine examples and the sample project, which happens to be 32-bits did assemble and run.

    In the wierd and twisted world that is x86 machine code, the 16-bit model is quite a bit more complex than the 32-bit model, at least from the point of view of a user program.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#include <stdio.h> int main() { unsigned long long int num = 285212672; //FYI: fits
#include <iostream> using namespace std; int main() { double u = 0; double w
include 'header.php'; // ... some code header('Location:index.php'); exit; The above code keeps giving me
#include <iostream> #include <fstream> using namespace std; int main() { ifstream stream1(source.txt); string line
#include <stdio.h> int main(void){ float a = 1.1; double b = 1.1; if(a ==
#include <iostream> using namespace std; int main() { float result = 50.0f; float multiplier
#include <stdio.h> #include <string.h> int main(void) { char s[]= 9; printf(atoi = %d,atoi(s)); system(pause);
#include <stdio.h> void main() { int x=5,y=6; printf(%d%d%d,x++,(y=x++),(x=y++)); } Can anyone please explain why
#include<iostream> #include<vector> std::vector<std::string> vector1; int main() { vector1.push_back(adadad); std::vector<std::string> vector2; vector2.push_back(adadd); if (vector1==vector2) {
#include <stdio.h> int main() { FILE *f; unsigned int num[80]; int i=0; int rv;

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.