This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C

I was hoping to find on-line manuals that I could print and read on the john. So far no luck. But what I really need is how to declare variables in C.

For example, I have a sample code that has the statement:

unsigned char

and

unsigned long

What do these mean and do they limit the declaration to integers. What do i declare if I want a floating point?

Also, someone told me I cant do floating point with a Keil Compiler because of licensing issues (I got my copy from Silicon Labs and have just registered it). I will eventually need to do trig functions. What do i have to get (buy) to complete my project?

Parents
  • First;
    Andy, thanks for the link to the nop info.

    Also guys, I take your point about #defining, C does have enough higher level functionality to make it very usable.
    I think my overall point is, should a high level language mean you have to remember dozens of tokens and their weird variants? More pertinent, writing effectively for embedded 8bit hardware really does call for a lot of bit twiddling. It is so easy when you can see the binary on the page rather than converting to and from hex on a handy jotter. Less room for error too. I want compact runtime output but I can't see any need for especially compact source code, quite the reverse really. The closer I can get to natural English the better.

    Sorry Lou, I'm being nostalgic. PLM was a family of languages designed by Intel for embedded work with their uCs and Ps. Based on IBM's PL/1 mainframe language and very popular in the 70's and 80's.
    The code output was phenomenally compact. I wrote 1000s of lines of assembler for the 80188 and 8051. When I started using PLM I was sceptical about efficiency but could rarely improve on the compiler with hand coding. Maybe I'm just a lousy assembly programmer and a grumpy old man.

    Good to see a vigorous forum here anyway. I'll shut up now and get back to work.

Reply
  • First;
    Andy, thanks for the link to the nop info.

    Also guys, I take your point about #defining, C does have enough higher level functionality to make it very usable.
    I think my overall point is, should a high level language mean you have to remember dozens of tokens and their weird variants? More pertinent, writing effectively for embedded 8bit hardware really does call for a lot of bit twiddling. It is so easy when you can see the binary on the page rather than converting to and from hex on a handy jotter. Less room for error too. I want compact runtime output but I can't see any need for especially compact source code, quite the reverse really. The closer I can get to natural English the better.

    Sorry Lou, I'm being nostalgic. PLM was a family of languages designed by Intel for embedded work with their uCs and Ps. Based on IBM's PL/1 mainframe language and very popular in the 70's and 80's.
    The code output was phenomenally compact. I wrote 1000s of lines of assembler for the 80188 and 8051. When I started using PLM I was sceptical about efficiency but could rarely improve on the compiler with hand coding. Maybe I'm just a lousy assembly programmer and a grumpy old man.

    Good to see a vigorous forum here anyway. I'll shut up now and get back to work.

Children