我的目的就是用linux system call: write, 來實現pascal 中的標準輸出write(). 可是,我運行的結果是 'VT102', 用debugger 發現有segmentation fault (我改用C 語言裏的printf, 然後用gcc 編譯, 輸出的就是正確的). 有沒有哪位熟悉匯編語言中使用Linux system call 的願意幫我看看是什麽問題? 十分感謝。。
我有一段很短的匯編程序,可裏麵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-
♂
(207 bytes)
()
08/02/2006 postreply
12:05:37
•
看來熱心人挺多的。我的具體問題是。。
-MGM-
♂
(1524 bytes)
()
08/02/2006 postreply
11:49:49
•
我試過,不是exit 的緣故。有了exit call 也不行
-MGM-
♂
(0 bytes)
()
08/02/2006 postreply
12:51:13
•
strange, I attached your code to the end, still get seg-fault.
-MGM-
♂
(457 bytes)
()
08/02/2006 postreply
13:30:53
•
still, not working..
-MGM-
♂
(396 bytes)
()
08/02/2006 postreply
14:04:13
•
still not working..
-MGM-
♂
(396 bytes)
()
08/02/2006 postreply
14:03:16