# HG changeset patch # User Pascal Bellard # Date 1543485296 -3600 # Node ID 5211cefde1e43142e34e0510c3a7d38372d50adf # Parent 65366955881f8a907496704b0a341525399a37e5 linld: _fastcall calls (again) diff -r 65366955881f -r 5211cefde1e4 linld/stuff/src/CRTL.ASM --- a/linld/stuff/src/CRTL.ASM Wed Nov 28 19:46:10 2018 +0100 +++ b/linld/stuff/src/CRTL.ASM Thu Nov 29 10:54:56 2018 +0100 @@ -49,19 +49,19 @@ ;*************************************************************** ;_fastcall void strcpy(const char* a, const char* b); -;_fastcall void strcat(const char* a, const char* b); -;_fastcall void strcatb(const char* a, const char* b); +;_fastcall void strcat(const char* a, const char* b); +;_fastcall void strcatb(const char* a, const char* b); ;*************************************************************** global @strcatb$qpxzct1:near proc @strcatb$qpxzct1 near ifdef EXTRA mov cl,7Fh - db 0bbh ; mov bx,imm opcode + db 0bah ; mov dx,imm opcode global @strcat$qpxzct1:near @strcat$qpxzct1: mov cl,80h - db 0bbh ; mov bx,imm opcode + db 0bah ; mov dx,imm opcode global @strcpy$qpxzct1:near @strcpy$qpxzct1: xor cx,cx @@ -861,19 +861,18 @@ global @read_image$qp11image_himem:near proc @read_image$qp11image_himem near - push bp si di + push si di mov di,bx - mov si,offset _xfer_buf - mov bp,4096 - push bp ; original size + mov si,4096 + push si ; original size @@loop: ifndef NO386 - movzx ecx,bp + movzx ecx,si mov eax,[(image_himem di).chunk_size] cmp ecx,eax jb @@szok else - mov cx,bp + mov cx,si mov ax,[word (image_himem di).chunk_size] cmp cx,ax jb @@szok @@ -883,49 +882,50 @@ xchg ax,cx @@szok: jcxz image_done - mov dx,si + mov dx,offset _xfer_buf mov bx,[di] call @read$cxdxbx jc image_done - add si,ax xor cx,cx + cwd ; ax < 8000h ifndef NO386 cwde ; ax < 8000h sub [(image_himem di).chunk_size],eax + mov bx,ax else - cwd ; ax < 8000h sub [word (image_himem di).chunk_size],ax + xchg ax,bx sbb [word ((image_himem di).chunk_size)+2],dx jnz @@fill cmp [word (image_himem di).chunk_size],dx endif jnz @@fill - inc cx + dec cx @@fill: - test al,3 + test bl,3 je @@filled - mov [si],ch - inc si - inc ax + mov [bx+_xfer_buf],dh + inc bx jmp @@fill @@filled: ifndef NO386 sub [(image_himem di).remaining],eax else - sub [word (image_himem di).remaining],ax + sub [word (image_himem di).remaining],bx sbb [word ((image_himem di).remaining)+2],dx endif - sub bp,ax + sub si,ax pushf + and cx,[(image_himem di).next_chunk] jcxz @@same_chunk - call [(image_himem di).next_chunk] + call cx @@same_chunk: popf jnz @@loop image_done: pop ax ; original size - sub ax,bp - pop di si bp + sub ax,si + pop di si ret endp @read_image$qp11image_himem