Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
lazarus do not know ax
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Star Wars Galaxian
by
Nimbus
[
Today
at 12:53:42 am]
Application triggers mess...
by
JanRoza
[
Today
at 12:26:52 am]
Automatic generation of *...
by
PeterBB
[August 08, 2026, 10:27:35 pm]
[solved] form reset/reloa...
by
ADMGNS
[August 08, 2026, 09:58:42 pm]
Create small language
by
ADMGNS
[August 08, 2026, 09:52:19 pm]
Advatage Database server
by
neobrasil08
[August 08, 2026, 08:42:18 pm]
Finding List of Fonts & P...
by
J-G
[August 08, 2026, 08:29:01 pm]
QGradientTrackPanel: A Fu...
by
Ed78z
[August 08, 2026, 07:22:09 pm]
How get listy of FieldDat...
by
Aruna
[August 08, 2026, 04:02:16 pm]
Identify network devices
by
LemonParty
[August 08, 2026, 03:44:03 pm]
TyControls: a custom-draw...
by
Antek
[August 08, 2026, 02:36:39 pm]
PO-Editor MyLangEdit3 now...
by
CM630
[August 08, 2026, 02:36:13 pm]
how to connect to mariadb...
by
Mike.Cornflake
[August 08, 2026, 12:25:31 pm]
New charts
by
Boleeman
[August 08, 2026, 11:24:34 am]
Unleashed Pascal (async/a...
by
Fibonacci
[August 08, 2026, 08:11:20 am]
SPAM
by
paweld
[August 08, 2026, 07:17:10 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: lazarus do not know ax (Read 1990 times)
turunk
New Member
Posts: 29
lazarus do not know ax
«
on:
May 26, 2025, 01:53:00 pm »
i have lazarus 3.8 and can assembler, but lazarus do not recognize ax or eax or rax or bx
Code: Pascal
[Select]
[+]
[-]
begin
asm
mov ax
,
bx
;
mov eax
,
ebx
;
mov rax
,
rbx
;
end
;
end
.
Logged
H₂SO₄
Sr. Member
Posts: 485
Re: lazarus do not know ax
«
Reply #1 on:
May 26, 2025, 02:06:42 pm »
Did you set
{$asmmode intel}
? FPC defaults to AT&T syntax (e.g.
movw %bx, %ax
)
Logged
turunk
New Member
Posts: 29
Re: lazarus do not know ax
«
Reply #2 on:
May 27, 2025, 02:02:46 pm »
thank you very much
but now he do not know LES from LES BX,VarMof5;
and error "Error: Asm: 16 or 32 Bit references not supported" at
mov al,[si];
«
Last Edit: May 27, 2025, 09:50:56 pm by turunk
»
Logged
PascalDragon
Hero Member
Posts: 6417
Compiler Developer
Re: lazarus do not know ax
«
Reply #3 on:
May 27, 2025, 09:56:37 pm »
Quote from: turunk on May 27, 2025, 02:02:46 pm
mov al,[si];
For memory references you need to use the correct size matching your architecture, so
mov al, [esi]
for 32-bit and
mov al, [rsi]
for 64-bit.
mov al, [si]
would only work for 16-bit.
Logged
turunk
New Member
Posts: 29
Re: lazarus do not know ax
«
Reply #4 on:
May 28, 2025, 08:25:20 pm »
i already have tried it with "byte ptr [si]" and "word ptr [si]" .
and has the compiler a problem with LES?
Logged
H₂SO₄
Sr. Member
Posts: 485
Re: lazarus do not know ax
«
Reply #5 on:
May 29, 2025, 07:24:09 am »
Quote from: turunk on May 27, 2025, 02:02:46 pm
but now he do not know LES from LES BX,VarMof5;
What platform are you compiling for? If you're on AMD64 (I assume you are), then the default settings (implied
-Px86_64
) will prevent that opcode from being used
because the hardware in fact doesn't support it
(
#UD
raises a hardware exception):
Code: Text
[Select]
[+]
[-]
64-BIT_MODE
IF SS is loaded
[...]
ELSE IF attempt to load DS, or ES
THEN #UD;
ELSE IF FS, or GS is loaded with non-NULL segment selector
[...]
If you're writing 16-bit code you should pass
-Pi8086
to the compiler. This will also fix you issue with
mov al, [si]
.
Logged
turunk
New Member
Posts: 29
Re: lazarus do not know ax
«
Reply #6 on:
May 29, 2025, 07:35:21 pm »
is AMD64 not reproducing Intel386?
i typed it here in Lazarus at it is then normal pentium 64 bit
Logged
Thaddy
Hero Member
Posts: 19606
Glad to be alive.
Re: lazarus do not know ax
«
Reply #7 on:
May 30, 2025, 12:44:23 pm »
It is LEA, not LES.
Logged
Any "programmer" that knows only one programming language is not a programmer
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
lazarus do not know ax
TinyPortal
© 2005-2018