public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [OT] Re: nasm over gas?
       [not found]           ` <tuIT.TW.7@gated-at.bofh.it>
@ 2003-09-08 15:10             ` Ihar 'Philips' Filipau
  2003-09-08 15:17               ` Richard B. Johnson
  2003-09-08 15:26               ` Maciej Soltysiak
  0 siblings, 2 replies; 6+ messages in thread
From: Ihar 'Philips' Filipau @ 2003-09-08 15:10 UTC (permalink / raw)
  To: root; +Cc: Linux Kernel Mailing List

Richard B. Johnson wrote:
> 
> I strongly suggest that if you have an interest in assembly, you
> cultivate that interest. Soon most all mundane coding will be
> performed by machine from a specification written by "Sales".
> The only "real" programming will be done by those who can make
> the interface between the hardware and the "coding machine". That's
> assembly!
> 

   I have a long standing dispute with one of my friend: once he has 
said 'asm is dead - every one is using C/C++ now'.

   Those I wasn't able to counter this claim. TSR programmes gone 
together with DOS, and ordinary desktops started challenging expensive 
workstations.

   But little bit later I caught an example: Palm OS. Yes. A lot of 
stuff is written in Asm. Why? Because *size does matter*: size == price, 
bigger application - more expensive it is for your customer. C was not 
able to compete with Asm.

   But now we have hand-helds/mobiles which do run Windoz/Linux. Run 
them almost unmodified/unstripped. Cool. C/C++ rules. Windoz CE with VBA 
- dream of idiot.

   Asm dead again? No-o-o-o. L3/L4 switch we are doing utilizes special 
micro-controller, which can be programmed in dialect of MIPS assembler. 
It has fast RAM for 4K of insn's and executes in real-time. I didn't saw 
C compiler for this - but this is really exotic example. But still 
example - Asm is far from being dead.

   What will be next? In my short carrier I saw as Asm was dying three 
times. But I beleive it will reborn over and over again ;-)))


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Re: nasm over gas?
  2003-09-08 15:10             ` [OT] Re: nasm over gas? Ihar 'Philips' Filipau
@ 2003-09-08 15:17               ` Richard B. Johnson
  2003-09-08 15:28                 ` Maciej Soltysiak
  2003-09-08 15:26               ` Maciej Soltysiak
  1 sibling, 1 reply; 6+ messages in thread
From: Richard B. Johnson @ 2003-09-08 15:17 UTC (permalink / raw)
  To: Ihar 'Philips' Filipau; +Cc: Linux Kernel Mailing List

On Mon, 8 Sep 2003, Ihar 'Philips' Filipau wrote:

> Richard B. Johnson wrote:
> >
> > I strongly suggest that if you have an interest in assembly, you
> > cultivate that interest. Soon most all mundane coding will be
> > performed by machine from a specification written by "Sales".
> > The only "real" programming will be done by those who can make
> > the interface between the hardware and the "coding machine". That's
> > assembly!
> >
>
>    I have a long standing dispute with one of my friend: once he has
> said 'asm is dead - every one is using C/C++ now'.
>
>    Those I wasn't able to counter this claim. TSR programmes gone
> together with DOS, and ordinary desktops started challenging expensive
> workstations.
>
>    But little bit later I caught an example: Palm OS. Yes. A lot of
> stuff is written in Asm. Why? Because *size does matter*: size == price,
> bigger application - more expensive it is for your customer. C was not
> able to compete with Asm.
>
>    But now we have hand-helds/mobiles which do run Windoz/Linux. Run
> them almost unmodified/unstripped. Cool. C/C++ rules. Windoz CE with VBA
> - dream of idiot.
>
>    Asm dead again? No-o-o-o. L3/L4 switch we are doing utilizes special
> micro-controller, which can be programmed in dialect of MIPS assembler.
> It has fast RAM for 4K of insn's and executes in real-time. I didn't saw
> C compiler for this - but this is really exotic example. But still
> example - Asm is far from being dead.
>
>    What will be next? In my short carrier I saw as Asm was dying three
> times. But I beleive it will reborn over and over again ;-)))
>

Yes. I once saw a ".sig" that said "FORTRAN is dead". We still
have physicists and mathematicians that wouldn't use anything
else. Use the best tool for the job. If any company gives you
the chance to learn a new tool (for free), use that chance.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
            Note 96.31% of all statistics are fiction.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Re: nasm over gas?
  2003-09-08 15:10             ` [OT] Re: nasm over gas? Ihar 'Philips' Filipau
  2003-09-08 15:17               ` Richard B. Johnson
@ 2003-09-08 15:26               ` Maciej Soltysiak
  2003-09-08 19:00                 ` Gábor Lénárt
  1 sibling, 1 reply; 6+ messages in thread
From: Maciej Soltysiak @ 2003-09-08 15:26 UTC (permalink / raw)
  To: Ihar 'Philips' Filipau; +Cc: root, Linux Kernel Mailing List

>    I have a long standing dispute with one of my friend: once he has
> said 'asm is dead - every one is using C/C++ now'.
Stating that asm is dead is not realizing that it is really important in
some niches. Niches which must be in asm to provide the best for the
customers. This is and will be common in 'programming language wars'.

