annotate level1/cmds/httpd.as @ 3169:1ff3d7673e36

mc09 l2: bring sys/makefile in line with latest organisation for other platforms Revise bootfiles/makefile to remove sysgo from bootfile - it can be found on the root of the disk.
author Neal Crook <foofoobedoo@gmail.com>
date Mon, 17 Apr 2017 22:59:28 +0100
parents ad769d2a03e4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2823
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
1 ********************************************************************
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
2 * httpd - HTTP daemon
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
3 *
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
4 * $Id$
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
5 *
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
7 * Comment
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
8 * ------------------------------------------------------------------
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
9 * 1 2013/05/22 Boisy G. Pitre
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
10 * Started.
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
11
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
12 nam httpd
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 ttl HTTP daemon
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15 section __os9
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
16 type equ Prgrm
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
17 lang equ Objct
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18 attr equ ReEnt
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19 rev equ $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 edition equ 1
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
21 stack equ 200
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
22 endsect
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 section bss
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25 gbufferl equ 128
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
26 gbuffer rmb gbufferl
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
27 dentbuf rmb 32
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
28 filepath rmb 1
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
29 fileptr rmb 2
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
30 lbufferl equ 128
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
31 lbuffer rmb lbufferl
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
32 endsect
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 section code
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36 DEBUG equ 1
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
38 **** Entry Point ****
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39 __start
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40 * Turn off pause in standard out
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41 lda #1
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 lbsr SetEchoOff
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43 lbsr SetAutoLFOn
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
44
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
45 * change to www root dir
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
46 lda #READ.
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
47 leax wwwroot,pcr
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
48 os9 I$ChgDir
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
49 bcs errexit
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
50
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
51 * main loop: read line on stdin
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
52 mainloop
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
53 leax gbuffer,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
54 ldy #gbufferl
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
55 clra
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
56 os9 I$ReadLn
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
57 bcs checkeof
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
58 * quickly nul terminate the line we just read
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
59 pshs x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
60 tfr y,d
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
61 leax d,x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
62 clr -1,x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
63 puls x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
64 bsr process
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
65 bra errexit
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
66
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
67 checkeof cmpb #E$EOF
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
68 bcs errexit
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
69 clrb
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
70 errexit
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
71 pshs cc,b
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
72 lda #1
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
73 lbsr SetEchoOn
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
74 puls cc,b
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
75 os9 F$Exit
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
76
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
77 * input: X = line read (nul terminated)
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
78 process
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
79 * check for GET
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
80 leay get,pcr
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
81 ldd #getl
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
82 lbsr STRNCMP
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
83 beq GETOK
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
84 clrb
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
85 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
86
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
87 * we know it is a GET... get the text following it
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
88 GETOK leax 4,x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
89 ldd ,x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
90 cmpd #'/*256+C$SPAC
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
91 beq doindex
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
92 leax 1,x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
93
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
94 NulTerminate pshs x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
95 loop@ lda ,x+
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
96 beq terminate@
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
97 cmpa #C$CR
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
98 beq terminate@
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
99 cmpa #C$SPAC
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
100 beq terminate@
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
101 bra loop@
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
102 terminate@ clr -1,x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
103 puls x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
104 bra readfile
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
105
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
106 * point to index.html
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
107 doindex leax index,pcr
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
108 readfile
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
109 stx fileptr,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
110 lda #READ.
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
111 os9 I$Open
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
112 bcs isitdir
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
113
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
114 lbsr print200OK
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
115
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
116 readloop leax lbuffer,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
117 ldy #lbufferl
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
118 os9 I$Read
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
119 bcs eofcheck
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
120 pshs a
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
121 lda #1
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
122 os9 I$Write
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
123 puls a
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
124 bra readloop
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
125
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
126 eofcheck cmpb #E$EOF
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
127 bne ret
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
128 clrb
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
129 os9 I$Close
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
130 ret rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
131
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
132 isitdir cmpb #E$FNA
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
133 lbne notfound
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
134 * open as directory
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
135 lda #READ.+DIR.
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
136 ldx fileptr,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
137 os9 I$Open
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
138 lbcs notfound
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
139 * process dir here
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
140 sta filepath,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
141 lbsr print200OK
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
142 lbsr _htmltag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
143 lbsr _headtag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
144 lbsr _titletag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
145 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
146 fcc "Directory of "
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
147 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
148 ldx fileptr,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
149 lbsr PUTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
150 lbsr _ntitletag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
151 lbsr _nheadtag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
152 lbsr _bodytag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
153 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
154 fcc "<H3>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
155 fcc "Directory of "
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
156 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
157 ldx fileptr,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
158 lbsr PUTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
159 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
160 fcc "</H3>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
161 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
162 lda filepath,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
163 * skip over .. and .
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
164 ldy #DIR.SZ
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
165 leax dentbuf,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
166 os9 I$Read
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
167 leax dentbuf,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
168 os9 I$Read
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
169
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
170 nextdirent lda filepath,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
171 leax dentbuf,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
172 ldy #DIR.SZ
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
173 os9 I$Read
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
174 bcs endoffile
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
175 tst ,x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
176 beq nextdirent
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
177
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
178 * find char with hi bit set
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
179 tfr x,y
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
180 lo@ lda ,y+
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
181 bpl lo@
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
182 anda #$7F
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
183 sta -1,y
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
184 clr ,y
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
185 pshs x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
186 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
187 fcc '<A HREF="'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
188 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
189 ldx fileptr,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
190 lbsr PUTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
191 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
192 fcc "/"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
193 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
194 ldx ,s
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
195 lbsr PUTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
196 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
197 fcc '">'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
198 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
199 puls x
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
200 lbsr PUTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
201 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
202 fcc "</A>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
203 fcc "<BR>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
204 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
205 bra nextdirent
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
206 endoffile
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
207 lda filepath,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
208 os9 I$Close
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
209 lbsr _nbodytag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
210 lbsr _nhtmltag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
211 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
212
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
213 notfound lbsr print404
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
214 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
215
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
216 _http11
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
217 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
218 fcc "HTTP/1.1 "
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
219 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
220 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
221
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
222 _server
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
223 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
224 fcc "Server: "
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
225 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
226 lbsr _serverinf
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
227 lbsr _newline
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
228 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
229
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
230 _connclose
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
231 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
232 fcc "Connection: close"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
233 fcb C$CR,$00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
234 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
235
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
236 _newline
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
237 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
238 fcb C$CR,$00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
239 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
240
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
241 _serverinf
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
242 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
243 fcc /httpd ed. /
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
244 fcb edition+$30
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
245 fcc / (NitrOS-9)/
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
246 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
247 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
248
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
249 _htmltag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
250 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
251 fcc "<HTML>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
252 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
253 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
254
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
255 _nhtmltag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
256 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
257 fcc "</HTML>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
258 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
259 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
260
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
261 _headtag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
262 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
263 fcc "<HEAD>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
264 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
265 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
266
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
267 _nheadtag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
268 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
269 fcc "</HEAD>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
270 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
271 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
272
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
273 _titletag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
274 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
275 fcc "<TITLE>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
276 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
277 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
278
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
279 _ntitletag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
280 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
281 fcc "</TITLE>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
282 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
283 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
284
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
285 _bodytag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
286 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
287 fcc "<BODY>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
288 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
289 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
290
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
291 _nbodytag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
292 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
293 fcc "</BODY>"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
294 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
295 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
296
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
297 print200OK
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
298 lbsr _http11
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
299 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
300 fcc "200 OK"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
301 fcb C$CR,$00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
302 lbsr _server
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
303 lbsr _connclose
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
304 lbsr _newline
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
305 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
306
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
307 print404
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
308 lbsr _http11
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
309 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
310 fcc "404 Not Found"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
311 fcb C$CR,$00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
312 lbsr _server
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
313 lbsr _connclose
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
314 lbsr _newline
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
315 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
316 fcc '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
317 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
318 lbsr _htmltag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
319 lbsr _headtag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
320 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
321 fcc '<title>404 Not Found</title>'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
322 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
323 lbsr _nheadtag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
324 lbsr _bodytag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
325 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
326 fcc '<h1>Not Found</h1>'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
327 fcc '<p>The requested URL '
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
328 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
329 ldx fileptr,u
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
330 lbsr PUTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
331 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
332 fcc ' was not found on this server.</p>'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
333 fcc '<hr>'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
334 fcc '<address>'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
335 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
336 lbsr _serverinf
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
337 lbsr PRINTS
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
338 fcc '</address>'
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
339 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
340 lbsr _nbodytag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
341 lbsr _nhtmltag
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
342 rts
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
343
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
344 wwwroot fcs "....../WWWROOT"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
345 get fcc "GET "
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
346 getl equ *-get
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
347 fcb $00
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
348 index fcs "index.html"
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
349
ad769d2a03e4 New httpd in assembly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
350 endsect