Keil Logo

IDATA

Variables in this memory class are accessed via registers R0 or R1.

Example for all 8051 variants
?ID?myvars SEGMENT IDATA        ; define a SEGMENT of class IDATA
           RSEG    ?EB?mybits
BUFFER:    DS      100          ; reserve 100 Bytes

?PR?myprog SEGMENT CODE         ; define a segment for program code
           RSEG    ?PR?myprog
           MOV     R0,#BUFFER   ; load the address in R0
           MOV     A,@R0        ; read memory location buffer
           INC     R0           ; increment memory address in R0
           MOV     @R0,A        ; write memory location buffer+1
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.