473,404 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Embedded C: defining a BYTE?

15
Hi,

I'm having problem defining a BYTE in this embedded C application that I writing.

I know that the byte representation for carriage return is : A0

What I'm doing is:
Expand|Select|Wrap|Line Numbers
  1. BYTE enterKey = AO;
  2. ConsolePutROMString( (ROM char *)"LISTEN TO KEYBOARD\r\n" );
  3.     if(ConsoleIsGetReady()){
  4.           keyboard = ConsoleGet();                                
  5.          while(!keyboard==enterKey) {
  6.         keyboard = ConsoleGet();
  7.         PrintChar( keyboard );
  8.            ConsolePutROMString( (ROM char *)" - KEYBOARD MESSAGE\r\n" );
  9. }
  10. }
  11.  
Basically i'm trying to read the console and if there is a keyboard input, I'll do a while loop to keep reading the input until I receive an "enter" key.

Thanks.
Feb 28 '08 #1
2 2757
Banfa
9,065 Expert Mod 8TB
I know that the byte representation for carriage return is : A0
But it isn't, it's 0x0A
Feb 28 '08 #2
spoken
15
But it isn't, it's 0x0A
Yes, i finally manage to do it by defining
BYTE e = 0x0A;

Thanks
Mar 2 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Xiangliang Meng | last post by:
Hi, all. What are the benefit and the drawback of defining a class embedded inside another class? For example: class List { public:
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
5
by: mblatch | last post by:
Another basic C# question, but haven't figured out how to do this one either. Am used to defining a list of structures in C++, but am unsure if you can do this in C#. As a simplified example, I...
0
by: ATS | last post by:
HOWTO Make a UserControl deploy an embedded resource. Please help, I need to embed an EXE into a C# UserControl that is run from script in an HTML web page as such: <html> <object...
4
by: Harold S | last post by:
Hello, I am having trouble defining a byte array in .Net When i go this route it doesnt like the definition Dim xxxx As New Bytearray = {"0x45", "0x70", "0x22", "0x48", "0x9d", "0x17",...
0
by: garethrichardadams | last post by:
Hello all, I've added a font to my project and set it to "Embedded Resource". I load the font into a global PrivateFontCollection. (InitCustomFont - shown below) I then set the font of a...
0
by: Nataraj Narayana via DotNetMonster.com | last post by:
I have reqirements of defining prototypes for C++ dll function in C# so that I can use p/invoke method to access the dll's functions. Can anyone please suggest how to write prototypes in C# for...
13
by: Angus | last post by:
Hello I have a stream of bytes - unsigned char*. But the 'string' may contain embedded nulls. So not like a traditional c string terminated with a null. I need to calculate the length of...
30
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
Let's say we had a simple function for returning the amount of days in a month: unsigned DaysInMonth(unsigned const month) { switch (month) { case 8: case 3: case 5:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.