|
|
| version 1.1, 2003/12/10 12:48:09 | version 1.5, 2004/01/31 20:05:23 |
|---|---|
| Line 44 endif | Line 44 endif |
| EXTMEMORYMAX equ 128 ; 128MB MAX | EXTMEMORYMAX equ 128 ; 128MB MAX |
| res_memory128ok db "MEMORY 128" | res_memory128ok db "MEMORY 128" |
| res_memoryok db "KB OK", 0 | res_memoryok db "KB OK", 0 |
| res_plusspace db "+", 0 | res_plusspace db "+", 0 |
| res_ramchk db "RAM check : 128KB Ok", 0 | |
| res_extchk db "Extended RAM : 128KB Ok", 0 | |
| extmemory_chk: push ax | extmemory_chk: push ax |
| mov bx, 2000h | mov bx, 2000h |
| mov cl, 0 | |
| call bp | call bp |
| pop ax | pop ax |
| add ax, 128 | add ax, 128 |
| Line 80 MEMORY_TEST: mov bp, offset sub_memchk | Line 84 MEMORY_TEST: mov bp, offset sub_memchk |
| ; メインメモリ 〜128KB | ; メインメモリ 〜128KB |
| mov bx, 2000h | mov bx, 2000h |
| mov cl, 0 | |
| call bp | call bp |
| mov cl, 0e1h | mov cl, 0e1h |
| mov si, offset res_memory128ok | mov si, offset res_memory128ok |
| Line 101 mainmemtest_l1: call bp | Line 106 mainmemtest_l1: call bp |
| push cx | push cx |
| push dx | push dx |
| mov ax, bx | mov ax, bx |
| shr ax, 6 | mov cl, 6 |
| shr ax, cl | |
| call STRING_I2A | call STRING_I2A |
| pop dx | pop dx |
| pop cx | pop cx |
| Line 129 mainmemtest_ed: | Line 135 mainmemtest_ed: |
| xor ax, ax | xor ax, ax |
| mov dx, ax | mov dx, ax |
| push bx | push bx |
| push I2ABUFFER + 5 | mov cx, I2ABUFFER + 5 |
| push cx | |
| call extmemory_chk | call extmemory_chk |
| push ds | push ds |
| Line 146 extmomey_o16: | Line 153 extmomey_o16: |
| mov ah, 6 | mov ah, 6 |
| call WAITVSYNC | call WAITVSYNC |
| pop ax | pop ax |
| shl bx, 3 | mov cl, 3 |
| shl bx, cl | |
| push bx | push bx |
| push I2ABUFFER + 3 | mov cx, I2ABUFFER + 3 |
| push cx | |
| call extmemory_chk | call extmemory_chk |
| extmemtest_end: pop dx | extmemtest_end: pop dx |
| ret | ret |
| ; ---- epson | |
| epson_memtest: mov bx, 2000h ; メインメモリ 〜128KB | |
| mov cl, 0 | |
| call sub_memchk | |
| mov cl, 0e1h | |
| mov si, offset res_ramchk | |
| call TEXTOUT_CS | |
| mov ch, es:[MEM_MSW3] ; メインメモリ 128KB〜640KB | |
| and ch, 7 | |
| je short epmt_ext | |
| cmp ch, 4 | |
| jbe short epmt_main_lp | |
| mov ch, 4 | |
| epmt_main_lp: mov cl, 0 | |
| call sub_memchk | |
| add bh, 20h | |
| push cx | |
| push dx | |
| mov ax, bx | |
| mov cl, 6 | |
| shr ax, cl | |
| call STRING_I2A | |
| pop dx | |
| pop cx | |
| mov dl, 17 | |
| mov cl, 0e1h | |
| call TEXTOUT_DS | |
| dec ch | |
| jne epmt_main_lp | |
| epmt_ext: in al, 42h ; 拡張メモリ | |
| test al, 2 | |
| jne short epmt_exit | |
| xor ax, ax | |
| push ds | |
| mov ds, ax | |
| or al, ds:[MEM_EXPMMSZ] | |
| pop ds | |
| je short epmt_exit | |
| inc dh | |
| mov dl, 0 | |
| push ax | |
| mov bx, 2000h | |
| mov cl, 0 | |
| call sub_memchk | |
| mov cl, 0e1h | |
| mov si, offset res_extchk | |
| call TEXTOUT_CS | |
| pop ax | |
| epmt_ext_lp: inc ah | |
| push ax | |
| mov bx, 2000h | |
| mov cl, 0 | |
| call sub_memchk | |
| pop ax | |
| push ax | |
| push dx | |
| mov al, 0 | |
| shr ax, 1 | |
| call STRING_I2A | |
| pop dx | |
| mov cl, 0e1h | |
| mov dl, 15 | |
| mov si, I2ABUFFER + 5 | |
| call TEXTOUT_DS | |
| pop ax | |
| cmp ah, al | |
| jb epmt_ext_lp | |
| epmt_exit: inc dh | |
| mov dl, 0 | |
| ret | |