On 5/25/24 22:03, Maciej W. Rozycki wrote:
> On Sat, 25 May 2024, Chuck Guzis via cctalk wrote:
> 
>>> I think it was indeed the way to tell NEC V20 and other x86 chips apart: 
>>> good if you wanted to make seamless use of the 8080 emulation mode).
>>
>> Is this something you've actually verified?   Seems to be a bit of an
>> urban legend.  I can test it on a V20 system if you don't have one.
> 
>  You mean the 8080 emulation mode or the CPU detection via AAD/AAM?

In my V20/V30 emulator, I first filtered out the 80186, 80286+ and then
ran the following snippet.

>         mov     dx,sp
>         push    cs
>         mov     cl,255
> 
> ;-----------------------------------------------------------------------;
> ;       On the NEC V20, the following 2 instructions are interpreted as ;
> ;                                                                       ;
> ;       clr1    cl,cl                                                   ;
> ;                                                                       ;
> ;       with cl = 0ffh, this results in cl = 07fh (bit 7 is cleared).   ;
> ;       on the Intel 8088/8086/80186/80286 chips, however, the code     ;
> ;       is interpreted as written, resulting in cl remaining the same.  ;
> ;                                                                       ;
>         db      0fh             ; pop cs, but masm doesn't like it      ;
>         adc     al,cl                                                   ;
> ;-----------------------------------------------------------------------;
> 
>         mov     sp,dx           ; fix stack
>         test    cl,cl
>         jns     Initialize4        ; if v20

This from my 1988 backup files.

--Chuck

Reply via email to