[comp.sys.amiga] frustration, frustration..

steelie@pro-charlotte.cts.com (Jim Howard) (12/20/87)

Is there anyone out there that programs in assembly on the Amiga
or am I just looking in the wrong places? And most importantly,
could Mark Riley be persuaded to post some of his asm code to
public? (hint, hint)
 
 
====================================================================
"I dont care, the !@#$$ thing still looks like a C-128!" -prospective Amigian
 
====================================================================

richard@gryphon.CTS.COM (Richard Sexton) (12/21/87)

In article <2166@crash.cts.com> steelie@pro-charlotte.cts.com (Jim Howard) writes:
>Is there anyone out there that programs in assembly on the Amiga
>or am I just looking in the wrong places? And most importantly,
>could Mark Riley be persuaded to post some of his asm code to
>public? (hint, hint)


Why would you want to ?

Write your algorithm in C, compile it, then look at the assembly output
the compiler spat out. Dont like it ? Change the C source, recompile it.

After a while you get to know what your compiler does, and how your CPU
works.

C ends up being shorthand for machine language, just like god and
dennis ritchie intended it to be. :-)

Usually on 2 - 10% of your code needs to be REAL fast, and its a lot easier
to code that in assembly than the whole thing.

(what are you doing on pro-charlotte ? Try pnet, and ask leo about plotting
pixels :-)


While I'm at it, this is for JBF@pro-charlotte:

The correct screen size to use in Dpaint II to work right with the canon
printer is 640x770 LM 1, RM 89. This gives you a 1 to 1 mapping between
screen and printer pixels.

That'll be a dollar, please. Mail it to greg@gryphon. This aint free ya know :-)

-- 
          "Well, they say that Santa Fe is less than 90 miles away"

  richard@gryphon.CTS.COM || {ihnp4!crash, hplabs!hp-sdd!crash}!gryphon!richard

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (12/21/87)

In article <2166@crash.cts.com> steelie@pro-charlotte.cts.com (Jim Howard) writes:
>Is there anyone out there that programs in assembly on the Amiga
>or am I just looking in the wrong places?

	Mark Riley, author of Sonix, Pak, LED, Nemesis, and the Sonix player,
programs *exclusively* in assembler.

	I hate him.							:-)

>And most importantly, could Mark Riley be persuaded to post some of his
>asm code to public? (hint, hint)
> 
	Never in a meeeeeeeellion years.  The guy is a business man.  He
never distributes the source to his work, not even to the people he works
for.

	Actually, I take that back.  He did post an assembly code version of
'Hello, World.' to BIX sometime back.  It assembles to 68 bytes.  He did it
to show all those wimpy C programmers that, no matter how hard you try, you
can always do it better in assembly.  He got flayed alive for it.

	Mark is an incredibly sharp guy.  Assembly programming is as easy to
him as C or Modula programming is to us lesser primates.

	However, I think a major part of his wizard talent is that he's
cooked up his own version of the stdio library for assembly.  The reason C
programming is so 'easy' to us is that a lot of the grunt work has been done
for us.  The startup code, the library interfaces, the I/O libraries, etc.
have all been written by the compiler vendors and provided to us.  Thus,
it's trivial for us to open a file, parse our arguments, call the Amiga OS,
etc.

	For assembly programmers, none of this exists, and so they are faced
with a more gargantuan task than the C people.  Except Mark.  He went to the
trouble to write all this stuff for himself many many moons ago (before many
of us heard of Amiga), and for him, it's just a matter of including a .o
file.

	I hate him.							:-)

	And no, I don't think you could cajole the source out of him.

	If you wish to get in touch with him, he's a regular visitor on BIX
and PeopleLink.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor

lee@uhccux.UUCP (Greg Lee) (12/22/87)

In article <4794@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
>In article <2166@crash.cts.com> steelie@pro-charlotte.cts.com (Jim Howard) writes:
>>Is there anyone out there that programs in assembly on the Amiga
>...

I do.

>...
>cooked up his own version of the stdio library for assembly.  The reason C
>programming is so 'easy' to us is that a lot of the grunt work has been done
>for us.  The startup code, the library interfaces, the I/O libraries, etc.
>have all been written by the compiler vendors and provided to us.  Thus,
>it's trivial for us to open a file, parse our arguments, call the Amiga OS,
>etc.
>...

This exagerates the difficulties of programming in assembler.  AmigaDos
and the ROM routines provide high-level interfaces to the system.  It's
trivial to open or close a file in an assembler program.  It's not
trivial to parse arguments, but it's not hard.  C programs  go through
a lot of wasted motion, mainly.  For someone with just a single
floppy, like me, all the overhead in using C would be difficult
to put up with.  Also, C-compilers cost too much.

Greg Lee
INTERNET: lee@uhccux.uhcc.hawaii.edu
UUCP:     {ihnp4,dcdwest,ucbvax}!sdcsvax!nosc!uhccux!lee
BITNET:   lee@uhccux

dougl@ism780c.UUCP (Doug Leavitt) (12/23/87)

