Windowing And Addressing Modes - Intel 8XC196MC User Manual

Table of Contents

Advertisement

The C compiler can also take advantage of this feature if the "windows" switch is enabled. For
details, see the MCS 96 microcontroller architecture software products in the Development Tools
Handbook.
4.2.3

Windowing and Addressing Modes

Once windowing is enabled, the windowed locations can be accessed both through the window
using direct (8-bit) addressing and by the usual 16-bit addressing. The lower register file locations
that are covered by the window are always accessible by indirect or indexed operations. To re-
enable direct access to the entire lower register file, clear the WSR. To enable direct access to a
particular location in the lower register file, you can select a smaller window that does not cover
that location.
When windowing is enabled:
a register-direct instruction that uses an address within the lower register file actually
accesses the window in the upper register file;
an indirect, indexed, or zero-register instruction that uses an address within either the lower
register file or the upper register file accesses the actual location in memory.
The following sample code illustrates the difference between register-direct and indexed address-
ing when using windowing.
PUSHA
LDB
WSR, #12H
ADD
40H, 80H
ADD
40H, 80H[0]
ADD
40H, 380H[0]
POPA
; pushes the contents of WSR onto the stack
; select window 12H, a 128-byte block
; The next instruction uses register-direct addr
; mem_word(40H)←mem_word(40H) + mem_word(380H)
; The next two instructions use indirect addr
; mem_word(40H)←mem_word(40H) + mem_word(80H +0)
; mem_word(40H)←mem_word(40H) + mem_word(380H +0)
; reloads the previous contents into WSR
Get other manuals https://www.bkmanuals.com
MEMORY PARTITIONS
4-19

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc196md8xc196mh

Table of Contents