Functions for System Memory

Type

Format

Description

Function

GetSysMem(System Memory Address)

Returns the system memory value.

Function

GetSysMemString(Target system memory offset, Number of Word)

Converts ASCII code in the system memory into the string value.

Subroutine

SetSysMem(System Memory Address, Set Value)

Sets the system memory value.

Subroutine

SetSysMemString(Target system memory offset, Source string tag, Number of word)

Converts the string value into ASCII code and stores it in the system memory.

Subroutine

SysMemFill(System Memory Address, Data, Number of Data)

Fills the block of system memory with the assigned value.

Subroutine

SysMemMove(Current Address, Target Address, Number of Data)

Moves the data block in the system memory.

GetSysMem

Returns the system memory value.

Function

n=GetSysMem(System Memory Address)

Description

Returns the value assigned to System Memory Address.

Example

Stores the System Memory 100’s value to the variable VAL.
VAR VAL;

VAL=GetSysMem(100);

GetSysMemString

Converts ASCII code in the system memory into the string value.

Function

n=GetSysMemString(Target system memory offset, Number of Word)

Description

Converts ASCII code in the system memory into the string value.

Example

Reads 20 characters from system memory offset 0.
VAR STR;

STR=GetSysMemString(0, 20);

SetSysMem

Sets the system memory value.

Subroutine

SetSysMem(System Memory Address, Set Value)

Description

Sets the value to the assigned System Memory Address.

Example

Sets 1234 to the System Memory 100.
SetSysMem(100, 1234);

SetSysMemString

Converts the string value into ASCII code and stores it in the system memory.

Subroutine

SetSysMemString(Target system memory offset, Source string tag, Number of word)

Description

Converts the string value into ASCII code and stores it in the system memory.

Example

Writes 5 characters in “Hello” to the system memory offset 0.

SetSysMemString(0, “Hello”, 5);

SysMemFill

Fills the block of system memory with the assigned value.

Subroutine

SysMemFill(System Memory Address, Data, Number of Data)

Description

Fills the assigned number of memories starting from System Memory Address, with the Data.

Example

Fills the value 1234 to the 10 memories starting from System Memory 100.
SysMemFill(100, 1234, 10);

SysMemMove

Moves the data block to another location within the system memory.

Subroutine

SysMemMove(Current Address, Target Address, Number of Data)

Description

Moves the block of system memories starting from the Current Address to the Target Address.

If the memories overlap, the overlapped area will maintain the existing data.

Example

Moves the 10 memories from address 100 to address 200. (Data from 100~109 moved to 200~209)
SysMemMove(100, 200, 10);