1
I've been very busy lately but still wanted to do something calc and programming related, so I made this:I wanted to try it using 4.5.0 value (0X103B18D4), but I have errors at compilation time.
It's a bit hard to see, but it's snow falling down (I should have made a .gif...)
Uses the native OS thread functions, so if it crashes, it's the OS
Only works on CX CAS 3.6, haven't included the syscall addresses for other versions.
To get rid of it, turn it off and on again, although it will leak memory if you do that. It's not in any way a clean implementation, but who cares..
Code: [Select]
nspire-g++ -Wall -W -marm -Wextra -Weffc++ -fno-exceptions -Os -std=c++11 -c main.cpp -o main.o
In file included from main.cpp:2:
main.cpp: In function 'void snow(int, char**)':
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: expected ';' before '}' token
#define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
^
main.cpp:67:21: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
void *old_screen = SCREEN_BASE_ADDRESS;
^~~~~~~~~~~~~~~~~~~
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
#define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
^
main.cpp:67:21: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
void *old_screen = SCREEN_BASE_ADDRESS;
^~~~~~~~~~~~~~~~~~~
/usr/local/Ndless/ndless-sdk/bin/../include/libndls.h:164:95: error: expected ';' before '}' token
#define SCREEN_BASE_ADDRESS ({"SCREEN_BASE_ADDRESS got removed in favor of the lcd_blit API."})
^
main.cpp:68:2: note: in expansion of macro 'SCREEN_BASE_ADDRESS'
SCREEN_BASE_ADDRESS = screen;
^~~~~~~~~~~~~~~~~~~
main.cpp:68:24: error: lvalue required as left operand of assignment
SCREEN_BASE_ADDRESS = screen;
^~~~~~
make: *** [main.o] Error 1
I'm using Ndless v4.5 r2013 for TI-Nspire OS v4.5.0.1180
The goal is to understand how I can do some kind of multithreading.