Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

polling (Announce)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 01.06.2011, 17:27

> From my experience I'd say that this variant of "idle call" isn't supported
> in NTVDM ( I am not 100% sure).

You are wrong; it is indeed supported.

D:\>debug
-a
136C:0100 mov ax, 1680
136C:0103 int 2f
136C:0105 jmp 100
136C:0107
-r
AX=0000 BX=0000 CX=0000 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=136C ES=136C SS=136C CS=136C IP=0100 NV UP EI PL ZR NA PE NC
136C:0100 B88016            mov     ax, 1680
-t
AX=1680 BX=0000 CX=0000 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=136C ES=136C SS=136C CS=136C IP=0103 NV UP EI PL ZR NA PE NC
136C:0103 CD2F              int     2F
-
AX=1600 BX=0000 CX=0000 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=136C ES=136C SS=136C CS=136C IP=0105 NV UP EI PL ZR NA PE NC
136C:0105 EBF9              jmp     0100
-g


After the call AL was properly set to zero, indicating the call is supported. The G command at the end hangs the VM but does so without fully loading one core. This in a MSW XP NTVDM. (I don't remember ever getting other results in MSW 2000, Vista, or 7 though.)

> Although it sounds a bit strange, probably
> the best option in NTVDM is to call the "keyboard status interrupt" (int
> 16h, ah=01) if you want to "give up" your time slice.

Are you sure? That sounds indeed strange. Isn't 16.01 supposed to return immediately? In any case mTCP's DHCP (other programs probably too) does appear to call 16.01 in each loop iteration so if that gave up enough time it wouldn't fully load a core.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 305 users online (0 registered, 305 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum