; PROGSTART - version 04.04.88

               include 'ram:package.i' ; Include standard definitions

; Initialisation section
               MOVE.L  D0,A0           ; Address of package structure
               MOVE.L  #LinkTop,12(A0) ; Set address of top-link
               CLR.W   D0              ; No error
               RTS

; Program start
;
ProgStart:     MOVE.L  A4,D3          ; Get argument from Comal stack
               MOVE.L  -(A5),D2
               AND.L   #1,D2
               EOR.L   #1,D2
               RTS

; Variable start
;
VarStart:      MOVE.L  -(A5),D3        ; Get argument from Comal stack
               MOVE.L  -(A5),D2
               AND.L   #1,D2           ; Return value of bit zero
               RTS

; Name start
;
NameStart:     MOVE.L  A4,---



               SECTION EvenOddData,DATA

ProgLink:      DC.L    0               ; Last name
               DC.L    ProgName
               DC.W    longcode        ; Long integer function
               DC.W    0               ; No argument
               DC.L    ProgStart       ; Rutine address
ProgName:      DC.B    'PROGSTART',0

               CNOP    0,2
VarLink:       DC.L    ProgLink
               DC.L    VarName
               DC.W    longcode        ; Long integer function
               DC.W    0               ; No argument
               DC.L    VarStart        ; Rutine address
VarName:       DC.B    'VARSTART',0

               CNOP    0,2
NameLink:      DC.L    VarLink
               DC.L    NameName
               DC.W    longcode        ; Long integer function
               DC.W    0               ; No argument
               DC.L    NameStart       ; Rutine address
NameName:      DC.B    'NAMESTART',0

               CNOP    0,2
LinkTop:       DC.L    NameLink

               END 
