Page 1 of 1

Solved [PB 5.11 x86] Doesn't want compile labels in asm

Posted: Sun Jun 02, 2013 10:51 pm
by Savapo
Hello,

Work fine in PB 5.00, but not in PB 5.11.

Code: Select all

Procedure.L TEST()
  
  MOV EAX,1
  
  JMP l_label ; <- error: undefined symbol 'l_label'
  
  MOV EAX,2
  
  label:
  
  PROCEDURERETURN
  
EndProcedure

DEBUG TEST()

Code: Select all

Procedure.L TEST2()
  
  !MOV EAX,1
  
  !JMP l_label_2 ; <- error: undefined symbol 'l_label_2'
  
  !MOV EAX,2
  
  label_2:
  
  PROCEDURERETURN
  
EndProcedure

DEBUG TEST2()
Thank you for watching.

Re: [PB 5.11 x86] Doesn't want compile labels in asm

Posted: Sun Jun 02, 2013 11:08 pm
by Josh
Since Pb 5.10 labels inside of procedures are local. It's all described in the help.

Code: Select all

Procedure.L TEST()
  
  MOV EAX,1
  
  JMP l_test_label
  
  MOV EAX,2
  
  label:
  
  ProcedureReturn
  
EndProcedure

Debug TEST()

Re: [PB 5.11 x86] Doesn't want compile labels in asm

Posted: Mon Jun 03, 2013 12:03 am
by Savapo
Thank you Josh.

I would not have found it without your help.

Re: Solved [PB 5.11 x86] Doesn't want compile labels in asm

Posted: Mon Jun 03, 2013 9:04 pm
by idle
you can also use anonymous labels !@@: with @f or @b forward or back

Code: Select all

   !jne @f
   !mov eax, dword [p_cppobjptr]
   !mov ecx, eax 
   !mov eax,[eax]
   !@@: