8.04 Interactive Trace and Debug

To be implemented.

Trace

Description:

Enables or disables tracing.

Syntax:

trace {on|off|num} [result|intermediate]

where:

on
switches tracing on
off
switches tracing off
num
number of lines to trace
result
show result.
intermediate
show intermediate results.

Example:

trace on r

trace 10 i

trace r

Implementation Status:

LynPlex Interpreter
Under development.
LynPlexC Compiler
Not implemented. To be considered
LynPlexS Compiler
Not implemented. To be considered

The Rest

Function:

FRE (x) 

Returns system information

Where x:

QB-standard:

 0    free memory
-1    largest block of integers
-2    free stack
-3    largest free block

SB-standard:

-10   total physical memory
-11   used physical memory
-12   free physical memory

Optional-set #1:

-13   shared memory size
-14   buffers
-15   cached
-16   total virtual memory size
-17   used virtual memory
-18   free virtual memory

Optional-set #2:

-40   battery voltage * 1000
-41   battery percent
-42   critical voltage value (*1000)
-43   warning voltage value (*1000)

The optional values will return 0 if they are not supported.

Command:

RTE [info [, ...]]

Creates a Run-Time-Error. The parameters will be displayed on error-line.

Command:

LOGPRINT ... 

PRINT to SB's logfile. The syntax is the same with the PRINT command.

Function: MALLOC(size)

BALLOC(size) 

Allocates a memory block.

* The variable can be freed by using ERASE.

Function:

VADR(var) 

Returns the memory address of the variable's data.

Function:

PEEK[{16|32}] (addr) 

Returns the byte, word or dword at a specified memory address.

Command:

POKE[{16|32}] addr, value 

Writes a specified byte, word or dword at a specified memory address.

Command:

USRCALL addr 

Transfers control to an assembly language subroutine.

The USRCALL is equal to:

void (*f)(void);
f = (void (*)(void)) addr;
f();

Command:

BCOPY src_addr, dst_addr, length 

Copies a memory block from 'src_addr' to 'dst_addr'

Command:

BLOAD filename[, address] 

Loads a specified memory image file into memory.

Command:

BSAVE filename, address, length 

Copies a specified portion of memory to a specified file.

Command:

STKDUMP 

Displays the SB's internal executor's stack

* For debug purposes; it is not supported on “limited” OSes.


lynplex/lp0804.txt · Last modified: 2012/09/08 15:15 (external edit)