|
|
1.1 root 1: .set CONTROL_STATE, 4516
2: .text
3: .align 8
4: .globl P
5: .globl Sys
6: P:
7: Sys:
8: # start of Sys
9: .word 0 # this is really P == Sys[0]
10: .word defont
11: .word add
12: .word Uaddr
13: .word alarm
14: .word Ualloc
15: .word Uballoc
16: .word bfree
17: .word Ubitblt
18: .word Ucursallow
19: .word Ucursinhibit
20: .word Ucursset
21: .word Ucursswitch
22: .word debug
23: .word dellayer
24: .word div
25: .word eqrect
26: .word Uexit
27: .word free
28: .word realgcalloc
29: .word gcfree
30: .word Uogetrect
31: .word inset
32: .word cursallow
33: .word cursinhibit
34: .word Ukbdchar
35: .word lpoint
36: .word lrectf
37: .word lsegment
38: .word ltexture
39: .word menuhit
40: .word mul
41: .word muxnewwind
42: .word nap
43: .word newlayer
44: .word Unewproc
45: .word Unewwindow
46: .word Uown
47: .word Upoint
48: .word ptinrect
49: .word raddp
50: .word Urcvchar
51: .word realtime
52: .word rectXrect
53: .word rectclip
54: .word Urectf
55: .word Urequest
56: .word rsubp
57: .word Uscreenswap
58: .word Usegment
59: .word Usendchar
60: .word sendwithdelim
61: .word sleep
62: .word 0
63: .word string
64: .word strwidth
65: .word sub
66: .word Utexture
67: .word tolayer
68: .word upfront
69: .word Uwait
70: .word muxkill
71: .word setmuxbuf
72: .word getmuxbuf
73: .word insure
74: .word GCalloc
75: .word movstring
76: .word insstring
77: .word delstring
78: .word frselect
79: .word fralloc
80: .word frsetrects
81: .word frinit
82: .word frfree
83: .word ptofchar
84: .word charofpt
85: .word border
86: .word getproctab
87: .word lbitblt
88: .word getrect
89: .word getrectb
90: .word qputc
91: .word qgetc
92: .word qputstr
93: .word qclear
94: .word jstrwidth
95: .word getproc
96: .word layerop
97: .word putname
98: .word getname
99: .word qpeekc
100: # end of Sys
101: .globl _start
102: .align 8
103: _start:
104: call &0,main
105: RETPS
106:
107: .text
108: .align 8
109: .globl msvid_int
110: msvid_int:
111: SAVE %r8
112: MOVB 0x200013,%r5
113: BITB &0x40,%r5
114: BEB mous_chk
115: BITB &0x04,%r5 # update only at 60 hz. rate
116: BNEB mous_chk # if fall through, have a video interrupt
117: call &0,auto1 # calls cursor update in cursor.c
118: call &0,clockroutine
119: mous_chk:
120: BITB &0xb0,%r5
121: BEB msvid_exit
122: # if fall through, have a mouse interrupt
123: call &0,auto4 # call buttons handler in buttons.c
124: orw2 &1,proctab+CONTROL_STATE
125: msvid_exit:
126: RESTORE %r8
127: RETPS
128:
129: .text
130: .align 8
131: .globl key_int
132: key_int:
133: call &0,auto2
134: RETPS
135:
136: .text
137: .align 8
138: .globl host_int
139: host_int:
140: pushw &queues
141: andw3 0x20000c,&255,%r0
142: pushw %r0
143: call &2,qputc
144: orw2 &1,proctab+80
145: RETPS
146:
147: .text
148: .align 8
149: .globl out_int
150: out_int:
151: call &0,aciatrint
152: RETPS
153:
154: .text
155: .align 8
156: .globl pioh_int
157: pioh_int:
158: TSTB 0x300003
159: RETPS
160:
161: .text
162: .align 8
163: .globl piol_int
164: piol_int:
165: TSTB 0x300003
166: RETPS
167:
168: .data
169: .globl ticks0
170: .bss ticks0,4,4
171:
172: .text
173: .align 8
174: .globl realtime
175: realtime: movw ticks0,%r0
176: RET
177:
178: # .globl reboot
179: #reboot:
180: #exit:
181: # movaw reset_pcb,%r0 # when return then reboot
182: # CALLPS # reboot the entire system
183: # jmp reboot # boo-boo if you get here
184:
185: .globl callps
186: .align 8
187: callps:
188: movw 0(%ap), %r0
189: CALLPS
190: RET
191:
192: .globl resume
193: .align 8
194: resume:
195: movw 0(%ap), -4(%isp)
196: RETPS
197:
198: .globl retps
199: .align 8
200: retps:
201: RETPS
202:
203: .globl spl0
204: .align 8
205: spl0: movw %psw,%r0
206: ANDW2 &0xfffe1fff,%psw # turn off all priority bits
207: TSTW %r0
208: RET
209:
210: .globl spl1
211: .globl spl4
212: .align 8
213: spl1:
214: spl4: movw %psw,%r0
215: INSFW &4,&13,&14,%psw
216: TSTW %r0
217: RET
218:
219: .globl spl5
220: .globl spl6
221: .globl spl7
222: .align 8
223: spl5:
224: spl6:
225: spl7: movw %psw,%r0
226: ORW2 &0x1e000,%psw
227: TSTW %r0
228: RET
229: .globl splx
230: .align 8
231: splx:
232: movw %psw,%r0
233: LRSW3 &13,0(%ap),%r1
234: INSFW &4,&13,%r1,%psw
235: TSTW %r0
236: RET
237:
238: .globl excep_norm
239: .align 8
240: excep_norm:
241: ORW2 &0x281e000,%psw # IPL up to 15
242: TSTW %r0 # let psw bits settle
243: PUSHW %r0 # save temporary registers 0-2
244: PUSHW %r1
245: PUSHW %r2
246: PUSHW %r3 # save register variables 3-8
247: PUSHW %r4
248: PUSHW %r5
249: PUSHW %r6
250: PUSHW %r7
251: PUSHW %r8
252: PUSHW %r9 # save fp
253: PUSHW %r10 # save ap
254: PUSHW -48(%sp) # save psw
255: PUSHAW -56(%sp) # save sp's value at interrupt
256: PUSHW &3 # type = NORMAL
257: PUSHAW -64(%sp) # address of pc from normal gate
258: PUSHAW -64(%sp) # address of psw from normal gate
259: PUSHW -68(%sp) # psw from normal gate
260: PUSHW %pcbp # (not used!)
261: call &5,trap # trap will decide to return or not
262: POPW %r0 # ignore saved sp/psw
263: POPW %r0
264: POPW %r10 # restore ap/fp
265: POPW %r9
266: POPW %r8 # restore register variables 3-8
267: POPW %r7
268: POPW %r6
269: POPW %r5
270: POPW %r4
271: POPW %r3
272: POPW %r2 # restore temporary registers 0-2
273: POPW %r1
274: POPW %r0
275: RETG # resume if trap allows (brkpt or trace)
276:
277: .globl excep_stack
278: .align 8
279: excep_stack:
280: MOVW -0x4(%isp),%r0 # get saved %pcbp
281: PUSHW &2 # type = STACK
282: PUSHAW 0x4(%r0) # push address of saved pc
283: PUSHAW 0x0(%r0) # push address of saved psw
284: PUSHW 0x0(%r0) # push saved psw
285: PUSHW %r0 # push saved pcbp
286: call &5,trap # let trap handle the situation
287: RETPS # if trap returns
288: .globl excep_int
289: .globl excep_proc
290: .align 8
291: excep_int:
292: excep_proc:
293: MOVW -0x4(%isp),%r0 # get saved %pcbp
294: PUSHW &1 # type = PROCESS
295: PUSHAW 0x4(%r0) # push address of saved pc
296: PUSHAW 0x0(%r0) # push address of saved psw
297: PUSHW 0x0(%r0) # push saved psw
298: PUSHW %r0 # push saved pcbp
299: call &5,trap # let trap handle the situation
300: RETPS # if trap returns
301:
302: # hacks
303: .globl ringbell
304: .globl test32
305: .globl pfkey
306: .globl curse
307: .globl pt
308: .align 8
309: ringbell:
310: test32:
311: pfkey:
312: curse:
313: pt:
314: RET
315:
316: .data
317: .comm blocked,4
318: .comm ublocked,4
319: .comm cur,4
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.