State of the art in C programming for the MSX?

Страница 5/6
1 | 2 | 3 | 4 | | 6

By ARTRAG

Enlighted (6237)

Аватар пользователя ARTRAG

20-07-2016, 21:01

Use hi-tech c cross compiler for dos

By AxelStone

Prophet (2674)

Аватар пользователя AxelStone

20-07-2016, 21:07

ARTRAG wrote:

Use hi-tech c cross compiler for dos

The libs released for HiTech C are compatible with any version? This is, I've downloaded MSX lib for hiTech-C, MSX version, are those .rel compatible with Hitech C DOS version?

Thanks.

By DarkSchneider

Paladin (862)

Аватар пользователя DarkSchneider

20-07-2016, 21:29

ARTRAG wrote:

Use hi-tech c cross compiler for dos

It has the MSX-C libs? It is a 32 or 16 bit executable? Because 16 bit does not work on 64 bit systems.

By ARTRAG

Enlighted (6237)

Аватар пользователя ARTRAG

20-07-2016, 21:44

Rel libs do not work, sorry. You need to recompile them.
It will work in dosbox, not in windows 8 and up sorry

By AxelStone

Prophet (2674)

Аватар пользователя AxelStone

20-07-2016, 21:58

ARTRAG wrote:

Rel libs do not work, sorry. You need to recompile them.
It will work in dosbox, not in windows 8 and up sorry

Then is not a real advantage against usage native HiTech C for MSX. You can start OpenMSX with a PC folder mounted as fdd, edit files with notepad++, compile in realtime with OpenMSX using F9 throttle) and test. It's a very fast way to work.

I'm interested in Solid C because I've seen that syntax is really similar to MSX-C from ASCII and I've a lot of code done, so I'd like to make as few changes as possible.

Thanks anyway.

P.D.: Someone knows the answer about compile with MSX Solid C?

By ARTRAG

Enlighted (6237)

Аватар пользователя ARTRAG

20-07-2016, 22:27

It is much more efficient than its cpm equivalent.

By DarkSchneider

Paladin (862)

Аватар пользователя DarkSchneider

20-07-2016, 22:28

Maybe sources are in somewhere for recompiling.

By ARTRAG

Enlighted (6237)

Аватар пользователя ARTRAG

20-07-2016, 23:37

HiTech C cross compiler comes with all the sources of its ANSI-c libraries
I would suggest or to use a moder C cross compiler (e.g. SDCC) still improving and supported, or to use a "dead" project with a large base of available sources and a well consolidated reputation
Are you sure that Solid C is stable and bug free?

By DarkSchneider

Paladin (862)

Аватар пользователя DarkSchneider

21-07-2016, 09:14

And where can be found the Hi-Tech C compiler for DOS?

Also, where can be found a newer version of Solid-C compiler? I think to heard about an 1.01 version or even a 2.0 version, but not sure.

By DarkSchneider

Paladin (862)

Аватар пользователя DarkSchneider

21-07-2016, 12:01

For support and continuity SDCC seems a good option. The question I have is what syntax uses its assembler "sdasz80"?. I have found the MSX-C lib sources in Solid C and Hi-tech C format, Solid C uses M80 syntax. Could any of them be easily adapted to SDCC?

http://www.vector.co.jp/vpack/filearea/other/msx/prog/

For Hi-tech, you also need the Resource kit #2 that includes the DOS functions. In Solid C are included in its standard lib.
But the resources kit #2 does not includes sources, only compiled libs :(

Also, I have seen some extra difficulty, the SDCC calling convention:

Quote:

4.3.3 Callingconvention By default, all parameters are passed on the stack, right-to-left. 8-bit return values are passed in l, 16-bit values in hl, 32-bit values in dehl. Except for the GBZ80, where 8-bit values are passed in e, 16-bit values in de, 32-bit values in hlde. Larger return values are passed in memory in a location specified by the caller through a hidden pointer argument. There are three other calling conventions supported, which can be specified using the keywords __smallc, __z88dk_fastcall (not on GBZ80) and __z88dk_callee. They are primarily intended for compability with libraries written for other compilers. For __smallc, the parameters are passed on the stack, left-to-right, but variable arguments are currently not supported. For __z88dk_fastcall, there may be only one parameter of at most 32 bits, which is passed the same way as the return value. For __z88dk_callee, parameters are passed on the stack, but the stack is not adjusted for the parameters after the call (thus the callee has to do this instead). __z88dk_callee can be combined with __smallc.

ASCII-C uses registers for the 3 first parameters and then the stack. So it could involve many modifications to those sources for functions that get parameters.

Страница 5/6
1 | 2 | 3 | 4 | | 6