Ok, someone on irc chat tolf me it is just a variable.
Looking for a poke equilivant in Msx-c
Didnt find one just yet.
Try:
char *cliksw = (char*)0xf3db; *cliksw = 0;
Thanks kanima, yours works like a charm, I totally appreciate it,
i was messing with
char value = 0 char *CLICKSW = 0xf3db; value = *CLICKSW & 0;
but that didn't work, but yours does, I just had to put a space-bar between char and * before address.
A world just opened up I am busy with msx-c for a while, but never needed to poke around.
Thanks kanima, yours works like a charm, I totally appreciate it,
i was messing with
char value = 0 char *CLICKSW = 0xf3db; value = *CLICKSW & 0;
but that didn't work, but yours does, I just had to put a space-bar between char and * before address.
A world just opened up I am busy with msx-c for a while, but never needed to poke around.
It's due to your cliksw declaration, it's not really defined as a memory pointer to that address . There is a lot of references to memory addresses as bit JIFFY in this thread. In fact, I think that you use JIFFY, maybe?
Perhaps openMSX can be used for this, at least to capture the ROM register writes. Then convert that log into the right raw format.
Didn't thought about it, I'll give a try. Thanks for suggestion.
Yes, I have JIFFY in there as well
Question, did anybody use structs yet in ASCII MSX-C? most works, only for some reason, like a few other things, there seems to be a linear and order importance in this, which in modern C wouldn't matter.
I use them in my project ofcourse, but now I seem to hit a wall when trying to use a struct from an included header file.
Please more details. I use structs daily. Probably the 6 characters long (symbols used by M80) needs to be used like with other symbols.
no, it is when i include a file with the struct defined in the main c file and there the compiler says that when i call the struct somewhere it is undeclared, which it isn't.
Create a minimal example and try again... then show here if it still gives a problem.
Try to define them with typedef:
mytype.h file:
typedef struct { type var1; type var2; ... } MyType;
In the C code:
#include "mytype.h" MyType var;
Try to define them with typedef:
mytype.h file:
typedef struct { type var1; type var2; ... } MyType;
In the C code:
#include "mytype.h" MyType var;
Ok, I will try to typedef the sob
I got a perfect result within the main c file, only want to keep thing neat and put it in a library.
Will let you know if it works in my code.
For the sake of comparison, this is a sample code developed for Hitech-C (cross compiler v7.8pl2) with its compiled counterpart. Look at the LST files to see the generated code.
This is the main file compiled (LINK).
Could someone try to compile it in MSX-C and post the ASM?
https://github.com/artrag/C-experiments-for-msx
Manuel, the SYM file seems not supported anymore by the last openmsx debugger.
Is this a problem of mine or a real issue in the last openmsx release?