Difference between revisions of "GetSetupSetting"

From WikiPrizm
Jump to navigationJump to search
(Added warning about the lack of bounds checking.)
m
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
 
| parameters = * '''SystemParameterNo''' - index of the setting to retrieve.
 
| parameters = * '''SystemParameterNo''' - index of the setting to retrieve.
 
| returns = The value of the setup setting specified on '''SystemParameterNo'''.
 
| returns = The value of the setup setting specified on '''SystemParameterNo'''.
| comments = This function does no bounds checking meaning that with an incorrect value of SystemParameterNo you may accidently overwrite a byte that does not pertain to setup settings. Here is a disassembly of it for your reference.
 
<nowiki>GetSetupSetting:
 
mov.l  #SetupSettingsBytes, r2
 
mov    r4, r0
 
mov.l  @r2, r6
 
rts
 
mov.b  @(r0,r6), r0
 
! End of function GetSetupSetting
 
</nowiki>
 
 
}}
 
}}

Latest revision as of 22:00, 14 February 2015


Synopsis

Header: fxcg/system.h
Syscall index: 0x0031
Function signature: unsigned char GetSetupSetting(unsigned int SystemParameterNo)

Gets a Setup setting.

Parameters

  • SystemParameterNo - index of the setting to retrieve.

Returns

The value of the setup setting specified on SystemParameterNo.