Dead technologies are not used. Asm is used, therefore Asm is not dead.
This is the definition, and the sentence to counter 'asm is dead'.

>    What will be next? In my short carrier I saw as Asm was dying three
> times. But I beleive it will reborn over and over again ;-)))
Pascal will be next I think. Or any other language that does not resist
the trends. C/Java/Python - Those guys are surfing the wave of
modern programming, and rapid development. Others like cobol, fortran,
etc. are just unknown, and thus some people think they are dead.

Another thing:

	Programming languages do not die,
	They just fade away

Regards,
Maciej

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Re: nasm over gas?
  2003-09-08 15:17               ` Richard B. Johnson
@ 2003-09-08 15:28                 ` Maciej Soltysiak
  0 siblings, 0 replies; 6+ messages in thread
From: Maciej Soltysiak @ 2003-09-08 15:28 UTC (permalink / raw)
  To: Richard B. Johnson
  Cc: Ihar 'Philips' Filipau, Linux Kernel Mailing List

> Yes. I once saw a ".sig" that said "FORTRAN is dead". We still
> have physicists and mathematicians that wouldn't use anything
> else. Use the best tool for the job. If any company gives you
> the chance to learn a new tool (for free), use that chance.
Better yet, I have seen news paper ads for companies looking for
experienced cobol programmers.

Regards,
Maciej


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Re: nasm over gas?
  2003-09-08 15:26               ` Maciej Soltysiak
@ 2003-09-08 19:00                 ` Gábor Lénárt
  0 siblings, 0 replies; 6+ messages in thread
From: Gábor Lénárt @ 2003-09-08 19:00 UTC (permalink / raw)
  To: Linux Kernel Mailing List

On Mon, Sep 08, 2003 at 05:26:51PM +0200, Maciej Soltysiak wrote:
> >    I have a long standing dispute with one of my friend: once he has
> > said 'asm is dead - every one is using C/C++ now'.
> Stating that asm is dead is not realizing that it is really important in
> some niches. Niches which must be in asm to provide the best for the
> customers. This is and will be common in 'programming language wars'.
> 
> Dead technologies are not used. Asm is used, therefore Asm is not dead.
> This is the definition, and the sentence to counter 'asm is dead'.

Assembly can't be dead since it is used as an internal step to produce
machine runnable code eg by gcc. Also, assembly is a very good thing,
eg some coders can code 4K intro with phong shaded rotating 3D objects
etc ;-) But if you see, they spend even months to produce 4K machine
runnable code. No doubt: it's REALLY optimized for both of speed and
size, but you can't do this for commercial softwares, because it is not
portable (if you target more architectures for example), it's longer
to develope and also it's more difficult to maintain. Personally I'm
enjoying coding in asm, and I've done several bigger projects. However
today I would not do this in asm. Not because assembly sucks or whatever,
just because I've not enough free time to do BIG projects in assembly
then maintain it ... But several areas are open, eg my Enterprise-128
emulator being developed using assembly optimized parts and gains
several dozens of percent speed improvement. Of course these routines
are coded in C as well to be able to compile on non-x86 CPUs as well.
I beleive assembly can be very useful when eg a heavily used function
can be coded in assembly for being faster even if it means multiple
rewritings for several CPUs even in the x86 CPU familiy. Eg: if you
can produce more bandwidth by 50% even by coding much more time than in C,
you will be blessed. But it does not mean that the WHOLE system should
be written in assembly ...

> Pascal will be next I think. Or any other language that does not resist
> the trends. C/Java/Python - Those guys are surfing the wave of
> modern programming, and rapid development. Others like cobol, fortran,

C is a good midway between 'very high' level languages and assembly,
at least IMHO. But eg Java will be NEVER my friend, it's a nightmare
to waste system resources (I CAN'T get the idea why some people want
to write an MP3 player in Java for example. Maybe (s)he has got too fast
CPU ...)

- Gábor (larta'H)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: nasm over gas?
       [not found]           ` <tyCN.6RD.13@gated-at.bofh.it>
@ 2003-09-08 20:08             ` Ihar 'Philips' Filipau
  0 siblings, 0 replies; 6+ messages in thread
From: Ihar 'Philips' Filipau @ 2003-09-08 20:08 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Linux Kernel Mailing List

William Lee Irwin III wrote:
> On Mon, Sep 08, 2003 at 02:03:21PM +0200, Ihar 'Philips' Filipau wrote:
> 
>>  e.g. C-- project: something like C, where you can operate with 
>>registers just like another variables. Under DOS was producing .com 
>>files witout any overhead: program with only 'int main() { return 0; }' 
>>was optimized to one byte 'ret' ;-) But sure it was not complete C 
>>implementation.
> 
> 
> There is already a C-- project and it is unrelated to your suggestion.
> 
> c.f. http://cminusminus.org/
> 

   Actually I have tryed to find the project I knew long time ago.
   But let say - it was pre internet era.

   I beleive C-- was distributed as a shareware. I cannot be sure about 
