AHCC
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
AHCC
Hello.
I will use this forum for release announcements of AHCC.
Yesterday I released version 4.7
http://members.chello.nl/h.robbers/
I am also prepared to answer questions about C in general.
Please do so under this topic, because I might not have enough time to read the whole forum.
Regards.
Henk Robbers
I will use this forum for release announcements of AHCC.
Yesterday I released version 4.7
http://members.chello.nl/h.robbers/
I am also prepared to answer questions about C in general.
Please do so under this topic, because I might not have enough time to read the whole forum.
Regards.
Henk Robbers
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
Re: AHCC
Of course I will also answer questions about AHCC itself.
- DarkLord
- Fuji Shaped Bastard
- Posts: 4494
- Joined: Mon Aug 16, 2004 12:06 pm
- Location: Prestonsburg, KY - USA
- Contact:
Re: AHCC
Seconded. Glad to see the continued support and development for it. Much appreciated!
I always post the update and development announcements about it in the MINT message
forum on my BBS.
I always post the update and development announcements about it in the MINT message
forum on my BBS.
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 520
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 520
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
AHCC V4.8
LS
There is a new version available on my home page
http://members.chello.nl/h.robbers/
Changes:
november 28 2011
v4.8
Compiler:
Fix a crash that sometimes could occur when a local
initializer was absent or was wrong.
Fix a crash when a while expression is wrong or absent.
Allow {} around any local initializer.
Deny arrays of void.
Deny returning of arrays.
Fixed a regression since 4.7 leading to incorrect code
in rare situations.
Fix a error preventing floating constants of the form:
nE-n from compiling correctly.
Coldfire:
Fix incorrect code when a temporary was needed
from a memory location.
Library:
Fixed a leftover from Sozobon, where a floating point
integral part could not exceed |2^31|.
Changed v_pie --> v_pieslice
Have fun.
Henk Robbers.
There is a new version available on my home page
http://members.chello.nl/h.robbers/
Changes:
november 28 2011
v4.8
Compiler:
Fix a crash that sometimes could occur when a local
initializer was absent or was wrong.
Fix a crash when a while expression is wrong or absent.
Allow {} around any local initializer.
Deny arrays of void.
Deny returning of arrays.
Fixed a regression since 4.7 leading to incorrect code
in rare situations.
Fix a error preventing floating constants of the form:
nE-n from compiling correctly.
Coldfire:
Fix incorrect code when a temporary was needed
from a memory location.
Library:
Fixed a leftover from Sozobon, where a floating point
integral part could not exceed |2^31|.
Changed v_pie --> v_pieslice
Have fun.
Henk Robbers.
Re: AHCC
Is there a debugger like that of Pure Debugger ?
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
Re: AHCC
Unfortunately not.wongck wrote:Is there a debugger like that of Pure Debugger ?
I have in the pipeline at least the option to produce Pure C debug info.
Due to lack of time its is still there. (In the pipeline, that is.)
Besides I dont have anymore the hardware that can run Pure Debugger and writing such a debugger
from scratch is a lot of work.
Maybe someone here feels the need to write such a beast?
It needs to run on any M68K h/w and the Coldfire V4E.

