Back to main

 

Function 63 - work with fixing Board

 

A debug Board is a system buffer (4096 bytes) into which any program can write (generally speaking, arbitrary) data and from which another program can read that data.

There is a Convention that writes data are text strings that are interpreted as debug messages about the progress of the program. The kernel also writes some function execution information to the debug Board in certain situations; by Convention, kernel messages begin with the prefix "K : ".

To view the debug Board, you have created a board application that reads data from the buffer and displays it in its window. board understands the sequence of codes 13,10 as a transition to a new line. A character with zero code at the end of the line is not required, but it does not interfere. With the advent of the debugger, the value of the debug Board has decreased slightly, because the debugger allows you to fully control the progress

the implementation of the programme does not require any effort on the part of the programme itself. However, in many cases, the debug Board continues to be useful.

 

Write byte

 

Options:

 eax = 63 - function number

  ebx = 1 - subfunction number

  cl = data byte

 

Return value: the function does not return a value

 

Comments:

  The byte is written to the buffer. The buffer length is 512 bytes. When the buffer overflows, all the data is lost and the fill starts again from zero.

  This function, called in a loop, is enough to output more complex objects (strings, numbers) to the debug Board. Instead of writing the code manually, you can use the debug file.inc, included in the distribution.

 

Read byte

 

Takes a byte from the buffer.

Options: 

  eax = 63 - function number

  ebx = 2 - subfunction number

 

Returned value:

  eax = ebx = 0 - buffer is empty

  eax = byte, ebx = 1 - byte successfully read

 

Constants for registers:

  eax - SF_BOARD (63)

  ebx - SSF_DEBUG_WRITE (1), SSF_DEBUG_READ (2)