0 Members and 2 Guests are viewing this topic.
#include <os.h>#include "utils.h"int main(void) { // required because stdout needs the interrupts currently disabled by Ndless unsigned intmask = TCT_Local_Control_Interrupts(0); showSimpleDialogBox("Test", "Hello World!"); TCT_Local_Control_Interrupts(intmask); return 0;}
*(volatile unsigned*) 0x01234567
//Read the value herecontrast=*(volatile unsigned*) 0x900F0020;//Write here*(volatile unsigned*) 0x900F0020=0x90;
Thanks! But what if I know that there is something special at 0x01234567. How would I get it?
int main(){ int *p, a=2,c[10]; p=&a; //you point to the address of a printf("%d",p); //this will print the address as decimal perhaps you would be more likely to get it in %x [hexa] printf("%d",*p); //this wil print 2 p=c; //points p to the first place of the vector printf("%d",*(++p)); //this will print some garbage in memory as not was defined in c[1] return 0; } }
unsigned char* p = (unsigned char*)SCREEN_BASE_ADDRESS; int i; for (i = 0; i < SCREEN_BYTES_SIZE; ++i) { *p = 0xFF; }