Posted Thu Mar 20, 2008 1:44 PM
Posted Thu Mar 20, 2008 2:24 PM
Open Source Pong, on Thu Mar 20, 2008 2:44 PM, said:
LDA x CMP #4 beq .20But with smartbranching on, it compiles to:
LDA x CMP #4 if ((* - .20) < 127) && ((* - .20) > -128) BEQ .20 else bne .1skip20 jmp .20 .1skip20 endifIf you don't even intend to look at the assembly code, you can leave smartbranching on and never worry about where to use "then goto."
Posted Thu Mar 20, 2008 3:41 PM
Posted Thu Mar 20, 2008 3:53 PM
Open Source Pong, on Thu Mar 20, 2008 4:41 PM, said:
Posted Thu Mar 20, 2008 4:06 PM
batari, on Thu Mar 20, 2008 5:53 PM, said:
Posted Thu Mar 20, 2008 4:15 PM
Edited by Open Source Pong, Thu Mar 20, 2008 4:22 PM.
Posted Thu Mar 20, 2008 4:27 PM
Open Source Pong, on Thu Mar 20, 2008 5:15 PM, said:
Posted Thu Mar 20, 2008 4:30 PM
Open Source Pong, on Thu Mar 20, 2008 6:15 PM, said:
IFCONST do_it_this_way LDA #1 STA some_RAM_location ELSE LDA #2 STA some_RAM_location ENDIFIf you use the variable name "do_it_this_way" somewhere in your program, then DASM will compile your code with the first version-- otherwise, it will compile your code with the second version. Either way, you only get one version, not both. The "extra code" doesn't make its way into the final binary, but it does affect what the final binary will have in it.
0 members, 1 guests, 0 anonymous users