Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AHCC V3.b4

1 view
Skip to first unread message

Henk Robbers

unread,
Nov 25, 2009, 10:53:08 AM11/25/09
to

LS

AHCC is a Pure C compatible C compiler.

There is a new version available on my homepage (see sig)

Summary of changes:

Assembler:
Fixed a memory leak;
C preprocessor activated in .S files
While doing this, it appeared that AHCC never checked
if a preprocessor command was the first of a line. :-(
This is now repaired.

.global
.org
.equ and .set second form
.ascii
.asciil
.asciiz
.page

option -*u default .super

Repair broken exg An,Dn

Allow mixed register lists of form:
Dn-An ( ascending register number) --> Dn-D7/A0-An
An-Dn (descending register number) --> An-A0/D7-Dn

Option -*w to set default size for Xn (no dot).
default (option not set) is word.
Also fixed a bug in determining the Xn size.

Compiler:
Activated and fixed option -x prepend underscore.
Fixed occasionally incorrect line number in messages.
#warning
__func__ identifier and its synonim __FUNCTION__
case: long constants allowed
Fixed stupid mistake in constant validation since v3.b3
Typos in constant folding for <= and >= (wrong way around)
Not detected until compiling emutos :-(

Negative absolute operands handled correctly.
Removed '#' from #warn, #error messages.
Less cryptic message for mismatching pointers to function.
Sometimes the Help opened the wrong file.
Fixed by restructuring the Help DataBase.

Allow 'formal' declaration of arrays by specifying
empty [] pair. e.g. static char forward[];

It appeared that if flag 'cdecl calling' was set,
functions returning a pointer returned in D0, wereas the
callee expected the pointer dtill in A0.
Probably a relic of a distant past.
Pointers are now always returned in A0.
Fixed another bug in 'cdecl' calling in combination
with __syscall__. (a2 wasnt reserved)

Incrementing a void * wasnt warned nor handled sensibly.
Arithmetic to unscalable pointers is warned and not scaled.

Fixed wrong handling of absolute Lvalues and references.
Fix and improvement of rare optimization incidence.
Fixed a bug in implicit dereferencing of callee expressions.
e.g. (a ? c : d)(arg);
Fixed a terrible regression in constant casting.
Casting int to float was lost somewhere.
Fixed a bug in long pointer scaling in 68000 mode (-2-)

Linker:
Fixed a memory bug for libraries with excessive
number of names. ( more than 1359 )
Result of a nested project was not correctly passed
and the linker was not called. Fixed.
'Linking' message gives name of project file.
Object files are linked in the order in which they
appear in the project file.

Build a ROM image:
Option -t=N N is startaddress of text+data sections.
bss start will be set at 0.
-i=N N is size of image in kilobytes. (zero padding)

Make sure ALL areas are of even size.

Shell:
KIT: button 'inherit options'
for nested projects, inherit options from parent project.

Editor:
Improvement of UNDO behaviour. UNDU after HELP.

--
Groeten; Regards.
Henk Robbers. http://members.chello.nl/h.robbers
Interactive disassembler: TT-Digger; http://digger.atari.org
A Home Cooked C compiler: AHCC; http://ahcc.atari.org

sil

unread,
Nov 26, 2009, 7:41:57 AM11/26/09
to

> AHCC is a Pure C compatible C compiler.
>
> There is a new version available on my homepage (see sig)

That's awesome. Thanks for working on this.

sil.

Henk Robbers

unread,
Nov 26, 2009, 5:55:21 PM11/26/09
to

Something is missing in the doc's

Compiling AHCC with either Pure C or AHCC:
the sinclude folder must be used.
Compiling CALC and DIGGER:
the ainclude folder must be used.

You can set this via menu:Project-->Config

AHCC_PRJ.TTP defaults to ainclude.

AHCC.TTP and AHCL.TTP are there for completeness
and never used by myself.

I am not interested in Unixoids and their scripting aphasiae.

paulwratt

unread,
Dec 2, 2009, 7:27:21 AM12/2/09
to
On Nov 27, 9:55 am, Henk Robbers <h.robb...@chello.nl> wrote:
>
> AHCC_PRJ.TTP defaults to ainclude.
>
> AHCC.TTP and AHCL.TTP are there for completeness
> and never used by myself.
>
> I am not interested in Unixoids and their scripting aphasiae.
>

I am, and I do test them from the command line, for various reasons,
but I use the AHCC for editing (Qed does not like the tab chars) and
overall project compiling.

AHCC_PRJ.TTP currently accepts a project file as the only parameter.
If you dont mind, I will look at adding extra command line options, at
least for includes and lib folders

Your testing of Teradesk lately has confirmed that I do not have libs
set up properly, with command line this is much quicker to test (for
me)

BTW can you post your fixes regarding the latest Teradesk test
compile. At the moment I am stuck only on linking (under MiNT), having
made minor adjustments to the sources, an wish to confirm those
changes..


Paul

Henk Robbers

unread,
Dec 2, 2009, 11:51:58 AM12/2/09
to
paulwratt wrote:

> AHCC_PRJ.TTP currently accepts a project file as the only parameter.
> If you dont mind, I will look at adding extra command line options, at
> least for includes and lib folders

I do mind. The purpose of this program is to be able to drop a
projectfile on it via the desktop. Pressing ALT while dropping
forces a make all. I am fixing a problem with the .C [-I...] option
in the project file. The project file is the place to be for
include directories.
The same is true for the lib directory. I might have neglected
this, because I only use the GEM AHCC (lib via KIT).
I am investigating this issue.

AHCL accepts all input files, including libraries on the
commandline. Files are loaded in the order of the commandline
as long as there are unresolved references and kept in memory.
AHCL's reference matching is recursive, so this order is not
vital. However the input will appear in the executable
binary in this order. To start the recursive reference cascade it
is necessary that the first file must reference something.
Most startup codes do this by refering to main.

This is how it is designed, I never ran AHCL.
It should work because AHCC uses a internal calling mechanism
that mimics the commandline.

The last time I have typed a commandline was in 1985 when
I got payed for it. And it wasn't even Unix, but ICL 2900 VME/B's SCL.

> Your testing of Teradesk lately has confirmed that I do not have libs
> set up properly, with command line this is much quicker to test (for
> me)

> BTW can you post your fixes regarding the latest Teradesk test
> compile. At the moment I am stuck only on linking (under MiNT)

What exactly is the problem?

>, having
> made minor adjustments to the sources, an wish to confirm those
> changes..

about jmpa6:

#if __AHCC__
void __asm__ jmpa6(void)
{
addq.l #4, sp /* adjust stack; jmpa6 is called */
jmp (a6)
}
#else
void jmpa6(void) 0x4ED6;
#endif

A new AHCC is not ready yet.
I found two more issues, which I am investigating.
They are rare. Only occurred until now.

:-) Your involvement pays off.

paulwratt

unread,
Dec 19, 2009, 3:50:15 AM12/19/09
to
On Dec 3, 3:51 am, Henk Robbers <h.robb...@chello.nl> wrote:
> paulwratt wrote:
> > AHCC_PRJ.TTP currently accepts a project file as the only parameter.
> > If you dont mind, I will look at adding extra command line options, at
> > least for includes and lib folders
>
> I do mind. The purpose of this program is to be able to drop a
> projectfile on it via the desktop. Pressing ALT while dropping
> forces a make all. I am fixing a problem with the .C [-I...] option
> in the project file. The project file is the place to be for
> include directories.
> .. snip ..

> This is how it is designed, I never ran AHCL.
> It should work because AHCC uses a internal calling mechanism
> that mimics the commandline.
>
Thanks, this is good to know.

> The last time I have typed a commandline was in 1985 when
> I got payed for it. And it wasn't even Unix, but ICL 2900 VME/B's SCL.
>
> > Your testing of Teradesk lately has confirmed that I do not have libs
> > set up properly, with command line this is much quicker to test (for
> > me)
> > BTW can you post your fixes regarding the latest Teradesk test
> > compile. At the moment I am stuck only on linking (under MiNT)
>
> What exactly is the problem?
>

you have answered this else where, TeraDesk requires the PureC Libs

> >, having
> > made minor adjustments to the sources, an wish to confirm those
> > changes..
>
> about jmpa6:
>
> #if __AHCC__
>         void __asm__ jmpa6(void)
>         {
>                 addq.l  #4, sp  /* adjust stack; jmpa6 is called */
>                 jmp     (a6)
>         }
> #else
>         void jmpa6(void) 0x4ED6;
> #endif
>

Thanks

I think used the following:
void jmpa6(void) {0x4ED6;}
I have added your code to the 4.01 source I have..

> A new AHCC is not ready yet.
> I found two more issues, which I am investigating.
> They are rare. Only occurred until now.
>
> :-) Your involvement pays off.
>
> --
> Groeten; Regards.
> Henk Robbers

no problem :)

0 new messages