Re: Re: Where do I start?

Ron Hudson <[email protected]>
Newsgroups gmane.comp.emulators.turnkey-mvs
Message-ID <[email protected]>
Nope - Same problem

Code compiles with no errors but fails just after the return from TGET, or
at least right after I hit one of the aid keys.

I tried running the program under TEST hoping that it would be a little more
forthcoming than
Your program failed "due to error+",  nope. a whole nother body of knowlege
I just sit at the edge of.




On Wed, May 26, 2010 at 4:07 PM, Ron Hudson <[email protected]> wrote:

> oops forgot to attach the code, but I think I see one problem I will fix
> before I post next.
>
> Ron.
>
>
> On Wed, May 26, 2010 at 4:01 PM, Ron Hudson <[email protected]> wrote:
>
>> Another Stab at it with lots of G.Postpischil's code instead of my own:
>>
>>
>>
>
*                                                                       00210000
* *************************************************************         00220000
*                                                                       00230000
*  MOVE STUFF FRON INBUF INTO DISPLY                                    00240000
*                                             CODE:G.POSTPISHIL
 00250000 Credit where due
* *************************************************************         00260000
*  BASICALLY, READ A CHAR FROM THE INPUT BUFFER INDEXD                  00270000
*  DECIDE TO POUND IT (REPLACE IT WITH A POUND SIGN) OR                 00280000
*  NOT THEN STORE IT TO THE DISPLY+INDEX                                00290000
*                                                                       00300000
*  THEN INCREMENT THE INDEX AND SEE IF IT IS GREATER THAN               00310000
*  THE BYTES READ RETURNED BY TGET IN R0                                00320000
* *************************************************************         00330000
*                                                                       00340000
*    FIRST CHECK TO SEE IF TGET RETURNED ANY FIELDS                     00350000
*                                                                       00360000
         SH       0,=H'3'         SUBTRACT 3 FROM THE BYTE COUNT        00380000
         BNP      DONE            BRANCH TO NEXT STEP IF BC <= 3        00390000
*                                                                       00400000
*   NOW WE CAN START LOOKING                                            00410000
*                                                                       00420000
         LA       6,INBUF+3       POINTER FOR INPUT                     00430000
         LA       5,DISPLY        POINTER FOR OUTPUT                    00440000
*                                                                       00450000
MVNXT    CLI      0(6),X'11'      CHECK CURRENT (R6)=X'11'              00460000
         BE       POUND           GO POUND IT!                          00470000
*                                                                       00480000
         MVC      0(1,5),0(6)     MOVE 1 CHAR FROM INBUF TO DISPLY      00490000
         LA       5,1(,5)         ADVANCE OUTPUT POINTER                00500000
         LA       6,1(,6)         ADVANCE INPUT  POINTER                00510000
         SH       0,=H'1'         REDUCE BYTE COUNT                     00520000
         BP       MVNXT           IF STILL POSITIVE LOOP AGAIN          00530000
         B        DONE            IF NOW ZERO - EXIT MOVELOOP           00540000
*                                                                       00550000
*   WHEREIN WE STORE A # INSTEAD OF THE SBA WE HAVE.                    00560000
*                                                                       00570000
POUND    MVC      0(3,5),=C'###'  SBA BE HERE                           00580000
         LA       5,3(,5)         INCREMENT OUTPUT POINTER BY 3         00590000
         LA       6,3(,6)         INCREMENT INPUT POINTER BY 3          00600000
         SH       0,=H'3'         DECREMENT BYTES READ BY 3             00610000
         BP       MVNXT           STILL POSITIVE, LOOP AGAIN            00620000
         B        DONE            GO ASK USER AGIAN                     00630000
*                                                                       00640000
*   SOMEDAY WE DO SOMETHING WITH THE INFORMATION HERE                   00650000
*                                                                       00660000
DONE     B        LOOP            FOR NOW BRANCH TO PRESENT FORM        00670000
*                                                                       00680000


Ok, where did I goof up copying Gerhard's code, the comments are mine
and they will show where I don't understand what I have written.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.