linux c and asm 同时使用
来源:互联网 发布:脑洞故事知乎 编辑:程序博客网 时间:2024/05/21 10:43
from: 《自己动手写操作系统》
1. 中断向量表 查看 linux/init/main.c in http://lxr.linux.no/#linux+v2.6.32/init/main.c
2.
; [root@XXX XXX]# nasm -f elf foo.asm -o foo.o
; [root@XXX XXX]# gcc -c bar.c -o bar.o
; [root@XXX XXX]# ld -s foo.o bar.o -o foobar
; [root@XXX XXX]# ./foobar
; the 2nd one
; [root@XXX XXX]#
但是我的cygwin下报错:
$ ld -s foo.o bar.o -o foo
foo.o: In function `start':
foo.asm:(.text+0xb): undefined reference to `choose'
bar.o:bar.c:(.text+0x1e): undefined reference to `myprint'
bar.o:bar.c:(.text+0x34): undefined reference to `myprint'
3. cygwin 中文乱码 (http://blog.sina.com.cn/s/blog_3ee207aa010008ml.html )
直接执行
alias ls='ls --color --show-control-chars--time-style=long-iso'
或者把上面的内容加到/etc/profile中重启Cygwin即可。
为了使使用更方便,推荐增加如下配置信息:
1. 编辑用户home目录下的文件.inputc,去除以下几行的注释:
set meta-flag on
# 关闭bash命令行8字节字符转义符的转换
set convert-meta off
# 使bash命令行支持8字节字符输出
set output-meta on
set input-meta on
2编辑用户home目录下的文件.bash_profile,在文件末尾加上下面几行:
alias ls='ls --color --show-control-chars--time-style=long-iso'
export LC_ALL=zh_CN.GB23122
export LC_CTYPE=zh_CN.GB2312
export LANG=zh_CN.GB2312
export XMODIFIERS="@im=Chinput"3
stty cs8 -istrip
stty pass8
# Update: 少了这个less就不支持中文了
export LESSCHARSET=latin1
- linux c and asm 同时使用
- asm and c language
- Analysing the ASM code of a simple sample of C programming language at Linux Platform by GCC and GDB
- Linux C使用bool类型 出现错误expected '=', ',', ';', 'asm' or '__attribute__'
- Linux Asm + C (int 0x80)
- Linux Asm + C (int 0x80)
- Linux下使用asm/elf.h问题
- linux asm
- ASM and Process 杂项
- Install and Configure ASM
- ASM Metadata and Internals
- 同时使用Swift和Obj-C
- LINUX-C-从ASM分析char*和char[]
- linux下的C语言的asm内嵌式汇编
- 同时使用windows和linux系统
- linux python pip 和 pip3同时使用
- Visual C 中 Inline ASM 内联汇编的使用
- thinkphp复合查询AND和OR同时使用
- 笔记本内存条 兼容性检查
- 2010学习内容
- java junit 单元测试
- F#程序设计-面向对象编程之访问修饰符
- 代码同步工具CVS/SVN/VS插件 下载地址
- linux c and asm 同时使用
- C++ 运算优先级
- SQL学习 小段代码笔记
- 第3681612号
- 基于S3C2440嵌入式Linux下网卡DM9000E移植
- 看看一位清华计算机专业的学生怎么看LINUX与WINDOWS的!
- first blog
- Excel常用脚本
- Ubuntu 下网页flash问题解决办法--flash无法播放,中文方块字