IDE Mark section as inline assembly (just as with a comment)
IDE Mark section as inline assembly (just as with a comment)
Wish: A way to select a large block of text and insert a ! at the start of every line.
If I want to test if this code works:
I would have to add an ! in front of every line. (It does work.)
Code: Select all
IntToStr:
; eax = number, ebx = base, edi = buffer
push ecx edx
xor ecx,ecx
.new:
xor edx,edx
div ebx
push edx
inc ecx
test eax,eax
jnz .new
.loop:
pop eax
add al,30h
cmp al,'9'
jng .ok
add al,7
.ok:
stosb
loop .loop
mov al,0
stosb
pop edx ecx
ret
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
No it doesn't.PB wrote:Enabling inline ASM does that, without the need to put ! on each line.
Inline asm has a different syntax because I can directly use variables and pointers as operands.
Inline asm doesn't support local labels (used in the code above).
Inline asm doesn't support the stosb mnemonic.
Inline asm turns all the asm keywords into uppercase (which I don't want).
Inline asm makes it inpossible to use asm keywords as PB variables.
Inline asm messes up the case of all PB variables starting with an asm keyword (like: turning Popsicle into POPsicle, etc...).
Hightlighting is wrong after asm keywords when using inline asm feature instead of !'s. (PB keywords highlighted in asm lines.)
Inline asm highlights asm mnemonics which are also PB keywords as PB keywords. (I.e. XOr edx,edx where XOr looks like a PB keyword.)
@Trond: You certainly do your homework. 
And you know, if you gave some of these reasons in the first place, you could
avoid us giving you "useless" advice and tips, because we don't know your
reasons until you always go ahead and correct us afterwards.

And you know, if you gave some of these reasons in the first place, you could
avoid us giving you "useless" advice and tips, because we don't know your
reasons until you always go ahead and correct us afterwards.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Those two are changed for the next beta.Inline asm messes up the case of all PB variables starting with an asm keyword (like: turning Popsicle into POPsicle, etc...).
Inline asm highlights asm mnemonics which are also PB keywords as PB keywords. (I.e. XOr edx,edx where XOr looks like a PB keyword.)
As for the request. It is probably something that will be used rather rarely,
and i do not want to overload the IDE with features that are rarely used.
You can easily add this functionality through an external tool though, thats
what the tools-interface was created for.
quidquid Latine dictum sit altum videtur