flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > Command-Line Interpreter Goto page Previous 1, 2, 3 |
Author |
|
adroit 27 Mar 2010, 05:17
I used this because, the variable %i would have the steps successive in the structure. So if the it has completed from 1 TO 4, then %i would have the integer value 4.
Quote: you have to process too many variables. It could work. I think it's a good idea. I'm just seeking some advice, so you can throw out as much "notations" as you can, whether good or bad, or unsightly. |
|||
27 Mar 2010, 05:17 |
|
revolution 27 Mar 2010, 05:28
MeshNix: It is all about personal taste. If you want to do something then go ahead and do it. But if you keep asking others what they like, then you won't get anywhere. I suspect you are trying to go too deep all at once. Do you have the base done yet? Get the basics running first. Set up a framework to expand into as the project progresses. Start slowly and build it up, fixing bugs along the way.
Are you writing this as a personal challenge, or do you have an actual need? The existing command shells in Windows and *nix are already quite comprehensive. Perhaps they already do what you need? Or maybe you just need to write a small utility proggy to add a function or two that might be missing? |
|||
27 Mar 2010, 05:28 |
|
adroit 27 Mar 2010, 05:36
I used this because, the variable %i would have the steps successive in the structure. So if the it has completed from 1 TO 4, then %i would have the integer value 4.
Quote: you have to process too many variables. It could work. I think it's a good idea. I'm just seeking some advice, so you can throw out as much "notations" as you can, whether good or bad, or unsightly. |
|||
27 Mar 2010, 05:36 |
|
adroit 27 Mar 2010, 06:05
Yea revolution, you got it right. It's a challenge for myself.
I have an (incomplete) technical document prepared with the basics, such as commands, datatypes used, syntax, functions, symbols, etc. I have just finish writing the one. It just supports basic I/O and coloured text. It was kinda of difficult, even though I copied it from a reference source code. i did this to understand each command and what they do. So know i have the full grip of writing it completely by myself without any help (I think:)). |
|||
27 Mar 2010, 06:05 |
|
adroit 27 Mar 2010, 23:05
I've fixed a few bugs as well!
|
|||
27 Mar 2010, 23:05 |
|
adroit 28 Mar 2010, 18:11
Here is the frame of the shell.
There are few annoying bugs still in the code. Please feel free to criticize, comment, etc ...
|
|||||||||||
28 Mar 2010, 18:11 |
|
zhak 28 Mar 2010, 20:53
Took a quick look at your shell...
Why do you use 15 SetTextColor routines instead of passing text color in AL to a single one? Code: mov al, COLORTEXT_BRIGHT_YELLOW call SetTextColor ... SetTextColor: mov byte[color], al ret ... and why using call to write single byte of memory? Just write that byte and that's it! No need in creating a procedure, i think one more thing is that since you decided to use INT 10h to advance cursor position, then i think there's no need to GetCursorPos/SetCursorPos every time. You can get cursor position once. Later, when you need to move cursor, you change only values of cursor_row and cursor_col variables, and issue SetCursorPosition command. No need to call GetCursorPosition every time. by the way, that Esc, which clears command line is nice. I'll add a shortcut to clear command line in my code, too ah, and you should definitely process Arrow keys |
|||
28 Mar 2010, 20:53 |
|
adroit 29 Mar 2010, 04:41
zhak wrote:
zhak wrote:
Using arrow keys are kind of difficult. _________________ meshnix |
|||
29 Mar 2010, 04:41 |
|
zhak 29 Mar 2010, 13:24
to fix bugs with Enter key press (incorrect positioning of new line) you can do the following:
1. if current cursor position is unknown, then get current cursor position (cursor_row, cursor_col variables). 2. if cursor_row < 24 then cursor_row := cursor_row + 1 else scroll screen up 3. cursor_col := 0 4. set current cursor position 5. display prompt ($) |
|||
29 Mar 2010, 13:24 |
|
adroit 31 Mar 2010, 14:47
Implementing the algorithm was unsuccessful. Remember I have a horizontal bar at row 24. The algorithm doesn't consider it, but I've figured a way how to.
|
|||
31 Mar 2010, 14:47 |
|
edfed 31 Mar 2010, 17:21
command line interpret is not a command line editor.
but it needs effectivelly a way to edt the command good that you try to code by yourself , but if you use less BIOS ints, you will have a better code, because: 1/ BIOS ints are very limited 2/ BIOS ints are not PM compatible. then, i propose to you just a little set of includes to interpret commands. enjoy, all the syntax of a command line reside in the interpret. and is like that: path/path/command param,param,param,param to create commands, you should edit: 'comnames.inc' contain the names of available commands 'comfunc.inc' contain the functions of available commands 'comtable.inc' contain references to availables commands functions and names. and include 'comtable.inc' in you code, that's all.
|
|||||||||||
31 Mar 2010, 17:21 |
|
adroit 02 Apr 2010, 02:05
Thanks for the helpful advice, and the attachment.
I didn't fully code it by myself. I used the framework of bitshifter. To me it was very substantial. Edit: |
|||
02 Apr 2010, 02:05 |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.