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

Just starting out? Need help? Post your questions and find answers here.
Savapo
New User
New User
Posts: 8
Joined: Sun Jun 02, 2013 1:55 am

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

Post 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.
Last edited by Savapo on Mon Jun 03, 2013 12:03 am, edited 1 time in total.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

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

Post 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()
sorry for my bad english
Savapo
New User
New User
Posts: 8
Joined: Sun Jun 02, 2013 1:55 am

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

Post by Savapo »

Thank you Josh.

I would not have found it without your help.
User avatar
idle
Always Here
Always Here
Posts: 6023
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

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

Post 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]
   !@@:
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply