.function reldist(val1,val2) { .return val1-val2 } :BasicUpstart2(Main) .pc = $1000 "Main" Main: .print reldist(Main,BranchTo) nop BranchTo: rts
Output pass -1
.pseudocommand bra val1:val2 { .if(val1.getValue()<val2.getValue()) { .print "abc" } } :BasicUpstart2(Main) .pc = $1000 "Main" Main: bra reldist(Main,BranchTo) nop BranchTo: rts
flex pass 1 //----------------------------------------------------- .pseudocommand bra val1:val2 { .if(val1.getValue()<val2.getValue()) { ^ Error: The condition must be able to evaluate in first parse at line 6, column 3 in Testing.asm called at line 20, column 2 in Testing.asm
label1: .if (label1 < label2) .print "abc" label2:
label1: label2: .if (label1 < label2) .print "abc"
bne *+3
It would of course be very nice if it was possible - but i guess the assembler could end up doing infinite number of passes, in some cases, if some labels never stabilized but kept changing their value in every pass, for example due to multiple .if-statements working against eachother...