File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,15 @@ CPU 386
5353 ; based on https://hg.pushbx.org/ecm/ldebug/file/7f3440d5824d/source/init.asm#l3071
5454 ; which is based on http://www.textfiles.com/hamradio/v20_bug.txt
5555 mov ax , sp ; we use stack to do test
56- mov cx , 1 ; after pop still 1 if 8088/8086
56+ mov cx , 0 ; after pop still 0 if 8088/8086
5757 push cx
58- dec cx ; after pop still 0 if NEC V20/V30
58+ inc cx ; after pop still 1 if NEC V20/V30
5959 ; next instructions may lock system if breakpoint or trace flag set
6060 db 8Fh , 0C1h ; pop r/m16 with operand cx on 808x, nop on NEC V20/V30
6161 mov sp , ax ; reset stack to known good state (pre push, optional pop)
62- xor cx , cx ; cx is 1 if NEC, 0 if 808x
63- jz is808x
64- mov bx , cx
62+ or cx , cx ; cx is 0 if 808x, 1 if NEC
63+ jz is808x ; if not NEC then goto test for 808x vs 8018x
64+ mov bx , cx ; treat NEC V20/V30 as 8018x, i.e. return 1
6565 jmp short cleanup
6666is808x:
6767 mov ax , 1 ; determine if 8086 or 186
Original file line number Diff line number Diff line change @@ -461,6 +461,8 @@ STATIC VOID signon()
461461 " - 80386 CPU required"
462462#elif defined (I186 )
463463 " - 80186 CPU required"
464+ #else
465+ " - 808x compatible"
464466#endif
465467
466468#ifdef WITHFAT32
You can’t perform that action at this time.
0 commit comments