TABLE OF CONTENTS
/Debug [ Modules ]
DESCRIPTION
Functions used to Debug the operating system and its tasks.
Debug/Os_debug_stack_direction [ Constants ]
[ Top ] [ Debug ] [ Constants ]
DESCRIPTION
direction where the stack is growing
DECLARATION
Const Os_debug_stack_downward = 0 Const Os_debug_stack_upward = 1
Debug/Os_debug_stack_check [ Functions ]
[ Top ] [ Debug ] [ Functions ]
DESCRIPTION
calculates the unused stack space
DECLARATION
Function Os_debug_stack_check(byval Stackstart As Word , Byval Stacksize As Word , Byval Direction As Byte) As Byte
SEE ALSO
Debug/Os_debug_stack_prepare
SOURCE
Local Stackend As Word Local Debugcounter As Byte Local Stackcounter As Byte If Direction = Os_debug_stack_downward Then Stackend = Stackstart - Stacksize Else Stackend = Stackstart + Stacksize End Sub For Debugcounter = 255 To 0 Step -1 Stackcounter = Inp(stackend) If Stackcounter <> Debugcounter Then Exit For If Stackend = Stackstart Then Exit For If Direction = 0 Then Incr Stackend Else Decr Stackend End If Next Debugcounter = 255 - Debugcounter Os_debug_check_stack = Debugcounter End Function
Debug/Os_debug_stack_prepare [ Functions ]
[ Top ] [ Debug ] [ Functions ]
DESCRIPTION
Fills a stack with a series of numbers
DECLARATION
Sub Os_debug_stack_prepare(byval Stackstart As Word , Byval Stacksize As Word , Byval Direction As Byte)
SEE ALSO
Debug/Os_debug_stack_check
SOURCE
Local Stackend As Word Local Debugcounter As Byte If Direction = Os_debug_stack_downward Then Stackend = Stackstart - Stacksize Else Stackend = Stackstart + Stacksize End Sub For Debugcounter = 255 To 0 Step -1 Out Stackend , Debugcounter If Stackend = Stackstart Then Exit For If Direction = 0 Then Incr Stackend Else Decr Stackend End If Next End Sub