This cod is written in asm. I want to convert this code to Pascal
Now I do understand the way the program works. But I don't know the functions I have to use in Pascal I hope someone can help me with this
To keep it simple I want to do it bit by bit
Code: Select all
Check4Data
movlw SSPSTAT ; test op data
movwf FSR
btfss INDF,BF
goto Check4Data
ReadData ; Check data indien bit 0 = 1 Led aan
movf SSPBUF,W ; lees rx buffer
movwf TmpRx ; zet in Tmp
sublw 0x0 ; Test of data == 0 en doe niets
btfsc STATUS,C ; skip if C = 0 Status C = 1 als data = 0
goto Check4Data