Last change
on this file since 7bf3856 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
5.2 KB
|
Rev | Line | |
---|
[3ae31e9] | 1 | * APPSTART.S
|
---|
| 2 | * 4/30/85 MIKE SCHMAL
|
---|
| 3 | *
|
---|
| 4 | * APPLICATION STARTUP PROGRAM
|
---|
| 5 | *
|
---|
| 6 | * This version only contains what is necessary for a application to run
|
---|
| 7 | * All other garbage has been removed as not to waste memory.
|
---|
| 8 | *
|
---|
| 9 | * Sample application startup code. This must be the first object file in
|
---|
| 10 | * the link statement so that the base page address can be accessed.
|
---|
| 11 | * When a program is executed, GEMDOS gives all available memory to it.
|
---|
| 12 | * If this program needs to do any memory management, then one must first
|
---|
| 13 | * free unused memory by a setblock call. All "segment" lengths in the base
|
---|
| 14 | * page are totaled and 0x100 is added for the base page length for the setblock
|
---|
| 15 | * call.
|
---|
| 16 | *
|
---|
| 17 |
|
---|
| 18 | .text
|
---|
| 19 | .globl _main
|
---|
| 20 | .globl _crystal
|
---|
| 21 | .globl _ctrl_cnts
|
---|
| 22 | *
|
---|
| 23 | * Must be first object file in link statement
|
---|
| 24 | *
|
---|
| 25 | move.l a7,a5 * save a7 so we can get the base page address
|
---|
| 26 | move.l #ustk,a7 * set local stack
|
---|
| 27 | move.l 4(a5),a5 * basepage address
|
---|
| 28 | move.l $c(a5),d0
|
---|
| 29 | add.l $14(a5),d0
|
---|
| 30 | add.l $1c(a5),d0
|
---|
| 31 | add.l #$100,d0 * skip los pageos baseos
|
---|
| 32 | move.l d0,-(sp)
|
---|
| 33 | move.l a5,-(sp)
|
---|
| 34 | move d0,-(sp) * junk word
|
---|
| 35 | move #$4a,-(sp)
|
---|
| 36 | trap #1
|
---|
| 37 | add.l #12,sp
|
---|
| 38 | *
|
---|
| 39 | jsr _main * go to program
|
---|
| 40 | move.l #0,-(a7) * back to gemdos
|
---|
| 41 | trap #1
|
---|
| 42 | *
|
---|
| 43 | * For GEMAES calls from AESBIND.ARC or cryslib.o
|
---|
| 44 | *
|
---|
| 45 | _crystal:
|
---|
| 46 | move.l 4(a7),d1
|
---|
| 47 | move.w #200,d0
|
---|
| 48 | trap #2
|
---|
| 49 | rts
|
---|
| 50 | *
|
---|
| 51 | *
|
---|
| 52 | .bss
|
---|
| 53 | .even
|
---|
| 54 | .ds.l 256
|
---|
| 55 | ustk: .ds.l 1
|
---|
| 56 | *
|
---|
| 57 | .data
|
---|
| 58 | .even
|
---|
| 59 | _ctrl_cnts: * Application Manager
|
---|
| 60 | .dc.b 0, 1, 0 * func 010
|
---|
| 61 | .dc.b 2, 1, 1 * func 011
|
---|
| 62 | .dc.b 2, 1, 1 * func 012
|
---|
| 63 | .dc.b 0, 1, 1 * func 013
|
---|
| 64 | .dc.b 2, 1, 1 * func 014
|
---|
| 65 | .dc.b 1, 1, 1 * func 015
|
---|
| 66 | .dc.b 0, 0, 0 * func 016
|
---|
| 67 | .dc.b 0, 0, 0 * func 017
|
---|
| 68 | .dc.b 0, 0, 0 * func 008
|
---|
| 69 | .dc.b 0, 1, 0 * func 019
|
---|
| 70 | * Event Manager
|
---|
| 71 | .dc.b 0, 1, 0 * func 020
|
---|
| 72 | .dc.b 3, 5, 0 * func 021
|
---|
| 73 | .dc.b 5, 5, 0 * func 022
|
---|
| 74 | .dc.b 0, 1, 1 * func 023
|
---|
| 75 | .dc.b 2, 1, 0 * func 024
|
---|
| 76 | .dc.b 16, 7, 1 * func 025
|
---|
| 77 | .dc.b 2, 1, 0 * func 026
|
---|
| 78 | .dc.b 0, 0, 0 * func 027
|
---|
| 79 | .dc.b 0, 0, 0 * func 028
|
---|
| 80 | .dc.b 0, 0, 0 * func 009
|
---|
| 81 | * Menu Manager
|
---|
| 82 | .dc.b 1, 1, 1 * func 030
|
---|
| 83 | .dc.b 2, 1, 1 * func 031
|
---|
| 84 | .dc.b 2, 1, 1 * func 032
|
---|
| 85 | .dc.b 2, 1, 1 * func 033
|
---|
| 86 | .dc.b 1, 1, 2 * func 034
|
---|
| 87 | .dc.b 1, 1, 1 * func 005
|
---|
| 88 | .dc.b 0, 0, 0 * func 006
|
---|
| 89 | .dc.b 0, 0, 0 * func 007
|
---|
| 90 | .dc.b 0, 0, 0 * func 008
|
---|
| 91 | .dc.b 0, 0, 0 * func 009
|
---|
| 92 | * Object Manager
|
---|
| 93 | .dc.b 2, 1, 1 * func 040
|
---|
| 94 | .dc.b 1, 1, 1 * func 041
|
---|
| 95 | .dc.b 6, 1, 1 * func 042
|
---|
| 96 | .dc.b 4, 1, 1 * func 043
|
---|
| 97 | .dc.b 1, 3, 1 * func 044
|
---|
| 98 | .dc.b 2, 1, 1 * func 045
|
---|
| 99 | .dc.b 4, 2, 1 * func 046
|
---|
| 100 | .dc.b 8, 1, 1 * func 047
|
---|
| 101 | .dc.b 0, 0, 0 * func 048
|
---|
| 102 | .dc.b 0, 0, 0 * func 049
|
---|
| 103 | * Form Manager
|
---|
| 104 | .dc.b 1, 1, 1 * func 050
|
---|
| 105 | .dc.b 9, 1, 1 * func 051
|
---|
| 106 | .dc.b 1, 1, 1 * func 002
|
---|
| 107 | .dc.b 1, 1, 0 * func 003
|
---|
| 108 | .dc.b 0, 5, 1 * func 004
|
---|
| 109 | .dc.b 0, 0, 0 * func 005
|
---|
| 110 | .dc.b 0, 0, 0 * func 006
|
---|
| 111 | .dc.b 0, 0, 0 * func 007
|
---|
| 112 | .dc.b 0, 0, 0 * func 008
|
---|
| 113 | .dc.b 0, 0, 0 * func 009
|
---|
| 114 | * Dialog Manager
|
---|
| 115 | .dc.b 0, 0, 0 * func 060
|
---|
| 116 | .dc.b 0, 0, 0 * func 061
|
---|
| 117 | .dc.b 0, 0, 0 * func 062
|
---|
| 118 | .dc.b 0, 0, 0 * func 003
|
---|
| 119 | .dc.b 0, 0, 0 * func 004
|
---|
| 120 | .dc.b 0, 0, 0 * func 005
|
---|
| 121 | .dc.b 0, 0, 0 * func 006
|
---|
| 122 | .dc.b 0, 0, 0 * func 007
|
---|
| 123 | .dc.b 0, 0, 0 * func 008
|
---|
| 124 | .dc.b 0, 0, 0 * func 009
|
---|
| 125 | * Graphics Manager
|
---|
| 126 | .dc.b 4, 3, 0 * func 070
|
---|
| 127 | .dc.b 8, 3, 0 * func 071
|
---|
| 128 | .dc.b 6, 1, 0 * func 072
|
---|
| 129 | .dc.b 8, 1, 0 * func 073
|
---|
| 130 | .dc.b 8, 1, 0 * func 074
|
---|
| 131 | .dc.b 4, 1, 1 * func 075
|
---|
| 132 | .dc.b 3, 1, 1 * func 076
|
---|
| 133 | .dc.b 0, 5, 0 * func 077
|
---|
| 134 | .dc.b 1, 1, 1 * func 078
|
---|
| 135 | .dc.b 0, 5, 0 * func 009
|
---|
| 136 | * Scrap Manager
|
---|
| 137 | .dc.b 0, 1, 1 * func 080
|
---|
| 138 | .dc.b 0, 1, 1 * func 081
|
---|
| 139 | .dc.b 0, 0, 0 * func 082
|
---|
| 140 | .dc.b 0, 0, 0 * func 083
|
---|
| 141 | .dc.b 0, 0, 0 * func 084
|
---|
| 142 | .dc.b 0, 0, 0 * func 005
|
---|
| 143 | .dc.b 0, 0, 0 * func 006
|
---|
| 144 | .dc.b 0, 0, 0 * func 007
|
---|
| 145 | .dc.b 0, 0, 0 * func 008
|
---|
| 146 | .dc.b 0, 0, 0 * func 009
|
---|
| 147 | * fseler Manager
|
---|
| 148 | .dc.b 0, 2, 2 * func 090
|
---|
| 149 | .dc.b 0, 0, 0 * func 091
|
---|
| 150 | .dc.b 0, 0, 0 * func 092
|
---|
| 151 | .dc.b 0, 0, 0 * func 003
|
---|
| 152 | .dc.b 0, 0, 0 * func 004
|
---|
| 153 | .dc.b 0, 0, 0 * func 005
|
---|
| 154 | .dc.b 0, 0, 0 * func 006
|
---|
| 155 | .dc.b 0, 0, 0 * func 007
|
---|
| 156 | .dc.b 0, 0, 0 * func 008
|
---|
| 157 | .dc.b 0, 0, 0 * func 009
|
---|
| 158 | * Window Manager
|
---|
| 159 | .dc.b 5, 1, 0 * func 100
|
---|
| 160 | .dc.b 5, 1, 0 * func 101
|
---|
| 161 | .dc.b 1, 1, 0 * func 102
|
---|
| 162 | .dc.b 1, 1, 0 * func 103
|
---|
| 163 | .dc.b 2, 5, 0 * func 104
|
---|
| 164 | .dc.b 6, 1, 0 * func 105
|
---|
| 165 | .dc.b 2, 1, 0 * func 106
|
---|
| 166 | .dc.b 1, 1, 0 * func 107
|
---|
| 167 | .dc.b 6, 5, 0 * func 108
|
---|
| 168 | .dc.b 0, 0, 0 * func 009
|
---|
| 169 | * Resource Manger
|
---|
| 170 | .dc.b 0, 1, 1 * func 110
|
---|
| 171 | .dc.b 0, 1, 0 * func 111
|
---|
| 172 | .dc.b 2, 1, 0 * func 112
|
---|
| 173 | .dc.b 2, 1, 1 * func 113
|
---|
| 174 | .dc.b 1, 1, 1 * func 114
|
---|
| 175 | .dc.b 0, 0, 0 * func 115
|
---|
| 176 | .dc.b 0, 0, 0 * func 006
|
---|
| 177 | .dc.b 0, 0, 0 * func 007
|
---|
| 178 | .dc.b 0, 0, 0 * func 008
|
---|
| 179 | .dc.b 0, 0, 0 * func 009
|
---|
| 180 | * Shell Manager
|
---|
| 181 | .dc.b 0, 1, 2 * func 120
|
---|
| 182 | .dc.b 3, 1, 2 * func 121
|
---|
| 183 | .dc.b 1, 1, 1 * func 122
|
---|
| 184 | .dc.b 1, 1, 1 * func 123
|
---|
| 185 | .dc.b 0, 1, 1 * func 124
|
---|
| 186 | .dc.b 0, 1, 2 * func 125
|
---|
| 187 | .end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.