Linux 操作系统分析 Chapter 9-2 Linux 中程序的执行 陈香兰 苏州研究院中国科学技术大学 Fall 2014 November 4,

Size: px
Start display at page:

Download "Linux 操作系统分析 Chapter 9-2 Linux 中程序的执行 陈香兰 苏州研究院中国科学技术大学 Fall 2014 November 4,"

Transcription

1 Linux 操作系统分析 Chapter 9-2 Linux 中程序的执行 陈香兰 苏州研究院中国科学技术大学 Fall 2014 November 4, 2014 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 1 / 21

2 Outline 1 可执行文件及其格式 2 Linux 对可执行文件格式的管理 3 可执行文件的执行 4 小结和作业 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 2 / 21

3 操作系统是如何通过可执行文件的内容建立进程的执行上下文的? 可执行文件的格式 程序以可执行文件的形式存放在磁盘上 库 可供很多程序使用的一些例程的集合静态库 vs 共享库 命令行参数 环境变量等 Shell 提示符下输入从 shell 继承而来, 用户可修改 陈香兰 ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 3 / 21

4 Outline 1 可执行文件及其格式 2 Linux 对可执行文件格式的管理 3 可执行文件的执行 4 小结和作业 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 4 / 21

5 可执行文件 可执行文件是一个普通的文件, 它描述了如何初始化一个新的进程上下文 Linux 中 :Fork + execve 例如 :shell 程序中执行一个命令 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 5 / 21

6 可执行文件的格式 Linux 标准的可执行格式 ELF:Executable and Linking Format 查看 ELF 格式可执行文件 xxx 的头部信息 : readelf h xxx 旧版的可执行文件格式 aout:assembler OUT put format 目前,Linux 中 aout 被 ELF 取代测试 : 可以使用 readelf -h 查看 aout 可执行文件的 header 信息 其他 MS-DOS 的 exe 文件 UNIX BSD 的 COFF 文件 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 6 / 21

7 ELF 文件格式 陈香兰 ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 7 / 21

8 查看 ELF 格式可执行文件的头部信息 以 void main(void){} 为例 : ubuntu-1404:readelf -h hello ELF 头 : Magic: 7f 45 4c Class: ELF32 Data: 2 s complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC ( 可执行文件 ) Machine: Intel Version: 入口点地址 : 程序头起点 : Start of section headers: 标志 : 本头的大小 : 52 ( 字节 ) 程序头大小 : 32 ( 字节 ) Number of program headers: 9 节头大小 : 40 ( 字节 ) 节头数量 : 30 字符串表索引节头 : 27 0x1 0x80482f0 52 (bytes into file) 4424 (bytes into file) 0x0 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 8 / 21

9 Outline 1 可执行文件及其格式 2 Linux 对可执行文件格式的管理 3 可执行文件的执行 4 小结和作业 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 9 / 21

10 Linux 对可执行文件格式的管理 可执行文件格式的描述符 :linux_binfmt /* * This structure defines the functions that are used to load the binary formats that * linux accepts */ struct linux_binfmt { struct list_head lh; struct module *module; int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); int (*load_shlib)(struct file *); int (*core_dump)(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); unsigned long min_coredump; /* minimal dump size */ int hasvdso; }; load_binary: 通过读取存放在可执行文件中的信息为当前进程建立一个新的进程上下文 load_shlib: 动态的把一个共享库绑定到一个已经在运行的进程 core_dump: 把当前进程的上下文保存到名为 core 的文件中 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 10 / 21

11 Linux 对可执行文件格式的管理 例如,ELF 格式的描述符 elf_format fs/binfmt_elfc static struct linux_binfmt elf_format = { module = THIS_MODULE, load_binary = load_elf_binary, load_shlib = load_elf_library, core_dump = elf_core_dump, min_coredump = ELF_EXEC_PAGESIZE, hasvdso = 1 }; 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 10 / 21

12 Linux 对可执行文件格式的管理 可执行文件格式的注册和注销 : include/linux/binfmtsh extern int register_binfmt(struct linux_binfmt *); extern void unregister_binfmt(struct linux_binfmt *); 可执行文件格式的链表 fs/execc static LIST_HEAD(formats); static DEFINE_RWLOCK(binfmt_lock); 在系统启动时, 所有编译进内核的可执行格式都被注册 查看 Linux 2626 中看到的可执行文件格式 在系统运行过程中, 也可以注册一个新的可执行文件格式 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 10 / 21

13 Linux 对可执行文件格式的管理 Linux 通过可执行文件的扩展名或者存放在文件前 128 字节的 magic 数来识别文件格式 fs/execc /* * cycle the list of binary formats handler, until one recognizes the image */ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) {} 文件扩展名 Exe Bat 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 10 / 21

14 Outline 1 可执行文件及其格式 2 Linux 对可执行文件格式的管理 3 可执行文件的执行 4 小结和作业 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 11 / 21

15 Exec 函数家族 man execl #include <unistdh> extern char **environ; int execl(const char *path, const char *arg, ); int execlp(const char *file, const char *arg, ); int execle(const char *path, const char *arg,, char * const envp[]); int execv(const char *path, char *const argv[]); int execvp(const char *file, char *const argv[]); int execvpe(const char *file, char *const argv[], char *const envp[]); 用一个指定的可执行文件所描述的上下文代替进程的上下文 相关系统服务例程 : sys_execve() executes a new programn 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 12 / 21

16 Exec 函数家族 arch/x86/kernel/process_32c asmlinkage int sys_execve(struct pt_regs regs) { int error; char * filename; filename = getname((char user *) regsbx); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = do_execve(filename, (char user * user *) regscx, (char user * user *) regsdx, &regs); if (error == 0) { /* Make sure we don t return using sysenter */ set_thread_flag(tif_iret); } putname(filename); out: return error; } 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 12 / 21

