Difference between revisions of "Setpagea"

From Spectrum
Jump to navigation Jump to search
(New page: '''setpagea (HLCALL 0x3E33)''' - set memory page in paging area A '''setpageb (HLCALL 0x3E36)''' - set memory page in paging area B == Synopsis == ''Assembly language'' ld a, page...)
 
 
Line 28: Line 28:
The Spectranet memory map is shown in the following diagram. The number before the colon is the page number.
The Spectranet memory map is shown in the following diagram. The number before the colon is the page number.


[[Image:Address-space.png|thumb|center|800px|'''KEY''' Red = flash ROM, Yellow = W5100, Cyan = RAM]]
[[Image:Address-space.png|thumb|center|800px|'''KEY''' Red = flash ROM, Yellow = W5100, Cyan = RAM, Grey = No hardware]]


== Return values ==
== Return values ==

Latest revision as of 17:17, 31 August 2008

setpagea (HLCALL 0x3E33) - set memory page in paging area A

setpageb (HLCALL 0x3E36) - set memory page in paging area B

Synopsis

Assembly language

    ld a, page
    call SETPAGEA

    ld a, page
    call SETPAGEB

C

    #include <spectranet.h>

    void setpagea(unsigned char page);
    void setpageb(unsigned char page);

Description

The setpagea() and setpageb() functions select which page of memory occupies address space between 0x1000-0x1FFF and 0x2000-0x2FFF respectively.

The C library does not use the HLCALL pagein/pageout mechanism; the Spectranet ROM must already be paged in by the pagein() call. Generally, it does not make sense to manipulate the paged areas from outside code that is already manipulating data in this area.

The Spectranet memory map is shown in the following diagram. The number before the colon is the page number.

KEY Red = flash ROM, Yellow = W5100, Cyan = RAM, Grey = No hardware

Return values

None.