Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document programming conventions #15

Closed
sy2002 opened this issue Jul 29, 2020 · 4 comments
Closed

Document programming conventions #15

sy2002 opened this issue Jul 29, 2020 · 4 comments
Assignees
Labels

Comments

@sy2002
Copy link
Owner

sy2002 commented Jul 29, 2020

Document programming conventions like INCRB/DECRB in sub-routines and making sure the register bank "pointer" points always to the highest used bank, do not program "look aheads"

R8 as default return value for functions

ISRs must not alter any register (use the stack to save/restore)

sysdef.asm for convenient abbreviations

Monitor "OS" calls

; for comments in assembler
optimal columns (take Q-TRIS as example)

name it best-practices and title it "Programming Conventions and Best-Practices"
TODO: doc/best-practices.md

@sy2002 sy2002 self-assigned this Jul 29, 2020
@sy2002 sy2002 added the V1.6 label Aug 5, 2020
@sy2002
Copy link
Owner Author

sy2002 commented Aug 5, 2020

Added to scope of issue #28, i.e. release 1.6

@sy2002
Copy link
Owner Author

sy2002 commented Aug 15, 2020

For C: Mention -c99 and -O3 (and that it is worth to use -O3), mention how you can switch to use INCRB/DECRB instead of the stack for functions, mention heap and memory, ...

MJoergen added a commit that referenced this issue Aug 16, 2020
As mentioned in Issue #15.
@sy2002
Copy link
Owner Author

sy2002 commented Aug 17, 2020

We should stick to the 80 character width of ASM source (as shown in Q-TRIS and other code) so that a debugger as described in #66 can display additional information (such as registers) conveniently on the right side without the need of horizontal scrolling (given, that your terminal window is larger than 80 characters).

@sy2002
Copy link
Owner Author

sy2002 commented Aug 18, 2020

First version created.

@sy2002 sy2002 closed this as completed Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant