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 6836139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:19:12+00:00 2026-05-26T23:19:12+00:00

I am working on an assignment for a college assembly class. We are using

  • 0

I am working on an assignment for a college assembly class. We are using IBM Mainframe PC370 emulator. (Old school, but great starting point)

I always try to go a little beyond the scope of the assignment in order to better my programming skills.

What I am trying to do is to move some character data (WORD) into (CWORD) with a offset of 1 using a register. My hope is to be able to place data into an index based off of the input from a file to determine the placement in an index.

We have been given a file that has a five digit dollar figure in position 1-5 and a two digit month code in position 20-21. I would like to put the month code in a register to determine the offset to add the dollar amount into that position in the index.

The following code is what I have been using to attempt the register offset.

Is this even possible? I have not found anything in the textbook or online that specifically discusses doing this type of thing.

         L     R5,1
         MVC   CWORD+0(R5),WORD
         WTO   CWORD
         WTOR  'PRESS ENTER TO EXIT',EXIT

Thank you for your time.
SUBCAN

  • 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-26T23:19:12+00:00Added an answer on May 26, 2026 at 11:19 pm

    You wrote:

          L     R5,1                        Get the fullword (32bit) value at location 0001.
          MVC   CWORD+0(R5),WORD            Copy the 5 bytes at location WORD to location CWORD.
          WTO   CWORD                       Display the contents of CWORD.
          WTOR  'PRESS ENTER TO EXIT',EXIT  Display the message and wait for a response.
    

    Plus, presumably:

    CWORD DS    CL5                     Output area.
          ...
    WORD  DS    CL4                     Input area
    

    You should have written:

          LA    R5,CWORD+1                  Get the address of the second byte of CWORD.
          MVC   0(L'WORD,R5),WORD           Copy the Length(WORD) bytes at location WORD to location CWORD+1.
          WTO   CWORD                       Display the contents of CWORD.
          WTOR  'PRESS ENTER TO EXIT',EXIT  Display the message and wait for a response.
          ...
    CWORD DS    CL5                     Output area.
    WORD  DS    CL4                     Input area
    

    At least, that sounds like what you wanted. But it isn’t 100% clear from your question. If that wasn’t your intention.

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

Sidebar

Related Questions

I'm working on an assignment for my programming class but I've run into some
Currently I'm working on an assignment and using C++ for the first time. I'm
I'm working on a class assignment that started small, so I had it all
We are working on a lab assignment for my CS&E class and I think
I have the following code that I am working on for my college assignment.
I'm working on an assignment has a class hierarchy like blow: abstract EventClass someEventClass1
I'm new to C++ and was working on an assignment for a class. We
I'm working on an assignment for class and the question asks to find matches
I'm working on a assignment for class so this is only part of the
I'm working on an assignment for a class, and need a bit of direction.

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.