Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!jarthur!uunet!pyrdc!grebyn!ckp From: ckp@grebyn.com (Checkpoint Technologies) Newsgroups: comp.sys.amiga.advocacy Subject: Re: 8-bit death Message-ID: <1991May8.165131.4850@grebyn.com> Date: 8 May 91 16:51:31 GMT References: <2945.tnews@templar.actrix.gen.nz> <1991May7.090333.1449@kessner.denver.co.us> <3335.tnews@templar.actrix.gen.nz> Organization: Grebyn Timesharing Lines: 61 In article <3335.tnews@templar.actrix.gen.nz> jbickers@templar.actrix.gen.nz (John Bickers) writes: >Quoted from <1991May7.090333.1449@kessner.denver.co.us> by david@kessner.denver.co.us (David Kessner): >> In article <2945.tnews@templar.actrix.gen.nz> jbickers@templar.actrix.gen.nz (John Bickers) writes: > >> > When one calls an MS-DOS "interrupt" (haw, reminds me of the C= 64), > >> > That's a fundamental part of the OS that is only 8 bits. > >> The 68000, 68030 (not sure of the 040), 386, etc all offer 256 different >> intterupts (READ: 8 bits). The C-64 (and the 6502/6510) had _THREE_, and > > So? I meant the way you call the OS. In the C= 64 it involved either > ROM jumping or using fixed tables of vectors into the ROMs. In the > PClone, it appears to involve using fixed tables of vectors into the > ROMs. To define a few terms... An "interrupt" comes from an outside device, on the x86 by asserting the INT line and on the 68K by asserting a combination of the three IPL lines. Motorola defines "interrupts" as part of a general category called "exceptions". These include real interruptions as well as exceptions caused by program activity, like divide by zero, illegal instructions, and TRAP instructions. Intel calls all these things interrupts, and in fact have an instruction INT which simulates the effect of an external interrupt source. All this was to show how the quoted arguments are really speaking of different things. Both the 68K and the x86 allow for 256 externally identified interrupt sources, using an 8 bit "vector" to differentiate. The Intel INT instruction can simulate any one of them. The vectors generated by 68K instructions are limited to a set of vectors specifically meant for those purposes: the TRAP vectors (16 of them), the TRAPV vector, the ILLEGAL vector, the A-line and F-line vectors, and a few others I don't recall right now. The 68K defines the vector meanings far better than Intel does - especially since the x86 doesn't have a supervisor mode and any program can generate any INT it wants. (This has lead to conflicts between program-use vectors and hardware-use vectors in the past, when a new hardware device begins using a vector that software had been using. This problem can't occur on the 68K since the set of program-generatable vectors is so well defined.) > > I could be wrong here. Is there some other decent way to call an > MS-DOS function besides using that vector table? All I ever see is > the int86() etc functions in Microsoft C. The Amiga Exec uses straight JSRs rather than TRAPs. MS-DOS could have done this, and considering the absense of separate user and kernel modes it would have made good sense. But the INT call is shorter; it uses a jump table automatically, the vector table, so long as 256 routiunes is enough. But frankly, it never is, and MS-DOS ran out of them. They also put a request code in AL I believe, somewhat negating the benefit of the vector table. -- Richard Krehbiel, private citizen ckp@grebyn.com (Who needs a fancy .signature?)