Accessing Registers without the 'reg' Prefix
Anonymous
Not applicable
Mar 27, 2011
05:45 AM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Mar 27, 2011
05:45 AM
Question: What happens when I write an assembly code to access a register without the "reg" keyword, for example, "mov A, [PRT1DR]". Does the assembler generate an error for this?
Answer:
No. The assembler does not generate an error or warning if a register is accessed without the "reg" keyword. The register name defined in the m8c.inc file is only an address equate. So, if the assembler comes across an instruction with a register name, but without the "reg" keyword, it replaces the register name with the address of the register and the CPU will perform a RAM access instead of register access.
Labels
- Tags:
- psoca 1
Rate this article:
Contributors
-
This widget could not be displayed.Anonymous