wok diff linld/stuff/src/_BEG.ASM @ rev 20528

linld: pascal convention calls
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 09 16:37:55 2018 +0100 (2018-11-09)
parents 049ced0bd387
children 2373992ff751
line diff
     1.1 --- a/linld/stuff/src/_BEG.ASM	Fri Oct 26 10:09:53 2018 +0200
     1.2 +++ b/linld/stuff/src/_BEG.ASM	Fri Nov 09 16:37:55 2018 +0100
     1.3 @@ -21,9 +21,7 @@
     1.4  		endif
     1.5          global  _vcpi:byte
     1.6  _vcpi		db	0
     1.7 -msg_badmapping  db      "VCPI: low 640k need 1:1 mapping"
     1.8 -        global  _topmem:dword
     1.9 -_topmem		dd	10000000h	; max 256m
    1.10 +msg_badmapping  db      "VCPI: low 640k need 1:1 mapping",0
    1.11  
    1.12          ends    _DATA
    1.13  
    1.14 @@ -230,25 +228,22 @@
    1.15                  push	bx			; argc
    1.16  	ifndef	filearg
    1.17                  mov	bx,[di+2]		; argv[1]
    1.18 -                cmp	[byte bx],'@'
    1.19 -		jne	argend
    1.20 -                inc	bx
    1.21 -		extrn	open:near
    1.22 -		call	near open
    1.23 +		extrn	openargs:near
    1.24 +		call	near openargs
    1.25  		jc	argend
    1.26  		pop	bx			; trash argc,  argv >> 1Kb !
    1.27 -		ifdef	EXTRA
    1.28  	global	read_cmdline:near
    1.29 -		endif
    1.30 +                pop	cx			; sizemax=argv
    1.31  read_cmdline:
    1.32 -		push	di
    1.33 +		mov	dx,di
    1.34 +		push	dx
    1.35  		push	ax
    1.36 -		extrn	_read:near
    1.37 -		call	near _read
    1.38 +		xchg	ax,bx
    1.39 +		extrn	@read$cxdxbx:near	; read(fd=bx,buffer=dx,size=cx)
    1.40 +		call	near @read$cxdxbx
    1.41                  pop	bx			; fd for close
    1.42                  pop	si			; si=buffer=argv
    1.43                  add	di,ax
    1.44 -                pop	ax			; trash sizemax=argv
    1.45  		extrn	close:near
    1.46  		call	near close
    1.47                  jmp	argbuild