Article View: comp.lang.modula2
Article #3223Re: Assembler + Modula-2 HOW ?
From: "Mark Morgan Lloyd "
Date: Thu, 01 Feb 1996 14:22
Date: Thu, 01 Feb 1996 14:22
31 lines
1761 bytes
1761 bytes
> 1. Is it possible to include non-Intel opcodes in a Modula-2 > program that is being compiled on a standard Intel-based PC ? Depends entirely on the compiler. There are some things that _have_ to be done as inline operations so I'd expect most implementations to support inline assembler (or equivalent). > 2. If so, do I put the assembly opcodes into a separate module ? Again, compiler-specific. On a PC you may find that standard .obj files are used, in which case a fairly frequent protocol is to have a definition module with a precompiled .obj as its implementation. Note that like (1) above, this normally implies language extensions. > 3. How do I "transfer" control to the assembly opcodes, let them > run to conclusion and then return control back to the Modula-2 > program ? > > e.g. do I use TRANSFER/IOTRANSFER, NEWPROCESS/PROCESS ... ? No, RTFM about these operations. In general, CODE (if it's anything like the Logitech one which I have experience with) works by having a standard procedure with a CODE() statement somewhere between the BEGIN and END, it is down to the programmer to deduce the register contents immediately before and after the inline code. Mark Morgan Lloyd mark_tbu@cix.compulink.co.uk [Opinions above are the author's, not those of his employers or colleagues]
Technical Details
Message-ID:
<DM3p8r.En1@cix.compulink.co.uk>Path:
arc1-ca.pugleaf.net!cix.compulink.co.uk!usenetReferences:
<4eq5k2$34u@dunlop.cs.strath.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
Path: arc1-ca.pugleaf.net!cix.compulink.co.uk!usenet
From: mark_tbu@cix.compulink.co.uk ("Mark Morgan Lloyd ")
Subject: Re: Assembler + Modula-2 HOW ?
Message-ID: <DM3p8r.En1@cix.compulink.co.uk>
Organization: KDG Mobrey Telemetry
References: <4eq5k2$34u@dunlop.cs.strath.ac.uk>
Date: Thu, 1 Feb 1996 14:22:02 GMT
X-News-Software: Ameol