PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 疑難雜症區
(https://www.pcdvd.com.tw/forumdisplay.php?f=34)
- - [C 問題] 如何 printf 暫存器 eax 的值
(https://www.pcdvd.com.tw/showthread.php?t=1158036)
|
---|
[C 問題] 如何 printf 暫存器 eax 的值
#include <stdint.h>
int main(void) { /* mov ecx, 0x4 mov eax, 0x1 shl eax,cl 1 << 4 = 0x10 */ __asm__ __volatile__("movl $0x4, %ecx"); __asm__ __volatile__("movl $0x1, %eax"); __asm__ __volatile__("shl %cl, %eax"); printf("EAX = 0x%x\n", ??); return 0; } 如何把 eax 暫存器的值透過 printf 輸出 有沒有更精簡的寫法 ?? |
|
我開始不相信樓主會寫OSX Driver . :stupefy:
樓上這招,我在大學就會用了.... 在組合語言課的作業.. :laugh: 於是我得到60分.. 因為有交就60分. :laugh: |
拿破崙波拿巴 *台法機乖分身帳號
https://www.pcdvd.com.tw//member.php?u=340921 虎濫腦瘤大濕 伸手牌水土散熱器還在研發中... :laugh: :laugh: :laugh: |
引用:
因為我沒上大學阿 :laugh: Driver 多半是拿別人的修改的 https://www.insanelymac.com/forum/t...enforceata-106/ 我自己寫的只有 opcode 模擬器 :laugh: https://www.insanelymac.com/forum/t...lug-in-project/ 少在那裡虎難,我看你念到塔莉博士班也不會用 :D :D |
所有的時間均為GMT +8。 現在的時間是06:37 AM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2024。