Re: AHCC
That's the reason. It don't run well on the CT63 and so need to go back to 030 in Falc.Henk Robbers wrote:Besides I dont have anymore the hardware that can run Pure Debugger and writing such a debugger
from scratch is a lot of work.
If there's one that works well on CT63/060 would be great.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
AHCC V4.9
LS
There is a new version available on my home page
http://members.chello.nl/h.robbers/
Changes:
januari 24 2012
v4.9
Compiler:
Fixed a extremely stupid bug where comparisons of the kind
'constant compared to variable' were reversed wrongly.
e.g. (0 < i)
Fixed a terrible bug where under certain circumstances
a ftst insstruction got lost.
Accept spurious ampersand to a function name to get a
reference to that function.
There are FPU instruction that are NOT unary operaters.
These are: fmod, modf, ldexp and frexp.
Put these function in ahccstd.lib.
Fixed wrong code with comma expressions within expressions.
Coldfire:
Fix in the Coldfire Floating point code table.
Do not generate addressing mode 6 (An,Xn) with floating point
instructions.
Do not generate FScc instructions.
Repaired wrong divide for pointer difference calculation.
Library:
stdio.c: function tmpfile added.
string.c: function strtoul added.
stdlib.c: function system added.
ahccstdf.lib
Added support for missing FPU instructions on Coldfire.
Have fun.
H.Robbers
There is a new version available on my home page
http://members.chello.nl/h.robbers/
Changes:
januari 24 2012
v4.9
Compiler:
Fixed a extremely stupid bug where comparisons of the kind
'constant compared to variable' were reversed wrongly.
e.g. (0 < i)
Fixed a terrible bug where under certain circumstances
a ftst insstruction got lost.
Accept spurious ampersand to a function name to get a
reference to that function.
There are FPU instruction that are NOT unary operaters.
These are: fmod, modf, ldexp and frexp.
Put these function in ahccstd.lib.
Fixed wrong code with comma expressions within expressions.
Coldfire:
Fix in the Coldfire Floating point code table.
Do not generate addressing mode 6 (An,Xn) with floating point
instructions.
Do not generate FScc instructions.
Repaired wrong divide for pointer difference calculation.
Library:
stdio.c: function tmpfile added.
string.c: function strtoul added.
stdlib.c: function system added.
ahccstdf.lib
Added support for missing FPU instructions on Coldfire.
Have fun.
H.Robbers
Re: AHCC
Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.Henk Robbers wrote:Unfortunately not.wongck wrote:Is there a debugger like that of Pure Debugger ?
I have in the pipeline at least the option to produce Pure C debug info.
Due to lack of time its is still there. (In the pipeline, that is.)
Besides I dont have anymore the hardware that can run Pure Debugger and writing such a debugger
from scratch is a lot of work.
Maybe someone here feels the need to write such a beast?
It needs to run on any M68K h/w and the Coldfire V4E.
Re: AHCC
means in 256 colours.helmut wrote: Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.
Does it need any single user mode bits ? How to do that?
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Re: AHCC
If you're using MiNT: yes. Look here:wongck wrote:means in 256 colours.helmut wrote: Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.
Does it need any single user mode bits ? How to do that?
http://wiki.sparemint.org/index.php/XaA ... _Task_Mode
In TOS I don't know.
But don't expect too much: Sometimes there is no mouse, single-step stops randomly etc.
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
Re: AHCC
Aranym emulates a 68040. I have understood that most of the problems were due to the differenceshelmut wrote:If you're using MiNT: yes. Look here:wongck wrote:means in 256 colours.helmut wrote: Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.
Does it need any single user mode bits ? How to do that?
http://wiki.sparemint.org/index.php/XaA ... _Task_Mode
In TOS I don't know.
But don't expect too much: Sometimes there is no mouse, single-step stops randomly etc.
between the 68000-68030 and the 68040 in the exception stack frames.
Pure Debugger is certainly older than any TOS 68040 computer.
I could never use Pure debugger on my Milan either.
Re: AHCC
Thanks, guys,
Last time I tried to use Pure Debiugger on CT63, it was partially working.
Worst error was not updating the screen, which renders it completely useless...
So I will try the 256 colours trick.
Last time I tried to use Pure Debiugger on CT63, it was partially working.
Worst error was not updating the screen, which renders it completely useless...
So I will try the 256 colours trick.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
AHCC V4.10
LS
There is a new version available on my home page:
http://members.chello.nl/h.robbers/
march 20 2012
v4.10
General:
Some reorganization of debug code.
It is now possible to write intermediate code
(IXC, aka "interchange code") to a .i file alongside
the object code.
This option has been disentangled from other debug code.
The IXC might be of interest to the curious user, but it is
basically of use to myself when there are problems.
I dont need to recompile AHCC and compile other peoples
code. I can ask a user to send me the IXC.
Shell:
Name of loaded project is now shown in the menu bar.
always visible. Display menu entry removed.
Split menu title 'Project'.
No need for menu entry 'Assemble',
'Compile' will do just fine.
Entry removed.
Use HIDETREE to disable the debug menu.
(DISABLED was cleared by Boxkite after a selector action).
This caused some confusion.
Accept names without extension in the project file.
They now default to .c
Compiler:
Flag an error on a unclosed comment.
Detect differences in prototypes regarding qualifiers.
e.g: p(const char *); vs p(char *){...}
Fixed a subtle bug in the optimizer. (Fixes Marathon)
Coldfire:
Fixed wrong code where a pushed float was used in a call.
Fixed wrong code when casting float to unsigned long.
Assembler:
accept operands of the form (a,b) and (e,f,g)
where a is a 16 bit constant and e is a 8 bit constant.
generate a(b) resp. e(f,g) where possible.
Library:
Added function 'delay'.
Have fun!
H. Robbers
There is a new version available on my home page:
http://members.chello.nl/h.robbers/
march 20 2012
v4.10
General:
Some reorganization of debug code.
It is now possible to write intermediate code
(IXC, aka "interchange code") to a .i file alongside
the object code.
This option has been disentangled from other debug code.
The IXC might be of interest to the curious user, but it is
basically of use to myself when there are problems.
I dont need to recompile AHCC and compile other peoples
code. I can ask a user to send me the IXC.
Shell:
Name of loaded project is now shown in the menu bar.
always visible. Display menu entry removed.
Split menu title 'Project'.
No need for menu entry 'Assemble',
'Compile' will do just fine.
Entry removed.
Use HIDETREE to disable the debug menu.
(DISABLED was cleared by Boxkite after a selector action).
This caused some confusion.
Accept names without extension in the project file.
They now default to .c
Compiler:
Flag an error on a unclosed comment.
Detect differences in prototypes regarding qualifiers.
e.g: p(const char *); vs p(char *){...}
Fixed a subtle bug in the optimizer. (Fixes Marathon)
Coldfire:
Fixed wrong code where a pushed float was used in a call.
Fixed wrong code when casting float to unsigned long.
Assembler:
accept operands of the form (a,b) and (e,f,g)
where a is a 16 bit constant and e is a 8 bit constant.
generate a(b) resp. e(f,g) where possible.
Library:
Added function 'delay'.
Have fun!
H. Robbers
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
AHCC V4.10
LS
I made a mistake in the new version of math.h
Anybody wanting to compile a program using math.h,
please remove the inclusion of "prelude.h"
I made a mistake in the new version of math.h
Anybody wanting to compile a program using math.h,
please remove the inclusion of "prelude.h"
Re: AHCC
Hello,
I'm starting to use AHCC, because it seems to be a really nice compiler, with integrated editor/shell
I was trying AHCC on a plain ST using gemlib and the "include" directory (not sinclude).
I got an error while compiling in stddef.h saying that long long was not supported, is this a bug ?
or do we must use "sinclude" directory when compiling for ST ? (how to use gemlib then ?)
Thank you !
I'm starting to use AHCC, because it seems to be a really nice compiler, with integrated editor/shell
I was trying AHCC on a plain ST using gemlib and the "include" directory (not sinclude).
I got an error while compiling in stddef.h saying that long long was not supported, is this a bug ?
or do we must use "sinclude" directory when compiling for ST ? (how to use gemlib then ?)
Thank you !
My retro games shop including Atari ST/Falcon/Firebee games ! -- Free Atari games/demos/tools -- Free Falcon demos/tools
Atari Mega STe 4MB + SD2SCSI 1GB + NOVA ET4000 + Pico PSU + Gotek HxC // Atari STe 2MB
Atari Mega STe 4MB + SD2SCSI 1GB + NOVA ET4000 + Pico PSU + Gotek HxC // Atari STe 2MB
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
Re: AHCC
There should not be a 'long long' in stddef.h Make sure this stddef.h is the one from the include dir of AHCCSTOrion_ wrote:Hello,
I'm starting to use AHCC, because it seems to be a really nice compiler, with integrated editor/shell
I was trying AHCC on a plain ST using gemlib and the "include" directory (not sinclude).
I got an error while compiling in stddef.h saying that long long was not supported, is this a bug ?
or do we must use "sinclude" directory when compiling for ST ? (how to use gemlib then ?)
Thank you !
include directory is OK. sinclude is for compiling AHCC itself.
Re: AHCC
ok I finally found why.
I was including mt_gem.h before stdlib.h etc...
now I include stdlib and then mt_gem and it's working
I was including mt_gem.h before stdlib.h etc...
now I include stdlib and then mt_gem and it's working