licensing - I come from USSR ;-)

   [ ...removing the dust of time from my archives... ]

   [ ...@#$%^&* it is archived with arj - VMware... ]

   [ Wow - it has name! Sphinx C-- - and Google has some docs on-line 
http://www.goosee.com/cmm/c--doc.htm (go directly to 
http://www.goosee.com/cmm/c--doc.htm#Expressions) ]
   [ Home page is http://www.goosee.com/cmm/ ]

    Sample from my archive follows.
    Watch the comment "RUN FILE SIZE" - 457 bytes. Far from ideal - but 
already 'very good'.

/*
    NAME: FIRE.C--
    INFO: Written by Midnight.
          Conversion to C-- (and a little palette messing) by SPHINX.
    DESCRIPTION: This program displays a fire like simulation on a
                 VGA 320x200 256 colour screen.
    RUN FILE SIZE: 457 bytes.
*/

?use80386
?resize FALSE
?assumeDSSS TRUE

?include "VIDEO.H--"
?include "VGA.H--"
?include "RANDOM.H--"
?include "KEYCODES.H--"

byte palette[768];

// byte pic = FROM "c--.cut";

word F;
word LowLimit;


void SetCols ()
byte N;
{

/*
BX = 0;
do {
     SI = BX+BX+BX;
     palette[SI] = BL >> 2;
     palette[SI+1] = BL >> 3;
     palette[SI+2] = 0;
     BX++;
     } while( BX < 256 );
*/


palette[0]=0;
palette[1]=0;
palette[2]=0;
BX = 0;
do {
     DI = BX+BX+BX;

     AX = BX * 64 / 85;
     DL = AL;
     palette[DI+3] = DL;
     palette[DI+3+1] = 0;
     palette[DI+3+2] = 0;

     palette[DI+3+85+85+85] = 63;
     palette[DI+3+85+85+85+1] = DL;
     palette[DI+3+85+85+85+2] = 0;

     palette[DI+3+85+85+85+85+85+85] = 63;
     palette[DI+3+85+85+85+85+85+85+1] = 63;
     palette[DI+3+85+85+85+85+85+85+2] = DL;

     BX++;
     } while( BX < 85 );


SETVGAPALETTE( ,0,256,#palette);
}



void AddFire (word N)
{
loop(N)
     {
     AX = RAND()%10+1;
     SI = AX+AX;
     AX = RAND()%298 + 64010;
     DI = AX;
     AL = RAND()&127 + 128;
     loop(SI)
	{
	ESBYTE[DI] = AL;
	ESBYTE[DI+640] = AL;
	DI++;
	}
     }
}


void CopyAvg ()
{
DI = 1280;
do {
     BX = 2;
     do {
	AX = ESBYTE[DI+BX-2] +  ESBYTE[DI+BX+2] + ESBYTE[DI+BX] +
		  ESBYTE[DI+BX+640] / 4;
	AX = AX + ESBYTE[DI+BX-640] >> 1;
	IF( AL > 128 )
	    AL-=2;
	ELSE IF( AL > 3)
	    AL -=4;
	ELSE
	    AL = 0;

	AH = AL;
	ESWORD[DI+BX-1280] = AX;
	ESWORD[DI+BX-1280+320] = AX;
	BX += 2;
	} while( BX < 318 );
     DI += 640;
     } while( DI < 320*204 );
}



void main ()
{
@ SETVIDEOMODE(byte vid_320x200_256);

SetCols();

ES = 0xA000;

F = 0;
do {
     AddFire(F / 32 + 1);
     CopyAvg();
     IF( F < 512 )
	F++;
     LowLimit = F >> 2 + 128 >> 2;
//    IF( F % 80 == 0 )
//        overimage19(80,90,#pic,0);
     } while( BIOSKEYCHECK() == 0 );

do {BIOSREADKEY();
     } while( BIOSKEYCHECK() != 0 );

@ SETVIDEOMODE(byte vid_text80c);
}


/* end of FIRE.C-- */


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-09-08 20:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <tt0q.6Rc.17@gated-at.bofh.it>
     [not found] ` <tt0r.6Rc.19@gated-at.bofh.it>
     [not found]   ` <tt0r.6Rc.21@gated-at.bofh.it>
     [not found]     ` <tt0r.6Rc.23@gated-at.bofh.it>
     [not found]       ` <tt0r.6Rc.25@gated-at.bofh.it>
     [not found]         ` <tt0q.6Rc.15@gated-at.bofh.it>
     [not found]           ` <tuIT.TW.7@gated-at.bofh.it>
2003-09-08 15:10             ` [OT] Re: nasm over gas? Ihar 'Philips' Filipau
2003-09-08 15:17               ` Richard B. Johnson
2003-09-08 15:28                 ` Maciej Soltysiak
2003-09-08 15:26               ` Maciej Soltysiak
2003-09-08 19:00                 ` Gábor Lénárt
     [not found]           ` <tyCN.6RD.13@gated-at.bofh.it>
2003-09-08 20:08             ` Ihar 'Philips' Filipau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox