Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
[SOLVED]Built-in assembler
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Batch layer export
by
speter
[
Today
at 11:56:12 pm]
Solved - Problem with OnP...
by
Wilko500
[
Today
at 11:34:48 pm]
Lazarus 2.1.0 svn, TLabel...
by
funlw65
[
Today
at 10:52:24 pm]
Win-10 64-bit, installed ...
by
wp
[
Today
at 10:42:05 pm]
Windows API test programs...
by
440bx
[
Today
at 10:22:58 pm]
Saving Form sizes using W...
by
zgabrovski
[
Today
at 10:22:05 pm]
Generate square / sinusoi...
by
Fred vS
[
Today
at 10:18:35 pm]
doc (CHM) snapshot update...
by
marcov
[
Today
at 09:47:05 pm]
S.M.A.R.T.: How to read?
by
MarkMLl
[
Today
at 09:31:08 pm]
Differences between compi...
by
z0rr0
[
Today
at 08:45:17 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED]Built-in assembler (Read 495 times)
avk
Sr. Member
Posts: 331
[SOLVED]Built-in assembler
«
on:
November 07, 2019, 08:04:21 am »
It looks like a bug, attempt to compile this code:
Code: Pascal
[Select]
[+]
[-]
{$asmmode intel}
procedure
doasm
;
begin
asm
test rax
,
$8000000000000000
end
;
end
;
reports an error:
Code: Text
[Select]
[+]
[-]
... Error: Asm: signed dword value exceeds bounds -9223372036854775808
«
Last Edit: November 07, 2019, 09:08:01 am by avk
»
Logged
zamronypj
Full Member
Posts: 107
Re: Built-in assembler
«
Reply #1 on:
November 07, 2019, 08:33:39 am »
According to TEST instruction documentation
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
TEST RAX, imm32
So it accepts immediate value 32 bit operand. To test with 64 bit immediate value, CMIIW, I think you need to copy 64bit immediate value to 64bit register first
Code: ASM
[Select]
[+]
[-]
mov
rcx
,
$
8000000000000000
test
rax
,
rcx
«
Last Edit: November 07, 2019, 08:37:30 am by zamronypj
»
Logged
Fano Framework, Free Pascal web application framework
https://fanoframework.github.io
Personal Projects
https://v3.juhara.com
Github
https://github.com/zamronypj
avk
Sr. Member
Posts: 331
Re: Built-in assembler
«
Reply #2 on:
November 07, 2019, 08:49:27 am »
Thank you very much.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
[SOLVED]Built-in assembler
TinyPortal
© 2005-2018