Subversion Repositories Kolibri OS

Rev

Rev 331 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 331 Rev 485
Line 11... Line 11...
11
 dd	I_END+0x10000 ; required memory
11
 dd	I_END+0x10000 ; required memory
12
 dd	I_END+0x10000 ; esp
12
 dd	I_END+0x10000 ; esp
13
 dd	0x0 , 0x0     ; I_Param , I_Path
13
 dd	0x0 , 0x0     ; I_Param , I_Path
Line 14... Line 14...
14
   
14
   
15
include 'lang.inc'
15
include 'lang.inc'
Line 16... Line 16...
16
include 'macros.inc'
16
include '..\..\..\macros.inc'
Line 17... Line 17...
17
   
17
   
Line 24... Line 24...
24
   
24
   
Line 25... Line 25...
25
still:
25
still:
26
   
26
   
27
    mov  eax,23 		; wait here for event
27
    mov  eax,23 		; wait here for event
Line 28... Line 28...
28
    mov  ebx,20
28
    mov  ebx,20
29
    int  0x40
29
    mcall
30
   
30
   
31
    cmp  eax,1			; redraw request ?
31
    cmp  eax,1			; redraw request ?
Line 43... Line 43...
43
read_input:
43
read_input:
Line 44... Line 44...
44
   
44
   
45
    push ecx
45
    push ecx
46
    mov  eax,42
46
    mov  eax,42
47
    mov  ebx,4
47
    mov  ebx,4
48
    int  0x40
48
    mcall
Line 49... Line 49...
49
    pop  ecx
49
    pop  ecx
50
   
50
   
51
    cmp  bl,27				; ESCAPE COMMAND
51
    cmp  bl,27				; ESCAPE COMMAND
Line 119... Line 119...
119
    sub  eax,80
119
    sub  eax,80
120
  noeaxz:
120
  noeaxz:
121
    mov  [pos],eax
121
    mov  [pos],eax
122
  newdata:
122
  newdata:
123
    mov  eax,11
123
    mov  eax,11
124
    int  0x40
124
    mcall
125
    cmp  eax,16+4
125
    cmp  eax,16+4
126
    je	 read_input
126
    je	 read_input
127
    call draw_text
127
    call draw_text
128
    jmp  still
128
    jmp  still
Line 132... Line 132...
132
    call draw_window
132
    call draw_window
133
    jmp  still
133
    jmp  still
Line 134... Line 134...
134
   
134
   
135
  key:				; KEY
135
  key:				; KEY
136
    mov  eax,2			; send to modem
136
    mov  eax,2			; send to modem
137
    int  0x40
137
    mcall
138
    shr  eax,8
138
    shr  eax,8
139
    cmp  eax,178		; ARROW KEYS
139
    cmp  eax,178		; ARROW KEYS
140
    jne  noaup
140
    jne  noaup
141
    mov  al,'A'
141
    mov  al,'A'
Line 162... Line 162...
162
  noaleft:
162
  noaleft:
163
  modem_out:
163
  modem_out:
164
    mov  ecx,0x3f8
164
    mov  ecx,0x3f8
165
    mov  bl,al
165
    mov  bl,al
166
    mov  eax,43
166
    mov  eax,43
167
    int  0x40
167
    mcall
168
    jmp  still
168
    jmp  still
Line 169... Line 169...
169
   
169
   
170
  button:			; BUTTON
170
  button:			; BUTTON
171
    mov  eax,17
171
    mov  eax,17
172
    int  0x40
172
    mcall
173
    cmp  ah,1			; CLOSE PROGRAM
173
    cmp  ah,1			; CLOSE PROGRAM
174
    jne  noclose
174
    jne  noclose
175
    mov  eax,45 		; FREE IRQ
175
    mov  eax,45 		; FREE IRQ
176
    mov  ebx,1
176
    mov  ebx,1
177
    mov  ecx,4
177
    mov  ecx,4
178
    int  0x40
178
    mcall
179
    mov  eax,46
179
    mov  eax,46
180
    mov  ebx,1
180
    mov  ebx,1
181
    mov  ecx,0x3f0
181
    mov  ecx,0x3f0
182
    mov  edx,0x3ff
182
    mov  edx,0x3ff
183
    int  0x40
183
    mcall
184
     mov  eax,-1
184
     or  eax,-1
185
     int  0x40
185
     mcall
Line 186... Line 186...
186
  noclose:
186
  noclose:
Line 206... Line 206...
206
    pusha
206
    pusha
Line 207... Line 207...
207
   
207
   
208
    mov  ecx,0x3f8
208
    mov  ecx,0x3f8
209
    mov  ebx,eax
209
    mov  ebx,eax
