ASCII MSX C compiler options and examples?

Page 1/5
| 2 | 3 | 4 | 5

Par Guseco

Expert (68)

Portrait de Guseco

14-03-2011, 09:21

Dear all, Does anybody knows what are the ASCII MSX C compiler and linker options?
Does anybody has example of .c programs in ASCII MSX C?

Thanks for all,

Guseco Big smile

!login ou Inscrivez-vous pour poster

Par MicroTech

Champion (385)

Portrait de MicroTech

14-03-2011, 10:14

HansO pages contained all the info you are looking for but they are no more reachable Shocked!

But I made a backup copy of the following folders/items:
- bootDisk
- msxC-1.10
- msxC-1.20
- msxC-Lib
- msxC-Manual
- msxC-Utils
Less than 2 MB in uncompressed format.
If you wish I can send them by e-mail...

Par Guseco

Expert (68)

Portrait de Guseco

14-03-2011, 10:19

Thaks MicroTech

My e-mail is gustavo.puche@gmail.com

Best regards,

Guseco B-)

Par janghang

Expert (125)

Portrait de janghang

14-03-2011, 10:28

Hi MicroTech, could you please send the files to me, too? janghang_at_gmail_dot_com
Many thanks.

Par MicroTech

Champion (385)

Portrait de MicroTech

14-03-2011, 11:27

Done! Let me know if there are problems...Smile

Par fukenko

Champion (357)

Portrait de fukenko

14-03-2011, 16:39

Sample of MSX-C program.
Puzzle game "EGYPT" which is printed in ASCII'S MSX-C handbook "MSX-C Nyu-mon"
If you use MSX-C Ver1.2,please rewrite "/* fflush(stdout); */" to "fflush(stdout);".

You must go across desert and reach to B point.
Start is A point,where you can load 5 foods.
You can move forward(right) or backward(left) 1 step by using one food.
Also you can stack food to 4 on each place(down) ,
and reload foods where food is stacked(up).
If you move without food,mission would be failure.

 
#include <stdio.h>
#pragma nonrec

#define NCAMP 10

#define RKEY '\x1C'
#define LKEY '\x1D'
#define UKEY '\x1E'
#define DKEY '\x1F'

VOID locate(x, y)
int x, y;
{
    printf("\33Y%c%c", y+32, x+32);
}

VOID plot(p, h, c)
int p, h, c;
{
    locate(4 + p * 2, 5 + h);
    printf("%c\b", c);
}

int across()
{
    int  p, q, f, step;
    int  s[NCAMP];

    for (p = 0; p < NCAMP; ++p)
	s[p] = 0;

    for (p = -1, step = 0; ;) {

	locate(7, 0);
	printf("Step: %d", step);

   	if (p == -1)
	    f = 5;

	plot(p, -1, '0' + f);
	plot(p, 0, '@');

	if (p == NCAMP)
	    return step;

	if (p >= 0 && f + s[p] == 0)
	    return -step;

	q = p;

	/* fflush(stdout); */

	switch (getch()) {

	 case LKEY:
	    if (p >= 0 && f > 0) {
		--p;
		--f;
		++step;
	    }
	    break;

	 case RKEY:
	    if (f > 0) {
		++p;
		--f;
		++step;
	    }
	    break;

	case UKEY:
	    if (p >= 0 && s[p] > 0 && f < 5) {
		++f;
		plot(p, s[p]--, ' ');
	    }
	    break;

	case DKEY:
	    if (p >= 0 && s[p] <4 && f > 0) {
		--f;
		plot(p, ++s[p], '*');
	    }
	    break;
	}

	if (q != p) {
	    plot(q, -1, ' ');
	    plot(q, 0, (q<0)? 'A': (q==NCAMP)? 'B': '-');
	}
    }
}

VOID main()
{
    int i, score;

    printf("\f\33x5");

    plot(-1, 0, 'A');
    for (i = 0; i < NCAMP; ++i)
	plot(i, 0, '-');
    plot(NCAMP, 0, 'B');

    score = across();

    locate(0, 18);
    if (score < 0) {
	printf("Sorry...\n");
	printf("You died after %d step moves.\n",-score);
    }
    else {
	printf("Congratulations!\n");
	printf("You completed your mission in %d steps.\n", score);
    }
}

Par sd_snatcher

Prophet (3558)

Portrait de sd_snatcher

15-03-2011, 00:20

Tip: Try the Hitech-C compiler. It's said to be very superior to the ASCII one.

Par ARTRAG

Enlighted (6866)

Portrait de ARTRAG

15-03-2011, 10:11

The Hi-tech C crosscompiler v7.8 is probably the best choice
Even if it is not free, Hi-tech stopped its sells, distribution and support
Its last release has been in 2001 (v7.8p2)
After 10 years, may it be considered abandonware ?

Par MicroTech

Champion (385)

Portrait de MicroTech

15-03-2011, 11:50

Sample of MSX-C program.
Puzzle game "EGYPT" which is printed in ASCII'S MSX-C handbook "MSX-C Nyu-mon"

Hi fukenko,
I'm looking for documentation about MSX-C, do you know if a pdf/electronic version of "ASCII'S MSX-C handbook" exists Question

Par fukenko

Champion (357)

Portrait de fukenko

15-03-2011, 23:32

Dear MicroTech,
I looked for pdf/electronic version of MSX-C handbook,but I couldn't find.SorryCrying

Par MicroTech

Champion (385)

Portrait de MicroTech

16-03-2011, 15:13

Thanks fukenko for your interest and replay!

I read somewhere that ASCII's MSX-C was an adaptation for MSX-DOS of a preexisting CP-M compiler, I don't know if from Microsoft or C80 from LSI Japan... could you confirm any of these ipothesis?

Page 1/5
| 2 | 3 | 4 | 5