programming style 
Author Message
 programming style

   One thing I've always done, but have seldom seen other programmers do,
is to use some character to separate the assembly language instructions and
operands from the line comments by some character--in my case, a semicolon.
This seems to make programs a lot more readable, and, with properly written
XEDIT macros, is fairly simple.... Something like this:

LOOPTOP   L          R4,0(R5)       ; Get ARR1(I) integer
              A          R4,0(R6)       ; Add it to ARR2(I)
              ST         R4,0(R5)       ; Put it back into ARR1(I)
              LA         R5,4(R4)       ; Move ptrs to next locations--
              LA         R6,4(R6)       ; essentially I = I + 1
          BCT        R3,LOOPTOP     ; Bottom of loop

   Does anyone else do anything similar?  (I've seen one person use
asterisks instead of semicolons, but I started learning 370 assembly
language and 8086 assembly language at the same time, and semicolons
somehow look more 'natural.'

   --John



Sun, 15 Aug 1993 05:27:43 GMT  
 programming style


Quote:

>XEDIT macros, is fairly simple.... Something like this:

I don't know if this is the correct place to post this, but I haven't found
the newsgroup comp.editors.XEDIT :)

My question is, how do you write a macro in XEDIT.  I've done a lot of work
with it, and the use of some macros can make my life a lot easier!

Please explain!

Thanks,

Joe Adamo

Northern Illinois University.  A nice place to visit but........



Sun, 15 Aug 1993 07:41:28 GMT  
 programming style

Quote:

>XEDIT macros, is fairly simple.... Something like this:

I don't know if this is the correct place to post this, but I haven't found
the newsgroup comp.editors.XEDIT :)

My question is, how do you write a macro in XEDIT.  I've done a lot of work
with it, and the use of some macros can make my life a lot easier!

Please explain!

Thanks,

Joe Adamo

Northern Illinois University.  A nice place to visit but........



Sun, 15 Aug 1993 07:41:28 GMT  
 programming style

          i never understand why everybody puts their comments
          to the right hand side of program source,
          but, me as an experienced programmer, i always put
          comment as a topic, above the program source. example:

******************************************************************************
*         start program                                                      *
******************************************************************************
START     EQU   *

          don't you have someting more serious to do ..
          it is waste of time ..



Sun, 15 Aug 1993 15:28:25 GMT  
 programming style

Quote:
>    One thing I've always done, but have seldom seen other programmers do,
> is to use some character to separate the assembly language instructions and
> operands from the line comments by some character--in my case, a semicolon.

> LOOPTOP   L          R4,0(R5)       ; Get ARR1(I) integer

>    Does anyone else do anything similar?

At our shop we use the vertical or bar (|) for the same purpose:
  LOOPTOP   L          R4,0(R5)       | Get ARR1(I) integer
This makes a nice even line separating the code from the comments.  And I
agree, it does make the code easier to follow.


Sun, 15 Aug 1993 21:22:00 GMT  
 programming style
On Wed, 27 Feb 91 09:12:01 TUR O said:

Quote:
>          i never understand why everybody puts their comments
>          to the right hand side of program source,
>          but, me as an experienced programmer, i always put
>          comment as a topic, above the program source. example:
>******************************************************************************
>*         start program                                                      *
>******************************************************************************
>START     EQU   *

If you can write comments that are short, or stagger them across several
lines, it works well because you can read the code straight through and
not have to mentally filter out the comments.  Otherwise, you are reading
interchanged comments and code.

It's all a matter of personal preference, unless it's dictated by your
workplace.



Sun, 15 Aug 1993 21:58:38 GMT  
 programming style
I would be interested in seeing anyones standards for assembly
language programming.  There seems to be a great variance among
programmers.  Would anyone, who has documented standards, be willing
to share them?


Sun, 15 Aug 1993 23:34:37 GMT  
 programming style
I would be interested in seeing anyones standards for assembly
language programming.  There seems to be a great variance among
programmers.  Would anyone, who has documented standards, be willing
to share them?


Sun, 15 Aug 1993 23:34:37 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. programming style

2. Java Programming Style Guidelines

3. Awk program style

4. Programming Style

5. Programming Style Guide for Haskell?

6. programming styles (was: Some general questions about FP)

7. Functional Programming Style with C++

8. About Dylan Etiquette (programming style)

9. "Proper" programming style

10. PL/I Programming Style

11. Programming Style

12. Programming style

 

 
Powered by phpBB® Forum Software