Article View: comp.lang.asm370
Article #461Re: Coding Questions
From: Eric Thomas SUNET
Date: Thu, 01 Nov 1990 19:03
Date: Thu, 01 Nov 1990 19:03
29 lines
2406 bytes
2406 bytes
In article <9011011400.AA10311@ucbvax.Berkeley.EDU> IBM 370 Assembly
Programming Discussion List <ASM370@OHSTVMA.BITNET> writes:
>What I am trying to do is build a table which contains 13 sets of information.
>The first 2 bytes contain a addr (i.e.; x'4CF8'), the next 4 bytes contain
>the address of the field I want to move the input into, and the last 4 bytes
>contain the length of the field. When I receive my input I find the 2 bytes
>after the sba (x'11') and compare that to my table. When I match I then
>EXECUTE a move using the length entry in my table and the address in my
>table to move the data from the input area to the work area!
This will not work because the amount of data you get from the terminal may not
match the length you have defined for the field. You may get less data if the
field is, say, 80 bytes and only 10 bytes were entered, or more data, if APL
characters have been typed. So what you really want to do is a MVCL with
appropriate padding, after computing the length of the data coming from the
terminal (locating the next X'11' or end of buffer) and checking that you don't
get more than the field has; if you do, it might be better to re-write the
screen and ask the user to retype (with one of the early generations of 3277
you could delete start-fields using a particular sequence, and then you could
type as much data as you wanted in a field, it was nice to do that and take
bets on whether software X would survive or die of a storage overlay).
Finally, it is not a good idea to keep the SBA's in machine form (eg X'4CF8')
in your table, because that format is not the same for 132-cols terminals. It
is much better to store row/col values, and convert the machine form to
row/col before scanning the table. Take a look at XEDIT sources for an example
of how this can be done.
Eric
Technical Details
Message-ID:
<9011031314.AA12044@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!BLOOM-BEACON.MIT.EDU!eru!hagbard!sunic!ericShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!BLOOM-BEACON.MIT.EDU!eru!hagbard!sunic!eric
From: eru!hagbard!sunic!eric@BLOOM-BEACON.MIT.EDU (Eric Thomas SUNET)
Newsgroups: comp.lang.asm370
Subject: Re: Coding Questions
Message-ID: <9011031314.AA12044@ucbvax.Berkeley.EDU>
Date: 1 Nov 90 19:03:26 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: IBM 370 Assembly Programming Discussion List
<ASM370@OHSTVMA.BITNET>
Distribution: inet
Organization: The Internet
Lines: 29