Rev 9268 | Rev 9458 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9268 | Rev 9279 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | format binary as "mnt" |
75 | format binary as "mnt" |
Line 76... | Line 76... | ||
76 | 76 | ||
77 | include 'macros.inc' |
77 | include 'macros.inc' |
Line 78... | Line 78... | ||
78 | include 'struct.inc' |
78 | include 'struct.inc' |
Line 79... | Line 79... | ||
79 | 79 | ||
80 | $Revision: 9268 $ |
80 | $Revision: 9279 $ |
Line 1364... | Line 1364... | ||
1364 | pop eax |
1364 | pop eax |
1365 | ret |
1365 | ret |
Line 1366... | Line 1366... | ||
1366 | 1366 | ||
1367 | align 4 |
1367 | align 4 |
1368 | ;input eax=43,bl-byte of output, ecx - number of port |
1368 | ;input eax=43,bl-byte of output, ecx - number of port |
1369 | sys_outport: |
1369 | ;sys_outport: |
1370 | 1370 | ; |
|
1371 | mov edi, ecx ; separate flag for read / write |
- | |
1372 | and ecx, 65535 |
- | |
1373 | - | ||
1374 | mov eax, [RESERVED_PORTS] |
- | |
1375 | test eax, eax |
- | |
1376 | jnz .sopl8 |
- | |
1377 | inc eax |
- | |
1378 | mov [esp+32], eax |
- | |
1379 | ret |
- | |
1380 | - | ||
1381 | .sopl8: |
- | |
1382 | mov edx, [TASK_BASE] |
- | |
1383 | mov edx, [edx+0x4] |
1371 | ; mov edi, ecx ; separate flag for read / write |
- | 1372 | ; and ecx, 65535 |
|
- | 1373 | ; |
|
- | 1374 | ; mov eax, [RESERVED_PORTS] |
|
- | 1375 | ; test eax, eax |
|
- | 1376 | ; jnz .sopl8 |
|
- | 1377 | ; inc eax |
|
- | 1378 | ; mov [esp+32], eax |
|
- | 1379 | ; ret |
|
- | 1380 | ; |
|
- | 1381 | ; .sopl8: |
|
- | 1382 | ; mov edx, [TASK_BASE] |
|
- | 1383 | ; mov edx, [edx+0x4] |
|
1384 | ;and ecx,65535 |
1384 | ; ;and ecx,65535 |
1385 | ;cld - set on interrupt 0x40 |
1385 | ; ;cld - set on interrupt 0x40 |
1386 | .sopl1: |
1386 | ; .sopl1: |
1387 | 1387 | ; |
|
1388 | mov esi, eax |
1388 | ; mov esi, eax |
1389 | shl esi, 4 |
1389 | ; shl esi, 4 |
1390 | add esi, RESERVED_PORTS |
1390 | ; add esi, RESERVED_PORTS |
1391 | cmp edx, [esi+0] |
1391 | ; cmp edx, [esi+0] |
1392 | jne .sopl2 |
1392 | ; jne .sopl2 |
1393 | cmp ecx, [esi+4] |
1393 | ; cmp ecx, [esi+4] |
1394 | jb .sopl2 |
1394 | ; jb .sopl2 |
1395 | cmp ecx, [esi+8] |
1395 | ; cmp ecx, [esi+8] |
1396 | jg .sopl2 |
1396 | ; jg .sopl2 |
1397 | .sopl3: |
1397 | ;.sopl3: |
1398 | 1398 | ; |
|
1399 | test edi, 0x80000000; read ? |
1399 | ; test edi, 0x80000000; read ? |
1400 | jnz .sopl4 |
1400 | ; jnz .sopl4 |
1401 | 1401 | ; |
|
1402 | mov eax, ebx |
1402 | ; mov eax, ebx |
1403 | mov dx, cx ; write |
1403 | ; mov dx, cx ; write |
1404 | out dx, al |
1404 | ; out dx, al |
1405 | and [esp+32], dword 0 |
1405 | ; and [esp+32], dword 0 |
1406 | ret |
1406 | ; ret |
1407 | 1407 | ; |
|
1408 | .sopl2: |
1408 | ; .sopl2: |
1409 | 1409 | ; |
|
1410 | dec eax |
1410 | ; dec eax |
1411 | jnz .sopl1 |
1411 | ; jnz .sopl1 |
1412 | inc eax |
1412 | ; inc eax |
1413 | mov [esp+32], eax |
1413 | ; mov [esp+32], eax |
1414 | ret |
1414 | ; ret |
1415 | 1415 | ; |
|
1416 | 1416 | ; |
|
1417 | .sopl4: |
1417 | ; .sopl4: |
1418 | 1418 | ; |
|
1419 | mov dx, cx ; read |
1419 | ; mov dx, cx ; read |
1420 | in al, dx |
1420 | ; in al, dx |
1421 | and eax, 0xff |
1421 | ; and eax, 0xff |
1422 | and [esp+32], dword 0 |
1422 | ; and [esp+32], dword 0 |
1423 | mov [esp+20], eax |
1423 | ; mov [esp+20], eax |
Line 1424... | Line 1424... | ||
1424 | ret |
1424 | ; ret |
1425 | 1425 | ||
1426 | display_number: |
1426 | display_number: |
1427 | ; add check pointers |
1427 | ; add check pointers |
Line 2666... | Line 2666... | ||
2666 | window_minimize db 0 |
2666 | window_minimize db 0 |
2667 | sound_flag db 0 |
2667 | sound_flag db 0 |
Line 2668... | Line 2668... | ||
2668 | 2668 | ||
Line 2669... | Line 2669... | ||
2669 | endg |
2669 | endg |
2670 | 2670 | ||
Line 2671... | Line 2671... | ||
2671 | UID_NONE=0 |
2671 | ;UID_NONE=0 |
2672 | UID_KOLIBRI=2 ;russian |
2672 | ;UID_KOLIBRI=2 ;russian |
2673 | 2673 | ||
2674 | iglobal |
2674 | iglobal |
Line 4231... | Line 4231... | ||
4231 | .siar1: |
4231 | .siar1: |
4232 | bts [edi], eax |
4232 | bts [edi], eax |
4233 | ; or [edi],byte bl ; disable access - ebp = 1 |
4233 | ; or [edi],byte bl ; disable access - ebp = 1 |
4234 | pop eax edi |
4234 | pop eax edi |
4235 | ret |
4235 | ret |
- | 4236 | ||
- | 4237 | align 4 |
|
- | 4238 | syscall_reserveportarea: ; ReservePortArea and FreePortArea |
|
- | 4239 | ||
- | 4240 | call r_f_port_area |
|
- | 4241 | mov [esp+32], eax |
|
- | 4242 | ret |
|
- | 4243 | ||
4236 | ;reserve/free group of ports |
4244 | ;reserve/free group of ports |
4237 | ; * eax = 46 - number function |
4245 | ; * eax = 46 - number function |
4238 | ; * ebx = 0 - reserve, 1 - free |
4246 | ; * ebx = 0 - reserve, 1 - free |
4239 | ; * ecx = number start arrea of ports |
4247 | ; * ecx = number start arrea of ports |
4240 | ; * edx = number end arrea of ports (include last number of port) |
4248 | ; * edx = number end arrea of ports (include last number of port) |
Line 5576... | Line 5584... | ||
5576 | mov ecx, edx |
5584 | mov ecx, edx |
5577 | ; jmp [draw_line] |
5585 | ; jmp [draw_line] |
5578 | jmp __sys_draw_line |
5586 | jmp __sys_draw_line |
Line 5579... | Line -... | ||
5579 | - | ||
5580 | - | ||
5581 | align 4 |
- | |
5582 | syscall_reserveportarea: ; ReservePortArea and FreePortArea |
- | |
5583 | - | ||
5584 | call r_f_port_area |
- | |
Line 5585... | Line 5587... | ||
5585 | mov [esp+32], eax |
5587 | |
5586 | ret |
5588 | |
5587 | 5589 | ||
5588 | align 4 |
5590 | align 4 |