Subversion Repositories Kolibri OS

Rev

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

Rev 132 Rev 142
Line 26... Line 26...
26
;   mov  ebx, 10
26
;   mov  ebx, 10
27
;   int  0x40
27
;   int  0x40
Line 28... Line 28...
28
 
28
 
Line 29... Line 29...
29
   mcall 18,15
29
   mcall 18,15
30
 
30
 
31
   mov  eax, 58               ; load AUTORUN.DAT
31
   mov  eax, 70               ; load AUTORUN.DAT
Line 32... Line 32...
32
   mov  ebx, autorun_dat_info
32
   mov  ebx, autorun_dat_info
33
   int  0x40
33
   int  0x40
Line 57... Line 57...
57
   int  0x40
57
   int  0x40
Line 58... Line 58...
58
 
58
 
59
 
59
 
60
 run_program:     ; time to delay in eax
60
 run_program:     ; time to delay in eax
61
   push eax
61
   push eax
Line 62... Line 62...
62
   mcall 58, start_info
62
   mcall 70, start_info
63
   pop  ebx
63
   pop  ebx
64
 
64
 
Line 75... Line 75...
75
   xor  al, al ;mov  al, ' '
75
   xor  al, al ;mov  al, ' '
76
   rep  stosb
76
   rep  stosb
Line 77... Line 77...
77
 
77
 
78
   mov  ecx, 60
78
   mov  ecx, 60
79
   mov  edi, parameters
-
 
80
   xor  al, al
79
   mov  edi, parameters
Line 81... Line 80...
81
   rep  stosb
80
   rep  stosb
82
 
81
 
Line 110... Line 109...
110
   add  esi, file_data
109
   add  esi, file_data
111
   xor  eax, eax
110
   xor  eax, eax
112
   xor  ebx, ebx
111
   xor  ebx, ebx
113
  .start:
112
  .start:
114
   lodsb
113
   lodsb
115
   cmp  al, '0'
-
 
116
   jb   .finish
-
 
117
   cmp  al, '9'
-
 
118
   ja   .finish
-
 
119
   sub  al, '0'
114
   sub  al, '0'
120
   imul ebx, 10
115
   cmp  al, 9
-
 
116
   ja   .finish
-
 
117
   lea  ebx,[ebx*4+ebx]
121
   add  ebx, eax
118
   lea  ebx,[ebx*2+eax]
122
   inc  [position]
119
   inc  [position]
123
   jmp  .start
120
   jmp  .start
124
  .finish:
121
  .finish:
125
   mov  eax, ebx
122
   mov  eax, ebx
126
   pop  esi ebx
123
   pop  esi ebx
Line 178... Line 175...
178
 position          dd 0            ; position in file
175
 position          dd 0            ; position in file
Line 179... Line 176...
179
 
176
 
180
 autorun_dat_info:                 ; AUTORUN.DAT
177
 autorun_dat_info:                 ; AUTORUN.DAT
181
   .mode           dd 0            ; read file
178
   .mode           dd 0            ; read file
-
 
179
   .start_block    dd 0            ; block to read
182
   .start_block    dd 0            ; block to read
180
                   dd 0
183
   .blocks         dd 0x10         ; 16*512 bytes max
181
   .blocks         dd 16*512       ; 16*512 bytes max
184
   .address        dd file_data
-
 
185
   .workarea       dd work_area
182
   .address        dd file_data
Line 186... Line 183...
186
   db "/RD/1/AUTORUN.DAT",0
183
   db "/RD/1/AUTORUN.DAT",0
187
 
184
 
188
 start_info:
185
 start_info:
189
   .mode           dd 16
186
   .mode           dd 7
190
                   dd 0
187
                   dd 0
191
   .params         dd parameters
188
   .params         dd parameters
192
                   dd 0
189
                   dd 0
Line 193... Line 190...
193
   .workarea       dd work_area
190
                   dd 0
Line 194... Line 191...
194
   .path: ;      
191
   .path: ;      
195
 
192
 
Line 196... Line 193...
196
I_END:
193
I_END:
Line 197... Line -...
197
 
-
 
198
 program           rb 61 ; 60 + [0] char
194