My retro games shop including Atari ST/Falcon/Firebee games ! -- Free Atari games/demos/tools -- Free Falcon demos/tools
Atari Mega STe 4MB + SD2SCSI 1GB + NOVA ET4000 + Pico PSU + Gotek HxC // Atari STe 2MB
Atari Mega STe 4MB + SD2SCSI 1GB + NOVA ET4000 + Pico PSU + Gotek HxC // Atari STe 2MB
-
- Obsessive compulsive Atari behavior
- Posts: 122
- Joined: Mon Apr 17, 2006 4:32 pm
- Location: Brussels, Belgium
"OE: fmove fpn, <ea>, NO DST" on float casting
Hello
I have just started to learn programming GEM in C using C-MANSHIP from Clayton Walnut.
By the way, thanks to Lonny Pursell for porting it to ST-GUIDE format. Very handy.
Unfortunately, I do not have a real atari machine anymore...
So, I am running with FreeMint 1.17, Xaaes and Teradesk under Aranym 0.9.13 on a OpenSuSE 12.1 host.
I have chosen AHCC 4.10 as my development environment.
I have reached chapter 4 and the craps game... and I am facing a big issue...
The program contains a function percent defined as followed:
At compiling time, everything seemed ok... except two weirds statements in the journal (found in the zip file attached):
And indeed, when running the application, it pathetically crashes when executing the percent function.
It seems that the casting to float causes this problem.
But I have no idea if this is because I am running under Aranym instead of a real atari.
I joined all the files in this post so that s.o. could try to compile it on a real machine to see if it works.
I hope s.o. will be able to help me as I am very frustrated not being able to complete the learning... and start the project I have in mind...
Thanks a lot.
Francois
EDIT 1: I just try with Lattice 5.6 (under simple TOS 4.04 as it crashes under FreeMint) and Pure C 1.1 and both are complaining about undefined symbols which make the linking fails. Strangely, AHCC did not complain, but these undefined symbols might expalain the error I get...
Under PURE C, the undefined symbols are:
_wxcnv
_xwdiv
_xxmul
_xwcnv
So, if anybody got an idea
EDIT 2: I solved the undefined symbols issues under PURE C by adding the PCFLTLIB.LIB into the project file... and youhouuuuu! now it works. So this is definitly NOT an issue of running on Aranym
. Need to find out the equivalent of this library on AHCC.
EDIT 3: Definitely, there is no such undefined symbols under AHCC when linking... so I do not have an explanation why the application build with AHCC crashes while it runs just as expected when build with PURE C. So, for the time being, the issue with AHCC remains and I will stick to Pure C... Hope the author of AHCC will read this thread and HELP ME
EDIT 4 : I think I might have found the reason... on the Henk Robbers' site:
I have just started to learn programming GEM in C using C-MANSHIP from Clayton Walnut.
By the way, thanks to Lonny Pursell for porting it to ST-GUIDE format. Very handy.
Unfortunately, I do not have a real atari machine anymore...

