wok diff memtest/stuff/bootloader.S @ rev 19949

memtest: add @cmdlinefile support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 07 21:49:40 2017 +0200 (2017-05-07)
parents 9e463ebef079
children d74b8b5a78d0
line diff
     1.1 --- a/memtest/stuff/bootloader.S	Thu May 04 12:47:15 2017 +0200
     1.2 +++ b/memtest/stuff/bootloader.S	Sun May 07 21:49:40 2017 +0200
     1.3 @@ -26,6 +26,7 @@
     1.4  //#define MOVE_MAX_SYSSIZE	always memcpy 512Kb		-2
     1.5  //#define NO_CURSOR_DEFINITION					-8
     1.6  //#define NO_CMDLINE_SHRINK	remove heading spaces ?		-6
     1.7 +//#define NO_CMDLINE_FILE	remove @cmdline file support ?	-20
     1.8  //#define NO_DOTS		show progression dots ?		-8
     1.9  
    1.10  #ifdef EXE_SUPPORT
    1.11 @@ -53,7 +54,7 @@
    1.12  	.word	(CODESZ+511)/512	// Pages in file			INSTALLER
    1.13  	.word	0			// Relocations
    1.14  	.word	(end_header-_start)/16	// Size of header in paragraphs
    1.15 -	.word	(CODESZ+stacktop+15)/16	// Minimum extra paragraphs needed	INSTALLER
    1.16 +	.word	4096			// Minimum extra paragraphs needed
    1.17  	.word	-1			// Maximum extra paragraphs needed
    1.18  	.word	(CODESZ+15)/16		// Initial (relative) SS value		INSTALLER
    1.19  	.word	stacktop		// Initial SP value
    1.20 @@ -221,7 +222,24 @@
    1.21  	lodsb
    1.22  	cmpb	$0x20, %al
    1.23  	je	skipspace
    1.24 +#  ifndef NO_CMDLINE_FILE
    1.25 +	movw	%si,%dx
    1.26  	decw	%si
    1.27 +	subb	$'@',%al
    1.28 +	jne	notafile
    1.29 +	movb	$0x3D,%ah
    1.30 +	int	$0x21
    1.31 +	jc	notafile
    1.32 +	xchgw	%ax,%bx
    1.33 +	//movw	%si,%dx		// ~320 bytes max
    1.34 +	movw	$EXEADRS(notafile)-130,%cx
    1.35 +	movb	$0x3F,%ah
    1.36 +	int	$0x21
    1.37 +	xchgw	%ax,%cx
    1.38 +notafile:
    1.39 +#  else
    1.40 +	decw	%si
    1.41 +#  endif
    1.42  # endif
    1.43  	rep
    1.44  	  movsb
    1.45 @@ -475,8 +493,3 @@
    1.46  	.word	stacktop-4-16-4,INITSEG
    1.47  # endif
    1.48  #endif
    1.49 -
    1.50 -helpmsg:
    1.51 -	.ascii	"SliTaz zImage boot"
    1.52 -	.org 497
    1.53 -helpend: