Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread Arkady V.Belousov
Hi!

13-Апр-2004 20:30 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov"
<[EMAIL PROTECTED]>:

AVB Why? To make code more portable between assemblers.
te>>> ROTFL
te> Rolling On The Floor Laughing
te> you really can't keep things untouched?

 See the difference: "keep untouched" or "do so or so". Currently Bart
actively _adds_ `wrt', so I ask if this is possible to use `:' instead
`wrt'.

te> I would really HATE the kernels assembly sources converted into
te> GMOUSE cryptographic sources.

 :)




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread Alain


tom ehlert escreveu:

Hello Arkady,

you really can't keep things untouched?
I would really HATE the kernels assembly sources converted into
GMOUSE cryptographic sources.
Hi Arkady, Tom really has a point here ;-)

Alain



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread tom ehlert
Hello Arkady,

AVB>>> Why? To make code more portable between assemblers.
te>> ROTFL

AVB>  ?

Rolling On The Floor Laughing

you really can't keep things untouched?

I would really HATE the kernels assembly sources converted into
GMOUSE cryptographic sources.

tom




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread Arkady V.Belousov
Hi!

13-Апр-2004 19:58 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov"
<[EMAIL PROTECTED]>:

AVB>> Why? To make code more portable between assemblers.
te> ROTFL

 ?




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread tom ehlert
Hello Arkady,

AVB> Why? To make code more portable between assemblers.
ROTFL

tom




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread Arkady V.Belousov
Hi!

13-Апр-2004 18:41 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:

>> > +  fstrcpy(Shell + strlen(Shell), MK_FP(FP_SEG(Config), Config->cfgInitTail));
>> >endp =  Shell + strlen(Shell);
>>   fstrcpy(endp = Shell + strlen(Shell),
>>   MK_FP(FP_SEG(Config), Config->cfgInitTail));
BO> this won't work. We need the strlen of Shell after the fstrcpy.

 Oh, God, sometime I make silly mistakes. :( Anyway, if you define copy
function, which will return length (preferably) or pointer _after_ copied
string (at terminating zero byte), you will get better code. For example:

endp = fstrcopy (Shell, ...);
endp = fstrcopy (endp, MK_FP ...);

>> >  STATIC VOID InitPgm(BYTE * pLine)
>> >  {
>> > +  static char init[NAMEMAX];
>> > +  static char inittail[NAMEMAX];
>> > +
>> > +  Config.cfgInit = init;
>> > +  Config.cfgInitTail = inittail;
>>  As I understand, these assignments may be performed statically.
>> Especially, if cfgInit and cfgInitTail fields will be moved out from Config
>> structure.
BO> ??? I don't understand what you mean here.

char init_buf[NAMEMAX];
char *cfgInit = init_buf;

 Or, if remain cfgInit inside Config:

char init_buf[NAMEMAX];
struct config Config = {
...
init_buf,
...

>> > + mov cx,-2 + init_end wrt INIT_TEXT ; word aligned
>>  BTW, does (or not) NASM supports TASM/MASM compatible syntax:
>>  mov cx,offset INIT_TEXT:init_end - 2   ; word aligned

 Forget to add question mark here.

BO> NASM doesn't support "offset".

 But does it supports ":" instead "wrt"? If yes (at least, NASM supports
":" when passing far pointers to jmp and call), you may make empty %define
for `offset'. Why? To make code more portable between assemblers.




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread Bart Oldeman
On Tue, 13 Apr 2004, Arkady V.Belousov wrote:

> 13-áÐÒ-2004 11:54 [EMAIL PROTECTED] (Bart Oldeman) wrote to
> [EMAIL PROTECTED]:
>
> > +++ task.c13 Apr 2004 11:54:09 -  1.41
> > +  fstrcpy(Shell + strlen(Shell), MK_FP(FP_SEG(Config), Config->cfgInitTail));
> >endp =  Shell + strlen(Shell);
>
>   fstrcpy(endp = Shell + strlen(Shell),
>   MK_FP(FP_SEG(Config), Config->cfgInitTail));

