Subject:
|
Re: Quite C and BrickOS (WAS: Re: Steve H, C$, me learning C Brick OS)
|
Newsgroups:
|
lugnet.org.ca.rtltoronto
|
Date:
|
Thu, 15 Jan 2004 17:38:20 GMT
|
Viewed:
|
522 times
|
| |
| |
In lugnet.org.ca.rtltoronto, Chris Magno wrote:
> ok, back to what is C
>
> so if I take an example helloworld.c file from a demo section of my current
> nightmare (brickos)
Well, the general syntax and structure of C are the same. But how you call the
motors, sensors and other hardware is different from platform to platform,
unless someone deliberately tried to make them all common, which I'm not sure.
Think of it like this. On your C64, programs that said:
10 PRINT "CHRIS IS THE BEST"
20 GOTO 10
worked exactly the same way on the Apple II or another computer, because print
and goto are generic BASIC tokens for almost all platforms.
But if you had a program that was like:
10 PRINT "CHRIS IS THE BEST"
15 POKE 53280,6
20 GOTO 10
where line 15 changes the border colour on the display, this won't port clean to
the Apple II, because that poke calls specific hardware (the 64's VIC graphics
chip) in a specific way.
How Quite C and legOS do non generic stuff would be part of the porting
exercise. I don't think is is nontrivial.
Calum
|
|
Message has 3 Replies:
Message is in Reply To:
41 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|