Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
31 | halyavin | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; |
||
3 | ;; ETHERNET SETUP |
||
4 | ;; |
||
5 | |||
6 | use32 |
||
7 | |||
8 | org 0x0 |
||
9 | db 'MENUET00' ; 8 byte id |
||
10 | dd 38 ; required os |
||
11 | dd START ; program start |
||
12 | dd I_END ; program image size |
||
13 | dd 0x100000 ; required amount of memory |
||
14 | dd 0x00000000 ; reserved=no extended header |
||
15 | |||
16 | include 'lang.inc' |
||
17 | include 'macros.inc' |
||
18 | START: ; start of execution |
||
19 | |||
20 | call draw_window ; at first, draw the window |
||
21 | |||
22 | still: |
||
23 | |||
24 | mov eax,10 ; wait here for event |
||
25 | int 0x40 |
||
26 | |||
27 | cmp eax,1 ; redraw request ? |
||
28 | jz red |
||
29 | cmp eax,2 ; key in buffer ? |
||
30 | jz key |
||
31 | cmp eax,3 ; button in buffer ? |
||
32 | jz button |
||
33 | |||
34 | jmp still |
||
35 | |||
36 | red: ; redraw |
||
37 | call draw_window |
||
38 | |||
39 | jmp still |
||
40 | |||
41 | key: ; key |
||
42 | mov eax,2 ; just read it and ignore |
||
43 | int 0x40 |
||
44 | |||
45 | jmp still |
||
46 | |||
47 | button: ; button |
||
48 | mov eax,17 |
||
49 | int 0x40 |
||
50 | |||
51 | cmp ah,1 ; button id=1 ? |
||
52 | jnz noclose |
||
53 | mov eax,-1 ; close this program |
||
54 | int 0x40 |
||
55 | noclose: |
||
56 | |||
57 | cmp ah,2 |
||
58 | jne no_details |
||
59 | mov eax,19 |
||
60 | mov ebx,file1 |
||
61 | mov ecx,file2 |
||
62 | int 0x40 |
||
63 | jmp still |
||
64 | no_details: |
||
65 | |||
66 | jmp still |
||
67 | |||
68 | |||
69 | |||
70 | ; WINDOW DEFINITIONS AND DRAW |
||
71 | |||
72 | |||
73 | draw_window: |
||
74 | |||
75 | mov eax,12 ; function 12:tell os about windowdraw |
||
76 | mov ebx,1 ; 1, start of draw |
||
77 | int 0x40 |
||
78 | |||
79 | ; DRAW WINDOW |
||
80 | mov eax,0 ; function 0 : define and draw window |
||
81 | mov ebx, 50*65536+370 ; [x start] *65536 + [x size] |
||
82 | mov ecx,100*65536+230 ; [y start] *65536 + [y size] |
||
83 | mov edx,0x03ffffff ; color of work area RRGGBB |
||
84 | mov esi,0x80557799 ; color of grab bar RRGGBB,8->color glide |
||
85 | mov edi,esi ; color of frames RRGGBB |
||
86 | and edi,0xffffff |
||
87 | int 0x40 |
||
88 | |||
89 | ; WINDOW LABEL |
||
90 | mov eax,4 ; function 4 : write text to window |
||
91 | mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
||
92 | mov ecx,0x00ffffff ; color of text RRGGBB |
||
93 | mov edx,labelt ; pointer to text beginning |
||
94 | mov esi,labellen-labelt ; text length |
||
95 | int 0x40 |
||
96 | ; BUTTON |
||
97 | mov eax,8 ; function 8 : define and draw button |
||
98 | mov ebx,202*65536+135 ; [x start] *65536 + [x size] |
||
99 | mov ecx,190*65536+16 ; [y start] *65536 + [y size] |
||
100 | mov edx,2 ; button id |
||
101 | mov esi,edi ; button color RRGGBB |
||
102 | int 0x40 |
||
103 | |||
104 | mov ebx,6*65536+35 ; draw info text with function 4 |
||
105 | mov ecx,0;xffffff |
||
106 | mov edx,text |
||
107 | mov esi,60 |
||
108 | newline: |
||
109 | mov eax,4 |
||
110 | int 0x40 |
||
111 | add ebx,10 |
||
112 | add edx,60 |
||
113 | cmp [edx],byte 'x' |
||
114 | jnz newline |
||
115 | |||
116 | mov eax,12 ; function 12:tell os about windowdraw |
||
117 | mov ebx,2 ; 2, end of draw |
||
118 | int 0x40 |
||
119 | |||
120 | ret |
||
121 | |||
122 | |||
123 | ; DATA AREA |
||
124 | |||
125 | |||
126 | text: |
||
127 | db ' ETHERNET CONNECTION BETWEEN MENUET AND A TFTP SERVER ' |
||
128 | db ' ' |
||
129 | db ' 1) CURRENT ETHERNET CODE IS FOR RTL 8029 AND i8255x ' |
||
130 | db ' BASED PCI CARDS ' |
||
131 | db ' 2) START STACK CONFIG FROM NET MENU AND PRESS THE ' |
||
132 | db ' READ BUTTON, ACTIVATE PACKET DRIVER, SET DESIRED ' |
||
133 | db ' IP ADDRESS & APPLY ' |
||
134 | db ' 3) SET THE SERVERS IP ADDRESS TO EG. 192.168.1.24 ' |
||
135 | db ' ' |
||
136 | db ' THE MENUET MACHINE SHOULD NOW BE ABLE TO RESPOND TO A ' |
||
137 | db ' PING FROM THE SERVER, TRANSFER FILES USING TFTP AND USE ' |
||
138 | db ' IRC CLIENT. SEE MENUET PAGES FOR MORE TCP/IP APPLICATIONS.' |
||
139 | db ' ' |
||
140 | db ' MOST LINUX DISTRIBUTIONS HAVE A TFTP SERVER INCLUDED ' |
||
141 | db ' FOR MS YOU CAN DOWNLOAD TFTPD FROM TFTPD32.JOUNIN.NET ' |
||
142 | db ' ' |
||
143 | db ' DETAILED DESCRIPTION ' |
||
144 | db 'x' |
||
145 | |||
146 | file1: db 'TINYPAD ' |
||
147 | file2: db 'STACK.TXT',0 |
||
148 | |||
149 | labelt: |
||
150 | db 'NETWORK INFO' |
||
151 | labellen: |
||
152 | |||
153 | I_END: |
||
154 |