flat assembler
Message board for the users of flat assembler.

flat assembler > MenuetOS > Drag and drop.

Author
Thread Post new topic Reply to topic
macgub



Joined: 11 Jan 2006
Posts: 205
Location: Poland
I want do drag'n drop support in my app. So I have questions:
Code:
121 - Drag'n drop In : rbx - 1 - Define Drag'n drop area rcx - Pointer to area rdx - Size of area

Pointer to wich area? I don't understand this. Size in pixels or in bytes? If I want define program window as d'n d area how can I do this? Maybye someone could give me simply example for d'n d Question Thanks a lot.
Post 10 May 2011, 09:22
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia
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
Post 11 May 2011, 18:36
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 205
Location: Poland
thx
Post 12 May 2011, 07:06
View user's profile Send private message Visit poster's website Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 205
Here is an example program which displays the path and filename.
http://www.menuetos.net/drop.asm
Post 12 May 2011, 10:58
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 205
Location: Poland
So, to read drag'n drop data function 121, subfunction 2 is not needed ?
Post 13 May 2011, 08:36
View user's profile Send private message Visit poster's website Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 205
Yes thats right, with 121/1 you get the filename and then read the file contents with 58/0.
Post 13 May 2011, 09:05
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 205
Location: Poland
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.
Post 13 May 2011, 09:26
View user's profile Send private message Visit poster's website Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 205
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
Post 13 May 2011, 10:05
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 205
Location: Poland
OK it works. Very Happy (Check www.macgub.vxm.pl for new release) Can I also call M64 memory managing functions from 32 bit mode ?


Last edited by macgub on 13 May 2018, 09:24; edited 1 time in total
Post 13 May 2011, 12:25
View user's profile Send private message Visit poster's website Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 205
Yes you can. The system call does not make a difference whether the call came from a 32bit or 64bit process.
And good work. Smile I'll include the 3ds viewer to next release.
Post 13 May 2011, 17:41
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 can attach files in this forum
You can download files in this forum


Copyright © 2004-2018, Tomasz Grysztar.

Powered by rwasa.