🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: rec.games.programmer
5 messages
5 total messages Started by Secret Mud Mon, 03 Aug 1992 14:24
Re: Perspective Mapper and Scaler Code...
#396
Author: Secret Mud
Date: Mon, 03 Aug 1992 14:24
11 lines
739 bytes
From: mykes@amiga0.SF-Bay.ORG (Mike Schwartz)
>Here's a programmer who is very professional.  Note that he chose to use
>Pascal to do the mundane tasks of opening files, parsing PCX format,
>and setting things up.  Then he lets it rip in 100% assembly.  Actually,
>there is about 100 lines too many of Pascal for my blood :)
>

At least he didn't use C for the wrapping.  Without Turbo Pascal's smart
linking, it would probably pull in 32k of libraries.

 - Ron Sharp.
Re: Perspective Mapper and Scaler Code...
#434
Author: Greg Bonney
Date: Wed, 05 Aug 1992 21:42
17 lines
1356 bytes
In article <712851855.9378@zooid.guild.org> ron@zooid.guild.org (Secret Mud) writes:
>From: mykes@amiga0.SF-Bay.ORG (Mike Schwartz)
>>Here's a programmer who is very professional.  Note that he chose to use
>>Pascal to do the mundane tasks of opening files, parsing PCX format,
>>and setting things up.  Then he lets it rip in 100% assembly.  Actually,
>>there is about 100 lines too many of Pascal for my blood :)
>>

I also noticed his use of goto's.  This isn't intended as a flame, but my
college professors would faint dead!

By the way, if the compatibility of various in-line assemblers is a problem,
why not keep most of the assembly code separate and link it in?  Then you
could use C for the "mundane" things, and the whole program would be fairly
portable, at least between Borland and Microsoft platforms.  IMHO, this would
be even more "professional".  Obviously, there's more than one way to skin a
cat, so please don't think I'm flaming anybody.
Re: Perspective Mapper and Scaler Code...
#442
Author: sl8nl
Date: Thu, 06 Aug 1992 03:21
27 lines
1474 bytes
>>>Here's a programmer who is very professional.  Note that he chose to use
>>>Pascal to do the mundane tasks of opening files, parsing PCX format,
>>>and setting things up.  Then he lets it rip in 100% assembly.  Actually,
>>>there is about 100 lines too many of Pascal for my blood :)
> 
> I also noticed his use of goto's.  This isn't intended as a flame, but my
> college professors would faint dead!

The goto statements came from the C code from a USENET post...read the
source code...

> By the way, if the compatibility of various in-line assemblers is a problem,
> why not keep most of the assembly code separate and link it in?  Then you

Because...not everyone has TASM...

> could use C for the "mundane" things, and the whole program would be fairly
> portable, at least between Borland and Microsoft platforms.  IMHO, this would

Not really.  I do a lot more inline coding than was in the file...ask my 
friends :)

> be even more "professional".  Obviously, there's more than one way to skin a

Professionalism is not one's choice of languages :)

Josh
Re: Perspective Mapper and Scaler Code...
#448
Author: Mike Schwartz
Date: Thu, 06 Aug 1992 10:50
34 lines
2307 bytes
In article <1992Aug5.214216.6503@esds.mdc.com> bonney@esds.mdc.com (Greg Bonney) writes:
> In article <712851855.9378@zooid.guild.org> ron@zooid.guild.org (Secret Mud) writes:
> >From: mykes@amiga0.SF-Bay.ORG (Mike Schwartz)
> >>Here's a programmer who is very professional.  Note that he chose to use
> >>Pascal to do the mundane tasks of opening files, parsing PCX format,
> >>and setting things up.  Then he lets it rip in 100% assembly.  Actually,
> >>there is about 100 lines too many of Pascal for my blood :)
> >>
>
> I also noticed his use of goto's.  This isn't intended as a flame, but my
> college professors would faint dead!
>

Make 'em faint every 5 minutes! :)  How fortunate that goto maps to an instruction
that is available on every CPU (or variant of the instruction): jmp, bra, jr, etc.
To ignore goto is like burying your head in the sand.

> By the way, if the compatibility of various in-line assemblers is a problem,
> why not keep most of the assembly code separate and link it in?  Then you
> could use C for the "mundane" things, and the whole program would be fairly
> portable, at least between Borland and Microsoft platforms.  IMHO, this would
> be even more "professional".  Obviously, there's more than one way to skin a
> cat, so please don't think I'm flaming anybody.

I personally do not like the style of PC compiler in-line assemblers.  I do
like having #asm/#endasm in my 'C' compiler though.  Lets you code functions
in you choice of language and keep your functions organized AS you like.

--
Amiga programmer of: GRn, MailMinder, Budokan, Beyond Dark Castle, Dark Castle
Sega Genesis programmer of: Dick Tracy and Marble Madness.
Mike Schwartz  (ames!zorch!amiga0!mykes or mykes@amiga0.sf-bay.org)
1124 Fremont Ave.
Los Altos, CA 94024
Re: Perspective Mapper and Scaler Code...
#537
Author: Warwick Allison
Date: Mon, 10 Aug 1992 03:37
44 lines
1341 bytes
mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes:

>Make 'em faint every 5 minutes! :)  How fortunate that goto maps to an
>instruction that is available on every CPU (or variant of the
>instruction): jmp, bra, jr, etc.  To ignore goto is like burying your
>head in the sand.  


Using unstructured branches (gotos) ruins optimisability.


Time this code:

	main()
	{
	  int i;

	#ifdef STRUCTURED
	  for (i=0; i<3000000; i++);
	#else
	  i=0;
	y:
	  if (i>=3000000) goto x;
	  i++;
	  goto y;

	x:;
	#endif
	}

using each of these:
	cc foo.c
	cc -DSTRUCTURED foo.c
	cc -O foo.c
	cc -O -DSTRUCTURED foo.c


--
Warwick
--
  _-_|\      warwick@cs.uq.oz.au            /Disclaimer:
 /     * <-- Computer Science Department,  /  
 \_.-._/     University of Queensland,    /      void (if removed)
      v      Brisbane, Australia.        /  
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads