![Intel 8XC196NT Скачать руководство пользователя страница 89](http://html1.mh-extra.com/html/intel/8xc196nt/8xc196nt_user-manual_2072210089.webp)
8XC196NT USER’S MANUAL
4-22
This listing shows the disassembled code:
2080H ;C814 | PUSH WSR
2082H ;B14814 | LDB WSR,#48H
2085H ;44E4E2E0 | ADD E0H,E2H,E4H
2089H ;B21814 | LDB WSR,[SP]
208CH ;65020018 | ADD SP,#02H
2090H ;F0 | RET
2091H ;C814 | PUSH WSR
2093H ;B14814 | LDB WSR,#48H
2096H ;44EAE8E6 | ADD E6H,E8H,EAH
209AH ;B21814 | LDB WSR,[SP]
209DH ;65020018 | ADD SP,#02H
20A1H ;F0 | RET
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.3.3
Windowing and Addressing Modes
Once windowing is enabled, the windowed locations can be accessed both through the window
using direct addressing and through its actual address using indirect or indexed 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 may select a smaller
window that does not cover that location.
When windowing is enabled:
•
a direct instruction that uses an address within the lower register file actually accesses the
window in the upper register file;
•
an indirect or indexed 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 direct and indexed addressing when
using windowing.
PUSHA
; pushes the contents of WSR onto the stack
LDB
WSR, #12H
; select window 12H, a 128-byte block
; The next instruction uses direct addr
ADD
40H, 80H
; mem_word(40H)
←
mem_word(40H) + mem_word(380H)
; The next two instructions use indirect addr
ADD
40H, 80H[0]
; mem_word(40H)
←
mem_word(40H) + mem_word(80H +0)
ADD
40H, 380H[0]
; mem_word(40H)
←
mem_word(40H) + mem_word(380H +0)
POPA
; reloads the previous contents into WSR
Содержание 8XC196NT
Страница 1: ...8XC196NT Microcontroller User s Manual...
Страница 2: ...8XC196NT Microcontroller User s Manual June 1995 Order Number 272317 003...
Страница 22: ...1 Guide to This Manual...
Страница 23: ......
Страница 35: ......
Страница 36: ...2 Architectural Overview...
Страница 37: ......
Страница 49: ......
Страница 50: ...3 Programming Considerations...
Страница 51: ......
Страница 66: ...4 Memory Partitions...
Страница 67: ......
Страница 104: ...5 Standard and PTS Interrupts...
Страница 105: ......
Страница 147: ......
Страница 148: ...6 I O Ports...
Страница 149: ......
Страница 176: ...7 Serial I O SIO Port...
Страница 177: ......
Страница 194: ...8 Synchronous Serial I O SSIO Port...
Страница 195: ......
Страница 211: ......
Страница 212: ...9 Slave Port...
Страница 213: ......
Страница 231: ......
Страница 232: ...10 Event Processor Array EPA...
Страница 233: ......
Страница 270: ...11 Analog to digital Converter...
Страница 271: ......
Страница 291: ......
Страница 292: ...12 Minimum Hardware Considerations...
Страница 293: ......
Страница 306: ...13 Special Operating Modes...
Страница 307: ......
Страница 317: ......
Страница 318: ...14 Interfacing with External Memory...
Страница 319: ......
Страница 362: ...15 Programming the Nonvolatile Memory...
Страница 363: ......
Страница 408: ...A Instruction Set Reference...
Страница 409: ......
Страница 476: ...B Signal Descriptions...
Страница 477: ......
Страница 493: ......
Страница 494: ...C Registers...
Страница 495: ......
Страница 565: ......
Страница 566: ...Glossary...
Страница 567: ......
Страница 580: ...Index...
Страница 581: ......
Страница 597: ......