flat assembler
Message board for the users of flat assembler.
Index
> Windows > Reading files |
Author |
|
SeryZone 06 Apr 2014, 09:18
How to load file on this forum???
|
|||
06 Apr 2014, 09:18 |
|
revolution 06 Apr 2014, 09:58
Isn't there a Delphi reference that shows how to open, read, write and close files?
|
|||
06 Apr 2014, 09:58 |
|
SeryZone 06 Apr 2014, 10:09
revolution wrote: Isn't there a Delphi reference that shows how to open, read, write and close files? Yes, but I want to open and visualize on fasm. |
|||
06 Apr 2014, 10:09 |
|
revolution 06 Apr 2014, 10:11
Well you posted in the HLL section so I assumed you wanted Delphi help. So anyway, which OS are you using?
This is not a fasm thing BTW, it is an OS function so we need to know which OS. Also you can examine the fasm sources (like SYSTEM.INC) to see how files can be read and written in assembly under different OSes. |
|||
06 Apr 2014, 10:11 |
|
SeryZone 06 Apr 2014, 10:14
revolution wrote: Well you posted in the HLL section so I assumed you wanted Delphi help. So anyway, which OS are you using? Delphi works very-very slow, I have some calculations when I visualise the map. It works slow, because I want to rewrite all visualization on fasm, but need some help. Format is MS COFF |
|||
06 Apr 2014, 10:14 |
|
revolution 06 Apr 2014, 10:21
SeryZone wrote: Format is MS COFF |
|||
06 Apr 2014, 10:21 |
|
SeryZone 06 Apr 2014, 10:24
revolution wrote:
No, i use VCL - it's slow and have big exe size. I badly know WinAPI, I would rewrite all code on fasm else... |
|||
06 Apr 2014, 10:24 |
|
revolution 06 Apr 2014, 10:26
In that case see the file SYSTEM.INC in the windows fasm version. You will see how invoke is used to work with files.
|
|||
06 Apr 2014, 10:26 |
|
SeryZone 06 Apr 2014, 10:47
revolution wrote: In that case see the file SYSTEM.INC in the windows fasm version. You will see how invoke is used to work with files. Okay, here from SYSTEM.inc Code: read: mov ebp,ecx push 0 push bytes_count push ecx push edx push ebx call [ReadFile] or eax,eax jz file_error cmp ebp,[bytes_count] jne file_error clc ret close: push ebx call [CloseHandle] ret lseek: movzx eax,al push eax push 0 push edx push ebx call [SetFilePointer] ret |
|||
06 Apr 2014, 10:47 |
|
revolution 06 Apr 2014, 10:54
Yup. That is just a manual version of what invoke does. So now you are good to go.
|
|||
06 Apr 2014, 10:54 |
|
baldr 06 Apr 2014, 13:58
SeryZone,
In short, you'll need to:
Have you determined why the Delphi code works so slow? |
|||
06 Apr 2014, 13:58 |
|
SeryZone 06 Apr 2014, 15:00
revolution wrote: Yup. That is just a manual version of what invoke does. So now you are good to go. How to initialize Openfile dialog (with KFB extension)??? |
|||
06 Apr 2014, 15:00 |
|
baldr 06 Apr 2014, 17:29
SeryZone wrote: How to initialize Openfile dialog (with KFB extension)??? |
|||
06 Apr 2014, 17:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.