So, I am running with FreeMint 1.17, Xaaes and Teradesk under Aranym 0.9.13 on a OpenSuSE 12.1 host.
I have chosen AHCC 4.10 as my development environment.
I have reached chapter 4 and the craps game... and I am facing a big issue...
The program contains a function percent defined as followed:
Code: Select all
void percent (int num_games, int num_win)
{
float pc;
pc = ((float) num_win) / (float) num_games) * 100.0;
printf("You've won %d %% of the games.\n", (int) pc);
}
Code: Select all
OE: fmove fpn, <ea>, NO DST
OE: fmove fpn, <ea>, NO DST
It seems that the casting to float causes this problem.
But I have no idea if this is because I am running under Aranym instead of a real atari.
I joined all the files in this post so that s.o. could try to compile it on a real machine to see if it works.
I hope s.o. will be able to help me as I am very frustrated not being able to complete the learning... and start the project I have in mind...
Thanks a lot.
Francois
EDIT 1: I just try with Lattice 5.6 (under simple TOS 4.04 as it crashes under FreeMint) and Pure C 1.1 and both are complaining about undefined symbols which make the linking fails. Strangely, AHCC did not complain, but these undefined symbols might expalain the error I get...
Under PURE C, the undefined symbols are:
_wxcnv
_xwdiv
_xxmul
_xwcnv
So, if anybody got an idea

