From a61447ccaa61d54214a47da7a70d10abd35b10ec Mon Sep 17 00:00:00 2001 From: Nicholas Pease Date: Tue, 27 Mar 2018 09:48:33 -0400 Subject: [PATCH] Create STOCK.c --- STOCK.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 STOCK.c diff --git a/STOCK.c b/STOCK.c new file mode 100644 index 0000000..19d62e4 --- /dev/null +++ b/STOCK.c @@ -0,0 +1,73 @@ +//////////////////////////////////////// +// { StockSim } { 1.o CE } +// Author: The REAL LAX18 +// License: MIT +// Description: +//////////////////////////////////////// + +/* Keep these headers */ +#include +#include +#include +#include + +/* Standard headers */ +#include +#include +#include +#include + +/* Other available headers: stdarg.h, setjmp.h, assert.h, ctype.h, float.h, iso646.h, limits.h, errno.h */ + /* Setup Values: */ + #define TSTOCKS 28 +/* Put function prototypes here */ +void printText(const char *text, uint8_t xpos, uint8_t ypos); +void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos); + + +/* Put all your code here */ +void main(void) +{ + + const char *STOCKS[TSTOCKS+1]; /* String Array */ + int PRICES[TSTOCKS+1]; + int OWN[TSTOCKS+1]; + int CHANGE[TSTOCKS+1]; + int CHG[TSTOCKS+1]; + int PCHG[TSTOCKS+1]; + int HIS[TSTOCKS+1][6]; + int PPUR[6][5]; + int MONTH = 0; + int WORTH = 0; + int WALLET = 0; + const char * COPYRIGHT="(C) 2018 Nicholas Pease"; + const char * VERSION="1.0 BETA"; + // Add Stock Names + + /* Clear the Graphscreen */ + os_ClrHome(); + /* Setup*/ +setup: + + /* Define */ + #define BOOL char + #define FALSE 0 + #define TRUE 1 + + + + + /* Display a few strings */ + /* printText(HelloWorld, 0, 0); + printText(Welcome, 0, 1); */ + + /* Wait for a key press */ + while (!os_GetCSC()); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(const char *text, uint8_t xpos, uint8_t ypos) +{ + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +}