INFO - FAQ - CC2-Forum - CCPro-Forum |
|
> > hallo > > i have a smal problem > in my program i want to split 1 BYTE in 2 X 4 BITS > so that I get for example this > : > #First 'first part of BYTE1 > > IF BYTE1=0 THEN GOTO.... > IF BYTE1=1 THEN GOTO ..... > ect. > IF BYTE1=15 THEN ... > > IF BYTE1=>16 THEN GOTO Second ELSE RETURN > > #Second 'Second part of BYTE1 > IF BYTE1=0 THEN GOTO....... > IF BYTE1=1 THEN GOTO... > ect. > IF BYTE1=15 THEN GOTO.... > > I hope that I have explained it well, > and that someone can help me so that i can go on with it > > greetings > hans define resultat Byte define mask &B00001111 'Maskierungsbyte Resultat = byte1 and mask (low) ' 01010111 and 00001111 = 00000111 Byte1 = byte1 shr 4 ' 00000101 Resultat = byte1 and mask (high) '00000101 and 00001111 = 00000101 Gruß Eckhard |
Antwort schreiben |