Keil Logo Arm Logo

Ax51 User's Guide

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

Keil logo

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.