// Free BCPL - PCDOSHDR Header for PC-DOS dependent RTS interface Version 1.5

global  $(          // private globals used by RTS

INITRTS     : 99 // (bot,top)   - initialise RTS (bot&top passed to initheap)
STREAMS     :100 // vec         - streams descriptor (holds state and ungot ch)
CURIN       :101 // #           - current input stream
CUROUT      :102 // #           - current output stream
A.HEAPBASE  :103 // #           - base of heap area
A.HEAPTOP   :104 // #           - top of heap area
A.HEAPFREE  :105 // #           - free location in heap area
A.STACKBASE :106 // #           - base of BCPL stack
A.STACKTOP  :107 // #           - maximum BCPL stack
DEBUGINTERN :108 // ()          - internal debug functions
JMPGLOB     :109 // ()          - interrupt handler for resident RTS
    $)

manifest $(         // stream error/status flags

S.ERROR         = #x8000
S.EOF           = #x4000
S.UNGOT         = #x2000
S.BINARY        = #x1000
S.DEFAULT       = #x0800
S.BUFFERED      = #x0400
S.INPUT         = #x0200
S.OUTPUT        = #x0100

    $)

manifest $(         // stream buffer offsets

    S.BUFLEN    = 512 // bytes
    S.BUFPTR    = -1
    S.BUFMAX    = -2
    S.BUFEXTRA  = 2

    $)


manifest $(         // some PSP header entries

PSP.NXTSEG  = 1     // ! paragraph number following top of memory
PSP.SEGLEN  = 3     // ! length of this segment in bytes
PSP.ENVSEG  = 22    // ! segment of environment strings

    $)


