[General Design] Commenting Help
Moderator: MaxCoderz Staff
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
[General Design] Commenting Help
I am in desperate need of a commenting method, I have written many lines code today and in a matter of hours it has become a horrid mess. I can't believe that, despite my effort to keep it simple, It's becoming unrecognizable. I remember in documenting assmebly kv83 an nice way to comment, but I rarely write that neatly and my code is never that uniform.
Does any have a good way to comment on code?
Also what does every one else use to write asm programs?
I'm just using Microsoft WordPad, I think it's causing me some confusion trouble.
....sigh.... back to coding.
Does any have a good way to comment on code?
Also what does every one else use to write asm programs?
I'm just using Microsoft WordPad, I think it's causing me some confusion trouble.
....sigh.... back to coding.
I like notepad because of the tab character instead of spaces. Its search and goto are faster as well. Why do you need a method? Do what'd best for your needs. If you forget what registers are holding, make a register table saying what each has: "At this point: hl - x ptr \ de - img ptr" that sort of thing. If you have no idea what the hell is going on, comment on every line's purpose (like enemy collisions with the grid in Zelda, HA HA). I think pretty code is a waste of time.
Last edited by Spencer on Fri 01 Apr, 2005 6:09 am, edited 1 time in total.
Re: Commenting Help
Crimson Editor. I especially like the customizable user tools where you can compile assembly programs w/o switching to DOS. I used to use Notepad, but now, w/o syntax highlighting, I get lost WordPad...Jim e wrote:Also what does every one else use to write asm programs?
I'm just using Microsoft WordPad, I think it's causing me some confusion trouble.
/edit: My 100th post!
"If SOURCE is outlawed, only outlaws will have SOURCE."
- Madskillz
- Calc Wizard
- Posts: 745
- Joined: Fri 17 Dec, 2004 10:22 pm
- Location: Wandering around in the Jungle...
- Contact:
I use notepad too...I dont think anybody can keep their code as neat as KV. I try, but I usually add and remove stuff, mine is always messy. I am always happy when it works! Which if I am lucky is on the first try, but that hardly ever happens unless I am showing a titlescreen/sprite, but who can get those wrong right!
The Revolution is here...
I usually just add a few lines at the beginning of each routine, describing what it does (or is supposed to do), and I sometimes comment difficult parts of the routine. For the rest: See signature
And I use UltraEdit for most of my programming. With my own z80 syntax highlighting definitions. I really can't work without syntax highlighting anymore
And I use UltraEdit for most of my programming. With my own z80 syntax highlighting definitions. I really can't work without syntax highlighting anymore
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
The problem is that my routines take long and call other routines. One in particular takes up around 500 bytes, thats 'alot' for a routine. Plus there is a lot of different sections to the code.
I don't know I kinda want an editor that supports colored comments.
Oh and notepad has a limit on it's file size. I never Have one folder for one project so breaking a program up into a bunch of includes would get messy.
I don't know I kinda want an editor that supports colored comments.
Oh and notepad has a limit on it's file size. I never Have one folder for one project so breaking a program up into a bunch of includes would get messy.
Then you very much need to start making folders for your projectsJim e wrote:I never Have one folder for one project so breaking a program up into a bunch of includes would get messy.
My compile structure:
Code: Select all
- Assembly dir (compile batchfiles, tasm, bin progs etc)
- Source (.asm files)
- Includes (.inc files)
- Executables
- Ti-73 (executables for all .asm files, compiled for Ti-73)
- Ti-83 (executables for all .asm files, compiled for Ti-83)
- Ti-83Plus (executables for all .asm files, compiled for Ti-83+)
Oh, and I just added Ti-73 for fun when Mallard came out That include file is just so damn easy to use...
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
Breaking things up is a personal matter, I wrote Gemini in one file and only put data in external files and it worked pretty well. I made one dedicated directory for the project, though.
As for commenting code; just write what a routine does and maybe some of the basic ideas for the routine plus minor pointers to what happens inside the routine. Some optimized or otherwise tricky sections are best left "remembered". Just something one learns as time goes by, try sometime to add comments everywhere and you'll see where they're totally unnecessary.
Editor: vim
As for commenting code; just write what a routine does and maybe some of the basic ideas for the routine plus minor pointers to what happens inside the routine. Some optimized or otherwise tricky sections are best left "remembered". Just something one learns as time goes by, try sometime to add comments everywhere and you'll see where they're totally unnecessary.
Editor: vim
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
Oh, yeah definately, data must be seperate. BUt remeber things for a alot of code can get annoying. But the real issue is that I don't like working with my messy code, and the fact that I intend to have it so other people can understand it makes harder for me to figure out how comment on it.
Though I do keep apps in seprate directory and now that I think of it any thing truely big enough, movie or sound demos, I have seprate project folders for them.
Vim, whats vim?
Though I do keep apps in seprate directory and now that I think of it any thing truely big enough, movie or sound demos, I have seprate project folders for them.
Vim, whats vim?
-
- Extreme Poster
- Posts: 479
- Joined: Fri 17 Dec, 2004 11:09 pm
- Contact: