Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 534 → Rev 533

/svarcom/trunk/cmd/echo.c
27,7 → 27,8
*/
 
static enum cmd_result cmd_echo(struct cmd_funcparam *p) {
const char *arg = p->cmdline + 5;
unsigned short offs = FP_OFF(p->cmdline) + 5;
unsigned short segm = FP_SEG(p->cmdline);
 
/* display help only if /? is the only argument */
if ((p->argc == 1) && (imatch(p->argv[0], "/?"))) {
66,11 → 67,13
_asm {
push ax
push dx
push ds
push si
 
mov si, [arg]
mov si, [offs]
cld /* clear direction flag (DF) so lodsb increments SI */
mov ah, 0x02 /* display char from DL */
mov ds, [segm]
NEXTYBTE:
lodsb /* load byte at DS:[SI] into AL and inc SI (if DF clear) */
or al, al /* is AL == 0? then end of string reached */
87,6 → 90,7
int 0x21
 
pop si
pop ds
pop dx
pop ax
}
/svarcom/trunk/todo.txt
7,6 → 7,7
 
=== HIGH PRIORITY ============================================================
 
echo: no need to consider cmdline like a far ptr (it is not)
pipes redirections
DIR /A
ctrl+break handler