?? chap4.c
字號:
// Chapter 4 6805 C programs// Jonathan W. Valvano// This software accompanies the book,// Embedded Microcomputer Systems: Real Time Interfacing// published by Brooks Cole, 1999// Program 4.3. This C function is nonreentrant because of the read-modify-write access to a global. unsigned int Money; /* bank balance implemented as a global *//* add 100 dollars */void more(void){ Money += 100;}// Program 4.5. This C function is nonreentrant because of the write-read access to a global. int temp; /* global temporary *//* calculate x+2*d */int mac(int x, int d){ temp = x+2*d; /* write to a global variable */ return (temp);} /* read from global */// Program 4.7. This C function is nonreentrant because of the multi-step write access to a global. int info[2]; /* 32-bit global */void set(int x, int y){ info[0]=x; info[1]=y;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -