Search found 166 matches

by Newbie
Fri Aug 09, 2013 5:36 am
Forum: Programming Discussion
Topic: Detecting pad by specified location.
Replies: 2
Views: 312

Detecting pad by specified location.

I have seen that there is a maple function to get the Nth device of the requested type. maple_device_t* maple_enum_type (int n, uint32 func ) I would like to have the same information but with a specific port, for example port A and not the first found port. Is it possible ? Thanks in advance.
by Newbie
Mon Jul 29, 2013 1:39 pm
Forum: Programming Discussion
Topic: TIMER MILLISECONDS KOS
Replies: 3
Views: 349

Re: TIMER MILLISECONDS KOS

It works ! This is how i done it. #include <kos.h> #include <math.h> #include <arch/timer.h> int frequency_of_primes (int n) { int i,j; int freq=n-1; for (i=2; i<=n; ++i) for (j=fsqrt(i);j>1;--j) if (i%j==0) {--freq; break;} return freq; } int main(int argc, char* argv[]) { uint64 start = timer_ms_g...
by Newbie
Sun Jul 28, 2013 1:35 pm
Forum: Programming Discussion
Topic: TIMER MILLISECONDS KOS
Replies: 3
Views: 349

TIMER MILLISECONDS KOS

I want to use timer in c++ so i get an interesting tutorial here : http://www.cplusplus.com/reference/ctime/clock/?kw=clock I started making it on KOS : /* clock example: frequency of primes */ #include <stdio.h> /* printf */ #include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */ #include <math.h> /...
by Newbie
Sun Jul 28, 2013 1:28 pm
Forum: Programming Discussion
Topic: KOS GCC COMPILE AND LINKING COMMAND LINE
Replies: 4
Views: 363

Re: KOS GCC COMPILE AND LINKING COMMAND LINE

OK that's close the thread. Thanks.
by Newbie
Sat Jul 27, 2013 10:20 pm
Forum: Programming Discussion
Topic: KOS GCC COMPILE AND LINKING COMMAND LINE
Replies: 4
Views: 363

Re: KOS GCC COMPILE AND LINKING COMMAND LINE

Ok.

But if i have to add my own compilator settings or .a lib file or .h include file using this make initialized system in KOS, where could i add the path to use them ?

I have the default configuration that produce the installation wizard of DCDEV R4.

Thanks.
by Newbie
Sat Jul 27, 2013 1:28 pm
Forum: Programming Discussion
Topic: KOS GCC COMPILE AND LINKING COMMAND LINE
Replies: 4
Views: 363

KOS GCC COMPILE AND LINKING COMMAND LINE

I was testing some code in c++ under DCDEVR4 (mingwing / kos). I have to add a lot of include folders of my own. I want to use my own compile and link command line at bash. I do not want to use the command "make", but i do not know where are the include and lib folders to specity in GCC at the -I an...