EDIT 2: I solved the undefined symbols issues under PURE C by adding the PCFLTLIB.LIB into the project file... and youhouuuuu! now it works. So this is definitly NOT an issue of running on Aranym

EDIT 3: Definitely, there is no such undefined symbols under AHCC when linking... so I do not have an explanation why the application build with AHCC crashes while it runs just as expected when build with PURE C. So, for the time being, the issue with AHCC remains and I will stick to Pure C... Hope the author of AHCC will read this thread and HELP ME

EDIT 4 : I think I might have found the reason... on the Henk Robbers' site:
. I don't understand what that means, but I guess it explains why it does not work. So, for the time being, let's stick with PURE C...AHCC lacking software floating point
You do not have the required permissions to view the files attached to this post.
-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
Re: AHCC
If you run Aranym, you don't need software floating point.
Aranym implements a full 68881 Coprocessor.
Compile your program for 68881 (option .C[-8] and you can hold on to a free compiler (AHCC that is).
Aranym implements a full 68881 Coprocessor.
Compile your program for 68881 (option .C[-8] and you can hold on to a free compiler (AHCC that is).
-
- Obsessive compulsive Atari behavior
- Posts: 122
- Joined: Mon Apr 17, 2006 4:32 pm
- Location: Brussels, Belgium
Re: AHCC
Thank for your help Henk.
This works now.
So, I will stick to AHCC and use PURE C only if I want to target real ataru st or falcon without FPU.
Cheers
François
PS: by the way, thank you for developing and maintaining such a great tool
This works now.
So, I will stick to AHCC and use PURE C only if I want to target real ataru st or falcon without FPU.
Cheers
François
PS: by the way, thank you for developing and maintaining such a great tool

-
- AHCC Developer
- Posts: 39
- Joined: Mon Nov 14, 2011 2:37 pm
Re: AHCC
Tip:
If your program only uses float for calculating percentages:
int a,b;
int percentage = a*100L / b;
No casts, no parentheses, no floats
You then can produce a ST version of your program. Much wider audience.
If your program only uses float for calculating percentages:
int a,b;
int percentage = a*100L / b;
No casts, no parentheses, no floats

You then can produce a ST version of your program. Much wider audience.
-
- Moderator
- Posts: 5247
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: AHCC
Fixpoint math is sufficient for 95% of all cases. I strongly suggest to adopt it whereever useful.Henk Robbers wrote:Tip:
If your program only uses float for calculating percentages:
int a,b;
int percentage = a*100L / b;
No casts, no parentheses, no floats
You then can produce a ST version of your program. Much wider audience.
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
- lp
- Fuji Shaped Bastard
- Posts: 2532
- Joined: Wed Nov 12, 2003 11:09 pm
- Location: GFA Headquarters
- Contact:
Re: "OE: fmove fpn, <ea>, NO DST" on float casting
I can't help you with the 'C' but glad you found my guides useful.brainois wrote:I have just started to learn programming GEM in C using C-MANSHIP from Clayton Walnut.
By the way, thanks to Lonny Pursell for porting it to ST-GUIDE format. Very handy.
