It is currently Sat Jan 16, 2021 6:34 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Detect whether PB 5.70 DPi flag is checked
PostPosted: Mon Mar 09, 2020 9:44 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Oct 06, 2006 4:41 am
Posts: 725
Location: Canada
Message to Fred :
Fred wrote:
Just forgotten. Moved to feature request.

So, have you remembered to add the promised constant to PB 5.72 ?

_________________
"That's not a bug..." said the programmer. "...It's a feature! "
"Oh! I see..." replied the blind man.


Top
 Profile  
Reply with quote  
 Post subject: Re: Detect whether PB 5.70 DPi flag is checked
PostPosted: Thu Nov 26, 2020 5:43 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Oct 06, 2006 4:41 am
Posts: 725
Location: Canada
Since PB 5.73 has just been released with still no sign of the promised constant, here is a modified version of the Assembly language code to test whether the DPi_aware option is checked.
I came to this solution after reading carefully (and finally understanding...) the inline assembler entry of the Help file. It really does not get much simpler than the following single Assembly language command :

Code:
EnableASM
Procedure.i DPi_option_checked()
  MOV eax, dword [PB_Compiler_DPIAware]
  ProcedureReturn
EndProcedure
DisableASM

If DPi_option_checked()
  ; do this and that
EndIf

Debug "DPi_option_checked() ? " + DPi_option_checked()
I kept the PB ASM commands pair outside the procedure only for the sake of greater clarity. It would, of course, make better sense inside the procedure.

_________________
"That's not a bug..." said the programmer. "...It's a feature! "
"Oh! I see..." replied the blind man.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 19 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye