wok-current diff linld/stuff/src/MEMTOP.ASM @ rev 19883
Add openct
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Apr 03 15:12:17 2017 +0200 (2017-04-03) |
parents | 2717d404353b |
children | 69faca221dde |
line diff
1.1 --- a/linld/stuff/src/MEMTOP.ASM Mon Apr 03 10:59:15 2017 +0200 1.2 +++ b/linld/stuff/src/MEMTOP.ASM Mon Apr 03 15:12:17 2017 +0200 1.3 @@ -97,20 +97,21 @@ 1.4 xor dx,dx 1.5 add ah,4h ;account for 1024 low kb 1.6 adc dx,dx ; (optimized to death) 1.7 + mov cl,10 ;multiply by 1024 1.8 + global N_LXLSH@:near 1.9 +N_LXLSH@: 1.10 ifndef NO386 1.11 - shld dx,ax,10 ;multiply by 1024 1.12 - shl ax,10 ; (kbytes -> bytes) 1.13 + shld dx,ax,cl 1.14 + shl ax,cl ; (kbytes -> bytes) 1.15 else 1.16 + mov ch,0 1.17 @@lp: 1.18 - mov cx,10 1.19 - shl ax,1 ;multiply by 1024 1.20 + shl ax,1 1.21 rcl dx,1 1.22 loop @@lp 1.23 endif 1.24 -; mov cx,ax 1.25 -; or cx,dx ;update ZF 1.26 -;@@fail: 1.27 - ret 1.28 + ret 1.29 + 1.30 ; endp _memtop_88 1.31 1.32 ; proc _memtopz near 1.33 @@ -170,32 +171,24 @@ 1.34 1.35 ifndef xmm_hook 1.36 mov ax,4300h 1.37 - cwd 1.38 - mov es,dx 1.39 int 2fh 1.40 cmp al,80h ; 80h = XMS driver installed 1.41 je @@skip 1.42 endif 1.43 + xor bx,bx 1.44 + mov es,bx 1.45 ifndef NO386 1.46 - ifdef xmm_hook 1.47 - push 0 1.48 - pop es 1.49 - endif 1.50 push cs 1.51 push offset int15_88 1.52 pop eax 1.53 - xchg eax,[es:15*4] 1.54 + xchg eax,[es:bx+15*4] 1.55 mov [saved15],eax 1.56 else 1.57 - ifdef xmm_hook 1.58 - xor ax,ax 1.59 - mov es,ax 1.60 - endif 1.61 mov ax,offset int15_88 1.62 - xchg ax,[es:15*4] 1.63 + xchg ax,[es:bx+15*4] 1.64 mov [word saved15],ax 1.65 mov ax,cs 1.66 - xchg ax,[es:15*4+2] 1.67 + xchg ax,[es:bx+15*4+2] 1.68 mov [word saved15+2],ax 1.69 endif 1.70 @@skip: