Rev 3613 | Rev 3627 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3613 | Rev 3614 | ||
---|---|---|---|
Line 69... | Line 69... | ||
69 | format binary as "mnt" |
69 | format binary as "mnt" |
Line 70... | Line 70... | ||
70 | 70 | ||
71 | include 'macros.inc' |
71 | include 'macros.inc' |
Line 72... | Line 72... | ||
72 | include 'struct.inc' |
72 | include 'struct.inc' |
Line 73... | Line 73... | ||
73 | 73 | ||
Line 74... | Line 74... | ||
74 | $Revision: 3613 $ |
74 | $Revision: 3614 $ |
Line 4678... | Line 4678... | ||
4678 | 4678 | ||
4679 | pushad |
4679 | pushad |
4680 | @@: |
4680 | @@: |
4681 | cmp [esi], byte 0 |
4681 | cmp [esi], byte 0 |
4682 | je @f |
4682 | je @f |
4683 | mov eax, 1 |
4683 | mov ebx, 1 |
4684 | movzx ebx, byte [esi] |
4684 | movzx ecx, byte [esi] |
4685 | call sys_msg_board |
4685 | call sys_msg_board |
4686 | inc esi |
4686 | inc esi |
4687 | jmp @b |
4687 | jmp @b |
4688 | @@: |
4688 | @@: |
Line 4719... | Line 4719... | ||
4719 | push eax |
4719 | push eax |
4720 | and al, 0xF |
4720 | and al, 0xF |
4721 | cmp al, 10 |
4721 | cmp al, 10 |
4722 | sbb al, 69h |
4722 | sbb al, 69h |
4723 | das |
4723 | das |
4724 | mov bl, al |
4724 | mov cl, al |
4725 | xor eax, eax |
4725 | xor ebx, ebx |
4726 | inc eax |
4726 | inc ebx |
4727 | call sys_msg_board |
4727 | call sys_msg_board |
4728 | pop eax |
4728 | pop eax |
4729 | pop ecx |
4729 | pop ecx |
4730 | loop @b |
4730 | loop @b |
4731 | popad |
4731 | popad |
Line 4738... | Line 4738... | ||
4738 | msg_board_count dd 0x0 |
4738 | msg_board_count dd 0x0 |
4739 | endg |
4739 | endg |
Line 4740... | Line 4740... | ||
4740 | 4740 | ||
Line 4741... | Line 4741... | ||
4741 | sys_msg_board: |
4741 | sys_msg_board: |
4742 | 4742 | ||
- | 4743 | ; ebx=1 : write : bl byte to write |
|
- | 4744 | ; ebx=2 : read : ebx=0 -> no data, ebx=1 -> data in al |
|
- | 4745 | ||
- | 4746 | push eax ebx ; Save eax and ebx, since we're restoring their order required. |
|
Line 4743... | Line 4747... | ||
4743 | ; eax=1 : write : bl byte to write |
4747 | mov eax, ebx |
4744 | ; eax=2 : read : ebx=0 -> no data, ebx=1 -> data in al |
4748 | mov ebx, ecx |
4745 | 4749 | ||
Line 4797... | Line 4801... | ||
4797 | popa |
4801 | popa |
4798 | end if |
4802 | end if |
4799 | inc ecx |
4803 | inc ecx |
4800 | and ecx, msg_board_data_size - 1 |
4804 | and ecx, msg_board_data_size - 1 |
4801 | mov [msg_board_count], ecx |
4805 | mov [msg_board_count], ecx |
- | 4806 | ||
- | 4807 | pop ebx eax |
|
4802 | ret |
4808 | ret |
4803 | .smbl1: |
4809 | .smbl1: |
4804 | cmp eax, 2 |
4810 | cmp eax, 2 |
4805 | jne .smbl2 |
4811 | jne .smbl2 |
4806 | test ecx, ecx |
4812 | test ecx, ecx |
4807 | jz .smbl21 |
4813 | jz .smbl21 |
- | 4814 | ||
- | 4815 | add esp, 8 ; Returning data in ebx and eax, so no need to restore them. |
|
4808 | mov eax, msg_board_data+1 |
4816 | mov eax, msg_board_data+1 |
4809 | mov ebx, msg_board_data |
4817 | mov ebx, msg_board_data |
4810 | movzx edx, byte [ebx] |
4818 | movzx edx, byte [ebx] |
4811 | call memmove |
4819 | call memmove |
4812 | dec [msg_board_count] |
4820 | dec [msg_board_count] |
4813 | mov [esp + 36], edx ;eax |
4821 | mov [esp + 32], edx ;eax |
4814 | mov [esp + 24], dword 1 |
4822 | mov [esp + 20], dword 1 |
4815 | ret |
4823 | ret |
4816 | .smbl21: |
4824 | .smbl21: |
4817 | mov [esp+36], ecx |
4825 | mov [esp+32], ecx |
4818 | mov [esp+24], ecx |
4826 | mov [esp+20], ecx |
4819 | .smbl2: |
4827 | .smbl2: |
- | 4828 | pop ebx eax |
|
4820 | ret |
4829 | ret |
Line 4821... | Line 4830... | ||
4821 | 4830 | ||
4822 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
4831 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
4823 | ;; 66 sys function. ;; |
4832 | ;; 66 sys function. ;; |