We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am having some difficulty with using the Keil A51 assembler. My 8051 derivative processor has 256 bytes of internal RAM. I have my code organized with a...
BSEG AT 0 BIT1 DBIT 1 BIT2 DBIT 1 BIT3 DBIT 1 ... ... BIT8 DBIT 1
DSEG AT 021H VAR1: DS 1 VAR2: DS 1 ... ... VARn: DS 1 ; BUF1: DS 32 BUF2: DS 26 BUF4: DS 16 BUF5: DS 16 STACK: DS 16 _RAM_TOP: DS 0
MOV R0, #BUF3 MOV @R0, A
Of course, if you have xdata then you do get 256 bytes of pdata space that is accessed just as quickly as idata. Given that idata is such a valuable resource (e.g. it is needed for stack space) I would always go for pdata in preference to idata where it is available.