--- np2/romimage/ITF.ASM 2003/12/10 12:48:08 1.1 +++ np2/romimage/ITF.ASM 2004/01/28 23:36:13 1.4 @@ -27,10 +27,14 @@ item_sw dw 4 dup(?) dipitem ends -START: jmp short main +START: jmp short vxmain dw offset dipswflag + mov dl, 1 + jmp short main + mov dl, 2 + jmp short main - +vxmain: mov dl, 0 main: cli cld mov ax, 0030h @@ -39,6 +43,7 @@ main: cli mov ax, DATASEG mov ds, ax + mov ds:[MACTYPE], dl ifdef DEBUG_INIT DEBUG_INIT @@ -103,19 +108,39 @@ boot_normalprc: push ax mov cl, 0e1h xor dx, dx - pop ax + pop bx - add ax, ax - mov bx, ax - call cs:firmproc[bx] + mov al, ds:[MACTYPE] + cmp al, 0 + je short necmemchk + dec al + jne short retbioswait + call epson_memtest + jmp short retbioswait + +necmemchk: add bx, bx + call cs:firmproc[bx] call MEMORY_TEST - mov ah, 90 +retbioswait: mov ah, 90 call WAITVSYNC - clc - jmp exitprocess +exitprocess: cli + pushf +ifdef DEBUG_TERM + DEBUG_TERM +endif + KEYINT_TERM + call SCREEN_CLEAR + mov di, int09off + 8000h + mov cx, (DATASEGEND - int09off) / 2 + xor ax, ax + rep stosw + popf + ITF_EXIT + + include resource.x86 include itfsub.x86 @@ -137,8 +162,6 @@ include ssp_msw.x86 ; --------------------------------------------------------------------------- - - disptextjis: push dx push di call TEXTOUT_CS @@ -308,21 +331,15 @@ curitemputs: or dl, 80h ; --------------------------------------------------------------------------- -REBOOT_PROCESS: stc - -exitprocess: cli - pushf -ifdef DEBUG_TERM - DEBUG_TERM +REBOOT_PROCESS: +ifdef NP2 + cli + mov si, offset np2str_hwreset + call sendnp2port +hltlp: hlt + jmp short hltlp endif - KEYINT_TERM - call SCREEN_CLEAR - mov di, int09off + 8000h - mov cx, (DATASEGEND - int09off) / 2 - xor ax, ax - rep stosw - popf - ITF_EXIT + jmp exitprocess CODE ENDS END START