In article <4794@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
>In article <2166@crash.cts.com> steelie@pro-charlotte.cts.com writes:
>>Is there anyone out there that programs in assembly on the Amiga
>>or am I just looking in the wrong places?
>
>	Mark Riley, author of Sonix, ...
>programs *exclusively* in assembler.
>
>	However, I think a major part of his wizard talent is that he's
>cooked up his own version of the stdio library for assembly.  The reason C
>programming is so 'easy' to us is that a lot of the grunt work has been done
>for us.  The startup code, the library interfaces, the I/O libraries, etc.
>have all been written by the compiler vendors and provided to us.  Thus,
>it's trivial for us to open a file, parse our arguments, call the Amiga OS,
>etc.

I know I can add more light to this subject.  Mark Riley and Dan Wolf
have both been good friends for some time (as I am to understand).  When
it came time for Dan to start on the Book "Assembly Language Programming
for the Amiga" he got in contact (or had been in contact) with Mark about
the subject.  As a result many of the ideas that Mark has or probably even
uses to some degree in his own work ended up in the book.

Much of Mark's ideas include simpler versions include files, a good set
of routines and macro's to code with, and the understanding that amiga.lib
is unnecessary for coding assembly language programs.

>	For assembly programmers, none of this exists, and so they are faced
>with a more gargantuan task than the C people.  Except Mark....
>
>	And no, I don't think you could cajole the source out of him.

As I have mentioned a couple of times before, now that Dan's and my book
is being pressed, assembly programmers won't have such a gargantuan task
ahead of them.  The book provides a large number of examples, reduced
include files, useful macro's and subroutines to specifically make it
easier programming Amiga assembly code.  Now that I have had a chance to
work on the book with Dan, and write soem code in His and Mark's style,
I wouldn't code back to the Commodore include file organization for anything.
It is far more complex than it really needs to be.

What can I say, I write in C a lot (I write C compilers for a living),
I program in assembly anytime I think it's necessary, and there is only
one style that I use on the Amiga.  Dan and Mark have one convert and I'm
glad that I saw the light.  (Hmm.... Sounds like preaching.  :) ).

	Anyways, stay tuned.....
	Doug Leavitt
	Minister, School of Assemblitology		:)
	dougl@ism780c.isc.com
	{ sdcrdcf, oliveb, uunet } !ism780c!dougl

carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) (12/24/87)

>In article <2166@crash.cts.com> steelie@pro-charlotte.cts.com (Jim Howard) writes:
>>Is there anyone out there that programs in assembly on the Amiga
>>or am I just looking in the wrong places?

   There aren't a lot of assembler examples floating around.

   One good example is the AStartup.asm code (Lattice may call their's
c.asm) which is the source for the startup code provided with Amiga
and Lattice C compilers.  AStartup.asm is also available on the 1.2
Native Developer Update disks from CATS, and I think Fish may also have
picked up the startups and startup.doc and put them on a Fish disk.
The startup code shows, among other things, how to

   - find ExecBase
   - call an Exec function (OpenLibrary, etc)
   - Use returned library base to call another library's function
   - How to set up and reference null terminated strings

   This is enough to get you started.  For more advanced assembler
examples, check out some of the device and handler examples on the
Fish disks.  At least some of these are in assembler.

   And, BTW, you don't have to do all of the startup work yourself.
I often link assembler programs with the same AStartup.asm and let
it do all the CLI/WB startup stuff for me.  If I need the args,
I can get them off the stack where the startup puts them for C.
(Note - devices, drivers, handlers must not be linked with the
 startup code.  Startup code is for programs started from CLI or WB)

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CATS   >>Commodore Amiga Technical Support<<
                     UUCP  ...{allegra,ihnp4,rutgers}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

peter@sugar.UUCP (Peter da Silva) (12/28/87)

In article ... richard@gryphon.CTS.COM (Richard Sexton) writes:
> In article ... steelie@pro-charlotte.cts.com (Jim Howard) writes:

[does anyone really care what the article # is? Oh well, you can get it
 from the References line]

> >Is there anyone out there that programs in assembly on the Amiga
> >or am I just looking in the wrong places?
> Why would you want to ?...

Yeh.

> C ends up being shorthand for machine language, just like god and
> dennis ritchie intended it to be. :-)

I though DMR *was* GOD.
-- 
-- Peter da Silva  `-_-'  ...!hoptoad!academ!uhnix1!sugar!peter
-- Disclaimer: These U aren't mere opinions... these are *values*.

richard@gryphon.CTS.COM (Richard Sexton) (01/05/88)

In article <1320@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes:
>> Why would you want to ?...
>
>Yeh.
>
>> C ends up being shorthand for machine language, just like god and
>> dennis ritchie intended it to be. :-)
>
>I though DMR *was* GOD.
Well, he was god for quite a while, but he lost it. To wit:

An former employee of the company where I work (no, it's not trailing
edge technology, thats a CIA front) returned over xmas to have lunch
with us. I had never met him, but he was an amigoid and I got to
talk to him.

"So, like I heard you worked at Bell labs"

"Yeah, I sure did. Never knew how good it was till I left"

"Hmm. Ever meet Dennis Ritchie"

"Well, almost. I found his office once, and was going to talk to him, 
but I peeked in and watched for a while. He was having a hell of a time
getting larn to compile and was saying some pretty nasty things about 
UNIX and C, so I left"

John Warnock is god.



-- 
    It's 90 miles too dark from my ignition, or something like that. 
                          richard@gryphon.CTS.COM
   {ihnp4!scgvaxd!cadovax, philabs!cadovax, codas!ddsw1} gryphon!richard