17 Exec 函数家族 fs/execc int do_execve(char * filename, char user * user *argv, char user * user *envp, struct pt_regs * regs) { file = open_exec(filename); retval = bprm_mm_init(bprm); retval = copy_strings_kernel(1, &bprm->filename, bprm); if (retval < 0) goto out; retval = copy_strings(bprm->envc, envp, bprm); if (retval < 0) goto out; retval = copy_strings(bprm->envc, envp, bprm); if (retval < 0) goto out; retval = search_binary_handler(bprm,regs); } 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 12 / 21

18 Exec 函数家族 /* * Create a new mm_struct and populate it with a temporary stack * vm_area_struct We don t have enough context at this point to set the stack * flags, permissions, and offset, so we use temporary values We ll update * them later in setup_arg_pages() */ int bprm_mm_init(struct linux_binprm *bprm) { int err; struct mm_struct *mm = NULL; bprm->mm = mm = mm_alloc(); err = -ENOMEM; if (!mm) goto err; err = init_new_context(current, mm); if (err) goto err; err = bprm_mm_init(bprm); if (err) goto err; return 0; err: if (mm) { bprm->mm = NULL; mmdrop(mm); } return err; } 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 12 / 21

19 Exec 函数家族 fs/execc /* * cycle the list of binary formats handler, until one recognizes the image */ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) { for (try=0; try<2; try++) { read_lock(&binfmt_lock); list_for_each_entry(fmt, &formats, lh) { int (*fn)(struct linux_binprm *, struct pt_regs *) = fmt->load_binary; if (!fn) continue; if (!try_module_get(fmt->module)) continue; read_unlock(&binfmt_lock); retval = fn(bprm, regs); } 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 12 / 21

20 Exec 函数家族 以 elf 格式的文件为例 (fn=load_elf_binary): fs/binfmt_elfc static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) { /* First of all, some simple consistency checks */ if (memcmp(loc->elf_exe_ident, ELFMAG, SELFMAG)!= 0) goto out; } 调用 set_brk, elf_map, do_mmap, 建立各线性区 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 12 / 21

21 程序段和进程的线性区 在逻辑上,Unix 程序的线性地址空间被划分为各种段 (segment) 正文段,text 数据段,data Bss 段堆栈段 在 mm_struct 中都有对应的字段 unsigned long start_code, end_code, start_data, end_data; unsigned long start_brk, brk, start_stack; unsigned long arg_start, arg_end, env_start, env_end; 此外, 还有共享库和文件的映射, 映射在其他线性区 参阅 /proc/1/maps 了解 init 进程的线性区 陈香兰 ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 13 / 21

22 命令行参数和 shell 环境 用户使用 shell 来执行某个程序时, 可以指定命令行参数 例如 : ls l /usr/bin 列出 /usr/bin 下的目录信息 Shell 本身不限制命令行参数的个数, 命令行参数的个数受限于命令自身 例如 int main(int argc, char argv[]) 又如 int main(int argc, char argv[], char envp[]) 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 14 / 21

23 命令行参数和 shell 环境 命令行参数和环境串都放在用户态堆栈中 NULL Environment strings Command-line arguments Dynamic linker s tables envp[] argv[] argc Retrun address PAGE_OFFSET env_end env_start arg_end arg_start &evnp[0] &argv[0] start_stack stacktop(esp) 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 14 / 21

24 库 源文件 目标文件 可执行文件最小的程序也会利用到 C 库 例如 void main(void) { } 1 要为 main 的执行建立执行上下文 2 在进程结束时, 杀死进程 ( 在 main 的最后插入 exit()) 其他库 libm, 包含浮点操作的基本函数 libx11, 所有 X11 窗口系统图形接口的基本底层函数 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 15 / 21

25 静态链接 vs 动态链接 静态库 动态链接 : 共享库 Gcc 的 -static 选项指明使用静态库 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 16 / 21

26 举例 对于 void main(void) { } 1 使用 gcc -g -static 参数编译 2 使用 readelf -h 获得可执行文件头, 查看可执行程序的入口地址 例如 : 入口点地址 :0x8048d2a 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 17 / 21

27 举例 3 使用 objdump -D 反汇编, 查看入口地址所对应的程序是什么? (_start) 例如 : 08048d2a <_start>: 8048d2a: 31 ed xor %ebp,%ebp 8048d2c: 5e pop %esi 8048d2d: 89 e1 mov %esp,%ecx 8048d2f: 83 e4 f0 and $0xfffffff0,%esp 8048d32: 50 push %eax 8048d33: 54 push %esp 8048d34: 52 push %edx 8048d35: 68 d push $0x80495d0 8048d3a: push $0x d3f: 51 push %ecx 8048d40: 56 push %esi 8048d41: e push $0x8048e d46: e call 8048e50 < libc_start_main> 8048d4b: f4 hlt 8048d4c: xchg %ax,%ax 8048d4e: xchg %ax,%ax 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 17 / 21

28 举例 4 从返回编代码中找到从入口 _start 到 main 的调用路径 08048e44 <main>: 8048e44: 55 push %ebp 8048e45: 89 e5 mov %esp,%ebp 8048e47: 5d pop %ebp 8048e48: c3 ret 8048e49: xchg %ax,%ax 8048e4b: xchg %ax,%ax 8048e4d: xchg %ax,%ax 8048e4f: 90 nop HOW? 08048e50 < libc_start_main>: : ff call *0x60(%esp) a: mov %eax,(%esp) d: e8 1e call 804e740 <exit> 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 17 / 21

29 举例 5 使用 gdb 来跟踪执行 在 _start 处设置断点, 查看 esp 的值 ( 验证堆栈位置在 3G 附近 ) 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 17 / 21

30 Outline 1 可执行文件及其格式 2 Linux 对可执行文件格式的管理 3 可执行文件的执行 4 小结和作业 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 18 / 21

31 小结 1 可执行文件及其格式 2 Linux 对可执行文件格式的管理 3 可执行文件的执行 4 小结和作业 陈香兰 (xlanchen@ustceducn) ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 19 / 21

32 作业 按照 ppt 中所举的例子 void main(void) {}, 查看反汇编代码, 若 main 函数有参数, 则参数是如何传递给 main 的? 陈香兰 ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 20 / 21

33 Thanks! The end 陈香兰 ( 计算机应用教研室 Linux 计算机学院嵌入式系统实验室 Chapter 9-2 Linux 苏州研究院中国科学技术大学 November 4, Fall ) 21 / 21

1

1 1 2 3 4 5 GNUDebugger 6 7 void main(int argc, char **argv){ vulncpy(argv[1]); return; } void vulncpy(char *a){ char buf[30]; strcpy(buf, a); return; } *argv[1] buf Shellcode *argv[1]... &buf &buf 8 strcpy

More information

C/C++ - 文件IO

C/C++ - 文件IO C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

华恒家庭网关方案

华恒家庭网关方案 LINUX V1.5 1 2 1 2 LINUX WINDOWS PC VC LINUX WINDOWS LINUX 90% GUI LINUX C 3 REDHAT 9 LINUX PC TFTP/NFS http://www.hhcn.com/chinese/embedlinux-res.html minicom NFS mount C HHARM9-EDU 1 LINUX HHARM9-EDU

More information

提纲 1 2 OS Examples for 3

提纲 1 2 OS Examples for 3 第 4 章 Threads2( 线程 2) 中国科学技术大学计算机学院 October 28, 2009 提纲 1 2 OS Examples for 3 Outline 1 2 OS Examples for 3 Windows XP Threads I An Windows XP application runs as a seperate process, and each process may

More information

ROP_bamboofox.key

ROP_bamboofox.key ROP Return Oriented Programming Lays @ BambooFox Who Am I Lays / L4ys / 累死 - l4ys.tw Reverse Engineering BambooFox / HITCON Outline Buffer Overflow ret2libc / ret2text Return Oriented Programming Payload

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

A Preliminary Implementation of Linux Kernel Virus and Process Hiding 邵 俊 儒 翁 健 吉 妍 年 月 日 学 号 学 号 学 号 摘 要 结 合 课 堂 知 识 我 们 设 计 了 一 个 内 核 病 毒 该 病 毒 同 时 具 有 木 马 的 自 动 性 的 隐 蔽 性 和 蠕 虫 的 感 染 能 力 该 病 毒 获 得 权 限 后 会 自 动 将 自 身 加 入 内 核 模 块 中 劫 持 的 系 统 调 用 并 通 过 简 单 的 方 法 实 现 自 身 的

More information

C 1

C 1 C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=

More information

untitled

untitled 3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(

More information

ebook8-30

ebook8-30 3 0 C C C C C C++ C + + C++ GNU C/C++ GNU egcs UNIX shell s h e l l g a w k P e r l U N I X I / O UNIX shell awk P e r l U N I X C C C C C C U N I X 30.1 C C U N I X 70 C C U N I X U N I X U N I X C Dennis

More information

untitled

untitled A, 3+A printf( ABCDEF ) 3+ printf( ABCDEF ) 2.1 C++ main main main) * ( ) ( ) [ ].* ->* ()[] [][] ** *& char (f)(int); ( ) (f) (f) f (int) f int char f char f(int) (f) char (*f)(int); (*f) (int) (

More information

ebook15-10

ebook15-10 1 0 10.1 U N I X V 7 4. 3 B S D S V R 3 P O S I X. 1 100 % 10.2 S I G S I G A B RT a b o r t S I G A L R M a l a r m V 7 1 5 S V R 4 4. 3 + B S D 31 < s i g n a l. h > 0 10. 9 k i l l 0 P O S I X. 1 D

More information

提纲. 1 实验准备. 2 从实模式进入保护模式. 3 小结 陈香兰 ( 中国科学技术大学计算机学院 ) 软件综合实验之操作系统 July 1, / 11

提纲. 1 实验准备. 2 从实模式进入保护模式. 3 小结 陈香兰 ( 中国科学技术大学计算机学院 ) 软件综合实验之操作系统 July 1, / 11 .. 软件综合实验之操作系统 进入保护模式 陈香兰 中国科学技术大学计算机学院 July 1, 2016 陈香兰 ( 中国科学技术大学计算机学院 ) 软件综合实验之操作系统 July 1, 2016 1 / 11 提纲. 1 实验准备. 2 从实模式进入保护模式. 3 小结 陈香兰 ( 中国科学技术大学计算机学院 ) 软件综合实验之操作系统 July 1, 2016 2 / 11 实验准备 实验环境准备

More information

学习MSP430单片机推荐参考书

学习MSP430单片机推荐参考书 MSP430 16 MSP430 C MSP430 C MSP430 FLASH 16 1 CPU 16 ALU 16 PC SP SR R4~R15 2 3 00-FFH 100-1FFH 4 5 1 2 51 24 27 6 1 2 3 4 5 6 4 12 SR SP SR CPU SR CPU C Z N GIE CPUOff CPU OscOff SCG0 SCG1 CPU EXIT SP

More information

How to Debug Tuxedo Server printf( Input data is: %s, inputstr); fprintf(stdout, Input data is %s, inputstr); fprintf(stderr, Input data is %s, inputstr); printf( Return data is: %s, outputstr); tpreturn(tpsuccess,

More information

static struct file_operations gpio_ctl_fops={ ioctl: gpio_ctl_ioctl, open : gpio_open, release: gpio_release, ; #defineled1_on() (GPBDAT &= ~0x1) #def

static struct file_operations gpio_ctl_fops={ ioctl: gpio_ctl_ioctl, open : gpio_open, release: gpio_release, ; #defineled1_on() (GPBDAT &= ~0x1) #def Kaise s 2410 Board setting [1]. Device Driver Device Driver Linux s Kernel ARM s kernel s3c2410_kernel2.4.18_r1.1_change.tar.bz2 /usr/src (1) #cd /usr/src (2) #tar xfj s3c2410_kernel2.4.18_r1.1_change.tar.bz2

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

02

02 Thinking in C++: Volume One: Introduction to Standard C++, Second Edition & Volume Two: Practical Programming C++ C C++ C++ 3 3 C C class C++ C++ C++ C++ string vector 2.1 interpreter compiler 2.1.1 BASIC

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc 2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.

More information

C

C C 2017 3 14 1. 2. 3. 4. 2/95 C 1. 3/95 C I 1 // talkback.c: 2 #include 3 #include 4 #define DENSITY 62.4 5 int main(void) 6 { 7 float weight, volume; 8 int size; 9 unsigned long letters;

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

Linux kernel exploit研究和探索

Linux kernel exploit研究和探索 Linux kernel exploit DOC alert7 PPT e4gle 2002-12-2 1 2002-12-2 2 Linux kernel exploit kernel exploit exploit exploit exploit (Kernel Buffer Overflow) (Kernel

More information

C++ 程式設計

C++ 程式設計 C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004

More information

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un Linux C July 27, 2016 Contents 1 Linux IDE 1 2 GCC 3 2.1 hello.c hello.exe........................... 5 2.2............................... 9 2.2.1 -Wall................................ 9 2.2.2 -E..................................

More information

C/C++ - 函数

C/C++ - 函数 C/C++ Table of contents 1. 2. 3. & 4. 5. 1 2 3 # include # define SIZE 50 int main ( void ) { float list [ SIZE ]; readlist (list, SIZE ); sort (list, SIZE ); average (list, SIZE ); bargragh

More information

ESP-Jumpstart

ESP-Jumpstart 2016-2019 2019 08 08 Contents 1 3 1.1 ESP32.............................. 3 1.2.................................................. 5 2 7 2.1............................................. 7 2.2 ESP-IDF............................................

More information

ebook50-15

ebook50-15 15 82 C / C + + Developer Studio M F C C C + + 83 C / C + + M F C D L L D L L 84 M F C MFC DLL M F C 85 MFC DLL 15.1 82 C/C++ C C + + D L L M F C M F C 84 Developer Studio S t u d i o 292 C _ c p l u s

More information

06721 main() lock pick proc() restart() [2][4] MINIX minix2.0 GDT, IDT irq table[] CPU CPU CPU CPU (IDTR) idt[] CPU _hwint00:! Interrupt

06721 main() lock pick proc() restart() [2][4] MINIX minix2.0 GDT, IDT irq table[] CPU CPU CPU CPU (IDTR) idt[] CPU _hwint00:! Interrupt MINIX ( 730000) ( 730000) MINIX MINIX2.0 MINIX : MINIX TP3 1 MINIX UNIX Tanenbaum UNIX MINIX LINUX MINIX MINIX MINIX1.0 UNIX V7 MINIX2.0[3] POSIX MINIX3 MINIX Gabriel A. Wainer 1994-1995 [5] 1998 I/O 2002

More information

目 录

目 录 1 Quick51...1 1.1 SmartSOPC Quick51...1 1.2 Quick51...1 1.3 Quick51...2 2 Keil C51 Quick51...4 2.1 Keil C51...4 2.2 Keil C51...4 2.3 1 Keil C51...4 2.4 Flash Magic...9 2.5 ISP...9 2.6...10 2.7 Keil C51...12

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO Car DVD New GUI IR Flow User Manual V0.1 Jan 25, 2008 19, Innovation First Road Science Park Hsin-Chu Taiwan 300 R.O.C. Tel: 886-3-578-6005 Fax: 886-3-578-4418 Web: www.sunplus.com Important Notice SUNPLUS

More information

C/C++ - 字符输入输出和字符确认

C/C++ - 字符输入输出和字符确认 C/C++ Table of contents 1. 2. getchar() putchar() 3. (Buffer) 4. 5. 6. 7. 8. 1 2 3 1 // pseudo code 2 read a character 3 while there is more input 4 increment character count 5 if a line has been read,

More information

幻灯片 1

幻灯片 1 操作系统课程实验 Lab1:bootloader 启动 ucore os 大纲 x86 启动顺序 C 函数调用 gcc 内联汇编 (inline assembly) x86-32 下的中断处理 理解 x86-32 平台的启动过程理解 x86-32 的实模式 保护模式理解段机制 x86 启动顺序 x86 启动顺序 寄存器初始值 摘自 "IA-32 Intel 体系结构软件开发者手册 " x86 启动顺序

More information

第11章 可调内核参数

第11章 可调内核参数 11 11 Unix BSD 4.4 Linux sysctl Unix Linux /proc window /proc /proc/sys /proc/sys sysctl Unix root /proc/sys/vm root /proc/sys sysctl /proc/sys struct ctl_table 18274 struct ctl_tables /proc/sys struct

More information

Microsoft Word - 正文.doc

Microsoft Word - 正文.doc 1 2 1 2 3 4 5 6 7 8 9 10 3 1 150 2 150 1 1 1.1 1.1.1 1.2 1.2.1 1.2.2 1.2.3 1.3 1.3.1 1.3.2 1.4 1.4.1 CPU 1.4.2 I/O 1.4.3 I/O 1.5 1.5.1 CISC RISC 1.5.2 1.5.3 1.6 1.6.1 1.6.2 N 1.6.3 2 2.1 2.1.1 2.1.2 2.1.3

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

Eclipse C C++, or

Eclipse C C++,  or Eclipse C C++, Emailctchen@pl.csie.ntut.edu.tw or s1669021@ntut.edu.tw, s2598003@ntut.edu.tw http://pl.csie.ntut.edu.tw/~ctchen, http://www.ntut.edu.tw/~s2598003/ 2004/9/10 (0.02 ) Eclipse http://www.eclipse.org

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

<4D6963726F736F667420576F7264202D20D1F4B9E2B2D3C0C3B5C4C8D5D7D32E646F63>

<4D6963726F736F667420576F7264202D20D1F4B9E2B2D3C0C3B5C4C8D5D7D32E646F63> 阳 光 灿 烂 的 日 子 周 荷 一 直 喜 欢 有 太 阳 的 日 子, 那 种 暖 洋 洋 的 感 觉, 不 仅 是 身 体 的 温 暖, 还 有 心 灵 的 享 受 出 生 在 清 莲 绽 放 阳 光 明 媚 的 季 节, 许 是 如 此, 天 生 就 对 太 阳 有 一 种 亲 切 感, 总 愿 意 让 自 己 在 阳 光 下 沐 浴, 享 受 这 天 赐 的 恩 泽 小 时 侯 和 母

More information

プログラムの設計と実現II

プログラムの設計と実現II UNIX C ls mkdir man http://www.tj.chiba-u.jp/lecture/prog2/ Ctrl+x, Ctrl+s ( )..[4]% gcc Wall o hoge hoge.c..[5]%./hoge 1 : 1 2 : 2 3 : 3 4 : 0 6..[6]% (! )..[4]% gcc Wall o hoge hoge.c..[5]%!g gcc Wall

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

untitled

untitled 8086/8088 CIP /. 2004.8 ISBN 7-03-014239-X.... TP313 CIP 2004 086019 16 100717 http://www.sciencep.com * 2004 8 2004 8 1 5 500 787 1092 1/16 16 1/2 391 000 1 2 ii 1 2 CAI CAI 3 To the teacher To the student

More information

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco Windows RTEMS 1 Danilliu MMI TCP/IP 80486 QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos ecos Email www.rtems.com RTEMS ecos RTEMS RTEMS Windows

More information

ebook70-5

ebook70-5 5 / 5.1 L i n u x L i n u x X L i n u x 5.1.1 touch t o u c h t o u c h G N U t o u c h # touch newfile # ls -l newfile - r w - r - - r - - 1 bball users 0 Jan 5 12 : 40 n e w f i l e t o u c h 0 # > newfile2

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; Memory & Pointer trio@seu.edu.cn 2.1 2.1.1 1 int *p int a 0x00C7 0x00C7 0x00C7 2.1.2 2 int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; 2.1.3 1. 2. 3. 3 int A,

More information

Microsoft Word - 第3章.doc

Microsoft Word - 第3章.doc Java C++ Pascal C# C# if if if for while do while foreach while do while C# 3.1.1 ; 3-1 ischeck Test() While ischeck while static bool ischeck = true; public static void Test() while (ischeck) ; ischeck

More information

untitled

untitled 不 料 料 例 : ( 料 ) 串 度 8 年 數 串 度 4 串 度 數 數 9- ( ) 利 數 struct { ; ; 數 struct 數 ; 9-2 數 利 數 C struct 數 ; C++ 數 ; struct 省略 9-3 例 ( 料 例 ) struct people{ char name[]; int age; char address[4]; char phone[]; int

More information

c_cpp

c_cpp C C++ C C++ C++ (object oriented) C C++.cpp C C++ C C++ : for (int i=0;i

More information

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 WWW PHP 2003 1 Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 Comments PHP Shell Style: # C++ Style: // C Style: /* */ $value = $p * exp($r * $t); # $value

More information

新・解きながら学ぶJava

新・解きながら学ぶJava 481! 41, 74!= 40, 270 " 4 % 23, 25 %% 121 %c 425 %d 121 %o 121 %x 121 & 199 && 48 ' 81, 425 ( ) 14, 17 ( ) 128 ( ) 183 * 23 */ 3, 390 ++ 79 ++ 80 += 93 + 22 + 23 + 279 + 14 + 124 + 7, 148, 16 -- 79 --

More information

untitled

untitled 1 5 IBM Intel 1. IBM 第 1/175 页 第 2/175 页 第 3/175 页 80 第 4/175 页 2. IBM 第 5/175 页 3. (1) 第 6/175 页 第 7/175 页 第 8/175 页 = = 第 9/175 页 = = = = = 第 10/175 页 = = = = = = = = 3. (2) 第 11/175 页 第 12/175 页 第 13/175

More information

C++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 5 月 3 日 1

C++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 5 月 3 日 1 C++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 月 3 日 1 1 INPUTOUTPUT 1 InputOutput 题目描述 用 cin 输入你的姓名 ( 没有空格 ) 和年龄 ( 整数 ), 并用 cout 输出 输入输出符合以下范例 输入 master 999 输出 I am master, 999 years old. 注意 "," 后面有一个空格,"." 结束,

More information

C

C C 14 2017 5 31 1. 2. 3. 4. 5. 2/101 C 1. ( ) 4/101 C C ASCII ASCII ASCII 5/101 C 10000 00100111 00010000 ASCII 10000 31H 30H 30H 30H 30H 1 0 0 0 0 0 ASCII 6/101 C 7/101 C ( ) ( ) 8/101 C UNIX ANSI C 9/101

More information

2013 C 1 #include <stdio.h> 2 int main(void) 3 { 4 int cases, i; 5 long long a, b; 6 scanf("%d", &cases); 7 for (i = 0; i < cases; i++) 8 { 9 scanf("%

2013 C 1 #include <stdio.h> 2 int main(void) 3 { 4 int cases, i; 5 long long a, b; 6 scanf(%d, &cases); 7 for (i = 0; i < cases; i++) 8 { 9 scanf(% 2013 ( 28 ) ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp Compilation Error long long cin scanf Time Limit Exceeded 1: A 10 B 1 C 1 D 5 E 5 F 1 G II 5 H 30 1 2013 C 1 #include 2 int main(void) 3

More information

Simulator By SunLingxi 2003

Simulator By SunLingxi 2003 Simulator By SunLingxi sunlingxi@sina.com 2003 windows 2000 Tornado ping ping 1. Tornado Full Simulator...3 2....3 3. ping...6 4. Tornado Simulator BSP...6 5. VxWorks simpc...7 6. simulator...7 7. simulator

More information

Some experiences in working with Madagascar: installa7on & development Tengfei Wang, Peng Zou Tongji university

Some experiences in working with Madagascar: installa7on & development Tengfei Wang, Peng Zou Tongji university Some experiences in working with Madagascar: installa7on & development Tengfei Wang, Peng Zou Tongji university Map data @ Google Reproducible research in Madagascar How to conduct a successful installation

More information

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf ("%d", & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf ("%d %d

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf (%d, & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf (%d %d 2013 18 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp, Compilation Error cin scanf Time Limit Exceeded 1: A 5 B 5 C 5 D 5 E 5 F 5 1 2013 C 1 # include 2 int main ( void ) 3 { 4 int cases, a, b,

More information

第3章.doc

第3章.doc 3 3 3 3.1 3 IT Trend C++ Java SAP Advantech ERPCRM C++ C++ Synopsys C++ NEC C C++PHP C++Java C++Java VIA C++ 3COM C++ SPSS C++ Sybase C++LinuxUNIX Motorola C++ IBM C++Java Oracle Java HP C++ C++ Yahoo

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

epub 63-3

epub 63-3 3 Solaris S o l a r i s S o l a r i s 2 S o l a r i s s h e l l p a s s w d v i l s c a t p g m o r e r m 3.1 3.1.1 c p c p c o p y c p c p cp source-file destination-file s o u r c e - f i l e c p d e

More information

新版 明解C言語入門編

新版 明解C言語入門編 328, 4, 110, 189, 103, 11... 318. 274 6 ; 10 ; 5? 48 & & 228! 61!= 42 ^= 66 _ 82 /= 66 /* 3 / 19 ~ 164 OR 53 OR 164 = 66 ( ) 115 ( ) 31 ^ OR 164 [] 89, 241 [] 324 + + 4, 19, 241 + + 22 ++ 67 ++ 73 += 66

More information

SDK 概要 使用 Maven 的用户可以从 Maven 库中搜索 "odps-sdk" 获取不同版本的 Java SDK: 包名 odps-sdk-core odps-sdk-commons odps-sdk-udf odps-sdk-mapred odps-sdk-graph 描述 ODPS 基

SDK 概要 使用 Maven 的用户可以从 Maven 库中搜索 odps-sdk 获取不同版本的 Java SDK: 包名 odps-sdk-core odps-sdk-commons odps-sdk-udf odps-sdk-mapred odps-sdk-graph 描述 ODPS 基 开放数据处理服务 ODPS SDK SDK 概要 使用 Maven 的用户可以从 Maven 库中搜索 "odps-sdk" 获取不同版本的 Java SDK: 包名 odps-sdk-core odps-sdk-commons odps-sdk-udf odps-sdk-mapred odps-sdk-graph 描述 ODPS 基础功能的主体接口, 搜索关键词 "odpssdk-core" 一些

More information

untitled

untitled MPICH anzhulin@sohu.com 1 MPICH for Microsoft Windows 1.1 MPICH for Microsoft Windows Windows NT4/2000/XP Professional Server Windows 95/98 TCP/IP MPICH MS VC++ 6.x MS VC++.NET Compaq Visual Fortran 6.x

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

Microsoft Word - Sable User's Manual.doc

Microsoft Word - Sable User's Manual.doc SABLE 刻 字 机 使 用 手 册 1 注 意 GCC 星 云 保 留 在 不 事 先 通 知 的 情 况 下, 修 改 该 使 用 手 册 任 何 内 容 的 权 利! 禁 止 任 何 未 经 允 许 的 修 改 复 制 分 发 或 公 布! 关 于 此 手 册 有 任 何 问 题 或 意 见 请 联 系 您 的 当 地 经 销 商 2 目 录 安 全 操 作 注 意 事 项...5 第 一

More information

腰部酸痛保健法

腰部酸痛保健法 識 臨 都 老 年 勞 不 不 理 不 便 了 療 離 狀 力 力 易 拉 狀 勞 裂 類 老 年 刺 滑 不 良 六 尿 列 類 說 裂 神 神 見 勞 滑 不 烈 兩 來 暴 力 勞 裂 刺 神 神 狀 見 勞 見 臨 度 降 年 連 都 類 淋 刺 刺 不 勞 易 老 不 不 若 神 神 行 力 不 良 了 不 良 立 年 女 老 年 度 度 度 勞 見 老

More information

_汪_文前新ok[3.1].doc

_汪_文前新ok[3.1].doc 普 通 高 校 本 科 计 算 机 专 业 特 色 教 材 精 选 四 川 大 学 计 算 机 学 院 国 家 示 范 性 软 件 学 院 精 品 课 程 基 金 青 年 基 金 资 助 项 目 C 语 言 程 序 设 计 (C99 版 ) 陈 良 银 游 洪 跃 李 旭 伟 主 编 李 志 蜀 唐 宁 九 李 涛 主 审 清 华 大 学 出 版 社 北 京 i 内 容 简 介 本 教 材 面 向

More information

bingdian001.com

bingdian001.com TSM12M TSM12 STM8L152C6, STM8L152R8 MSP430F5325 whym1987@126.com! /******************************************************************************* * : TSM12.c * : * : 2013/10/21 * : TSM12, STM8L f(sysclk)

More information

Chapter 1 What is Programing Paradigm 1

Chapter 1 What is Programing Paradigm 1 An Introduction to Programing Paradigm Chase Zhang May 8, 2013 Chapter 1 What is Programing Paradigm 1 CHAPTER 1. WHAT IS PROGRAMING PARADIGM 2 Definition from Wikipedia 1. Object-oriented programming/

More information

ebook15-C

ebook15-C C 1 1.1 l s ( 1 ) - i i 4. 14 - d $ l s -ldi /etc/. /etc/.. - i i 3077 drwxr-sr-x 7 bin 2048 Aug 5 20:12 /etc/./ 2 drwxr-xr-x 13 root 512 Aug 5 20:11 /etc/../ $ls -ldi /. /..... i 2 2 drwxr-xr-x 13 root

More information

提问袁小兵:

提问袁小兵: C++ 面 试 试 题 汇 总 柯 贤 富 管 理 软 件 需 求 分 析 篇 1. STL 类 模 板 标 准 库 中 容 器 和 算 法 这 部 分 一 般 称 为 标 准 模 板 库 2. 为 什 么 定 义 虚 的 析 构 函 数? 避 免 内 存 问 题, 当 你 可 能 通 过 基 类 指 针 删 除 派 生 类 对 象 时 必 须 保 证 基 类 析 构 函 数 为 虚 函 数 3.

More information

?C?{????

?C?{???? 臺 北 市 政 府 教 育 局 102 年 度 臺 北 市 高 級 中 等 以 下 學 校 國 際 教 育 深 耕 方 案 臺 北 市 國 中 領 域 跨 國 參 訪 報 告 出 國 期 間 :102 年 11 月 17 日 至 21 日 派 赴 國 家 : 中 國 大 陸 杭 州 市 報 告 日 期 :102 年 12 月 公 務 赴 大 陸 地 區 出 國 報 告 ( 赴 大 陸 出 國 類 別

More information

C语言的应用.PDF

C语言的应用.PDF AVR C 9 1 AVR C IAR C, *.HEX, C,,! C, > 9.1 AVR C MCU,, AVR?! IAR AVR / IAR 32 ALU 1KBytes - 8MBytes (SPM ) 16 MBytes C C *var1, *var2; *var1++ = *--var2; AVR C 9 2 LD R16,-X ST Z+,R16 Auto (local

More information

C/C++ - 字符串与字符串函数

C/C++ - 字符串与字符串函数 C/C++ Table of contents 1. 2. 3. 4. 1 char C 2 char greeting [50] = " How " " are " " you?"; char greeting [50] = " How are you?"; 3 printf ("\" Ready, go!\" exclaimed John."); " Ready, go!" exclaimed

More information

Microsoft Word - template.doc

Microsoft Word - template.doc HGC efax Service User Guide I. Getting Started Page 1 II. Fax Forward Page 2 4 III. Web Viewing Page 5 7 IV. General Management Page 8 12 V. Help Desk Page 13 VI. Logout Page 13 Page 0 I. Getting Started

More information

软件测试(TA07)第一学期考试

软件测试(TA07)第一学期考试 一 判 断 题 ( 每 题 1 分, 正 确 的, 错 误 的,20 道 ) 1. 软 件 测 试 按 照 测 试 过 程 分 类 为 黑 盒 白 盒 测 试 ( ) 2. 在 设 计 测 试 用 例 时, 应 包 括 合 理 的 输 入 条 件 和 不 合 理 的 输 入 条 件 ( ) 3. 集 成 测 试 计 划 在 需 求 分 析 阶 段 末 提 交 ( ) 4. 单 元 测 试 属 于 动

More information

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2 PowerBuilder 9 PowerBuilder Native Interface(PBNI) PowerBuilder 9 PowerBuilder C++ Java PowerBuilder 9 PBNI PowerBuilder Java C++ PowerBuilder NVO / PowerBuilder C/C++ PowerBuilder 9.0 PowerBuilder Native

More information

Microsoft Word - 实用案例.doc

Microsoft Word - 实用案例.doc 计 算 机 系 统 应 用 2009 年 第 12 期 嵌 入 式 Linux 下 温 湿 度 传 感 器 的 设 计 与 实 现 1 Design and Implementation of Temperature and Humidity Sensor Based on Embedded Linux 陈 博 刘 锦 高 ( 华 东 师 范 大 学 电 子 科 学 技 术 系 上 海 200241)

More information

1 CPU interrupt INT trap CPU exception

1 CPU interrupt INT trap CPU exception 1 CPU interrupt INT trap CPU exception 2 X86 CPU gate 64 16 1 2 5 8 16 16 P DPL 00101 TSS 101 DPL P 1 64 16 1 2 1 1 3 3 5 16 16 16 P DPL 0 D 000 16 110 111 100 D 1=32 0=16 DPL P 1 INT DPL1>=CPL>=DPL CPU

More information

提纲 1 Process Scheduling Process Scheduling Queues Schedulers Context Switch( 上下文切换 ) 2 Operation on processes Process Creation Process Termination 3 I

提纲 1 Process Scheduling Process Scheduling Queues Schedulers Context Switch( 上下文切换 ) 2 Operation on processes Process Creation Process Termination 3 I 操作系统原理与设计 第 3 章 Processes( 进程 )2 陈香兰 中国科学技术大学计算机学院 March 19, 2014 陈香兰 ( 中国科学技术大学计算机学院 ) 操作系统原理与设计 March 19, 2014 1 / 50 提纲 1 Process Scheduling Process Scheduling Queues Schedulers Context Switch( 上下文切换

More information

新・解きながら学ぶC言語

新・解きながら学ぶC言語 330!... 67!=... 42 "... 215 " "... 6, 77, 222 #define... 114, 194 #include... 145 %... 21 %... 21 %%... 21 %f... 26 %ld... 162 %lf... 26 %lu... 162 %o... 180 %p... 248 %s... 223, 224 %u... 162 %x... 180

More information

C H A P T E R 7 Windows Vista Windows Vista Windows Vista FAT16 FAT32 NTFS NTFS New Technology File System NTFS

C H A P T E R 7 Windows Vista Windows Vista Windows Vista FAT16 FAT32 NTFS NTFS New Technology File System NTFS C H P T E R 7 Windows Vista Windows Vista Windows VistaFT16 FT32NTFS NTFSNew Technology File System NTFS 247 6 7-1 Windows VistaTransactional NTFS TxFTxF Windows Vista MicrosoftTxF CIDatomicity - Consistency

More information

六域链联盟 SDChain-Matrix 节点搭建指南 2018/07/26 Version : 1.0.0

六域链联盟 SDChain-Matrix 节点搭建指南 2018/07/26 Version : 1.0.0 SDChain-Matrix 节点搭建指南 目录 1 环境要求... 3 2 软件下载... 4 3 安装部署... 4 3.1 部署可执行程序目录... 4 3.2 部署配置文件目录... 4 3.3 部署数据库文件目录... 4 3.4 部署日志文件目录... 4 3.5 部署依赖库文件目录... 4 4 配置参数... 5 5 启动运行... 7 5.1 普通模式启动... 7 5.2 加载启动模式...

More information

浙江大学本科论文模板

浙江大学本科论文模板 本 科 生 毕 业 设 计 报 告 项 目 名 称 微 型 操 作 系 统 的 设 计 与 实 现 姓 名 与 学 号 曲 国 铖 3063027053 指 导 老 师 王 新 宇 专 业 计 算 机 科 学 与 技 术 学 院 计 算 机 学 院 A Dissertation Submitted to Zhejiang University for the Degree of Bachelor of

More information

C C

C C C C 2017 3 8 1. 2. 3. 4. char 5. 2/101 C 1. 3/101 C C = 5 (F 32). 9 F C 4/101 C 1 // fal2cel.c: Convert Fah temperature to Cel temperature 2 #include 3 int main(void) 4 { 5 float fah, cel; 6 printf("please

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

穨control.PDF

穨control.PDF TCP congestion control yhmiu Outline Congestion control algorithms Purpose of RFC2581 Purpose of RFC2582 TCP SS-DR 1998 TCP Extensions RFC1072 1988 SACK RFC2018 1996 FACK 1996 Rate-Halving 1997 OldTahoe

More information

untitled

untitled 料 2-1 料 料 x, y, z 料 不 不 料濾 料 不 料 料 不 料 錄 料 2-1 a 料 2-1 b 2003 a 料 b 料 2-1 料 2003 料 料 行 料濾 料亂 濾 料 料 滑 料 理 料 2001 料 兩 理 料 不 TIN, Triangular Irregular Network 8 2-2 a 數 量 料 便 精 2003 料 行 理 料 立 狀 連 料 狀 立 料

More information

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM Oracle Solaris Studio 12.2 DLight 2010 9 2 2 3 DLight 3 3 6 13 CPU 16 18 21 I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AMP Apache MySQL

More information

Lorem ipsum dolor sit amet, consectetuer adipiscing elit

Lorem ipsum dolor sit amet, consectetuer adipiscing elit English for Study in Australia 留 学 澳 洲 英 语 讲 座 Lesson 3: Make yourself at home 第 三 课 : 宾 至 如 归 L1 Male: 各 位 朋 友 好, 欢 迎 您 收 听 留 学 澳 洲 英 语 讲 座 节 目, 我 是 澳 大 利 亚 澳 洲 广 播 电 台 的 节 目 主 持 人 陈 昊 L1 Female: 各 位

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.07.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.07.doc 2 5 8 11 0 1. 13 2. 15 3. 18 1 1. 22 2. 25 3. 27 2 1. 35 2. 38 3. 41 4. 43 5. 48 6. 50 3 1. 56 2. 59 3. 63 4. 65 5. 69 13 22 35 56 6. 74 7. 82 8. 84 9. 87 10. 97 11. 102 12. 107 13. 111 4 114 1. 114 2.

More information

untitled

untitled 1 7 7.1 7.2 7.3 7.4 7.5 2 7.1 VFT virtual 7.1 3 1 1. 2. public protected public 3. VFT 4. this const volatile 4 2 5. ( ) ( ) 7.1 6. no-static virtual 7.2 7. inline 7.3 5 3 8. this this 9. ( ) ( ) delete

More information

并行计算

并行计算 OpenMP OpenMP OpenMP OpenMP OpenMP MPI OpenMP OpenMP 2006-10-9 2 OpenMP ( ) OpenMP RedHat Linux Intel C OpenMP 2006-10-9 3 OpenMP OpenMP OpenMP OpenMP 2006-10-9 4 RedHat Linux Intel C root intel8.1 chmod

More information

untitled

untitled 1 DBF (READDBF.C)... 1 2 (filetest.c)...2 3 (mousetes.c)...3 4 (painttes.c)...5 5 (dirtest.c)...9 6 (list.c)...9 1 dbf (readdbf.c) /* dbf */ #include int rf,k,reclen,addr,*p1; long brec,erec,i,j,recnum,*p2;

More information

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1 21 , 7, Windows,,,, : 010-62782989 13501256678 13801310933,,,, ;,, ( CIP) /,,. : ;, 2005. 11 ( 21 ) ISBN 7-81082 - 634-4... - : -. TP316-44 CIP ( 2005) 123583 : : : : 100084 : 010-62776969 : 100044 : 010-51686414

More information

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更 AX5000 Version 1.0 2006 年 9 錄...1 說...2 說...3...4 說...5 六...6 6.1 率...7 6.2 POST PAY...8 6.3 PREPAY DEPOSIT...9 6.4...10 6.5...11 更...12...12 LCD IC LED Flash 更 兩 RJ11 ( ) DC ON OFF ON 狀 狀 更 OFF 復 狀 說

More information