Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
How does one write assembly code in Lazarus??
Downloads
Daily Snapshots
FAQ
Wiki
Bugtracker
IRC channel
Developer Blog
Follow us on Twitter
Mailing List
Free pascal
Other languages
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Lazarus, the complete guide
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: How does one write assembly code in Lazarus?? (Read 2571 times)
4joey1
Newbie
Posts: 3
How does one write assembly code in Lazarus??
«
on:
August 31, 2007, 03:45:21 pm »
Hallo!I am Lazarus Programming language newbie but with previous experience of using Borland Derlphi in Windows.
I have been trying to write assembly codes in Lazarus projects with little success.From my Delphi experience ,I have constantly the possibility to switch in Assembly(ASM) mode by typing as below:
General Template
asm
... my assembly instructions...
end;
Example code that runs in Delphi
procedure TDIBUltra.RotateStyle (n : Byte); assembler;
asm // turn around the mask (N Modulo 32) times
MOV CL, n
ROL [Self].Mask, CL
End;
How can I write assembly code that will run in Lazarus installed in Linux?Please respond to my request as soon as possible with a syntax of such a code.Thanks in advance.
Logged
Vincent Snijders
Administrator
Hero Member
Posts: 2626
RE: How does one write assembly code in Lazarus??
«
Reply #1 on:
August 31, 2007, 05:01:03 pm »
Probably the same as in Delphi, with one difference. FPC uses AT&T syntax by default, but you can change to intel syntax using the -Rintel compiler switch.
Logged
Bart
Hero Member
Posts: 794
How does one write assembly code in Lazarus??
«
Reply #2 on:
September 01, 2007, 12:08:34 pm »
Or, for Intel only, this is what the docs say about $ASMODE compiler directive:
http://www.freepascal.org/docs-html/prog/progsu2.html#x9-70001.1.2
Bart
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
How does one write assembly code in Lazarus??
Recent
ListBox Filter
by
lainz
[
Today
at 05:00:07 am]
BGRAControls
by
lainz
[
Today
at 03:10:41 am]
FPCUp FPC/Lazarus SVN ins...
by
lainz
[
Today
at 03:09:38 am]
What is this Delphi Heade...
by
DirkS
[
Today
at 12:11:59 am]
Build of SQLite3 for WINC...
by
bambamns
[
Today
at 12:09:01 am]
Lazarus crashes after “Re...
by
and4977
[May 20, 2012, 11:26:31 pm]
Scrambled dragimage
by
Ocye
[May 20, 2012, 10:30:19 pm]
Transparency with Qt on D...
by
Ocye
[May 20, 2012, 08:14:43 pm]
DragImage adds as new win...
by
Ocye
[May 20, 2012, 08:05:24 pm]
TFrame size
by
iru
[May 20, 2012, 07:03:22 pm]