|
PowerBASIC Forums
![]() PowerBASIC for Windows
![]() BIT Question Part 2 - PB Compiler output
|
| next newest topic | next oldest topic |
| Author | Topic: BIT Question Part 2 - PB Compiler output |
|
Lothar Pink Member |
If I compile & run the following code:
It compiles to
At 004017B3:
At 004017CB:
Why not just use "bts" ? I don't want to complain about the performance Best Regards ------------------
[This message has been edited by Lothar Pink (edited March 03, 2004).] IP: Logged |
|
Michael Mattias Member |
Why not 'bts'?, well, Why not..
I do not know what 'bts' does, but maybe it has something to do with the fact that the BIT SET function will set bits beyond the nominal range of the operand? Or maybe 'bts' requires a certain minimum processor type? [This message has been edited by Michael Mattias (edited March 03, 2004).] IP: Logged |
|
Lothar Pink Member |
I don't know about the processor compatibility, but BTS - as far as I know - allows to set a bit at ANY position in memory, as long as it's in the process memory. So, it's a single statement - instead of two CALLs here. PS: The reason I'm asking is actually if there is some reason why I should NOT use the BTS ------------------ [This message has been edited by Lothar Pink (edited March 03, 2004).] IP: Logged |
|
Paul Dixon Member |
Lothar, <<! mov [eax], eax ; I always use that in order to trigger a GPF so I can view the disassembly>> That's what "!int 3" is for. It calls the current debugger. The Bit set ASM opcodes have existed since the 386 so I don't see why they aren't used. They can set any bit but only 2^32 BITS are addressable within a single instruction (i.e.1/8th of the total RAM that is addressable). Paul. IP: Logged |
|
Marco Pontello Member |
See this for a quick way to look at the compiler output for some lines of PowerBASIC code: http://www.powerbasic.com/support/forums/Forum7/HTML/002258.html Bye! ------------------ IP: Logged |
All times are EasternTime (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1999-2007 PowerBASIC, Inc. All Rights Reserved.