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
Lazarus IDE built for LCL...
by
zeljko
[
Today
at 03:28:13 pm]
Lazarus Bugfix Release 4....
by
uganof
[
Today
at 03:04:05 pm]
Add Help to an Applicatio...
by
1HuntnMan
[
Today
at 02:41:40 pm]
composition instead of in...
by
BildatBoffin
[
Today
at 01:16:31 pm]
Update a table with an Au...
by
Zvoni
[
Today
at 01:14:15 pm]
Is it me or is there some...
by
jamie
[
Today
at 12:03:37 pm]
FPC says file exists, Laz...
by
eny
[
Today
at 11:55:04 am]
bgraformatui.pas(26,12) W...
by
marcov
[
Today
at 11:40:06 am]
Variable initialization
by
BildatBoffin
[
Today
at 11:35:22 am]
unit ProjectDescriptorTyp...
by
Martin_fr
[
Today
at 09:41:17 am]
FreePascal/Lazarus docume...
by
MarkMLl
[
Today
at 08:39:13 am]
Lazarus 4.x - ZeosdBo
by
essence-ciel
[
Today
at 08:29:57 am]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 08:22:12 am]
BGRAVirtualScreen - weird...
by
backprop
[
Today
at 08:20:04 am]
Question about fpreport
by
ginoo
[
Today
at 07:17:44 am]
Status of Fresnel Project...
by
dbannon
[
Today
at 06:11:31 am]
https://live.freepascal.o...
by
PierceNg
[
Today
at 05:15:59 am]
Lazarus Woes (4.2)
by
Martin_fr
[March 04, 2026, 09:22:32 pm]
gitlab issues menu
by
n7800
[March 04, 2026, 07:52:13 pm]
The growth of computers
by
LeP
[March 04, 2026, 07:04:17 pm]
Problem to restore previo...
by
Hartmut
[March 04, 2026, 05:19:29 pm]
How to use Lazserial
by
CM630
[March 04, 2026, 03:27:11 pm]
Don't Look Here
by
Joanna
[March 04, 2026, 02:53:40 pm]
TidSimpleServer Error whi...
by
jamie
[March 04, 2026, 12:27:29 pm]
could Ardour's YTK be use...
by
marcov
[March 04, 2026, 11:33:20 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: lazarus do not know ax (Read 1948 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
Khrys
Sr. Member
Posts: 399
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: 6344
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
Khrys
Sr. Member
Posts: 399
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: 18764
To Europe: simply sell USA bonds: dollar collapses
Re: lazarus do not know ax
«
Reply #7 on:
May 30, 2025, 12:44:23 pm »
It is LEA, not LES.
Logged
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
lazarus do not know ax
TinyPortal
© 2005-2018