flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Windows > 64 bit template start.

Author
Thread Post new topic Reply to topic
catafest



Joined: 05 Aug 2010
Posts: 70
64 bit template start.
I start with this template and I have some questions:

Code:
format PE64 GUI 4.0
entry start
include 'win64a.inc'
;---
section '.text' code readable executable
start:
mov rax,3c5677h 
push rbp        
mov rbp,rsp     ;
push rax        ;
;--
;--
xor rcxrcx ; pass an ExitCode of 0 to ExitProcess
call [ExitProcess]
;---
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL'
import kernel32ExitProcess,'ExitProcess'
section '.data' data readable writeable
oldcw   dw   ?
data fixups
end data 


The issue is to make one good template of 64 bit assembly language.
1. starting with load rax is a good start ? any idea to start that more to machine language?
2. I used data fixups to generates relocation information, but this is good practice?
3. The end data close the data , this is good way?
4 how about idata and edata works into 64 bit fast program?
Thank you. Regards.
Post 15 Jan 2017, 23:51
View user's profile Send private message Yahoo Messenger Reply with quote
catafest



Joined: 05 Aug 2010
Posts: 70
nobody ? my questions are not good ?
Post 23 Jan 2017, 00:06
View user's profile Send private message Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14462
Location: Eta Argus
There are already 64-bit templates in the fasm download. What is it that you found was missing that you needed to add?
Post 23 Jan 2017, 12:16
View user's profile Send private message Visit poster's website Reply with quote
catafest



Joined: 05 Aug 2010
Posts: 70

revolution wrote:
There are already 64-bit templates in the fasm download. What is it that you found was missing that you needed to add?


Yes I know FASM come with 64-bit templates.
I take a look at System V ABI (learning) how it's working.
Also I found this code on internet ( someting strange for me):

Code:
start:
mov rax,3c5677h 
push rbp        
mov rbp,rsp     ;
push rax        


This put me some questions about memory and virtual memory tasks.
I asked about if that is a good point to start the 64x file versus System V ABI or that has a bad practice.
Post 29 Jan 2017, 21:45
View user's profile Send private message Yahoo Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.