flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
SeryZone
How to load file on this forum???
|
|||
![]() |
|
revolution
Isn't there a Delphi reference that shows how to open, read, write and close files?
|
|||
![]() |
|
SeryZone
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. |
|||
![]() |
|
revolution
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. |
|||
![]() |
|
SeryZone
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 |
|||
![]() |
|
revolution
SeryZone wrote: Format is MS COFF |
|||
![]() |
|
SeryZone
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... |
|||
![]() |
|
revolution
In that case see the file SYSTEM.INC in the windows fasm version. You will see how invoke is used to work with files.
|
|||
![]() |
|
SeryZone
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 |
|||
![]() |
|
revolution
Yup. That is just a manual version of what invoke does. So now you are good to go.
|
|||
![]() |
|
baldr
SeryZone,
In short, you'll need to:
Have you determined why the Delphi code works so slow? |
|||
![]() |
|
SeryZone
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)??? |
|||
![]() |
|
baldr
SeryZone wrote: How to initialize Openfile dialog (with KFB extension)??? |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.