Re: [問題] DEV-CPP 下int86()

看板C_and_CPP (C/C++)作者 ( )時間16年前 (2009/09/08 21:52), 編輯推噓2(203)
留言5則, 3人參與, 最新討論串2/2 (看更多)
※ 引述《catspawboy (WII*wii)》之銘言: 請問在DEV-CPP這個IDE下 要怎麼使用到int86()或intx86()這兩個函數? 還是說有其他方法代替??? 那可以幫我解釋以下程式碼的意思嘛???? void show_mouse(void) { union REGS in, out; in.x.ax = 0x1; int86(0x33, &in, &out); } 挺舊的 code 了,16 位元跑 DOS 時代的吧 ? DOS int 蒐集 http://www.ctyme.com/intr/int-33.htm 如它所說 INT 33h 系列是實模式 DOS 環境下控制滑鼠的中斷 其中以 AX = 0001h 的功能呼叫為顯示滑鼠 至於 union REGS 請參照 http://www.delorie.com/djgpp/doc/libc/libc_486.html int86() 顧名思義就是模擬一個軟體中斷,至於有些限制、它的作用等 在剛才給的網頁有很清楚的說明: Currently, it supports only a subset of all available interrupts and functions: 1) All functions of any interrupt which expects only scalar arguments registers (i.e., no pointers to buffers). 2) In addition, the following functions of interrupt 21h are supported: 9, 39h, 3Ah, 3Bh, 3Ch, 3Dh, 3Fh, 40h, 41h, 43h, 47h, 56h. When the interrupt is invoked, the CPU registers are copied from in. After the interrupt, the CPU registers are copied to out. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.137.81.104 ※ 編輯: suhorng 來自: 220.137.81.104 (09/08 21:57)

09/08 22:38, , 1F
謝謝解說~ 既然是顯示滑鼠~
09/08 22:38, 1F

09/08 22:39, , 2F
那線在的介面上應該是沒用了吧@@?
09/08 22:39, 2F

09/08 22:42, , 3F
要不要說說你打算要做什麼事?
09/08 22:42, 3F

09/08 22:43, , 4F
老師拿了本用TC寫的實例 讓我用DEV-CPP翻....
09/08 22:43, 4F

09/08 23:04, , 5F
那...就改用curses.h吧
09/08 23:04, 5F
文章代碼(AID): #1Afc6iAT (C_and_CPP)
文章代碼(AID): #1Afc6iAT (C_and_CPP)