Difference between revisions of "84PCE:RAM:D01508"
From WikiTI
Line 1: | Line 1: | ||
− | [[Category:84PCE:RAM:By Address| | + | [[Category:84PCE:RAM:By Address|D0053F - tempSP]] [[Category:84PCE:RAM:By Name|tempSP]] |
== Synopsis == | == Synopsis == | ||
− | '''Unofficial Name:''' | + | '''Unofficial Name:''' tempSP |
− | '''Memory Address:''' | + | '''Memory Address:''' D0053Fh |
'''Length:''' 3 bytes | '''Length:''' 3 bytes | ||
− | + | When the OS is checking the stack depth, it uses this region of memory to load hl with sp. For instance: | |
+ | |||
+ | ld (tempSP),sp | ||
+ | ld hl,(tempSP) | ||
+ | |||
+ | It can generally be used as a temporary data location, although it may be written to at some points. | ||
+ | |||
+ | ==Why this is silly== | ||
+ | |||
+ | However, it is simply beyond me why they didn't simply do this, to save a ton of bytes and speed. | ||
+ | |||
+ | or a,a | ||
+ | sbc hl,hl | ||
+ | add hl,sp |
Revision as of 07:28, 26 May 2016
Synopsis
Unofficial Name: tempSP
Memory Address: D0053Fh
Length: 3 bytes
When the OS is checking the stack depth, it uses this region of memory to load hl with sp. For instance:
ld (tempSP),sp ld hl,(tempSP)
It can generally be used as a temporary data location, although it may be written to at some points.
Why this is silly
However, it is simply beyond me why they didn't simply do this, to save a ton of bytes and speed.
or a,a sbc hl,hl add hl,sp