/*****************************************************************************\
*                           Systems Research Group                            *
*******************************************************************************


           ##        ########  #######   ##    ##  ######    #######  
           ##        ########  ########  ##    ##  #######   ######## 
           ##           ##     ##    ##  ##    ##  ##    ##  ##    ## 
           ##           ##     #######   ########  ##    ##  ######## 
           ##           ##     ##    ##  ##    ##  ##    ##  #######  
           ##           ##     ##    ##  ##    ##  ##    ##  ##  ##   
           ########  ########  ########  ##    ##  #######   ##   ##  
           ########  ########  #######   ##    ##  ######    ##    ## 


*******************************************************************************
*   I. D. Wilson           Last Modified   -   IDW   -   16/04/85             *
\*****************************************************************************/



GLOBAL
$(
    globsize              :  0
    start                 :  1
    stop                  :  2
    root                  :  3
    debug                 :  4
    errtrap               :  5
    readport              :  6
    writeport             :  7

    result2               :  10

    getbyte               :  15
    byteget               :  15

    putbyte               :  16
    byteput               :  16

    level                 :  17
    longjump              :  18
//  muldiv                :  19
    aptovec               :  20
    sardch                :  21
    sawrch                :  22
//  createco              :  23
//  deleteco              :  24
//  callco                :  25
//  cowait                :  26
//  resumeco              :  27
    globin                :  28
    getvec                :  29
    freevec               :  30

    abort                 :  38

    packstring            :  44
    unpackstring          :  45

    initio                :  50
    iolist                :  51
    cis                   :  52
    cos                   :  53

    rdch                  :  54
    unrdch                :  55
    wrch                  :  56

    findinput             :  59
    findoutput            :  60
    selectinput           :  61
    selectoutput          :  62
    endread               :  63
    endwrite              :  64
    input                 :  65
    output                :  66
    readn                 :  67
    newline               :  68
    writed                :  69
    writen                :  70
    writehex              :  71
    writeoct              :  72
    writes                :  73
    writef                :  74
    capitalch             :  75

    bufferedinput         :  88
    bufferedoutput        :  89
    interactiveinput      :  90
    interactiveoutput     :  91
    testbreak             :  92

    endstream             :  93

    //  In section "RING"

    lookupname            :  100
    ssp                   :  101
    rcvssp                :  102
    sspreply              :  103
    bspopen               :  104
    rcvopen               :  105
    makevtp               :  106
    rcvcancel             :  107
    get2bytes             :  108
    put2bytes             :  109
    sspopen               :  110
    rfshssp               :  111
    sendssp               :  112
    sendtssp              :  113
    testssp               :  114
    sspnport              :  115
    bspdest               :  116

    //  In section "Z80CO"

    nextco                :  120
    cocreate              :  121
    codelete              :  122

    //  In section "IDW-INITIO" for BBC/OS interface

    osrdch                :  130
    oswrch                :  131
    oscli                 :  132
    osbyte                :  133
    osfind                :  134
    osbget                :  135
    osbput                :  136
    osclose               :  137
$)



MANIFEST
$(
    bytesperword          =  2
    mcaddrinc             =  2

    bitsperbyte           =  8
    bitsperword           =  bytesperword * bitsperbyte
    minint                =  1 << [ bitsperword-1 ]
    maxint                =  NOT minint

    endstreamch           =  -1
    ug                    =  150
    fg                    =  ug
    firstfreeglobal       =  ug
$)


