Re: Re: Where do I start?
Gerhard Postpischil <[email protected]> Thu, 27 May 2010 18:42:37 -0400
| Newsgroups | gmane.comp.emulators.turnkey-mvs |
|---|---|
| Message-ID | <[email protected]> |
On 5/27/2010 4:56 PM, Ron Hudson wrote
> The 'move stuff' portion of the code fails - It does not seem to detect
> the end of the INBUF. I checked
> the example I have and the documentation I could find on TGET and it
> seems that TGET returns the
> byte count in R1? ?
I just dragged myself upstairs and got the manual. TGET returns
the number of bytes moved to your buffer in R1. However, you
also need to check R15 to see whether the TGET was processed. A
value of 0 indicates good completion, one of 12 that the buffer
was too short (another TGET would retrieve more bytes, but
without the AID, etc.); the other values are ones you would not
normally see (4 - TGET with NOWAIT and no input available; 16 -
invalid parameters; 20 - terminal disconnected)
> This is from one of those documentation programs and it talks about
> savign the length and using r1 to
> do it.
>
> TGET (2),(3),R READ FROM THE TERMINAL
> STH R1,0(R4) SAVE THE LENGTH FROM TGET
> SPACE 2
> LR R1,R13 COPY MY SAVE AREA POINTER
>
> btw: What does the "SPACE" directive do above?
SPACE 2 tells the assembler to leave two blank lines, for a
prettier listing. Also that TGET doesn't really save much;
shorter would be:
LA 1,INBUFF
LA 0,L'INBUFF
ICM 1,8,=x'81' TGET ASIS
TGET 1,0,R
> I have a list of the machine instructions but no list yet of compiler
> directives or macros.
The current assembler documentation is on the IBM web site, but
much of the HL stuff doesn't apply to XF. Macros are documented
in manuals specific to use (Using Data Sets; Assembler Services;
etc.).
> DEBUG01 TPUT STREAM,STREAMLN,FULLSCR 00490000
> LA 5,1(,5) ADVANCE OUTPUT POINTER 00500000
>
> LA 6,1(,6) ADVANCE INPUT POINTER 00510000
> SH 1,=H'1' REDUCE BYTE COUNT 00520000
The TPUT has just destroyed R1 (address of STREAM), so the loop
will never end. One way of handling is is to use, for instance:
TGET ...
LTR 4,1 check for input
BNP none nothing read
and use register 4 instead of 1 in subsequent code.
Gerhard Postpischil
Bradford, VT
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/turnkey-mvs/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/turnkey-mvs/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/