Use int29 for kernel console output. Enables ansi escape sequences in config.sys once you load nansi.sys. It also saves a couple of bytes.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@953 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-05-23 22:04:42 +00:00
parent f8be820925
commit 99e727b73d
3 changed files with 10 additions and 19 deletions

View File

@ -244,8 +244,7 @@ _int29_handler:
push bp
push bx
mov ah,0Eh
mov bh,0
mov bl,7
mov bx,7
int 10h ; write char al, teletype mode
pop bx
pop bp

View File

@ -259,6 +259,10 @@ STATIC void setup_int_vectors(void)
setvec(pvec->intno, (intvec)MK_FP(FP_SEG(empty_handler), pvec->handleroff));
pokeb(0, 0x30 * 4, 0xea);
pokel(0, 0x30 * 4 + 1, (ULONG)cpm_entry);
/* these two are in the device driver area LOWTEXT (0x70) */
setvec(0x1b, got_cbreak);
setvec(0x29, int29_handler); /* required for printf! */
}
STATIC void init_kernel(void)
@ -607,8 +611,6 @@ STATIC void InitIO(void)
struct dhdr far *device = &LoL->nul_dev;
/* Initialize driver chain */
setvec(0x1b, got_cbreak);
setvec(0x29, int29_handler); /* Requires Fast Con Driver */
do {
init_device(device, NULL, 0, &lpTop);
device = device->dh_next;

View File

@ -91,14 +91,8 @@ void put_console(int c)
}
#else
#ifdef __WATCOMC__
void int10_e(char c);
#pragma aux int10_e = \
"push bp" \
"mov ah, 0xe" \
"mov bx, 0x0070" \
"int 0x10" \
"pop bp" \
parm [al] modify [ah bx];
void int29(char c);
#pragma aux int29 = "int 0x29" parm [al] modify exact [bx];
#endif
void put_console(int c)
@ -111,18 +105,14 @@ void put_console(int c)
#else
#if defined(__TURBOC__)
_AL = c;
_AH = 0x0e;
_BX = 0x0070;
__int__(0x10);
__int__(0x29);
#elif defined(__WATCOMC__)
int10_e(c);
int29(c);
#elif defined(I86)
__asm
{
mov al, byte ptr c;
mov ah, 0x0e;
mov bx, 0x0070;
int 0x10;
int 0x29;
}
#endif /* __TURBO__ */
#endif /* FORSYS */