David Ross
/
NEW_LAB2_A
changed error
Lab2a.cpp@0:f7171b5b118b, 2020-09-18 (annotated)
- Committer:
- DavidElmoRoss
- Date:
- Fri Sep 18 14:29:32 2020 +0000
- Revision:
- 0:f7171b5b118b
changed the error
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DavidElmoRoss | 0:f7171b5b118b | 1 | /* |
DavidElmoRoss | 0:f7171b5b118b | 2 | Title: Program to generate output to the PC screen |
DavidElmoRoss | 0:f7171b5b118b | 3 | Author: Your NAME, STUDENT_ID, MCO455 Lab Section |
DavidElmoRoss | 0:f7171b5b118b | 4 | Date: Today's Date |
DavidElmoRoss | 0:f7171b5b118b | 5 | Description: This program will take characters from the keyboard and |
DavidElmoRoss | 0:f7171b5b118b | 6 | continually send them to the screen. You can use ANSI |
DavidElmoRoss | 0:f7171b5b118b | 7 | ESCAPE sequences to position the cursor, clear the |
DavidElmoRoss | 0:f7171b5b118b | 8 | screen, and change screen foreground and background |
DavidElmoRoss | 0:f7171b5b118b | 9 | colours. |
DavidElmoRoss | 0:f7171b5b118b | 10 | */ |
DavidElmoRoss | 0:f7171b5b118b | 11 | #define "mbed.h" |
DavidElmoRoss | 0:f7171b5b118b | 12 | |
DavidElmoRoss | 0:f7171b5b118b | 13 | int main(void) |
DavidElmoRoss | 0:f7171b5b118b | 14 | { |
DavidElmoRoss | 0:f7171b5b118b | 15 | unsigned char input; |
DavidElmoRoss | 0:f7171b5b118b | 16 | |
DavidElmoRoss | 0:f7171b5b118b | 17 | for(;;) |
DavidElmoRoss | 0:f7171b5b118b | 18 | { |
DavidElmoRoss | 0:f7171b5b118b | 19 | input=getc(stdin); // get char and put into variable input |
DavidElmoRoss | 0:f7171b5b118b | 20 | // if(input == 0x0d) // if input is <RETURN> |
DavidElmoRoss | 0:f7171b5b118b | 21 | // putc(0x0a,stdout); // output a <LINE FEED> |
DavidElmoRoss | 0:f7171b5b118b | 22 | |
DavidElmoRoss | 0:f7171b5b118b | 23 | |
DavidElmoRoss | 0:f7171b5b118b | 24 | } |
DavidElmoRoss | 0:f7171b5b118b | 25 | } |