mmm i'm not sure of the question but i assume you want a translation from assembly to PICBASIC.
My assembly language is really primitive but i think this can be the solution.
Code:
B_OUT var PORTB.0 ' B_OUT is assign to PORTB.0
B_IN var PORTB.1 ' B_IN is assign to PORTB.1
R_DATEN var BYTE
' ---------------------------------------------
' Btfss R_DATEN,0 ; immediately edition of the
' bsf PORTB,B_OUT ; .. bits #0 of
' btfsc R_DATEN,0 ; .. R daten at
' bcf PORTB,B_OUT ; .. DATA_OUT
' ---------------------------------------------
if R_DATEN.0 = 0 then
B_OUT=1
else
B_OUT=0
endif
' ----------------------------------------
' btfss PORTB,B_IN ; Bit at the entry
' bsf STATUS,C ; .. DATA-IN to the
' btfsc PORTB,B_IN ; .. To
' bcf STATUS,C ; .. shift register into C
' rrf R_DATEN,F ;To daten () negates
' ----------------------------------------
if B_in = 1 then
STATUS.0 = 0
R_DATEN = R_DATEN >> 1
else
STATUS.0 = 1
endif
I'll really appreciate to be corrected by somebody here if i'm not right on that.
Bookmarks