It's a nice idea, but there is no "assembler" and the low-level concept as understood by assembler programmers that a label is just a program/data address doesn't really apply in PICAXE Basic due to the way the "compiler" produces byte packed run time interpreted code.We should be able to use the "assembler" to calculate offsets.
#picaxe 28x1
'Scratchpad/Table
Symbol spStartOfData = 42 'Start of data series
Symbol spBytesPerRecord = 7 'Allows for stepping through table
'Offsets within local record of pole data
Symbol spPoleIDOffset = 0 '1 byte: Pole board ID
Symbol spModeOffset = 1 '1 byte: Mode of the controller
Symbol spPoleStatusOffset = 2 '1 byte: Status of the pole
Symbol spReqdPosnOffset = 3 '&4 2 bytes: Required Position
Symbol spActualPosnOffset = 5 '&6 2 bytes: Actual Position
'Constants
Symbol False = 0
Symbol True = 1
'Variables
Symbol tNotFound = bit7 'in b0
Symbol bRecordNum = b9
Symbol bSearchVal = b10
Symbol wActualPosn = w8
Symbol wActualPosn.Lo = b16
Symbol wActualPosn.Hi = b17
Symbol bStatus = b7
'
'** Get the Pole Status of the 3rd record
bRecordNum = 2 'First record is 0
ptr = bRecordNum * spBytesPerRecord + spStartOfData + spPoleStatusOffset
bStatus = @ptr
'
'** Find next free location
bRecordNum = 0 'Initialise
tNotFound = True
ptr = spStartOfData + spPoleIDOffset'(Offset is optional here)
Do Until @ptr = 0 'Test for end-of-table (ID=0)
ptr = ptr + spBytesPerRecord
Inc bRecordNum
Loop
'
'** Get the actual position of pole ID #5
bSearchVal = 5 'Search for this record number
bRecordNum = 0 'Initialise
tNotFound = True
ptr = spStartOfData + spPoleIDOffset'(Offset is optional here)
Do Until @ptr = 0 'Test for end-of-table (ID=0)
If @ptr = bSearchVal Then
tNotFound = False 'Have the record
ptr = ptr + spActualPosnOffset 'Get the position offset
wActualPosn.Lo = @ptrInc 'Get the position
wActualPosn.Hi = @ptr ' (word value)
Exit
EndIf
ptr = ptr + spBytesPerRecord
Inc bRecordNum
Loop