General guidelinesApplications are assembled separately from the OS, with origin in address 3000H.
 
 
You must include the header file LCCP.H which contains declaration needed to access LCCP resources. If working with virtual or real tape devices, you must also include VT.H.
 
 
LCCP services are accessed using the instruction RST 08H, as following:
 
 
    ld  a, service-number
 
    ld  b, function-number
 
    rst 08H
 
 
Correct service-numbers and function-numbers are declared in LCCP.H.
 
 
Required parameters (service/function dependent) must be passed in the Stack according to a well defined "arguments frame".
 
 
To access peripherals, use the DEVMAN service. You will need to build a request struct (REQ) in application's area and pass a pointer in the arguments frame.
 
 
For error handling, use the following macros:
 
 
    SETERR (error-code) ; Report error and continue
 
    PANIC  (error-code) ; Report error and halt
 
    GETERR              ; Return current error in register A
 
    CLRERR              ; Clear error
 
 
error-codes are 8-bit numbers. Some are defined in LCCP.H. You can add your own application-specific error codes if necessary.
 
 
Never include the file UTILS.ASM, intended for LCCP internal use, because references to addresses  in that code are subject to change as LCCP grows. Similarly, never read or write the ERRORCODE variable directly; by doing that you would bypass LCCP functionality regarding error handling.
 
  |