[A89] Re: Anybody Alive?
[Prev][Next][Index][Thread]
[A89] Re: Anybody Alive?
The other option is that assembly is fun.
Suppose you have this code in c
if (*pointer == MUL_TAG) pointer--;
the corresponding code tigcc makes will be:
cmp.b #MUL_TAG,(a0)
beq DoSubtraction
Continue:
DoSubtraction
subq.l #1,a0
bra Continue
Whereas an intelligent asm programmer would do:
cmp.b #Mul_TAG,(a0)
bne SkipSubract
subq.l #1,a0
SkipSubract:
Continue:
The assembler version is 1 instrction smaller and has only one branch
of the short form. The c version has two branches that might be of the
short or long form depending on how large the program is. This is just
one example.
-Samuel
Quoting Brett Simmers <bsimmers@attbi.com>:
>
> Heh, it's been over 2 months since the last message here. Are you
> thinking
> of doing assembly or C? Either way, you should download TIGCC at
> http://tigcc.ticalc.org. It's the best IDE/programming tool for the
> 68k
> calcs; it does GNU assembly, standard 68k assembly, and C. There are
> some
> good tutorials at http://technoplaza.net/programming/ (C) and
> http://technoplaza.net/tigcc-asm/ (assembly). C is a lot easier to
> program
> than assembly and isn't that much slower, but there are people who
> prefer to
> use assembly so they can squeeze every little bit of performance out
> of the
> processor. In my opinion, the tiny performance gain over C by
> programming
> in assembly isn't worth the extra programming effort. Hope this
> helps.
>
>
>
> Brett Simmers
> bsimmers@attbi.com
>
> ----- Original Message -----
> From: "Joe Pemberton" <joe@joepnet.com>
> To: "assembly-89" <assembly-89@lists.ticalc.org>
> Sent: Tuesday, November 12, 2002 6:02 PM
> Subject: [A89] Anybody Alive?
>
>
> > Is anybody on this list still active? I ask because I'm trying to
> migrate
> from z80 to 68k and I'd like some pointers =)
> > - - Joe
> > joe@joepnet.com
> >
> >
> >
>
>
--
23 He (Elisha) went up from there to Bethel; and while he was going up
on
the way, some small boys came out of the city and jeered at him saying,
"Go away, baldhead! Go away, baldhead! 24 When he turned around and
saw
them, he cursed them in the name of the lord. Then two she-bears came
out
of the woods and mauled forty-two of the boys. 25 From there he went
on
to Mount Carmel, and then returned to Samaria.
- 2 Kings 2: 23-25
References: