| ??? 09/02/03 10:39 Read: times |
#53860 - RE: array in asm51 Responding to: ???'s previous message |
Hi,
You should understand that if you work with ASM then you must use only valid commands and macros allowed with your compiler. Now, there is no MOV B.(X),C command. it depends on compiler; I think it will be assembled into MOV B.0,C command and INC X will not have an effect then. To your purposes I suggest you: SETB P0.1 ; set pin as input one MOV A,#0x80 ; hold place of the result LOOP: MOV C,P0.1 ; read bit RRC A ; keep bit JNC LOOP ; do 8 itterations ; here Accumulator contains 8 bits read from P0.1 Do not forget to use external pull-up resistor for pin of the port 0. Btw, I do not understand why do you ask about array? Anyway, an array may be done: BYTE_ARRAY: DB 0x00,0x01,0x02 WORD_ARRAY: DW 0x0000,0x0001,0x0002 Good days! |
| Topic | Author | Date |
| array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 |



