flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > 2 bytes compilation

Author
Thread Post new topic Reply to topic
N-LG



Joined: 14 Feb 2019
Posts: 40
Location: france
N-LG 18 Feb 2019, 21:03
I started to adapt the fasm code for my OS, but I think I have a little problem with the reading / writing function
my adaptation of fasm compiles only the first 2 bytes of the file (it's a bit short) I think it's because the functions that I adapted do not return the correct data (in the eax registry for example)
is there somewhere a description of what the read / write / lseek functions should do? what are the changed registers?
Post 18 Feb 2019, 21:03
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 18 Feb 2019, 21:13
You can find this information in the old (and never finished) guide to fasm internals. Section 2.4 covers file access functions.
Post 18 Feb 2019, 21:13
View user's profile Send private message Visit poster's website Reply with quote
N-LG



Joined: 14 Feb 2019
Posts: 40
Location: france
N-LG 18 Feb 2019, 21:41
it seems that it is the lseek function that I have not adapted well, I did not take care of the register al which is the choice of the origin

I guess it's the lseek function that determines the size of the file and that's what makes the compilation fail

thank you
Post 18 Feb 2019, 21:41
View user's profile Send private message Reply with quote
N-LG



Joined: 14 Feb 2019
Posts: 40
Location: france
N-LG 18 Feb 2019, 23:34
after a little correction, I tested and it works! (at least on simple compilations, we will test other things later) it was the lseek function that was defective

thank you very very much (for help and for creating Fasm)
Post 18 Feb 2019, 23:34
View user's profile Send private message 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


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.