flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Madis731 11 May 2011, 18:36
I used it like this:
Code: START: mov rax,121 mov rbx,1 mov rcx,drag ; drag is a 256 byte definition by me mov rdx,256 int 0x60 ;###### cmp [drag],0 ; When its 0, nothing has been written to "drop area" je .resume_draw mov rsi,drag ; When something's in it (a filename), make a copy mov rdi,filename mov rcx,32 rep movsq mov [drag],0 ; We clear the first byte to accept more drag&drop .resume_draw: ;######### filename db '/FD/1/3DS/House.3ds',0 drag rb 256 |
|||
![]() |
|
macgub 12 May 2011, 07:06
thx
|
|||
![]() |
|
Ville 12 May 2011, 10:58
Here is an example program which displays the path and filename.
http://www.menuetos.net/drop.asm |
|||
![]() |
|
macgub 13 May 2011, 08:36
So, to read drag'n drop data function 121, subfunction 2 is not needed ?
|
|||
![]() |
|
Ville 13 May 2011, 09:05
Yes thats right, with 121/1 you get the filename and then read the file contents with 58/0.
|
|||
![]() |
|
macgub 13 May 2011, 09:26
OK. I try describe my problem step by step. I run my app in 32 bit mode. At first I switch to 64 bit mode and define d'n d area (function 121, subfunction 1)and switch to 32 bit mode. In main loop I check if something is written to d'n d area (still in 32bit). If yes i try read file from disk. Is that OK ?
The problem is: will my 32 bit app run drag and drop? It is 64 bit feature. |
|||
![]() |
|
Ville 13 May 2011, 10:05
It will work. And you can also define the int 0x60 -call directly from 32 bit mode, as long as 64 bit registers or bits 32-63 aren't used by the syscall.
Code: mov eax , 121 mov ebx , 1 mov ecx , dragndrop mov edx , 100 int 0x60 |
|||
![]() |
|
macgub 13 May 2011, 12:25
OK it works.
![]() Last edited by macgub on 13 May 2018, 09:24; edited 1 time in total |
|||
![]() |
|
Ville 13 May 2011, 17:41
Yes you can. The system call does not make a difference whether the call came from a 32bit or 64bit process.
And good work. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.