Problem with MSXBIOS.H in MSX-c

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

By sp4

Master (214)

sp4's picture

03-11-2015, 17:14

Hi, I installed MSX-c under openMSX and I wrote the follow code:

#include 
#include 
#include 

int main()
{
       screen(1);
       printf("Hello world!");
       boxline(10,10,100,100);
       return 0;
}

If I give the follow command:

A:\c xtetris

I obtain the follow messages:

[b:\include\MSXBIOS.H] line 0 column 17: redeclaration of 'NAT'
[b:\include\MSXBIOS.H] line 2 column 21: duplicate tag '_regs'
[b:\include\MSXBIOS.H] line 8 column 2:   redeclaration of 'REGS'
errors detected 

I had any problem with MSXBIOS.H with a conflict of global variable.
Nobody can help me to find where is the problem?

Login or register to post comments

By st1mpy

Paladin (870)

st1mpy's picture

03-11-2015, 20:36

did you check that the header files are included only once?

By Sylvester

Hero (563)

Sylvester's picture

03-11-2015, 23:17

Remove the include msxbios.h, because it's already included in glib.h.

By sp4

Master (214)

sp4's picture

04-11-2015, 14:41

I wrote as follow:

#include stdio.h
#include GLIB.h

int main()
{
        boxline(10,10,100,100);
        return 0;
}

and I had the follow messages:

in  "main" call "boxline" : conflicting number of arguments

What do you think about that?
Why append that?
For me the valid number of argument of boxline() are 4.

By st1mpy

Paladin (870)

st1mpy's picture

04-11-2015, 15:13

is this it?
VOID boxline(x1, y1, x2, y2, color, logop)

looks like you need to specify the colour and logical operation attributes as well.

By sp4

Master (214)

sp4's picture

04-11-2015, 15:42

What is the range of value of "logop" than exist?

By Sylvester

Hero (563)

Sylvester's picture

04-11-2015, 15:47

See chapter 3.4.2 on page 23 of https://archive.org/details/MSXCLibManual

By sp4

Master (214)

sp4's picture

04-11-2015, 16:07

I think than you are making fun of me!
I can't read the Japanease language.
Sorry but I can't understand that was wrote in japanease.

By Sylvester

Hero (563)

Sylvester's picture

04-11-2015, 16:24

uh, I also can't read japanese, but I can read the list with PSET, AND, OR, XOR, PRESET, TPSET, TAND, TOR, TXOR, TPRESET Smile So try one of those strings as the last param, for example:

boxline(10,10,100,100, 15, PSET);

By Sylvester

Hero (563)

Sylvester's picture

04-11-2015, 16:26

see also http://www.konamiman.com/msx/msx2th/th-2.txt and search for "Table 2.7 Logical operation"

By sp4

Master (214)

sp4's picture

04-11-2015, 16:53

I gift:

/*screen(0);*/
boxline(10,10,100,100,15,PSET);

and I obtained the follow messages:

in  "main" calls "boxline" : 5th argument conflict

Why this problem?

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