Hi
I need help understanding this program or try to answer my question I left as comments
I need help understanding this program or try to answer my question I left as comments
Code:
ORG 0 ; ROM locations starts from 0000H
MOV DPTR, #300H ; DPTR is a pointer starting from 300H ( why choose this adress ? 300h)
MOV A, #0FFH ; Make P1 as an INPUT why choose #0ffh ?
MOV P1, A ;
Back: MOV A, P1 ; get x from P1
MOVC A, @A+DPTR ; get x2
MOV P2, A
SJMP Back
ORG 300H
Table: DB 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 ;where do these values come from were they chosen arbitrary
END