this won't work. We need the strlen of Shell after the fstrcpy. This is
really an "fstrcat" except that's not in asmsupt.asm.

endp = Shell + strlen(Shell) + strlen(Config->cfgInitTail);
fstrcpy(Shell + strlen(Shell), MK_FP(FP_SEG(Config), Config->cfgInitTail));
would work but I don't see the point.

> >  STATIC VOID InitPgm(BYTE * pLine)
> >  {
> > +  static char init[NAMEMAX];
> > +  static char inittail[NAMEMAX];
> > +
> > +  Config.cfgInit = init;
> > +  Config.cfgInitTail = inittail;
>
>  As I understand, these assignments may be performed statically.
> Especially, if cfgInit and cfgInitTail fields will be moved out from Config
> structure.

??? I don't understand what you mean here.

> > + mov cx,-2 + init_end wrt INIT_TEXT ; word aligned
>
>  BTW, does (or not) NASM supports TASM/MASM compatible syntax:
>
>  mov cx,offset INIT_TEXT:init_end - 2   ; word aligned

NASM doesn't support "offset".

Bart



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


[Freedos-kernel] NASM & 8086

2004-04-13 Thread Arkady V.Belousov
Hi!

 Let me remind that NASM have CPU directive, which limits the available
instruction set. So, instead:

!if $(XCPU) == 386
NASMFLAGS=$(NASMFLAGS) -DI386
!endif

in generic.mak you may add:

NASMFLAGS=$(NASMFLAGS) -DXCPU=$(XCPU)

and then in .asm files:

%if XCPU >= 386
CPU 386
%elif XCPU >= 286
CPU 286
%elif XCPU >= 186
CPU 286
%else
CPU 8086
%endif

If you may pass macro as argument of CPU directive, you may use:

CPU XCPU

Of course, generic.mak should now define:

!if $(XCPU) == 86
NASMFLAGS=$(NASMFLAGS) -DXCPU=8086
!else
NASMFLAGS=$(NASMFLAGS) -DXCPU=$(XCPU)
!endif




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


[Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.75,1.76 config.h,1.3,1.4 kernel.asm,1.50,1.51 main.c,1.70,1.71 segs.inc,1.17,1.18 task.c,1.40,1.41

2004-04-13 Thread Arkady V.Belousov
Hi!

13-Апр-2004 11:54 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:

> +++ task.c13 Apr 2004 11:54:09 -  1.41
> +  fstrcpy(Shell + strlen(Shell), MK_FP(FP_SEG(Config), Config->cfgInitTail));
>endp =  Shell + strlen(Shell);

  fstrcpy(endp = Shell + strlen(Shell),
  MK_FP(FP_SEG(Config), Config->cfgInitTail));

>  STATIC VOID InitPgm(BYTE * pLine)
>  {
> +  static char init[NAMEMAX];
> +  static char inittail[NAMEMAX];
> +
> +  Config.cfgInit = init;
> +  Config.cfgInitTail = inittail;

 As I understand, these assignments may be performed statically.
Especially, if cfgInit and cfgInitTail fields will be moved out from Config
structure.

> + mov cx,-2 + init_end wrt INIT_TEXT ; word aligned

 BTW, does (or not) NASM supports TASM/MASM compatible syntax:

 mov cx,offset INIT_TEXT:init_end - 2   ; word aligned




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


[Freedos-kernel] Re: [Freedos-cvs] kernel/kernel kernel.asm,1.49,1.50

2004-04-13 Thread Arkady V.Belousov
Hi!

13-Апр-2004 10:58 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:

> (From Arkady) Avoid "shr cx,4" (it doesn't work on the 8088)
> +++ kernel.asm13 Apr 2004 10:58:06 -  1.50
>  %ifdef WATCOM
> - shr cx,4
> + mov cl,4
> + shr si,cl
>  %endif

 Don't forget that there was two places with SHR ..,4. Just search ",4".




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel