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
I solved my problem. I guess the biggest difficulty came from trying to use the type of absolute segment declaration I was using. I went to relocatable segments as shown below and let the linker decide where to put things. Now all is better!!
BITS_SEG SEGMENT BIT DATA_SEG SEGMENT DATA BUFF_SEG SEGMENT IDATA CODE_SEG SEGMENT CODE RSEG BITS_SEG BIT1: DBIT 1 BIT2: DBIT 1 BIT3: DBIT 1 ... ... BITn: DBIT 1 ; RSEG DATA_SEG VAR1: DS 1 VAR2: DS 1 ... ... VARn: DS 1 ; RSEG BUFF_SEG BUF1: DS 32 BUF2: DS 26 BUF3: DS 16 ... ... BUFn: DS 16 STACK: DS 16