Difference between revisions of "Ports Template"

From WikiTI
Jump to: navigation, search
m (Synopsis)
m (edited category stuff)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
'''Note:''' Do not take the information on this template page as actual documentation!
 +
 +
The Ports are named by their number, in hexadecimal. An example is [[83Plus:Ports:00]].
 +
 +
You also must put a variation on the following code into your page to have it categorized:
 +
<nowiki>[[Category:83Plus:Ports:By Address|06 - Flash Memory Paging]]
 +
[[Category:83Plus:Ports:By Name|Flash Memory Paging]]</nowiki>
 +
 +
----
 +
 
== Synopsis ==
 
== Synopsis ==
 
'''Port Number:''' 06h
 
'''Port Number:''' 06h
 +
 +
'''Function:''' Flash Memory Paging
  
 
This port controls what page is swapped into the 4000h to 7FFFh range. ('''DO NOT''' take this template page as real documentation on port 6!)
 
This port controls what page is swapped into the 4000h to 7FFFh range. ('''DO NOT''' take this template page as real documentation on port 6!)
Line 18: Line 30:
 
  <nowiki>push af
 
  <nowiki>push af
 
in a,(6)
 
in a,(6)
ld (oldMemPage),a
+
push af
 
ld a,1
 
ld a,1
 
out (6),a
 
out (6),a
 
; do stuff that needs page 1 swapped in
 
; do stuff that needs page 1 swapped in
ld a,(oldMemPage)
+
pop af
 
out (6),a
 
out (6),a
 
pop af</nowiki>
 
pop af</nowiki>

Latest revision as of 09:22, 28 March 2005

Note: Do not take the information on this template page as actual documentation!

The Ports are named by their number, in hexadecimal. An example is 83Plus:Ports:00.

You also must put a variation on the following code into your page to have it categorized:

[[Category:83Plus:Ports:By Address|06 - Flash Memory Paging]]
[[Category:83Plus:Ports:By Name|Flash Memory Paging]]

Synopsis

Port Number: 06h

Function: Flash Memory Paging

This port controls what page is swapped into the 4000h to 7FFFh range. (DO NOT take this template page as real documentation on port 6!)

Read Values

  • [00h - FFh]: The current port mapped to the memory range 4000h through 7FFFh.

Write Values

  • [00h - FFh]: The new page to swap in to the memory range 4000h through 7FFFh

Note: if you would have bitwise flags for your port, label them "bit X".

Comments

The behavior of this port changes in different memory map modes.

Example

push af
in a,(6)
push af
ld a,1
out (6),a
; do stuff that needs page 1 swapped in
pop af
out (6),a
pop af

Credits and Contributions

  • /dev/urandom: Because of your randomness, this project is possible.