??? 10/07/08 07:08 Read: times Msg Score: +2 +2 Good Answer/Helpful |
#158890 - OK I was too quick... Responding to: ???'s previous message |
DATA directive are used for the SFRs, rather than EQUs. Sorry.
Make a copy of MOD52 file which came with the assembler, and look into it MOD52 said:
; REV. 1.2 JAN 15, 1988 P0 DATA 080H ;PORT 0 SP DATA 081H ;STACK POINTER DPL DATA 082H ;DATA POINTER - LOW BYTE [... etc.] The first line is comment only - everything after a semicolon is comment. The second line says to the assembler (roughly): "each time you come across a "P0" in the asm source, replace it with 080h". Now take the AT89S8253 datasheet and go to the table of SFRs (in rev.K of the datasheet, it is on page 7). You will find some of SFRs are not in that file. For example, SPDR, which is on address 86h. So you add the following line: the added line said:
SPDR DATA 086H ;SPI data register Of course, if you don't intend to use any of the "extra" SFRs of 'S8253, only those which are present in the standard '52, you can use MOD52 without any changes. Even if you want to use those "extra" SFRs, you don't need to create an extra MODxxx file - you can do with MOD52 AND define those "extra" SFRs directly in your asm source file, in the very same way as you would do in a MODxxx file - using DATA directives. The point in using the MODxxx file is, that that file needs to be created only once, and then can be (re)used for all projects involving the 'S8253. JW |
Topic | Author | Date |
Metalink's no $MOD53 | 01/01/70 00:00 | |
that's just a header file... | 01/01/70 00:00 | |
That didn\'t work for me... | 01/01/70 00:00 | |
EQU's for SFR's? | 01/01/70 00:00 | |
OK I was too quick... | 01/01/70 00:00 | |
Great explanation!![]() | 01/01/70 00:00 |