我有一段很短的汇编程序,可里面linux system call运行有问题。。

我的目的就是用linux system call: write, 来实现pascal 中的标准输出write(). 可是,我运行的结果是 'VT102', 用debugger 发现有segmentation fault (我改用C 语言里的printf, 然后用gcc 编译, 输出的就是正确的). 有没有哪位熟悉汇编语言中使用Linux system call 的愿意帮我看看是什么问题? 十分感谢。。

所有跟帖: 

Then why don't you copy the compiled code and patch it in yours -德州老外- 给 德州老外 发送悄悄话 (0 bytes) () 08/02/2006 postreply 10:59:17

but gcc will produce the obj file and exe file, not useful to me -MGM- 给 MGM 发送悄悄话 (207 bytes) () 08/02/2006 postreply 12:05:37

看来热心人挺多的。我的具体问题是。。 -MGM- 给 MGM 发送悄悄话 (1524 bytes) () 08/02/2006 postreply 11:49:49

我试过,不是exit 的缘故。有了exit call 也不行 -MGM- 给 MGM 发送悄悄话 (0 bytes) () 08/02/2006 postreply 12:51:13

strange, I attached your code to the end, still get seg-fault. -MGM- 给 MGM 发送悄悄话 (457 bytes) () 08/02/2006 postreply 13:30:53

still, not working.. -MGM- 给 MGM 发送悄悄话 (396 bytes) () 08/02/2006 postreply 14:04:13

still not working.. -MGM- 给 MGM 发送悄悄话 (396 bytes) () 08/02/2006 postreply 14:03:16

请您先登陆,再发跟帖!