I don't think that works as the prefetch is coherent. To my experience
the que was nearly transparent to programs and I never allowed for it
presence not incurred any difficulty for that offense. It's fuzzy but
branches and several other events dump the queue.
Allison
On Tue, 7 Sep 1999, Sean 'Captain Napalm' Conner wrote:
It was thus said that the Great Tony Duell once
stated:
Nope, it is the siutcase style machine, with a 8088 processor (I checked in
The 8088 and 8086 are actually very similar processors. The main
difference is the external data bus width -- the 8086 has a 16 bit
external bus and the 8088 has an 8 bit external bus. I seem to remember
that the internal instruction queue is a different size on the 2 chips
but I would have to check.
8086 has a 6-byte prefetch queue while the 8088 has a 4-byte prefetch
queue. I did a *lot* of 8088 assembly programming years ago. Possibly too
much 8-)
It is therefore difficult to tell the chips apart
in software and a lot
of 'machine info' type utilities report finding an 8088 even on
8086-based machines.
I don't think it's that difficult.
org 0100h
mov al,0 ;[1]
mov bx,offset jmp_point + 1
mov [bx],al ;[2]
nop ;[3]
nop
nop ;[5]
nop
jmp_point: jmps x86_chip ;[4]
mov dx,offset t88_chip
jmps display
x86_chip: mov dx,offset t86_chip
display: mov ah,9
int 21h
t88_chip db 'Hi, we're an 8088!',13,10,'$'
t86_chip db 'Hi, we're an 8086!',13,10,'$'
[1] We're going to change the offset of the jump at point [3] to
0. On an 8088, this will take effect since the instruction will
not have been read in by the time we write the modification at
point [2]. On an 8086, the instruction at point [4] will already
be in the pre-fetch queue and won't be modified (well, it will be
modified in memory, but not in the pre-fetch queue).
[2] This is a two byte instruction. After the primary byte is read, the
8086 will be fetching the first byte of the instruction at point
[4], while on an 8088, it will be reading in the instruction at
point [5]. On the second byte, the 8086 will have finished reading
the JMP instruction, while the 8088 will read the next NOP. The
write back will happen at JMP_POINT+1, which the 8086 has already
read, while the 8088 has yet to read.
[3] Filler space for the 8088 4-byte prefetch queue.
[4] The instruction we're going to modify to determine if we're on an
8086 or 8088.
[5] See note [2].
IMHO the only reliable way to know what CPU you
have is to read the
markings on the chip package.
Ah, but a program will have a problem doing that.
-spc (Note: this is untested code. Theoretically, it should work, but I
don't have an 8086 to test it on)