dun worry i found a way to do it already.
process1
btfsc RESULT,7 ; skip next instruction if MSB is 0
retlw 0x2F ; return with instruction to move forward with speed 10
btfsc RESULT,6 ; skip next instruction if bit is 0
retlw 0x2B ; return with instruction to move forward with speed 6
btfsc RESULT,5 ; skip next instruction if bit is 0
retlw 0x28 ; return with instruction to move forward with speed 3
btfsc RESULT,4 ; skip next instruction if bit is 0
retlw 0x30 ; return with instruction to brake
btfsc RESULT,3 ; skip next instruction if bit is 0
retlw 0x30 ; return with instruction to brake
btfsc RESULT,2 ; skip next instruction if bit is 0
retlw 0x3A ; return with instruction to reverse with speed 5
retlw 0x3A ; return with instruction to reverse with speed 5
When i turn the pot to one side, it will go forward with full speed. Then when i turn to the other side, it will reverse.