Message-Id: <9703111850.AA26262@hum.amu.edu.pl> Comments: Authenticated sender is From: "Mark Habersack" Organization: KGB To: chambersb AT juno DOT com (Benjamin D Chambers) Date: Tue, 11 Mar 1997 19:42:04 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Subject: Re: [opendos] Multitasker API and a demo program Reply-To: grendel AT ananke DOT amu DOT edu DOT pl Cc: "'OpenDOS Mailing List'" In-Reply-To: <19970310.174935.10167.7.chambersb@juno.com> Sender: owner-opendos AT mail DOT tacoma DOT net Precedence: bulk On 10 Mar 97 (at 20:46) Benjamin D Chambers became famous by saying: > >either (though I could be wrong). Besides, doing it What version of > TASM? Also, did you remember the compiler directives? > ie: > .286 Enable 286 Instructions > .386 Enable 386 Instructions > .486 Enable 486 Instructions > .586 Enable 586 Instructions > TASM 5 supported Pentium, I don't know if anything knewer has come along. So did TASM 4. And even with older ones it's not a problem. Just get any opcode reference and create a macro for that! > I don't like their other compilers, but Borland's TASM really is a good > piece of work (IMHO). Provided you don't use their high-level directives - they can screw things up an make your life miserable for two weeks ;-)) > >stand-alone with > >TASM > >means that I'd have to find out about the C calling conventions. They're easy: 1. The caller sets up the parameters on stack by 'pushing' them in the reverse order: last one goes first 2. The function is invoked 3. Caller cleans up the stack from parameters by adding the pushed arguments' size to (e)sp register (assuming 8 bytes were pushed): addl $8, %esp - GNU AS syntax add esp, 8 - Intel syntax That's it! > I don't think so - I vaguely remember something about using the macro > CALL and it would take care of it for you. Also, when you set up a True. There is such a high-level version of the instruction - never used it, though. > procedure, you can call it C or PASCAL (I know for sure Pascal, so I You can define it to be PROLOG, C, CPP, PASCAL, BASIC (AFAIK): foobar PROC FAR C or just define the default calling convention for entire module by putting this at the beginning: MODEL LARGE, C or MODEL TPASCAL - for interfacing with Turbo Pascal only! > assume you can do the same for C). I don't remember the actual commands, > check it's manual (I lost mine years ago :( ). > > >Why Borland? It's small (v3.1), easy to use (*great* IDE) and is > >perfectly > >suited for the task. > > I was really more interested in whether or not the API could be used by > djgpp programs - but now that I think about it, isn't there a bug in the > DPMI provider? (So the multitasking wouldn't work with djgpp programs > anyways - would it?) I haven't actually gotten OpenDOS yet (I plan to wait You don't have to use the DPMI server that comes with OD - just put DPMI=OFF on its command line in (D)CONFIG.SYS and use CWSDPMI. And there is no reason why the API wouldn't work with DJGPP. It'd be just a lot of RM calls ;-) And it hurts... =============== OpenDOS - feel the power! http://www.caldera.com == From the delequeue to the regiment, a profession in a flash. But remember Monday signings when from door to door you dash... On the news the nation mourns you - Unknown Soldier count the cost: for a second you'll be famous but labeled posthumous... Forgotten Sons... --- Visit http://ananke.amu.edu.pl/~grendel