[MSX-C] Q&A official thread

Pagina 54/57
47 | 48 | 49 | 50 | 51 | 52 | 53 | | 55 | 56 | 57

Van Grauw

Ascended (10296)

afbeelding van Grauw

27-12-2017, 20:51

MSX-C is the older K&R C, right?

Van PingPong

Prophet (3833)

afbeelding van PingPong

27-12-2017, 23:03

Grauw wrote:

MSX-C is the older K&R C, right?

from what i have seen yes. (and to be honest i do not like this...)
sdcc is somewhat ansi compliant and it is tested like gcc is.
this should allow, some exotic things like working in c++ then translate to c if one can generate c code from c++.
on z80 this is probably inefficient but fun!

Van aceki

Master (147)

afbeelding van aceki

28-12-2017, 16:35

PingPong wrote:
aceki wrote:
PingPong wrote:
Giangiacomo Zaffini 2 wrote:

For SDCC and MSX I saw different projects aiming at helping being productive.
I didn't tracked them down, so I don't have their URLs at hands, but with a simple search I found again
snpl's skeleton of SDCC C project targeting MSX
and
RetroDeLuxe game engine for MSX first generation (Msx1)
Then there's z88dk and others c compilers.

Retrodeluxe engine routines contained on vdp.c file are not correctly implemented:
vdp_poke contains an add a,#0x40. better should be "or a, #0x40". Plus on the end there is a double ei instruction that is not needed.
vdp_poke_di contains an add a,#0x40. better should be or 0x40.
vdp_peek should NOT contain an add a, #0x40 instruction instead something like and a, 0x3f to ensure a read access.

This engine, based on sdcc by what I see, therefore follows the same guidelines as msx-c? Or point more to a more advanced c?

It is not a question of more advanced 'c' rather than the proper way to interact with hw.
SDCC is a ansi 'c' implementation.
msx-c not

Perfect!! thank you if I understand you correctly, SDCC is a "pure" C ani, unlike the MSX-C that is not. And how is the theme of librarys?

Van PingPong

Prophet (3833)

afbeelding van PingPong

28-12-2017, 22:08

aceki wrote:

Perfect!! thank you if I understand you correctly, SDCC is a "pure" C ani, unlike the MSX-C that is not. And how is the theme of librarys?

libraries: it does appear that the most important problem is libraries.
really this is the less important thing.
to interact with msx you need
- to call BIOS services
- manage the VDP (as explained a matter of few routines)
- manage the PSG (another very simple thing

SDCC provides inline assembly and sfx ports . with those features all three things above are fairly easy to do.
So the problem of libraries is a false problem... the ability to mix inline assembly with C source make things easy to implement.
Plus by default there is a skeleton of sdcc that allow to create a simple msxdos application (.COM). with this you can easily address the entire 64K space of z80....
sdcc is not a speedy gonzales with z80 code generation but older 8 bits cpu were not C friendly....
for time critical operations you can always resort to inline assembly.

Van Wolverine_nl

Paragon (1159)

afbeelding van Wolverine_nl

29-12-2017, 11:15

I agree, libraries isnt a problem, i thought it was, but there are some good ones out there with most usefull stuff.

Van aceki

Master (147)

afbeelding van aceki

29-12-2017, 14:45

Well, I just have to start ! greetings to all!!! and good year

PS: what should I read, to understand well the C, which uses SDCC

Van Giangiacomo Zaffini 2

Champion (261)

afbeelding van Giangiacomo Zaffini 2

29-12-2017, 18:48

@ aceki: in order to master C programming language, I suggest You to read
1. a book on c: programming in c by Kelley and Pohl
2. expert c programming: deep c secrets by Peter van den Linden
and to use as much as You can
3. cppreference section on C programming language (iso/iec 9899)

Maybe I'll update some old SDCC test projects for MSX that I had done before.
Then look at those
No.2 Cobinee beautiful exemples
Ciao!

Van aceki

Master (147)

afbeelding van aceki

02-01-2018, 16:39

Giangiacomo Zaffini 2 wrote:

@ aceki: in order to master C programming language, I suggest You to read
1. a book on c: programming in c by Kelley and Pohl
2. expert c programming: deep c secrets by Peter van den Linden
and to use as much as You can
3. cppreference section on C programming language (iso/iec 9899)

Maybe I'll update some old SDCC test projects for MSX that I had done before.
Then look at those
No.2 Cobinee beautiful exemples
Ciao!

Thank you!!

Van cosmic

Supporter (15)

afbeelding van cosmic

24-06-2018, 16:02

Hi!
I am finding the exactly same issue while using msx-c 1.2 and nextor (command2.com v2.44).

Is that a common/known issue?. If so, is there any solution out there?
Not using Nextor nowadays is crazy, so without a solution to this issue it makes using msx-c barely useless (unless you want to have a dedicated environment only for compiling).

Regards

Van cosmic

Supporter (15)

afbeelding van cosmic

24-06-2018, 16:05

Josb wrote:

As I don't want to open another thread for my simple question and it is related to this one. I would like to ask whether MSX-C has some kind of incompatibility to NEXTOR. I'm probing some codes with the Lavandeira's c.bat and it always gets "system error 64 reading drive H:" when calling m80 assembler.

Thanks

Hi!
I am finding the exactly same issue while using msx-c 1.2 and nextor (command2.com v2.44).

Is that a common/known issue?. If so, is there any solution out there?
Not using Nextor nowadays is crazy, so without a solution to this issue it makes using msx-c barely useless (unless you want to have a dedicated environment only for compiling).

Regards

Pagina 54/57
47 | 48 | 49 | 50 | 51 | 52 | 53 | | 55 | 56 | 57