forth: Pretty-print MMU translations property
[openbios/afaerber.git] / drivers / sbus.fs
blob409443bd6c5d2a963223c80de4f21ff1719e4315
1 \ -------------------------------------------------------------------------
2 \ SBus encode/decode unit
3 \ -------------------------------------------------------------------------
5 : decode-unit-sbus ( str len -- id lun )
6 ascii , left-split
7 ( addr-R len-R addr-L len-L )
8 parse-hex
9 -rot parse-hex
10 swap
13 : encode-unit-sbus ( id lun -- str len)
14 swap
15 pocket tohexstr
16 " ," pocket tmpstrcat >r
17 rot pocket tohexstr r> tmpstrcat drop