AHCC

C and PASCAL (or any other high-level languages) in here please

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

AHCC

Postby Henk Robbers » Mon Nov 14, 2011 2:54 pm

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

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

Re: AHCC

Postby Henk Robbers » Sat Nov 19, 2011 9:03 pm

Of course I will also answer questions about AHCC itself.

User avatar
christos
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2294
Joined: Tue Apr 13, 2004 8:24 pm
Location: Greece
Contact:

Re: AHCC

Postby christos » Sat Nov 19, 2011 9:21 pm

Thanks for the release. I am not very good at C (or programming for that matter) but I do plan to experiment. It's already on my falcon.
Felix qui potuit rerum cognoscere causas.
My Atari blog

STOT Email address: stot(NoSPAM)atari(DOT)org

User avatar
DarkLord
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4178
Joined: Mon Aug 16, 2004 12:06 pm
Location: Prestonsburg, KY - USA
Contact:

Re: AHCC

Postby DarkLord » Sat Nov 19, 2011 10:18 pm

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.
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 520

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

AHCC V4.8

Postby Henk Robbers » Sun Nov 27, 2011 9:33 pm

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.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 11976
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: AHCC

Postby wongck » Mon Nov 28, 2011 12:57 am

Is there a debugger like that of Pure Debugger ?
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+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

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

Re: AHCC

Postby Henk Robbers » Mon Nov 28, 2011 11:06 am

wongck wrote:Is there a debugger like that of Pure Debugger ?


Unfortunately not.

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.
:-)

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 11976
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: AHCC

Postby wongck » Mon Nov 28, 2011 11:37 am

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.

That's the reason. It don't run well on the CT63 and so need to go back to 030 in Falc.
If there's one that works well on CT63/060 would be great.
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+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

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

AHCC V4.9

Postby Henk Robbers » Mon Jan 23, 2012 8:11 pm

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

helmut
Captain Atari
Captain Atari
Posts: 169
Joined: Thu Jan 07, 2010 4:30 pm

Re: AHCC

Postby helmut » Mon Jan 23, 2012 9:13 pm

Henk Robbers wrote:
wongck wrote:Is there a debugger like that of Pure Debugger ?


Unfortunately not.

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.
:-)


Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 11976
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: AHCC

Postby wongck » Tue Jan 24, 2012 10:32 am

helmut wrote:Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.

means in 256 colours.
Does it need any single user mode bits ? How to do that?
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+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

helmut
Captain Atari
Captain Atari
Posts: 169
Joined: Thu Jan 07, 2010 4:30 pm

Re: AHCC

Postby helmut » Wed Jan 25, 2012 9:00 pm

wongck wrote:
helmut wrote:Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.

means in 256 colours.
Does it need any single user mode bits ? How to do that?


If you're using MiNT: yes. Look here:

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.

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

Re: AHCC

Postby Henk Robbers » Wed Jan 25, 2012 11:20 pm

helmut wrote:
wongck wrote:
helmut wrote:Pure-Debugger runs on aranym in 8bit-Video. Has some flaws, but basically it works.

means in 256 colours.
Does it need any single user mode bits ? How to do that?


If you're using MiNT: yes. Look here:

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.


Aranym emulates a 68040. I have understood that most of the problems were due to the differences
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.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 11976
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: AHCC

Postby wongck » Wed Jan 25, 2012 11:33 pm

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.
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+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

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

AHCC V4.10

Postby Henk Robbers » Tue Mar 20, 2012 11:02 am

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

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

AHCC V4.10

Postby Henk Robbers » Wed Mar 21, 2012 10:34 pm

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"

User avatar
Orion_
Captain Atari
Captain Atari
Posts: 333
Joined: Sat Jan 10, 2004 12:20 pm
Location: France
Contact:

Re: AHCC

Postby Orion_ » Fri Mar 23, 2012 3:02 pm

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 !

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

Re: AHCC

Postby Henk Robbers » Fri Mar 23, 2012 10:10 pm

Orion_ 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 !


There should not be a 'long long' in stddef.h Make sure this stddef.h is the one from the include dir of AHCCST
include directory is OK. sinclude is for compiling AHCC itself.

User avatar
Orion_
Captain Atari
Captain Atari
Posts: 333
Joined: Sat Jan 10, 2004 12:20 pm
Location: France
Contact:

Re: AHCC

Postby Orion_ » Sun Mar 25, 2012 12:30 pm

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 :)

brainois
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 120
Joined: Mon Apr 17, 2006 4:32 pm
Location: Brussels, Belgium

"OE: fmove fpn, <ea>, NO DST" on float casting

Postby brainois » Fri Apr 13, 2012 12:48 pm

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:

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);
}

At compiling time, everything seemed ok... except two weirds statements in the journal (found in the zip file attached):

Code: Select all

OE: fmove fpn, <ea>, NO DST
OE: fmove fpn, <ea>, NO DST

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 :cry:

EDIT 4 : I think I might have found the reason... on the Henk Robbers' site:
AHCC lacking software floating point
. 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...
You do not have the required permissions to view the files attached to this post.

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

Re: AHCC

Postby Henk Robbers » Fri Apr 13, 2012 10:26 pm

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).

brainois
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 120
Joined: Mon Apr 17, 2006 4:32 pm
Location: Brussels, Belgium

Re: AHCC

Postby brainois » Sat Apr 14, 2012 7:17 am

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 :cheers:

Henk Robbers
AHCC Developer
AHCC Developer
Posts: 39
Joined: Mon Nov 14, 2011 2:37 pm

Re: AHCC

Postby Henk Robbers » Sat Apr 14, 2012 9:54 pm

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.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4849
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: AHCC

Postby simonsunnyboy » Sun Apr 15, 2012 2:48 pm

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.

Fixpoint math is sufficient for 95% of all cases. I strongly suggest to adopt it whereever useful.
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2252
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: "OE: fmove fpn, <ea>, NO DST" on float casting

Postby lp » Sun Apr 15, 2012 11:02 pm

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.


I can't help you with the 'C' but glad you found my guides useful. :D


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 1 guest