我對某些東西感到困惑,我是新手,在GNU/Linux上學習程序集,如果你使用了指令並且沒有中斷(終止)程序,它會觸發一個分段錯誤錯誤。
爲了澄清,我爲此製作的程序唯一的作用是通過系統調用退出。當在程序集中不中斷時出現分段錯誤
它爲什麼這樣做?我的意思是,爲什麼當中斷時它不被認爲是「訪問不允許訪問的內存」?
編輯:我沒有試圖做這個事情,這是出了結果混淆的問題,但這裏是代碼:
movl $1, %eax
movl $2, %ebx
#int $0x80 (if you remove the comment, it won't trigger a segmentation fault error, even though now we are using registers normally)
請包括一些代碼給我們你想要做的事情的背景。 – Michael
我不想做任何事情,但我會包含代碼 –