210
    mov  eax,43
210
    mov  eax,43
211
    int  0x40
211
    mcall
212
    mov  eax,5
212
    mov  eax,5
213
    mov  ebx,5
213
    mov  ebx,5
Line 214... Line 214...
214
    int  0x40
214
    mcall
215
   
215
   
Line 265... Line 265...
265
   
265
   
266
    mov  eax,46
266
    mov  eax,46
267
    mov  ebx,0
267
    mov  ebx,0
268
    mov  ecx,0x3f0
268
    mov  ecx,0x3f0
269
    mov  edx,0x3ff
269
    mov  edx,0x3ff
Line 270... Line 270...
270
    int  0x40
270
    mcall
271
   
271
   
272
    mov  eax,45 	 ; reserve irq 4
272
    mov  eax,45 	 ; reserve irq 4
273
    mov  ebx,0
273
    mov  ebx,0
Line 274... Line 274...
274
    mov  ecx,4
274
    mov  ecx,4
275
    int  0x40
275
    mcall
276
   
276
   
277
    mov  eax,44
277
    mov  eax,44
Line 278... Line 278...
278
    mov  ebx,irqtable
278
    mov  ebx,irqtable
Line 279... Line 279...
279
    mov  ecx,4
279
    mov  ecx,4
280
    int  0x40
280
    mcall
281
   
281
   
282
;    jmp  noportint
282
;    jmp  noportint
Line 283... Line 283...
283
   
283
   
284
    mov  cx,0x3f8+3
284
    mov  cx,0x3f8+3
285
    mov  bl,0x80
285
    mov  bl,0x80
286
    mov  eax,43
286
    mov  eax,43
Line 287... Line 287...
287
    int  0x40
287
    mcall
288
   
288
   
289
    mov  cx,0x3f8+1
289
    mov  cx,0x3f8+1
290
    mov  bl,0
290
    mov  bl,0
Line 291... Line 291...
291
    mov  eax,43
291
    mov  eax,43
292
    int  0x40
292
    mcall
293
   
293
   
294
    mov  cx,0x3f8+0
294
    mov  cx,0x3f8+0
Line 295... Line 295...
295
    mov  bl,0x30 / 16
295
    mov  bl,0x30 / 16
296
    mov  eax,43
296
    mov  eax,43
297
    int  0x40
297
    mcall
298
   
298
   
Line 299... Line 299...
299
    mov  cx,0x3f8+3
299
    mov  cx,0x3f8+3
300
    mov  bl,3
300
    mov  bl,3
301
    mov  eax,43
301
    mov  eax,43
302
    int  0x40
302
    mcall
Line 303... Line 303...
303
   
303
   
Line 304... Line 304...
304
    mov  cx,0x3f8+4
304
    mov  cx,0x3f8+4
305
    mov  bl,0xB
305
    mov  bl,0xB
306
    mov  eax,43
306
    mov  eax,43
Line 307... Line 307...
307
    int  0x40
307
    mcall
Line 308... Line 308...
308
   
308
   
Line 332... Line 332...
332
   
332
   
Line 333... Line 333...
333
    pusha
333
    pusha
334
   
334
   
335
    mov  eax,12
335
    mov  eax,12
Line 336... Line 336...
336
    mov  ebx,1
336
    mov  ebx,1
337
    int  0x40
337
    mcall
338
   
338
   
339
    mov  eax,0			   ; DRAW WINDOW
339
    mov  eax,0			   ; DRAW WINDOW
340
    mov  ebx,100*65536+491
340
    mov  ebx,100*65536+491
341
    mov  ecx,100*65536+270
341
    mov  ecx,100*65536+270
Line 342... Line 342...
342
    mov  edx,0x13000000
342
    mov  edx,0x13000000
343
    mov  edi,labelt
343
    mov  edi,title
344
    int  0x40
344
    mcall
345
   
345
   
Line 351... Line 351...
351
   
351
   
Line 352... Line 352...
352
    call draw_text
352
    call draw_text
353
   
353
   
354
    mov  eax,12
354
    mov  eax,12
Line 355... Line 355...
355
    mov  ebx,2
355
    mov  ebx,2
Line 356... Line 356...
356
    int  0x40
356
    mcall
Line 410... Line 410...
410
    mov  ebx,eax
410
    mov  ebx,eax
411
    add  ebx,6
411
    add  ebx,6
412
    shl  ebx,16
412
    shl  ebx,16
413
    mov  bx,6
413
    mov  bx,6
414
    mov  eax,13
414
    mov  eax,13
415
    int  0x40
415
    mcall
416
    popa
416
    popa
Line 417... Line 417...
417
   
417
   
418
    pusha
