Andes Workshop
http://forum.andestech.com/

程式裡要寫memory的寫法
http://forum.andestech.com/viewtopic.php?f=23&t=169
Page 1 of 1

Author:  cindy [ Wed Oct 12, 2011 5:34 pm ]
Post subject:  程式裡要寫memory的寫法

Code:
#include <stdio.h>
#include <stdlib.h>

int main(void) {
   puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
   *(unsigned int *) 0x400000 = (unsigned int) 0x12345678;
   return EXIT_SUCCESS;
}


其中0x400000是地址。

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/