Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

PL/I & Assembler :: RE: Incorrect output when trying to add numbers

$
0
0
Author: steve-myers
Subject: Re: Reply to: Incorrect output when trying to add numbers
Posted: Mon Jan 16, 2017 3:45 pm (GMT 5.5)

monica1 wrote:
Thanks for the response and apologies for posting the query in the wrong forum. I have registered myself in the beginners forum and waiting for the account to be activated.

In the meantime, I tried using the instruction that Garry has provided. I added the code after the UNPK instruction.

But I am getting an error during the compilation process.

** ASMA141E Bad character in operation code - UNPACK+1,X'FO'

Could you let me know what might be the reason.

The query that started this topic, as well as this second query demonstrated an unwillingness to think or to use existing reference material. Since knowing where, in the wealth of available documentation that is now available, to go, my first response pointed out where to go rather than directly answer your query. It still depended on your ability to THINK about a problem. This second query reinforced this conclusion. I must admit I, too, as well as dneufarth made the same error.

I wrote this little program to try to recreate the error.
Code:
HEX      CSECT
         USING *,15
         OI    DATA+1,X'FO'
         SR    15,15
         BR    14
DATA     DC    P'55'
         END   HEX

When I ran it through HLASM I got this error message -

** ASMA148E Self-defining term lacks ending quote or has bad character - X'FO'

rather than the ASMA141E message.

Both dneufarth and I didn't bother to read the entire ASMA141E message to realize your statement was

UNPK+1,X'FO'

We both jumped to the X'FO' and analyzed it, rather than analyze the real problem.

Now let's look at X'FO'.

Arguably there are at least two possible issues here.
  1. Your understanding of hexadecimal notation.
    Hexadecimal notation has 16 unique digits: 0 through 9, and A through F are usually used to represent the additional 6 digits. So it would seem there is something wrong with FO.
  2. The font (the way the characters are formed on screen or printed)
    One nice thing about the font as printed by IBM 1403 printer is it was easy to distinguish between the letter O and the number 0. Seeing the O and 0 side by side it it is easy to see the difference, but seeing X'FO' it is rather to easy to see what should be a 0 is really O. Sadly I can't easily recreate this font here, though I have seen fairly good attempts elsewhere in the internet. The letter O was not a simple circle; rather it is was more like a small square. The number 0 had a single dot in the middle. The two IBM keypunch machines of the 1960s used a similar font in the characters it could print on the cards it punched.


Viewing all articles
Browse latest Browse all 8500

Trending Articles