418
    pusha
419
    and  edx,0xff
419
    and  edx,0xff
Line 427... Line 427...
427
    pop  bx
427
    pop  bx
428
    add  bx,26
428
    add  bx,26
429
    mov  eax,4
429
    mov  eax,4
430
    mov  edx,esi
430
    mov  edx,esi
431
    mov  esi,1
431
    mov  esi,1
432
    int  0x40
432
    mcall
433
    popa
433
    popa
Line 434... Line 434...
434
   
434
   
Line 435... Line 435...
435
  noletter:
435
  noletter:
Line 456... Line 456...
456
     rep   stosb
456
     rep   stosb
457
     mov   edi,esccmd
457
     mov   edi,esccmd
458
   newescc:
458
   newescc:
459
     mov   eax,42
459
     mov   eax,42
460
     mov   ebx,4
460
     mov   ebx,4
461
     int   0x40
461
     mcall
462
     cmp   ecx,0
462
     cmp   ecx,0
463
     je    escok
463
     je    escok
464
     mov   eax,5
464
     mov   eax,5
465
     mov   ebx,1
465
     mov   ebx,1
466
     int   0x40
466
     mcall
467
     jmp   newescc
467
     jmp   newescc
468
   escok:
468
   escok:
469
     mov   [edi],bl
469
     mov   [edi],bl
470
     add   edi,1
470
     add   edi,1
471
     cmp   edi,esccmd+20
471
     cmp   edi,esccmd+20
Line 611... Line 611...
611
   
611
   
612
     mov  eax,13
612
     mov  eax,13
613
     mov  ebx,250*65536+100
613
     mov  ebx,250*65536+100
614
     mov  ecx,8*65536+8
614
     mov  ecx,8*65536+8
615
     mov  edx,0x000000
615
     mov  edx,0x000000
Line 616... Line 616...
616
     int  0x40
616
     mcall
617
   
617
   
618
     mov  eax,[escnumbers]
618
     mov  eax,[escnumbers]
619
     xor  edx,edx
619
     xor  edx,edx
Line 636... Line 636...
636
     mov  eax,4
636
     mov  eax,4
637
     mov  ebx,250*65536+8
637
     mov  ebx,250*65536+8
638
     mov  ecx,0xffffff
638
     mov  ecx,0xffffff
639
     mov  edx,numtext
639
     mov  edx,numtext
640
     mov  esi,10
640
     mov  esi,10
641
     int  0x40
641
     mcall
Line 642... Line 642...
642
   
642
   
Line 643... Line 643...
643
     popa
643
     popa
Line 650... Line 650...
650
   
650
   
651
     mov  eax,13
651
     mov  eax,13
652
     mov  ebx,150*65536+100
652
     mov  ebx,150*65536+100
653
     mov  ecx,8*65536+8
653
     mov  ecx,8*65536+8
654
     mov  edx,0xffffff
654
     mov  edx,0xffffff
Line 655... Line 655...
655
     int  0x40
655
     mcall
656
   
656
   
657
     mov  eax,4
657
     mov  eax,4
658
     mov  ebx,150*65536+8
658
     mov  ebx,150*65536+8
659
     mov  ecx,0x000000
659
     mov  ecx,0x000000
660
     mov  edx,esccmd
660
     mov  edx,esccmd
Line 661... Line 661...
661
     mov  esi,20
661
     mov  esi,20
662
     int  0x40
662
     mcall
Line 718... Line 718...
718
numtext     db	'                     '
718
numtext     db	'                     '
719
esccmd	    dd	0,0,0,0,0,0,0,0,0,0,0,0,0
719
esccmd	    dd	0,0,0,0,0,0,0,0,0,0,0,0,0
720
escend	    db	'ZrhlABCDHfDME=>NmKJgincoyq',0
720
escend	    db	'ZrhlABCDHfDME=>NmKJgincoyq',0
721
escnumbers  dd	0,0,0,0,0
721
escnumbers  dd	0,0,0,0,0
722
wcolor	    dd	0x000000
722
wcolor	    dd	0x000000
723
labelt	    db	'TERMINAL FOR MODEM IN COM1  0.03',0
723
title	    db	'TERMINAL FOR MODEM IN COM1  0.03',0
Line 724... Line 724...
724
   
724
   
725
text:
725
text:
726
db '                                                                   '
726
db '                                                                   '
727
db '             '
727
db '             '
Line 734... Line 734...
734
db '                                                                   '
734
db '                                                                   '
735
db '             '
735
db '             '
Line 736... Line 736...
736
   
736
   
Line 737... Line -...
737
I_END:
-
 
738
-
 
739
-
 
740
-
 
741
737
I_END: