[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon, 19 Apr 2004 23:48:15 +0000 (UTC) 
Subject:Help with assembler 
From:na-list 
Volume-ID: 

Hello,


I haven't been able to devote any time to Poplog for some time. I'm
trying to remember the point where I left it the last time and ask for
help. The question is relevant for Windows version but I think that
the problem is common to all other platforms (X-Window).

At least in Windows, callback is not "re-entrant". I mean that Pop11
code can call external code and this external code can in turn
"callback" Pop11 code. But inside the callback it's not safe to make
system calls that could trigger a new callback. The second callback or
"callback from inside a callback" corrupts the user stack.

This is not a theoretical problem. For a GUI program in Windows this
"reentrancy" is a must. Current implementation seems to have been a
"hack" that requires most of GUI code to be written in C.=20

I tracked the problem to an assembler source file, aextern.s. When
entering external code, some pointer values are stored in global
variables. The second callback overwrites the values saved by the
first one. Obviously the solution is to replace this too simple
storage mechanism with a stack.=20

As far as I can see, this is the only obstacle for reentrancy. Once
solved, it would be easy to write native Windows GUI programs using
Poplog. I think that it could also simplify the interface with
X-Window.

Unfortunately my assembler knowledge is almost forgotten. If there is
someome that knows MASM better, the problem could be fixed in a much
shorter time. Otherwise I will try it by myself.

I had some code to do the tests that I will try to recover in next
days.=20


--
saludos,
 =20
  Nico Arag=F3n

NOTE: na-list address only works for messages coming from lists.
Please, write to "nico" at the same domain for direct email.