Re: [問題] DEV-CPP 下int86()
※ 引述《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
09/08 22:43, 4F
→
09/08 23:04, , 5F
09/08 23:04, 5F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章