|
|
| version 1.1, 2003/12/10 12:48:08 | version 1.2, 2004/02/07 07:53:44 |
|---|---|
| Line 30 check_p1: shr bl, 1 | Line 30 check_p1: shr bl, 1 |
| ; --------------------------------------------------------------------------- | ; --------------------------------------------------------------------------- |
| INIT_DIPSW: mov word ptr ds:[DIPSW_1], 0ce7ch | INIT_DIPSW: mov byte ptr ds:[DIPSW_1], 01111100b |
| mov byte ptr ds:[DIPSW_3], 05eh | mov byte ptr ds:[DIPSW_2], 11001110b |
| mov byte ptr ds:[DIPSW_3], 01011110b | |
| ret | ret |
| Line 41 INIT_DIPSW: mov word ptr ds:[DIPSW_1], | Line 42 INIT_DIPSW: mov word ptr ds:[DIPSW_1], |
| GET_DIPSW: mov dx, 841eh | GET_DIPSW: mov dx, 841eh |
| in al, dx | in al, dx |
| and al, 0bch | and al, 11111100b |
| xor al, 004h | or al, 00000010b |
| call xchgbits | call xchgbits |
| mov ds:[DIPSW_1], al | mov ds:[DIPSW_1], al |
| inc dh | inc dh |
| in al, dx | in al, dx |
| and al, 0afh | and al, 11101111b |
| call xchgbits | call xchgbits |
| mov ds:[DIPSW_2], al | mov ds:[DIPSW_2], al |
| inc dh | inc dh |
| in al, dx | in al, dx |
| and al, 03fh | and al, 01111111b |
| xor al, 008h | |
| call xchgbits | call xchgbits |
| mov ds:[DIPSW_3], al | mov ds:[DIPSW_3], al |
| inc dh | inc dh |
| Line 61 GET_DIPSW: mov dx, 841eh | Line 61 GET_DIPSW: mov dx, 841eh |
| test al, 20h | test al, 20h |
| je short sw25ed | je short sw25ed |
| or byte ptr ds:[DIPSW_2], 08h | or byte ptr ds:[DIPSW_2], 08h |
| sw25ed: | sw25ed: mov dh, 08eh |
| mov dh, 08eh | |
| in al, dx | in al, dx |
| test al, 10h | test al, 10h |
| je sw38ed | je sw38ed |
| or byte ptr ds:[DIPSW_3], 01h | or byte ptr ds:[DIPSW_3], 01h |
| sw38ed: | sw38ed: ret |
| ret | |
| SET_DIPSW: mov dx, 841eh | SET_DIPSW: mov dx, 841eh |
| mov al, ds:[DIPSW_1] | mov al, ds:[DIPSW_1] |
| call xchgbits | call xchgbits |
| xor al, 4 | and al, 11111100b |
| and al, 0bch | mov ah, al |
| in al, dx | |
| and al, 00000010b ; soundbios | |
| or al, ah | |
| call check_p | call check_p |
| jne short putdipsw1 | jne short putdipsw1 |
| or al, 01h | or al, 00000001b |
| putdipsw1: out dx, al | putdipsw1: out dx, al |
| inc dh | inc dh |
| mov al, ds:[DIPSW_2] | mov al, ds:[DIPSW_2] |
| call xchgbits | call xchgbits |
| and al, 0afh | and al, 11101111b |
| call check_p | call check_p |
| jne short putdipsw2 | jne short putdipsw2 |
| or al, 10h | or al, 00010000b |
| putdipsw2: out dx, al | putdipsw2: out dx, al |
| inc dh | inc dh |
| mov al, ds:[DIPSW_3] | mov al, ds:[DIPSW_3] |
| call xchgbits | call xchgbits |
| and al, 03fh | and al, 01111111b |
| xor al, 008h | |
| call check_p | call check_p |
| jne short putdipsw3 | jne short putdipsw3 |
| or al, 80h | or al, 10000000b |
| putdipsw3: out dx, al | putdipsw3: out dx, al |
| inc dh | inc dh |
| in al, dx | in al, dx |
| and al, 05fh | and al, 01011111b |
| test byte ptr ds:[DIPSW_2], 08h | test byte ptr ds:[DIPSW_2], 08h |
| je short sw25on | je short sw25on |
| or al, 20h | or al, 00100000b |
| sw25on: call check_p | sw25on: call check_p |
| jne putdipsw25 | jne putdipsw25 |
| or al, 80h | or al, 10000000b |
| putdipsw25: out dx, al | putdipsw25: out dx, al |
| mov dh, 08eh | mov dh, 08eh |
| in al, dx | in al, dx |
| and al, 6fh | and al, 01101111b |
| test byte ptr ds:[DIPSW_3], 1 | test byte ptr ds:[DIPSW_3], 1 |
| je short sw38on | je short sw38on |
| or al, 10h | or al, 00010000b |
| sw38on: call check_p | sw38on: call check_p |
| jne putdipsw38 | jne putdipsw38 |
| or al, 80h | or al, 10000000b |
| putdipsw38: out dx, al | putdipsw38: out dx, al |
| ret | ret |