wok-6.x rev 24014

linld: add quick boot switch (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 19 18:33:17 2021 +0000 (2021-02-19)
parents bc4b94310a29
children 14ca5e18cfd9
files linld/stuff/src/CRTL.ASM linld/stuff/src/LINLD.CPP linld/stuff/src/MEMCPY32.ASM linld/stuff/src/VCPI.ASM linld/stuff/src/XMM.ASM
line diff
     1.1 --- a/linld/stuff/src/CRTL.ASM	Thu Feb 18 08:56:43 2021 +0000
     1.2 +++ b/linld/stuff/src/CRTL.ASM	Fri Feb 19 18:33:17 2021 +0000
     1.3 @@ -371,43 +371,38 @@
     1.4  		push	si di
     1.5  		xchg	ax,di			; vars => di
     1.6  		dec	bx
     1.7 -@@testalt:
     1.8  		sub	di,dx
     1.9  @@loop:
    1.10  		mov	si,cx			; s
    1.11  		add	di,dx
    1.12  @@match:
    1.13 -		inc	bx			; keywords++
    1.14  		lodsb				; *s++
    1.15  		or	al,20h			; locase
    1.16 +		cmp	al,'/'			; 2f
    1.17 +		jne	@@notopt
    1.18 +		mov	al,'-'
    1.19 +@@notopt:
    1.20 +		inc	bx			; keywords++
    1.21  		cmp	al,[bx]
    1.22  		je	@@match
    1.23 -		cmp	al,'/'			; 2f
    1.24 +		cmp	[byte bx],dh
    1.25 +		je	@@lastal
    1.26 +		cmp	[byte bx],'|'
    1.27 +		je	@@testal
    1.28 +		jl	@@notsw			; } ~ <del>
    1.29 +		cmp	al,20h			; EOS or 20h
    1.30 +		jne	@@loop			; assume [bx] = '|'
    1.31 +@@notsw:
    1.32 +		mov	ax,-1
    1.33  		jne	@@notopt
    1.34 -		cmp	[byte bx],'-'
    1.35 -		je	@@match
    1.36 -@@notopt:
    1.37 -		cmp	[byte bx],'|'
    1.38 -		je	@@test
    1.39 -		cmp	[byte bx],dh
    1.40 -		je	@@test
    1.41 -		mov	al,-1
    1.42 -		inc	bx
    1.43 -		jmp	@@notopt
    1.44 -@@test:
    1.45 -		or	al,al			; 1st loop ?
    1.46 -		jns	@@testal
    1.47 -		cmp	[byte bx],dh
    1.48 -		jne	@@loop
    1.49 +		jmp	@@setnum
    1.50  @@testal:
    1.51 -		cmp	al,'*'
    1.52 -		je	@@setnum
    1.53 -		cmp	al,'='
    1.54 -		;je	@@found
    1.55 -		;cmp	al,0			; eos, si=next argv
    1.56 +		inc	ax
    1.57 +		jz	@@loop
    1.58 +@@lastal:
    1.59 +		cmp	al,'='+1
    1.60  		xchg	ax,cx			; return s if failure
    1.61  		jne	@@nokeyword
    1.62 -@@found:
    1.63  		dec	dx
    1.64  		dec	dx
    1.65  		je	@@done
     2.1 --- a/linld/stuff/src/LINLD.CPP	Thu Feb 18 08:56:43 2021 +0000
     2.2 +++ b/linld/stuff/src/LINLD.CPP	Fri Feb 19 18:33:17 2021 +0000
     2.3 @@ -56,9 +56,9 @@
     2.4  	}
     2.5  	if (argstr(*argv,"cl|image|initrd|iso",clp) == (int) clp) continue;
     2.6  #ifdef QUICK_BOOT
     2.7 -	if (argnum(*argv,"root|vga|mem|-b|-f*|-q*|-v*",&root_dev) >= (int) &base_himem) continue;
     2.8 +	if (argnum(*argv,"root|vga|mem|-b|-f~-q~-v~",&root_dev) >= (int) &base_himem) continue;
     2.9  #else
    2.10 -	if (argnum(*argv,"root|vga|mem|-b|-f*",&root_dev) >= (int) &base_himem) continue;
    2.11 +	if (argnum(*argv,"root|vga|mem|-b|-f~",&root_dev) >= (int) &base_himem) continue;
    2.12  #endif
    2.13  	if (fileexist(*argv) != -1) {
    2.14              kernel_name=*argv;
     3.1 --- a/linld/stuff/src/MEMCPY32.ASM	Thu Feb 18 08:56:43 2021 +0000
     3.2 +++ b/linld/stuff/src/MEMCPY32.ASM	Fri Feb 19 18:33:17 2021 +0000
     3.3 @@ -153,14 +153,6 @@
     3.4                  call    near vcpi_pm_copy_routine ; Call pm copy routine via vcpi pm
     3.5  		jmp	@@done
     3.6  @@real_mode:
     3.7 -                cmp     esi,edi
     3.8 -                jae     @@do_copy
     3.9 -                add     esi,ecx         ;src<dst: we must do
    3.10 -                add     edi,ecx         ;  copy backwards to avoid
    3.11 -                std                     ;  overwrite bug
    3.12 -                db      67h     	;address width override for esi/edi
    3.13 -		cmpsb			;  dec esi/edi
    3.14 -@@do_copy:
    3.15                  cli
    3.16  oldGDTR		=	(pword srcseg)	; don't need src seg/ofs anymore
    3.17                  sgdt    [oldGDTR]
    3.18 @@ -177,6 +169,14 @@
    3.19                  pop     ds              ;base=0, lim = 4gb
    3.20                  push    ds              ;
    3.21                  pop     es              ;
    3.22 +                cmp     esi,edi
    3.23 +                jae     @@do_copy
    3.24 +                add     esi,ecx         ;src<dst: we must do
    3.25 +                add     edi,ecx         ;  copy backwards to avoid
    3.26 +                std                     ;  overwrite bug
    3.27 +                db      67h		;address width override for esi/edi
    3.28 +		cmpsb			;  dec esi/edi
    3.29 +@@do_copy:
    3.30                  ;db      66h     ;operand width override for ecx
    3.31                  db      67h     ;address width override for esi/edi
    3.32              rep movsb
     4.1 --- a/linld/stuff/src/VCPI.ASM	Thu Feb 18 08:56:43 2021 +0000
     4.2 +++ b/linld/stuff/src/VCPI.ASM	Fri Feb 19 18:33:17 2021 +0000
     4.3 @@ -341,16 +341,16 @@
     4.4  
     4.5                  assume  cs:DGROUP,ds:DGROUP
     4.6                  push	ds
     4.7 +		extrn	sssp:dword
     4.8 +		mov	bx,offset sssp
     4.9 +                mov     [bx],sp
    4.10 +                ;mov     [bx+2],ss
    4.11                  ifdef   QUICK_BOOT
    4.12  		extrn	_cmdnum:dword
    4.13  v86boot	=	(byte _cmdnum+24)
    4.14 -		cmp	[v86boot],0
    4.15 +		test	[v86boot],bh
    4.16  		jnz	@vm2rm_ret
    4.17  		endif
    4.18 -		mov	bx,offset sssp
    4.19 -                mov     [bx],sp
    4.20 -                ;mov     [bx+2],ss
    4.21 -		extrn	sssp:dword
    4.22                  ifdef NO386
    4.23  		extrn	_vcpi:byte
    4.24  		test	[_vcpi],bh
     5.1 --- a/linld/stuff/src/XMM.ASM	Thu Feb 18 08:56:43 2021 +0000
     5.2 +++ b/linld/stuff/src/XMM.ASM	Fri Feb 19 18:33:17 2021 +0000
     5.3 @@ -64,7 +64,7 @@
     5.4  LARGE_XMM_ALLOC	=	1
     5.5  		ifdef	LARGE_XMM_ALLOC
     5.6                  mov     ch,89h          ;allocate blk of EDX kilobytes
     5.7 -		test	[skip_alloc],ch	; 89h & ('*'=2Ah) = 08h
     5.8 +		test	[skip_alloc],ch
     5.9  		jne	@@err
    5.10  		extrn	_cpu386:byte
    5.11  		test	[_cpu386],ch