On Fri, 29 Jun 2007, Chris M wrote:
Oi I would not have guessed that the size of the
queue would affect program operation in any way. But
wasn't the 8086 released first?
How would you write a subroutine (for C) that would permit calling an INT
that is defined at runtime? (I didn't know any better ways at the
time)
. . .
MOV BX, offset stepon3
INC BX
MOV [BX], AL ; change the INT to the one specified in AL
. . .
stepon3: INT 00h
. . .
It is easily fixed to handle a different prefetch buffer size by:
. . .
MOV BX, offset stepon3
INC BX
MOV [BX], AL ; change the INT to the one specified in AL
. . .
JMP SHORT $ +2 ; or JMP stepon3 ; clears the prefetch buffer
; and does little else
stepon3: INT 00h
. . .
"Do NOT ever use self-modifying code. It may not happen for a LONG time,
but it WILL eventually come back to bite your foot off."
--
Grumpy Ol' Fred cisin at
xenosoft.com