2006-03-02

assembly language comes back - 組語又回來了

assembly language comes back - 組語又回來了This entry was originally published at 抓~ 抓到一隻瞌睡蟲
前幾天才在上tyhsu的課, 這幾天, 組語真的回來了. 我沒有去看書就直接上了, 一邊看code一邊學組語. 壞處是什麼? 我連operand是用immediate, direct, indirect都還沒搞完全清楚, 結果call個BIOS service就搞出了invalide command… 害我花了兩個多小時在debug… 結果應該是immediate, 寫成了direct.
這個…

movw 0×0, %ax
和這個…
movw $0×0, %ax
有何不同呢? 前者是direct, 後者是immediate… 我想撞牆自殺, 上Systematic Debugging同時在debug. 好個debug的課啊!

沒有留言: