Quick Question

Bare metal programming in PureBasic, for experienced users
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

Quick Question

Post by chris319 »

This code used to work. Now I am getting "undefined symbol" errors: What am I doing wrong?

Code: Select all

CMP cx,0
JGE l_pos_1
NEG cx
pos_1: CMP cx,leftVol
User avatar
idle
Always Here
Always Here
Posts: 5043
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Quick Question

Post by idle »

does this work?

Code: Select all

CMP cx,0
JGE @pos_1
NEG cx
!@pos_1: 
CMP cx,leftVol
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Quick Question

Post by luis »

chris319 wrote:This code used to work
This must be a snippet from something bigger or I don't see how it could have ever worked.
Where is leftVol ?
Now I am getting "undefined symbol" errors
"Undefined symbol" should be followed by the symbol name. Just look around for it.
Maybe "leftVol" in this case ?

PS: nice subject :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

Re: Quick Question

Post by chris319 »

If it once worked then LeftVol must be part of some code of which this is a snippet, abridged for posing the question here on the PB board.

You guessed correctly. Idle had the solution.
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Quick Question

Post by luis »

chris319 wrote:If it once worked then LeftVol must be part of some code of which this is a snippet.
In a perfect world must, here should. Maybe. Hope you understand.

Props to idle then :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
Post Reply