Asm in PBDLL60 
Author Message
 Asm in PBDLL60

What is wrong with this snippet?

FUNCTION Test AS LONG
   !  OR  EAX,EAX
   !  Jz  BailOut
   !  Mov EAX,&HFFFF
   !BailOut:
END FUNCTION

I get an error; "Variable must be declared" on the Jz line.

Also, the above snippet doesn't illustrate this but what is required in the way
of stack cleanup when passing parameters to an assembler function.

Thanks.



Fri, 26 Apr 2002 03:00:00 GMT  
 Asm in PBDLL60
Bailout should be a Basic label i guess, not !...

FUNCTION Test AS LONG
   !  OR  EAX,EAX
   !  Jz  BailOut
   !  Mov EAX,&HFFFF

BailOut:

END FUNCTION

Quote:

>What is wrong with this snippet?

>FUNCTION Test AS LONG
>   !  OR  EAX,EAX
>   !  Jz  BailOut
>   !  Mov EAX,&HFFFF
>   !BailOut:
>END FUNCTION

>I get an error; "Variable must be declared" on the Jz line.

>Also, the above snippet doesn't illustrate this but what is required in the
way
>of stack cleanup when passing parameters to an assembler function.

>Thanks.



Fri, 26 Apr 2002 03:00:00 GMT  
 Asm in PBDLL60

Quote:
> Bailout should be a Basic label i guess, not !...

Thanks, that's it!  I would never have guessed.


Fri, 26 Apr 2002 03:00:00 GMT  
 Asm in PBDLL60
But,... what's your name? (account)
Quote:

>> Bailout should be a Basic label i guess, not !...

>Thanks, that's it!  I would never have guessed.



Fri, 26 Apr 2002 03:00:00 GMT  
 Asm in PBDLL60

Quote:
> Also, the above snippet doesn't illustrate this but what is required in
> the way
> of stack cleanup when passing parameters to an assembler function.

powerbasic takes care of setting up and cleaning up the stack. You
don't need to do anything special in your asm function. Do be careful
not to RET, though-- PB does need to do its work.


Sat, 27 Apr 2002 03:00:00 GMT  
 Asm in PBDLL60

Quote:
> PowerBASIC takes care of setting up and cleaning up the stack. You
> don't need to do anything special in your asm function. Do be careful
> not to RET, though-- PB does need to do its work.

Will do, thanks.


Sat, 27 Apr 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. dumb terminal program needed for PBDLL60

2. NT Service in PBDLL60

3. FTP client in PBDLL60

4. Translator ibm370-asm to hp-pa-asm

5. Translator ibm370-asm to hp-pa-asm

6. Is ASM ASM?

7. High Level ASM and Low Level ASM

8. Win32 asm/Linux asm newsgroups?

9. Converting 68k Asm to x86 asm

10. RFD: alt.lang.asm.68k, alt.lang.asm.x86, alt.lang

11. Problem: Receive.asm Transmit.asm

12. GCC inline ASM -- calling C functions from __asm__

 

 
Powered by phpBB® Forum Software