Article View: comp.lang.modula2
Article #3032Re: Assembly Language
From: Martin Rand
Date: Thu, 16 Nov 1995 06:53
Date: Thu, 16 Nov 1995 06:53
34 lines
1997 bytes
1997 bytes
Chris Austin <zcaccau> wrote: >Is there any way to incorporate assemply language commands into modula-2 code, >as there is in Pascal? I use Topspeed modula-2. >Thanks for any help. Not as a standard language feature in either M2 or Pascal! Some Pascal interpretations allow you to embed Assembler source directly in M2 source, but TopSpeed won't. You can write routines in a separate module and provide an M2 definition module for them. You will need to observe naming conventions, observe the M2 calling / parameter passing conventions and handle addressing correctly for the memory model in force. For V1.17 of TopSpeed (the "student" edition) this is straightforward as these are fixed and you just have to observe the conventions. In V3.x you can include pragmas in your definition module to ensure that the calling conventions used by the client modules match those assumed by your Assembler code. If you are writing general purpose code which accesses memory, you will need to use conditional assembly to generate correct code for the model in use. For either version you will probably need the TechKit add-on which provides the documentation for the Assembler and assembly program issues. This also gives you TopSpeed's rather naff assembler - you could of course use another one, though this might involve more trouble than it's worth for little bits of hand-crafted code. Martin Rand | Tel: (44) 1703 252445 | Highfield Software Ltd | Fax: (44) 1703 252445 | Southampton, UK | |
Technical Details
Message-ID:
<48en7g$b76@zeus.tcp.co.uk>Path:
arc1-ca.pugleaf.net!tcp.co.uk!usenetReferences:
<1995Nov14.140103.50919@ucl.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tcp.co.uk!usenet From: hsl@tcp.co.uk (Martin Rand) Newsgroups: comp.lang.modula2 Subject: Re: Assembly Language Date: Thu, 16 Nov 1995 06:53:32 GMT Organization: Total Connectivity Providers - Internet access for the UK Message-ID: <48en7g$b76@zeus.tcp.co.uk> References: <1995Nov14.140103.50919@ucl.ac.uk> Reply-To: hsl@tcp.co.uk NNTP-Posting-Host: du1-09.tcp.co.uk X-Newsreader: Forte Free Agent 1.0.82