Hi, I was looking through isolinux and noticed you had trouble detecting 8086 cpu's. I have some experience with this so I thought you might like some different info. The behavior of the "push sp" instruction changed after the 8086 to pushing sp before updating it. I've included a snippet of one of my bootstraps in case you want to use it (or just want to understand better). I also use a different method for detecting the 386. Basically I just attempt a 32-bit instruction and hook the invalid opcode exception. Hope this helps. :) Mike push sp ; save sp pop ax ; ax = saved sp cmp ax, sp ; 8086 modifies sp before pushing je .not_8086 ; processor is not an 8086 ; .invalid_cpu: ; mov si, .err_cpu ; si points to error message jmp .error_handler ; display message and reboot ; .not_8086: ; mov W [6 << 2], .invalid_cpu ; store offset of invalid opcode handler mov [(6 << 2) + 2], cs ; store segment of handler xor eax, eax ; test a 32-bit instruction
Michael K Ter Louw wrote:> Hi, I was looking through isolinux and noticed you had trouble detecting > 8086 cpu's.... ? ... The only comment is "I hope this catches 80186 CPU's as well"... I'm well aware of the push sp thing and the code uses it. (FWIW, 80186's *should* be handled correctly by my code. Not that it matters AT ALL for anything but SYSLINUX, since no system exists which would be affected otherwise...) -hpa
Michael K Ter Louw wrote:> > BTW, I'm thinking of using isolinux/memdisk for a project I'm working > on. I was wondering if you or anyone else had started working on the > simple API for COMBOOT images yet. If not, I'm thinking of going at it. > > At this point I need at least the ability to instruct isolinux to boot > an image with memdisk. Beyond that I would like to use the open > file/getc/ungetc functions, maybe implement an unfiltered getline, and > possibly make a findfirst/findnext routine for listing directories. >The sensible thing would be to implement a subset of the DOS API (INT 21h), so that it could be invoked either via COMBOOT or from DOS directly. I have looked at it several times, but it's been one of those things "in case there is ever interest." -hpa