[問題] 用C內嵌ASM作出類似print功能

作者: ice0803 (缺人SpotifyFamily)   2014-09-17 08:44:50
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
X86PC 在VirtualBox下安裝Ubuntu,使用gcc編譯
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)

問題(Question):
參考"程式設計師的自我修養"這本書的範例,
但實作後,無法顯示"Hello world" 字串,但也沒發生錯誤
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
https://gist.github.com/anonymous/1358f69b8d0c8a2ce803
補充說明(Supplement):
編譯過程
gcc -c -fno-builtin test.c
ld -static -e nomain -o test test.o
./test
作者: akasan (KITO)   2014-09-17 09:47:00
-m32 掛到 gcc 那串試試, Fedora 20 ok
作者: ice0803 (缺人SpotifyFamily)   2014-09-17 21:52:00
可以了,感謝

Links booklink

Contact Us: admin [ a t ] ucptt.com