Re: Re: Where do I start?

Rick Fochtman <[email protected]>
Newsgroups gmane.comp.emulators.turnkey-mvs
Message-ID <[email protected]>
---------------------------------<snip>-----------------------------------

>  
>
> Ok, Here's my first stab at stepping through the inbuf copying stuff 
> to the
> disply
>
>*                                                                       00210000
>* *************************************************************         00220000
>
>*                                                                       00230000
>*  MOVE STUFF FRON INBUF INTO DISPLY                                    00240000
>*                                                                       00250000
>
>* *************************************************************         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
>
>         SR       2,2             CLEAR MY INDEX                        00350000
>*                                                                       00360000
>MVNXT    L        6,INBUF,(2)     GET CHAR FROM INBUF+R2                00370000
>
>*                                                                       00380000
>         CLI      2,X'3'          POUND AIDKEY,BUFR,1ST'11',1ST         00390000
>         BC       2,NOPOUND       IF R6 > '3' THEN DO NOT POUND         00400000
>
>*                                                                       00410000
>         CLI      6,X'11'         COMPARE THIS CHAR VS X'11'            00420000
>         BE       POUND           IF SO GO POUND IT.                    00430000
>
>
>Right here I need to add code to skip the next char when the prev was
>x'11' because it's a binary buffer location.
>
>*                                                                       00440000
>
>         B        NOPOUND         NO REASON TO POUND IT - DONT          00450000
>*                                                                       00460000
>POUND    L        6,C'#'          YOU MUST POUND IT!                    00470000
>
>*                                                                       00480000
>NOPOUND  ST       6,DISPLY(2)     STORE R6 INTO DISPLAY+R2              00490000
>         ADD      2,X'1'          INCREMENT R2                          00500000
>
>*                                                                       00510000
>         CP       2,0             COMPARE MY INDEX AND BYTES READ       00520000
>         BE       CONT0002        DONE IF EQUAL                         00530000
>
>         B        MVNXT           IF NOT MORE MOVE NEEDED               00540000
>*
>CONT0002 goes here
>  
>
-------------------------------------<unsnip>----------------------------------
You really need to find a reasonable ASSEMBLER Language text/tutorial. 
There are some ideas in Assembler that you're not yet aware of, like 
base registers, relative addressing arithmetic modes, etc. :-)

If you can find a Supervisor Services manual, there's some sections on 
linkage there. But a textbook will help with addressing/base registers, 
arithmetic modes, indexing, looping, etc.

Rick
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.